mage-ai 0.9.74__py3-none-any.whl → 0.9.75__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 (329) hide show
  1. mage_ai/ai/llm_pipeline_wizard.py +6 -4
  2. mage_ai/ai/openai_client.py +7 -5
  3. mage_ai/data_integrations/destinations/constants.py +1 -0
  4. mage_ai/data_preparation/models/block/__init__.py +4 -4
  5. mage_ai/data_preparation/models/constants.py +1 -1
  6. mage_ai/data_preparation/models/pipeline.py +5 -0
  7. mage_ai/data_preparation/templates/data_exporters/streaming/elasticsearch.yaml +3 -0
  8. mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +6 -3
  9. mage_ai/io/base.py +29 -1
  10. mage_ai/io/oracledb.py +2 -4
  11. mage_ai/io/postgres.py +38 -19
  12. mage_ai/io/utils.py +18 -0
  13. mage_ai/orchestration/db/__init__.py +3 -3
  14. mage_ai/server/constants.py +1 -1
  15. mage_ai/server/frontend_dist/404.html +3 -3
  16. mage_ai/server/frontend_dist/_next/static/38-PtskJFUTYUpRhT1qF_/_buildManifest.js +1 -0
  17. mage_ai/server/frontend_dist/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  18. mage_ai/server/frontend_dist/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  19. mage_ai/server/frontend_dist/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  20. mage_ai/server/frontend_dist/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  21. mage_ai/server/frontend_dist/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
  22. mage_ai/server/frontend_dist/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  23. mage_ai/server/frontend_dist/_next/static/chunks/449-f689774546860ca4.js +1 -0
  24. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  25. mage_ai/server/frontend_dist/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  26. mage_ai/server/frontend_dist/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  27. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js → _app-13bf3b7dcef50c29.js} +2 -2
  28. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  29. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  30. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  31. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  32. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  33. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  34. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  35. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  39. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  41. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  46. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  47. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  50. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  51. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  54. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  56. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  57. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  58. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  59. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  61. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  62. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  63. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  64. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  76. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-b9a067f3bd0a3a05.js → webpack-0bc44da590c7cf85.js} +1 -1
  81. mage_ai/server/frontend_dist/block-layout.html +3 -3
  82. mage_ai/server/frontend_dist/compute.html +6 -6
  83. mage_ai/server/frontend_dist/files.html +6 -6
  84. mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
  85. mage_ai/server/frontend_dist/global-data-products.html +6 -6
  86. mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
  87. mage_ai/server/frontend_dist/global-hooks.html +6 -6
  88. mage_ai/server/frontend_dist/index.html +3 -3
  89. mage_ai/server/frontend_dist/manage/files.html +6 -6
  90. mage_ai/server/frontend_dist/manage/overview.html +6 -6
  91. mage_ai/server/frontend_dist/manage/pipeline-runs.html +6 -6
  92. mage_ai/server/frontend_dist/manage/settings.html +6 -6
  93. mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
  94. mage_ai/server/frontend_dist/manage/users/new.html +6 -6
  95. mage_ai/server/frontend_dist/manage/users.html +6 -6
  96. mage_ai/server/frontend_dist/manage.html +6 -6
  97. mage_ai/server/frontend_dist/oauth.html +5 -5
  98. mage_ai/server/frontend_dist/overview.html +6 -6
  99. mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
  100. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
  114. mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
  115. mage_ai/server/frontend_dist/pipelines.html +6 -6
  116. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
  117. mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
  118. mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
  119. mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
  120. mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
  121. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
  122. mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
  123. mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
  124. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
  125. mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
  126. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
  127. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
  128. mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
  129. mage_ai/server/frontend_dist/settings.html +3 -3
  130. mage_ai/server/frontend_dist/sign-in.html +7 -7
  131. mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
  132. mage_ai/server/frontend_dist/templates.html +6 -6
  133. mage_ai/server/frontend_dist/terminal.html +6 -6
  134. mage_ai/server/frontend_dist/test.html +3 -3
  135. mage_ai/server/frontend_dist/triggers.html +6 -6
  136. mage_ai/server/frontend_dist/v2/canvas.html +2 -2
  137. mage_ai/server/frontend_dist/v2.html +2 -2
  138. mage_ai/server/frontend_dist/version-control.html +6 -6
  139. mage_ai/server/frontend_dist_base_path_template/404.html +3 -3
  140. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  144. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-f689774546860ca4.js +1 -0
  147. mage_ai/server/{frontend_dist/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist_base_path_template/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js → _app-0392ef723ea2c6f8.js} +2 -2
  151. mage_ai/server/{frontend_dist/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist_base_path_template/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  152. mage_ai/server/{frontend_dist/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist_base_path_template/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  155. mage_ai/server/{frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  162. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  164. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  173. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  174. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  177. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  178. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  180. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  182. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  184. mage_ai/server/{frontend_dist/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  187. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  189. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  199. mage_ai/server/{frontend_dist/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist_base_path_template/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  202. mage_ai/server/{frontend_dist/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist_base_path_template/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  203. mage_ai/server/frontend_dist_base_path_template/_next/static/dxnSzgIvSG4Ke5LM-tPQX/_buildManifest.js +1 -0
  204. mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
  205. mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
  206. mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
  207. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
  208. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
  209. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
  210. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
  211. mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
  212. mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
  213. mage_ai/server/frontend_dist_base_path_template/manage/overview.html +6 -6
  214. mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.html +6 -6
  215. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
  216. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
  217. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
  218. mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
  219. mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
  220. mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
  221. mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
  222. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
  223. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  224. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
  225. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
  226. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
  227. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
  228. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  229. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  230. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
  231. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
  232. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
  233. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
  234. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
  235. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  236. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
  237. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
  238. mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
  239. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
  240. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
  241. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
  242. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
  243. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
  244. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
  245. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
  246. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
  247. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
  248. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
  249. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
  250. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
  251. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
  252. mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
  253. mage_ai/server/frontend_dist_base_path_template/sign-in.html +7 -7
  254. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
  255. mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
  256. mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
  257. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  258. mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
  259. mage_ai/server/frontend_dist_base_path_template/v2/canvas.html +2 -2
  260. mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
  261. mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
  262. mage_ai/server/server.py +9 -0
  263. mage_ai/services/teams/config.py +13 -2
  264. mage_ai/services/teams/teams.py +13 -11
  265. mage_ai/shared/constants.py +3 -1
  266. mage_ai/shared/enum.py +2 -5
  267. mage_ai/shared/environments.py +27 -3
  268. mage_ai/streaming/sinks/elasticsearch.py +15 -5
  269. mage_ai/tests/api/endpoints/test_blocks.py +1 -101
  270. mage_ai/tests/api/endpoints/test_configuration_options.py +1 -48
  271. mage_ai/tests/api/endpoints/test_configuration_options_project_platform.py +68 -0
  272. mage_ai/tests/api/endpoints/test_custom_designs.py +1 -106
  273. mage_ai/tests/api/endpoints/test_custom_designs_project_platform.py +132 -0
  274. mage_ai/tests/api/endpoints/test_dbt_blocks.py +111 -0
  275. mage_ai/tests/api/endpoints/test_file_contents.py +0 -48
  276. mage_ai/tests/api/endpoints/test_file_contents_with_project_platform.py +66 -0
  277. mage_ai/tests/api/endpoints/test_pipelines.py +0 -134
  278. mage_ai/tests/api/endpoints/test_pipelines_with_project_platform.py +143 -0
  279. mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +3 -3
  280. mage_ai/tests/data_preparation/models/test_block.py +7 -0
  281. mage_ai/tests/data_preparation/test_repo_manager.py +0 -63
  282. mage_ai/tests/data_preparation/test_repo_manager_project_platform.py +67 -0
  283. mage_ai/tests/data_preparation/test_variable_manager.py +0 -51
  284. mage_ai/tests/data_preparation/test_variable_manager_project_platform.py +41 -0
  285. mage_ai/tests/io/create_table/test_postgresql.py +27 -0
  286. mage_ai/tests/orchestration/notification/test_config.py +3 -3
  287. mage_ai-0.9.75.dist-info/METADATA +377 -0
  288. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/RECORD +296 -289
  289. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/WHEEL +1 -1
  290. mage_ai/server/frontend_dist/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  291. mage_ai/server/frontend_dist/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  292. mage_ai/server/frontend_dist/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  293. mage_ai/server/frontend_dist/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  294. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  295. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  296. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  297. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  298. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  299. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  300. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  301. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  302. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  303. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  304. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/pLWT6Sqd09xYpufCVIqnz/_buildManifest.js +0 -1
  306. mage_ai/server/frontend_dist_base_path_template/_next/static/JQewSAObpbhO0wrdAM6Ng/_buildManifest.js +0 -1
  307. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  308. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  309. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  310. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  311. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  312. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  313. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  314. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  315. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  316. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  317. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  318. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  319. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  320. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  321. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  322. mage_ai-0.9.74.dist-info/METADATA +0 -544
  323. /mage_ai/server/frontend_dist/_next/static/{pLWT6Sqd09xYpufCVIqnz → 38-PtskJFUTYUpRhT1qF_}/_ssgManifest.js +0 -0
  324. /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js.LICENSE.txt → _app-13bf3b7dcef50c29.js.LICENSE.txt} +0 -0
  325. /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js.LICENSE.txt → _app-0392ef723ea2c6f8.js.LICENSE.txt} +0 -0
  326. /mage_ai/server/frontend_dist_base_path_template/_next/static/{JQewSAObpbhO0wrdAM6Ng → dxnSzgIvSG4Ke5LM-tPQX}/_ssgManifest.js +0 -0
  327. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/LICENSE +0 -0
  328. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/entry_points.txt +0 -0
  329. {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(82684),o=t(27277),u=t(31882),l=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(9518),p=t(44897),f=t(42631),g=t(47041),v=t(70515),h=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],g.w5,f.BG,40*v.iI,(function(e){return"\n background-color: ".concat((e.theme.background||p.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||p.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*v.iI,"px;\n ")})),m=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*v.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||p.Z.interactive).hoverBackground,";\n ")})),_=t(39643),y=t(95924),b=t(86735),j=t(44688),x=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.removeTag,r=e.selectTag,d=e.selectedTags,p=void 0===d?[]:d,f=e.tags,g=void 0===f?[]:f,v=e.uuid,O=(0,i.useRef)(null),w=(0,i.useState)(!1),P=w[0],k=w[1],C=(0,i.useState)(null),S=C[0],E=C[1],N=(0,i.useMemo)((function(){return(0,b.YC)(g||[],"uuid")}),[g]),T=(0,i.useMemo)((function(){return null==N?void 0:N.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[N]),D=(0,i.useMemo)((function(){return(null==S?void 0:S.length)>=1?T.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):T}),[T,S]),I=(0,j.y)(),R=I.registerOnKeyDown,M=I.unregisterOnKeyDown;return(0,i.useEffect)((function(){return function(){return M(v)}}),[M,v]),null==R||R(v,(function(e,n){var t;P&&n[_.vP]&&(k(!1),null==O||null===(t=O.current)||void 0===t||t.blur())}),[P,O]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c.Z,{onClickTag:t,tags:p}),(0,x.jsxs)(l.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return k(!1)}),150)},onChange:function(e){return E(e.target.value)},onFocus:function(){return k(!0)},ref:O,value:S||""}),(0,x.jsx)(h,{topOffset:null==O||null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(o.Z,{eventProperties:{eventParameters:{item_type:"tag"}},itemGroups:[{items:P?D:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,y.j)(e),null==n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null==r||r(n),E(null)},searchQuery:S,uuid:v})})]})]})}},68781:function(e,n,t){"use strict";var r;t.d(n,{R:function(){return i}}),function(e){e.AZURE_CONTAINER_INSTANCE="azure_container_instance",e.ECS="ecs",e.GCP_CLOUD_RUN="gcp_cloud_run",e.K8S="k8s",e.LOCAL_PYTHON="local_python",e.PYSPARK="pyspark"}(r||(r={}));var i=[r.AZURE_CONTAINER_INSTANCE,r.ECS,r.GCP_CLOUD_RUN,r.K8S,r.LOCAL_PYTHON,r.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return B}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(34376),a=t(75457),d=t(93808),p=t(71180),f=t(70652),g=t(55485),v=t(85854),h=t(48670),m=t(57653),_=t(44085),y=t(88543),b=t(38276),j=t(81334),x=t(30160),O=t(17488),Z=t(35686),w=t(98464),P=t(77417),k=t(68781),C=t(78419),S=t(70515),E=t(53808),N=t(42122),T=t(81728),D=t(86735),I=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n,t,r,i,u,l,s,a,d,R,A,F,U=e.isPipelineUpdating,H=e.pipeline,L=e.updatePipeline,G=(0,P.Z)().project,K=(0,c.useRef)(null),B=(0,c.useRef)(null),Y=null==H?void 0:H.uuid,z=(0,c.useMemo)((function(){return(null==H?void 0:H.blocks)||[]}),[H]),W=(0,c.useState)(!1),Q=W[0],X=W[1],q=(0,c.useState)(!1),J=q[0],$=q[1],V=(0,c.useState)(null),ee=V[0],ne=V[1],te=(0,w.Z)(H);(0,c.useEffect)((function(){(0,N.Xy)(H,te)||ne(H)}),[H,te]);var re=(0,c.useCallback)((function(e){X(!0),ne(e)}),[]),ie="".concat(C.g6,"_").concat(Y),oe=(0,c.useState)({}),ue=oe[0],le=oe[1],ce="".concat(C.vF,"_").concat(Y),se=(0,c.useState)(!1),ae=se[0],de=se[1],pe=(0,c.useCallback)((function(e){le((function(n){var t=e(n);return(0,E.t8)(ie,JSON.stringify(t)),t}))}),[ie,le]),fe=(0,c.useCallback)((function(e){de((function(n){var t=e(n);return(0,E.t8)(ce,t),t}))}),[ce,de]);(0,c.useEffect)((function(){var e=(0,E.U2)(ie);e&&(0,T.Pb)(e)&&le(JSON.parse(e))}),[ie,le]),(0,c.useEffect)((function(){var e=(0,E.U2)(ce);e&&de(e)}),[ce,de]);var ge=(0,c.useMemo)((function(){return null==ee?void 0:ee.executor_type}),[ee]);(0,c.useEffect)((function(){J||!ge||k.R.find((function(e){return e===ge}))||$(!0)}),[J,ge]);var ve=(0,c.useMemo)((function(){return(null==z?void 0:z.filter((function(e){var n=e.uuid;return!(null==ue||!ue[n])}))).length===z.length}),[z,ue]),he=(0,c.useMemo)((function(){return!(null!=z&&z.length)}),[z]),me=(0,c.useMemo)((function(){return(null==ee?void 0:ee.tags)||[]}),[ee]),_e=Z.ZP.tags.list().data,ye=(0,c.useMemo)((function(){return((null==_e?void 0:_e.tags)||[]).filter((function(e){var n=e.uuid;return!me.includes(n)}))}),[_e,me]),be=(0,c.useMemo)((function(){var e;return null==G||null===(e=G.pipelines)||void 0===e?void 0:e.settings}),[G]),je=(0,c.useMemo)((function(){var e,n,t;return(null==be||null===(e=be.triggers)||void 0===e?void 0:e.save_in_code_automatically)&&void 0===(null==ee||null===(n=ee.settings)||void 0===n||null===(t=n.triggers)||void 0===t?void 0:t.save_in_code_automatically)}),[ee,be]);return(0,I.jsxs)(b.Z,{p:S.cd,children:[(0,I.jsxs)(y.Z,{title:"Details",children:[(0,I.jsx)(y.S,{invalid:Q&&!(null!=ee&&ee.name),textInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{name:e.target.value})}))},value:null==ee?void 0:ee.name},title:"Pipeline name"}),(0,I.jsx)(y.S,{textInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{description:e.target.value})}))},placeholder:"Enter description...",value:(null==ee?void 0:ee.description)||""},title:"Pipeline description"}),(0,I.jsx)(y.S,{description:"When enabled, this setting allows sharing of objects and memory space across blocks within a single pipeline.",title:"Run pipeline in a single process",toggleSwitch:{checked:!(null==ee||!ee.run_pipeline_in_one_process),onCheck:function(e){return re((function(n){return M(M({},n),{},{run_pipeline_in_one_process:e(null==n?void 0:n.run_pipeline_in_one_process)})}))}}}),(0,I.jsx)(y.S,{description:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Every time a trigger is created or updated in this pipeline, it’ll be automatically be persisted it in code."}),(null==be||null===(n=be.triggers)||void 0===n?void 0:n.save_in_code_automatically)&&(0,I.jsx)(x.ZP,{small:!0,warning:!0,children:"This settings is enabled at the project level. Changing the value here will only affect this pipeline."})]}),title:"Save triggers in code automatically",toggleSwitch:{checked:je||!(null==ee||null===(t=ee.settings)||void 0===t||null===(r=t.triggers)||void 0===r||!r.save_in_code_automatically),onCheck:function(e){return re((function(n){var t,r,i;return M(M({},n),{},{settings:M(M({},null==n?void 0:n.settings),{},{triggers:M(M({},null==n||null===(t=n.settings)||void 0===t?void 0:t.triggers),{},{save_in_code_automatically:e(je||(null==n||null===(r=n.settings)||void 0===r||null===(i=r.triggers)||void 0===i?void 0:i.save_in_code_automatically))})})})}))}}})]}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsxs)(y.Z,{title:"Pipeline level concurrency",children:[(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent pipeline runs across all trigers in this pipeline."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{pipeline_run_limit_all_triggers:Number(e.target.value)})})}))},placeholder:"e.g. 40",type:"number",value:String((null==ee||null===(i=ee.concurrency_config)||void 0===i?void 0:i.pipeline_run_limit_all_triggers)||"")},title:"Pipeline run limit across all triggers"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent pipeline runs in a single trigger for this pipeline."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{pipeline_run_limit:Number(e.target.value)})})}))},placeholder:"e.g. 10",type:"number",value:String((null==ee||null===(u=ee.concurrency_config)||void 0===u?void 0:u.pipeline_run_limit)||"")},title:"Pipeline run limit in 1 trigger"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent blocks runs in one pipeline run."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{block_run_limit:Number(e.target.value)})})}))},placeholder:"e.g. 20",type:"number",value:String((null==ee||null===(l=ee.concurrency_config)||void 0===l?void 0:l.block_run_limit)||"")},title:"Block run limit"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Choose whether to wait or skip when the pipeline run limit is reached."})}),selectInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{on_pipeline_run_limit_reached:e.target.value})})}))},options:null===(s=Object.values(m.pF))||void 0===s?void 0:s.map((function(e){return{label:(0,T.kC)(e),value:e}})),placeholder:"Select an option",value:(null==ee||null===(a=ee.concurrency_config)||void 0===a?void 0:a.on_pipeline_run_limit_reached)||""},title:"How to handle new pipeline runs when limit reached"})]})}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Executor type"}),(0,I.jsxs)(x.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,I.jsx)(h.Z,{href:"https://docs.mage.ai/production/configuring-production-settings/compute-resource#2-set-executor-type-and-customize-the-compute-resource-of-the-mage-executor",openNewWindow:!0,children:"documentation"}),"."]}),(0,I.jsxs)(b.Z,{mt:1,children:[!J&&(0,I.jsx)(_.Z,{label:"Executor type",onChange:function(e){return re((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},primary:!0,ref:K,value:(null==ee?void 0:ee.executor_type)||"",children:k.R.map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))}),J&&(0,I.jsx)(O.Z,{label:"Executor type",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},ref:B,setContentOnMount:!0,value:(null==ee?void 0:ee.executor_type)||""}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsx)(h.Z,{muted:!0,onClick:function(){J?(re((function(e){return M(M({},e),{},{executor_type:null==H?void 0:H.executor_type})})),setTimeout((function(){var e;return null==K||null===(e=K.current)||void 0===e?void 0:e.focus()}),1)):setTimeout((function(){var e;return null==B||null===(e=B.current)||void 0===e?void 0:e.focus()}),1),$(!J)},preventDefault:!0,small:!0,children:J?"Select a preset executor type":"Enter a custom executor type"})})]})]}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Retry configuration"}),(0,I.jsxs)(x.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,I.jsx)(h.Z,{href:"https://docs.mage.ai/orchestration/pipeline-runs/retrying-block-runs",openNewWindow:!0,children:"documentation"}),"."]}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsxs)(g.ZP,{children:[(0,I.jsx)(O.Z,{label:"Retries",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{retries:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(d=ee.retry_config)||void 0===d?void 0:d.retries)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(O.Z,{label:"Delay",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{delay:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(R=ee.retry_config)||void 0===R?void 0:R.delay)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(O.Z,{label:"Max delay",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{max_delay:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(A=ee.retry_config)||void 0===A?void 0:A.max_delay)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(f.Z,{checked:!(null==ee||null===(F=ee.retry_config)||void 0===F||!F.exponential_backoff),label:"Exponential backoff",onClick:function(){return re((function(e){var n;return M(M({},e),{},{retry_config:M(M({},null==e?void 0:e.retry_config),{},{exponential_backoff:!(null!=e&&null!==(n=e.retry_config)&&void 0!==n&&n.exponential_backoff)})})}))}})]})})]}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Tags"}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsx)(j.Z,{removeTag:function(e){re((function(n){return M(M({},n),{},{tags:me.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){re((function(n){return M(M({},n),{},{tags:(0,D.$C)(e.uuid,me,(function(n){return n===e.uuid}))})}))},selectedTags:null==me?void 0:me.map((function(e){return{uuid:e}})),tags:ye,uuid:"TagsAutocompleteInputField-".concat(null==H?void 0:H.uuid)})})]}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsx)(g.ZP,{children:(0,I.jsx)(p.ZP,{disabled:!Q,loading:U,onClick:function(){return L({concurrency_config:null==ee?void 0:ee.concurrency_config,description:null==ee?void 0:ee.description,executor_type:null==ee?void 0:ee.executor_type,name:null==ee?void 0:ee.name,retry_config:null==ee?void 0:ee.retry_config,run_pipeline_in_one_process:null==ee?void 0:ee.run_pipeline_in_one_process,settings:null==ee?void 0:ee.settings,tags:null==ee?void 0:ee.tags}).then((function(){return X(!1)}))},primary:!0,children:"Save pipeline settings"})})}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsx)(f.Z,{checked:ve&&!he,disabled:he,label:"Hide all blocks in notebook",onClick:function(){return pe((function(){return ve?{}:null==z?void 0:z.reduce((function(e,n){var t=n.uuid;return M(M({},e),{},(0,o.Z)({},t,!0))}),{})}))}})}),(0,I.jsx)(b.Z,{mt:S.Mq,children:(0,I.jsx)(f.Z,{checked:ae,label:"When running a block while editing a pipeline, output the block messages to the logs",onClick:function(){return fe((function(e){return!e}))}})})]})},F=t(28795),U=t(83455),H=t(72619);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function K(e){var n=e.pipeline,t=(0,s.useRouter)(),r=(0,c.useState)(null),o=r[0],u=r[1],l=null==n?void 0:n.uuid,d=Z.ZP.pipelines.detail(l).data,p=G(G({},null==d?void 0:d.pipeline),n),f=(0,U.Db)(Z.ZP.pipelines.useUpdate(l,{update_content:!0}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){if(null!=e&&e.pipeline){var n=e.pipeline.uuid;l!==n&&(window.location.href="".concat(null==t?void 0:t.basePath,"/pipelines/").concat(n,"/settings"))}},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),g=(0,i.Z)(f,2),v=g[0],h=g[1].isLoading;return(0,I.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Settings"}}],errors:o,pageName:F.M.SETTINGS,pipeline:p,setErrors:u,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(F.M.SETTINGS,"_").concat(l),children:p&&(0,I.jsx)(A,{isPipelineUpdating:h,pipeline:p,updatePipeline:function(e){return v({pipeline:e})}})})}K.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var B=(0,d.Z)(K)},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(37003)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(61049);function i(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(82684),o=t(27277),u=t(31882),l=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(9518),p=t(44897),f=t(42631),g=t(47041),v=t(70515),h=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],g.w5,f.BG,40*v.iI,(function(e){return"\n background-color: ".concat((e.theme.background||p.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||p.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*v.iI,"px;\n ")})),m=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*v.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||p.Z.interactive).hoverBackground,";\n ")})),_=t(39643),y=t(95924),b=t(86735),j=t(44688),x=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.removeTag,r=e.selectTag,d=e.selectedTags,p=void 0===d?[]:d,f=e.tags,g=void 0===f?[]:f,v=e.uuid,O=(0,i.useRef)(null),w=(0,i.useState)(!1),P=w[0],k=w[1],C=(0,i.useState)(null),S=C[0],E=C[1],N=(0,i.useMemo)((function(){return(0,b.YC)(g||[],"uuid")}),[g]),T=(0,i.useMemo)((function(){return null==N?void 0:N.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[N]),D=(0,i.useMemo)((function(){return(null==S?void 0:S.length)>=1?T.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):T}),[T,S]),I=(0,j.y)(),R=I.registerOnKeyDown,M=I.unregisterOnKeyDown;return(0,i.useEffect)((function(){return function(){return M(v)}}),[M,v]),null==R||R(v,(function(e,n){var t;P&&n[_.vP]&&(k(!1),null==O||null===(t=O.current)||void 0===t||t.blur())}),[P,O]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c.Z,{onClickTag:t,tags:p}),(0,x.jsxs)(l.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return k(!1)}),150)},onChange:function(e){return E(e.target.value)},onFocus:function(){return k(!0)},ref:O,value:S||""}),(0,x.jsx)(h,{topOffset:null==O||null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(o.Z,{eventProperties:{eventParameters:{item_type:"tag"}},itemGroups:[{items:P?D:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,y.j)(e),null==n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null==r||r(n),E(null)},searchQuery:S,uuid:v})})]})]})}},68781:function(e,n,t){"use strict";var r;t.d(n,{R:function(){return i}}),function(e){e.AZURE_CONTAINER_INSTANCE="azure_container_instance",e.ECS="ecs",e.GCP_CLOUD_RUN="gcp_cloud_run",e.K8S="k8s",e.LOCAL_PYTHON="local_python",e.PYSPARK="pyspark"}(r||(r={}));var i=[r.AZURE_CONTAINER_INSTANCE,r.ECS,r.GCP_CLOUD_RUN,r.K8S,r.LOCAL_PYTHON,r.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return B}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(34376),a=t(75457),d=t(93808),p=t(71180),f=t(70652),g=t(55485),v=t(85854),h=t(48670),m=t(57653),_=t(44085),y=t(88543),b=t(38276),j=t(81334),x=t(30160),O=t(17488),Z=t(35686),w=t(98464),P=t(77417),k=t(68781),C=t(78419),S=t(70515),E=t(53808),N=t(42122),T=t(81728),D=t(86735),I=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n,t,r,i,u,l,s,a,d,R,A,F,U=e.isPipelineUpdating,H=e.pipeline,L=e.updatePipeline,G=(0,P.Z)().project,K=(0,c.useRef)(null),B=(0,c.useRef)(null),Y=null==H?void 0:H.uuid,z=(0,c.useMemo)((function(){return(null==H?void 0:H.blocks)||[]}),[H]),W=(0,c.useState)(!1),Q=W[0],X=W[1],q=(0,c.useState)(!1),J=q[0],$=q[1],V=(0,c.useState)(null),ee=V[0],ne=V[1],te=(0,w.Z)(H);(0,c.useEffect)((function(){(0,N.Xy)(H,te)||ne(H)}),[H,te]);var re=(0,c.useCallback)((function(e){X(!0),ne(e)}),[]),ie="".concat(C.g6,"_").concat(Y),oe=(0,c.useState)({}),ue=oe[0],le=oe[1],ce="".concat(C.vF,"_").concat(Y),se=(0,c.useState)(!1),ae=se[0],de=se[1],pe=(0,c.useCallback)((function(e){le((function(n){var t=e(n);return(0,E.t8)(ie,JSON.stringify(t)),t}))}),[ie,le]),fe=(0,c.useCallback)((function(e){de((function(n){var t=e(n);return(0,E.t8)(ce,t),t}))}),[ce,de]);(0,c.useEffect)((function(){var e=(0,E.U2)(ie);e&&(0,T.Pb)(e)&&le(JSON.parse(e))}),[ie,le]),(0,c.useEffect)((function(){var e=(0,E.U2)(ce);e&&de(e)}),[ce,de]);var ge=(0,c.useMemo)((function(){return null==ee?void 0:ee.executor_type}),[ee]);(0,c.useEffect)((function(){J||!ge||k.R.find((function(e){return e===ge}))||$(!0)}),[J,ge]);var ve=(0,c.useMemo)((function(){return(null==z?void 0:z.filter((function(e){var n=e.uuid;return!(null==ue||!ue[n])}))).length===z.length}),[z,ue]),he=(0,c.useMemo)((function(){return!(null!=z&&z.length)}),[z]),me=(0,c.useMemo)((function(){return(null==ee?void 0:ee.tags)||[]}),[ee]),_e=Z.ZP.tags.list().data,ye=(0,c.useMemo)((function(){return((null==_e?void 0:_e.tags)||[]).filter((function(e){var n=e.uuid;return!me.includes(n)}))}),[_e,me]),be=(0,c.useMemo)((function(){var e;return null==G||null===(e=G.pipelines)||void 0===e?void 0:e.settings}),[G]),je=(0,c.useMemo)((function(){var e,n,t;return(null==be||null===(e=be.triggers)||void 0===e?void 0:e.save_in_code_automatically)&&void 0===(null==ee||null===(n=ee.settings)||void 0===n||null===(t=n.triggers)||void 0===t?void 0:t.save_in_code_automatically)}),[ee,be]);return(0,I.jsxs)(b.Z,{p:S.cd,children:[(0,I.jsxs)(y.Z,{title:"Details",children:[(0,I.jsx)(y.S,{invalid:Q&&!(null!=ee&&ee.name),textInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{name:e.target.value})}))},value:null==ee?void 0:ee.name},title:"Pipeline name"}),(0,I.jsx)(y.S,{textInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{description:e.target.value})}))},placeholder:"Enter description...",value:(null==ee?void 0:ee.description)||""},title:"Pipeline description"}),(0,I.jsx)(y.S,{description:"When enabled, this setting allows sharing of objects and memory space across blocks within a single pipeline.",title:"Run pipeline in a single process",toggleSwitch:{checked:!(null==ee||!ee.run_pipeline_in_one_process),onCheck:function(e){return re((function(n){return M(M({},n),{},{run_pipeline_in_one_process:e(null==n?void 0:n.run_pipeline_in_one_process)})}))}}}),(0,I.jsx)(y.S,{description:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Every time a trigger is created or updated in this pipeline, it’ll be automatically be persisted it in code."}),(null==be||null===(n=be.triggers)||void 0===n?void 0:n.save_in_code_automatically)&&(0,I.jsx)(x.ZP,{small:!0,warning:!0,children:"This settings is enabled at the project level. Changing the value here will only affect this pipeline."})]}),title:"Save triggers in code automatically",toggleSwitch:{checked:je||!(null==ee||null===(t=ee.settings)||void 0===t||null===(r=t.triggers)||void 0===r||!r.save_in_code_automatically),onCheck:function(e){return re((function(n){var t,r,i;return M(M({},n),{},{settings:M(M({},null==n?void 0:n.settings),{},{triggers:M(M({},null==n||null===(t=n.settings)||void 0===t?void 0:t.triggers),{},{save_in_code_automatically:e(je||(null==n||null===(r=n.settings)||void 0===r||null===(i=r.triggers)||void 0===i?void 0:i.save_in_code_automatically))})})})}))}}})]}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsxs)(y.Z,{title:"Pipeline level concurrency",children:[(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent pipeline runs across all trigers in this pipeline."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{pipeline_run_limit_all_triggers:Number(e.target.value)})})}))},placeholder:"e.g. 40",type:"number",value:String((null==ee||null===(i=ee.concurrency_config)||void 0===i?void 0:i.pipeline_run_limit_all_triggers)||"")},title:"Pipeline run limit across all triggers"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent pipeline runs in a single trigger for this pipeline."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{pipeline_run_limit:Number(e.target.value)})})}))},placeholder:"e.g. 10",type:"number",value:String((null==ee||null===(u=ee.concurrency_config)||void 0===u?void 0:u.pipeline_run_limit)||"")},title:"Pipeline run limit in 1 trigger"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Limit the concurrent blocks runs in one pipeline run."})}),textInput:{monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{block_run_limit:Number(e.target.value)})})}))},placeholder:"e.g. 20",type:"number",value:String((null==ee||null===(l=ee.concurrency_config)||void 0===l?void 0:l.block_run_limit)||"")},title:"Block run limit"}),(0,I.jsx)(y.S,{description:(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(x.ZP,{muted:!0,small:!0,children:"Choose whether to wait or skip when the pipeline run limit is reached."})}),selectInput:{onChange:function(e){return re((function(n){return M(M({},n),{},{concurrency_config:M(M({},null==n?void 0:n.concurrency_config),{},{on_pipeline_run_limit_reached:e.target.value})})}))},options:null===(s=Object.values(m.pF))||void 0===s?void 0:s.map((function(e){return{label:(0,T.kC)(e),value:e}})),placeholder:"Select an option",value:(null==ee||null===(a=ee.concurrency_config)||void 0===a?void 0:a.on_pipeline_run_limit_reached)||""},title:"How to handle new pipeline runs when limit reached"})]})}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Executor type"}),(0,I.jsxs)(x.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,I.jsx)(h.Z,{href:"https://docs.mage.ai/production/configuring-production-settings/compute-resource#2-set-executor-type-and-customize-the-compute-resource-of-the-mage-executor",openNewWindow:!0,children:"documentation"}),"."]}),(0,I.jsxs)(b.Z,{mt:1,children:[!J&&(0,I.jsx)(_.Z,{label:"Executor type",onChange:function(e){return re((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},primary:!0,ref:K,value:(null==ee?void 0:ee.executor_type)||"",children:k.R.map((function(e){return(0,I.jsx)("option",{value:e,children:e},e)}))}),J&&(0,I.jsx)(O.Z,{label:"Executor type",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},ref:B,setContentOnMount:!0,value:(null==ee?void 0:ee.executor_type)||""}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsx)(h.Z,{muted:!0,onClick:function(){J?(re((function(e){return M(M({},e),{},{executor_type:null==H?void 0:H.executor_type})})),setTimeout((function(){var e;return null==K||null===(e=K.current)||void 0===e?void 0:e.focus()}),1)):setTimeout((function(){var e;return null==B||null===(e=B.current)||void 0===e?void 0:e.focus()}),1),$(!J)},preventDefault:!0,small:!0,children:J?"Select a preset executor type":"Enter a custom executor type"})})]})]}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Retry configuration"}),(0,I.jsxs)(x.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,I.jsx)(h.Z,{href:"https://docs.mage.ai/orchestration/pipeline-runs/retrying-block-runs",openNewWindow:!0,children:"documentation"}),"."]}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsxs)(g.ZP,{children:[(0,I.jsx)(O.Z,{label:"Retries",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{retries:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(d=ee.retry_config)||void 0===d?void 0:d.retries)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(O.Z,{label:"Delay",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{delay:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(R=ee.retry_config)||void 0===R?void 0:R.delay)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(O.Z,{label:"Max delay",monospace:!0,onChange:function(e){return re((function(n){return M(M({},n),{},{retry_config:M(M({},null==n?void 0:n.retry_config),{},{max_delay:void 0!==e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null==ee||null===(A=ee.retry_config)||void 0===A?void 0:A.max_delay)||""}),(0,I.jsx)(b.Z,{mr:1}),(0,I.jsx)(f.Z,{checked:!(null==ee||null===(F=ee.retry_config)||void 0===F||!F.exponential_backoff),label:"Exponential backoff",onClick:function(){return re((function(e){var n;return M(M({},e),{},{retry_config:M(M({},null==e?void 0:e.retry_config),{},{exponential_backoff:!(null!=e&&null!==(n=e.retry_config)&&void 0!==n&&n.exponential_backoff)})})}))}})]})})]}),(0,I.jsxs)(b.Z,{mt:S.HN,children:[(0,I.jsx)(v.Z,{children:"Tags"}),(0,I.jsx)(b.Z,{mt:1,children:(0,I.jsx)(j.Z,{removeTag:function(e){re((function(n){return M(M({},n),{},{tags:me.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){re((function(n){return M(M({},n),{},{tags:(0,D.$C)(e.uuid,me,(function(n){return n===e.uuid}))})}))},selectedTags:null==me?void 0:me.map((function(e){return{uuid:e}})),tags:ye,uuid:"TagsAutocompleteInputField-".concat(null==H?void 0:H.uuid)})})]}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsx)(g.ZP,{children:(0,I.jsx)(p.ZP,{disabled:!Q,loading:U,onClick:function(){return L({concurrency_config:null==ee?void 0:ee.concurrency_config,description:null==ee?void 0:ee.description,executor_type:null==ee?void 0:ee.executor_type,name:null==ee?void 0:ee.name,retry_config:null==ee?void 0:ee.retry_config,run_pipeline_in_one_process:null==ee?void 0:ee.run_pipeline_in_one_process,settings:null==ee?void 0:ee.settings,tags:null==ee?void 0:ee.tags}).then((function(){return X(!1)}))},primary:!0,children:"Save pipeline settings"})})}),(0,I.jsx)(b.Z,{mt:S.HN,children:(0,I.jsx)(f.Z,{checked:ve&&!he,disabled:he,label:"Hide all blocks in notebook",onClick:function(){return pe((function(){return ve?{}:null==z?void 0:z.reduce((function(e,n){var t=n.uuid;return M(M({},e),{},(0,o.Z)({},t,!0))}),{})}))}})}),(0,I.jsx)(b.Z,{mt:S.Mq,children:(0,I.jsx)(f.Z,{checked:ae,label:"When running a block while editing a pipeline, output the block messages to the logs",onClick:function(){return fe((function(e){return!e}))}})})]})},F=t(28795),U=t(83455),H=t(72619);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function K(e){var n=e.pipeline,t=(0,s.useRouter)(),r=(0,c.useState)(null),o=r[0],u=r[1],l=null==n?void 0:n.uuid,d=Z.ZP.pipelines.detail(l).data,p=G(G({},null==d?void 0:d.pipeline),n),f=(0,U.Db)(Z.ZP.pipelines.useUpdate(l,{update_content:!0}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){if(null!=e&&e.pipeline){var n=e.pipeline.uuid;l!==n&&(window.location.href="".concat(null==t?void 0:t.basePath,"/pipelines/").concat(n,"/settings"))}},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),g=(0,i.Z)(f,2),v=g[0],h=g[1].isLoading;return(0,I.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Settings"}}],errors:o,pageName:F.M.SETTINGS,pipeline:p,setErrors:u,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(F.M.SETTINGS,"_").concat(l),children:p&&(0,I.jsx)(A,{isPipelineUpdating:h,pipeline:p,updatePipeline:function(e){return v({pipeline:e})}})})}K.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var B=(0,d.Z)(K)},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(37003)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(61049);function i(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[449,3782,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return v},M8:function(){return P},Uc:function(){return Z},XM:function(){return _},_U:function(){return p},eI:function(){return x},gU:function(){return O},lO:function(){return w},ri:function(){return b},tL:function(){return g},vJ:function(){return y},xH:function(){return j}});var r,l=t(82394),o=t(92083),u=t.n(o),c=t(3917),i=t(30229),s=t(4383),a=t(42122),d=t(86735);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function m(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,l.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var p=function(n){return!!n&&!Object.values(i.U5).includes(n)};function v(n){return null==n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,o=e.started_at,c=e.status,i=null;o&&r&&(i=u()(r).valueOf()-u()(o).valueOf());return m(m({},n),{},(0,l.Z)({},t,{runtime:i,status:c}))}),{})}var h,b=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:i.Xm.TIME},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:i.Xm.API}];return n?e.slice(0,1):e};function j(n){var e=(0,a.gR)(n,[i.gm.INTERVAL,i.gm.TYPE]),t=n[i.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[i.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function x(n){return n?new Date(u()(n).valueOf()):null}function Z(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e?(0,c.XG)(n,e,t):function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"!=typeof n)return n;var t=n.split("+")[0];return u()(x(t)).format(e||c.Nx)}(n,t)}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(h||(h={}));var g=(r={},(0,l.Z)(r,h.DAY,86400),(0,l.Z)(r,h.HOUR,3600),(0,l.Z)(r,h.MINUTE,60),(0,l.Z)(r,h.SECOND,1),r);function O(n){var e=h.SECOND,t=n;return n%86400==0?(t/=86400,e=h.DAY):n%3600==0?(t/=3600,e=h.HOUR):n%60==0&&(t/=60,e=h.MINUTE),{time:t,unit:e}}function y(n,e){return n*g[e]}function _(n,e,t){var r,l=u()(n);return l.set("hour",+(null==e?void 0:e.hour)||0),l.set("minute",+(null==e?void 0:e.minute)||0),l.set("second",0),r=l.format(c.TD),null!=t&&t.includeSeconds&&(r=r.concat(":00")),null!=t&&t.localTimezone&&(r=l.format(c.lE),null!=t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null==t?void 0:t.includeSeconds,utcFormat:!0}))),r}function P(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",r=(0,s.XF)();return e?t="".concat(r,"/api/pipeline_schedules/").concat(null==n?void 0:n.id,"/api_trigger"):(t="".concat(r,"/api/pipeline_schedules/").concat(null==n?void 0:n.id,"/pipeline_runs"),null!=n&&n.token&&(t="".concat(t,"/").concat(n.token))),t}function k(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),l=0;if(e<0)for(var o=0;o>e;o--)0===r?(r=t.length-1,l-=1):r-=1;else if(e>0)for(var u=0;u<e;u++)r===t.length-1?(r=0,l+=1):r+=1;var c="number"==typeof t[r]?t[r]:n;return{additionalOffset:l,cronValue:String(c)}}(+n,e,t)}var I=(0,d.m5)(60),N=(0,d.m5)(24),E=(0,c.Cs)();function w(n,e){if(!n)return n;var t=u()().local().format("Z"),r=t.split(":"),l="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(l&&!e||!l&&e)&&(o=-o,c=-c);var i=n.split(" "),s=i[0],a=i[1],d=i[2],f=k(s,c,I),m=k(a,o+f.additionalOffset,N);if(i[0]=f.cronValue,i[1]=m.cronValue,0!==(null==m?void 0:m.additionalOffset)){var p=k(d,m.additionalOffset,E);i[2]=p.cronValue}return i.join(" ")}},25050:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return sn}});var r=t(77837),l=t(38860),o=t.n(l),u=t(82684),c=t(75457),i=t(93808),s=t(75582),a=t(82394),d=t(97618),f=t(55485),m=t(85854),p=t(44265),v=t(38276),h=t(4190),b=t(30160),j=t(44897),x=t(9518),Z=t(42631),g=t(95363),O=t(70515),y=t(61896),_=x.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,O.cd*O.iI,(function(n){return"\n background-color: ".concat((n.theme.background||j.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||j.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),P=(0,x.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||j.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).warning,";\n ")})),k=x.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,y.iD,Z.D7,g.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||j.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||j.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||j.Z.content).inverted,";\n ")})),I=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||j.Z.interactive).focusBackground,";\n ")})),N=t(72473),E=t(16488),w=t(92083),S=t.n(w),M=t(41143),C=t(81728),V=t(86735);function D(n){var e;return Object.keys((null==n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function T(n){var e,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=null,o=null,u=null,c=null,i={},a=(null==n?void 0:n.block_runs)||[],d=(null==n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null==n||null===(t=n.metrics)||void 0===t?void 0:t.pipeline)||{},m=A(n);return Object.entries(d).forEach((function(n){var e,t=(0,s.Z)(n,2),a=t[0],d=t[1];if(!r||r===a){var p,v=d||{},h=v.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,j=v.sources,x=void 0===j?{records:null}:j,Z=m[a]||[];if(r&&r===a&&Z.every((function(n){var e=n.status;return M.V.COMPLETED===e}))&&null===l&&(l=0),null!=f&&null!==(e=f[a])&&void 0!==e&&e.record_counts)null===l&&(l=0),l+=Number(null==f||null===(p=f[a])||void 0===p?void 0:p.record_counts);else null!=x&&x.records&&(null===l&&(l=0),l+=Number(x.records));null!=b&&b.records_updated?(null===u&&(u=0),u+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!=b&&b.records_inserted?(null===u&&(u=0),u+=Number(b.records_inserted),null===o&&(o=0),o+=Number(b.records_inserted)):null!=b&&b.records_affected&&(null===u&&(u=0),u+=Number(b.records_affected)),["destinations","sources"].forEach((function(n){var e=d[n]||{};null!=e&&e.error&&(i[a]||(i[a]={}),i[a][n]={error:null==e?void 0:e.error,errors:null==e?void 0:e.errors,message:null==e?void 0:e.message})}))}})),null==a||a.forEach((function(n){var e=n.block_uuid,t=n.metrics,r=n.status;if(M.V.FAILED===r&&null!=t&&t.error&&e){var l=e.split(":"),o=(0,s.Z)(l,3),u=(o[0],o[1]);o[2];i[u]||(i[u]={}),i[u][""]=t.error}})),{errors:i,records:l,recordsInserted:o,recordsProcessed:u,recordsUpdated:c}}function A(n){var e=n.block_runs,t={};return null==e||e.forEach((function(n){var e=n.block_uuid.split(":"),r=(0,s.Z)(e,3),l=(r[0],r[1]);r[2];t[l]||(t[l]=[]),t[l].push(n)})),t}function L(n){var e=A(n),t={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),r=e[0],l=e[1],o=l.filter((function(n){var e=n.status;return M.V.COMPLETED===e})),u=o.map((function(n){var e=n.completed_at,t=n.started_at,r=S().utc(e),l=S().utc(t);return r.diff(l,"second")})),c=o.length,i=l.length;t[r]={completed:c,runtime:u.length>=1?(0,V.Sm)(u)/u.length:null,total:i}})),t}function R(n){var e=n.block_runs,t=(null==e?void 0:e.length)||1,r=function(n){var e=(null==n?void 0:n.block_runs)||[];return null==e?void 0:e.filter((function(n){var e=n.status;return M.V.COMPLETED===e}))}(n).length||0;return r/t}function U(n){var e=n.completed_at,t=n.block_runs,r=void 0===t?[]:t,l=n.status;if(null==r||!r.length)return 0;var o=S().utc();if(e)o=S().utc(e);else if([p.VO.CANCELLED,p.VO.FAILED].includes(l)){var u=(0,V.YC)(r,(function(n){return n.started_at}),{ascending:!1})[0];o=S().utc(u.updated_at)}var c=S().utc(n.created_at);return o.diff(c,"second")}function F(n,e){var t,r,l,o,u,c=A(n),i=L(n),s=(null==n?void 0:n.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[e],d[e],i[e]||{completed:null,total:null}),m=f.completed,p=f.total,v=m&&p?m/p:0,h=c[e]||[],b=h.every((function(n){var e=n.status;return M.V.COMPLETED===e})),j=(0,V.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],x=null===(t=(0,V.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(u=(0,V.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===u?void 0:u.completed_at:j&&(o=null==j?void 0:j.updated_at);var Z=b?S().utc(r||o):S().utc(),g=S().utc(x);return{completed:m,completedAt:r,done:b,progress:v,runtime:l=Z.diff(g,"second"),startedAt:x,status:null==j?void 0:j.status,timeText:(0,C.zf)(l),total:p,updatedAt:o}}var z=t(70320),Y=t(28598);function B(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function G(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?B(Object(t),!0).forEach((function(e){(0,a.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var X=function(n){var e=n.onSelect,t=n.pipelineRun,r=n.selected,l=t.created_at,o=t.status,c=(0,u.useMemo)((function(){return(null==t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),i=(0,u.useMemo)((function(){return c.pipeline||{}}),[c]),a=(0,z.qB)(),x=c.destination,Z=c.source,g=(0,u.useMemo)((function(){return Object.keys(i).length}),[i]),y=(0,u.useMemo)((function(){return T(t)}),[t]),P=y.errors,w=y.records,S=y.recordsProcessed,M=(0,u.useMemo)((function(){return R(t)}),[t]),V=(0,u.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),D=(0,u.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:V,warning:p.VO.CANCELLED===o}}),[V,o]),A=(0,u.useMemo)((function(){if(t){var n=U(t);return(0,C.zf)(n)}}),[t]);return(0,Y.jsx)(_,G(G({},D),{},{onClick:function(){return e(r?null:t.id)},selected:r,children:(0,Y.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsx)(I,G({},D)),(0,Y.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(v.Z,{ml:3,py:3,children:[(0,Y.jsx)(m.Z,{bold:!0,level:5,monospace:!0,children:(0,E.Uc)(l,a)}),(0,Y.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,Y.jsx)(k,G(G({},D),{},{children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[V&&(0,Y.jsx)(N.Check,{inverted:!0,size:2*O.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,Y.jsx)(h.Z,{color:p.VO.INITIAL!==o?j.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0})," ",p.VO.RUNNING===o&&(0,Y.jsxs)(Y.Fragment,{children:[" ",Math.round(100*M),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(P).length>=1&&(0,Y.jsx)(v.Z,{mt:1,children:Object.entries(P).map((function(n){var e=(0,s.Z)(n,2),t=e[0];e[1];return(0,Y.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,Y.jsxs)(d.Z,{flex:1,children:[(0,Y.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(v.Z,{ml:3,py:3,children:[(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:S>=1?(0,C.x6)(S):"-"})]}),(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:w>=1&&w>=S?(0,C.x6)(w-S):"-"})]}),p.VO.RUNNING!==o&&(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:A})]})]})}),(0,Y.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,Y.jsxs)(v.Z,{ml:3,py:3,children:[(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:Z||"-"})]}),(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:x||"-"})]}),(0,Y.jsxs)(v.Z,{mb:1,children:[(0,Y.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,Y.jsx)(b.ZP,{monospace:!0,children:g>=1?(0,C.x6)(g):"-"})]})]})})]})]})}))},H=t(89565),W=t.n(H),q=t(34376),J=t(71180),$=t(48670),K=t(75499),Q=x.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||j.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*O.iI,"px;\n ")})),nn=t(95924),en=t(3917);var tn=function(n){var e=n.onClickRow,t=n.pipelineRun,r=n.selectedStream,l=(0,q.useRouter)(),o=(0,z.qB)(),c=(0,u.useState)(null),i=c[0],a=c[1],d=(0,u.useState)(null),h=d[0],j=d[1],x=(0,u.useMemo)((function(){return t?A(t):{}}),[t]),Z=(0,u.useMemo)((function(){return t?L(t):{}}),[t]),g=(0,u.useMemo)((function(){var n=0,e=[],t=[];if(Object.entries(Z).forEach((function(r){var l=(0,s.Z)(r,2),o=(l[0],l[1]),u=o.completed,c=o.runtime,i=o.total;null===c?t.push(o):(e.push(c),n+=c*(i-u))})),0===e.length)return null;var r=(0,V.Sm)(e)/e.length;return t.forEach((function(e){var t=e.completed,l=e.total;n+=r*(l-t)})),n}),[Z]),y=(0,u.useMemo)((function(){return r?Z[r]:null}),[Z,r]),_=(0,u.useMemo)((function(){if(r&&Z){var n=Z[r]||{},e=n.completed,l=n.total;if(l>=1)return e/l}else if(t)return R(t);return 0}),[Z,t,r]),P=(0,u.useMemo)((function(){return(0,Y.jsx)(f.ZP,{children:(0,V.w6)(101).map((function(n,e){return(0,Y.jsx)(Q,{even:e%2==0,fill:_>0&&Math.round(100*_)>=e},e)}))})}),[_]),k=(0,u.useMemo)((function(){if(r){var n=x[r]||[],e=n.every((function(n){var e=n.status;return M.V.COMPLETED===e})),l=(0,V.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],o=null==l?void 0:l.status,u=y||{},c=u.completed,i=u.runtime,s=u.total;if(e)return"Sync complete for ".concat(r);if([M.V.CANCELLED,M.V.FAILED].includes(o))return p.Do[o];if(i&&s>=1){var a=Math.ceil(i*(s-c)/60);return"".concat((0,C._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null==t?void 0:t.status))return"Sync complete";if(t){if([p.VO.CANCELLED,p.VO.FAILED].includes(null==t?void 0:t.status))return p.Do[null==t?void 0:t.status];if(p.VO.INITIAL===(null==t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===g)return"Estimating time remaining...";var d=Math.ceil(g/60);return"".concat((0,C._6)("minute",d,!0)," to completion")}return"Select a sync"}),[x,g,y,t,r]),I=(0,u.useMemo)((function(){return t&&r?F(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,u.useEffect)((function(){var n;if(t){var e=U(t);a(e),n=setInterval((function(){return a((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t]),(0,u.useEffect)((function(){var n;if(t&&r&&I){var e=(null==I?void 0:I.runtime)||0;j(e),n=setInterval((function(){return j((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t,r,I]);var w=(0,u.useMemo)((function(){if(t){if(r)return null==I?void 0:I.timeText;var n=U(t);return(0,C.zf)(n)}}),[t,r,I]),S=(0,u.useMemo)((function(){var n=Math.floor(i%86400/3600),e=Math.floor(i%3600/60),t=Math.floor(i%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[i]),B=(0,u.useMemo)((function(){var n=Math.floor(h%86400/3600),e=Math.floor(h%3600/60),t=Math.floor(h%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[h]),G=(0,u.useMemo)((function(){return t?T(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),X=G.errors,H=G.records,tn=G.recordsInserted,rn=G.recordsProcessed,ln=G.recordsUpdated,on=(0,u.useMemo)((function(){return t&&r?T(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),un=(0,u.useMemo)((function(){var n=r?null==on?void 0:on.records:H,e=r?null==on?void 0:on.recordsInserted:tn,t=r?null==on?void 0:on.recordsProcessed:rn,l=r?null==on?void 0:on.recordsUpdated:ln,o=[{label:"Rows fetched",value:null===n?"-":(0,C.x6)(n)}];return null===e&&null===l?o.push({label:"Rows processed",value:null===t?"-":(0,C.x6)(t)}):null!==e?o.push({label:"Rows inserted",value:(0,C.x6)(e)}):null!==l&&o.push({label:"Rows updated",value:(0,C.x6)(l)}),o.map((function(n){var e=n.label,t=n.value;return(0,Y.jsxs)("div",{children:[(0,Y.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,Y.jsx)(b.ZP,{headline:!0,children:t})]},e)}))}),[H,on,tn,rn,ln,r]),cn=(0,u.useMemo)((function(){if(!t)return(0,Y.jsx)("div",{});var n=D(t);return(0,Y.jsx)(K.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return r&&r===n[e]},onClickRow:e,rows:n.map((function(n){var e=F(t,n),r=(e.completed,e.completedAt),u=e.done,c=e.progress,i=e.startedAt,s=e.status,a=e.timeText,d=(e.total,!!X[n]);return[(0,Y.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:n},"stream"),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,title:i?(0,en._6)(i):null,children:i?(0,E.Uc)(i,o):(0,Y.jsx)(Y.Fragment,{children:"—"})},"started_at"),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,title:r?(0,en._6)(r):null,children:r?(0,E.Uc)(r,o):(0,Y.jsx)(Y.Fragment,{children:"—"})},"completed_at"),(0,Y.jsx)(b.ZP,{default:!0,children:[M.V.INITIAL,M.V.RUNNING].includes(s)?"-":a},"runtime"),(0,Y.jsxs)("div",{children:[u&&(0,Y.jsx)(N.Check,{default:!0,size:2*O.iI}),!u&&(0,Y.jsx)(f.ZP,{children:(0,V.w6)(51).map((function(n,e){return(0,Y.jsx)(Q,{even:e%2==0,fill:c>0&&Math.round(50*c)>=e,small:!0},e)}))})]},"progress"),(0,Y.jsx)(J.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){l.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,nn.j)(n)},children:(0,Y.jsx)(N.Logs,{default:!0,size:2*O.iI})},"logs")]})),uuid:"".concat(null==t?void 0:t.id,"-streams-table")})}),[o,X,e,t,l,r]),sn=(0,u.useMemo)((function(){var n,e,l,o,u,c,i,a;if(t&&r){var d=(null==t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null==d||null===(n=d.pipeline)||void 0===n||null===(e=n[r])||void 0===e||null===(l=e.bookmarks)||void 0===l?void 0:l[r],m=null==d||null===(o=d.blocks)||void 0===o||null===(u=o[r])||void 0===u||null===(c=u.destinations)||void 0===c||null===(i=c.state)||void 0===i||null===(a=i.bookmarks)||void 0===a?void 0:a[r];if(f||m){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(m||{})))).sort(),v=[];p.forEach((function(n){var e=[(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,m].forEach((function(t,r){t&&e.push((0,Y.jsx)(b.ZP,{monospace:!0,small:!0,children:t[n]},"".concat(n,"-").concat(r)))})),v.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null==d?void 0:d.source,"source",f],[null==d?void 0:d.destination,"destination",m]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,Y.jsx)(K.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),an=(0,u.useMemo)((function(){var n,e,l,o,u,c;if(t&&r){var i=(null==t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null==i||null===(n=i.blocks)||void 0===n||null===(e=n[r])||void 0===e||null===(l=e.sources)||void 0===l?void 0:l.record,d=null==i||null===(o=i.blocks)||void 0===o||null===(u=o[r])||void 0===u||null===(c=u.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),m=[];f.forEach((function(n){var e=[(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[a,d].forEach((function(t,r){if(t){var l=t[n],o="object"==typeof l;e.push((0,Y.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,Y.jsx)("pre",{children:JSON.stringify(l,null,2)}),!o&&l]},"".concat(n,"-").concat(r)))}})),m.push(e)}));var p=[{label:function(){return""},uuid:"column"}];return[[null==i?void 0:i.source,"source",a],[null==i?void 0:i.destination,"destination",d]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&p.push({uuid:"".concat(t," (").concat(r,")")})})),(0,Y.jsx)(K.Z,{columnFlex:[null,1,1],columns:p,rows:m.map((function(n){return n.map((function(n){return(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),dn=(0,u.useMemo)((function(){var n,e,l,o,u,c,i=null==t||null===(n=t.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[r];return(null==i||null===(l=i.sources)||void 0===l||null===(o=l.block_tags)||void 0===o?void 0:o.destination_table)||(null==i||null===(u=i.destinations)||void 0===u||null===(c=u.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(v.Z,{p:3,children:[r&&(0,Y.jsx)(v.Z,{mb:3,children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[(0,Y.jsx)($.Z,{block:!0,onClick:function(){return l.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,Y.jsxs)(f.ZP,{alignItems:"center",children:[(0,Y.jsx)(N.ArrowLeft,{default:!0,size:1.5*O.iI}),(0,Y.jsx)(v.Z,{mr:1}),(0,Y.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,Y.jsx)(v.Z,{mx:1,children:(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,Y.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,Y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Y.jsx)(v.Z,{mr:2,my:1,children:(0,Y.jsx)(m.Z,{level:5,muted:!t,children:k})}),t&&(0,Y.jsx)(J.ZP,{onClick:function(){return l.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,Y.jsx)(v.Z,{mt:2,children:P}),t&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(v.Z,{mt:3,children:(0,Y.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,Y.jsxs)("div",{children:[(0,Y.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,Y.jsxs)(b.ZP,{headline:!0,children:[r&&[M.V.INITIAL,M.V.RUNNING].includes(null==I?void 0:I.status)&&B,r&&![M.V.INITIAL,M.V.RUNNING].includes(null==I?void 0:I.status)&&(null==I?void 0:I.timeText),!r&&[p.VO.INITIAL,p.VO.RUNNING].includes(null==t?void 0:t.status)&&S,!r&&![p.VO.INITIAL,p.VO.RUNNING].includes(null==t?void 0:t.status)&&w]})]}),un]})}),Object.values(X).length>=1&&(0,Y.jsxs)(v.Z,{mt:3,children:[(0,Y.jsx)(m.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(X).map((function(n,e){var t=(0,s.Z)(n,2),l=t[0],o=t[1];return(!r||r===l)&&(0,Y.jsx)(v.Z,{mt:e>=1?1:0,children:Object.entries(o).map((function(n){var e=(0,s.Z)(n,2),t=e[0],r=e[1],o=r.error,u=r.errors,c=r.message,i=Array.isArray(o)?o.join(" "):o;return(0,Y.jsxs)("div",{children:[(0,Y.jsx)(v.Z,{mb:c||(null==u?void 0:u.length)>=1?2:0,children:(0,Y.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[l,!!t&&(0,Y.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:[" (",t,")"]}),": ",(0,Y.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:i&&(0,Y.jsx)(W(),{children:i})})]})}),(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),u.map((function(n){return(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(l,"-").concat(t))}))},l)}))]})]})]}),t&&!r&&(0,Y.jsx)(v.Z,{my:3,children:cn}),t&&r&&(0,Y.jsxs)(Y.Fragment,{children:[dn&&(0,Y.jsx)(v.Z,{my:3,children:(0,Y.jsxs)(v.Z,{px:3,children:[(0,Y.jsx)(m.Z,{level:5,children:"Table name"}),(0,Y.jsx)(v.Z,{mt:1,children:(0,Y.jsx)(b.ZP,{default:!0,monospace:!0,children:dn})})]})}),sn&&(0,Y.jsxs)(v.Z,{my:3,children:[(0,Y.jsx)(v.Z,{px:3,children:(0,Y.jsx)(m.Z,{level:5,children:"Bookmarks"})}),(0,Y.jsx)(v.Z,{px:1,children:sn})]}),an&&(0,Y.jsxs)(v.Z,{my:3,children:[(0,Y.jsx)(v.Z,{px:3,children:(0,Y.jsx)(m.Z,{level:5,children:"Sample row"})}),(0,Y.jsx)(v.Z,{px:1,children:an})]})]})]})},rn=t(35686),ln=t(28795),on=t(15610),un=t(69419);function cn(n){var e=n.pipeline,t=e.uuid,r=rn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}).data,l=(0,u.useMemo)((function(){return(null==r?void 0:r.pipeline_runs)||[]}),[r]),o=(0,un.iV)(),i=(0,u.useState)(null),s=i[0],a=i[1],d=(0,u.useState)(null),f=d[0],m=d[1],p=(0,u.useState)(null),v=p[0],h=p[1];(0,u.useEffect)((function(){null!=o&&o.pipeline_run_id?h(null==l?void 0:l.find((function(n){return n.id===Number(o.pipeline_run_id)}))):v&&h(null),null!=o&&o.stream?m(o.stream):f&&m(null)}),[l,o,v,f]);var b=(0,u.useCallback)((function(){var n=v?D(v):[];return(0,Y.jsx)(tn,{onClickRow:function(e){var t=n[e];(0,on.u)({stream:f===t?null:t})},pipelineRun:v,selectedStream:f})}),[v,f]),j=(0,u.useMemo)((function(){var n="/pipelines/".concat(t,"/syncs");v&&(n="".concat(n,"?pipeline_run_id=").concat(v.id));var e=[{label:function(){return"Syncs"},linkProps:f?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&e.push({label:function(){return f}}),e}),[t,v,f]);return(0,Y.jsx)(c.Z,{breadcrumbs:j,buildSidekick:b,errors:s,pageName:ln.M.SYNCS,pipeline:e,setErrors:a,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(ln.M.SYNCS,"_").concat(t),children:l.map((function(n){var e=(null==v?void 0:v.id)===n.id;return(0,Y.jsx)(X,{onSelect:function(n){return(0,on.u)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}cn.getInitialProps=function(){var n=(0,r.Z)(o().mark((function n(e){var t;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var sn=(0,i.Z)(cn)},59416:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(25050)}])},80022:function(n,e,t){"use strict";function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.d(e,{Z:function(){return r}})},15544:function(n,e,t){"use strict";function r(n){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},r(n)}t.d(e,{Z:function(){return r}})},13692:function(n,e,t){"use strict";t.d(e,{Z:function(){return l}});var r=t(61049);function l(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&(0,r.Z)(n,e)}},93189:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(12539),l=t(80022);function o(n,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,l.Z)(n)}}},function(n){n.O(0,[449,3782,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var r=i(9518),t=i(46684),l=34*i(70515).iI,s=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],t.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return b},ZP:function(){return P},u$:function(){return v}});var r=i(75582),t=i(82394),l=i(26304),s=i(90299),c=i(9134),o=i(24138),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),h=i(42122),f=i(28598),x=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function j(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function m(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?j(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var v=44,Z={uuid:"Run details"},_={uuid:"Dependency tree"},b=[_,Z];function P(e){var n=e.height,i=e.heightOffset,t=e.pipeline,j=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,x));j?O.blockStatus=(0,g.IJ)(null==j?void 0:j.block_runs):O.noStatus=!0;var k=(0,h.Kn)(null==j?void 0:j.variables)?m({},null==j?void 0:j.variables):(null==j?void 0:j.variables)||{},w=null==j?void 0:j.event_variables;if(w&&(0,h.Kn)(w)&&!(0,h.Qr)(w))if((0,h.Kn)(k)&&k.hasOwnProperty("event")){var I=(0,h.Kn)(k.event)?k.event:{};k.event=m(m({},I),w)}else k.event=m({},w);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var C=j&&[["Run ID",null==j?void 0:j.id],["Variables",(0,f.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],E=j&&(0,f.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,f.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var i=(0,r.Z)(e,2),t=i[0],l=i[1];return[(0,f.jsx)(a.ZP,{monospace:!0,muted:!0,children:t},"key_".concat(n)),(0,f.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&y;return(0,f.jsxs)(f.Fragment,{children:[T&&(0,f.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null==P?void 0:P.uuid,tabs:b,underlineStyle:!0}),(!T||_.uuid===(null==P?void 0:P.uuid))&&(0,f.jsx)(o.ZP,m(m({},O),{},{height:n,heightOffset:(i||0)+(T?v:0),pipeline:t})),Z.uuid===(null==P?void 0:P.uuid)&&E]})}},55072:function(e,n,i){"use strict";i.d(n,{Et:function(){return p},Q:function(){return d}});i(82684);var r=i(71180),t=i(55485),l=i(38276),s=i(31748),c=i(72473),o=i(79633),u=i(70515),a=i(28598),d=30,p=9;n.ZP=function(e){var n=e.page,i=e.maxPages,d=e.onUpdate,p=e.totalPages,g=[],h=i;if(h>p)g=Array.from({length:p},(function(e,n){return n}));else{var f=Math.floor(h/2),x=n-f;n+f>=p?(x=p-h+2,h-=2):n-f<=0?(x=0,h-=2):(h-=4,x=n-Math.floor(h/2)),g=Array.from({length:h},(function(e,n){return n+x}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(t.ZP,{alignItems:"center",children:[(0,a.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(c.PaginateArrowLeft,{size:1.5*u.iI,stroke:s.Av})}),!g.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!g.includes(1)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),g.map((function(e){return(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{backgroundColor:e===n&&o.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!g.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!g.includes(p-2)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(l.Z,{ml:1}),(0,a.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(c.PaginateArrowRight,{size:1.5*u.iI,stroke:s.Av})})]})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ge}});var r=i(75582),t=i(77837),l=i(82394),s=i(38860),c=i.n(s),o=i(82684),u=i(12691),a=i.n(u),d=i(9518),p=i(83455),g=i(34376),h=i(71180),f=i(39457),x=i(15338),j=i(55485),m=i(85854),v=i(48670),Z=i(55072),_=i(75457),b=i(27966),P=i(44265),y=i(30229),O=i(57653),k=i(83784),w=i(44085),I=i(38276),S=i(4190),C=i(75499),E=i(48381),T=i(30160),D=i(12468),M=i(35686),N=i(8955),A=i(77417),F=i(74395),R=i(44425),L=i(72473),U=i(72191),z=i(70515),H=i(28795),q=i(97196),X=i(8916),B=i(16488),G=i(3917),W=i(55283),K=i(44375),V=i(15610),$=i(86735),J=i(42122),Q=i(50178),Y=i(72619),ee=i(95924),ne=i(69419),ie=i(70320),re=i(28598);function te(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function le(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var se=function(e){var n=e.errors,i=e.fetchPipelineSchedule,t=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,c=e.variables,u=(0,o.useContext)(d.ThemeContext),te=(0,A.Z)().project,se=(0,g.useRouter)(),ce=(0,Q.Ct)(null==se?void 0:se.basePath),oe=(0,ie.qB)(),ue=(0,o.useMemo)((function(){return(0,$.HK)((null==t?void 0:t.blocks)||[],(function(e){return e.uuid}))}),[t]),ae=t||{},de=ae.uuid,pe=ae.type,ge=l||{},he=ge.description,fe=ge.id,xe=ge.event_matchers,je=ge.last_enabled_at,me=ge.name,ve=ge.next_pipeline_run_date,Ze=ge.schedule_interval,_e=ge.schedule_type,be=ge.settings,Pe=ge.sla,ye=ge.start_time,Oe=ge.status,ke=ge.tags,we=ge.variables,Ie=void 0===we?{}:we,Se=(0,o.useMemo)((function(){return(0,B._U)(Ze)}),[Ze]),Ce=(0,ne.iV)(),Ee={_limit:30,_offset:30*(null!=Ce&&Ce.page?Ce.page:0)};null!=Ce&&Ce.status&&(Ee.status=Ce.status),null!=l&&l.global_data_product_uuid&&(Ee.global_data_product_uuid=null==l?void 0:l.global_data_product_uuid);var Te=M.ZP.pipeline_runs.pipeline_schedules.list(fe,Ee,{refreshInterval:3e3,revalidateOnFocus:!0}),De=Te.data,Me=Te.mutate,Ne=(0,o.useMemo)((function(){return(null==De?void 0:De.pipeline_runs)||[]}),[De]),Ae=(0,o.useMemo)((function(){var e;return(null==De||null===(e=De.metadata)||void 0===e?void 0:e.count)||[]}),[De]),Fe=(0,o.useState)(null),Re=Fe[0],Le=Fe[1],Ue=(0,o.useMemo)((function(){var e=null!=Ce&&Ce.page?Ce.page:0;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(b.Z,{fetchPipelineRuns:Me,hideTriggerColumn:!0,onClickRow:function(e){return Le((function(n){var i=Ne[e];return(null==n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Ne,selectedRun:Re,setErrors:s,setSelectedRun:Le}),(0,re.jsx)(I.Z,{p:2,children:(0,re.jsx)(Z.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=le(le({},Ce),{},{page:n>=0?n:0});se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe,"?").concat((0,ne.uM)(i)))},page:Number(e),totalPages:Math.ceil(Ae/30)})})]})}),[Me,Ne,fe,de,Ce,se,Re,s,Ae]),ze=(0,o.useState)(N.G7[0]),He=ze[0],qe=ze[1],Xe=(0,p.Db)((function(e){return M.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,J.gR)(e,["id"])})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),Be=(0,r.Z)(Xe,2),Ge=Be[0],We=Be[1].isLoading,Ke=M.ZP.pipeline_triggers.pipelines.list(de),Ve=Ke.data,$e=Ke.mutate,Je=(0,o.useMemo)((function(){return(0,$.HK)((null==Ve?void 0:Ve.pipeline_triggers)||[],(function(e){return e.name}))}),[Ve]),Qe=(0,o.useMemo)((function(){return!(null==Je||!Je[null==l?void 0:l.name])}),[l,Je]),Ye=(0,p.Db)(M.ZP.pipeline_triggers.pipelines.useCreate(de),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){$e()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),en=(0,r.Z)(Ye,2),nn=en[0],rn=en[1].isLoading,tn=(0,p.Db)(M.ZP.pipeline_runs.pipeline_schedules.useCreate(fe),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){Me()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),ln=(0,r.Z)(tn,2),sn=ln[0],cn=ln[1].isLoading,on=(0,o.useMemo)((function(){return y.fq.ACTIVE===Oe}),[Oe]),un=(0,o.useMemo)((function(){return!(on||_e===y.Xm.TIME&&Ze===y.U5.ONCE)}),[on,Ze,_e]),an=(0,o.useMemo)((function(){var e,n,i,r={default:!0,size:1.5*z.iI},t=[[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.MultiShare,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(e=y.Z4[_e])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Switch,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,re.jsx)(T.ZP,{danger:!on,monospace:!0,success:on,children:Oe},"trigger_status")]];if(he&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Alphabet,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,re.jsx)(T.ZP,{children:he},"trigger_description")]),Pe){var s=(0,B.gU)(Pe),c=s.time,o=s.unit,u=1===c?o:"".concat(o,"s");t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Info,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:"".concat(c," ").concat(u)},"trigger_sla")])}if(Ze&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Schedule,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe&&Se?(0,B.lO)(Ze):Ze.replace("@","")},"trigger_frequency")],[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:ve?oe?(0,G.XG)(ve,oe):(0,G.d$)(ve,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),ye&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe?(0,G.XG)(ye,oe):ye},"trigger_start_date")]),je&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Last enabled at"})]},"trigger_last_enabled_at_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe?(0,G.XG)(je,oe):(0,G.d$)(je,{includeSeconds:!0})},"trigger_last_enabled_at")]),y.Xm.API===_e){var a=(0,B.M8)(l);t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.PlugAPI,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,re.jsx)(f.Z,{copiedText:a,children:(0,re.jsx)(T.ZP,{monospace:!0,small:!0,children:a})},"trigger_api_endpoint")])}if(null!=be&&be.timeout){var d=(0,B.gU)(null==be?void 0:be.timeout),p=d.time,g=d.unit,h=1===p?g:"".concat(g,"s");t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Timeout set for runs of this trigger",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,re.jsx)(T.ZP,{monospace:!0,children:"".concat(p," ").concat(h)},"trigger_timeout_label")])}null!=be&&be.skip_if_previous_running&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(n=be.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);(null!=be&&be.allow_blocks_to_fail&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,re.jsx)(T.ZP,{monospace:!0,children:be.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),null!=be&&be.create_initial_pipeline_run)&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Create initial pipeline run if start date is before current execution period",maxWidth:32*z.iI,size:U.gt}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Create initial run"})]},"trigger_create_initial_pipeline_run"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(i=be.create_initial_pipeline_run)||void 0===i?void 0:i.toString()},"trigger_create_initial_pipeline_run_label")]);return(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:t})}),[he,oe,on,Se,ve,l,Ze,_e,be,Pe,ye,Oe]),dn=(0,o.useMemo)((function(){return Ie||{}}),[Ie]),pn=(0,o.useMemo)((function(){var e,n=[];return(0,J.Qr)(dn)?n=(0,X.wx)(c,(function(e){return e.uuid===k.C})):Object.entries(dn).forEach((function(e){var i=(0,r.Z)(e,2),t=i[0],l=i[1];[P.sZ,y.PN].includes(t)||n.push({uuid:t,value:(0,X.FS)(l)})})),void 0!==(n=(0,X.JZ)(n||[],_e))&&null!==(e=n)&&void 0!==e&&e.length?(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,re.jsx)(T.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[_e,dn,c]),gn=(0,o.useMemo)((function(){var e=null==dn?void 0:dn[y.PN];return e?(0,re.jsx)(re.Fragment,{children:Object.entries(e||{}).map((function(e){var n,i=(0,r.Z)(e,2),t=i[0],l=i[1],s=null==ue?void 0:ue[t];return(0,re.jsxs)(I.Z,{mt:1,children:[(0,re.jsx)(I.Z,{pb:1,px:z.cd,children:(0,re.jsx)(T.ZP,{color:(0,W.qn)(null==s?void 0:s.type,{blockColor:null==s?void 0:s.color,theme:u}).accent,monospace:!0,children:t})}),(0,re.jsx)(x.Z,{light:!0}),null===(n=Object.entries(l||{}))||void 0===n?void 0:n.map((function(e,n){var i=(0,r.Z)(e,2),t=i[0],l=i[1];return(0,re.jsx)("div",{children:(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:"Stream"},"stream_title_".concat(n)),(0,re.jsx)(T.ZP,{monospace:!0,rightAligned:!0,children:t},"stream_id_".concat(n))]].concat(Object.entries(l||{}).map((function(e){var n=(0,r.Z)(e,2),i=n[0],t=n[1];return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:i},"settings_variable_label_".concat(i)),(0,re.jsx)(T.ZP,{monospace:!0,rightAligned:!0,children:t},"settings_variable_".concat(i))]})))})},t)}))]},t)}))}):null}),[ue,dn,u]),hn=(0,o.useMemo)((function(){var e,n,i=[],r=null==dn||null===(e=dn[P.sZ])||void 0===e?void 0:e.blocks;return null==t||null===(n=t.blocks)||void 0===n||n.forEach((function(e){var n=e.type,t=e.uuid;if(R.tf.DBT===n){var l,s=(null==r||null===(l=r[t])||void 0===l?void 0:l.configuration)||{},c=s.flags,o=s.prefix,u=s.suffix,a=(0,K.IU)(e).name;(c||o||u)&&i.push({flags:c,prefix:o,suffix:u,uuid:a})}})),void 0!==i&&null!=i&&i.length?(0,re.jsx)(C.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,r=e.suffix,t=e.uuid;return[(0,re.jsxs)(T.ZP,{monospace:!0,small:!0,children:[i&&(0,re.jsx)(T.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),t,r&&(0,re.jsx)(T.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(t)),(0,re.jsx)(T.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(t))]}))}):null}),[t,dn]),fn=(0,o.useMemo)((function(){return(0,re.jsx)(C.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null==xe?void 0:xe.map((function(e,n){var i=e.event_type,r=e.name;return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:q._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,re.jsx)(T.ZP,{monospace:!0,children:r},"".concat(i,"_").concat(n,"_name"))]}))})}),[xe]),xn=(0,o.useMemo)((function(){var e,n,i,r,l,s,c;return void 0===(null==t||null===(e=t.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null==te||null===(i=te.pipelines)||void 0===i||null===(r=i.settings)||void 0===r||null===(l=r.triggers)||void 0===l?void 0:l.save_in_code_automatically:null==t||null===(s=t.settings)||void 0===s||null===(c=s.triggers)||void 0===c?void 0:c.save_in_code_automatically}),[t,te]);return(0,re.jsxs)(_.Z,{afterHidden:!Re,before:(0,re.jsxs)(F.M,{children:[(0,re.jsxs)(I.Z,{mb:z.HN,pt:z.cd,px:z.cd,children:[(0,re.jsxs)(I.Z,{mb:z.cd,children:[y.Xm.TIME===_e&&(0,re.jsx)(L.Sun,{size:5*z.iI}),y.Xm.EVENT===_e&&(0,re.jsx)(L.MusicNotes,{size:5*z.iI}),y.Xm.API===_e&&(0,re.jsx)(L.Lightning,{size:5*z.iI}),!_e&&(0,re.jsx)(L.MultiShare,{size:5*z.iI})]}),(0,re.jsx)(m.Z,{children:me})]}),(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Settings"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),an,(null==xe?void 0:xe.length)>=1&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Events"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),fn]}),pn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),pn]}),gn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Bookmark values"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),gn]}),hn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),hn]}),(null==ke?void 0:ke.length)>=1&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Tags"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),(0,re.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,re.jsx)(E.Z,{tags:null==ke?void 0:ke.map((function(e){return{uuid:e}}))})})]}),"\\",(0,re.jsx)(I.Z,{my:z.HN,children:(0,re.jsxs)(I.Z,{px:z.cd,children:[(0,re.jsxs)(m.Z,{level:5,children:[Qe&&"Trigger exists in code",!Qe&&"Store trigger in code"]}),(0,re.jsxs)(I.Z,{mt:1,children:[xn&&(0,re.jsxs)(T.ZP,{default:!0,children:["This trigger will automatically be persisted in code. To change this behavior, update the ",(0,re.jsx)(a(),{as:"/pipelines/".concat(de,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,re.jsx)(v.Z,{openNewWindow:!0,children:"pipeline’s settings"})})," or ",(0,re.jsx)(a(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,re.jsx)(v.Z,{openNewWindow:!0,children:"project settings"})}),"."]}),!xn&&(0,re.jsxs)(T.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline’s metadata and version control the trigger using Git. For more information, please read the ",(0,re.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})]}),!xn&&(0,re.jsxs)(I.Z,{mt:z.cd,children:[!Ve&&(0,re.jsx)(S.Z,{inverted:!0}),Ve&&(0,re.jsxs)(h.ZP,{disabled:!(null!=l&&l.id),loading:rn,onClick:function(){nn({pipeline_trigger:{pipeline_schedule_id:null==l?void 0:l.id}})},secondary:!0,children:[Qe&&"Update trigger in code",!Qe&&"Save trigger in code"]})]})]})})]}),beforeWidth:F.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(de,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return me},linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,N.ZP)(le(le({},e),{},{selectedRun:Re,selectedTab:He,setSelectedTab:qe}))},errors:n,pageName:H.M.TRIGGERS,pipeline:t,setErrors:s,subheader:(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(h.ZP,{beforeIcon:on?(0,re.jsx)(L.LightningOff,{size:U.bL}):(0,re.jsx)(L.Lightning,{inverted:!ce,size:U.bL}),danger:on&&!ce,loading:We,onClick:function(e){(0,ee.j)(e),Ge({id:fe,status:on?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!on&&!ce,children:on?"Disable trigger":"Enable trigger"}),(0,re.jsx)(I.Z,{mr:z.cd}),pe!==O.qL.STREAMING&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.ZP,{beforeIcon:(0,re.jsx)(L.Once,{size:U.bL}),disabled:un,loading:cn,onClick:function(){return sn({pipeline_run:{pipeline_schedule_id:fe,pipeline_uuid:de,variables:dn}})},outline:!0,title:un?"Trigger must be enabled to run@once":"Manually run pipeline once immediately",children:(0,re.jsx)(T.ZP,{disabled:un,children:"Run@once"})}),(0,re.jsx)(I.Z,{mr:z.cd})]}),!ce&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.ZP,{beforeIcon:(0,re.jsx)(L.Edit,{size:U.bL}),linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,re.jsx)(I.Z,{mr:z.cd})]}),(0,re.jsxs)(w.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe)):(0,V.u)({page:0,status:e.target.value})},paddingRight:4*z.iI,placeholder:"Select run status",value:(null==Ce?void 0:Ce.status)||"all",children:[(0,re.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),P.IK.map((function(e){return(0,re.jsx)("option",{value:e,children:P.Do[e]},e)}))]})]}),title:function(){return me},uuid:"triggers/detail",children:[(0,re.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,re.jsx)(x.Z,{light:!0,mt:z.cd,short:!0}),Ue]})},ce=i(12717),oe=i(93808),ue=i(92709);function ae(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function de(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ae(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function pe(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,r=e.subpath,t=ue.b7===r,l=(0,o.useState)(null),s=l[0],c=l[1],u=M.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null==u?void 0:u.variables,d={};t&&(d._format="with_runtime_average");var p=M.ZP.pipeline_schedules.detail(void 0!==n&&n,d),g=p.data,h=p.mutate,f=null==g?void 0:g.pipeline_schedule,x=M.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,j=de(de({},null==x?void 0:x.pipeline),{},{uuid:i});return t?(0,re.jsx)(ce.Z,{errors:s,fetchPipelineSchedule:h,pipeline:j,pipelineSchedule:f,setErrors:c,variables:a}):(0,re.jsx)(se,{errors:s,fetchPipelineSchedule:h,pipeline:j,pipelineSchedule:f,setErrors:c,variables:a})}pe.getInitialProps=function(){var e=(0,t.Z)(c().mark((function e(n){var i,t,l,s,o,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,t=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,r.Z)(l,2),o=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:o,pipelineUUID:t,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:t});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ge=(0,oe.Z)(pe)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[7849,2055,26,1557,3782,7966,2717,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var r=i(9518),t=i(46684),l=34*i(70515).iI,s=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],t.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return b},ZP:function(){return P},u$:function(){return v}});var r=i(75582),t=i(82394),l=i(26304),s=i(90299),c=i(9134),o=i(24138),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),h=i(42122),f=i(28598),x=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function j(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function m(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?j(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var v=44,Z={uuid:"Run details"},_={uuid:"Dependency tree"},b=[_,Z];function P(e){var n=e.height,i=e.heightOffset,t=e.pipeline,j=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,x));j?O.blockStatus=(0,g.IJ)(null==j?void 0:j.block_runs):O.noStatus=!0;var k=(0,h.Kn)(null==j?void 0:j.variables)?m({},null==j?void 0:j.variables):(null==j?void 0:j.variables)||{},w=null==j?void 0:j.event_variables;if(w&&(0,h.Kn)(w)&&!(0,h.Qr)(w))if((0,h.Kn)(k)&&k.hasOwnProperty("event")){var I=(0,h.Kn)(k.event)?k.event:{};k.event=m(m({},I),w)}else k.event=m({},w);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var C=j&&[["Run ID",null==j?void 0:j.id],["Variables",(0,f.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],E=j&&(0,f.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,f.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var i=(0,r.Z)(e,2),t=i[0],l=i[1];return[(0,f.jsx)(a.ZP,{monospace:!0,muted:!0,children:t},"key_".concat(n)),(0,f.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&y;return(0,f.jsxs)(f.Fragment,{children:[T&&(0,f.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null==P?void 0:P.uuid,tabs:b,underlineStyle:!0}),(!T||_.uuid===(null==P?void 0:P.uuid))&&(0,f.jsx)(o.ZP,m(m({},O),{},{height:n,heightOffset:(i||0)+(T?v:0),pipeline:t})),Z.uuid===(null==P?void 0:P.uuid)&&E]})}},55072:function(e,n,i){"use strict";i.d(n,{Et:function(){return p},Q:function(){return d}});i(82684);var r=i(71180),t=i(55485),l=i(38276),s=i(31748),c=i(72473),o=i(79633),u=i(70515),a=i(28598),d=30,p=9;n.ZP=function(e){var n=e.page,i=e.maxPages,d=e.onUpdate,p=e.totalPages,g=[],h=i;if(h>p)g=Array.from({length:p},(function(e,n){return n}));else{var f=Math.floor(h/2),x=n-f;n+f>=p?(x=p-h+2,h-=2):n-f<=0?(x=0,h-=2):(h-=4,x=n-Math.floor(h/2)),g=Array.from({length:h},(function(e,n){return n+x}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(t.ZP,{alignItems:"center",children:[(0,a.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(c.PaginateArrowLeft,{size:1.5*u.iI,stroke:s.Av})}),!g.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!g.includes(1)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),g.map((function(e){return(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{backgroundColor:e===n&&o.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!g.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!g.includes(p-2)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(l.Z,{ml:1}),(0,a.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(c.PaginateArrowRight,{size:1.5*u.iI,stroke:s.Av})})]})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ge}});var r=i(75582),t=i(77837),l=i(82394),s=i(38860),c=i.n(s),o=i(82684),u=i(12691),a=i.n(u),d=i(9518),p=i(83455),g=i(34376),h=i(71180),f=i(39457),x=i(15338),j=i(55485),m=i(85854),v=i(48670),Z=i(55072),_=i(75457),b=i(27966),P=i(44265),y=i(30229),O=i(57653),k=i(83784),w=i(44085),I=i(38276),S=i(4190),C=i(75499),E=i(48381),T=i(30160),D=i(12468),M=i(35686),N=i(8955),A=i(77417),F=i(74395),R=i(44425),L=i(72473),U=i(72191),z=i(70515),H=i(28795),q=i(97196),X=i(8916),B=i(16488),G=i(3917),W=i(55283),K=i(44375),V=i(15610),$=i(86735),J=i(42122),Q=i(50178),Y=i(72619),ee=i(95924),ne=i(69419),ie=i(70320),re=i(28598);function te(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function le(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var se=function(e){var n=e.errors,i=e.fetchPipelineSchedule,t=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,c=e.variables,u=(0,o.useContext)(d.ThemeContext),te=(0,A.Z)().project,se=(0,g.useRouter)(),ce=(0,Q.Ct)(null==se?void 0:se.basePath),oe=(0,ie.qB)(),ue=(0,o.useMemo)((function(){return(0,$.HK)((null==t?void 0:t.blocks)||[],(function(e){return e.uuid}))}),[t]),ae=t||{},de=ae.uuid,pe=ae.type,ge=l||{},he=ge.description,fe=ge.id,xe=ge.event_matchers,je=ge.last_enabled_at,me=ge.name,ve=ge.next_pipeline_run_date,Ze=ge.schedule_interval,_e=ge.schedule_type,be=ge.settings,Pe=ge.sla,ye=ge.start_time,Oe=ge.status,ke=ge.tags,we=ge.variables,Ie=void 0===we?{}:we,Se=(0,o.useMemo)((function(){return(0,B._U)(Ze)}),[Ze]),Ce=(0,ne.iV)(),Ee={_limit:30,_offset:30*(null!=Ce&&Ce.page?Ce.page:0)};null!=Ce&&Ce.status&&(Ee.status=Ce.status),null!=l&&l.global_data_product_uuid&&(Ee.global_data_product_uuid=null==l?void 0:l.global_data_product_uuid);var Te=M.ZP.pipeline_runs.pipeline_schedules.list(fe,Ee,{refreshInterval:3e3,revalidateOnFocus:!0}),De=Te.data,Me=Te.mutate,Ne=(0,o.useMemo)((function(){return(null==De?void 0:De.pipeline_runs)||[]}),[De]),Ae=(0,o.useMemo)((function(){var e;return(null==De||null===(e=De.metadata)||void 0===e?void 0:e.count)||[]}),[De]),Fe=(0,o.useState)(null),Re=Fe[0],Le=Fe[1],Ue=(0,o.useMemo)((function(){var e=null!=Ce&&Ce.page?Ce.page:0;return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(b.Z,{fetchPipelineRuns:Me,hideTriggerColumn:!0,onClickRow:function(e){return Le((function(n){var i=Ne[e];return(null==n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Ne,selectedRun:Re,setErrors:s,setSelectedRun:Le}),(0,re.jsx)(I.Z,{p:2,children:(0,re.jsx)(Z.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=le(le({},Ce),{},{page:n>=0?n:0});se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe,"?").concat((0,ne.uM)(i)))},page:Number(e),totalPages:Math.ceil(Ae/30)})})]})}),[Me,Ne,fe,de,Ce,se,Re,s,Ae]),ze=(0,o.useState)(N.G7[0]),He=ze[0],qe=ze[1],Xe=(0,p.Db)((function(e){return M.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,J.gR)(e,["id"])})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),Be=(0,r.Z)(Xe,2),Ge=Be[0],We=Be[1].isLoading,Ke=M.ZP.pipeline_triggers.pipelines.list(de),Ve=Ke.data,$e=Ke.mutate,Je=(0,o.useMemo)((function(){return(0,$.HK)((null==Ve?void 0:Ve.pipeline_triggers)||[],(function(e){return e.name}))}),[Ve]),Qe=(0,o.useMemo)((function(){return!(null==Je||!Je[null==l?void 0:l.name])}),[l,Je]),Ye=(0,p.Db)(M.ZP.pipeline_triggers.pipelines.useCreate(de),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){$e()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),en=(0,r.Z)(Ye,2),nn=en[0],rn=en[1].isLoading,tn=(0,p.Db)(M.ZP.pipeline_runs.pipeline_schedules.useCreate(fe),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){Me()},onErrorCallback:function(e,n){return null==s?void 0:s({errors:n,response:e})}})}}),ln=(0,r.Z)(tn,2),sn=ln[0],cn=ln[1].isLoading,on=(0,o.useMemo)((function(){return y.fq.ACTIVE===Oe}),[Oe]),un=(0,o.useMemo)((function(){return!(on||_e===y.Xm.TIME&&Ze===y.U5.ONCE)}),[on,Ze,_e]),an=(0,o.useMemo)((function(){var e,n,i,r={default:!0,size:1.5*z.iI},t=[[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.MultiShare,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(e=y.Z4[_e])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Switch,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,re.jsx)(T.ZP,{danger:!on,monospace:!0,success:on,children:Oe},"trigger_status")]];if(he&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Alphabet,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,re.jsx)(T.ZP,{children:he},"trigger_description")]),Pe){var s=(0,B.gU)(Pe),c=s.time,o=s.unit,u=1===c?o:"".concat(o,"s");t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Info,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:"".concat(c," ").concat(u)},"trigger_sla")])}if(Ze&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.Schedule,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe&&Se?(0,B.lO)(Ze):Ze.replace("@","")},"trigger_frequency")],[(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:ve?oe?(0,G.XG)(ve,oe):(0,G.d$)(ve,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),ye&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe?(0,G.XG)(ye,oe):ye},"trigger_start_date")]),je&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.CalendarDate,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Last enabled at"})]},"trigger_last_enabled_at_label"),(0,re.jsx)(T.ZP,{monospace:!0,children:oe?(0,G.XG)(je,oe):(0,G.d$)(je,{includeSeconds:!0})},"trigger_last_enabled_at")]),y.Xm.API===_e){var a=(0,B.M8)(l);t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(L.PlugAPI,le({},r)),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,re.jsx)(f.Z,{copiedText:a,children:(0,re.jsx)(T.ZP,{monospace:!0,small:!0,children:a})},"trigger_api_endpoint")])}if(null!=be&&be.timeout){var d=(0,B.gU)(null==be?void 0:be.timeout),p=d.time,g=d.unit,h=1===p?g:"".concat(g,"s");t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Timeout set for runs of this trigger",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,re.jsx)(T.ZP,{monospace:!0,children:"".concat(p," ").concat(h)},"trigger_timeout_label")])}null!=be&&be.skip_if_previous_running&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(n=be.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);(null!=be&&be.allow_blocks_to_fail&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:U.gt,widthFitContent:!0}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,re.jsx)(T.ZP,{monospace:!0,children:be.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),null!=be&&be.create_initial_pipeline_run)&&t.push([(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(D.Z,{default:!0,label:"Create initial pipeline run if start date is before current execution period",maxWidth:32*z.iI,size:U.gt}),(0,re.jsx)(I.Z,{mr:1}),(0,re.jsx)(T.ZP,{default:!0,children:"Create initial run"})]},"trigger_create_initial_pipeline_run"),(0,re.jsx)(T.ZP,{monospace:!0,children:null===(i=be.create_initial_pipeline_run)||void 0===i?void 0:i.toString()},"trigger_create_initial_pipeline_run_label")]);return(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:t})}),[he,oe,on,Se,ve,l,Ze,_e,be,Pe,ye,Oe]),dn=(0,o.useMemo)((function(){return Ie||{}}),[Ie]),pn=(0,o.useMemo)((function(){var e,n=[];return(0,J.Qr)(dn)?n=(0,X.wx)(c,(function(e){return e.uuid===k.C})):Object.entries(dn).forEach((function(e){var i=(0,r.Z)(e,2),t=i[0],l=i[1];[P.sZ,y.PN].includes(t)||n.push({uuid:t,value:(0,X.FS)(l)})})),void 0!==(n=(0,X.JZ)(n||[],_e))&&null!==(e=n)&&void 0!==e&&e.length?(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,re.jsx)(T.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[_e,dn,c]),gn=(0,o.useMemo)((function(){var e=null==dn?void 0:dn[y.PN];return e?(0,re.jsx)(re.Fragment,{children:Object.entries(e||{}).map((function(e){var n,i=(0,r.Z)(e,2),t=i[0],l=i[1],s=null==ue?void 0:ue[t];return(0,re.jsxs)(I.Z,{mt:1,children:[(0,re.jsx)(I.Z,{pb:1,px:z.cd,children:(0,re.jsx)(T.ZP,{color:(0,W.qn)(null==s?void 0:s.type,{blockColor:null==s?void 0:s.color,theme:u}).accent,monospace:!0,children:t})}),(0,re.jsx)(x.Z,{light:!0}),null===(n=Object.entries(l||{}))||void 0===n?void 0:n.map((function(e,n){var i=(0,r.Z)(e,2),t=i[0],l=i[1];return(0,re.jsx)("div",{children:(0,re.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:"Stream"},"stream_title_".concat(n)),(0,re.jsx)(T.ZP,{monospace:!0,rightAligned:!0,children:t},"stream_id_".concat(n))]].concat(Object.entries(l||{}).map((function(e){var n=(0,r.Z)(e,2),i=n[0],t=n[1];return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:i},"settings_variable_label_".concat(i)),(0,re.jsx)(T.ZP,{monospace:!0,rightAligned:!0,children:t},"settings_variable_".concat(i))]})))})},t)}))]},t)}))}):null}),[ue,dn,u]),hn=(0,o.useMemo)((function(){var e,n,i=[],r=null==dn||null===(e=dn[P.sZ])||void 0===e?void 0:e.blocks;return null==t||null===(n=t.blocks)||void 0===n||n.forEach((function(e){var n=e.type,t=e.uuid;if(R.tf.DBT===n){var l,s=(null==r||null===(l=r[t])||void 0===l?void 0:l.configuration)||{},c=s.flags,o=s.prefix,u=s.suffix,a=(0,K.IU)(e).name;(c||o||u)&&i.push({flags:c,prefix:o,suffix:u,uuid:a})}})),void 0!==i&&null!=i&&i.length?(0,re.jsx)(C.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,r=e.suffix,t=e.uuid;return[(0,re.jsxs)(T.ZP,{monospace:!0,small:!0,children:[i&&(0,re.jsx)(T.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),t,r&&(0,re.jsx)(T.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(t)),(0,re.jsx)(T.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(t))]}))}):null}),[t,dn]),fn=(0,o.useMemo)((function(){return(0,re.jsx)(C.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null==xe?void 0:xe.map((function(e,n){var i=e.event_type,r=e.name;return[(0,re.jsx)(T.ZP,{default:!0,monospace:!0,children:q._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,re.jsx)(T.ZP,{monospace:!0,children:r},"".concat(i,"_").concat(n,"_name"))]}))})}),[xe]),xn=(0,o.useMemo)((function(){var e,n,i,r,l,s,c;return void 0===(null==t||null===(e=t.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null==te||null===(i=te.pipelines)||void 0===i||null===(r=i.settings)||void 0===r||null===(l=r.triggers)||void 0===l?void 0:l.save_in_code_automatically:null==t||null===(s=t.settings)||void 0===s||null===(c=s.triggers)||void 0===c?void 0:c.save_in_code_automatically}),[t,te]);return(0,re.jsxs)(_.Z,{afterHidden:!Re,before:(0,re.jsxs)(F.M,{children:[(0,re.jsxs)(I.Z,{mb:z.HN,pt:z.cd,px:z.cd,children:[(0,re.jsxs)(I.Z,{mb:z.cd,children:[y.Xm.TIME===_e&&(0,re.jsx)(L.Sun,{size:5*z.iI}),y.Xm.EVENT===_e&&(0,re.jsx)(L.MusicNotes,{size:5*z.iI}),y.Xm.API===_e&&(0,re.jsx)(L.Lightning,{size:5*z.iI}),!_e&&(0,re.jsx)(L.MultiShare,{size:5*z.iI})]}),(0,re.jsx)(m.Z,{children:me})]}),(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Settings"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),an,(null==xe?void 0:xe.length)>=1&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Events"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),fn]}),pn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),pn]}),gn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Bookmark values"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),gn]}),hn&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),hn]}),(null==ke?void 0:ke.length)>=1&&(0,re.jsxs)(I.Z,{my:z.HN,children:[(0,re.jsx)(I.Z,{px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Tags"})}),(0,re.jsx)(x.Z,{light:!0,mt:1,short:!0}),(0,re.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,re.jsx)(E.Z,{tags:null==ke?void 0:ke.map((function(e){return{uuid:e}}))})})]}),"\\",(0,re.jsx)(I.Z,{my:z.HN,children:(0,re.jsxs)(I.Z,{px:z.cd,children:[(0,re.jsxs)(m.Z,{level:5,children:[Qe&&"Trigger exists in code",!Qe&&"Store trigger in code"]}),(0,re.jsxs)(I.Z,{mt:1,children:[xn&&(0,re.jsxs)(T.ZP,{default:!0,children:["This trigger will automatically be persisted in code. To change this behavior, update the ",(0,re.jsx)(a(),{as:"/pipelines/".concat(de,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,re.jsx)(v.Z,{openNewWindow:!0,children:"pipeline’s settings"})})," or ",(0,re.jsx)(a(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,re.jsx)(v.Z,{openNewWindow:!0,children:"project settings"})}),"."]}),!xn&&(0,re.jsxs)(T.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline’s metadata and version control the trigger using Git. For more information, please read the ",(0,re.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})]}),!xn&&(0,re.jsxs)(I.Z,{mt:z.cd,children:[!Ve&&(0,re.jsx)(S.Z,{inverted:!0}),Ve&&(0,re.jsxs)(h.ZP,{disabled:!(null!=l&&l.id),loading:rn,onClick:function(){nn({pipeline_trigger:{pipeline_schedule_id:null==l?void 0:l.id}})},secondary:!0,children:[Qe&&"Update trigger in code",!Qe&&"Save trigger in code"]})]})]})})]}),beforeWidth:F.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(de,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return me},linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,N.ZP)(le(le({},e),{},{selectedRun:Re,selectedTab:He,setSelectedTab:qe}))},errors:n,pageName:H.M.TRIGGERS,pipeline:t,setErrors:s,subheader:(0,re.jsxs)(j.ZP,{alignItems:"center",children:[(0,re.jsx)(h.ZP,{beforeIcon:on?(0,re.jsx)(L.LightningOff,{size:U.bL}):(0,re.jsx)(L.Lightning,{inverted:!ce,size:U.bL}),danger:on&&!ce,loading:We,onClick:function(e){(0,ee.j)(e),Ge({id:fe,status:on?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!on&&!ce,children:on?"Disable trigger":"Enable trigger"}),(0,re.jsx)(I.Z,{mr:z.cd}),pe!==O.qL.STREAMING&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.ZP,{beforeIcon:(0,re.jsx)(L.Once,{size:U.bL}),disabled:un,loading:cn,onClick:function(){return sn({pipeline_run:{pipeline_schedule_id:fe,pipeline_uuid:de,variables:dn}})},outline:!0,title:un?"Trigger must be enabled to run@once":"Manually run pipeline once immediately",children:(0,re.jsx)(T.ZP,{disabled:un,children:"Run@once"})}),(0,re.jsx)(I.Z,{mr:z.cd})]}),!ce&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(h.ZP,{beforeIcon:(0,re.jsx)(L.Edit,{size:U.bL}),linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,re.jsx)(I.Z,{mr:z.cd})]}),(0,re.jsxs)(w.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe)):(0,V.u)({page:0,status:e.target.value})},paddingRight:4*z.iI,placeholder:"Select run status",value:(null==Ce?void 0:Ce.status)||"all",children:[(0,re.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),P.IK.map((function(e){return(0,re.jsx)("option",{value:e,children:P.Do[e]},e)}))]})]}),title:function(){return me},uuid:"triggers/detail",children:[(0,re.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,re.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,re.jsx)(x.Z,{light:!0,mt:z.cd,short:!0}),Ue]})},ce=i(12717),oe=i(93808),ue=i(92709);function ae(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function de(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ae(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function pe(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,r=e.subpath,t=ue.b7===r,l=(0,o.useState)(null),s=l[0],c=l[1],u=M.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null==u?void 0:u.variables,d={};t&&(d._format="with_runtime_average");var p=M.ZP.pipeline_schedules.detail(void 0!==n&&n,d),g=p.data,h=p.mutate,f=null==g?void 0:g.pipeline_schedule,x=M.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,j=de(de({},null==x?void 0:x.pipeline),{},{uuid:i});return t?(0,re.jsx)(ce.Z,{errors:s,fetchPipelineSchedule:h,pipeline:j,pipelineSchedule:f,setErrors:c,variables:a}):(0,re.jsx)(se,{errors:s,fetchPipelineSchedule:h,pipeline:j,pipelineSchedule:f,setErrors:c,variables:a})}pe.getInitialProps=function(){var e=(0,t.Z)(c().mark((function e(n){var i,t,l,s,o,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,t=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,r.Z)(l,2),o=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:o,pipelineUUID:t,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:t});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ge=(0,oe.Z)(pe)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[7849,2055,26,449,3782,7966,2717,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{16488:function(e,n,r){"use strict";r.d(n,{IJ:function(){return g},M8:function(){return P},Uc:function(){return j},XM:function(){return Z},_U:function(){return h},eI:function(){return b},gU:function(){return y},lO:function(){return S},ri:function(){return m},tL:function(){return w},vJ:function(){return O},xH:function(){return x}});var t,i=r(82394),o=r(92083),l=r.n(o),u=r(3917),a=r(30229),c=r(4383),s=r(42122),d=r(86735);function p(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 f(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var h=function(e){return!!e&&!Object.values(a.U5).includes(e)};function g(e){return null==e?void 0:e.reduce((function(e,n){var r=n.block_uuid,t=n.completed_at,o=n.started_at,u=n.status,a=null;o&&t&&(a=l()(t).valueOf()-l()(o).valueOf());return f(f({},e),{},(0,i.Z)({},r,{runtime:a,status:u}))}),{})}var v,m=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function x(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),r=e[a.gm.INTERVAL];r&&(n["schedule_interval[]"]=encodeURIComponent(r));var t=e[a.gm.TYPE];return t&&(n["schedule_type[]"]=t),n}function b(e){return e?new Date(l()(e).valueOf()):null}function j(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return n?(0,u.XG)(e,n,r):function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"!=typeof e)return e;var r=e.split("+")[0];return l()(b(r)).format(n||u.Nx)}(e,r)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(v||(v={}));var w=(t={},(0,i.Z)(t,v.DAY,86400),(0,i.Z)(t,v.HOUR,3600),(0,i.Z)(t,v.MINUTE,60),(0,i.Z)(t,v.SECOND,1),t);function y(e){var n=v.SECOND,r=e;return e%86400==0?(r/=86400,n=v.DAY):e%3600==0?(r/=3600,n=v.HOUR):e%60==0&&(r/=60,n=v.MINUTE),{time:r,unit:n}}function O(e,n){return e*w[n]}function Z(e,n,r){var t,i=l()(e);return i.set("hour",+(null==n?void 0:n.hour)||0),i.set("minute",+(null==n?void 0:n.minute)||0),i.set("second",0),t=i.format(u.TD),null!=r&&r.includeSeconds&&(t=t.concat(":00")),null!=r&&r.localTimezone&&(t=i.format(u.lE),null!=r&&r.convertToUtc&&(t=(0,u.d$)(t,{includeSeconds:null==r?void 0:r.includeSeconds,utcFormat:!0}))),t}function P(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",t=(0,c.XF)();return n?r="".concat(t,"/api/pipeline_schedules/").concat(null==e?void 0:e.id,"/api_trigger"):(r="".concat(t,"/api/pipeline_schedules/").concat(null==e?void 0:e.id,"/pipeline_runs"),null!=e&&e.token&&(r="".concat(r,"/").concat(e.token))),r}function _(e,n,r){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,r){var t=r.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===t?(t=r.length-1,i-=1):t-=1;else if(n>0)for(var l=0;l<n;l++)t===r.length-1?(t=0,i+=1):t+=1;var u="number"==typeof r[t]?r[t]:e;return{additionalOffset:i,cronValue:String(u)}}(+e,n,r)}var I=(0,d.m5)(60),k=(0,d.m5)(24),C=(0,u.Cs)();function S(e,n){if(!e)return e;var r=l()().local().format("Z"),t=r.split(":"),i="-"===r[0],o=3===t[0].length?Number(t[0].slice(1)):Number(t[0]),u=Number(t[1]);(i&&!n||!i&&n)&&(o=-o,u=-u);var a=e.split(" "),c=a[0],s=a[1],d=a[2],p=_(c,u,I),f=_(s,o+p.additionalOffset,k);if(a[0]=p.cronValue,a[1]=f.cronValue,0!==(null==f?void 0:f.additionalOffset)){var h=_(d,f.additionalOffset,C);a[2]=h.cronValue}return a.join(" ")}},38415:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return Ce}});var t=r(77837),i=r(75582),o=r(82394),l=r(38860),u=r.n(l),a=r(12691),c=r.n(a),s=r(82684),d=r(83455),p=r(34376),f=r(24138),h=r(15338),g=r(68562),v=r(48670),m=r(55072),x=r(75457),b=r(30229),j=r(93808),w=r(82359),y=r(71610),O=r(71180),Z=r(90299),P=r(55485),_=r(85854),I=r(37899),k=r(65956),C=r(38276),S=r(30160),E=r(44897),M=r(70515),T={uuid:"RUNTIME VARIABLES"},R={uuid:"BOOKMARK VALUES"},N=r(32080),B=r(8916),D=r(81728),A=r(28598);function V(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 U(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?V(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var F="".concat(M.iI,"px ").concat(3*M.iI,"px");var H=function(e){var n=e.initialPipelineSchedulePayload,r=e.onCancel,t=e.onSuccess,i=e.pipeline,l=e.variables,u=(0,s.useState)(null),a=u[0],c=u[1],d=(0,s.useState)(!0),p=d[0],f=d[1],g=(0,s.useState)(l||{}),v=g[0],m=g[1],x=(0,s.useState)(null),j=x[0],w=x[1],V=(0,s.useMemo)((function(){return U(U({},n),{},{name:(0,D.Y6)(),variables:p?(0,B.e7)(U(U({},v),a?(0,o.Z)({},b.PN,a):{})):null})}),[a,n,p,v]),H=(0,s.useMemo)((function(){return null!=i&&i.blocks?(0,N.nG)(i):null}),[i]),G=(0,s.useMemo)((function(){var e;return H&&(null===(e=Object.keys(H||{}))||void 0===e?void 0:e.length)>=1?[T,R]:null}),[H]);(0,s.useEffect)((function(){(null==G?void 0:G.length)>=1&&!j&&w(null==G?void 0:G[0])}),[j,w,G]);var L=(0,s.useMemo)((function(){return null!=G&&G.length?(0,A.jsx)(Z.Z,{onClickTab:function(e){w(e)},selectedTabUUID:null==j?void 0:j.uuid,tabs:G,underlineStyle:!0}):null}),[j,w,G]);return(0,A.jsxs)(k.Z,{noPadding:!0,footer:(0,A.jsxs)(P.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,A.jsx)(O.ZP,{onClick:function(){t({pipeline_schedule:V}),r()},padding:F,primaryAlternate:!0,children:"Run now"}),(0,A.jsx)(C.Z,{mr:1}),(0,A.jsx)(O.ZP,{borderColor:E.Z.background.page,onClick:r,padding:F,secondary:!0,children:"Cancel"})]}),header:(0,A.jsx)(_.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*M.iI,subtitle:(0,A.jsxs)(A.Fragment,{children:[!(null!=G&&G.length)&&(0,A.jsx)(C.Z,{p:M.cd,children:(0,A.jsx)(S.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(null==G?void 0:G.length)>=1&&L,(0,A.jsx)(h.Z,{light:!0})]}),children:[(!(null!=G&&G.length)||T.uuid===(null==j?void 0:j.uuid))&&(0,A.jsxs)(A.Fragment,{children:[(null==G?void 0:G.length)>=1&&(0,A.jsx)(C.Z,{p:M.cd,children:(0,A.jsx)(S.ZP,{default:!0,children:"Creates a new trigger and immediately runs the current pipeline once."})}),(0,A.jsx)(I.Z,{enableVariablesOverwrite:p,originalVariables:l,runtimeVariables:v,setEnableVariablesOverwrite:f,setRuntimeVariables:m})]}),R.uuid===(null==j?void 0:j.uuid)&&(0,A.jsx)(y.Z,{bookmarkValues:a,pipeline:i,setBookmarkValues:c})]})},G=r(97618),L=r(72473),Y=r(9518),X=r(42631),z=r(47041),q=r(91437),Q=Y.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-pu8csx-0"})([""," overflow-y:auto;position:relative;width:100%;z-index:3;border-radius:","px;"," "," "," ",""],z.w5,X.n_,(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.flex&&"\n flex: 1;\n "}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),W=Y.default.div.withConfig({displayName:"indexstyle__ColumnHeaderRowStyle",componentId:"sc-pu8csx-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;position:sticky;top:0;width:100%;z-index:2;"," "," ",""],X.n_,X.n_,(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).panel,";\n ")}),(function(e){return!e.noBorder&&"\n border: 1px solid ".concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),J=Y.default.div.withConfig({displayName:"indexstyle__ColumnHeaderCellStyle",componentId:"sc-pu8csx-2"})([""," ",""],(function(e){return!e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")})),K=Y.default.div.withConfig({displayName:"indexstyle__RowTitleStyle",componentId:"sc-pu8csx-3"})([""," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).header,";\n border: 1px solid ").concat((e.theme.interative||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")})),$=Y.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-pu8csx-4"})([""," "," "," ",""],(0,q.eR)(),(function(e){return"\n background-color: ".concat((e.theme.background||E.Z.background).page,";\n border-top: none;\n border-bottom: none;\n ")}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||E.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.finalRow&&!e.noBorderRadius&&"\n border-bottom-left-radius: ".concat(X.n_,"px;\n border-bottom-right-radius: ").concat(X.n_,"px;\n ")})),ee=Y.default.div.withConfig({displayName:"indexstyle__TextStyle",componentId:"sc-pu8csx-5"})(["p{cursor:pointer;}"]),ne=Y.default.div.withConfig({displayName:"indexstyle__RowCellStyle",componentId:"sc-pu8csx-6"})(["width:100%;z-index:0;"," "," "," "," ",""],(function(e){return!e.first&&"\n border-left: 1px solid ".concat((e.theme.background||E.Z.background).page,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*M.iI,"px;\n ")}),(function(e){return e.textColor&&"\n & p {\n color: ".concat(e.textColor,";\n }\n ")}),(function(e){return e.vanish&&"\n border: none;\n padding: 0 !important;\n width: 0% !important;\n height: 100% !important;\n background-color: ".concat((e.theme.background||E.Z.background).page," !important;\n ")})),re=r(35185);var te=function(e){var n,r=e.cellIndex,t=e.danger,i=e.flex,o=e.render,l=e.rowGroupIndex,u=e.rowIndex,a=e.selected,c=e.small,d=e.showBackground,p=e.showProgress,f=e.textColor,h=e.value,g=e.vanish,m=(0,s.useState)(!1),x=m[0],b=m[1],j=Array.isArray(h);return n=o?o(h):"function"==typeof h?h({selected:a}):j?(0,A.jsxs)(G.Z,{alignItems:"start",flexDirection:"row",justifyContent:"space-between",children:[(0,A.jsxs)(S.ZP,{small:c,textOverflow:!0,title:h[0],children:[x&&(0,A.jsx)(A.Fragment,{children:"".concat(h[0]," & ").concat(h.length-1," more")}),!x&&(0,A.jsx)(A.Fragment,{children:h.map((function(e){return(0,A.jsx)("div",{children:e},e)}))})]}),(0,A.jsxs)(v.Z,{onClick:function(){return b(!x)},children:[x&&(0,A.jsx)(L.ArrowDown,{muted:!0,size:2*M.iI}),!x&&(0,A.jsx)(L.ArrowRight,{muted:!0,size:2*M.iI})]})]}):p?(0,A.jsx)(P.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,children:(0,A.jsx)(re.Z,{danger:h<80,progress:h})}):(0,A.jsx)(S.ZP,{bold:t,danger:t,small:c,textOverflow:!0,title:h,children:h}),(0,A.jsx)(G.Z,{flex:i,textOverflow:!0,children:(0,A.jsx)(ne,{first:0===r,showBackground:d,small:c,textColor:f,vanish:g,children:!g&&(0,A.jsxs)(A.Fragment,{children:[n," "]})})},"cell-".concat(l,"-").concat(u,"-").concat(r,"-").concat(h))};var ie=function(e){var n=e.columnFlexNumbers,r=e.columnHeaders,t=e.height,i=e.isTextSelectionRequired,o=e.noBorder,l=e.noBorderRadius,u=e.onClickRow,a=e.onHoverRow,c=e.renderRowCellByIndex,d=e.rowGroupData,p=void 0===d?[]:d,f=e.selectedRowIndexes,h=e.small,g=e.flex,m=e.warnings,x=void 0===m?[]:m,b=(0,s.useMemo)((function(){return p.length}),[p]);return(0,A.jsxs)(Q,{flex:g,height:t,noBorder:o,noBorderRadius:l,noScrollbarTrackBackground:!0,children:[(0,A.jsx)(W,{noBorder:o,noBorderRadius:l,children:(0,A.jsx)(P.ZP,{alignItems:"center",children:r.map((function(e,r){var t=e.Icon,i=e.label;return(0,A.jsx)(G.Z,{flex:n[r],children:(0,A.jsx)(J,{first:0===r,small:h,children:(0,A.jsxs)(P.ZP,{alignItems:"center",children:[t&&(0,A.jsx)(L.Check,{}),t&&(0,A.jsx)(C.Z,{mr:1}),(0,A.jsx)(S.ZP,{bold:!0,children:i})]})})},i)}))})}),p&&p.map((function(e,r){var t,s=e.title,d=e.rowData,p=s||r,g=[];s&&(t=(0,A.jsx)(K,{small:h,children:(0,A.jsx)(S.ZP,{bold:!0,children:s})}));var m=null==d?void 0:d.length;return null==d||d.forEach((function(e,t){var s=e.columnTextColors,d=e.columnValues,j=e.danger,w=e.uuid,y=(null==f?void 0:f[0])===r&&(null==f?void 0:f[1])===t,O=[],Z=x.find((function(e){return e.name===d[0]})),_=Z&&(0,D.HD)(d[1])?(0,D.Tz)(d[1]):d[1],I=Z&&Z.compare(_,Z.val);null==d||d.forEach((function(e,i,o){var l=null==c?void 0:c[i],u=s?s[i]:void 0;Array.isArray(e)?O.push((0,A.jsx)(te,{cellIndex:i,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2==1,showProgress:e[0],small:h,textColor:u,value:e[1]},i)):void 0===e?(O.pop(),i=o.length+1,O.push((0,A.jsx)(te,{cellIndex:i,danger:j,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2==1,small:h,textColor:u,value:e,vanish:!0},i))):O.push((0,A.jsx)(te,{cellIndex:i,danger:I||j,flex:n[i],render:l,rowGroupIndex:r,rowIndex:t,selected:y,showBackground:t%2==1,small:h,textColor:u,value:e},i))}));var k=(0,A.jsx)(P.ZP,{textOverflow:!0,children:O});g.push((0,A.jsxs)($,{finalRow:b-1===r&&m-1===t,hasHover:!!a,noBorder:o,noBorderRadius:l,onMouseEnter:function(){return null==a?void 0:a({rowGroupIndex:r,rowIndex:t,uuid:w})},selected:y,children:[u&&(i?(0,A.jsx)(ee,{onClick:function(){return u({rowGroupIndex:r,rowIndex:t,uuid:w})},role:"cell",children:k}):(0,A.jsx)(v.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(){return u({rowGroupIndex:r,rowIndex:t,uuid:w})},preventDefault:!0,children:k})),!u&&k]},"row-group-".concat(p,"-row-").concat(t)))})),(0,A.jsxs)("div",{children:[t,g]},p)}))]})},oe=Y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["display:flex;flex-direction:column;height:","px;border-bottom:1px solid ",";"," "," ",""],(function(e){return e.height}),E.Z.borders.medium,(function(e){return e.includePadding&&"\n padding: ".concat(M.tr,"px;\n ")}),(function(e){return e.overflow&&"\n overflow: auto;\n "}),z.w5),le=r(79633);var ue=function(e){var n=e.height,r=e.scheduleType,t=e.variables,o=e.variablesOverride,l=[];Object.entries(t).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],t=n[1],u=null==o?void 0:o[r];l.push({uuid:r,value:(0,B.FS)(u||t)})})),(0,B.JZ)(l,r);var u=Object.keys(t).length;return(0,A.jsx)(oe,{height:n,children:t&&(0,A.jsx)(ie,{columnFlexNumbers:[1,1],columnHeaders:[{label:"Runtime variable (".concat(u,")")},{label:"Value"}],noBorderRadius:!0,rowGroupData:[{rowData:l.map((function(e){var n=e.uuid,r=e.value;return{columnTextColors:[le.Or,void 0],columnValues:[n,r],uuid:n}}))}],small:!0})})},ae=r(4190),ce=r(12717),se=r(85544),de=r(29624),pe=r(35686),fe=r(72191),he=r(28795),ge=r(81066),ve=r(24944),me=r(3917),xe=r(69419),be=r(16488),je=r(86735),we=r(42122),ye=r(50178),Oe=r(72619),Ze=r(70320),Pe=r(89538);function _e(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 Ie(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(r),!0).forEach((function(n){(0,o.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function ke(e){var n=e.pipeline,r=(0,p.useRouter)(),t=(0,ye.Ct)(null==r?void 0:r.basePath),l=n.uuid,u=pe.ZP.pipelines.detail(l,{includes_outputs:!1},{revalidateOnFocus:!1}).data,a=(0,s.useMemo)((function(){return(null==u?void 0:u.pipeline)||n}),[null==u?void 0:u.pipeline,n]),j=(0,s.useState)(null),y=j[0],O=j[1],Z=(0,s.useState)(null),P=Z[0],_=Z[1],I=(0,s.useState)(!1),k=I[0],E=I[1],M=pe.ZP.projects.list().data,T=(0,s.useMemo)((function(){var e;return null==M||null===(e=M.projects)||void 0===e?void 0:e[0]}),[M]),R=((0,s.useMemo)((function(){var e;return(0,Ze.hY)(null==T||null===(e=T.features)||void 0===e?void 0:e[w.d.LOCAL_TIMEZONE])}),[null==T?void 0:T.features]),pe.ZP.client_pages.detail("pipeline_schedule:create",{"pipelines[]":[l]},{},{key:"Triggers/Edit/".concat(l)}).data),N=(0,s.useMemo)((function(){return null==R?void 0:R.client_page}),[R]),V=(0,s.useMemo)((function(){var e,n;return null==N||null===(e=N.components)||void 0===e||null===(n=e.find((function(e){return"create_with_interactions_component"===e.uuid})))||void 0===n?void 0:n.enabled}),[N]),U=(0,s.useMemo)((function(){return null==N?void 0:N.disabled}),[N]),F=pe.ZP.variables.pipelines.list(l,{global_only:!0},{revalidateOnFocus:!1}).data,G=null==F?void 0:F.variables,Y=(0,xe.iV)(),X=(0,s.useMemo)((function(){return(0,xe.DQ)(Y,[b.gm.INTERVAL,b.gm.STATUS,b.gm.TAG,b.gm.TYPE])}),[Y]),z=(0,be.xH)(X),q=null!=Y&&Y.page?Y.page:0,Q=pe.ZP.pipeline_schedules.pipelines.list(l,Ie(Ie({},z),{},{_limit:m.Q,_offset:(null!=Y&&Y.page?Y.page:0)*m.Q}),{refreshInterval:7500}),W=Q.data,J=Q.mutate,K=(0,s.useMemo)((function(){return(null==W?void 0:W.pipeline_schedules)||[]}),[W]),$=function(e){return(0,d.Db)(pe.ZP.pipeline_schedules.pipelines.useCreate(l),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var r=n.pipeline_schedule.id;null==e||e(r)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}})},ee=$((function(e){return r.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null==a?void 0:a.uuid,"/triggers/").concat(e,"/edit"))})),ne=(0,i.Z)(ee,2),re=ne[0],te=ne[1].isLoading,ie=$(J),le=(0,i.Z)(ie,2),_e=le[0],ke=le[1].isLoading,Ce=(0,s.useMemo)((function(){return(0,B.Tt)(G)}),[G]),Se=(0,D.Y6)(),Ee=(0,s.useMemo)((function(){return{name:Se,schedule_interval:b.U5.ONCE,schedule_type:b.Xm.TIME,start_time:(0,me.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:b.fq.ACTIVE}}),[Se]),Me=(0,Pe.dd)((function(){return(0,A.jsx)(H,{initialPipelineSchedulePayload:Ee,onCancel:Ne,onSuccess:_e,pipeline:a,variables:Ce})}),{},[G,a,Ce],{background:!0,uuid:"run_pipeline_now_popup"}),Te=(0,i.Z)(Me,2),Re=Te[0],Ne=Te[1],Be=(0,s.useState)(),De=Be[0],Ae=Be[1],Ve=(0,s.useMemo)((function(){var e=null==De?void 0:De.variables,n=!(0,we.Qr)(Ce);return function(r){var i=80;if(n){var o=Object.keys(Ce).length;i=46+43*Math.min(5,o)+1}var u=r.height-i;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(f.ZP,Ie(Ie({},r),{},{enablePorts:!1,height:u,noStatus:!0})),n&&(0,A.jsx)(ue,{height:i+1,scheduleType:null==De?void 0:De.schedule_type,variables:Ce,variablesOverride:e}),!n&&(0,A.jsxs)(oe,{height:i+1,includePadding:!0,overflow:!0,children:[(0,A.jsx)(S.ZP,{children:"This pipeline has no runtime variables."}),!t&&(0,A.jsxs)(C.Z,{mt:1,children:[(0,A.jsx)(c(),{as:"/pipelines/".concat(l,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,A.jsx)(v.Z,{primary:!0,children:"Click here"})})," ",(0,A.jsx)(S.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]})]})}}),[t,l,null==De?void 0:De.schedule_type,null==De?void 0:De.variables,Ce]),Ue=(0,s.useMemo)((function(){var e;return(null==W||null===(e=W.metadata)||void 0===e?void 0:e.count)||[]}),[W]),Fe=pe.ZP.pipeline_triggers.pipelines.list(l).data,He=(0,s.useMemo)((function(){return(0,je.HK)((null==Fe?void 0:Fe.pipeline_triggers)||[],(function(e){return e.name}))}),[Fe]);(0,s.useEffect)((function(){var e=((null==Fe?void 0:Fe.pipeline_triggers)||[]).find((function(e){var n=e.settings;return null==n?void 0:n.invalid_schedule_interval}));_(e?{displayMessage:'Schedule interval for Trigger (in code) "'.concat(null==e?void 0:e.name,'"')+" is invalid. Please check your cron expression’s syntax in the pipeline’s triggers.yaml file."}:null)}),[null==Fe?void 0:Fe.pipeline_triggers]);var Ge=pe.ZP.tags.list().data,Le=(0,s.useMemo)((function(){return(0,je.YC)((null==Ge?void 0:Ge.tags)||[],(function(e){return e.uuid}))}),[Ge]),Ye=pe.ZP.pipeline_interactions.detail(V&&l,{filter_for_permissions:1}).data,Xe=pe.ZP.interactions.pipeline_interactions.list(V&&l).data,ze=pe.ZP.pipelines.detail(V&&l).data,qe=(0,s.useMemo)((function(){return(null==Ye?void 0:Ye.pipeline_interaction)||{}}),[Ye]),Qe=((0,s.useMemo)((function(){return(null==Xe?void 0:Xe.interactions)||[]}),[Xe]),(0,s.useMemo)((function(){var e;return V&&(null===(e=Object.keys((null==qe?void 0:qe.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[V,qe])),We=(0,s.useMemo)((function(){return Qe&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(C.Z,{ml:"12px"}),(0,A.jsx)(ve.lZ,{}),(0,A.jsx)(C.Z,{ml:"12px"}),(0,A.jsx)(g.ZP,Ie(Ie({},ge.B),{},{Icon:L.Interactions,inline:!0,onClick:function(){return E(!0)},uuid:"Create trigger with no-code",children:"Create trigger with no-code"}))]})}),[Qe,E]),Je=(0,s.useMemo)((function(){return(0,A.jsx)(se.Z,{addButtonProps:!U&&{isLoading:te,label:"New trigger",onClick:function(){return re({pipeline_schedule:{name:(0,D.Y6)()}})}},filterOptions:{frequency:Object.values(b.U5),status:Object.values(b.fq),tag:Le.map((function(e){return e.uuid})),type:Object.values(b.Xm)},filterValueLabelMapping:{status:Object.values(b.fq).reduce((function(e,n){return Ie(Ie({},e),{},(0,o.Z)({},n,(0,D.kC)(n)))}),{}),tag:Le.reduce((function(e,n){var r=n.uuid;return Ie(Ie({},e),{},(0,o.Z)({},r,r))}),{}),type:b.Z4},onClickFilterDefaults:function(){r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(l,"/triggers"))},query:X,resetPageOnFilterApply:!0,secondaryButtonProps:!U&&{beforeIcon:(0,A.jsx)(L.Once,{size:fe.bL}),disabled:t,isLoading:ke,label:"Run@once",onClick:Re,tooltip:"Creates an @once trigger and runs pipeline immediately"},showDivider:!U,children:We})}),[re,U,te,ke,t,We,l,r,Re,Le]),Ke=(0,s.useMemo)((function(){var e=[];return k?e.push.apply(e,[{label:function(){return"Triggers"},onClick:function(){return E(!1)}},{bold:!0,label:function(){return"New trigger"}}]):e.push({label:function(){return"Triggers"}}),e}),[k,E]);return k?(0,A.jsx)(ce.Z,{creatingWithLimitation:!0,errors:y,onCancel:function(){return E(!1)},pipeline:null==ze?void 0:ze.pipeline,setErrors:O,useCreateScheduleMutation:$}):(0,A.jsx)(x.Z,{breadcrumbs:Ke,buildSidekick:!k&&Ve,errors:y||P,pageName:he.M.TRIGGERS,pipeline:a,setErrors:O,subheader:!k&&Je,title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(he.M.TRIGGERS,"_").concat(l),children:!k&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h.Z,{light:!0}),W?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(de.Z,{fetchPipelineSchedules:J,includeCreatedAtColumn:!0,pipeline:a,pipelineSchedules:K,pipelineTriggersByName:He,selectedSchedule:De,setErrors:O,setSelectedSchedule:Ae}),(0,A.jsx)(C.Z,{p:2,children:(0,A.jsx)(m.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Ie(Ie({},Y),{},{page:n>=0?n:0});r.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(l,"/triggers?").concat((0,xe.uM)(t)))},page:Number(q),totalPages:Math.ceil(Ue/m.Q)})})]}):(0,A.jsx)(C.Z,{m:2,children:(0,A.jsx)(ae.Z,{inverted:!0,large:!0})})]})})}ke.getInitialProps=function(){var e=(0,t.Z)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ce=(0,j.Z)(ke)},40183:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return r(38415)}])}},function(e){e.O(0,[7849,2055,26,449,3782,5544,9624,2717,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return De}});var t=i(77837),u=i(75582),r=i(21831),l=i(82394),o=i(38860),c=i.n(o),s=i(12691),a=i.n(s),d=i(82684),p=i(83455),f=i(34376),v=i(52749),h=i(60523),m=i(71180),b=i(90299),g=i(31882),j=i(76111),Z=i(94629),C=i(97618),_=i(55485),x=i(68562),P=i(65956),I=i(38276),k=i(30160),T=i(35576),y=i(17488),w=i(28598);var S=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,u=e.minWidth,r=e.noEmptyValue,l=e.onClose,o=e.onSave,c=e.textArea,s=e.title,a=e.value,p=(0,d.useRef)(null),f=(0,d.useState)(a),v=f[0],h=f[1],b=c?T.Z:y.Z;return(0,d.useEffect)((function(){var e;null==p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,w.jsxs)(P.Z,{maxWidth:t,minWidth:u,children:[(0,w.jsx)(k.ZP,{bold:!0,children:s}),(0,w.jsx)(I.Z,{mt:1,children:(0,w.jsx)(b,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,w.jsx)(I.Z,{mt:2,children:(0,w.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,w.jsx)(I.Z,{mt:3,children:(0,w.jsxs)(_.ZP,{children:[(0,w.jsx)(x.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===a||r&&!v?l():o(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,w.jsx)(I.Z,{ml:1}),(0,w.jsx)(m.ZP,{onClick:l,children:"Cancel"})]})})]})},O=i(48670),E=i(55072),A=i(57653),D=i(55729),M=i(93808),R=i(82359),G=i(44085),$=i(4190),U=i(75499),L=i(48381),N=i(85544),B=i(70026),H=i(35686),F=i(44897),Y=i(77417),Q=i(42631),z=i(44425),V=i(72473),q=i(23780),W=i(8666),K=i(46684),X=i(53808),J="pipeline_list_filters",ee="pipeline_list_group_bys",ne="pipeline_list_sort_column_index",ie="pipeline_list_sort_direction",te="pipeline_list_selected_tab_uuid";function ue(e){return(0,X.t8)(J,e),e}function re(e){return(0,X.t8)(ee,e),e}var le=i(11498),oe=i(32929),ce=i(44898),se=i(70515),ae=i(30229),de=i(81655),pe=i(31608),fe=i(81728),ve=i(3917),he=i(72619),me=i(69419),be=i(65458),ge=i(15610),je=i(42122),Ze=i(95924),Ce=i(86735),_e=i(70320),xe=i(89538),Pe=i(44952);function Ie(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function ke(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ie(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Te={Icon:V.Schedule,label:function(){return"Recently viewed"},uuid:"recent"},ye={Icon:V.PipelineV3,label:function(e){return null!=e&&e.count?"All pipelines › ".concat((null==e?void 0:e.count)||0):"All pipelines"},uuid:"all"},we=[ye,Te],Se="tab",Oe=[A.$1.SEARCH],Ee={borderRadius:"".concat(Q.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Ae(){var e,n=(0,f.useRouter)(),i=(0,d.useRef)(null),t=(0,d.useRef)(null),o=(0,d.useRef)(null),c=(0,d.useRef)(null),s=(0,Y.Z)(),x=s.fetchProjects,T=s.project,y=(0,d.useState)(null),M=y[0],Q=y[1],Ie=(0,d.useState)(null),Ae=Ie[0],De=Ie[1],Me=(0,d.useState)(null),Re=Me[0],Ge=Me[1],$e=(0,d.useCallback)((function(e){Ge(e),clearTimeout(c.current),c.current=setTimeout((function(){var n;return(0,ge.u)((n={},(0,l.Z)(n,le.$D.OFFSET,0),(0,l.Z)(n,A.$1.SEARCH,e),n))}),500)}),[Ge]),Ue=(0,d.useState)({}),Le=Ue[0],Ne=Ue[1],Be=(0,d.useState)(null),He=Be[0],Fe=Be[1],Ye=(0,me.iV)(),Qe=ke({},(0,me.DQ)(Ye,[A.$1.SEARCH,A.$1.STATUS,A.$1.TAG,A.$1.TYPE].concat((0,r.Z)(le.RG)))),ze=(0,d.useMemo)((function(){return null==Ye?void 0:Ye[Se]}),[Ye]);(0,d.useEffect)((function(){var e;Q(null==i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Ye,i]);var Ve=(0,d.useMemo)((function(){var e;return(0,_e.hY)(null==T||null===(e=T.features)||void 0===e?void 0:e[R.d.LOCAL_TIMEZONE])}),[null==T?void 0:T.features]),qe=(0,d.useMemo)((function(){var e;return null==T||null===(e=T.features)||void 0===e?void 0:e[R.d.OPERATION_HISTORY]}),[T]),We=(0,d.useMemo)((function(){return Ve?de.O$:{}}),[Ve]),Ke=H.ZP.pipelines.list(ke(ke({},Qe),{},{include_schedules:1}),{revalidateOnFocus:!1}),Xe=Ke.data,Je=Ke.mutate,en=(0,d.useMemo)((function(){return(null==Ye?void 0:Ye[A.$1.HISTORY_DAYS])||7}),[Ye]),nn=H.ZP.pipelines.list(ke(ke({},Qe),{},(e={},(0,l.Z)(e,A.$1.HISTORY_DAYS,(0,fe.HW)(en)?Number(en):en),(0,l.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!qe||!ze||Te.uuid!==ze}),tn=nn.data,un=nn.mutate,rn=(0,d.useCallback)((function(e){return e}),[]),ln=(0,d.useMemo)((function(){var e=rn((null==Xe?void 0:Xe.pipelines)||[]);if(null!=Ye&&Ye[A.$1.TAG]){var n=Ye[A.$1.TAG];e=e.filter((function(e){var i=e.tags;return i.some((function(e){return n.includes(e)}))||0===i.length&&n.includes(A.$1.NO_TAGS)}))}return e}),[Xe,rn,Ye]),on=(0,d.useMemo)((function(){return rn((null==tn?void 0:tn.pipelines)||[])}),[tn,rn]),cn=(0,d.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),sn=null==Ye?void 0:Ye[de.lG.SORT_COL_IDX],an=null==Ye?void 0:Ye[de.lG.SORT_DIRECTION],dn=(0,d.useMemo)((function(){return sn?{columnIndex:+sn,sortDirection:an||de.sh.ASC}:void 0}),[sn,an]),pn=null==Ye?void 0:Ye[A.$1.GROUP],fn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return H.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){var n=e.data.download.token;(0,Pe.K)(n)},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}}),vn=(0,u.Z)(fn,1)[0];(0,d.useEffect)((function(){null!=Qe&&Qe[A.$1.SEARCH]&&null===Re&&Ge(null==Qe?void 0:Qe[A.$1.SEARCH])}),[Qe,Re,Ge]),(0,d.useEffect)((function(){var e,n={};if(!sn){var i=(0,X.U2)(ne,null),t=(0,X.U2)(ie,de.sh.ASC);null!==i&&(n[de.lG.SORT_COL_IDX]=i,n[de.lG.SORT_DIRECTION]=t)}qe&&(ze?(0,X.t8)(te,ze):n[Se]=(0,X.U2)(te,null==we||null===(e=we[0])||void 0===e?void 0:e.uuid));if(pn)re((0,l.Z)({},pn,!0));else{var r,o=(0,X.U2)(ee,{});o&&Object.entries(o).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];!r&&t&&(r=i)})),r&&(n[A.$1.GROUP]=r)}if((0,je.Qr)(Qe)){var c=(0,l.Z)({},le.$D.LIMIT,E.Q),s=(0,X.U2)(J,{});s&&Object.entries(s).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];null!=t&&(le.RG.includes(i)||Oe.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,u.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,je.Qr)(c)||(n={},Object.entries(ke(ke({},n),c)||{}).forEach((function(e){var i=(0,u.Z)(e,2),t=i[0],r=i[1];null!=r&&(n[t]=r)})))}else{var a={};Object.entries(Qe).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];a[i]={};var r,l=t;null!=t&&(le.RG.includes(i)||Oe.includes(i)?a[i]=l:(Array.isArray(l)||(l=[l]),l&&Array.isArray(l)&&(null===(r=l)||void 0===r||r.forEach((function(e){a[i][e]=!0})))))})),ue((0,je.hB)(a))}(0,je.Qr)(n)||(0,ge.u)((0,je.hB)(n),{pushHistory:!1})}),[pn,qe,Qe,ze,cn,sn,an]),(0,d.useEffect)((function(){(0,he.bB)(Xe,Fe)}),[Xe]);var hn=function(e){return(0,p.Db)(H.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,he.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null==e||e(i)},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}})},mn=hn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),bn=(0,u.Z)(mn,2),gn=bn[0],jn=bn[1].isLoading,Zn=hn((function(){null==Je||Je(),null==un||un()})),Cn=(0,u.Z)(Zn,2),_n=Cn[0],xn=Cn[1].isLoading,Pn=(0,p.Db)((function(e){return H.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},n,!1))})),Je(),null==un||un(),null==Un||Un(),De(null)},onErrorCallback:function(e,n){var i,t=null==e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},t,!1))})),Fe({errors:n,response:e})}})}}),In=(0,u.Z)(Pn,2),kn=In[0],Tn=In[1].isLoading,yn=(0,p.Db)((function(e){return H.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){null==Je||Je(),null==un||un()},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}}),wn=(0,u.Z)(yn,2),Sn=wn[0],On=wn[1].isLoading,En=(0,xe.dd)((function(e){var n=e.pipelineType;return(0,w.jsx)(j.Z,{onClose:Mn,onSave:function(e){var i=e.name,t=e.description,u=e.tags;gn({pipeline:{description:t,name:i,tags:u,type:n}})},pipelineType:n})}),{},[gn],{background:!0,disableEscape:!0,uuid:"overview/create_pipeline"}),An=(0,u.Z)(En,2),Dn=An[0],Mn=An[1],Rn=(0,xe.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,w.jsx)(S,{isLoading:Tn,minWidth:55*se.iI,noEmptyValue:!!t,onClose:Un,onSave:function(e){var i=n||Ae;if(i){var u=i.uuid,r={uuid:u};t?r.name=e:r.description=e,Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},u,!0))})),kn(r)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null==n?void 0:n.uuid),value:t||i})}),{},[Tn,Ae],{background:!0,uuid:"rename_pipeline_and_save"}),Gn=(0,u.Z)(Rn,2),$n=Gn[0],Un=Gn[1],Ln=(0,xe.dd)((function(){return(0,w.jsx)(B.Z,{fetchPipelines:Je,onCancel:Hn})}),{},[Je],{background:!0,uuid:"upload_pipeline"}),Nn=(0,u.Z)(Ln,2),Bn=Nn[0],Hn=Nn[1],Fn=(0,xe.dd)((function(){return(0,w.jsx)(q.BC,{children:(0,w.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){gn({pipeline:{custom_template_uuid:null==e?void 0:e.template_uuid,name:(0,fe.Y6)()}}).then((function(){zn()}))},showBreadcrumbs:!0,tabs:[oe.A2]})})}),{},[gn],{background:!0,uuid:"browse_templates"}),Yn=(0,u.Z)(Fn,2),Qn=Yn[0],zn=Yn[1],Vn=(0,xe.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,w.jsx)(q.BC,{children:(0,w.jsx)(D.Z,{cancelButtonText:n,contained:!0,header:(0,w.jsx)(I.Z,{mb:se.HN,children:(0,w.jsxs)(P.Z,{children:[(0,w.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,w.jsx)(I.Z,{mt:1,children:(0,w.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,w.jsx)(O.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI’s documentation"})," to get your API key."]})})]})}),onCancel:function(){null==i||i(),Kn()},onSaveSuccess:function(e){x(),Kn(),null==t||t(e)}})})}),{},[x],{background:!0,uuid:"configure_project"}),qn=(0,u.Z)(Vn,2),Wn=qn[0],Kn=qn[1],Xn=(0,xe.dd)((function(){return(0,w.jsx)(q.BC,{children:(0,w.jsx)(v.Z,{createPipeline:gn,isLoading:jn,onClose:ni})})}),{},[gn,jn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Jn=(0,u.Z)(Xn,2),ei=Jn[0],ni=Jn[1],ii=(0,d.useMemo)((function(){return(0,be.d)(gn,{showAIModal:function(){null!=T&&T.openai_api_key?ei():Wn({onSaveSuccess:function(){ei()}})},showBrowseTemplates:Qn,showCreatePipelineModal:Dn,showImportPipelineModal:Bn})}),[gn,T,ei,Qn,Wn,Dn,Bn]),ti=H.ZP.tags.list().data,ui=(0,d.useMemo)((function(){return(0,Ce.YC)((null==ti?void 0:ti.tags)||[],(function(e){return e.uuid}))}),[ti]),ri=(0,d.useMemo)((function(){return(0,w.jsx)(N.Z,{addButtonProps:{isLoading:jn,label:"New",menuItems:ii},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:On,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null==Ae?void 0:Ae.uuid,"?"))&&Sn(null==Ae?void 0:Ae.uuid)}},extraActionButtonProps:{Icon:V.Clone,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null==Ae?void 0:Ae.uuid,"?"),isLoading:xn,onClick:function(){return _n({pipeline:{clone_pipeline_uuid:null==Ae?void 0:Ae.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:A.kA,tag:[A.$1.NO_TAGS].concat((0,r.Z)(ui.map((function(e){return e.uuid})))),type:Object.values(A.qL)},filterValueLabelMapping:{status:A.kA.reduce((function(e,n){return ke(ke({},e),{},(0,l.Z)({},n,(0,fe.J3)((0,fe.kC)(n))))}),{}),tag:ke((0,l.Z)({},A.$1.NO_TAGS,"No tags"),ui.reduce((function(e,n){var i=n.uuid;return ke(ke({},e),{},(0,l.Z)({},i,i))}),{})),type:A.G7},groupButtonProps:{groupByLabel:pn,menuItems:[{beforeIcon:pn===A.r0.STATUS?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.STATUS)},onClick:function(){var e=pn===A.r0.STATUS?null:A.r0.STATUS;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:pn===A.r0.TAG?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.TAG)},onClick:function(){var e=pn===A.r0.TAG?null:A.r0.TAG;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:pn===A.r0.TYPE?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.TYPE)},onClick:function(){var e=pn===A.r0.TYPE?null:A.r0.TYPE;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return $n({pipelineName:null==Ae?void 0:Ae.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return $n({pipeline:Ae,pipelineDescription:null==Ae?void 0:Ae.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ue({}),Ge(""),null==Je||Je().then((function(){var e;(0,ge.u)((e={},(0,l.Z)(e,le.$D.LIMIT,(null==Qe?void 0:Qe[le.$D.LIMIT])||E.Q),(0,l.Z)(e,A.$1.SEARCH,""),e),{replaceParams:!0})}))},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!=e&&e.length)}))&&ue({})},query:Qe,resetLimitOnFilterApply:!0,searchProps:{onChange:$e,value:Re},selectedRowId:null==Ae?void 0:Ae.uuid,setSelectedRow:De})}),[_n,Sn,Je,pn,xn,jn,On,ii,Qe,Re,Ae,$e,$n,ui]),li=(0,d.useCallback)((function(e){var n={};null==e||e.forEach((function(e,i){var t=null==e?void 0:e[pn];if(A.r0.STATUS===pn){var u=(e||{}).schedules,r=void 0===u?[]:u,l=r.length;t=r.find((function(e){var n=e.status;return ae.fq.ACTIVE===n}))?A.QK.ACTIVE:l>=1?A.QK.INACTIVE:A.QK.NO_SCHEDULES}else if(A.r0.TAG===pn){t=(null==e?void 0:e.tags)?(0,Ce.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];A.r0.STATUS===pn?Object.values(A.QK).forEach((function(e){i.push(n[e]),t.push((0,fe.vg)(e))})):A.r0.TAG===pn?(0,Ce.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,w.jsx)(g.Z,{small:!0,children:(0,w.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):A.r0.TYPE===pn&&Object.values(A.qL).forEach((function(e){i.push(n[e]),t.push(A.G7[e])}));var u=[],r=[];return null==i||i.forEach((function(e,n){null!=e&&(null==e?void 0:e.length)>=1&&(r.push(e),u.push(null==t?void 0:t[n]))})),{rowGroupHeaders:u,rowsGroupedByIndex:r}}),[pn]),oi=(0,d.useMemo)((function(){return li(ln)}),[li,ln]),ci=oi.rowGroupHeaders,si=oi.rowsGroupedByIndex,ai=(0,d.useMemo)((function(){return li(on)}),[li,on]),di=ai.rowGroupHeaders,pi=ai.rowsGroupedByIndex,fi=(0,d.useCallback)((function(e,i,u){return(0,w.jsx)(U.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,fe.kC)(A.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,fe.kC)(A.r0.TYPE)},ke(ke({},We),{},{uuid:"Updated at"}),ke(ke({},We),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],isSelectedRow:function(n){var i;return(null===(i=e[n])||void 0===i?void 0:i.uuid)===(null==Ae?void 0:Ae.uuid)},localStorageKeySortColIdx:ne,localStorageKeySortDirection:ie,onClickRow:function(n){return De((function(i){var t=e[n];return(null==i?void 0:i.uuid)!==(null==t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(i){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e[i].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(i){var t=e[i];return[{label:function(){return"Edit description"},onClick:function(){return $n({pipeline:t,pipelineDescription:null==t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return $n({pipeline:t,pipelineName:null==t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return _n({pipeline:{clone_pipeline_uuid:null==t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){vn({filesOnly:!1,pipelineUUID:null==t?void 0:t.uuid})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){vn({filesOnly:!0,pipelineUUID:null==t?void 0:t.uuid})},uuid:"download_without_folder_structure"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null==t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(ce.R,"&new=1&pipeline_uuid=").concat(null==t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(W.b.PIPELINE,"&new=1&object_uuid=").concat(null==t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null==t?void 0:t.uuid,"?"))&&Sn(null==t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*se.iI,rowGroupHeaders:i,rows:null==e?void 0:e.map((function(e,i){var t=e.blocks,u=e.created_at,r=e.description,o=e.schedules,c=e.tags,s=e.type,d=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return z.tf.SCRATCHPAD!==n})).length,v=o.length,h=o.find((function(e){var n=e.status;return ae.fq.ACTIVE===n})),b=s===A.ad,g=(0,w.jsx)("div",{children:(0,w.jsx)(L.Z,{tags:null==c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Le[p]?(0,w.jsx)(m.ZP,{iconOnly:!0,loading:!!Le[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,Ze.j)(n),Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},p,!0))})),kn(ke(ke({},e),{},{status:h?ae.fq.INACTIVE:ae.fq.ACTIVE}))},children:h?(0,w.jsx)(V.Pause,{muted:!0,size:2*se.iI}):(0,w.jsx)(V.PlayButtonFilled,{default:!0,size:2*se.iI})}):null,(0,w.jsx)(k.ZP,{default:!h,monospace:!0,success:!!h,children:h?ae.fq.ACTIVE:v>=1?ae.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,w.jsx)(a(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,w.jsx)(O.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,w.jsx)(k.ZP,{default:!0,preWrap:!0,title:r,children:r},"pipeline_description_".concat(i)),(0,w.jsx)(k.ZP,{bold:b,danger:b,children:b?(0,fe.kC)(A.ad):A.G7[s]},"pipeline_type_".concat(i)),(0,w.jsx)(k.ZP,{monospace:!0,small:!0,title:d?(0,ve._6)(d):null,children:d?(0,ve.XG)((0,ve.d$)(d,{includeSeconds:!0,utcFormat:!0}),Ve):(0,w.jsx)(w.Fragment,{children:"—"})},"pipeline_updated_at_".concat(i)),(0,w.jsx)(k.ZP,{monospace:!0,small:!0,title:u?(0,ve._6)(u):null,children:u?(0,ve.XG)(u.slice(0,19),Ve):(0,w.jsx)(w.Fragment,{children:"—"})},"pipeline_created_at_".concat(i)),g,(0,w.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,w.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,w.jsxs)(C.Z,{flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){vn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,w.jsx)(V.Save,{default:!0,size:2*se.iI})})),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,w.jsx)(V.Open,{default:!0,size:2*se.iI})})),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,w.jsx)(V.File,{default:!0,size:2*se.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:u,sortableColumnIndexes:cn,sortedColumn:dn,stickyHeader:!0,uuid:"pipelines_table"})}),[_n,Sn,vn,Ve,Le,n,Ae,Ne,De,$n,cn,dn,We,kn]),vi=(0,d.useMemo)((function(){return fi(ln,ci,si)}),[ln,fi,ci,si]),hi=(0,d.useMemo)((function(){return fi(on,di,pi)}),[on,fi,di,pi]),mi=(0,d.useMemo)((function(){return(null==ln?void 0:ln.length)||0}),[ln]),bi=(0,d.useMemo)((function(){return(null==on?void 0:on.length)||0}),[on]),gi=(0,d.useMemo)((function(){return(!qe||ye.uuid===ze)&&!mi||qe&&Te.uuid===ze&&!bi}),[qe,mi,bi,ze]),ji=(0,d.useMemo)((function(){var e=null==Qe?void 0:Qe[le.$D.LIMIT];return(0,w.jsxs)(_.ZP,{alignItems:"center",children:[(0,w.jsx)(k.ZP,{muted:!0,small:!0,children:"Per page"}),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsxs)(G.Z,{compact:!0,onChange:function(e){var n;return(0,ge.u)((n={},(0,l.Z)(n,le.$D.LIMIT,e.target.value),(0,l.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*E.Q||e%E.Q)&&(0,w.jsx)("option",{value:e,children:e}),(0,Ce.w6)(5).map((function(e,n){var i=(n+1)*E.Q;return(0,w.jsx)("option",{value:i,children:i},i)}))]})]})}),[Qe]),Zi=(0,d.useMemo)((function(){var e,n,i=Xe;qe&&Te.uuid===ze&&(i=tn);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,u=(null==Qe?void 0:Qe[le.$D.LIMIT])||E.Q,r=(null==Qe?void 0:Qe[le.$D.OFFSET])||0,o=Math.ceil(t/u);return(0,w.jsx)(I.Z,{p:se.cd,children:(0,w.jsx)(E.ZP,{maxPages:E.Et,onUpdate:function(e){var n=Number(e);(0,ge.u)((0,l.Z)({},le.$D.OFFSET,n*u))},page:Math.floor(r/u),totalPages:o})})}),[Xe,tn,qe,Qe,ze]);return(0,w.jsxs)(Z.Z,{errors:He,setErrors:Fe,subheaderChildren:(0,w.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[ri,ji]}),title:"Pipelines",uuid:"pipelines/index",children:[qe&&(0,w.jsx)(I.Z,{px:se.cd,ref:i,children:(0,w.jsx)(b.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,ge.u)((n={},(0,l.Z)(n,Se,i),(0,l.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:ze,tabs:we.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null==Xe||null===(e=Xe.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),gi?(0,w.jsx)(I.Z,{p:se.Mq,children:Xe?(0,w.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,w.jsx)($.Z,{inverted:!0,large:!0})}):null,(0,w.jsxs)(pe.cl,{hide:gi,includePadding:!!pn,maxHeight:"calc(100vh - ".concat(K.Mz+74+(M||44)+68,"px)"),children:[(!qe||ye.uuid===ze)&&vi,qe&&Te.uuid===ze&&hi]}),(0,w.jsx)("div",{ref:o,children:Zi})]})}Ae.getInitialProps=(0,t.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var De=(0,M.Z)(Ae)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])},80022:function(e,n,i){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(n,{Z:function(){return t}})},15544:function(e,n,i){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}i.d(n,{Z:function(){return t}})},13692:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(61049);function u(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,t.Z)(e,n)}},93189:function(e,n,i){"use strict";i.d(n,{Z:function(){return r}});var t=i(12539),u=i(80022);function r(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[1557,4241,5544,523,3548,5627,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return De}});var t=i(77837),u=i(75582),r=i(21831),l=i(82394),o=i(38860),c=i.n(o),s=i(12691),a=i.n(s),d=i(82684),p=i(83455),f=i(34376),v=i(52749),h=i(60523),m=i(71180),b=i(90299),g=i(31882),j=i(76111),Z=i(94629),C=i(97618),_=i(55485),x=i(68562),P=i(65956),I=i(38276),k=i(30160),T=i(35576),y=i(17488),w=i(28598);var S=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,u=e.minWidth,r=e.noEmptyValue,l=e.onClose,o=e.onSave,c=e.textArea,s=e.title,a=e.value,p=(0,d.useRef)(null),f=(0,d.useState)(a),v=f[0],h=f[1],b=c?T.Z:y.Z;return(0,d.useEffect)((function(){var e;null==p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,w.jsxs)(P.Z,{maxWidth:t,minWidth:u,children:[(0,w.jsx)(k.ZP,{bold:!0,children:s}),(0,w.jsx)(I.Z,{mt:1,children:(0,w.jsx)(b,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,w.jsx)(I.Z,{mt:2,children:(0,w.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,w.jsx)(I.Z,{mt:3,children:(0,w.jsxs)(_.ZP,{children:[(0,w.jsx)(x.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===a||r&&!v?l():o(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,w.jsx)(I.Z,{ml:1}),(0,w.jsx)(m.ZP,{onClick:l,children:"Cancel"})]})})]})},O=i(48670),E=i(55072),A=i(57653),D=i(55729),M=i(93808),R=i(82359),G=i(44085),$=i(4190),U=i(75499),L=i(48381),N=i(85544),B=i(70026),H=i(35686),F=i(44897),Y=i(77417),Q=i(42631),z=i(44425),V=i(72473),q=i(23780),W=i(8666),K=i(46684),X=i(53808),J="pipeline_list_filters",ee="pipeline_list_group_bys",ne="pipeline_list_sort_column_index",ie="pipeline_list_sort_direction",te="pipeline_list_selected_tab_uuid";function ue(e){return(0,X.t8)(J,e),e}function re(e){return(0,X.t8)(ee,e),e}var le=i(11498),oe=i(32929),ce=i(44898),se=i(70515),ae=i(30229),de=i(81655),pe=i(31608),fe=i(81728),ve=i(3917),he=i(72619),me=i(69419),be=i(65458),ge=i(15610),je=i(42122),Ze=i(95924),Ce=i(86735),_e=i(70320),xe=i(89538),Pe=i(44952);function Ie(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function ke(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ie(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Te={Icon:V.Schedule,label:function(){return"Recently viewed"},uuid:"recent"},ye={Icon:V.PipelineV3,label:function(e){return null!=e&&e.count?"All pipelines › ".concat((null==e?void 0:e.count)||0):"All pipelines"},uuid:"all"},we=[ye,Te],Se="tab",Oe=[A.$1.SEARCH],Ee={borderRadius:"".concat(Q.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Ae(){var e,n=(0,f.useRouter)(),i=(0,d.useRef)(null),t=(0,d.useRef)(null),o=(0,d.useRef)(null),c=(0,d.useRef)(null),s=(0,Y.Z)(),x=s.fetchProjects,T=s.project,y=(0,d.useState)(null),M=y[0],Q=y[1],Ie=(0,d.useState)(null),Ae=Ie[0],De=Ie[1],Me=(0,d.useState)(null),Re=Me[0],Ge=Me[1],$e=(0,d.useCallback)((function(e){Ge(e),clearTimeout(c.current),c.current=setTimeout((function(){var n;return(0,ge.u)((n={},(0,l.Z)(n,le.$D.OFFSET,0),(0,l.Z)(n,A.$1.SEARCH,e),n))}),500)}),[Ge]),Ue=(0,d.useState)({}),Le=Ue[0],Ne=Ue[1],Be=(0,d.useState)(null),He=Be[0],Fe=Be[1],Ye=(0,me.iV)(),Qe=ke({},(0,me.DQ)(Ye,[A.$1.SEARCH,A.$1.STATUS,A.$1.TAG,A.$1.TYPE].concat((0,r.Z)(le.RG)))),ze=(0,d.useMemo)((function(){return null==Ye?void 0:Ye[Se]}),[Ye]);(0,d.useEffect)((function(){var e;Q(null==i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Ye,i]);var Ve=(0,d.useMemo)((function(){var e;return(0,_e.hY)(null==T||null===(e=T.features)||void 0===e?void 0:e[R.d.LOCAL_TIMEZONE])}),[null==T?void 0:T.features]),qe=(0,d.useMemo)((function(){var e;return null==T||null===(e=T.features)||void 0===e?void 0:e[R.d.OPERATION_HISTORY]}),[T]),We=(0,d.useMemo)((function(){return Ve?de.O$:{}}),[Ve]),Ke=H.ZP.pipelines.list(ke(ke({},Qe),{},{include_schedules:1}),{revalidateOnFocus:!1}),Xe=Ke.data,Je=Ke.mutate,en=(0,d.useMemo)((function(){return(null==Ye?void 0:Ye[A.$1.HISTORY_DAYS])||7}),[Ye]),nn=H.ZP.pipelines.list(ke(ke({},Qe),{},(e={},(0,l.Z)(e,A.$1.HISTORY_DAYS,(0,fe.HW)(en)?Number(en):en),(0,l.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!qe||!ze||Te.uuid!==ze}),tn=nn.data,un=nn.mutate,rn=(0,d.useCallback)((function(e){return e}),[]),ln=(0,d.useMemo)((function(){var e=rn((null==Xe?void 0:Xe.pipelines)||[]);if(null!=Ye&&Ye[A.$1.TAG]){var n=Ye[A.$1.TAG];e=e.filter((function(e){var i=e.tags;return i.some((function(e){return n.includes(e)}))||0===i.length&&n.includes(A.$1.NO_TAGS)}))}return e}),[Xe,rn,Ye]),on=(0,d.useMemo)((function(){return rn((null==tn?void 0:tn.pipelines)||[])}),[tn,rn]),cn=(0,d.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),sn=null==Ye?void 0:Ye[de.lG.SORT_COL_IDX],an=null==Ye?void 0:Ye[de.lG.SORT_DIRECTION],dn=(0,d.useMemo)((function(){return sn?{columnIndex:+sn,sortDirection:an||de.sh.ASC}:void 0}),[sn,an]),pn=null==Ye?void 0:Ye[A.$1.GROUP],fn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return H.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){var n=e.data.download.token;(0,Pe.K)(n)},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}}),vn=(0,u.Z)(fn,1)[0];(0,d.useEffect)((function(){null!=Qe&&Qe[A.$1.SEARCH]&&null===Re&&Ge(null==Qe?void 0:Qe[A.$1.SEARCH])}),[Qe,Re,Ge]),(0,d.useEffect)((function(){var e,n={};if(!sn){var i=(0,X.U2)(ne,null),t=(0,X.U2)(ie,de.sh.ASC);null!==i&&(n[de.lG.SORT_COL_IDX]=i,n[de.lG.SORT_DIRECTION]=t)}qe&&(ze?(0,X.t8)(te,ze):n[Se]=(0,X.U2)(te,null==we||null===(e=we[0])||void 0===e?void 0:e.uuid));if(pn)re((0,l.Z)({},pn,!0));else{var r,o=(0,X.U2)(ee,{});o&&Object.entries(o).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];!r&&t&&(r=i)})),r&&(n[A.$1.GROUP]=r)}if((0,je.Qr)(Qe)){var c=(0,l.Z)({},le.$D.LIMIT,E.Q),s=(0,X.U2)(J,{});s&&Object.entries(s).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];null!=t&&(le.RG.includes(i)||Oe.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,u.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,je.Qr)(c)||(n={},Object.entries(ke(ke({},n),c)||{}).forEach((function(e){var i=(0,u.Z)(e,2),t=i[0],r=i[1];null!=r&&(n[t]=r)})))}else{var a={};Object.entries(Qe).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];a[i]={};var r,l=t;null!=t&&(le.RG.includes(i)||Oe.includes(i)?a[i]=l:(Array.isArray(l)||(l=[l]),l&&Array.isArray(l)&&(null===(r=l)||void 0===r||r.forEach((function(e){a[i][e]=!0})))))})),ue((0,je.hB)(a))}(0,je.Qr)(n)||(0,ge.u)((0,je.hB)(n),{pushHistory:!1})}),[pn,qe,Qe,ze,cn,sn,an]),(0,d.useEffect)((function(){(0,he.bB)(Xe,Fe)}),[Xe]);var hn=function(e){return(0,p.Db)(H.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,he.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null==e||e(i)},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}})},mn=hn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),bn=(0,u.Z)(mn,2),gn=bn[0],jn=bn[1].isLoading,Zn=hn((function(){null==Je||Je(),null==un||un()})),Cn=(0,u.Z)(Zn,2),_n=Cn[0],xn=Cn[1].isLoading,Pn=(0,p.Db)((function(e){return H.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},n,!1))})),Je(),null==un||un(),null==Un||Un(),De(null)},onErrorCallback:function(e,n){var i,t=null==e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},t,!1))})),Fe({errors:n,response:e})}})}}),In=(0,u.Z)(Pn,2),kn=In[0],Tn=In[1].isLoading,yn=(0,p.Db)((function(e){return H.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){null==Je||Je(),null==un||un()},onErrorCallback:function(e,n){return Fe({errors:n,response:e})}})}}),wn=(0,u.Z)(yn,2),Sn=wn[0],On=wn[1].isLoading,En=(0,xe.dd)((function(e){var n=e.pipelineType;return(0,w.jsx)(j.Z,{onClose:Mn,onSave:function(e){var i=e.name,t=e.description,u=e.tags;gn({pipeline:{description:t,name:i,tags:u,type:n}})},pipelineType:n})}),{},[gn],{background:!0,disableEscape:!0,uuid:"overview/create_pipeline"}),An=(0,u.Z)(En,2),Dn=An[0],Mn=An[1],Rn=(0,xe.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,w.jsx)(S,{isLoading:Tn,minWidth:55*se.iI,noEmptyValue:!!t,onClose:Un,onSave:function(e){var i=n||Ae;if(i){var u=i.uuid,r={uuid:u};t?r.name=e:r.description=e,Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},u,!0))})),kn(r)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null==n?void 0:n.uuid),value:t||i})}),{},[Tn,Ae],{background:!0,uuid:"rename_pipeline_and_save"}),Gn=(0,u.Z)(Rn,2),$n=Gn[0],Un=Gn[1],Ln=(0,xe.dd)((function(){return(0,w.jsx)(B.Z,{fetchPipelines:Je,onCancel:Hn})}),{},[Je],{background:!0,uuid:"upload_pipeline"}),Nn=(0,u.Z)(Ln,2),Bn=Nn[0],Hn=Nn[1],Fn=(0,xe.dd)((function(){return(0,w.jsx)(q.BC,{children:(0,w.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){gn({pipeline:{custom_template_uuid:null==e?void 0:e.template_uuid,name:(0,fe.Y6)()}}).then((function(){zn()}))},showBreadcrumbs:!0,tabs:[oe.A2]})})}),{},[gn],{background:!0,uuid:"browse_templates"}),Yn=(0,u.Z)(Fn,2),Qn=Yn[0],zn=Yn[1],Vn=(0,xe.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,w.jsx)(q.BC,{children:(0,w.jsx)(D.Z,{cancelButtonText:n,contained:!0,header:(0,w.jsx)(I.Z,{mb:se.HN,children:(0,w.jsxs)(P.Z,{children:[(0,w.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,w.jsx)(I.Z,{mt:1,children:(0,w.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,w.jsx)(O.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI’s documentation"})," to get your API key."]})})]})}),onCancel:function(){null==i||i(),Kn()},onSaveSuccess:function(e){x(),Kn(),null==t||t(e)}})})}),{},[x],{background:!0,uuid:"configure_project"}),qn=(0,u.Z)(Vn,2),Wn=qn[0],Kn=qn[1],Xn=(0,xe.dd)((function(){return(0,w.jsx)(q.BC,{children:(0,w.jsx)(v.Z,{createPipeline:gn,isLoading:jn,onClose:ni})})}),{},[gn,jn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Jn=(0,u.Z)(Xn,2),ei=Jn[0],ni=Jn[1],ii=(0,d.useMemo)((function(){return(0,be.d)(gn,{showAIModal:function(){null!=T&&T.openai_api_key?ei():Wn({onSaveSuccess:function(){ei()}})},showBrowseTemplates:Qn,showCreatePipelineModal:Dn,showImportPipelineModal:Bn})}),[gn,T,ei,Qn,Wn,Dn,Bn]),ti=H.ZP.tags.list().data,ui=(0,d.useMemo)((function(){return(0,Ce.YC)((null==ti?void 0:ti.tags)||[],(function(e){return e.uuid}))}),[ti]),ri=(0,d.useMemo)((function(){return(0,w.jsx)(N.Z,{addButtonProps:{isLoading:jn,label:"New",menuItems:ii},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:On,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null==Ae?void 0:Ae.uuid,"?"))&&Sn(null==Ae?void 0:Ae.uuid)}},extraActionButtonProps:{Icon:V.Clone,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null==Ae?void 0:Ae.uuid,"?"),isLoading:xn,onClick:function(){return _n({pipeline:{clone_pipeline_uuid:null==Ae?void 0:Ae.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:A.kA,tag:[A.$1.NO_TAGS].concat((0,r.Z)(ui.map((function(e){return e.uuid})))),type:Object.values(A.qL)},filterValueLabelMapping:{status:A.kA.reduce((function(e,n){return ke(ke({},e),{},(0,l.Z)({},n,(0,fe.J3)((0,fe.kC)(n))))}),{}),tag:ke((0,l.Z)({},A.$1.NO_TAGS,"No tags"),ui.reduce((function(e,n){var i=n.uuid;return ke(ke({},e),{},(0,l.Z)({},i,i))}),{})),type:A.G7},groupButtonProps:{groupByLabel:pn,menuItems:[{beforeIcon:pn===A.r0.STATUS?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.STATUS)},onClick:function(){var e=pn===A.r0.STATUS?null:A.r0.STATUS;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:pn===A.r0.TAG?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.TAG)},onClick:function(){var e=pn===A.r0.TAG?null:A.r0.TAG;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:pn===A.r0.TYPE?(0,w.jsx)(V.Check,{fill:F.Z.content.default,size:1.5*se.iI}):(0,w.jsx)(V.Circle,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(A.r0.TYPE)},onClick:function(){var e=pn===A.r0.TYPE?null:A.r0.TYPE;e||re({}),(0,ge.u)((0,l.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return $n({pipelineName:null==Ae?void 0:Ae.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return $n({pipeline:Ae,pipelineDescription:null==Ae?void 0:Ae.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ue({}),Ge(""),null==Je||Je().then((function(){var e;(0,ge.u)((e={},(0,l.Z)(e,le.$D.LIMIT,(null==Qe?void 0:Qe[le.$D.LIMIT])||E.Q),(0,l.Z)(e,A.$1.SEARCH,""),e),{replaceParams:!0})}))},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!=e&&e.length)}))&&ue({})},query:Qe,resetLimitOnFilterApply:!0,searchProps:{onChange:$e,value:Re},selectedRowId:null==Ae?void 0:Ae.uuid,setSelectedRow:De})}),[_n,Sn,Je,pn,xn,jn,On,ii,Qe,Re,Ae,$e,$n,ui]),li=(0,d.useCallback)((function(e){var n={};null==e||e.forEach((function(e,i){var t=null==e?void 0:e[pn];if(A.r0.STATUS===pn){var u=(e||{}).schedules,r=void 0===u?[]:u,l=r.length;t=r.find((function(e){var n=e.status;return ae.fq.ACTIVE===n}))?A.QK.ACTIVE:l>=1?A.QK.INACTIVE:A.QK.NO_SCHEDULES}else if(A.r0.TAG===pn){t=(null==e?void 0:e.tags)?(0,Ce.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];A.r0.STATUS===pn?Object.values(A.QK).forEach((function(e){i.push(n[e]),t.push((0,fe.vg)(e))})):A.r0.TAG===pn?(0,Ce.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,w.jsx)(g.Z,{small:!0,children:(0,w.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):A.r0.TYPE===pn&&Object.values(A.qL).forEach((function(e){i.push(n[e]),t.push(A.G7[e])}));var u=[],r=[];return null==i||i.forEach((function(e,n){null!=e&&(null==e?void 0:e.length)>=1&&(r.push(e),u.push(null==t?void 0:t[n]))})),{rowGroupHeaders:u,rowsGroupedByIndex:r}}),[pn]),oi=(0,d.useMemo)((function(){return li(ln)}),[li,ln]),ci=oi.rowGroupHeaders,si=oi.rowsGroupedByIndex,ai=(0,d.useMemo)((function(){return li(on)}),[li,on]),di=ai.rowGroupHeaders,pi=ai.rowsGroupedByIndex,fi=(0,d.useCallback)((function(e,i,u){return(0,w.jsx)(U.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,fe.kC)(A.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,fe.kC)(A.r0.TYPE)},ke(ke({},We),{},{uuid:"Updated at"}),ke(ke({},We),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],isSelectedRow:function(n){var i;return(null===(i=e[n])||void 0===i?void 0:i.uuid)===(null==Ae?void 0:Ae.uuid)},localStorageKeySortColIdx:ne,localStorageKeySortDirection:ie,onClickRow:function(n){return De((function(i){var t=e[n];return(null==i?void 0:i.uuid)!==(null==t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(i){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e[i].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(i){var t=e[i];return[{label:function(){return"Edit description"},onClick:function(){return $n({pipeline:t,pipelineDescription:null==t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return $n({pipeline:t,pipelineName:null==t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return _n({pipeline:{clone_pipeline_uuid:null==t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){vn({filesOnly:!1,pipelineUUID:null==t?void 0:t.uuid})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){vn({filesOnly:!0,pipelineUUID:null==t?void 0:t.uuid})},uuid:"download_without_folder_structure"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null==t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(ce.R,"&new=1&pipeline_uuid=").concat(null==t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(W.b.PIPELINE,"&new=1&object_uuid=").concat(null==t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null==t?void 0:t.uuid,"?"))&&Sn(null==t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*se.iI,rowGroupHeaders:i,rows:null==e?void 0:e.map((function(e,i){var t=e.blocks,u=e.created_at,r=e.description,o=e.schedules,c=e.tags,s=e.type,d=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return z.tf.SCRATCHPAD!==n})).length,v=o.length,h=o.find((function(e){var n=e.status;return ae.fq.ACTIVE===n})),b=s===A.ad,g=(0,w.jsx)("div",{children:(0,w.jsx)(L.Z,{tags:null==c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Le[p]?(0,w.jsx)(m.ZP,{iconOnly:!0,loading:!!Le[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,Ze.j)(n),Ne((function(e){return ke(ke({},e),{},(0,l.Z)({},p,!0))})),kn(ke(ke({},e),{},{status:h?ae.fq.INACTIVE:ae.fq.ACTIVE}))},children:h?(0,w.jsx)(V.Pause,{muted:!0,size:2*se.iI}):(0,w.jsx)(V.PlayButtonFilled,{default:!0,size:2*se.iI})}):null,(0,w.jsx)(k.ZP,{default:!h,monospace:!0,success:!!h,children:h?ae.fq.ACTIVE:v>=1?ae.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,w.jsx)(a(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,w.jsx)(O.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,w.jsx)(k.ZP,{default:!0,preWrap:!0,title:r,children:r},"pipeline_description_".concat(i)),(0,w.jsx)(k.ZP,{bold:b,danger:b,children:b?(0,fe.kC)(A.ad):A.G7[s]},"pipeline_type_".concat(i)),(0,w.jsx)(k.ZP,{monospace:!0,small:!0,title:d?(0,ve._6)(d):null,children:d?(0,ve.XG)((0,ve.d$)(d,{includeSeconds:!0,utcFormat:!0}),Ve):(0,w.jsx)(w.Fragment,{children:"—"})},"pipeline_updated_at_".concat(i)),(0,w.jsx)(k.ZP,{monospace:!0,small:!0,title:u?(0,ve._6)(u):null,children:u?(0,ve.XG)(u.slice(0,19),Ve):(0,w.jsx)(w.Fragment,{children:"—"})},"pipeline_created_at_".concat(i)),g,(0,w.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,w.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,w.jsxs)(C.Z,{flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){vn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,w.jsx)(V.Save,{default:!0,size:2*se.iI})})),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,w.jsx)(V.Open,{default:!0,size:2*se.iI})})),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsx)(m.ZP,ke(ke({},Ee),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,w.jsx)(V.File,{default:!0,size:2*se.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:u,sortableColumnIndexes:cn,sortedColumn:dn,stickyHeader:!0,uuid:"pipelines_table"})}),[_n,Sn,vn,Ve,Le,n,Ae,Ne,De,$n,cn,dn,We,kn]),vi=(0,d.useMemo)((function(){return fi(ln,ci,si)}),[ln,fi,ci,si]),hi=(0,d.useMemo)((function(){return fi(on,di,pi)}),[on,fi,di,pi]),mi=(0,d.useMemo)((function(){return(null==ln?void 0:ln.length)||0}),[ln]),bi=(0,d.useMemo)((function(){return(null==on?void 0:on.length)||0}),[on]),gi=(0,d.useMemo)((function(){return(!qe||ye.uuid===ze)&&!mi||qe&&Te.uuid===ze&&!bi}),[qe,mi,bi,ze]),ji=(0,d.useMemo)((function(){var e=null==Qe?void 0:Qe[le.$D.LIMIT];return(0,w.jsxs)(_.ZP,{alignItems:"center",children:[(0,w.jsx)(k.ZP,{muted:!0,small:!0,children:"Per page"}),(0,w.jsx)(I.Z,{mr:1}),(0,w.jsxs)(G.Z,{compact:!0,onChange:function(e){var n;return(0,ge.u)((n={},(0,l.Z)(n,le.$D.LIMIT,e.target.value),(0,l.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*E.Q||e%E.Q)&&(0,w.jsx)("option",{value:e,children:e}),(0,Ce.w6)(5).map((function(e,n){var i=(n+1)*E.Q;return(0,w.jsx)("option",{value:i,children:i},i)}))]})]})}),[Qe]),Zi=(0,d.useMemo)((function(){var e,n,i=Xe;qe&&Te.uuid===ze&&(i=tn);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,u=(null==Qe?void 0:Qe[le.$D.LIMIT])||E.Q,r=(null==Qe?void 0:Qe[le.$D.OFFSET])||0,o=Math.ceil(t/u);return(0,w.jsx)(I.Z,{p:se.cd,children:(0,w.jsx)(E.ZP,{maxPages:E.Et,onUpdate:function(e){var n=Number(e);(0,ge.u)((0,l.Z)({},le.$D.OFFSET,n*u))},page:Math.floor(r/u),totalPages:o})})}),[Xe,tn,qe,Qe,ze]);return(0,w.jsxs)(Z.Z,{errors:He,setErrors:Fe,subheaderChildren:(0,w.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[ri,ji]}),title:"Pipelines",uuid:"pipelines/index",children:[qe&&(0,w.jsx)(I.Z,{px:se.cd,ref:i,children:(0,w.jsx)(b.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,ge.u)((n={},(0,l.Z)(n,Se,i),(0,l.Z)(n,le.$D.OFFSET,0),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:ze,tabs:we.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null==Xe||null===(e=Xe.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),gi?(0,w.jsx)(I.Z,{p:se.Mq,children:Xe?(0,w.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,w.jsx)($.Z,{inverted:!0,large:!0})}):null,(0,w.jsxs)(pe.cl,{hide:gi,includePadding:!!pn,maxHeight:"calc(100vh - ".concat(K.Mz+74+(M||44)+68,"px)"),children:[(!qe||ye.uuid===ze)&&vi,qe&&Te.uuid===ze&&hi]}),(0,w.jsx)("div",{ref:o,children:Zi})]})}Ae.getInitialProps=(0,t.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var De=(0,M.Z)(Ae)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])},80022:function(e,n,i){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(n,{Z:function(){return t}})},15544:function(e,n,i){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}i.d(n,{Z:function(){return t}})},13692:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(61049);function u(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,t.Z)(e,n)}},93189:function(e,n,i){"use strict";i.d(n,{Z:function(){return r}});var t=i(12539),u=i(80022);function r(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[449,4241,5544,523,3548,5627,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6503],{40033:function(r,e,t){"use strict";var o=t(82684),n=t(94629),u=t(46866),c=t(81728),i=t(28598);e.Z=function(r){var e=r.operationType,t=r.resourceType,l=r.rootProject,a=r.slug,s=(0,o.useMemo)((function(){var r=[a,t?(0,c.j3)(t):t,e?(0,c.vg)(e):e].filter((function(r){return(null==r?void 0:r.length)>=1})).join(" ");return(null==r?void 0:r.length)>=40?"".concat(null==r?void 0:r.slice(0,40),"..."):r}),[e,t,a]);return(0,i.jsx)(n.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return l?"Platform global hooks":"Global hooks"},linkProps:{href:"/".concat(l?"platform/":"","global-hooks")}},{bold:!0,label:function(){return s}}],title:a,uuid:"GlobalHookDetail/index",children:(0,i.jsx)(u.Z,{operationType:e,resourceType:t,rootProject:l,uuid:a})})}},71439:function(r,e,t){"use strict";t.r(e);var o=t(77837),n=t(82394),u=t(91835),c=t(38860),i=t.n(c),l=t(40033),a=t(93808),s=t(28598);function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function f(r){var e=(0,u.Z)({},r);return(0,s.jsx)(l.Z,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?p(Object(t),!0).forEach((function(e){(0,n.Z)(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({rootProject:!0},e))}f.getInitialProps=function(){var r=(0,o.Z)(i().mark((function r(e){var t,o,n,u;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.query,o=t.operation_type,n=t.resource_type,u=t.slug,r.abrupt("return",{operationType:o,resourceType:n,slug:null==u?void 0:u[0]});case 2:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),e.default=(0,a.Z)(f)},50979:function(r,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/platform/global-hooks/[...slug]",function(){return t(71439)}])}},function(r){r.O(0,[1557,1187,9774,2888,179],(function(){return e=50979,r(r.s=e);var e}));var e=r.O();_N_E=e}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6503],{40033:function(r,e,t){"use strict";var o=t(82684),n=t(94629),u=t(46866),c=t(81728),i=t(28598);e.Z=function(r){var e=r.operationType,t=r.resourceType,l=r.rootProject,a=r.slug,s=(0,o.useMemo)((function(){var r=[a,t?(0,c.j3)(t):t,e?(0,c.vg)(e):e].filter((function(r){return(null==r?void 0:r.length)>=1})).join(" ");return(null==r?void 0:r.length)>=40?"".concat(null==r?void 0:r.slice(0,40),"..."):r}),[e,t,a]);return(0,i.jsx)(n.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return l?"Platform global hooks":"Global hooks"},linkProps:{href:"/".concat(l?"platform/":"","global-hooks")}},{bold:!0,label:function(){return s}}],title:a,uuid:"GlobalHookDetail/index",children:(0,i.jsx)(u.Z,{operationType:e,resourceType:t,rootProject:l,uuid:a})})}},71439:function(r,e,t){"use strict";t.r(e);var o=t(77837),n=t(82394),u=t(91835),c=t(38860),i=t.n(c),l=t(40033),a=t(93808),s=t(28598);function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function f(r){var e=(0,u.Z)({},r);return(0,s.jsx)(l.Z,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?p(Object(t),!0).forEach((function(e){(0,n.Z)(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({rootProject:!0},e))}f.getInitialProps=function(){var r=(0,o.Z)(i().mark((function r(e){var t,o,n,u;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.query,o=t.operation_type,n=t.resource_type,u=t.slug,r.abrupt("return",{operationType:o,resourceType:n,slug:null==u?void 0:u[0]});case 2:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),e.default=(0,a.Z)(f)},50979:function(r,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/platform/global-hooks/[...slug]",function(){return t(71439)}])}},function(r){r.O(0,[449,1187,9774,2888,179],(function(){return e=50979,r(r.s=e);var e}));var e=r.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4543],{44374:function(e,n,o){"use strict";o.d(n,{Z:function(){return A}});var t=o(82684),l=o(71180),r=o(94629),i=o(46866),u=o(82394),c=o(12691),a=o.n(c),s=o(9518),d=o(34376),p=o(55485),f=o(48670),h=o(75499),v=o(30160),b=o(35686),m=o(72473),j=o(8193),k={default:!0,monospace:!0},P=o(81728),g=o(3917),_=o(55283),w=o(86735),x=o(70320),y=o(28598);function Z(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 O(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(o),!0).forEach((function(n){(0,u.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Z(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var E=function(e){var n=e.rootProject,o=(0,x.qB)(),l=(0,t.useContext)(s.ThemeContext),r=(0,d.useRouter)(),i=(0,t.useState)(null),u=i[0],c=(i[1],b.ZP.global_hooks.list(O({_format:"with_pipeline_details",include_snapshot_validation:1},n?{root_project:n}:{})).data),Z=(0,t.useMemo)((function(){return(null==c?void 0:c.global_hooks)||[]}),[c]);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.Z,{columnFlex:[null,null,null,null,1,null,null],columns:[{uuid:"UUID"},{uuid:"Resource"},{uuid:"Operation"},{uuid:"Pipeline"},{uuid:"Outputs"},{center:!0,uuid:"Valid"},{rightAligned:!0,uuid:"Snapshotted at"}],onClickRow:function(e,o){var t=null==Z?void 0:Z[e],l=t.operation_type,i=t.resource_type,u=t.uuid;r.push("/".concat(n?"platform/":"","global-hooks/").concat(u,"?operation_type=").concat(l,"&resource_type=").concat(i))},getObjectAtRowIndex:function(e){return null==Z?void 0:Z[e]},rows:null==Z?void 0:Z.map((function(e){var n,r=e.metadata,i=e.operation_type,u=e.outputs,c=e.pipeline,s=e.pipeline_details,d=e.resource_type,h=e.uuid,b=null==c?void 0:c.uuid,x=b?(0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{openNewWindow:!0,children:b}))},"pipeline"):(0,t.createElement)(v.ZP,O(O({},k),{},{key:"pipeline",muted:!0}),"-"),Z=[];if((null==u?void 0:u.length)>=1&&(null==s||null===(n=s.blocks)||void 0===n?void 0:n.length)>=1){var E=(0,w.HK)((null==s?void 0:s.blocks)||[],(function(e){return e.uuid}));null==u||u.forEach((function(e,n){var o;if(null!=e&&null!==(o=e.block)&&void 0!==o&&o.uuid){var r,i=null==E?void 0:E[null==e||null===(r=e.block)||void 0===r?void 0:r.uuid];i&&(n>=1&&Z.push((0,t.createElement)(v.ZP,O(O({},k),{},{inline:!0,key:"".concat(null==i?void 0:i.uuid,"-").concat(n,"-comma"),muted:!0}),", ")),Z.push((0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit?block_uuid=").concat(null==i?void 0:i.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{inline:!0,openNewWindow:!0,sameColorAsText:!0,children:(0,y.jsx)(v.ZP,O(O({},k),{},{color:(0,_.qn)(null==i?void 0:i.type,{blockColor:null==i?void 0:i.color,theme:l}).accent,inline:!0,children:null==i?void 0:i.uuid}))}))},"".concat(null==i?void 0:i.uuid,"-").concat(n,"-link"))))}}))}return[(0,t.createElement)(v.ZP,O(O({},k),{},{key:"uuid"}),h),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"resourceType",monospace:!1}),d?(0,P.j3)(d):"-"),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"operationType",monospace:!1}),i?(0,P.vg)(i):"-"),x,(0,y.jsxs)("div",{children:[(null==Z?void 0:Z.length)>=1&&Z,!(null!=Z&&Z.length)&&(0,y.jsx)(v.ZP,O(O({},k),{},{muted:!0,children:"-"}))]},"outputs"),(0,y.jsx)(p.ZP,{justifyContent:"center",children:null!=r&&r.snapshot_valid?(0,y.jsx)(m.Check,{size:j.Z,success:!0}):(0,y.jsx)(m.AlertTriangle,{danger:!0,size:j.Z})},"valid"),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"snapshottedAt",rightAligned:!0}),null!=r&&r.snapshotted_at?(0,g.XG)(null==r?void 0:r.snapshotted_at,o):"-")]})),selectedRowIndexInternal:u,uuid:"GlobalHooks/Table"})})},C=o(70515),T=o(69419);var A=function(e){var n=e.rootProject,o=(0,t.useState)(!1),u=o[0],c=o[1],a=(0,T.iV)();(0,t.useEffect)((function(){var e=a.new;c(!!e)}),[a]);var s=n?"Platform global hooks":"Global hooks";return(0,y.jsxs)(r.Z,{addProjectBreadcrumbToCustomBreadcrumbs:u,breadcrumbs:u?[{label:function(){return s},linkProps:{href:"/".concat(n?"platform/":"","global-hooks")}},{bold:!0,label:function(){return"New"}}]:null,subheaderChildren:!u&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(l.ZP,{beforeIcon:(0,y.jsx)(m.Add,{size:2.5*C.iI}),inline:!0,linkProps:{as:"/".concat(n?"platform/":"","global-hooks?new=1"),href:"/".concat(n?"platform/":"","global-hooks")},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"Add new global hook"})}),title:s,uuid:"GlobalHooks/index",children:[u&&(0,y.jsx)(i.Z,{isNew:u,rootProject:n}),!u&&(0,y.jsx)(E,{rootProject:n})]})}},46751:function(e,n,o){"use strict";o.r(n);var t=o(77837),l=o(38860),r=o.n(l),i=o(44374),u=o(93808),c=o(28598);function a(){return(0,c.jsx)(i.Z,{rootProject:!0})}a.getInitialProps=(0,t.Z)(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,u.Z)(a)},52248:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/platform/global-hooks",function(){return o(46751)}])}},function(e){e.O(0,[1557,1187,9774,2888,179],(function(){return n=52248,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4543],{44374:function(e,n,o){"use strict";o.d(n,{Z:function(){return A}});var t=o(82684),l=o(71180),r=o(94629),i=o(46866),u=o(82394),c=o(12691),a=o.n(c),s=o(9518),d=o(34376),p=o(55485),f=o(48670),h=o(75499),v=o(30160),b=o(35686),m=o(72473),j=o(8193),k={default:!0,monospace:!0},P=o(81728),g=o(3917),_=o(55283),w=o(86735),x=o(70320),y=o(28598);function Z(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 O(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(o),!0).forEach((function(n){(0,u.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Z(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var E=function(e){var n=e.rootProject,o=(0,x.qB)(),l=(0,t.useContext)(s.ThemeContext),r=(0,d.useRouter)(),i=(0,t.useState)(null),u=i[0],c=(i[1],b.ZP.global_hooks.list(O({_format:"with_pipeline_details",include_snapshot_validation:1},n?{root_project:n}:{})).data),Z=(0,t.useMemo)((function(){return(null==c?void 0:c.global_hooks)||[]}),[c]);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.Z,{columnFlex:[null,null,null,null,1,null,null],columns:[{uuid:"UUID"},{uuid:"Resource"},{uuid:"Operation"},{uuid:"Pipeline"},{uuid:"Outputs"},{center:!0,uuid:"Valid"},{rightAligned:!0,uuid:"Snapshotted at"}],onClickRow:function(e,o){var t=null==Z?void 0:Z[e],l=t.operation_type,i=t.resource_type,u=t.uuid;r.push("/".concat(n?"platform/":"","global-hooks/").concat(u,"?operation_type=").concat(l,"&resource_type=").concat(i))},getObjectAtRowIndex:function(e){return null==Z?void 0:Z[e]},rows:null==Z?void 0:Z.map((function(e){var n,r=e.metadata,i=e.operation_type,u=e.outputs,c=e.pipeline,s=e.pipeline_details,d=e.resource_type,h=e.uuid,b=null==c?void 0:c.uuid,x=b?(0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{openNewWindow:!0,children:b}))},"pipeline"):(0,t.createElement)(v.ZP,O(O({},k),{},{key:"pipeline",muted:!0}),"-"),Z=[];if((null==u?void 0:u.length)>=1&&(null==s||null===(n=s.blocks)||void 0===n?void 0:n.length)>=1){var E=(0,w.HK)((null==s?void 0:s.blocks)||[],(function(e){return e.uuid}));null==u||u.forEach((function(e,n){var o;if(null!=e&&null!==(o=e.block)&&void 0!==o&&o.uuid){var r,i=null==E?void 0:E[null==e||null===(r=e.block)||void 0===r?void 0:r.uuid];i&&(n>=1&&Z.push((0,t.createElement)(v.ZP,O(O({},k),{},{inline:!0,key:"".concat(null==i?void 0:i.uuid,"-").concat(n,"-comma"),muted:!0}),", ")),Z.push((0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit?block_uuid=").concat(null==i?void 0:i.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{inline:!0,openNewWindow:!0,sameColorAsText:!0,children:(0,y.jsx)(v.ZP,O(O({},k),{},{color:(0,_.qn)(null==i?void 0:i.type,{blockColor:null==i?void 0:i.color,theme:l}).accent,inline:!0,children:null==i?void 0:i.uuid}))}))},"".concat(null==i?void 0:i.uuid,"-").concat(n,"-link"))))}}))}return[(0,t.createElement)(v.ZP,O(O({},k),{},{key:"uuid"}),h),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"resourceType",monospace:!1}),d?(0,P.j3)(d):"-"),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"operationType",monospace:!1}),i?(0,P.vg)(i):"-"),x,(0,y.jsxs)("div",{children:[(null==Z?void 0:Z.length)>=1&&Z,!(null!=Z&&Z.length)&&(0,y.jsx)(v.ZP,O(O({},k),{},{muted:!0,children:"-"}))]},"outputs"),(0,y.jsx)(p.ZP,{justifyContent:"center",children:null!=r&&r.snapshot_valid?(0,y.jsx)(m.Check,{size:j.Z,success:!0}):(0,y.jsx)(m.AlertTriangle,{danger:!0,size:j.Z})},"valid"),(0,t.createElement)(v.ZP,O(O({},k),{},{key:"snapshottedAt",rightAligned:!0}),null!=r&&r.snapshotted_at?(0,g.XG)(null==r?void 0:r.snapshotted_at,o):"-")]})),selectedRowIndexInternal:u,uuid:"GlobalHooks/Table"})})},C=o(70515),T=o(69419);var A=function(e){var n=e.rootProject,o=(0,t.useState)(!1),u=o[0],c=o[1],a=(0,T.iV)();(0,t.useEffect)((function(){var e=a.new;c(!!e)}),[a]);var s=n?"Platform global hooks":"Global hooks";return(0,y.jsxs)(r.Z,{addProjectBreadcrumbToCustomBreadcrumbs:u,breadcrumbs:u?[{label:function(){return s},linkProps:{href:"/".concat(n?"platform/":"","global-hooks")}},{bold:!0,label:function(){return"New"}}]:null,subheaderChildren:!u&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(l.ZP,{beforeIcon:(0,y.jsx)(m.Add,{size:2.5*C.iI}),inline:!0,linkProps:{as:"/".concat(n?"platform/":"","global-hooks?new=1"),href:"/".concat(n?"platform/":"","global-hooks")},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"Add new global hook"})}),title:s,uuid:"GlobalHooks/index",children:[u&&(0,y.jsx)(i.Z,{isNew:u,rootProject:n}),!u&&(0,y.jsx)(E,{rootProject:n})]})}},46751:function(e,n,o){"use strict";o.r(n);var t=o(77837),l=o(38860),r=o.n(l),i=o(44374),u=o(93808),c=o(28598);function a(){return(0,c.jsx)(i.Z,{rootProject:!0})}a.getInitialProps=(0,t.Z)(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,u.Z)(a)},52248:function(e,n,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/platform/global-hooks",function(){return o(46751)}])}},function(e){e.O(0,[449,1187,9774,2888,179],(function(){return n=52248,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{86627:function(n,e,t){"use strict";t.r(e);var r=t(77837),u=t(38860),i=t.n(u),c=t(37361),s=t(93808),a=t(28274),o=t(50018),d=t(24755),f=t(28598);function _(){var n=((0,o.Z)()||{}).id;return(0,f.jsx)(a.Z,{uuidItemSelected:d.DQ,uuidWorkspaceSelected:d.tC,children:(0,f.jsx)(c.Z,{contained:!0,disableFields:[c.X.PERMISSIONS,c.X.ROLES],slug:n})})}_.getInitialProps=(0,r.Z)(i().mark((function n(){return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,s.Z)(_)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(n){n.O(0,[1557,5699,3958,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{86627:function(n,e,t){"use strict";t.r(e);var r=t(77837),u=t(38860),i=t.n(u),c=t(37361),s=t(93808),a=t(28274),o=t(50018),d=t(24755),f=t(28598);function _(){var n=((0,o.Z)()||{}).id;return(0,f.jsx)(a.Z,{uuidItemSelected:d.DQ,uuidWorkspaceSelected:d.tC,children:(0,f.jsx)(c.Z,{contained:!0,disableFields:[c.X.PERMISSIONS,c.X.ROLES],slug:n})})}_.getInitialProps=(0,r.Z)(i().mark((function n(){return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,s.Z)(_)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(n){n.O(0,[449,5699,3958,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3605],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(82394),i=n(75582),o=n(82684),c=n(83455),l=n(71180),s=n(15338),u=n(97618),a=n(55485),d=n(85854),p=n(48670),f=n(65956),j=n(82359),h=n(88543),g=n(38276),v=n(30160),m=n(17488),O=n(69650),b=n(12468),y=n(35686),Z=n(77417),x=n(9518),_=n(44897),P=n(42631),w=n(70515),E=x.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||_.Z.background).codeArea,";\n ")})),k=n(72473),C=n(72191),S=n(70320),N=n(81728),D=n(42122),I=n(72619),T=n(23780),L=n(28598);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=function(e){var t,n,x,_=e.cancelButtonText,P=e.contained,A=e.header,H=e.onCancel,R=e.onSaveSuccess,B=e.rootProject,U=(0,T.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),F=(0,i.Z)(U,1)[0],V=(0,o.useState)(null),G=V[0],K=V[1],W=(0,o.useState)(!1),X=W[0],q=W[1],z=(0,Z.Z)(),J=z.fetchProjects,Y=z.project,Q=z.projectPlatformActivated,$=z.rootProject,ee=(0,o.useMemo)((function(){return B?$:Y}),[Y,$,B]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){G||K(ee)}),[ee,G]);var ce=(0,c.Db)(y.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){var t,n=e.project;J(),K(n),q(!1),(0,S.hY)(null==n||null===(t=n.features)||void 0===t?void 0:t[j.d.LOCAL_TIMEZONE]),R&&(null==R||R(n))},onErrorCallback:function(e,t){return F({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],ue=le[1].isLoading,ae=(0,o.useCallback)((function(e){return se({project:M(M({},e),{},{root_project:B})})}),[B,se]),de=(0,L.jsxs)(L.Fragment,{children:[A,(0,L.jsxs)(f.Z,{noPadding:!0,children:[(0,L.jsxs)(g.Z,{p:w.cd,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(d.Z,{level:5,children:"Project name"})}),(0,L.jsx)(v.ZP,{default:!0,monospace:!0,children:ne})]}),(0,L.jsx)(s.Z,{light:!0}),(0,L.jsxs)(g.Z,{p:w.cd,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(d.Z,{level:5,children:"Project UUID"})}),(0,L.jsx)(v.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,L.jsx)(s.Z,{light:!0}),(0,L.jsx)(g.Z,{p:w.cd,children:(0,L.jsxs)(a.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,L.jsxs)(u.Z,{flexDirection:"column",children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(d.Z,{level:5,children:"Help improve Mage"})}),(0,L.jsxs)(v.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,L.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,L.jsx)(g.Z,{mr:w.cd}),(0,L.jsx)(O.Z,{checked:null==G?void 0:G.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return K((function(e){return M(M({},e),{},{help_improve_mage:!(null!=G&&G.help_improve_mage)})}))}})]})})]}),(0,L.jsx)(g.Z,{mt:w.HN}),(0,L.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,L.jsx)(h.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==G||null===(t=G.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(x=n.triggers)||void 0===x||!x.save_in_code_automatically),onCheck:function(e){return K((function(t){var n,r,i,o,c,l;return M(M({},t),{},{pipelines:M(M({},null==t?void 0:t.pipelines),{},{settings:M(M({},null==t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:M(M({},null==t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null==t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,L.jsx)(g.Z,{mt:w.HN}),(0,L.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,L.jsxs)(g.Z,{p:w.cd,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsxs)(d.Z,{level:5,children:["Features ",(0,L.jsx)(p.Z,{bold:!0,href:"https://docs.mage.ai/development/project/features",largeSm:!0,openNewWindow:!0,children:"(docs)"})]})}),Object.entries((0,D.gR)(null==G?void 0:G.features,[j.d.CODE_BLOCK_V2,j.d.COMMAND_CENTER,j.d.COMPUTE_MANAGEMENT,j.d.CUSTOM_DESIGN,j.d.DBT_V2,j.d.GLOBAL_HOOKS,j.d.NOTEBOOK_BLOCK_OUTPUT_SPLIT_VIEW])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!B&&(null==ee?void 0:ee.features_override)&&o in(null==ee?void 0:ee.features_override);return(0,L.jsx)(g.Z,{mt:0===t?0:1,children:(0,L.jsxs)(a.ZP,{alignItems:"center",children:[(0,L.jsxs)(u.Z,{flex:1,children:[(0,L.jsx)(O.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return K((function(e){return M(M({},e),{},{features:M(M({},null==G?void 0:G.features),{},(0,r.Z)({},o,!c))})}))}}),(0,L.jsx)(g.Z,{mr:w.cd}),(0,L.jsxs)(u.Z,{children:[(0,L.jsx)(v.ZP,{default:!c,monospace:!0,children:(0,N.vg)(o)}),o===j.d.LOCAL_TIMEZONE&&(0,L.jsx)(g.Z,{ml:1,children:(0,L.jsx)(b.Z,M({},S.EB))})]})]}),l&&(0,L.jsx)(v.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,L.jsx)(g.Z,{mt:w.HN}),(0,L.jsx)(f.Z,{noPadding:!0,children:(0,L.jsxs)(g.Z,{p:w.cd,children:[(0,L.jsx)(g.Z,{mb:1,children:(0,L.jsx)(d.Z,{level:5,children:"OpenAI"})}),re&&!X?(0,L.jsxs)(a.ZP,M(M({},a.A0),{},{children:[(0,L.jsx)(v.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,L.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return q(!0)},secondary:!0,title:"Edit",children:(0,L.jsx)(k.Edit,{size:C.bL})})]})):(0,L.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return K((function(t){return M(M({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null==G?void 0:G.openai_api_key)||""})]})}),(0,L.jsx)(g.Z,{mt:w.HN}),(0,L.jsxs)(a.ZP,{alignItems:"center",children:[(0,L.jsx)(l.ZP,{id:"save-project-settings",loading:ue,onClick:function(){var e={features:null==G?void 0:G.features,help_improve_mage:null==G?void 0:G.help_improve_mage,openai_api_key:null==G?void 0:G.openai_api_key,pipelines:null==G?void 0:G.pipelines};!0===(null==ee?void 0:ee.help_improve_mage)&&!1===(null==G?void 0:G.help_improve_mage)&&(e.deny_improve_mage=!0),ae(e)},primary:!0,children:"Save project settings"}),H&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(g.Z,{mr:w.cd}),(0,L.jsx)(l.ZP,{onClick:H,secondary:!0,children:_||"Cancel"})]})]})]});return P?(0,L.jsx)(E,{children:de}):de}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,a=void 0===s?{}:s,d=(0,i.Z)(e,l),p=u({},a);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},d),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,d=e.style,p=void 0===d?{}:d,f=(0,i.Z)(e,s),j=a({},p);return r&&(j.marginLeft=-1*r,j.marginRight=j.marginLeft),n&&(j.height="100%"),(0,l.jsx)(c.Row,a(a({},f),{},{justifyContent:u,style:j,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},70791:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),u=n(82682),a=n(28274),d=n(38276),p=n(70515),f=n(24755),j=n(28598);function h(){return(0,j.jsx)(a.Z,{uuidItemSelected:f.B2.PREFERENCES,uuidWorkspaceSelected:f.Pl.PROJECT_PLATFORM,children:(0,j.jsx)(d.Z,{p:p.cd,children:(0,j.jsx)(u.Z,{justifyContent:"center",children:(0,j.jsx)(c.Z,{xl:8,xxl:6,children:(0,j.jsx)(l.Z,{rootProject:!0})})})})})}h.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(h)},8071:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/preferences",function(){return n(70791)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},13692:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(61049);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.Z)(e,t)}},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(12539),i=n(80022);function o(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[449,5699,9774,2888,179],(function(){return t=8071,e(e.s=t);var t}));var t=e.O();_N_E=t}]);