mage-ai 0.9.46__py3-none-any.whl → 0.9.47__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.
Files changed (309) hide show
  1. mage_ai/api/operations/base.py +27 -5
  2. mage_ai/api/policies/GlobalHookPolicy.py +1 -1
  3. mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
  4. mage_ai/api/policies/OauthPolicy.py +6 -6
  5. mage_ai/api/presenters/GlobalHookPresenter.py +1 -1
  6. mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
  7. mage_ai/api/presenters/PipelinePresenter.py +2 -0
  8. mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
  9. mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
  10. mage_ai/api/resources/BlockResource.py +5 -0
  11. mage_ai/api/resources/DataProviderResource.py +2 -0
  12. mage_ai/api/resources/IntegrationSourceResource.py +149 -2
  13. mage_ai/data_integrations/sources/constants.py +5 -0
  14. mage_ai/data_integrations/utils/scheduler.py +57 -2
  15. mage_ai/data_preparation/executors/block_executor.py +9 -1
  16. mage_ai/data_preparation/models/block/__init__.py +25 -12
  17. mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
  18. mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
  19. mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
  20. mage_ai/data_preparation/models/block/utils.py +28 -13
  21. mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
  22. mage_ai/data_preparation/models/global_hooks/models.py +148 -84
  23. mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
  24. mage_ai/data_preparation/models/pipeline.py +2 -0
  25. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
  26. mage_ai/data_preparation/preferences.py +29 -18
  27. mage_ai/data_preparation/repo_manager.py +12 -2
  28. mage_ai/data_preparation/sync/__init__.py +2 -0
  29. mage_ai/data_preparation/templates/constants.py +14 -0
  30. mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
  31. mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
  32. mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
  33. mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
  34. mage_ai/io/base.py +1 -0
  35. mage_ai/io/chroma.py +153 -0
  36. mage_ai/io/config.py +8 -0
  37. mage_ai/orchestration/db/models/schedules.py +98 -34
  38. mage_ai/orchestration/pipeline_scheduler.py +58 -19
  39. mage_ai/server/constants.py +1 -1
  40. mage_ai/server/frontend_dist/404.html +2 -2
  41. mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  44. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  46. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  47. mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  50. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  51. mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  54. mage_ai/server/frontend_dist/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  59. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  61. mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  84. mage_ai/server/frontend_dist/block-layout.html +2 -2
  85. mage_ai/server/frontend_dist/compute.html +5 -5
  86. mage_ai/server/frontend_dist/files.html +5 -5
  87. mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
  88. mage_ai/server/frontend_dist/global-data-products.html +5 -5
  89. mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
  90. mage_ai/server/frontend_dist/global-hooks.html +5 -5
  91. mage_ai/server/frontend_dist/index.html +2 -2
  92. mage_ai/server/frontend_dist/manage/files.html +5 -5
  93. mage_ai/server/frontend_dist/manage/settings.html +5 -5
  94. mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
  95. mage_ai/server/frontend_dist/manage/users/new.html +5 -5
  96. mage_ai/server/frontend_dist/manage/users.html +5 -5
  97. mage_ai/server/frontend_dist/manage.html +5 -5
  98. mage_ai/server/frontend_dist/oauth.html +4 -4
  99. mage_ai/server/frontend_dist/overview.html +5 -5
  100. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  101. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  102. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  103. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
  104. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  105. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  106. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  107. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  115. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  116. mage_ai/server/frontend_dist/pipelines.html +5 -5
  117. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  118. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
  119. mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
  120. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  121. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
  122. mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
  123. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
  124. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
  125. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  126. mage_ai/server/frontend_dist/settings.html +2 -2
  127. mage_ai/server/frontend_dist/sign-in.html +20 -20
  128. mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
  129. mage_ai/server/frontend_dist/templates.html +5 -5
  130. mage_ai/server/frontend_dist/terminal.html +5 -5
  131. mage_ai/server/frontend_dist/test.html +5 -5
  132. mage_ai/server/frontend_dist/triggers.html +5 -5
  133. mage_ai/server/frontend_dist/version-control.html +5 -5
  134. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
  136. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
  138. mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
  140. mage_ai/server/{frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
  144. mage_ai/server/{frontend_dist/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist_base_path_template/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
  145. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
  150. mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
  153. mage_ai/server/{frontend_dist/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist_base_path_template/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
  168. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
  178. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  180. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  181. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  182. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  183. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  184. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  185. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  187. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  188. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  189. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  190. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  191. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  192. mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
  193. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  194. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  195. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  196. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  197. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  205. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  206. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  207. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  208. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  209. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  211. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  212. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  213. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  217. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  218. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  219. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  220. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  221. mage_ai/server/frontend_dist_base_path_template/sign-in.html +23 -23
  222. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  223. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  224. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  225. mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
  226. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  227. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  228. mage_ai/server/server.py +9 -3
  229. mage_ai/services/k8s/job_manager.py +1 -0
  230. mage_ai/settings/repo.py +3 -0
  231. mage_ai/shared/files.py +47 -0
  232. mage_ai/shared/models.py +1 -0
  233. mage_ai/streaming/constants.py +1 -0
  234. mage_ai/streaming/sinks/postgres.py +2 -0
  235. mage_ai/streaming/sinks/rabbitmq.py +76 -0
  236. mage_ai/streaming/sinks/sink_factory.py +4 -0
  237. mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
  238. mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
  239. mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
  240. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
  241. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
  242. mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
  243. mage_ai/tests/data_preparation/models/test_block.py +26 -0
  244. mage_ai/tests/data_preparation/models/test_pipeline.py +10 -0
  245. mage_ai/tests/factory.py +40 -2
  246. mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
  247. mage_ai/tests/services/k8s/test_job_manager.py +16 -0
  248. mage_ai/tests/shared/mixins.py +60 -23
  249. mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
  250. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/METADATA +7 -4
  251. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/RECORD +257 -243
  252. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
  253. mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
  304. mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
  305. /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
  306. /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
  307. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
  308. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
  309. {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1749],{55283:function(n,e,t){t.d(e,{HC:function(){return O},HS:function(){return A},IN:function(){return f},Kf:function(){return v},Nk:function(){return g},PB:function(){return b},PY:function(){return x},WC:function(){return p},fk:function(){return E},gE:function(){return y},j1:function(){return C},jv:function(){return j},nz:function(){return Z},oh:function(){return s},qn:function(){return m},t1:function(){return T},u2:function(){return h},y9:function(){return R}});var o=t(38626),r=t(44897),i=t(44425),c=t(42631),d=t(8059),l=t(70515),u=t(47041),a=t(91437),s=68,f=1.5*l.iI,p=3*l.iI;function h(n){var e=d.eW;return i.tf.CALLBACK===n?e=d.J:i.tf.CHART===n||i.tf.CONDITIONAL===n?e=d.Hv:i.tf.CUSTOM===n?e=d.AK:i.tf.DATA_EXPORTER===n?e=d.Sr:i.tf.DATA_LOADER===n?e=d.R2:i.tf.DBT===n?e=d.J:i.tf.EXTENSION===n?e=d.FI:i.tf.GLOBAL_DATA_PRODUCT===n?e=d.yr:i.tf.SCRATCHPAD===n?e=d.Hv:i.tf.SENSOR===n?e=d.rK:i.tf.MARKDOWN===n?e=d.RK:i.tf.TRANSFORMER===n&&(e=d.eW),e}function m(n,e){var t,o,c=((null===e||void 0===e||null===(t=e.theme)||void 0===t?void 0:t.borders)||r.Z.borders).light,d=((null===e||void 0===e||null===(o=e.theme)||void 0===o?void 0:o.monotone)||r.Z.monotone).grey500,l=e||{},u=l.blockColor,a=l.isSelected,s=l.theme;return a?c=(s||r.Z).content.active:i.tf.TRANSFORMER===n||u===i.Lq.PURPLE?(c=(s||r.Z).accent.purple,d=(s||r.Z).accent.purpleLight):i.tf.DATA_EXPORTER===n||u===i.Lq.YELLOW?(c=(s||r.Z).accent.yellow,d=(s||r.Z).accent.yellowLight):i.tf.DATA_LOADER===n||u===i.Lq.BLUE?(c=(s||r.Z).accent.blue,d=(s||r.Z).accent.blueLight):i.tf.MARKDOWN===n?(c=(s||r.Z).accent.sky,d=(s||r.Z).accent.skyLight):i.tf.SENSOR===n||u===i.Lq.PINK?(c=(s||r.Z).accent.pink,d=(s||r.Z).accent.pinkLight):i.tf.DBT===n?(c=(s||r.Z).accent.dbt,d=(s||r.Z).accent.dbtLight):i.tf.EXTENSION===n||u===i.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).teal,d=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).tealLight):i.tf.CALLBACK===n?(c=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).rose,d=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).roseLight):i.tf.CONDITIONAL===n||i.tf.SCRATCHPAD===n||u===i.Lq.GREY||i.tf.CUSTOM===n&&!u?(c=(s||r.Z).content.default,d=(s||r.Z).accent.contentDefaultTransparent):i.tf.GLOBAL_DATA_PRODUCT!==n||u||(c=(s||r.Z).monotone.white,d=(s||r.Z).monotone.whiteTransparent),{accent:c,accentLight:d}}var v=(0,o.css)([""," "," "," "," "," "," ",""],(0,a.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(m(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(m(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||r.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||r.Z.borders).danger,";\n ")}),(function(n){return n.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(n){return n.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),g=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),x=o.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],v,c.n_,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme||r.Z).background.content,";\n\n &:hover {\n border-color: ").concat(m(n.blockType,n).accent,";\n }\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__HeaderHorizontalBorder",componentId:"sc-s5rj34-2"})(["",""],(function(n){return"\n border-bottom: 1px solid ".concat((n.theme||r.Z).borders.darkLight,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-3"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;"," "," "," ",""],v,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,1*l.iI,1*l.iI,(function(n){return"\n background-color: ".concat((n.theme||r.Z).background.dashboard,";\n ")}),(function(n){return"undefined"!==typeof n.zIndex&&null!==n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")}),(function(n){return!n.noSticky&&"\n // This is to hide the horizontal scrollbar in the block header when sideBySide is enabled,\n // and the screen width is too small.\n position: sticky;\n top: -5px;\n "}),(function(n){return n.noSticky&&"\n ".concat((0,u.y$)(),"\n\n overflow-x: auto;\n overflow-y: visible;\n ")})),A=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-s5rj34-4"})([""," "," ",""],(function(n){return!n.darkBorder&&"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).darkLight,";\n ")}),(function(n){return n.darkBorder&&"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).medium,";\n ")}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme||r.Z).background.dashboard,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-5"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;position:relative;"," "," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],v,c.M8,c.mP,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme.background||r.Z.background).codeTextarea,";\n ")}),(function(n){return!n.noPadding&&"\n padding-bottom: ".concat(l.iI,"px;\n padding-top: ").concat(l.iI,"px;\n ")}),(function(n){return n.lightBackground&&"\n background-color: ".concat((n.theme||r.Z).background.content,";\n ")}),(function(n){return!n.hideBorderBottom&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n overflow: hidden;\n ")})),y=o.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-6"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;&:hover{"," .block-divider-inner{","}}"," "," "," ",""],2*l.iI,(function(n){return n.additionalZIndex>0&&"\n z-index: ".concat(8+n.additionalZIndex,";\n ")}),(function(n){return"\n background-color: ".concat((n.theme.text||r.Z.text).fileBrowser,";\n ")}),(function(n){return!n.height&&"\n height: ".concat(2*l.iI,"px;\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return!n.bottom&&"\n bottom: ".concat(.5*l.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.bottom&&"\n bottom: ".concat(n.bottom,"px;\n ")})),T=o.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-7"})(["height 1px;width:100%;position:absolute;z-index:-1;"," ",""],(function(n){return!n.top&&"\n top: ".concat(1.5*l.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.top&&"\n top: ".concat(n.top,"px;\n ")})),R=o.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-8"})([""," ",""],(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?l.iI:s,"px;\n ")}),(function(n){return!n.noMargin&&"\n margin-bottom: ".concat(1*l.iI,"px;\n padding-bottom: ").concat(1*l.iI,"px;\n ")})),O=o.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-9"})(["bottom:","px;left:","px;position:absolute;"],1*l.iI,s),E=o.default.div.withConfig({displayName:"indexstyle__ScrollColunnsContainerStyle",componentId:"sc-s5rj34-10"})(["position:relative;",""],(function(n){return"\n z-index: ".concat((null===n||void 0===n?void 0:n.zIndex)||1,";\n ")})),C=o.default.div.attrs((function(n){var e=n.height,t=n.left,o=n.right,r=n.top;return{style:{position:"fixed",height:e,width:n.width,left:t,right:o,top:r,zIndex:(n.zIndex||0)+2}}})).withConfig({displayName:"indexstyle__ScrollColunnStyle",componentId:"sc-s5rj34-11"})([""])},91749:function(n,e,t){t.d(e,{Z:function(){return Y}});var o=t(82394),r=t(21831),i=t(82684),c=t(32013),d=t(98777),l=t(81769),u=t(44425),a=t(71180),s=t(15338),f=t(97618),p=t(55485),h=t(85854),m=t(75582),v=t(44085),g=t(38276),x=t(72473),b=t(38626),Z=t(44897),A=t(42631),j=t(55283),y=t(70515),T=t(47041),R=t(91437),O=(y.iI,b.default.div.withConfig({displayName:"indexstyle__AfterFooterStyle",componentId:"sc-1qjqori-0"})(["",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1qjqori-1"})([""," border-style:solid;border-width:1px;position:relative;"," "," "," "," "," "," ",""],j.Kf,(function(n){return!n.noBorderRadiusTop&&"\n border-top-left-radius: ".concat(A.n_,"px;\n border-top-right-radius: ").concat(A.n_,"px;\n ")}),(function(n){return n.noBorderRadiusTop&&"\n border-top: none !important;\n "}),(function(n){return!n.noBorderRadiusBottom&&"\n border-bottom-left-radius: ".concat(A.n_,"px;\n border-bottom-right-radius: ").concat(A.n_,"px;\n ")}),(function(n){return n.noBorderRadiusBottom&&"\n border-bottom: none !important;\n "}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")}),(function(n){return!n.borderColor&&"\n border-color: ".concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")}))),E=(b.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-1qjqori-2"})(["padding:","px;",""],y.cd*y.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-1qjqori-3"})([""," "," ",""],(0,R.eR)(),(function(n){return!n.selected&&"\n &:hover {\n background-color: ".concat((n.theme.interactive||Z.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(n){return n.selected&&"\n background-color: ".concat((n.theme.background||Z.Z.background).codeTextarea,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__StreamGridGroupStyle",componentId:"sc-1qjqori-4"})(["position:absolute;"]),b.default.div.withConfig({displayName:"indexstyle__StreamGridGroupInnerStyle",componentId:"sc-1qjqori-5"})([""," overflow:auto;position:fixed;",""],T.w5,(function(n){return n.borderRight&&"\n border-right: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__StreamGridStyle",componentId:"sc-1qjqori-6"})(["border-radius:","px;padding:","px;margin:","px;"," "," "," "," ",""],A.n_,y.cd*y.iI,1*y.iI,(function(n){return!n.warning&&"\n &:hover {\n cursor: pointer;\n }\n "}),(function(n){return!n.selected&&!n.warning&&"\n border: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.warning&&!n.selected&&"\n border: 1px solid ".concat((n.theme.accent||Z.Z.accent).warningTransparent,";\n ")}),(function(n){return n.warning&&n.selected&&"\n border: 1px solid ".concat((n.theme.accent||Z.Z.accent).warning,";\n ")}),(function(n){return n.selected&&!n.warning&&"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||Z.Z.borders).contrast,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__BackgroundStyle",componentId:"sc-1qjqori-7"})(["",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__ButtonContainerStyle",componentId:"sc-1qjqori-8"})(["bottom:0;position:fixed;z-index:1;"," ",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n border-left: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n border-right: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n border-top: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")}))),C=t(19452),I=t(30229),P=t(81728),_=t(3314),D=t(86735),S=t(28598);function k(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function N(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?k(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var L=function(n){var e,t,o,r,i=n.index,c=n.permission,d=n.setPermissions,l=n.updatePermission;return(0,S.jsx)(O,{children:(0,S.jsx)(g.Z,{p:y.cd,children:(0,S.jsxs)(p.ZP,{alignItems:"flex-start",flexDirection:"row",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,onClick:function(){return d((function(n){return(0,D.oM)(n,i)}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsxs)(p.ZP,{flexDirection:"column",children:[(0,S.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,S.jsx)(h.Z,{level:5,children:"Triggers"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),l(N(N({},c),{},{triggers:((null===c||void 0===c?void 0:c.triggers)||[]).concat({schedule_interval:"",schedule_type:"",uuid:""})}))},secondary:!0,small:!0,children:"Add trigger"})})]}),(null===c||void 0===c||null===(e=c.triggers)||void 0===e?void 0:e.length)>=1&&(0,S.jsx)(g.Z,{mt:y.cd,children:null===c||void 0===c||null===(t=c.triggers)||void 0===t?void 0:t.map((function(n,e){var t=n.schedule_interval,o=n.schedule_type,r=n.uuid;return(0,S.jsx)(g.Z,{mt:e>=1?1:0,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(n){(0,_.j)(n);var t=(0,D.oM)((null===c||void 0===c?void 0:c.triggers)||[],e);l(N(N({},c),{},{triggers:t}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.triggers)||void 0===t?void 0:t[e]);i.schedule_type=o,r.triggers[e]=i,l(r)},placeholder:"Type",small:!0,value:o,children:Object.entries(I.Z4).map((function(n){var e=(0,m.Z)(n,2),t=e[0],o=e[1];return(0,S.jsx)("option",{value:t,children:(0,P.kC)(o())},t)}))}),(I.Xm.TIME===o||!o)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,monospace:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.triggers)||void 0===t?void 0:t[e]);i.schedule_interval=o,r.triggers[e]=i,l(r)},placeholder:"Interval",small:!0,value:t,children:I.Wb.map((function(n){return(0,S.jsx)("option",{value:n,children:n},n)}))})]})]})},"permission-trigger-".concat(i,"-").concat(e,"-").concat(r))}))})]}),(0,S.jsx)(g.Z,{mr:y.Mq}),(0,S.jsxs)(p.ZP,{flexDirection:"column",children:[(0,S.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,S.jsx)(h.Z,{level:5,children:"Roles"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),l(N(N({},c),{},{roles:((null===c||void 0===c?void 0:c.roles)||[]).concat({role:"",uuid:""})}))},secondary:!0,small:!0,children:"Add role"})})]}),(null===c||void 0===c||null===(o=c.roles)||void 0===o?void 0:o.length)>=1&&(0,S.jsx)(g.Z,{mt:y.cd,children:null===c||void 0===c||null===(r=c.roles)||void 0===r?void 0:r.map((function(n,e){var t=n.role,o=n.uuid;return(0,S.jsx)(g.Z,{mt:e>=1?1:0,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(n){(0,_.j)(n);var t=(0,D.oM)((null===c||void 0===c?void 0:c.roles)||[],e);l(N(N({},c),{},{roles:t}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,monospace:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.roles)||void 0===t?void 0:t[e]);i.role=o,r.roles[e]=i,l(r)},placeholder:"Role",small:!0,value:t,children:C.Z3.map((function(n){return(0,S.jsx)("option",{value:n,children:n},n)}))})]})},"permission-role-".concat(i,"-").concat(e,"-").concat(o))}))})]})]})})})},w=t(30160),M=t(35576),B=t(17488),H=t(3917);function U(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function q(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?U(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var Y=function(n){var e,t,m=n.blockInteractionsMapping,v=n.containerWidth,b=n.createInteraction,Z=n.interactions,A=n.interactionsMapping,j=n.isLoadingCreateInteraction,T=n.isLoadingUpdatePipelineInteraction,R=n.permissions,C=n.pipeline,I=n.pipelineInteraction,P=n.refAfterFooter,k=n.savePipelineInteraction,N=n.selectedBlock,U=n.setBlockInteractionsMapping,Y=n.setInteractionsMapping,K=n.setPermissions,W=n.setSelectedBlock,X=n.updatePipelineInteraction,F=(0,i.useRef)(null),z=(0,i.useRef)(null),G=(0,i.useRef)(null),V=(0,i.useState)(null),Q=V[0],J=V[1],$=(0,i.useState)(null),nn=$[0],en=$[1],tn=(0,i.useState)(!1),on=tn[0],rn=tn[1],cn=(0,i.useState)(null),dn=cn[0],ln=cn[1],un=(0,i.useState)(!1),an=un[0],sn=un[1],fn=(0,i.useState)(null),pn=(fn[0],fn[1]),hn=(0,i.useState)(null),mn=hn[0],vn=hn[1],gn=(0,i.useState)(null),xn=gn[0],bn=gn[1],Zn=(0,i.useMemo)((function(){return"undefined"!==typeof m?m:xn}),[m,xn]),An=(0,i.useMemo)((function(){return"undefined"!==typeof A?A:mn}),[A,mn]),jn=(0,i.useCallback)((function(n,e){return null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof U?U(n):bn(n)}),[U,bn,rn]),yn=(0,i.useCallback)((function(n,e){return null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof Y?Y(n):vn(n)}),[Y,vn,rn]),Tn=(0,i.useState)(null),Rn=Tn[0],On=Tn[1],En=(0,i.useCallback)((function(n,e,t,i){return jn((function(c){var d=(0,r.Z)((null===c||void 0===c?void 0:c[n])||[]);return null!==i&&void 0!==i&&i.remove?d=(0,D.oM)(d,e):d[e]=q(q({},d[e]),t),q(q({},c),{},(0,o.Z)({},n,d))}))}),[jn]),Cn=(0,i.useCallback)((function(n,e){en(Number(new Date)),null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof K?K(n):On(n)}),[en,K,On,rn]),In=(0,i.useMemo)((function(){var n;return null===(n="undefined"!==typeof R?R:Rn)||void 0===n?void 0:n.map((function(n,e){var t=n.roles,o=n.triggers;return{roles:null===t||void 0===t?void 0:t.map((function(n,t){return{role:"string"===typeof n?n:null===n||void 0===n?void 0:n.role,uuid:"".concat(e,"-").concat(nn,"-").concat(t)}})),triggers:null===o||void 0===o?void 0:o.map((function(n,t){return q(q({},n),{},{uuid:"".concat(e,"-").concat(nn,"-").concat(t)})})),uuid:"".concat(e,"-").concat(nn)}}))}),[nn,R,Rn]),Pn=(0,i.useCallback)((function(){J(Number(new Date)),rn(!1)}),[J,rn]),_n=(0,i.useCallback)((function(){k?null===k||void 0===k||k().then((function(){return Pn()})):null===X||void 0===X||X(q(q({},I),{},{blocks:Zn,interactions:An,permissions:null===In||void 0===In?void 0:In.map((function(n){var e=n.roles,t=n.triggers;return{roles:null===e||void 0===e?void 0:e.map((function(n){return"string"===typeof n?n:null===n||void 0===n?void 0:n.role})),triggers:null===t||void 0===t?void 0:t.map((function(n){return{schedule_interval:n.schedule_interval,schedule_type:n.schedule_type}}))}}))})).then((function(){return Pn()}))}),[Zn,An,In,I,Pn,k,X]),Dn=(0,i.useMemo)((function(){return(null===C||void 0===C?void 0:C.blocks)||[]}),[C]),Sn=(0,i.useMemo)((function(){return null===Dn||void 0===Dn?void 0:Dn.reduce((function(n,e,t){return q(q({},n),{},(0,o.Z)({},String(t),!0))}),{})}),[Dn]);(0,i.useEffect)((function(){"undefined"===typeof A&&!An&&(null===Z||void 0===Z?void 0:Z.length)>=1&&yn((0,D.HK)(Z||[],(function(n){return n.uuid})),{initialBootstrap:!0})}),[Z,An,A,yn]),(0,i.useEffect)((function(){"undefined"===typeof m&&!Zn&&null!==I&&void 0!==I&&I.blocks&&jn(null===I||void 0===I?void 0:I.blocks,{initialBootstrap:!0})}),[Zn,m,I,jn]),(0,i.useEffect)((function(){!In&&null!==I&&void 0!==I&&I.permissions&&Cn(null===I||void 0===I?void 0:I.permissions,{initialBootstrap:!0})}),[In,I,Cn]);var kn=(0,i.useMemo)((function(){var n=[],e=(null===Dn||void 0===Dn?void 0:Dn.length)||0;return null===Dn||void 0===Dn||Dn.map((function(t,o){var r=(t||{uuid:null}).uuid,i=(null===Zn||void 0===Zn?void 0:Zn[r])||[],c=(null===i||void 0===i?void 0:i.length)>=1,u=(0,S.jsxs)(a.ZP,{beforeIcon:c?(0,S.jsx)(x.I8,{}):(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),W(t)},primary:!c,secondary:c,small:!0,children:[c&&"Edit interactions",!c&&"Add interactions"]});n.push((0,S.jsx)(d.Z,{first:0==o,noBorderRadius:o>=1,noPaddingContent:!0,titleXPadding:y.cd*y.iI,titleYPadding:1.5*y.iI,title:(0,S.jsxs)(p.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsx)(g.Z,{mr:y.cd,py:1,children:(0,S.jsx)(w.ZP,{large:!0,monospace:!0,children:r})}),c&&(0,S.jsx)(p.ZP,{alignItems:"center",children:u})]}),children:(0,S.jsx)(O,{noBackground:!0,noBorderRadiusBottom:o<e-1,noBorderRadiusTop:!0,children:(0,S.jsxs)(g.Z,{p:y.cd,children:[!c&&u,null===i||void 0===i?void 0:i.map((function(n,e){return(0,S.jsx)(g.Z,{mt:e>=1?y.HN:0,children:(0,S.jsx)(l.Z,{blockInteraction:n,containerWidth:v,containerRef:F,interaction:null===An||void 0===An?void 0:An[null===n||void 0===n?void 0:n.uuid],setInteractionsMapping:yn,showVariableUUID:!0})},"".concat(null===n||void 0===n?void 0:n.uuid,"-").concat(e))}))]})})},r))})),n}),[Dn,F,v,An,jn,yn,W]),Nn=(0,i.useMemo)((function(){return(null===Dn||void 0===Dn?void 0:Dn.length)>=1&&(0,S.jsx)(c.Z,{noBackground:!0,noBorder:!0,noBoxShadow:!0,visibleMapping:Sn,children:kn})}),[Dn,kn,Sn]),Ln=(0,i.useMemo)((function(){return(null===Zn||void 0===Zn?void 0:Zn[null===N||void 0===N?void 0:N.uuid])||[]}),[Zn,N]),wn=(0,i.useMemo)((function(){var n=[],e={};return null===Ln||void 0===Ln||Ln.forEach((function(t){var o=t.uuid,r=null===An||void 0===An?void 0:An[o],i=null===r||void 0===r?void 0:r.variables;Object.keys(i||{}).forEach((function(t){null!==e&&void 0!==e&&e[t]||(n.push(t),e[t]=!0)}))})),n}),[An,Ln]),Mn=(0,i.useMemo)((function(){var n=(null===Ln||void 0===Ln?void 0:Ln.length)>=1;return(0,S.jsxs)(p.ZP,{alignItems:"center",children:[!an&&(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:n,onClick:function(n){(0,_.j)(n),sn(!0),setTimeout((function(){var n;return null===z||void 0===z||null===(n=z.current)||void 0===n?void 0:n.focus()}),1)},primary:!0,small:n,children:"Create new set of interactions"})}),an&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.Z,{compact:!0,monospace:!0,onChange:function(n){(0,_.j)(n),ln(n.target.value)},onClick:function(n){return(0,_.j)(n)},ref:z,small:!0,value:dn||""}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(a.ZP,{compact:n,loading:j,onClick:function(n){(0,_.j)(n),b({block_uuid:null===N||void 0===N?void 0:N.uuid,inputs:{},layout:[],uuid:"".concat(dn,".").concat(u.t6.YAML),variables:{}}).then((function(n){var e=n.data.interaction,t=null===e||void 0===e?void 0:e.uuid;En(null===N||void 0===N?void 0:N.uuid,(null===Ln||void 0===Ln?void 0:Ln.length)||0,{uuid:t}),yn((function(n){return q(q({},n),{},(0,o.Z)({},t,e))})),setTimeout((function(){var n;null===G||void 0===G||null===(n=G.current)||void 0===n||n.scrollIntoView()}),d.e+100)})),sn(!1),pn(dn),ln(null)},primary:!0,small:n,children:"Save interaction"}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(a.ZP,{compact:n,onClick:function(n){(0,_.j)(n),sn(!1),ln(null)},secondary:!0,small:n,children:"Cancel"})]})]})}),[N,Ln,an,j,dn,yn,sn,pn,ln,En]);return(0,S.jsxs)(g.Z,{p:y.cd,style:{position:"relative"},children:[(0,S.jsxs)(g.Z,{pb:y.cd,ref:F,children:[!N&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mb:y.cd,children:(0,S.jsx)(h.Z,{children:"Blocks with interactions"})}),Nn,(0,S.jsxs)(g.Z,{mb:y.cd,mt:y.HN,children:[(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(h.Z,{children:"Permissions"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(){return Cn((function(n){return n.concat([{roles:[],triggers:[]}])}))},secondary:!0,small:!0,children:"Add permission"})})]}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{default:!0,children:"Add permissions to allow specific user roles the ability to trigger this pipeline using the interactions for this pipeline."})})]}),null===In||void 0===In?void 0:In.map((function(n,e){return(0,S.jsx)(g.Z,{mt:e>=1?y.cd:0,children:(0,S.jsx)(L,{index:e,permission:n,setPermissions:Cn,updatePermission:function(n){var t=(0,r.Z)(In);t[e]=n,Cn(t)}})},"permission-".concat(e))}))]}),N&&(0,S.jsxs)(g.Z,{mb:y.Mq,children:[(0,S.jsxs)(g.Z,{mb:y.Mq,children:[(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(g.Z,{mr:y.cd,py:1,children:(0,S.jsx)(h.Z,{children:"Block interactions"})}),(null===Ln||void 0===Ln?void 0:Ln.length)>=1&&Mn]}),(0,S.jsx)(w.ZP,{default:!0,children:"A block can have multiple sets of interactions associated with it."})]}),!(null!==Ln&&void 0!==Ln&&Ln.length)&&Mn,(null===wn||void 0===wn?void 0:wn.length)>=1&&(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Variables"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{alignItems:"center",flex:1,children:null===wn||void 0===wn?void 0:wn.map((function(n,e){return(0,S.jsx)(g.Z,{mr:1,children:(0,S.jsxs)(w.ZP,{default:!0,monospace:!0,children:[n,(null===wn||void 0===wn?void 0:wn.length)>=2&&e<(null===wn||void 0===wn?void 0:wn.length)-1&&(0,S.jsx)(w.ZP,{inline:!0,monospace:!0,muted:!0,children:","})]})},n)}))})]})]}),null===Ln||void 0===Ln?void 0:Ln.map((function(n,e){var t,o=n||{description:null,name:null},r=o.description,i=o.name,c=null===N||void 0===N?void 0:N.uuid,d=null===n||void 0===n?void 0:n.uuid,u=null===An||void 0===An?void 0:An[d];return(0,S.jsxs)("div",{children:[e>=1&&(0,S.jsx)(g.Z,{my:y.HN,children:(0,S.jsx)(s.Z,{light:!0})}),(0,S.jsx)(l.Z,{blockInteraction:n,containerRef:F,containerWidth:v,interaction:u,isEditing:!0,removeBlockInteraction:function(){return En(c,e,n,{remove:!0})},setInteractionsMapping:yn,children:(0,S.jsxs)(g.Z,{p:y.cd,children:[(0,S.jsxs)(p.ZP,{alignItems:"flex-start",children:[(0,S.jsxs)(g.Z,{mb:1,style:{width:20*y.iI},children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Label"}),(0,S.jsxs)(w.ZP,{muted:!0,children:["Add a label for this",(0,S.jsx)("br",{}),"set of interactions."]})]}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{flex:1,children:(0,S.jsx)(B.Z,{fullWidth:!0,onChange:function(n){return En(c,e,{name:n.target.value})},value:i||""})})]}),(0,S.jsx)(g.Z,{mb:y.cd}),(0,S.jsxs)(p.ZP,{alignItems:"flex-start",children:[(0,S.jsxs)(g.Z,{mb:1,style:{width:20*y.iI},children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Description"}),(0,S.jsxs)(w.ZP,{muted:!0,children:["Describe how these",(0,S.jsx)("br",{}),"interactions are used."]})]}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{flex:1,children:(0,S.jsx)(M.Z,{fullWidth:!0,onChange:function(n){return En(c,e,{description:n.target.value})},rows:Math.max(3,Math.min(12,null===r||void 0===r||null===(t=r.split("\n"))||void 0===t?void 0:t.length)),value:r||""})})]})]})}),(0,S.jsx)("div",{ref:e===(null===Ln||void 0===Ln?void 0:Ln.length)-1?G:null})]},"".concat(null===n||void 0===n?void 0:n.uuid,"-").concat(e))}))]}),(0,S.jsx)(E,{ref:P,width:(null===F||void 0===F||null===(e=F.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)||null,children:(0,S.jsx)(g.Z,{p:y.cd,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.vc,{}),loading:T,onClick:function(){return _n()},primary:on,secondary:!on,children:"Save changes for all interactions"}),(0,S.jsx)(g.Z,{mr:y.cd}),on&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(x.uy,{warning:!0}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(w.ZP,{warning:!0,children:"You have unsaved interaction changes"})]}),!on&&Q&&(0,S.jsxs)(w.ZP,{muted:!0,children:["Interactions last saved at ",(0,H.JX)(Number(Q)/1e3)]})]})})})]})}},44425:function(n,e,t){t.d(e,{$W:function(){return g},DA:function(){return m},HX:function(){return A},J8:function(){return Z},L8:function(){return d},LE:function(){return f},Lk:function(){return T},Lq:function(){return p},M5:function(){return h},Q3:function(){return x},Qj:function(){return j},Ut:function(){return E},V4:function(){return O},VZ:function(){return b},dO:function(){return s},f2:function(){return R},iZ:function(){return y},t6:function(){return l},tf:function(){return a}});var o,r,i,c,d,l,u=t(82394);!function(n){n.CONDITION="condition",n.DBT_SNAPSHOT="snapshot",n.DYNAMIC="dynamic",n.DYNAMIC_CHILD="dynamic_child",n.REDUCE_OUTPUT="reduce_output",n.REPLICA="replica"}(d||(d={})),function(n){n.MARKDOWN="markdown",n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(l||(l={}));var a,s=(o={},(0,u.Z)(o,l.MARKDOWN,"MD"),(0,u.Z)(o,l.PYTHON,"PY"),(0,u.Z)(o,l.R,"R"),(0,u.Z)(o,l.SQL,"SQL"),(0,u.Z)(o,l.YAML,"YAML"),o),f=(r={},(0,u.Z)(r,l.MARKDOWN,"Markdown"),(0,u.Z)(r,l.PYTHON,"Python"),(0,u.Z)(r,l.R,"R"),(0,u.Z)(r,l.SQL,"SQL"),(0,u.Z)(r,l.YAML,"YAML"),r);!function(n){n.CALLBACK="callback",n.CHART="chart",n.CONDITIONAL="conditional",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.EXTENSION="extension",n.GLOBAL_DATA_PRODUCT="global_data_product",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.MARKDOWN="markdown",n.TRANSFORMER="transformer"}(a||(a={}));var p,h=[a.CALLBACK,a.CONDITIONAL,a.EXTENSION];!function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(p||(p={}));var m,v,g=[a.CHART,a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],x=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],b=[a.DATA_EXPORTER,a.DATA_LOADER],Z=[a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],A=[a.DATA_EXPORTER,a.DATA_LOADER,a.DBT,a.TRANSFORMER],j=[a.CHART,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN],y=[a.CALLBACK,a.CHART,a.EXTENSION,a.SCRATCHPAD,a.MARKDOWN],T=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SENSOR,a.TRANSFORMER];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(m||(m={})),function(n){n.BLOCK_FILE="block_file",n.CUSTOM_BLOCK_TEMPLATE="custom_block_template",n.MAGE_TEMPLATE="mage_template"}(v||(v={}));var R=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],O=(i={},(0,u.Z)(i,a.CALLBACK,"Callback"),(0,u.Z)(i,a.CHART,"Chart"),(0,u.Z)(i,a.CONDITIONAL,"Conditional"),(0,u.Z)(i,a.CUSTOM,"Custom"),(0,u.Z)(i,a.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,a.DATA_LOADER,"Data loader"),(0,u.Z)(i,a.DBT,"DBT"),(0,u.Z)(i,a.EXTENSION,"Extension"),(0,u.Z)(i,a.GLOBAL_DATA_PRODUCT,"Global data product"),(0,u.Z)(i,a.MARKDOWN,"Markdown"),(0,u.Z)(i,a.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,a.SENSOR,"Sensor"),(0,u.Z)(i,a.TRANSFORMER,"Transformer"),i),E=[a.DATA_LOADER,a.TRANSFORMER,a.DATA_EXPORTER,a.SENSOR];c={},(0,u.Z)(c,a.DATA_EXPORTER,"DE"),(0,u.Z)(c,a.DATA_LOADER,"DL"),(0,u.Z)(c,a.SCRATCHPAD,"SP"),(0,u.Z)(c,a.SENSOR,"SR"),(0,u.Z)(c,a.MARKDOWN,"MD"),(0,u.Z)(c,a.TRANSFORMER,"TF")},30229:function(n,e,t){t.d(e,{TR:function(){return p},U5:function(){return l},Wb:function(){return f},Xm:function(){return i},Z4:function(){return u},fq:function(){return d},gm:function(){return a},kJ:function(){return s}});var o,r,i,c=t(82394);!function(n){n.API="api",n.EVENT="event",n.TIME="time"}(i||(i={}));var d,l,u=(o={},(0,c.Z)(o,i.API,(function(){return"API"})),(0,c.Z)(o,i.EVENT,(function(){return"event"})),(0,c.Z)(o,i.TIME,(function(){return"schedule"})),o);!function(n){n.ACTIVE="active",n.INACTIVE="inactive"}(d||(d={})),function(n){n.ONCE="@once",n.HOURLY="@hourly",n.DAILY="@daily",n.WEEKLY="@weekly",n.MONTHLY="@monthly",n.ALWAYS_ON="@always_on"}(l||(l={}));var a,s,f=[l.ONCE,l.HOURLY,l.DAILY,l.WEEKLY,l.MONTHLY];!function(n){n.INTERVAL="frequency[]",n.STATUS="status[]",n.TAG="tag[]",n.TYPE="type[]"}(a||(a={})),function(n){n.CREATED_AT="created_at",n.NAME="name",n.PIPELINE="pipeline_uuid",n.STATUS="status",n.TYPE="schedule_type"}(s||(s={}));var p=(r={},(0,c.Z)(r,s.CREATED_AT,"Created at"),(0,c.Z)(r,s.NAME,"Name"),(0,c.Z)(r,s.PIPELINE,"Pipeline"),(0,c.Z)(r,s.STATUS,"Active"),(0,c.Z)(r,s.TYPE,"Type"),r)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1749],{55283:function(n,e,t){t.d(e,{HC:function(){return O},HS:function(){return A},IN:function(){return f},Kf:function(){return v},Nk:function(){return g},PB:function(){return b},PY:function(){return x},WC:function(){return p},fk:function(){return E},gE:function(){return y},j1:function(){return C},jv:function(){return j},nz:function(){return Z},oh:function(){return s},qn:function(){return m},t1:function(){return T},u2:function(){return h},y9:function(){return R}});var o=t(38626),r=t(44897),i=t(44425),c=t(42631),l=t(8059),d=t(70515),u=t(47041),a=t(91437),s=68,f=1.5*d.iI,p=3*d.iI;function h(n){var e=l.eW;return i.tf.CALLBACK===n?e=l.J:i.tf.CHART===n||i.tf.CONDITIONAL===n?e=l.Hv:i.tf.CUSTOM===n?e=l.AK:i.tf.DATA_EXPORTER===n?e=l.Sr:i.tf.DATA_LOADER===n?e=l.R2:i.tf.DBT===n?e=l.J:i.tf.EXTENSION===n?e=l.FI:i.tf.GLOBAL_DATA_PRODUCT===n?e=l.yr:i.tf.SCRATCHPAD===n?e=l.Hv:i.tf.SENSOR===n?e=l.rK:i.tf.MARKDOWN===n?e=l.RK:i.tf.TRANSFORMER===n&&(e=l.eW),e}function m(n,e){var t,o,c=((null===e||void 0===e||null===(t=e.theme)||void 0===t?void 0:t.borders)||r.Z.borders).light,l=((null===e||void 0===e||null===(o=e.theme)||void 0===o?void 0:o.monotone)||r.Z.monotone).grey500,d=e||{},u=d.blockColor,a=d.isSelected,s=d.theme;return a?c=(s||r.Z).content.active:i.tf.TRANSFORMER===n||u===i.Lq.PURPLE?(c=(s||r.Z).accent.purple,l=(s||r.Z).accent.purpleLight):i.tf.DATA_EXPORTER===n||u===i.Lq.YELLOW?(c=(s||r.Z).accent.yellow,l=(s||r.Z).accent.yellowLight):i.tf.DATA_LOADER===n||u===i.Lq.BLUE?(c=(s||r.Z).accent.blue,l=(s||r.Z).accent.blueLight):i.tf.MARKDOWN===n?(c=(s||r.Z).accent.sky,l=(s||r.Z).accent.skyLight):i.tf.SENSOR===n||u===i.Lq.PINK?(c=(s||r.Z).accent.pink,l=(s||r.Z).accent.pinkLight):i.tf.DBT===n?(c=(s||r.Z).accent.dbt,l=(s||r.Z).accent.dbtLight):i.tf.EXTENSION===n||u===i.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).teal,l=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).tealLight):i.tf.CALLBACK===n?(c=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).rose,l=((null===s||void 0===s?void 0:s.accent)||r.Z.accent).roseLight):i.tf.CONDITIONAL===n||i.tf.SCRATCHPAD===n||u===i.Lq.GREY||i.tf.CUSTOM===n&&!u?(c=(s||r.Z).content.default,l=(s||r.Z).accent.contentDefaultTransparent):i.tf.GLOBAL_DATA_PRODUCT!==n||u||(c=(s||r.Z).monotone.white,l=(s||r.Z).monotone.whiteTransparent),{accent:c,accentLight:l}}var v=(0,o.css)([""," "," "," "," "," "," ",""],(0,a.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(m(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(m(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||r.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||r.Z.borders).danger,";\n ")}),(function(n){return n.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(n){return n.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),g=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),x=o.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],v,c.n_,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme||r.Z).background.content,";\n\n &:hover {\n border-color: ").concat(m(n.blockType,n).accent,";\n }\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__HeaderHorizontalBorder",componentId:"sc-s5rj34-2"})(["",""],(function(n){return"\n border-bottom: 1px solid ".concat((n.theme||r.Z).borders.darkLight,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-3"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;"," "," "," ",""],v,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,1*d.iI,1*d.iI,(function(n){return"\n background-color: ".concat((n.theme||r.Z).background.dashboard,";\n ")}),(function(n){return"undefined"!==typeof n.zIndex&&null!==n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")}),(function(n){return!n.noSticky&&"\n // This is to hide the horizontal scrollbar in the block header when sideBySide is enabled,\n // and the screen width is too small.\n position: sticky;\n top: -5px;\n "}),(function(n){return n.noSticky&&"\n ".concat((0,u.y$)(),"\n\n overflow-x: auto;\n overflow-y: visible;\n ")})),A=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-s5rj34-4"})([""," "," ",""],(function(n){return!n.darkBorder&&"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).darkLight,";\n ")}),(function(n){return n.darkBorder&&"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).medium,";\n ")}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme||r.Z).background.dashboard,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-5"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;position:relative;"," "," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],v,c.M8,c.mP,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme.background||r.Z.background).codeTextarea,";\n ")}),(function(n){return!n.noPadding&&"\n padding-bottom: ".concat(d.iI,"px;\n padding-top: ").concat(d.iI,"px;\n ")}),(function(n){return n.lightBackground&&"\n background-color: ".concat((n.theme||r.Z).background.content,";\n ")}),(function(n){return!n.hideBorderBottom&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n overflow: hidden;\n ")})),y=o.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-6"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;&:hover{"," .block-divider-inner{","}}"," "," "," ",""],2*d.iI,(function(n){return n.additionalZIndex>0&&"\n z-index: ".concat(8+n.additionalZIndex,";\n ")}),(function(n){return"\n background-color: ".concat((n.theme.text||r.Z.text).fileBrowser,";\n ")}),(function(n){return!n.height&&"\n height: ".concat(2*d.iI,"px;\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return!n.bottom&&"\n bottom: ".concat(.5*d.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.bottom&&"\n bottom: ".concat(n.bottom,"px;\n ")})),T=o.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-7"})(["height 1px;width:100%;position:absolute;z-index:-1;"," ",""],(function(n){return!n.top&&"\n top: ".concat(1.5*d.iI,"px;\n ")}),(function(n){return"undefined"!==typeof n.top&&"\n top: ".concat(n.top,"px;\n ")})),R=o.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-8"})([""," ",""],(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||r.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?d.iI:s,"px;\n ")}),(function(n){return!n.noMargin&&"\n margin-bottom: ".concat(1*d.iI,"px;\n padding-bottom: ").concat(1*d.iI,"px;\n ")})),O=o.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-9"})(["bottom:","px;left:","px;position:absolute;"],1*d.iI,s),E=o.default.div.withConfig({displayName:"indexstyle__ScrollColunnsContainerStyle",componentId:"sc-s5rj34-10"})(["position:relative;",""],(function(n){return"\n z-index: ".concat((null===n||void 0===n?void 0:n.zIndex)||1,";\n ")})),C=o.default.div.attrs((function(n){var e=n.height,t=n.left,o=n.right,r=n.top;return{style:{position:"fixed",height:e,width:n.width,left:t,right:o,top:r,zIndex:(n.zIndex||0)+2}}})).withConfig({displayName:"indexstyle__ScrollColunnStyle",componentId:"sc-s5rj34-11"})([""])},91749:function(n,e,t){t.d(e,{Z:function(){return Y}});var o=t(82394),r=t(21831),i=t(82684),c=t(32013),l=t(98777),d=t(81769),u=t(44425),a=t(71180),s=t(15338),f=t(97618),p=t(55485),h=t(85854),m=t(75582),v=t(44085),g=t(38276),x=t(72473),b=t(38626),Z=t(44897),A=t(42631),j=t(55283),y=t(70515),T=t(47041),R=t(91437),O=(y.iI,b.default.div.withConfig({displayName:"indexstyle__AfterFooterStyle",componentId:"sc-1qjqori-0"})(["",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1qjqori-1"})([""," border-style:solid;border-width:1px;position:relative;"," "," "," "," "," "," ",""],j.Kf,(function(n){return!n.noBorderRadiusTop&&"\n border-top-left-radius: ".concat(A.n_,"px;\n border-top-right-radius: ").concat(A.n_,"px;\n ")}),(function(n){return n.noBorderRadiusTop&&"\n border-top: none !important;\n "}),(function(n){return!n.noBorderRadiusBottom&&"\n border-bottom-left-radius: ".concat(A.n_,"px;\n border-bottom-right-radius: ").concat(A.n_,"px;\n ")}),(function(n){return n.noBorderRadiusBottom&&"\n border-bottom: none !important;\n "}),(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")}),(function(n){return!n.borderColor&&"\n border-color: ".concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")}))),E=(b.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-1qjqori-2"})(["padding:","px;",""],y.cd*y.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-1qjqori-3"})([""," "," ",""],(0,R.eR)(),(function(n){return!n.selected&&"\n &:hover {\n background-color: ".concat((n.theme.interactive||Z.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(n){return n.selected&&"\n background-color: ".concat((n.theme.background||Z.Z.background).codeTextarea,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__StreamGridGroupStyle",componentId:"sc-1qjqori-4"})(["position:absolute;"]),b.default.div.withConfig({displayName:"indexstyle__StreamGridGroupInnerStyle",componentId:"sc-1qjqori-5"})([""," overflow:auto;position:fixed;",""],T.w5,(function(n){return n.borderRight&&"\n border-right: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__StreamGridStyle",componentId:"sc-1qjqori-6"})(["border-radius:","px;padding:","px;margin:","px;"," "," "," "," ",""],A.n_,y.cd*y.iI,1*y.iI,(function(n){return!n.warning&&"\n &:hover {\n cursor: pointer;\n }\n "}),(function(n){return!n.selected&&!n.warning&&"\n border: 1px solid ".concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.warning&&!n.selected&&"\n border: 1px solid ".concat((n.theme.accent||Z.Z.accent).warningTransparent,";\n ")}),(function(n){return n.warning&&n.selected&&"\n border: 1px solid ".concat((n.theme.accent||Z.Z.accent).warning,";\n ")}),(function(n){return n.selected&&!n.warning&&"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||Z.Z.borders).contrast,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__BackgroundStyle",componentId:"sc-1qjqori-7"})(["",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n ")})),b.default.div.withConfig({displayName:"indexstyle__ButtonContainerStyle",componentId:"sc-1qjqori-8"})(["bottom:0;position:fixed;z-index:1;"," ",""],(function(n){return"\n background-color: ".concat((n.theme.background||Z.Z.background).panel,";\n border-left: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n border-right: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n border-top: 1px solid ").concat((n.theme.borders||Z.Z.borders).light,";\n ")}),(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")}))),C=t(19452),I=t(30229),P=t(81728),_=t(3314),D=t(86735),S=t(28598);function k(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function N(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?k(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var L=function(n){var e,t,o,r,i=n.index,c=n.permission,l=n.setPermissions,d=n.updatePermission;return(0,S.jsx)(O,{children:(0,S.jsx)(g.Z,{p:y.cd,children:(0,S.jsxs)(p.ZP,{alignItems:"flex-start",flexDirection:"row",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,onClick:function(){return l((function(n){return(0,D.oM)(n,i)}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsxs)(p.ZP,{flexDirection:"column",children:[(0,S.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,S.jsx)(h.Z,{level:5,children:"Triggers"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),d(N(N({},c),{},{triggers:((null===c||void 0===c?void 0:c.triggers)||[]).concat({schedule_interval:"",schedule_type:"",uuid:""})}))},secondary:!0,small:!0,children:"Add trigger"})})]}),(null===c||void 0===c||null===(e=c.triggers)||void 0===e?void 0:e.length)>=1&&(0,S.jsx)(g.Z,{mt:y.cd,children:null===c||void 0===c||null===(t=c.triggers)||void 0===t?void 0:t.map((function(n,e){var t=n.schedule_interval,o=n.schedule_type,r=n.uuid;return(0,S.jsx)(g.Z,{mt:e>=1?1:0,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(n){(0,_.j)(n);var t=(0,D.oM)((null===c||void 0===c?void 0:c.triggers)||[],e);d(N(N({},c),{},{triggers:t}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.triggers)||void 0===t?void 0:t[e]);i.schedule_type=o,r.triggers[e]=i,d(r)},placeholder:"Type",small:!0,value:o,children:Object.entries(I.Z4).map((function(n){var e=(0,m.Z)(n,2),t=e[0],o=e[1];return(0,S.jsx)("option",{value:t,children:(0,P.kC)(o())},t)}))}),(I.Xm.TIME===o||!o)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,monospace:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.triggers)||void 0===t?void 0:t[e]);i.schedule_interval=o,r.triggers[e]=i,d(r)},placeholder:"Interval",small:!0,value:t,children:I.Wb.map((function(n){return(0,S.jsx)("option",{value:n,children:n},n)}))})]})]})},"permission-trigger-".concat(i,"-").concat(e,"-").concat(r))}))})]}),(0,S.jsx)(g.Z,{mr:y.Mq}),(0,S.jsxs)(p.ZP,{flexDirection:"column",children:[(0,S.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,S.jsx)(h.Z,{level:5,children:"Roles"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),d(N(N({},c),{},{roles:((null===c||void 0===c?void 0:c.roles)||[]).concat({role:"",uuid:""})}))},secondary:!0,small:!0,children:"Add role"})})]}),(null===c||void 0===c||null===(o=c.roles)||void 0===o?void 0:o.length)>=1&&(0,S.jsx)(g.Z,{mt:y.cd,children:null===c||void 0===c||null===(r=c.roles)||void 0===r?void 0:r.map((function(n,e){var t=n.role,o=n.uuid;return(0,S.jsx)(g.Z,{mt:e>=1?1:0,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(n){(0,_.j)(n);var t=(0,D.oM)((null===c||void 0===c?void 0:c.roles)||[],e);d(N(N({},c),{},{roles:t}))},children:(0,S.jsx)(x.x8,{})}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(v.Z,{compact:!0,monospace:!0,onChange:function(n){var t,o=n.target.value,r=N({},c),i=N({},null===r||void 0===r||null===(t=r.roles)||void 0===t?void 0:t[e]);i.role=o,r.roles[e]=i,d(r)},placeholder:"Role",small:!0,value:t,children:C.Z3.map((function(n){return(0,S.jsx)("option",{value:n,children:n},n)}))})]})},"permission-role-".concat(i,"-").concat(e,"-").concat(o))}))})]})]})})})},w=t(30160),M=t(35576),B=t(17488),H=t(3917);function U(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function q(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?U(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var Y=function(n){var e,t,m=n.blockInteractionsMapping,v=n.containerWidth,b=n.createInteraction,Z=n.interactions,A=n.interactionsMapping,j=n.isLoadingCreateInteraction,T=n.isLoadingUpdatePipelineInteraction,R=n.permissions,C=n.pipeline,I=n.pipelineInteraction,P=n.refAfterFooter,k=n.savePipelineInteraction,N=n.selectedBlock,U=n.setBlockInteractionsMapping,Y=n.setInteractionsMapping,K=n.setPermissions,W=n.setSelectedBlock,X=n.updatePipelineInteraction,F=(0,i.useRef)(null),z=(0,i.useRef)(null),G=(0,i.useRef)(null),V=(0,i.useState)(null),Q=V[0],J=V[1],$=(0,i.useState)(null),nn=$[0],en=$[1],tn=(0,i.useState)(!1),on=tn[0],rn=tn[1],cn=(0,i.useState)(null),ln=cn[0],dn=cn[1],un=(0,i.useState)(!1),an=un[0],sn=un[1],fn=(0,i.useState)(null),pn=(fn[0],fn[1]),hn=(0,i.useState)(null),mn=hn[0],vn=hn[1],gn=(0,i.useState)(null),xn=gn[0],bn=gn[1],Zn=(0,i.useMemo)((function(){return"undefined"!==typeof m?m:xn}),[m,xn]),An=(0,i.useMemo)((function(){return"undefined"!==typeof A?A:mn}),[A,mn]),jn=(0,i.useCallback)((function(n,e){return null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof U?U(n):bn(n)}),[U,bn,rn]),yn=(0,i.useCallback)((function(n,e){return null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof Y?Y(n):vn(n)}),[Y,vn,rn]),Tn=(0,i.useState)(null),Rn=Tn[0],On=Tn[1],En=(0,i.useCallback)((function(n,e,t,i){return jn((function(c){var l=(0,r.Z)((null===c||void 0===c?void 0:c[n])||[]);return null!==i&&void 0!==i&&i.remove?l=(0,D.oM)(l,e):l[e]=q(q({},l[e]),t),q(q({},c),{},(0,o.Z)({},n,l))}))}),[jn]),Cn=(0,i.useCallback)((function(n,e){en(Number(new Date)),null!==e&&void 0!==e&&e.initialBootstrap||rn(!0),"undefined"!==typeof K?K(n):On(n)}),[en,K,On,rn]),In=(0,i.useMemo)((function(){var n;return null===(n="undefined"!==typeof R?R:Rn)||void 0===n?void 0:n.map((function(n,e){var t=n.roles,o=n.triggers;return{roles:null===t||void 0===t?void 0:t.map((function(n,t){return{role:"string"===typeof n?n:null===n||void 0===n?void 0:n.role,uuid:"".concat(e,"-").concat(nn,"-").concat(t)}})),triggers:null===o||void 0===o?void 0:o.map((function(n,t){return q(q({},n),{},{uuid:"".concat(e,"-").concat(nn,"-").concat(t)})})),uuid:"".concat(e,"-").concat(nn)}}))}),[nn,R,Rn]),Pn=(0,i.useCallback)((function(){J(Number(new Date)),rn(!1)}),[J,rn]),_n=(0,i.useCallback)((function(){k?null===k||void 0===k||k().then((function(){return Pn()})):null===X||void 0===X||X(q(q({},I),{},{blocks:Zn,interactions:An,permissions:null===In||void 0===In?void 0:In.map((function(n){var e=n.roles,t=n.triggers;return{roles:null===e||void 0===e?void 0:e.map((function(n){return"string"===typeof n?n:null===n||void 0===n?void 0:n.role})),triggers:null===t||void 0===t?void 0:t.map((function(n){return{schedule_interval:n.schedule_interval,schedule_type:n.schedule_type}}))}}))})).then((function(){return Pn()}))}),[Zn,An,In,I,Pn,k,X]),Dn=(0,i.useMemo)((function(){return(null===C||void 0===C?void 0:C.blocks)||[]}),[C]),Sn=(0,i.useMemo)((function(){return null===Dn||void 0===Dn?void 0:Dn.reduce((function(n,e,t){return q(q({},n),{},(0,o.Z)({},String(t),!0))}),{})}),[Dn]);(0,i.useEffect)((function(){"undefined"===typeof A&&!An&&(null===Z||void 0===Z?void 0:Z.length)>=1&&yn((0,D.HK)(Z||[],(function(n){return n.uuid})),{initialBootstrap:!0})}),[Z,An,A,yn]),(0,i.useEffect)((function(){"undefined"===typeof m&&!Zn&&null!==I&&void 0!==I&&I.blocks&&jn(null===I||void 0===I?void 0:I.blocks,{initialBootstrap:!0})}),[Zn,m,I,jn]),(0,i.useEffect)((function(){!In&&null!==I&&void 0!==I&&I.permissions&&Cn(null===I||void 0===I?void 0:I.permissions,{initialBootstrap:!0})}),[In,I,Cn]);var kn=(0,i.useMemo)((function(){var n=[],e=(null===Dn||void 0===Dn?void 0:Dn.length)||0;return null===Dn||void 0===Dn||Dn.map((function(t,o){var r=(t||{uuid:null}).uuid,i=(null===Zn||void 0===Zn?void 0:Zn[r])||[],c=(null===i||void 0===i?void 0:i.length)>=1,u=(0,S.jsxs)(a.ZP,{beforeIcon:c?(0,S.jsx)(x.I8,{}):(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(n){(0,_.j)(n),W(t)},primary:!c,secondary:c,small:!0,children:[c&&"Edit interactions",!c&&"Add interactions"]});n.push((0,S.jsx)(l.Z,{first:0==o,noBorderRadius:o>=1,noPaddingContent:!0,titleXPadding:y.cd*y.iI,titleYPadding:1.5*y.iI,title:(0,S.jsxs)(p.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsx)(g.Z,{mr:y.cd,py:1,children:(0,S.jsx)(w.ZP,{large:!0,monospace:!0,children:r})}),c&&(0,S.jsx)(p.ZP,{alignItems:"center",children:u})]}),children:(0,S.jsx)(O,{noBackground:!0,noBorderRadiusBottom:o<e-1,noBorderRadiusTop:!0,children:(0,S.jsxs)(g.Z,{p:y.cd,children:[!c&&u,null===i||void 0===i?void 0:i.map((function(n,e){return(0,S.jsx)(g.Z,{mt:e>=1?y.HN:0,children:(0,S.jsx)(d.Z,{blockInteraction:n,containerWidth:v,containerRef:F,interaction:null===An||void 0===An?void 0:An[null===n||void 0===n?void 0:n.uuid],setInteractionsMapping:yn,showVariableUUID:!0})},"".concat(null===n||void 0===n?void 0:n.uuid,"-").concat(e))}))]})})},r))})),n}),[Dn,F,v,An,jn,yn,W]),Nn=(0,i.useMemo)((function(){return(null===Dn||void 0===Dn?void 0:Dn.length)>=1&&(0,S.jsx)(c.Z,{noBackground:!0,noBorder:!0,noBoxShadow:!0,visibleMapping:Sn,children:kn})}),[Dn,kn,Sn]),Ln=(0,i.useMemo)((function(){return(null===Zn||void 0===Zn?void 0:Zn[null===N||void 0===N?void 0:N.uuid])||[]}),[Zn,N]),wn=(0,i.useMemo)((function(){var n=[],e={};return null===Ln||void 0===Ln||Ln.forEach((function(t){var o=t.uuid,r=null===An||void 0===An?void 0:An[o],i=null===r||void 0===r?void 0:r.variables;Object.keys(i||{}).forEach((function(t){null!==e&&void 0!==e&&e[t]||(n.push(t),e[t]=!0)}))})),n}),[An,Ln]),Mn=(0,i.useMemo)((function(){var n=(null===Ln||void 0===Ln?void 0:Ln.length)>=1;return(0,S.jsxs)(p.ZP,{alignItems:"center",children:[!an&&(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:n,onClick:function(n){(0,_.j)(n),sn(!0),setTimeout((function(){var n;return null===z||void 0===z||null===(n=z.current)||void 0===n?void 0:n.focus()}),1)},primary:!0,small:n,children:"Create new set of interactions"})}),an&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(B.Z,{compact:!0,monospace:!0,onChange:function(n){(0,_.j)(n),dn(n.target.value)},onClick:function(n){return(0,_.j)(n)},ref:z,small:!0,value:ln||""}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(a.ZP,{compact:n,loading:j,onClick:function(n){(0,_.j)(n),b({block_uuid:null===N||void 0===N?void 0:N.uuid,inputs:{},layout:[],uuid:"".concat(ln,".").concat(u.t6.YAML),variables:{}}).then((function(n){var e=n.data.interaction,t=null===e||void 0===e?void 0:e.uuid;En(null===N||void 0===N?void 0:N.uuid,(null===Ln||void 0===Ln?void 0:Ln.length)||0,{uuid:t}),yn((function(n){return q(q({},n),{},(0,o.Z)({},t,e))})),setTimeout((function(){var n;null===G||void 0===G||null===(n=G.current)||void 0===n||n.scrollIntoView()}),l.e+100)})),sn(!1),pn(ln),dn(null)},primary:!0,small:n,children:"Save interaction"}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(a.ZP,{compact:n,onClick:function(n){(0,_.j)(n),sn(!1),dn(null)},secondary:!0,small:n,children:"Cancel"})]})]})}),[N,Ln,an,j,ln,yn,sn,pn,dn,En]);return(0,S.jsxs)(g.Z,{p:y.cd,style:{position:"relative"},children:[(0,S.jsxs)(g.Z,{pb:y.cd,ref:F,children:[!N&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{mb:y.cd,children:(0,S.jsx)(h.Z,{children:"Blocks with interactions"})}),Nn,(0,S.jsxs)(g.Z,{mb:y.cd,mt:y.HN,children:[(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(h.Z,{children:"Permissions"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(p.ZP,{alignItems:"center",children:(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.mm,{}),compact:!0,onClick:function(){return Cn((function(n){return n.concat([{roles:[],triggers:[]}])}))},secondary:!0,small:!0,children:"Add permission"})})]}),(0,S.jsx)(g.Z,{mt:1,children:(0,S.jsx)(w.ZP,{default:!0,children:"Add permissions to allow specific user roles the ability to trigger this pipeline using the interactions for this pipeline."})})]}),null===In||void 0===In?void 0:In.map((function(n,e){return(0,S.jsx)(g.Z,{mt:e>=1?y.cd:0,children:(0,S.jsx)(L,{index:e,permission:n,setPermissions:Cn,updatePermission:function(n){var t=(0,r.Z)(In);t[e]=n,Cn(t)}})},"permission-".concat(e))}))]}),N&&(0,S.jsxs)(g.Z,{mb:y.Mq,children:[(0,S.jsxs)(g.Z,{mb:y.Mq,children:[(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(g.Z,{mr:y.cd,py:1,children:(0,S.jsx)(h.Z,{children:"Block interactions"})}),(null===Ln||void 0===Ln?void 0:Ln.length)>=1&&Mn]}),(0,S.jsx)(w.ZP,{default:!0,children:"A block can have multiple sets of interactions associated with it."})]}),!(null!==Ln&&void 0!==Ln&&Ln.length)&&Mn,(null===wn||void 0===wn?void 0:wn.length)>=1&&(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Variables"}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{alignItems:"center",flex:1,children:null===wn||void 0===wn?void 0:wn.map((function(n,e){return(0,S.jsx)(g.Z,{mr:1,children:(0,S.jsxs)(w.ZP,{default:!0,monospace:!0,children:[n,(null===wn||void 0===wn?void 0:wn.length)>=2&&e<(null===wn||void 0===wn?void 0:wn.length)-1&&(0,S.jsx)(w.ZP,{inline:!0,monospace:!0,muted:!0,children:","})]})},n)}))})]})]}),null===Ln||void 0===Ln?void 0:Ln.map((function(n,e){var t,o=n||{description:null,name:null},r=o.description,i=o.name,c=null===N||void 0===N?void 0:N.uuid,l=null===n||void 0===n?void 0:n.uuid,u=null===An||void 0===An?void 0:An[l];return(0,S.jsxs)("div",{children:[e>=1&&(0,S.jsx)(g.Z,{my:y.HN,children:(0,S.jsx)(s.Z,{light:!0})}),(0,S.jsx)(d.Z,{blockInteraction:n,containerRef:F,containerWidth:v,interaction:u,isEditing:!0,removeBlockInteraction:function(){return En(c,e,n,{remove:!0})},setInteractionsMapping:yn,children:(0,S.jsxs)(g.Z,{p:y.cd,children:[(0,S.jsxs)(p.ZP,{alignItems:"flex-start",children:[(0,S.jsxs)(g.Z,{mb:1,style:{width:20*y.iI},children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Label"}),(0,S.jsxs)(w.ZP,{muted:!0,children:["Add a label for this",(0,S.jsx)("br",{}),"set of interactions."]})]}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{flex:1,children:(0,S.jsx)(B.Z,{fullWidth:!0,onChange:function(n){return En(c,e,{name:n.target.value})},value:i||""})})]}),(0,S.jsx)(g.Z,{mb:y.cd}),(0,S.jsxs)(p.ZP,{alignItems:"flex-start",children:[(0,S.jsxs)(g.Z,{mb:1,style:{width:20*y.iI},children:[(0,S.jsx)(w.ZP,{bold:!0,large:!0,children:"Description"}),(0,S.jsxs)(w.ZP,{muted:!0,children:["Describe how these",(0,S.jsx)("br",{}),"interactions are used."]})]}),(0,S.jsx)(g.Z,{mr:y.cd}),(0,S.jsx)(f.Z,{flex:1,children:(0,S.jsx)(M.Z,{fullWidth:!0,onChange:function(n){return En(c,e,{description:n.target.value})},rows:Math.max(3,Math.min(12,null===r||void 0===r||null===(t=r.split("\n"))||void 0===t?void 0:t.length)),value:r||""})})]})]})}),(0,S.jsx)("div",{ref:e===(null===Ln||void 0===Ln?void 0:Ln.length)-1?G:null})]},"".concat(null===n||void 0===n?void 0:n.uuid,"-").concat(e))}))]}),(0,S.jsx)(E,{ref:P,width:(null===F||void 0===F||null===(e=F.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)||null,children:(0,S.jsx)(g.Z,{p:y.cd,children:(0,S.jsxs)(p.ZP,{alignItems:"center",children:[(0,S.jsx)(a.ZP,{beforeIcon:(0,S.jsx)(x.vc,{}),loading:T,onClick:function(){return _n()},primary:on,secondary:!on,children:"Save changes for all interactions"}),(0,S.jsx)(g.Z,{mr:y.cd}),on&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(x.uy,{warning:!0}),(0,S.jsx)(g.Z,{mr:1}),(0,S.jsx)(w.ZP,{warning:!0,children:"You have unsaved interaction changes"})]}),!on&&Q&&(0,S.jsxs)(w.ZP,{muted:!0,children:["Interactions last saved at ",(0,H.JX)(Number(Q)/1e3)]})]})})})]})}},44425:function(n,e,t){t.d(e,{$W:function(){return g},DA:function(){return m},HX:function(){return A},J8:function(){return Z},L8:function(){return l},LE:function(){return f},Lk:function(){return T},Lq:function(){return p},M5:function(){return h},Q3:function(){return x},Qj:function(){return j},Ut:function(){return E},V4:function(){return O},VZ:function(){return b},dO:function(){return s},f2:function(){return R},iZ:function(){return y},t6:function(){return d},tf:function(){return a}});var o,r,i,c,l,d,u=t(82394);!function(n){n.CONDITION="condition",n.DBT_SNAPSHOT="snapshot",n.DYNAMIC="dynamic",n.DYNAMIC_CHILD="dynamic_child",n.REDUCE_OUTPUT="reduce_output",n.REPLICA="replica"}(l||(l={})),function(n){n.MARKDOWN="markdown",n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(d||(d={}));var a,s=(o={},(0,u.Z)(o,d.MARKDOWN,"MD"),(0,u.Z)(o,d.PYTHON,"PY"),(0,u.Z)(o,d.R,"R"),(0,u.Z)(o,d.SQL,"SQL"),(0,u.Z)(o,d.YAML,"YAML"),o),f=(r={},(0,u.Z)(r,d.MARKDOWN,"Markdown"),(0,u.Z)(r,d.PYTHON,"Python"),(0,u.Z)(r,d.R,"R"),(0,u.Z)(r,d.SQL,"SQL"),(0,u.Z)(r,d.YAML,"YAML"),r);!function(n){n.CALLBACK="callback",n.CHART="chart",n.CONDITIONAL="conditional",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.EXTENSION="extension",n.GLOBAL_DATA_PRODUCT="global_data_product",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.MARKDOWN="markdown",n.TRANSFORMER="transformer"}(a||(a={}));var p,h=[a.CALLBACK,a.CONDITIONAL,a.EXTENSION];!function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(p||(p={}));var m,v,g=[a.CHART,a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],x=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN,a.TRANSFORMER],b=[a.DATA_EXPORTER,a.DATA_LOADER],Z=[a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],A=[a.DATA_EXPORTER,a.DATA_LOADER,a.DBT,a.TRANSFORMER],j=[a.CHART,a.SCRATCHPAD,a.SENSOR,a.MARKDOWN],y=[a.CALLBACK,a.CHART,a.EXTENSION,a.SCRATCHPAD,a.MARKDOWN],T=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SENSOR,a.TRANSFORMER];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(m||(m={})),function(n){n.BLOCK_FILE="block_file",n.CUSTOM_BLOCK_TEMPLATE="custom_block_template",n.MAGE_TEMPLATE="mage_template"}(v||(v={}));var R=[a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],O=(i={},(0,u.Z)(i,a.CALLBACK,"Callback"),(0,u.Z)(i,a.CHART,"Chart"),(0,u.Z)(i,a.CONDITIONAL,"Conditional"),(0,u.Z)(i,a.CUSTOM,"Custom"),(0,u.Z)(i,a.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,a.DATA_LOADER,"Data loader"),(0,u.Z)(i,a.DBT,"DBT"),(0,u.Z)(i,a.EXTENSION,"Extension"),(0,u.Z)(i,a.GLOBAL_DATA_PRODUCT,"Global data product"),(0,u.Z)(i,a.MARKDOWN,"Markdown"),(0,u.Z)(i,a.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,a.SENSOR,"Sensor"),(0,u.Z)(i,a.TRANSFORMER,"Transformer"),i),E=[a.DATA_LOADER,a.TRANSFORMER,a.DATA_EXPORTER,a.SENSOR];c={},(0,u.Z)(c,a.DATA_EXPORTER,"DE"),(0,u.Z)(c,a.DATA_LOADER,"DL"),(0,u.Z)(c,a.SCRATCHPAD,"SP"),(0,u.Z)(c,a.SENSOR,"SR"),(0,u.Z)(c,a.MARKDOWN,"MD"),(0,u.Z)(c,a.TRANSFORMER,"TF")},30229:function(n,e,t){t.d(e,{PN:function(){return l},TR:function(){return h},U5:function(){return u},Wb:function(){return p},Xm:function(){return i},Z4:function(){return a},fq:function(){return d},gm:function(){return s},kJ:function(){return f}});var o,r,i,c=t(82394),l="__bookmark_values__";!function(n){n.API="api",n.EVENT="event",n.TIME="time"}(i||(i={}));var d,u,a=(o={},(0,c.Z)(o,i.API,(function(){return"API"})),(0,c.Z)(o,i.EVENT,(function(){return"event"})),(0,c.Z)(o,i.TIME,(function(){return"schedule"})),o);!function(n){n.ACTIVE="active",n.INACTIVE="inactive"}(d||(d={})),function(n){n.ONCE="@once",n.HOURLY="@hourly",n.DAILY="@daily",n.WEEKLY="@weekly",n.MONTHLY="@monthly",n.ALWAYS_ON="@always_on"}(u||(u={}));var s,f,p=[u.ONCE,u.HOURLY,u.DAILY,u.WEEKLY,u.MONTHLY];!function(n){n.INTERVAL="frequency[]",n.STATUS="status[]",n.TAG="tag[]",n.TYPE="type[]"}(s||(s={})),function(n){n.CREATED_AT="created_at",n.NAME="name",n.PIPELINE="pipeline_uuid",n.STATUS="status",n.TYPE="schedule_type"}(f||(f={}));var h=(r={},(0,c.Z)(r,f.CREATED_AT,"Created at"),(0,c.Z)(r,f.NAME,"Name"),(0,c.Z)(r,f.PIPELINE,"Pipeline"),(0,c.Z)(r,f.STATUS,"Active"),(0,c.Z)(r,f.TYPE,"Type"),r)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1952],{52749:function(e,n,t){var i=t(82394),r=t(82684),o=t(71180),l=t(55485),d=t(93369),c=t(7267),u=t(38276),s=t(30160),a=t(35576),p=t(17488),f=t(72473),h=t(4015),v=t(70515),m=t(81728),j=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t,i,g,b=e.createPipeline,Z=e.isLoading,y=e.onClose,P=(0,r.useRef)(null),O=(0,r.useState)(!1),w=O[0],k=O[1],I=(0,r.useState)({name:(0,m.Y6)()}),C=I[0],_=I[1];return(0,r.useEffect)((function(){var e;null===P||void 0===P||null===(e=P.current)||void 0===e||e.focus()}),[]),(0,j.jsxs)(h.Nk,{children:[(0,j.jsx)(h.I5,{children:(0,j.jsx)(l.ZP,{alignItems:"center",justifyContent:"center",children:(0,j.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(u.Z,{py:1,children:[(0,j.jsx)(u.Z,{mb:1,children:(0,j.jsx)(s.ZP,{default:!0,children:"New pipeline"})}),(0,j.jsx)(s.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,j.jsxs)(h.gI,{children:[(0,j.jsx)(s.ZP,{default:!0,children:"Name"}),(0,j.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(l.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,j.jsx)(u.Z,{mb:2,pt:1,children:(0,j.jsx)(s.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,j.jsxs)(u.Z,{pb:1,pr:v.cd,children:[(0,j.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:c.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:P,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,j.jsx)(u.Z,{mt:1,children:(0,j.jsx)(s.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,j.jsx)(h.$b,{children:(0,j.jsxs)(l.ZP,{fullWidth:!0,children:[(0,j.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(i=C.llm)&&void 0!==i&&null!==(g=i.request)&&void 0!==g&&g.pipeline_description),loading:Z||w,onClick:function(){k(!0),b({pipeline:C}).then((function(){return k(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,j.jsx)(u.Z,{ml:1,children:(0,j.jsx)(o.ZP,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),l=t(38626),d=t(34376),c=t(54750),u=t(71180),s=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),m=t(48381),j=t(5755),g=t(30160),x=t(35686),b=t(72473),Z=t(84649),y=t(32929),P=t(15610),O=t(19183),w=t(28598);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,k=e.defaultTab,C=e.objectType,_=e.onClickCustomTemplate,S=e.pipelineUUID,M=e.showAddingNewTemplates,N=e.showBreadcrumbs,A=e.tabs,E=(0,d.useRouter)(),D=(0,o.useContext)(l.ThemeContext),T=(0,O.i)(),B=T.height,R=T.width,U=(0,o.useMemo)((function(){return A||y.dP}),[A]),H=(0,o.useState)(M||!1),z=H[0],q=H[1],L=(0,o.useState)(r?y.qy.find((function(e){return e.uuid===r})):y.qy[0]),F=L[0],W=L[1],G=(0,o.useState)(k?U.find((function(e){return e.uuid===(null===k||void 0===k?void 0:k.uuid)})):U[0]),V=G[0],Y=G[1],X=(0,o.useState)(null),$=X[0],Q=X[1],J=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===V||void 0===V?void 0:V.uuid)}),K=J.data,ee=J.mutate,ne=(0,o.useMemo)((function(){var e=(null===K||void 0===K?void 0:K.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[K,F]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===V||void 0===V?void 0:V.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[ie,F]),le=(0,o.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=I({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,I({},d)):(0,w.jsx)(b.pd,I({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),de=(0,o.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=I({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,I({},d)):(0,w.jsx)(b.pd,I({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),ce=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(m.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,_,E]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(m.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,_,E]),se=(0,o.useMemo)((function(){if(!N)return null;var e=[];return z?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){q(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(c.Z,{breadcrumbs:e})})}),[z,N]),ae=(0,o.useMemo)((function(){return N?36:0}),[N]),pe=(0,o.useMemo)((function(){return B-ae}),[B,ae]);if(z)return n=a.R===C&&S?(0,w.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,w.jsx)(j.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){Q(e)}:null,onMutateSuccess:ee,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[N&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:n})]}):n;var fe=(0,w.jsxs)(Z.Nk,{children:[(0,w.jsxs)(Z.bC,{height:t?pe:null,children:[(0,w.jsx)(Z.Yf,{children:(0,w.jsx)(s.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,P.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===V||void 0===V?void 0:V.uuid,tabs:U})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&le,y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&de]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(u.ZP,{beforeIcon:(0,w.jsx)(b.mm,{size:Z.ZG}),onClick:function(){q(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!K&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),K&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:"Add a new template by clicking the button above."})]}),(null===ce||void 0===ce?void 0:ce.length)>=1&&(0,w.jsx)(Z.n8,{children:ce})]}),y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,w.jsx)(Z.n8,{children:ue})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[N&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:fe})]}):fe}},94629:function(e,n,t){t.d(n,{Z:function(){return k}});var i=t(82394),r=t(21831),o=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),s=t(68487),a=t(68899),p=t(28598);function f(e,n){var t=e.children,i=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:i,ref:n,children:t})}var h=o.forwardRef(f),v=t(62547),m=t(82571),j=t(35686),g=t(98464),x=t(46684),b=t(70515),Z=t(53808),y=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,w=e.afterHidden,k=e.afterWidth,I=e.afterWidthOverride,C=e.appendBreadcrumbs,_=e.before,S=e.beforeWidth,M=e.breadcrumbs,N=e.children,A=e.errors,E=e.headerMenuItems,D=e.headerOffset,T=e.hideAfterCompletely,B=e.mainContainerHeader,R=e.navigationItems,U=e.setAfterHidden,H=e.setErrors,z=e.subheaderChildren,q=e.subheaderNoPadding,L=e.title,F=e.uuid,W=(0,y.i)().width,G="dashboard_after_width_".concat(F),V="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),X=(0,o.useState)(I?k:(0,Z.U2)(G,k)),$=X[0],Q=X[1],J=(0,o.useState)(!1),K=J[0],ee=J[1],ne=(0,o.useState)(_?Math.max((0,Z.U2)(V,S),13*b.iI):null),te=ne[0],ie=ne[1],re=(0,o.useState)(!1),oe=re[0],le=re[1],de=(0,o.useState)(null)[1],ce=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,se={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];M&&(i&&ae.push(se),ae.push.apply(ae,(0,r.Z)(M))),(null===M||void 0===M||!M.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==M&&void 0!==M&&M.length||ae.unshift({bold:!C,label:function(){return L}}),ae.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||K||oe||null===de||void 0===de||de(Y.current.getBoundingClientRect().width)}),[K,$,oe,te,Y,de,W]),(0,o.useEffect)((function(){K||(0,Z.t8)(G,$)}),[w,K,$,G]),(0,o.useEffect)((function(){oe||(0,Z.t8)(V,te)}),[oe,te,V]);var pe=(0,g.Z)(k);return(0,o.useEffect)((function(){I&&pe!==k&&Q(k)}),[I,k,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Z,{title:L}),(0,p.jsx)(s.Z,{breadcrumbs:ae,menuItems:E,project:null===ue||void 0===ue?void 0:ue[0],version:null===ue||void 0===ue||null===(t=ue[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:K,afterWidth:$,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(_?te:0),headerOffset:D,hideAfterCompletely:!U||T,leftOffset:_?a.k1:null,mainContainerHeader:B,mainContainerRef:Y,setAfterHidden:U,setAfterMousedownActive:ee,setAfterWidth:Q,setBeforeMousedownActive:le,setBeforeWidth:ie,children:[z&&(0,p.jsx)(h,{noPadding:q,children:z}),N]})})]}),A&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,O(O({},A),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var k=o.forwardRef(w)},65458:function(e,n,t){t.d(n,{d:function(){return s}});var i=t(13507),r=t(72473),o=t(57653),l=t(70515),d=t(81728),c=t(28598),u=1.5*l.iI,s=function(e,n){var t=[{beforeIcon:(0,c.jsx)(r.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,d.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,c.jsx)(r.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,c.jsx)(i.Z,{size:u}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,c.jsx)(r.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,c.jsx)(r.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return c},Nk:function(){return d},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*l.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(l.cd*l.iI,"px;\n padding-top: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*l.iI,2*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),l=t(30160),d=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),a=(0,i.useMemo)((function(){return(0,d.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return T}});var i=t(82394),r=t(75582),o=t(82684),l=t(69864),d=t(71180),c=t(15338),u=t(97618),s=t(55485),a=t(85854),p=t(48670),f=t(65956),h=t(82359),v=t(57114),m=t(38276),j=t(30160),g=t(17488),x=t(69650),b=t(12468),Z=t(35686),y=t(38626),P=t(44897),O=t(42631),w=t(70515),k=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),I=t(72473),C=t(72191),_=t(81728),S=t(72619),M=t(70320),N=t(23780),A=t(28598);function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n,t,y,P=e.cancelButtonText,O=e.contained,E=e.header,T=e.onCancel,B=e.onSaveSuccess,R=(0,N.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,r.Z)(R,1)[0],H=(0,o.useState)(null),z=H[0],q=H[1],L=(0,o.useState)(!1),F=L[0],W=L[1],G=Z.ZP.projects.list(),V=G.data,Y=G.mutate,X=(0,o.useMemo)((function(){var e;return null===V||void 0===V||null===(e=V.projects)||void 0===e?void 0:e[0]}),[V]),$=X||{},Q=$.name,J=$.openai_api_key,K=$.project_uuid,ee=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){z||q(X)}),[X,z]);var ne=(0,l.Db)(Z.ZP.projects.useUpdate(Q),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var n,t=e.project;Y(),q(t),W(!1),(0,M.h)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),B&&(null===B||void 0===B||B(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),te=(0,r.Z)(ne,2),ie=te[0],re=te[1].isLoading,oe=(0,o.useCallback)((function(e){return ie({project:e})}),[ie]),le=(0,A.jsxs)(A.Fragment,{children:[E,(0,A.jsxs)(f.Z,{noPadding:!0,children:[(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project name"})}),(0,A.jsx)(j.ZP,{default:!0,monospace:!0,children:Q})]}),(0,A.jsx)(c.Z,{light:!0}),(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,A.jsx)(j.ZP,{default:!!K,monospace:!0,muted:!K,children:K||"Not required"})]}),(0,A.jsx)(c.Z,{light:!0}),(0,A.jsx)(m.Z,{p:w.cd,children:(0,A.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,A.jsxs)(u.Z,{flexDirection:"column",children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,A.jsxs)(j.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,A.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsx)(x.Z,{compact:!0,checked:null===z||void 0===z?void 0:z.help_improve_mage,onCheck:function(){return q((function(e){return D(D({},e),{},{help_improve_mage:!(null!==z&&void 0!==z&&z.help_improve_mage)})}))}})]})})]}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,A.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===z||void 0===z||null===(n=z.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return q((function(n){var t,i,r,o,l,d;return D(D({},n),{},{pipelines:D(D({},null===n||void 0===n?void 0:n.pipelines),{},{settings:D(D({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:D(D({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(l=o.settings)||void 0===l||null===(d=l.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((null===z||void 0===z?void 0:z.features)||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],l=t[1];return(0,A.jsx)(m.Z,{mt:0===n?0:1,children:(0,A.jsxs)(s.ZP,{alignItems:"center",children:[(0,A.jsx)(x.Z,{checked:!!l,compact:!0,onCheck:function(){return q((function(e){return D(D({},e),{},{features:D(D({},null===z||void 0===z?void 0:z.features),{},(0,i.Z)({},o,!l))})}))}}),(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsxs)(u.Z,{children:[(0,A.jsx)(j.ZP,{default:!l,monospace:!0,children:(0,_.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,A.jsx)(m.Z,{ml:1,children:(0,A.jsx)(b.Z,{block:!0,description:"Display dates in local timezone. Please note that certain pages (e.g. Monitor page) or components (e.g. Pipeline run bar charts) may still be in UTC time. Dates in local time will have a timezone offset in the timestamp (e.g. -07:00).",lightBackground:!0,muted:!0,size:C._k})})]})]})},o)}))]})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(f.Z,{noPadding:!0,children:(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"OpenAI"})}),J&&!F?(0,A.jsxs)(s.ZP,D(D({},s.A0),{},{children:[(0,A.jsx)(j.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,A.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return W(!0)},secondary:!0,title:"Edit",children:(0,A.jsx)(I.I8,{size:C.bL})})]})):(0,A.jsx)(g.Z,{disabled:ee,label:ee?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return q((function(n){return D(D({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===z||void 0===z?void 0:z.openai_api_key)||""})]})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsxs)(s.ZP,{alignItems:"center",children:[(0,A.jsx)(d.ZP,{loading:re,onClick:function(){oe({features:null===z||void 0===z?void 0:z.features,help_improve_mage:null===z||void 0===z?void 0:z.help_improve_mage,openai_api_key:null===z||void 0===z?void 0:z.openai_api_key,pipelines:null===z||void 0===z?void 0:z.pipelines})},primary:!0,children:"Save project settings"}),T&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsx)(d.ZP,{onClick:T,secondary:!0,children:P||"Cancel"})]})]})]});return O?(0,A.jsx)(k,{children:le}):le}},57114:function(e,n,t){t.d(n,{S:function(){return Z},Z:function(){return y}});var i=t(82684),r=t(15338),o=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),s=t(44085),a=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),m=t(8193),j=t(70515),g=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.children,i=e.description,r=e.invalid,d=e.selectInput,c=e.textInput,u=e.title,x=e.toggleSwitch,Z=e.warning;return(0,g.jsx)(a.Z,{p:j.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(l.ZP,{flexDirection:"column",children:[(0,g.jsxs)(p.ZP,{danger:r,default:!0,large:!0,warning:Z,children:[u," ",r&&(0,g.jsx)(p.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),i&&"string"===typeof i&&(0,g.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,g.jsx)(a.Z,{mr:j.cd}),(0,g.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,c&&(0,g.jsx)(f.Z,b({afterIcon:(0,g.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},c)),d&&(0,g.jsx)(s.Z,b(b({},d),{},{afterIcon:(0,g.jsx)(v._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===d||void 0===d||null===(n=d.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,g.jsx)("option",{value:t,children:n||t},t)}))})),x&&(0,g.jsx)(h.Z,{checked:!(null===x||void 0===x||!x.checked),compact:!0,onCheck:null===x||void 0===x?void 0:x.onCheck})]})]})})},y=function(e){var n=e.children,t=e.description,u=e.headerChildren,s=e.title;return(0,g.jsxs)(c.Z,{noPadding:!0,children:[(0,g.jsx)(a.Z,{p:j.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,g.jsx)(d.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,g.jsx)(a.Z,{mt:1,children:(0,g.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,g.jsxs)("div",{children:[(0,g.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=2*l.iI,c=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1952],{52749:function(e,n,t){var i=t(82394),r=t(82684),o=t(71180),l=t(55485),d=t(93369),c=t(7267),u=t(38276),s=t(30160),a=t(35576),p=t(17488),f=t(72473),h=t(4015),v=t(70515),m=t(81728),j=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t,i,g,b=e.createPipeline,Z=e.isLoading,y=e.onClose,P=(0,r.useRef)(null),O=(0,r.useState)(!1),w=O[0],k=O[1],I=(0,r.useState)({name:(0,m.Y6)()}),C=I[0],_=I[1];return(0,r.useEffect)((function(){var e;null===P||void 0===P||null===(e=P.current)||void 0===e||e.focus()}),[]),(0,j.jsxs)(h.Nk,{children:[(0,j.jsx)(h.I5,{children:(0,j.jsx)(l.ZP,{alignItems:"center",justifyContent:"center",children:(0,j.jsx)(f.xq,{size:5*v.iI,warning:!0})})}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(u.Z,{py:1,children:[(0,j.jsx)(u.Z,{mb:1,children:(0,j.jsx)(s.ZP,{default:!0,children:"New pipeline"})}),(0,j.jsx)(s.ZP,{textOverflow:!0,children:"Using AI"})]})}),(0,j.jsxs)(h.gI,{children:[(0,j.jsx)(s.ZP,{default:!0,children:"Name"}),(0,j.jsx)(p.Z,{alignRight:!0,noBackground:!0,noBorder:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{name:e.target.value})}))},paddingVertical:v.iI,placeholder:"Enter pipeline name...",value:(null===C||void 0===C?void 0:C.name)||""})]}),(0,j.jsx)(h.gI,{children:(0,j.jsxs)(l.ZP,{flexDirection:"column",fullWidth:!0,children:[(0,j.jsx)(u.Z,{mb:2,pt:1,children:(0,j.jsx)(s.ZP,{default:!0,children:"Describe what the pipeline should do"})}),(0,j.jsxs)(u.Z,{pb:1,pr:v.cd,children:[(0,j.jsx)(a.Z,{fullWidth:!0,onChange:function(e){return _((function(n){return x(x({},n),{},{llm:{request:{pipeline_description:e.target.value},use_case:c.z.GENERATE_PIPELINE_WITH_DESCRIPTION}})}))},placeholder:"Type the pipeline purpose...",ref:P,rows:8,value:(null===C||void 0===C||null===(n=C.llm)||void 0===n||null===(t=n.request)||void 0===t?void 0:t.pipeline_description)||""}),(Z||w)&&(0,j.jsx)(u.Z,{mt:1,children:(0,j.jsx)(s.ZP,{warning:!0,children:"Pipeline is being generated using AI based on your description above..."})})]})]})}),(0,j.jsx)(h.$b,{children:(0,j.jsxs)(l.ZP,{fullWidth:!0,children:[(0,j.jsx)(d.ZP,{bold:!0,centerText:!0,disabled:!(null!==C&&void 0!==C&&C.name)||!(null!==C&&void 0!==C&&null!==(i=C.llm)&&void 0!==i&&null!==(g=i.request)&&void 0!==g&&g.pipeline_description),loading:Z||w,onClick:function(){k(!0),b({pipeline:C}).then((function(){return k(!1)}))},primary:!0,tabIndex:0,uuid:"AIControlPanel/CreatePipeline",children:"Create pipeline"}),y&&(0,j.jsx)(u.Z,{ml:1,children:(0,j.jsx)(o.ZP,{onClick:y,tabIndex:0,children:"Cancel"})})]})})]})}},60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),l=t(38626),d=t(34376),c=t(54750),u=t(71180),s=t(90299),a=t(44898),p=t(55485),f=t(88328),h=t(38276),v=t(4190),m=t(48381),j=t(5755),g=t(30160),x=t(35686),b=t(72473),Z=t(84649),y=t(32929),P=t(15610),O=t(19183),w=t(28598);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,k=e.defaultTab,C=e.objectType,_=e.onClickCustomTemplate,S=e.pipelineUUID,M=e.showAddingNewTemplates,N=e.showBreadcrumbs,A=e.tabs,E=(0,d.useRouter)(),D=(0,o.useContext)(l.ThemeContext),T=(0,O.i)(),B=T.height,R=T.width,U=(0,o.useMemo)((function(){return A||y.dP}),[A]),H=(0,o.useState)(M||!1),z=H[0],q=H[1],L=(0,o.useState)(r?y.qy.find((function(e){return e.uuid===r})):y.qy[0]),F=L[0],W=L[1],G=(0,o.useState)(k?U.find((function(e){return e.uuid===(null===k||void 0===k?void 0:k.uuid)})):U[0]),V=G[0],Y=G[1],X=(0,o.useState)(null),$=X[0],Q=X[1],J=x.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===V||void 0===V?void 0:V.uuid)}),K=J.data,ee=J.mutate,ne=(0,o.useMemo)((function(){var e=(null===K||void 0===K?void 0:K.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[K,F]),te=x.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===V||void 0===V?void 0:V.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==F&&void 0!==F&&F.filterTemplates?null===F||void 0===F?void 0:F.filterTemplates(e):e}),[ie,F]),le=(0,o.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=I({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,I({},d)):(0,w.jsx)(b.pd,I({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),de=(0,o.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,l=(null===F||void 0===F?void 0:F.uuid)===o,d=I({size:Z.ZG},l&&r?r:{});return(0,w.jsx)(Z.wj,{onClick:function(){return W(e)},selected:l,children:(0,w.jsxs)(p.ZP,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:l&&i?i(D):null,children:n?(0,w.jsx)(n,I({},d)):(0,w.jsx)(b.pd,I({},d))}),(0,w.jsx)(g.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[F,D]),ce=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(m.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,_,E]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,l=e.user,d=[];return null!==r&&void 0!==r&&r.length?d.push.apply(d,(0,i.Z)(r)):null!==l&&void 0!==l&&l.username&&d.push(null===l||void 0===l?void 0:l.username),(0,w.jsxs)(Z.UE,{onClick:function(){_?_(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(g.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(g.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,w.jsx)(m.Z,{tags:null===d||void 0===d?void 0:d.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,_,E]),se=(0,o.useMemo)((function(){if(!N)return null;var e=[];return z?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){q(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(c.Z,{breadcrumbs:e})})}),[z,N]),ae=(0,o.useMemo)((function(){return N?36:0}),[N]),pe=(0,o.useMemo)((function(){return B-ae}),[B,ae]);if(z)return n=a.R===C&&S?(0,w.jsx)(f.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,w.jsx)(j.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){Q(e)}:null,onMutateSuccess:ee,templateAttributes:F&&(null===F||void 0===F?void 0:F.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===F||void 0===F?void 0:F.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[N&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:n})]}):n;var fe=(0,w.jsxs)(Z.Nk,{children:[(0,w.jsxs)(Z.bC,{height:t?pe:null,children:[(0,w.jsx)(Z.Yf,{children:(0,w.jsx)(s.Z,{noPadding:!0,onClickTab:function(e){t?Y(e):(0,P.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===V||void 0===V?void 0:V.uuid,tabs:U})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&le,y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&de]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(u.ZP,{beforeIcon:(0,w.jsx)(b.mm,{size:Z.ZG}),onClick:function(){q(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!K&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),K&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:"Add a new template by clicking the button above."})]}),(null===ce||void 0===ce?void 0:ce.length)>=1&&(0,w.jsx)(Z.n8,{children:ce})]}),y.A2.uuid===(null===V||void 0===V?void 0:V.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,w.jsxs)(h.Z,{p:2,children:[(0,w.jsx)(g.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(g.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,w.jsx)(Z.n8,{children:ue})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[N&&se,(0,w.jsx)(Z.Rd,{height:pe,width:R,children:fe})]}):fe}},94629:function(e,n,t){t.d(n,{Z:function(){return k}});var i=t(82394),r=t(21831),o=t(82684),l=t(50724),d=t(82555),c=t(97618),u=t(70613),s=t(68487),a=t(68899),p=t(28598);function f(e,n){var t=e.children,i=e.noPadding;return(0,p.jsx)(a.HS,{noPadding:i,ref:n,children:t})}var h=o.forwardRef(f),v=t(62547),m=t(82571),j=t(35686),g=t(98464),x=t(46684),b=t(70515),Z=t(53808),y=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e,n){var t,i=e.addProjectBreadcrumbToCustomBreadcrumbs,f=e.after,P=e.afterHeader,w=e.afterHidden,k=e.afterWidth,I=e.afterWidthOverride,C=e.appendBreadcrumbs,_=e.before,S=e.beforeWidth,M=e.breadcrumbs,N=e.children,A=e.errors,E=e.headerMenuItems,D=e.headerOffset,T=e.hideAfterCompletely,B=e.mainContainerHeader,R=e.navigationItems,U=e.setAfterHidden,H=e.setErrors,z=e.subheaderChildren,q=e.subheaderNoPadding,L=e.title,F=e.uuid,W=(0,y.i)().width,G="dashboard_after_width_".concat(F),V="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),X=(0,o.useState)(I?k:(0,Z.U2)(G,k)),$=X[0],Q=X[1],J=(0,o.useState)(!1),K=J[0],ee=J[1],ne=(0,o.useState)(_?Math.max((0,Z.U2)(V,S),13*b.iI):null),te=ne[0],ie=ne[1],re=(0,o.useState)(!1),oe=re[0],le=re[1],de=(0,o.useState)(null)[1],ce=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ue=null===ce||void 0===ce?void 0:ce.projects,se={label:function(){var e;return null===ue||void 0===ue||null===(e=ue[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];M&&(i&&ae.push(se),ae.push.apply(ae,(0,r.Z)(M))),(null===M||void 0===M||!M.length||C)&&(null===ue||void 0===ue?void 0:ue.length)>=1&&(null!==M&&void 0!==M&&M.length||ae.unshift({bold:!C,label:function(){return L}}),ae.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||K||oe||null===de||void 0===de||de(Y.current.getBoundingClientRect().width)}),[K,$,oe,te,Y,de,W]),(0,o.useEffect)((function(){K||(0,Z.t8)(G,$)}),[w,K,$,G]),(0,o.useEffect)((function(){oe||(0,Z.t8)(V,te)}),[oe,te,V]);var pe=(0,g.Z)(k);return(0,o.useEffect)((function(){I&&pe!==k&&Q(k)}),[I,k,pe]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Z,{title:L}),(0,p.jsx)(s.Z,{breadcrumbs:ae,menuItems:E,project:null===ue||void 0===ue?void 0:ue[0],version:null===ue||void 0===ue||null===(t=ue[0])||void 0===t?void 0:t.version}),(0,p.jsxs)(a.Nk,{ref:n,children:[0!==(null===R||void 0===R?void 0:R.length)&&(0,p.jsx)(a.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:R,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:f,afterHeader:P,afterHeightOffset:x.Mz,afterHidden:w,afterMousedownActive:K,afterWidth:$,before:_,beforeHeightOffset:x.Mz,beforeMousedownActive:oe,beforeWidth:a.k1+(_?te:0),headerOffset:D,hideAfterCompletely:!U||T,leftOffset:_?a.k1:null,mainContainerHeader:B,mainContainerRef:Y,setAfterHidden:U,setAfterMousedownActive:ee,setAfterWidth:Q,setBeforeMousedownActive:le,setBeforeWidth:ie,children:[z&&(0,p.jsx)(h,{noPadding:q,children:z}),N]})})]}),A&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,p.jsx)(d.Z,O(O({},A),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var k=o.forwardRef(w)},65458:function(e,n,t){t.d(n,{d:function(){return s}});var i=t(13507),r=t(72473),o=t(57653),l=t(70515),d=t(81728),c=t(28598),u=1.5*l.iI,s=function(e,n){var t=[{beforeIcon:(0,c.jsx)(r.X5,{}),label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,d.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{beforeIcon:(0,c.jsx)(r.ZG,{}),label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{beforeIcon:(0,c.jsx)(i.Z,{size:u}),label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,d.Y6)(),type:o.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({beforeIcon:(0,c.jsx)(r.zQ,{}),label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),null!==n&&void 0!==n&&n.showAIModal&&t.push({beforeIcon:(0,c.jsx)(r.xq,{}),label:function(){return"Using AI (beta)"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showAIModal)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/AI_modal"}),t}},4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return c},Nk:function(){return d},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*l.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(l.cd*l.iI,"px;\n padding-top: ").concat(1*l.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*l.iI,2*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),l=t(30160),d=t(86735),c=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),a=(0,i.useMemo)((function(){return(0,d.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,c.jsx)(l.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return T}});var i=t(82394),r=t(75582),o=t(82684),l=t(69864),d=t(71180),c=t(15338),u=t(97618),s=t(55485),a=t(85854),p=t(48670),f=t(65956),h=t(82359),v=t(88543),m=t(38276),j=t(30160),g=t(17488),x=t(69650),b=t(12468),Z=t(35686),y=t(38626),P=t(44897),O=t(42631),w=t(70515),k=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],O.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),I=t(72473),C=t(72191),_=t(81728),S=t(72619),M=t(70320),N=t(23780),A=t(28598);function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function D(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n,t,y,P=e.cancelButtonText,O=e.contained,E=e.header,T=e.onCancel,B=e.onSaveSuccess,R=(0,N.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,r.Z)(R,1)[0],H=(0,o.useState)(null),z=H[0],q=H[1],L=(0,o.useState)(!1),F=L[0],W=L[1],G=Z.ZP.projects.list(),V=G.data,Y=G.mutate,X=(0,o.useMemo)((function(){var e;return null===V||void 0===V||null===(e=V.projects)||void 0===e?void 0:e[0]}),[V]),$=X||{},Q=$.name,J=$.openai_api_key,K=$.project_uuid,ee=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){z||q(X)}),[X,z]);var ne=(0,l.Db)(Z.ZP.projects.useUpdate(Q),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var n,t=e.project;Y(),q(t),W(!1),(0,M.h)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),B&&(null===B||void 0===B||B(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),te=(0,r.Z)(ne,2),ie=te[0],re=te[1].isLoading,oe=(0,o.useCallback)((function(e){return ie({project:e})}),[ie]),le=(0,A.jsxs)(A.Fragment,{children:[E,(0,A.jsxs)(f.Z,{noPadding:!0,children:[(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project name"})}),(0,A.jsx)(j.ZP,{default:!0,monospace:!0,children:Q})]}),(0,A.jsx)(c.Z,{light:!0}),(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,A.jsx)(j.ZP,{default:!!K,monospace:!0,muted:!K,children:K||"Not required"})]}),(0,A.jsx)(c.Z,{light:!0}),(0,A.jsx)(m.Z,{p:w.cd,children:(0,A.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,A.jsxs)(u.Z,{flexDirection:"column",children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,A.jsxs)(j.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,A.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsx)(x.Z,{compact:!0,checked:null===z||void 0===z?void 0:z.help_improve_mage,onCheck:function(){return q((function(e){return D(D({},e),{},{help_improve_mage:!(null!==z&&void 0!==z&&z.help_improve_mage)})}))}})]})})]}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,A.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===z||void 0===z||null===(n=z.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return q((function(n){var t,i,r,o,l,d;return D(D({},n),{},{pipelines:D(D({},null===n||void 0===n?void 0:n.pipelines),{},{settings:D(D({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:D(D({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(l=o.settings)||void 0===l||null===(d=l.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((null===z||void 0===z?void 0:z.features)||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],l=t[1];return(0,A.jsx)(m.Z,{mt:0===n?0:1,children:(0,A.jsxs)(s.ZP,{alignItems:"center",children:[(0,A.jsx)(x.Z,{checked:!!l,compact:!0,onCheck:function(){return q((function(e){return D(D({},e),{},{features:D(D({},null===z||void 0===z?void 0:z.features),{},(0,i.Z)({},o,!l))})}))}}),(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsxs)(u.Z,{children:[(0,A.jsx)(j.ZP,{default:!l,monospace:!0,children:(0,_.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,A.jsx)(m.Z,{ml:1,children:(0,A.jsx)(b.Z,{block:!0,description:"Display dates in local timezone. Please note that certain pages (e.g. Monitor page) or components (e.g. Pipeline run bar charts) may still be in UTC time. Dates in local time will have a timezone offset in the timestamp (e.g. -07:00).",lightBackground:!0,muted:!0,size:C._k})})]})]})},o)}))]})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsx)(f.Z,{noPadding:!0,children:(0,A.jsxs)(m.Z,{p:w.cd,children:[(0,A.jsx)(m.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"OpenAI"})}),J&&!F?(0,A.jsxs)(s.ZP,D(D({},s.A0),{},{children:[(0,A.jsx)(j.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,A.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return W(!0)},secondary:!0,title:"Edit",children:(0,A.jsx)(I.I8,{size:C.bL})})]})):(0,A.jsx)(g.Z,{disabled:ee,label:ee?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return q((function(n){return D(D({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===z||void 0===z?void 0:z.openai_api_key)||""})]})}),(0,A.jsx)(m.Z,{mt:w.HN}),(0,A.jsxs)(s.ZP,{alignItems:"center",children:[(0,A.jsx)(d.ZP,{loading:re,onClick:function(){oe({features:null===z||void 0===z?void 0:z.features,help_improve_mage:null===z||void 0===z?void 0:z.help_improve_mage,openai_api_key:null===z||void 0===z?void 0:z.openai_api_key,pipelines:null===z||void 0===z?void 0:z.pipelines})},primary:!0,children:"Save project settings"}),T&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m.Z,{mr:w.cd}),(0,A.jsx)(d.ZP,{onClick:T,secondary:!0,children:P||"Cancel"})]})]})]});return O?(0,A.jsx)(k,{children:le}):le}},88543:function(e,n,t){t.d(n,{S:function(){return Z},Z:function(){return y}});var i=t(82684),r=t(15338),o=t(97618),l=t(55485),d=t(85854),c=t(65956),u=t(82394),s=t(44085),a=t(38276),p=t(30160),f=t(17488),h=t(69650),v=t(72473),m=t(8193),j=t(70515),g=t(28598);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.children,i=e.description,r=e.invalid,d=e.large,c=void 0===d||d,u=e.selectInput,x=e.textInput,Z=e.title,y=e.toggleSwitch,P=e.warning;return(0,g.jsx)(a.Z,{p:j.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(l.ZP,{flexDirection:"column",children:[(0,g.jsxs)(p.ZP,{danger:r,default:!0,large:c,warning:P,children:[Z," ",r&&(0,g.jsx)(p.ZP,{danger:!0,inline:!0,large:c,children:"is required"})]}),i&&"string"===typeof i&&(0,g.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,g.jsx)(a.Z,{mr:j.cd}),(0,g.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,x&&(0,g.jsx)(f.Z,b({afterIcon:(0,g.jsx)(v.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},x)),u&&(0,g.jsx)(s.Z,b(b({},u),{},{afterIcon:(0,g.jsx)(v._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:c,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===u||void 0===u||null===(n=u.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,g.jsx)("option",{value:t,children:n||t},t)}))})),y&&(0,g.jsx)(h.Z,{checked:!(null===y||void 0===y||!y.checked),compact:!0,onCheck:null===y||void 0===y?void 0:y.onCheck})]})]})})},y=function(e){var n=e.children,t=e.description,u=e.headerChildren,s=e.title;return(0,g.jsxs)(c.Z,{noPadding:!0,children:[(0,g.jsx)(a.Z,{p:j.cd,children:(0,g.jsxs)(l.ZP,{alignItems:"center",children:[(0,g.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,g.jsx)(d.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,g.jsx)(a.Z,{mt:1,children:(0,g.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,g.jsxs)("div",{children:[(0,g.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return c},Z:function(){return d}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),d=2*l.iI,c=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2714],{67778:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(47329),i=t.n(r),l=t(82684),a=t(63588),o=t.n(a),s=t(5237),f=t(29989),u=t(81352),c=t(46119),d=t(88543),p=t(12765),h=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function g(e){var n=e.top,t=void 0===n?0:n,r=e.left,i=void 0===r?0:r,a=e.scale,g=e.width,y=e.stroke,v=void 0===y?"#eaf0f6":y,b=e.strokeWidth,x=void 0===b?1:b,O=e.strokeDasharray,w=e.className,k=e.children,T=e.numTicks,E=void 0===T?10:T,j=e.lineStyle,Z=e.offset,N=e.tickValues,M=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),D=null!=N?N:(0,c.Z)(a,E),I=(null!=Z?Z:0)+(0,p.Z)(a)/2,P=D.map((function(e,n){var t,r=(null!=(t=(0,d.Z)(a(e)))?t:0)+I;return{index:n,from:new u.Z({x:0,y:r}),to:new u.Z({x:g,y:r})}}));return l.createElement(f.Z,{className:o()("visx-rows",w),top:t,left:i},k?k({lines:P}):P.map((function(e){var n=e.from,t=e.to,r=e.index;return l.createElement(s.Z,m({key:"row-line-"+r,from:n,to:t,stroke:v,strokeWidth:x,strokeDasharray:O,style:j},M))})))}g.propTypes={tickValues:i().array,width:i().number.isRequired}},12765:function(e,n,t){function r(e){return"bandwidth"in e?e.bandwidth():0}t.d(n,{Z:function(){return r}})},84482:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flexDirection","alignItems","margin","display","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flexDirection,t=void 0===n?"row":n,r=e.alignItems,i=void 0===r?"center":r,s=e.margin,f=void 0===s?"0":s,u=e.display,c=void 0===u?"flex":u,d=e.children,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-item",style:{display:c,alignItems:i,flexDirection:t,margin:f}},p),d)}s.propTypes={alignItems:i().string,margin:i().oneOfType([i().string,i().number]),children:i().node,display:i().string}},76771:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flex","label","margin","align","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flex,t=void 0===n?"1":n,r=e.label,i=e.margin,s=void 0===i?"5px 0":i,f=e.align,u=void 0===f?"left":f,c=e.children,d=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-label",style:{justifyContent:u,display:"flex",flex:t,margin:s}},d),c||r)}s.propTypes={align:i().string,label:i().node,flex:i().oneOfType([i().string,i().number]),margin:i().oneOfType([i().string,i().number]),children:i().node}},17066:function(e,n,t){t.d(n,{Z:function(){return j}});var r=t(82684),i=t(47329),l=t.n(i),a=t(63588),o=t.n(a),s=t(84482),f=t(76771);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function c(e){var n=e.fill,t=e.width,i=e.height,l=e.style;return r.createElement("div",{style:u({width:t,height:i,background:n},l)})}c.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var d=t(29989);function p(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof t||"undefined"===typeof t?0:t,o="string"===typeof i||"undefined"===typeof i?0:i,s=Math.max(a,o),f=s/2;return r.createElement("svg",{width:s,height:s},r.createElement(d.Z,{top:f,left:f},r.createElement("circle",{r:f,fill:n,style:l})))}function h(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof i||"undefined"===typeof i?0:i,o="number"===typeof(null==l?void 0:l.strokeWidth)?null==l?void 0:l.strokeWidth:2;return r.createElement("svg",{width:t,height:i},r.createElement(d.Z,{top:a/2-o/2},r.createElement("line",{x1:0,x2:t,y1:0,y2:0,stroke:n,strokeWidth:o,style:l})))}function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}p.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])},h.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var g=function(){};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e){var n=e.shape,t=void 0===n?c:n,i=e.width,l=e.height,a=e.margin,o=e.label,s=e.item,f=e.itemIndex,u=e.fill,d=e.size,v=e.shapeStyle;return r.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:d?d(y({},o)):i,height:d?d(y({},o)):l,margin:a}},function(e){var n=e.shape,t=void 0===n?"rect":n,i=e.fill,l=void 0===i?g:i,a=e.size,o=void 0===a?g:a,s=e.width,f=e.height,u=e.label,d=e.item,y=e.itemIndex,v=e.shapeStyle,b=void 0===v?g:v,x={width:s,height:f,item:d,itemIndex:y,label:u,fill:l(m({},u)),size:o(m({},u)),style:b(m({},u))};return"string"===typeof t?"circle"===t?r.createElement(p,x):"line"===t?r.createElement(h,x):r.createElement(c,x):r.isValidElement(t)?r.cloneElement(t,x):t?r.createElement(t,x):null}({shape:t,item:s,itemIndex:f,label:o,width:i,height:l,fill:u,shapeStyle:v}))}function b(e){return e&&"object"===typeof e&&"value"in e&&"undefined"!==typeof e.value?e.value:e}function x(e){return String(b(e))}function O(e){var n=e.scale,t=e.labelFormat;return function(e,r){return{datum:e,index:r,text:""+t(e,r),value:n(e)}}}v.propTypes={itemIndex:l().number.isRequired,margin:l().oneOfType([l().string,l().number]),width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var w=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function k(){return k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var T={display:"flex"};function E(e){var n=e.className,t=e.style,i=void 0===t?T:t,l=e.scale,a=e.shape,u=e.domain,c=e.fill,d=void 0===c?x:c,p=e.size,h=void 0===p?x:p,m=e.labelFormat,g=void 0===m?b:m,y=e.labelTransform,E=void 0===y?O:y,j=e.shapeWidth,Z=void 0===j?15:j,N=e.shapeHeight,M=void 0===N?15:N,D=e.shapeMargin,I=void 0===D?"2px 4px 2px 0":D,P=e.shapeStyle,S=e.labelAlign,W=void 0===S?"left":S,F=e.labelFlex,z=void 0===F?"1":F,_=e.labelMargin,R=void 0===_?"0 4px":_,V=e.itemMargin,A=void 0===V?"0":V,C=e.direction,H=void 0===C?"column":C,q=e.itemDirection,L=void 0===q?"row":q,B=e.legendLabelProps,G=e.children,J=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,w),K=u||("domain"in l?l.domain():[]),Q=E({scale:l,labelFormat:g}),U=K.map(Q);return G?r.createElement(r.Fragment,null,G(U)):r.createElement("div",{className:o()("visx-legend",n),style:k({},i,{flexDirection:H})},U.map((function(e,n){return r.createElement(s.Z,k({key:"legend-"+e.text+"-"+n,margin:A,flexDirection:L},J),r.createElement(v,{shape:a,height:M,width:Z,margin:I,item:K[n],itemIndex:n,label:e,fill:d,size:h,shapeStyle:P}),r.createElement(f.Z,k({label:e.text,flex:z,margin:R,align:W},B)))})))}function j(e){return r.createElement(E,e)}E.propTypes={children:l().func,className:l().string,domain:l().array,shapeWidth:l().oneOfType([l().string,l().number]),shapeHeight:l().oneOfType([l().string,l().number]),shapeMargin:l().oneOfType([l().string,l().number]),labelAlign:l().string,labelFlex:l().oneOfType([l().string,l().number]),labelMargin:l().oneOfType([l().string,l().number]),itemMargin:l().oneOfType([l().string,l().number]),fill:l().func,size:l().func,shapeStyle:l().func}},5237:function(e,n,t){n.Z=function(e){var n=e.from,t=void 0===n?{x:0,y:0}:n,a=e.to,s=void 0===a?{x:1,y:1}:a,f=e.fill,u=void 0===f?"transparent":f,c=e.className,d=e.innerRef,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,l),h=t.x===s.x||t.y===s.y;return r.default.createElement("line",o({ref:d,className:(0,i.default)("visx-line",c),x1:t.x,y1:t.y,x2:s.x,y2:s.y,fill:u,shapeRendering:h?"crispEdges":"auto"},p))};var r=a(t(82684)),i=a(t(63588)),l=["from","to","fill","className","innerRef"];function a(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2714],{67778:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(47329),i=t.n(r),l=t(82684),a=t(63588),o=t.n(a),s=t(5237),f=t(29989),u=t(81352),c=t(46119),d=t(38469),p=t(12765),h=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function g(e){var n=e.top,t=void 0===n?0:n,r=e.left,i=void 0===r?0:r,a=e.scale,g=e.width,y=e.stroke,v=void 0===y?"#eaf0f6":y,b=e.strokeWidth,x=void 0===b?1:b,O=e.strokeDasharray,w=e.className,k=e.children,T=e.numTicks,E=void 0===T?10:T,j=e.lineStyle,Z=e.offset,N=e.tickValues,M=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),D=null!=N?N:(0,c.Z)(a,E),I=(null!=Z?Z:0)+(0,p.Z)(a)/2,P=D.map((function(e,n){var t,r=(null!=(t=(0,d.Z)(a(e)))?t:0)+I;return{index:n,from:new u.Z({x:0,y:r}),to:new u.Z({x:g,y:r})}}));return l.createElement(f.Z,{className:o()("visx-rows",w),top:t,left:i},k?k({lines:P}):P.map((function(e){var n=e.from,t=e.to,r=e.index;return l.createElement(s.Z,m({key:"row-line-"+r,from:n,to:t,stroke:v,strokeWidth:x,strokeDasharray:O,style:j},M))})))}g.propTypes={tickValues:i().array,width:i().number.isRequired}},12765:function(e,n,t){function r(e){return"bandwidth"in e?e.bandwidth():0}t.d(n,{Z:function(){return r}})},84482:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flexDirection","alignItems","margin","display","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flexDirection,t=void 0===n?"row":n,r=e.alignItems,i=void 0===r?"center":r,s=e.margin,f=void 0===s?"0":s,u=e.display,c=void 0===u?"flex":u,d=e.children,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-item",style:{display:c,alignItems:i,flexDirection:t,margin:f}},p),d)}s.propTypes={alignItems:i().string,margin:i().oneOfType([i().string,i().number]),children:i().node,display:i().string}},76771:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(47329),i=t.n(r),l=t(82684),a=["flex","label","margin","align","children"];function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}function s(e){var n=e.flex,t=void 0===n?"1":n,r=e.label,i=e.margin,s=void 0===i?"5px 0":i,f=e.align,u=void 0===f?"left":f,c=e.children,d=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,a);return l.createElement("div",o({className:"visx-legend-label",style:{justifyContent:u,display:"flex",flex:t,margin:s}},d),c||r)}s.propTypes={align:i().string,label:i().node,flex:i().oneOfType([i().string,i().number]),margin:i().oneOfType([i().string,i().number]),children:i().node}},17066:function(e,n,t){t.d(n,{Z:function(){return j}});var r=t(82684),i=t(47329),l=t.n(i),a=t(63588),o=t.n(a),s=t(84482),f=t(76771);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u.apply(this,arguments)}function c(e){var n=e.fill,t=e.width,i=e.height,l=e.style;return r.createElement("div",{style:u({width:t,height:i,background:n},l)})}c.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var d=t(29989);function p(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof t||"undefined"===typeof t?0:t,o="string"===typeof i||"undefined"===typeof i?0:i,s=Math.max(a,o),f=s/2;return r.createElement("svg",{width:s,height:s},r.createElement(d.Z,{top:f,left:f},r.createElement("circle",{r:f,fill:n,style:l})))}function h(e){var n=e.fill,t=e.width,i=e.height,l=e.style,a="string"===typeof i||"undefined"===typeof i?0:i,o="number"===typeof(null==l?void 0:l.strokeWidth)?null==l?void 0:l.strokeWidth:2;return r.createElement("svg",{width:t,height:i},r.createElement(d.Z,{top:a/2-o/2},r.createElement("line",{x1:0,x2:t,y1:0,y2:0,stroke:n,strokeWidth:o,style:l})))}function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}p.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])},h.propTypes={fill:l().string,width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var g=function(){};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}function v(e){var n=e.shape,t=void 0===n?c:n,i=e.width,l=e.height,a=e.margin,o=e.label,s=e.item,f=e.itemIndex,u=e.fill,d=e.size,v=e.shapeStyle;return r.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:d?d(y({},o)):i,height:d?d(y({},o)):l,margin:a}},function(e){var n=e.shape,t=void 0===n?"rect":n,i=e.fill,l=void 0===i?g:i,a=e.size,o=void 0===a?g:a,s=e.width,f=e.height,u=e.label,d=e.item,y=e.itemIndex,v=e.shapeStyle,b=void 0===v?g:v,x={width:s,height:f,item:d,itemIndex:y,label:u,fill:l(m({},u)),size:o(m({},u)),style:b(m({},u))};return"string"===typeof t?"circle"===t?r.createElement(p,x):"line"===t?r.createElement(h,x):r.createElement(c,x):r.isValidElement(t)?r.cloneElement(t,x):t?r.createElement(t,x):null}({shape:t,item:s,itemIndex:f,label:o,width:i,height:l,fill:u,shapeStyle:v}))}function b(e){return e&&"object"===typeof e&&"value"in e&&"undefined"!==typeof e.value?e.value:e}function x(e){return String(b(e))}function O(e){var n=e.scale,t=e.labelFormat;return function(e,r){return{datum:e,index:r,text:""+t(e,r),value:n(e)}}}v.propTypes={itemIndex:l().number.isRequired,margin:l().oneOfType([l().string,l().number]),width:l().oneOfType([l().string,l().number]),height:l().oneOfType([l().string,l().number])};var w=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function k(){return k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var T={display:"flex"};function E(e){var n=e.className,t=e.style,i=void 0===t?T:t,l=e.scale,a=e.shape,u=e.domain,c=e.fill,d=void 0===c?x:c,p=e.size,h=void 0===p?x:p,m=e.labelFormat,g=void 0===m?b:m,y=e.labelTransform,E=void 0===y?O:y,j=e.shapeWidth,Z=void 0===j?15:j,N=e.shapeHeight,M=void 0===N?15:N,D=e.shapeMargin,I=void 0===D?"2px 4px 2px 0":D,P=e.shapeStyle,S=e.labelAlign,W=void 0===S?"left":S,F=e.labelFlex,z=void 0===F?"1":F,_=e.labelMargin,R=void 0===_?"0 4px":_,V=e.itemMargin,A=void 0===V?"0":V,C=e.direction,H=void 0===C?"column":C,q=e.itemDirection,L=void 0===q?"row":q,B=e.legendLabelProps,G=e.children,J=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,w),K=u||("domain"in l?l.domain():[]),Q=E({scale:l,labelFormat:g}),U=K.map(Q);return G?r.createElement(r.Fragment,null,G(U)):r.createElement("div",{className:o()("visx-legend",n),style:k({},i,{flexDirection:H})},U.map((function(e,n){return r.createElement(s.Z,k({key:"legend-"+e.text+"-"+n,margin:A,flexDirection:L},J),r.createElement(v,{shape:a,height:M,width:Z,margin:I,item:K[n],itemIndex:n,label:e,fill:d,size:h,shapeStyle:P}),r.createElement(f.Z,k({label:e.text,flex:z,margin:R,align:W},B)))})))}function j(e){return r.createElement(E,e)}E.propTypes={children:l().func,className:l().string,domain:l().array,shapeWidth:l().oneOfType([l().string,l().number]),shapeHeight:l().oneOfType([l().string,l().number]),shapeMargin:l().oneOfType([l().string,l().number]),labelAlign:l().string,labelFlex:l().oneOfType([l().string,l().number]),labelMargin:l().oneOfType([l().string,l().number]),itemMargin:l().oneOfType([l().string,l().number]),fill:l().func,size:l().func,shapeStyle:l().func}},5237:function(e,n,t){n.Z=function(e){var n=e.from,t=void 0===n?{x:0,y:0}:n,a=e.to,s=void 0===a?{x:1,y:1}:a,f=e.fill,u=void 0===f?"transparent":f,c=e.className,d=e.innerRef,p=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,l),h=t.x===s.x||t.y===s.y;return r.default.createElement("line",o({ref:d,className:(0,i.default)("visx-line",c),x1:t.x,y1:t.y,x2:s.x,y2:s.y,fill:u,shapeRendering:h?"crispEdges":"auto"},p))};var r=a(t(82684)),i=a(t(63588)),l=["from","to","fill","className","innerRef"];function a(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o.apply(this,arguments)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{71610:function(e,n,i){var t=i(82394),r=i(75582),l=i(12691),o=i.n(l),s=i(38626),u=i(82684),c=i(32013),a=i(98777),d=i(15338),v=i(48670),h=i(88543),p=i(38276),m=i(4190),f=i(75499),j=i(30160),x=i(35686),g=i(70515),Z=i(30229),b=i(32080),y=i(81728),P=i(3917),O=i(55283),_=i(70320),E=i(28598);function k(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 S(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var T={large:!1};n.Z=function(e){var n=e.bookmarkValues,i=e.originalBookmarkValues,l=e.setBookmarkValues,k=e.pipeline,I=(0,u.useContext)(s.ThemeContext),C=(0,_.q)(),w=(0,u.useState)(null),M=w[0],A=w[1],N=(0,u.useMemo)((function(){return null!==k&&void 0!==k&&k.blocks?(0,b.n)(k):null}),[k]),L=(0,u.useMemo)((function(){return Object.keys(N||{})||[]}),[N]),D=x.ZP.integration_sources.pipelines.list(null===k||void 0===k?void 0:k.uuid,{block_uuid:L},{},{pauseFetch:!(null!==L&&void 0!==L&&L.length)}).data,R=(0,u.useMemo)((function(){return null===D||void 0===D?void 0:D.integration_sources}),[D]);return(0,u.useEffect)((function(){if((null===R||void 0===R?void 0:R.length)>=1&&(!n||!M)){var e={};null===R||void 0===R||R.map((function(n){var i,t=n.block,l=n.streams,o=null===t||void 0===t?void 0:t.uuid;e[o]={},null===(i=Object.entries(l||{}))||void 0===i||i.forEach((function(n){var i,t,l=(0,r.Z)(n,2),s=l[0],u=l[1];e[o][s]=null===u||void 0===u||null===(i=u.state)||void 0===i||null===(t=i.bookmarks)||void 0===t?void 0:t[s]}))})),n||l(e),M||A(e)}}),[n,M,l,A,R]),(0,E.jsxs)(p.Z,{p:g.cd,children:[!D&&(0,E.jsx)(m.Z,{inverted:!0,small:!0}),null===R||void 0===R?void 0:R.map((function(e){var s=e.block,m=e.pipeline_run,x=e.pipeline_schedule,b=e.streams,_=null===s||void 0===s?void 0:s.uuid;return(0,E.jsx)(h.Z,{title:(0,E.jsx)(j.ZP,{color:(0,O.qn)(null===s||void 0===s?void 0:s.type,{blockColor:null===s||void 0===s?void 0:s.color,theme:I}).accent,monospace:!0,children:_}),children:(0,E.jsx)(c.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(b||{}).map((function(e){var s,c,b,O,I=(0,r.Z)(e,2),w=I[0],A=I[1],N=A.record,L=A.state,D=(null===L||void 0===L||null===(s=L.bookmarks)||void 0===s?void 0:s[w])||{};return(0,E.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:w}),titleXPadding:g.cd*g.iI,titleYPadding:g.cd*g.iI,children:[(0,E.jsx)(h.S,S(S({},T),{},{title:"Last pipeline run started at",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===m||void 0===m?void 0:m.started_at)&&(0,P.XG)(null===m||void 0===m?void 0:m.started_at,C)})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Last pipeline run completed at",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(null===m||void 0===m?void 0:m.completed_at)&&(0,P.XG)(null===m||void 0===m?void 0:m.completed_at,C)})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Trigger",children:(0,E.jsx)(o(),{as:"/pipelines/".concat(null===k||void 0===k?void 0:k.uuid,"/triggers/").concat(null===x||void 0===x?void 0:x.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,E.jsx)(v.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.name})})})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Type",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(c=Z.Z4[null===x||void 0===x?void 0:x.schedule_type])||void 0===c?void 0:c.call(Z.Z4))||"")})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsx)(h.S,S(S({},T),{},{title:"Frequency",children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:null===x||void 0===x?void 0:x.schedule_interval})})),(0,E.jsx)(d.Z,{light:!0}),(0,E.jsxs)(p.Z,{p:g.cd,children:[(0,E.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,E.jsx)(p.Z,{mt:1,children:(0,E.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,E.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,E.jsx)(d.Z,{light:!0,short:!0}),!(null!==(b=Object.values(D||{}))&&void 0!==b&&b.length)&&(0,E.jsx)(p.Z,{p:g.cd,children:(0,E.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(D||{}).map((function(e){var o,s,c,a,d,v,p=(0,r.Z)(e,2),m=p[0],f=(p[1],null===n||void 0===n||null===(o=n[_])||void 0===o||null===(s=o[w])||void 0===s?void 0:s[m]),x=(null===i||void 0===i||null===(c=i[_])||void 0===c||null===(a=c[w])||void 0===a||a[m],null===M||void 0===M||null===(d=M[_])||void 0===d||null===(v=d[w])||void 0===v?void 0:v[m]);return(0,u.createElement)(h.S,S(S({},T),{},{title:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:m}),description:x&&x!==f&&(0,E.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:x})]}),key:"".concat(_,"-bookmark-values-").concat(m),textInput:{monospace:!0,onChange:function(e){return l((function(i){var r;return S(S({},i),{},(0,t.Z)({},_,S(S({},null===n||void 0===n?void 0:n[_]),{},(0,t.Z)({},w,S(S({},null===n||void 0===n||null===(r=n[_])||void 0===r?void 0:r[w]),{},(0,t.Z)({},m,e.target.value))))))}))},value:String(f||"")}}))})),(0,E.jsx)(d.Z,{light:!0}),(0,u.createElement)(h.S,S(S({},T),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(w)}),(0,E.jsx)(f.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(O=Object.entries(N||{}))||void 0===O?void 0:O.map((function(e){var n=(0,r.Z)(e,2),i=n[0],t=n[1];return[(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:i},i),(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:String(t)},"".concat(i,"-").concat(t))]}))}))]})}))})})}))]})}},12717:function(e,n,i){i.d(n,{Z:function(){return Ue}});var t=i(21831),r=i(82394),l=i(75582),o=i(12691),s=i.n(o),u=i(82684),c=i(20026),a=i.n(c),d=i(92083),v=i.n(d),h=i(21764),p=i(69864),m=i(34376),f=i(71610),j=i(71180),x=i(90299),g=i(14805),Z=i(70652),b=i(50724),y=i(9134),P=i(39457),O=i(38626),_=i(39867),E=i(55485),k=i(85854),S=i(38276),T=i(75499),I=i(30160),C=i(17488),w=i(12468),M=i(44375),A=i(70515),N=i(55283),L=i(86735),D=i(28598);function R(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 U(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?R(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var H=function(e){var n=e.blocks,i=e.updateVariables,t=e.variables,l=(0,u.useContext)(O.ThemeContext),o=(0,u.useCallback)((function(e,n){return i((function(){var i=(null===t||void 0===t?void 0:t.__mage_variables)||{},l=(null===i||void 0===i?void 0:i.blocks)||{},o=l[e]||{},s=(null===o||void 0===o?void 0:o.configuration)||{};return U(U({},t),{},{__mage_variables:U(U({},i),{},{blocks:U(U({},l),{},(0,r.Z)({},e,U(U({},o),{},{configuration:U(U({},s),n)})))})})}))}),[i,t]);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(k.Z,{children:"dbt runtime settings"}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(T.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,i,r,s=e.type,u=e.uuid,c=(0,M.IU)(e).name,a=(0,N.qn)(s,{blockColor:e.color,theme:l}).accent,d=null===t||void 0===t||null===(n=t.__mage_variables)||void 0===n||null===(i=n.blocks)||void 0===i||null===(r=i[u])||void 0===r?void 0:r.configuration,v=d||{},h=v.prefix,p=v.suffix,m=(null===d||void 0===d?void 0:d.flags)||[],f=!(null===m||void 0===m||!m.includes(M.Dy));return[(0,D.jsx)(w.Z,{block:!0,label:(0,D.jsx)(I.ZP,{monospace:!0,small:!0,children:u}),size:null,widthFitContent:!0,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(_.Z,{color:a,size:1.5*A.iI,square:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsxs)(I.ZP,{monospace:!0,small:!0,children:[h&&(0,D.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h}),c,p&&(0,D.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:p})]})]})},"uuid-".concat(u)),(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:f,label:M.Dy,monospace:!0,onClick:function(){return o(u,{flags:f?(0,L.Od)(m,(function(e){return M.Dy===e})):m.concat(M.Dy)})},small:!0})},"flags-".concat(u)),(0,D.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return o(u,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:h,width:10*A.iI},"prefix-".concat(u)),(0,D.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return o(u,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:p,width:10*A.iI},"suffix-".concat(u))]}))})})]})},q=i(97196),F=i(15338),z=i(97618),B=i(48670),G=i(26304),W=i(44897),Y=i(95363),K=i(61896),V=["children","large","lineHeight","ordered"];function J(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 X(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,r.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 Q=(0,O.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||W.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(Y.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(Y.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(K.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(K.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(K.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=O.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=O.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=O.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*A.iI,"px;\n ")}));var ie,te=function(e){var n=e.children,i=e.large,t=e.lineHeight,r=e.ordered,l=(0,G.Z)(e,V),o=r?ee:$;return(0,D.jsx)(o,X(X({large:i,lineHeight:t},l),{},{children:u.Children.map(n,(function(e,n){var t;return(0,D.jsx)(ne,X(X({large:i,marginTop:n>=1},l),{},{children:u.cloneElement(e)}),(null===(t=e.props)||void 0===t?void 0:t.key)||n)}))}))},re=i(37899),le=i(75457),oe=i(30229),se=i(57653),ue=i(83784),ce=i(82359),ae=i(44085),de=i(81334),ve=i(69650),he=i(81769),pe=i(54193),me=i(72473),fe=i(81728),je=i(16488),xe=i(70320),ge=(ie={},(0,r.Z)(ie,pe.zj.DATE,me.aw),(0,r.Z)(ie,pe.zj.DATETIME,me.Pf),(0,r.Z)(ie,pe.zj.DICTIONARY,me.$l),(0,r.Z)(ie,pe.zj.FLOAT,me.As),(0,r.Z)(ie,pe.zj.INTEGER,me.qZ),(0,r.Z)(ie,pe.zj.LIST,me.B4),(0,r.Z)(ie,pe.zj.STRING,me.KJ),ie);var Ze=function(e){var n,i,t,r=e.containerRef,o=e.date,s=e.interactions,c=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,v=e.setVariables,h=e.showSummary,p=e.time,m=e.triggerTypes,f=e.variables,j=(0,u.useMemo)((function(){return(0,L.HK)(s||[],(function(e){return e.uuid}))}),[s]),x=(0,u.useMemo)((function(){return(null===c||void 0===c?void 0:c.blocks)||[]}),[c]),g=(0,u.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,u.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,i){var t=(n||{uuid:null}).uuid,l=(null===g||void 0===g?void 0:g[t])||[];null===l||void 0===l||l.length;e.push((0,D.jsx)(S.Z,{p:A.cd,children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,D.jsx)(S.Z,{mt:n>=1?2*A.cd:0,children:(0,D.jsx)(he.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:v,variables:f})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[x,r,j,v,f]),b=(0,xe.q)(),y=(0,u.useMemo)((function(){return o&&null!==p&&void 0!==p&&p.hour&&null!==p&&void 0!==p&&p.minute?(0,je.XM)(o,p,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[o,b,p]),P=(0,u.useMemo)((function(){var e=[];null===x||void 0===x||x.length;return null===x||void 0===x||x.map((function(n,i){var t=(n||{uuid:null}).uuid,r=(null===g||void 0===g?void 0:g[t])||[];null===r||void 0===r||r.forEach((function(n,r){var o=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===o||void 0===o?void 0:o.variables)||{}).forEach((function(n,o){var s,u=(0,l.Z)(n,2),c=u[0],a=u[1],d=a.name,v=a.required,h=a.types,p=null===f||void 0===f?void 0:f[c],m="undefined"===typeof p,j=v&&m,x=(null===ge||void 0===ge?void 0:ge[h[0]])||me.KJ,g=[];"undefined"!==typeof p?p&&Array.isArray(p||[])?null===p||void 0===p||p.forEach((function(e){g.push(e&&"object"===typeof e?g.push(JSON.stringify(e)):g.push(String(e)))})):p&&"object"===typeof p?Object.entries(p||{}).forEach((function(e){var n=(0,l.Z)(e,2),i=n[0];n[1]&&g.push(String(i))})):g.push(String(p)):g.push(p||""),e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(x,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,monospace:!0,children:c})]},"".concat(t,"-").concat(c,"-label-").concat(d,"-").concat(i,"-").concat(r,"-").concat(o)),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsxs)(I.ZP,{danger:j,monospace:!j,muted:m,children:[m&&!j&&"-",j&&"This is required",!m&&!j&&(null===g||void 0===g||null===(s=g.map((function(e){return String(e)})))||void 0===s?void 0:s.join(", "))]})},"".concat(t,"-").concat(c,"-value-").concat(d,"-").concat(p,"-").concat(i,"-").concat(r,"-").concat(o))])}))}))})),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:e})}),[x,j,f]);return(0,D.jsxs)(D.Fragment,{children:[!h&&Z,h&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(F.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Bf,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===m||void 0===m||null===(n=m.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(i=n.label)||void 0===i?void 0:i.call(n):"This is required"})},"trigger_type_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsxs)(I.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,fe.vg)((null===d||void 0===d||null===(t=d.schedule_interval)||void 0===t?void 0:t.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,D.jsx)(S.Z,{py:A.cd,children:(0,D.jsx)(I.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(k.Z,{children:"Customize"})}),(0,D.jsx)(F.Z,{light:!0,short:!0}),P]})]})},be=i(35686),ye=i(77417),Pe=i(44425),Oe=i(88785),_e=i(28795),Ee={label:function(){return"CUSTOMIZE"},uuid:"customize"},ke={label:function(){return"SETTINGS"},uuid:"settings"},Se={label:function(){return"REVIEW"},uuid:"review"},Te=[ke,Ee,Se],Ie=i(32080),Ce=i(22286),we=i(79500),Me=i(8916),Ae=i(42122),Ne=i(72619),Le=i(3917);function De(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 Re(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?De(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):De(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ue=function(e){var n=e.creatingWithLimitation,i=e.errors,o=e.fetchPipelineSchedule,c=e.onCancel,d=e.pipeline,O=e.pipelineSchedule,_=e.setErrors,w=e.variables,M=e.useCreateScheduleMutation,R=(0,ye.Z)().project,U=(0,u.useRef)(null),G=(0,m.useRouter)(),W=(0,xe.q)(),Y=null===d||void 0===d?void 0:d.uuid,K=(0,u.useMemo)((function(){return null===O||void 0===O?void 0:O.id}),[O]),V=(null===d||void 0===d?void 0:d.type)===se.qL.STREAMING,J=(0,u.useMemo)((function(){var e;return null===O||void 0===O||null===(e=O.variables)||void 0===e?void 0:e[oe.PN]}),[O]),X=(0,u.useState)(J?"string"===typeof J&&(0,fe.Pb)(J)?JSON.stringify(J):J:null),Q=X[0],$=X[1],ee=(0,u.useState)([]),ne=ee[0],ie=ee[1],he=(0,u.useState)(!0),pe=he[0],ge=he[1],De=(0,u.useState)(!1),Ue=De[0],He=De[1],qe=(0,u.useState)(!1),Fe=qe[0],ze=qe[1],Be=(0,u.useState)(null),Ge=Be[0],We=Be[1],Ye=(0,u.useState)({}),Ke=Ye[0],Ve=Ye[1],Je=(0,u.useState)(null),Xe=Je[0],Qe=Je[1],$e=(0,u.useState)(null),en=$e[0],nn=$e[1],tn=(0,u.useState)(!1),rn=tn[0],ln=tn[1],on=(0,u.useState)(null),sn=on[0],un=on[1],cn=be.ZP.client_pages.detail("pipeline_schedule:create",{"pipeline_schedules[]":[K],"pipelines[]":[Y]},{},{key:"Triggers/Edit/".concat(Y,"/").concat(K),pauseFetch:!Y||!K}).data,an=((0,u.useMemo)((function(){return null===cn||void 0===cn?void 0:cn.client_page}),[cn]),(0,u.useState)(Te[0].uuid)),dn=an[0],vn=an[1],hn=(0,u.useMemo)((function(){var e;return!(null===R||void 0===R||null===(e=R.features)||void 0===e||!e[ce.d.INTERACTIONS])}),[null===R||void 0===R?void 0:R.features]),pn=(0,u.useMemo)((function(){return!K&&n}),[n,K]),mn=be.ZP.pipeline_interactions.detail(hn&&Y,{filter_for_permissions:1}).data,fn=be.ZP.interactions.pipeline_interactions.list(hn&&Y).data,jn=(0,u.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.pipeline_interaction)||{}}),[mn]),xn=(0,u.useMemo)((function(){return(null===fn||void 0===fn?void 0:fn.interactions)||[]}),[fn]),gn=(0,u.useMemo)((function(){var e;return hn&&(null===(e=Object.keys((null===jn||void 0===jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[hn,jn]),Zn=(0,u.useMemo)((function(){return!!K&&gn}),[gn,K]),bn=(0,u.useMemo)((function(){var e,n={};return null===jn||void 0===jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var i=e.triggers;null===i||void 0===i||i.forEach((function(e){var i=e.schedule_interval,t=e.schedule_type;null!==n&&void 0!==n&&n[t]||(n[t]={}),i&&(n[t][i]=!0)}))})),n}),[jn]),yn=(0,u.useMemo)((function(){return(0,Me.wx)(w,(function(e){return e.uuid===ue.C}))}),[w]),Pn=(0,u.useMemo)((function(){return Xe||{}}),[Xe]),On=Pn.description,_n=Pn.name,En=Pn.schedule_interval,kn=Pn.schedule_type,Sn=Pn.settings,Tn=void 0===Sn?{}:Sn,In=Pn.start_time,Cn=Pn.tags,wn=Pn.variables,Mn=void 0===wn?{}:wn;(0,u.useEffect)((function(){!Ge&&Tn&&We(Tn)}),[Ge,Tn]);var An=(0,u.useState)(null),Nn=An[0],Ln=An[1],Dn=(0,u.useState)({hour:"00",minute:"00"}),Rn=Dn[0],Un=Dn[1],Hn=(0,u.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),qn=Hn[0],Fn=Hn[1],zn=be.ZP.event_rules.detail(oe.Xm.EVENT===kn?"aws":null).data,Bn=(0,u.useMemo)((function(){var e;return(null===zn||void 0===zn||null===(e=zn.event_rule)||void 0===e?void 0:e.rules)||[]}),[zn]),Gn=(0,u.useMemo)((function(){return(0,L.HK)(Bn,(function(e){return e.name}))}),[Bn]),Wn=(0,p.Db)(be.ZP.pipeline_schedules.useUpdate(K),{onSuccess:function(e){return(0,Ne.wD)(e,{callback:function(){null===o||void 0===o||o(),G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(Y,"/triggers/").concat(K))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Yn=(0,l.Z)(Wn,2),Kn=Yn[0],Vn=Yn[1].isLoading,Jn=(0,u.useMemo)((function(){return Mn||{}}),[Mn]);(0,u.useEffect)((function(){if(In){var e=(0,we.a)(In,{localTimezone:W});Ln(null===e||void 0===e?void 0:e.date),Un(null===e||void 0===e?void 0:e.time);var n=v()(In).utc();Fn({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var i=new Date;Ln(i),Un(W?{hour:(0,Le.lJ)(String(i.getHours())),minute:(0,Le.lJ)(String(i.getMinutes()))}:{hour:(0,Le.lJ)(String(i.getUTCHours())),minute:(0,Le.lJ)(String(i.getUTCMinutes()))})}}),[W,In]),(0,u.useEffect)((function(){Jn&&Object.keys(Jn).length>0&&ge(!0)}),[Jn]),(0,u.useEffect)((function(){Ve(pe?null===yn||void 0===yn?void 0:yn.reduce((function(e,n){var i=n.uuid,t=n.value;return Re(Re({},e),{},(0,r.Z)({},i,Jn[i]||t))}),{}):null)}),[yn,pe,Jn]);var Xn=(0,u.useMemo)((function(){return(0,je._U)(En)}),[En]),Qn=(0,u.useMemo)((function(){return Xn&&sn?a().toString(sn,{throwExceptionOnParseError:!1}):""}),[sn,Xn]),$n=(0,u.useMemo)((function(){return null===Qn||void 0===Qn?void 0:Qn.toLowerCase().includes("error")}),[Qn]);(0,u.useEffect)((function(){if(O&&!Xe){if(ie(O.event_matchers),(0,je._U)(null===O||void 0===O?void 0:O.schedule_interval)){var e=W?(0,je.lO)(null===O||void 0===O?void 0:O.schedule_interval):null===O||void 0===O?void 0:O.schedule_interval;un(e),Qe(Re(Re({},O),{},{schedule_interval:"custom"}))}else Qe(V?Re(Re({},O),{},{schedule_interval:oe.U5.ONCE}):O);var n=O.sla;if(n){He(!0);var i=(0,je.gU)(n),t=i.time,r=i.unit;Qe((function(e){return Re(Re({},e),{},{slaAmount:t,slaUnit:r})}))}}}),[W,V,O,Xe,En]);var ei=(0,u.useMemo)((function(){return!(null===Ge||void 0===Ge||!Ge.landing_time_enabled)}),[Ge]),ni=(0,u.useMemo)((function(){return oe.Xm.TIME!==kn||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(En)}),[En,kn]),ii=(0,u.useMemo)((function(){return ei&&!ni}),[ni,ei]),ti=(0,u.useCallback)((function(){var e=Re(Re({},(0,Ae.GL)(Xe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Me.e7)(Re(Re({},Ke),Q?(0,r.Z)({},oe.PN,Q):{}))});if(ii){var n=qn.dayOfMonth,i=qn.dayOfWeek,t=qn.hour,l=qn.minute,o=qn.second,s=v()("2023-07-01").utc();(0,fe.HW)(n)&&(s=s.date(n)),(0,fe.HW)(i)&&(s=s.day(i)),(0,fe.HW)(t)&&(s=s.hours(t)),(0,fe.HW)(l)&&(s=s.minutes(l)),(0,fe.HW)(o)&&(s=s.seconds(o)),e.schedule_interval=Xn?sn:Xe.schedule_interval,e.start_time=s.toISOString()}else oe.Xm.EVENT===Xe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Xn?W&&!$n&&sn?(0,je.lO)(sn,!0):sn:Xe.schedule_interval,e.start_time=Nn&&null!==Rn&&void 0!==Rn&&Rn.hour&&null!==Rn&&void 0!==Rn&&Rn.minute?(0,je.XM)(Nn,Rn,{convertToUtc:W,includeSeconds:!0,localTimezone:W}):null);if(Ue){var u=null===Xe||void 0===Xe?void 0:Xe.slaAmount,c=null===Xe||void 0===Xe?void 0:Xe.slaUnit;if(!u||isNaN(u)||!c)return void h.Am.error("Please enter a valid SLA",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,je.vJ)(u,c)}else null!==O&&void 0!==O&&O.sla&&(e.sla=0);e.settings=Ge,Kn({pipeline_schedule:Re(Re({},e),{},{variables:en||(null===e||void 0===e?void 0:e.variables)})})}),[Q,$n,sn,Nn,W,Ue,ne,Xn,qn,O,Ke,Xe,Ge,ii,Rn,Kn,en]),ri=(0,u.useMemo)((function(){if(null===O||void 0===O||!O.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===O||void 0===O?void 0:O.runtime_average),n=Math.max(Math.floor(e/3600),0),i=Math.max(Math.floor((e-60*n*60)/60),0),t=Math.max(Math.floor(e-(60*n*60+60*i)),0),r=[];return n>=1&&r.push((0,fe._6)("hour",n,!0)),i>=1&&r.push((0,fe._6)("minute",i,!0)),t>=1&&r.push((0,fe._6)("second",t,!0)),r.join(" ")}),[O]),li=(0,u.useMemo)((function(){if(!ii)return null;var e=[(0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Fn((function(n){return Re(Re({},n),{},{minute:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.minute)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(60).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Fn((function(n){return Re(Re({},n),{},{second:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.second)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(60).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(En)&&e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Fn((function(n){return Re(Re({},n),{},{hour:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.hour)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(24).map((function(e,n){return(0,D.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===En?e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Fn((function(n){return Re(Re({},n),{},{dayOfWeek:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.dayOfWeek)||"",children:[(0,D.jsx)("option",{value:""}),(0,D.jsx)("option",{value:6,children:"Sunday"}),(0,D.jsx)("option",{value:0,children:"Monday"}),(0,D.jsx)("option",{value:1,children:"Tuesday"}),(0,D.jsx)("option",{value:2,children:"Wednesday"}),(0,D.jsx)("option",{value:3,children:"Thursday"}),(0,D.jsx)("option",{value:4,children:"Friday"}),(0,D.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===En&&e.unshift((0,D.jsxs)(S.Z,{mr:1,children:[(0,D.jsx)(S.Z,{mb:1,children:(0,D.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,D.jsxs)(ae.Z,{compact:!0,monospace:!0,onChange:function(e){Fn((function(n){return Re(Re({},n),{},{dayOfMonth:e.target.value})}))},value:(null===qn||void 0===qn?void 0:qn.dayOfMonth)||"",children:[(0,D.jsx)("option",{value:""}),(0,L.w6)(31).map((function(e,n){return(0,D.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,D.jsx)(E.ZP,{children:e})}),[qn,En,ii]),oi=(0,u.useMemo)((function(){return[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),si=(0,u.useMemo)((function(){return[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.KJ,{default:!0}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{description:e.target.value})}))},placeholder:"Description",value:On},"trigger_description_input")]}),[On]),ui=(0,u.useMemo)((function(){var e=[oi,si,[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,D.jsxs)("div",{children:[(0,D.jsxs)(ae.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;Qe((function(e){return Re(Re({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:En,children:[Object.values(oe.U5).reduce((function(e,n){var i;return!pn||null!==bn&&void 0!==bn&&null!==(i=bn[oe.Xm.TIME])&&void 0!==i&&i[n]?e.concat((0,D.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!pn&&(0,D.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!pn&&(0,D.jsx)(S.Z,{mt:1,p:1,children:(0,D.jsxs)(I.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return pn||e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.rs,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,D.jsxs)("div",{children:[(0,D.jsx)(ve.Z,{checked:ei,disabled:ni,onCheck:function(){We((function(e){return Re(Re({},e),{},{landing_time_enabled:!ei})}))}}),(0,D.jsxs)(S.Z,{mt:1,p:1,children:[ni&&(0,D.jsxs)(I.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.HOURLY}),", ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.DAILY}),", ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.WEEKLY}),", or ",(0,D.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:oe.U5.MONTHLY}),"."]}),!ni&&(0,D.jsx)(I.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),ii&&e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.Pf,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,D.jsx)(E.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*A.iI,"px")},children:(0,D.jsx)(I.ZP,{monospace:!0,children:ri})},"runtime_average_value")]),e.push([(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsxs)(I.ZP,{default:!0,children:[ii&&"Pipeline complete by",!ii&&"Start date and time"]})]},"start_time"),ii?li:(0,D.jsxs)("div",{style:{minHeight:"".concat(5.75*A.iI,"px")},children:[!rn&&(0,D.jsx)(C.Z,{monospace:!0,onClick:function(){return ln((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Nn?(0,je.XM)(Nn,Rn,{localTimezone:W}):""}),(0,D.jsx)("div",{style:{width:"400px"},children:(0,D.jsx)(b.Z,{disableEscape:!0,onClickOutside:function(){return ln(!1)},open:rn,style:{position:"relative"},children:(0,D.jsx)(g.Z,{localTime:W,selectedDate:Nn,selectedTime:Rn,setSelectedDate:Ln,setSelectedTime:Un,topPosition:!0})})})]},"start_time_input")]),V&&e.splice(2,2),Xn&&e.splice(2,0,[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.EK,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,D.jsxs)("div",{children:[(0,D.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),un(e.target.value)},placeholder:"* * * * *",value:sn}),(0,D.jsxs)(S.Z,{mt:1,p:1,children:[(0,D.jsx)(I.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,D.jsx)(S.Z,{mb:"2px"}),sn?(0,D.jsx)(I.ZP,{danger:$n,muted:!0,small:!0,children:$n?"Invalid cron expression. Please check the cron syntax.":(0,D.jsxs)(D.Fragment,{children:['"',Qn,'"']})}):null,W&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(I.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,D.jsxs)(I.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,D.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,D.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:2,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(F.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:e})]})}),[$n,sn,Nn,W,pn,Xn,V,ni,ei,li,bn,Qn,ri,En,rn,ii,Rn,oi,si]),ci=(0,u.useCallback)((function(e,n){ie((function(i){return Object.entries(n).forEach((function(n){var t=(0,l.Z)(n,2),r=t[0],o=t[1];i[e][r]=o})),(0,t.Z)(i)}))}),[ie]),ai=(0,u.useMemo)((function(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:A.cd,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(F.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[oi,si]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Events"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,D.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,D.jsxs)(S.Z,{mt:A.Mq,children:[(0,D.jsx)(I.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,D.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,D.jsx)(B.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,D.jsx)(S.Z,{mt:1,children:(0,D.jsxs)(te,{monospace:!0,ordered:!0,children:[(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,D.jsx)(I.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,D.jsx)(F.Z,{light:!0,short:!0}),(null===ne||void 0===ne?void 0:ne.length)>=1&&(0,D.jsx)(T.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===ne||void 0===ne?void 0:ne.map((function(e,n){var i=e.event_type,t=e.name,r=e.pattern,l=e.id||"".concat(i,"-").concat(t,"-").concat(n,"-").concat(JSON.stringify(r)),o=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,D.jsx)(ae.Z,{monospace:!0,onChange:function(e){return ci(n,{event_type:e.target.value})},placeholder:"Event provider",value:i||"",children:q.S5.map((function(e){var n=e.label,i=e.uuid;return(0,D.jsx)("option",{value:i,children:n()},i)}))},"event-provider-".concat(l)),(0,D.jsx)(ae.Z,{monospace:!0,onChange:function(e){var i,t=e.target.value,r=null===(i=Gn[t])||void 0===i?void 0:i.event_pattern;ci(n,{name:t,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:t,children:Bn.map((function(e){var n=e.name;return(0,D.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),r&&(0,D.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,D.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return ie((function(e){return(0,L.oM)(e,n)}))},children:(0,D.jsx)(me.rF,{default:!0,size:2*A.iI})},"remove_event")]}))}),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.mm,{size:2*A.iI}),onClick:function(){return ie((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,Bn,Gn,oi,si,ci]),di=(0,u.useMemo)((function(){var e=(0,je.M8)(O,Fe);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mb:A.cd,px:A.cd,children:(0,D.jsx)(k.Z,{children:"Settings"})}),(0,D.jsx)(F.Z,{light:!0,short:!0}),(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[oi,si]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Endpoint"}),(0,D.jsxs)(I.ZP,{muted:!0,children:["Make a ",(0,D.jsx)(I.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(S.Z,{mr:1,children:(0,D.jsx)(ve.Z,{checked:Fe,onCheck:function(){return ze(!Fe)}})}),(0,D.jsx)(I.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),Fe&&(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Headers"}),(0,D.jsx)(I.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n "),withCopyIcon:!0,children:(0,D.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===O||void 0===O?void 0:O.token,"\n ")})})})]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Payload"}),(0,D.jsx)(I.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(P.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,D.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,D.jsxs)(S.Z,{mb:2,mt:5,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Sample cURL command"}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(y.Z,{language:"bash",small:!0,source:Fe?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===O||void 0===O?void 0:O.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[O,ze,si,oi,Fe]),vi=!kn||oe.Xm.TIME===kn&&!(V&&Nn||!V&&Nn&&En)||oe.Xm.EVENT===kn&&(!(null!==ne&&void 0!==ne&&ne.length)||!ne.every((function(e){var n=e.event_type,i=e.name;return n&&i}))),hi=(0,u.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return Pe.tf.DBT===n})))||[]}),[d]),pi=(0,u.useMemo)((function(){return null!==d&&void 0!==d&&d.blocks?(0,Ie.n)(d):null}),[d]),mi=(0,u.useMemo)((function(){var e,n;return(0,D.jsxs)(S.Z,{py:A.cd,children:[(0,D.jsxs)(S.Z,{mb:A.HN,px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Run settings"}),(0,D.jsxs)(S.Z,{mt:A.Mq,children:[!V&&(0,D.jsxs)(S.Z,{mb:A.Mq,children:[(0,D.jsx)(I.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,D.jsx)(S.Z,{mb:1}),(0,D.jsx)(C.Z,{label:"Timeout (in seconds)",onChange:function(e){return We((function(n){return Re(Re({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===Ge||void 0===Ge?void 0:Ge.timeout})]}),(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(S.Z,{mr:2,children:(0,D.jsx)(ve.Z,{checked:Ue,onCheck:function(e){He(e),e||Qe((function(e){return Re(Re({},e),{},{slaAmount:0})}))}})}),(0,D.jsx)(I.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),Ue&&(0,D.jsx)(T.Z,{columnFlex:[null,1],rows:[[(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(me.aw,{default:!0,size:1.5*A.iI}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,D.jsxs)(E.ZP,{children:[(0,D.jsx)(z.Z,{flex:1,children:(0,D.jsx)(C.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Xe||void 0===Xe?void 0:Xe.slaAmount})}),(0,D.jsx)(z.Z,{flex:1,children:(0,D.jsx)(ae.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Qe((function(n){return Re(Re({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Xe||void 0===Xe?void 0:Xe.slaUnit,children:Object.keys(je.tL).map((function(e){return(0,D.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return We((function(e){return Re(Re({},e),{},{allow_blocks_to_fail:!(null!==Ge&&void 0!==Ge&&Ge.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===kn&&(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(E.ZP,{alignItems:"center",children:(0,D.jsx)(Z.Z,{checked:null===Ge||void 0===Ge?void 0:Ge.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return We((function(e){return Re(Re({},e),{},{skip_if_previous_running:!(null!==Ge&&void 0!==Ge&&Ge.skip_if_previous_running)})}))}})})})]}),(0,D.jsxs)(S.Z,{mb:A.HN,children:[(0,D.jsxs)(S.Z,{px:A.cd,children:[(0,D.jsx)(k.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,D.jsxs)(S.Z,{mt:1,children:[(0,D.jsx)(I.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,D.jsx)(s(),{as:"/pipelines/".concat(Y,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsx)(B.Z,{primary:!0,children:"Click here"})})," ",(0,D.jsx)(I.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,D.jsx)(S.Z,{mt:A.Mq,children:(0,D.jsx)(re.Z,{enableVariablesOverwrite:!0,originalVariables:null===O||void 0===O?void 0:O.variables,runtimeVariables:Ke,setRuntimeVariables:Ve})})]}),pi&&(null===(e=Object.keys(pi||{}))||void 0===e?void 0:e.length)>=1&&(0,D.jsxs)(S.Z,{mb:A.HN,children:[(0,D.jsx)(S.Z,{px:A.cd,children:(0,D.jsx)(k.Z,{children:"Override bookmark values"})}),(0,D.jsx)(f.Z,{bookmarkValues:Q,originalBookmarkValues:null===O||void 0===O||null===(n=O.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null===hi||void 0===hi?void 0:hi.length)>=1&&(0,D.jsx)(S.Z,{mb:A.HN,children:(0,D.jsx)(H,{blocks:hi,updateVariables:Ve,variables:Re(Re({},Jn),Ke)})})]})}),[pi,Q,hi,Ue,yn,V,pe,d,Y,Ke,Xe,kn,Jn,$,He,ge,Ve,Ge]),fi=be.ZP.tags.list().data,ji=(0,u.useMemo)((function(){return((null===fi||void 0===fi?void 0:fi.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==Cn&&void 0!==Cn&&Cn.includes(n))}))}),[fi,Cn]),xi=(0,u.useMemo)((function(){return(0,je.ri)(V)}),[V]),gi=(0,u.useMemo)((function(){return(0,D.jsx)(Ze,{containerRef:U,date:Nn,interactions:xn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Xe,setVariables:function(e){Qe((function(n){var i=Re({},e((null===n||void 0===n?void 0:n.variables)||{})),t=Re({},i);return null===xn||void 0===xn||xn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),i=n[0],r=n[1].types;t&&i in t&&(t[i]=(0,Ce.M)(t[i],r))}))})),nn(t),Re(Re({},n),{},{variables:i})}))},showSummary:Se.uuid===dn,time:Rn,triggerTypes:xi,variables:null===Xe||void 0===Xe?void 0:Xe.variables})}),[U,Nn,xn,d,jn,Xe,dn,Qe,nn,Rn,xi]),Zi=(0,u.useMemo)((function(){return oe.fq.ACTIVE===(null===Xe||void 0===Xe?void 0:Xe.status)}),[Xe]),bi=M?null===M||void 0===M?void 0:M((function(e){return G.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],yi=(0,l.Z)(bi,2),Pi=yi[0],Oi=yi[1].isLoading,_i=(0,u.useCallback)((function(){null===Pi||void 0===Pi||Pi({pipeline_schedule:Re(Re({},Xe),{},{variables:en||(null===Xe||void 0===Xe?void 0:Xe.variables)})})}),[Pi,en,Xe]),Ei=(0,u.useMemo)((function(){var e,n;return K?(e=(0,D.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,D.jsx)(j.ZP,{onClick:ti,primary:!0,children:"Save trigger"})):ke.uuid===dn?(e=(0,D.jsx)(j.ZP,{onClick:function(){return null===c||void 0===c?void 0:c()},secondary:!0,children:"Cancel and go back"}),n=(0,D.jsx)(j.ZP,{afterIcon:(0,D.jsx)(me.Kw,{}),onClick:function(){return vn(Ee.uuid)},primary:!0,children:"Next: Customize"})):Ee.uuid===dn?(e=(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Hd,{}),onClick:function(){return vn(ke.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,D.jsx)(j.ZP,{afterIcon:(0,D.jsx)(me.Kw,{}),onClick:function(){return vn(Se.uuid)},primary:!0,children:"Next: Review"})):Se.uuid===dn&&(e=(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Hd,{}),onClick:function(){return vn(Ee.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(j.ZP,{beforeIcon:(0,D.jsx)(me.Bf,{}),loading:Oi,onClick:function(){return _i()},primary:!0,children:K?"Save trigger":"Create trigger"}),!K&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsx)(ve.Z,{checked:Zi,compact:!0,onCheck:function(e){return Qe((function(n){return Re(Re({},n),{},{status:e(Zi)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,D.jsx)(S.Z,{mr:1}),(0,D.jsx)(I.ZP,{default:Zi,muted:!Zi,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,D.jsx)(S.Z,{p:A.cd,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[e,e&&n&&(0,D.jsx)(S.Z,{mr:A.cd}),n]})})}),[_i,Oi,Zi,c,ti,K,Y,dn,vn]),ki=(0,u.useMemo)((function(){var e,n,i,t,r,l,o;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===R||void 0===R||null===(i=R.pipelines)||void 0===i||null===(t=i.settings)||void 0===t||null===(r=t.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,R]);return(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(le.Z,{after:!pn&&mi,afterHidden:pn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(Y,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===O||void 0===O?void 0:O.name},linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:i,pageName:_e.M.TRIGGERS,pipeline:d,setErrors:_,subheader:pn||Zn?(0,D.jsx)(S.Z,{px:A.cd,children:(0,D.jsx)(x.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return vn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Te,underlineColor:(0,N.qn)(Pe.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(j.ZP,{disabled:vi,loading:Vn,onClick:ti,outline:!0,primary:!0,children:"Save changes"}),(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(Y,"/triggers/").concat(K),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),ki&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsxs)(I.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,D.jsx)("br",{}),"To change this behavior, update the ",(0,D.jsx)(s(),{as:"/pipelines/".concat(Y,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,D.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,D.jsx)(s(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,D.jsx)(B.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:pn||Zn,title:function(){return null!==O&&void 0!==O&&O.name?"Edit ".concat(null===O||void 0===O?void 0:O.name):"New trigger"},uuid:"triggers/edit",children:(0,D.jsxs)("div",{ref:U,children:[(pn||Zn)&&(0,D.jsx)(F.Z,{light:!0}),(pn||Zn)&&(Ee.uuid===dn||Se.uuid===dn)&&gi,(!pn||ke.uuid===dn)&&(!Zn||ke.uuid===dn)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(S.Z,{p:A.cd,children:[(0,D.jsxs)(S.Z,{mb:2,children:[(0,D.jsx)(k.Z,{children:"Trigger type"}),(0,D.jsx)(I.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,D.jsx)(E.ZP,{children:xi.reduce((function(e,n){var i=n.label,t=n.description,r=n.uuid,l=kn===r,o=kn&&!l;return!pn||null!==bn&&void 0!==bn&&bn[r]?e.concat((0,D.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==r||null!==ne&&void 0!==ne&&ne.length||ie([{}]),Qe((function(e){return Re(Re({},e),{},{schedule_type:r})}))},children:(0,D.jsx)(Oe.U,{selected:l,children:(0,D.jsxs)(E.ZP,{alignItems:"center",children:[(0,D.jsx)(z.Z,{children:(0,D.jsx)("input",{checked:l,type:"radio"})}),(0,D.jsx)(S.Z,{mr:A.cd}),(0,D.jsxs)(z.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,D.jsx)(k.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:i()}),(0,D.jsx)(I.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)):e}),[])})]}),(0,D.jsxs)(S.Z,{mt:A.HN,children:[oe.Xm.TIME===kn&&ui,oe.Xm.EVENT===kn&&ai,oe.Xm.API===kn&&di]}),!pn&&(0,D.jsxs)(S.Z,{mt:A.HN,px:A.cd,children:[(0,D.jsxs)(S.Z,{mb:2,children:[(0,D.jsx)(k.Z,{children:"Tags"}),(0,D.jsx)(I.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,D.jsx)(de.Z,{removeTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:null===Cn||void 0===Cn?void 0:Cn.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){Qe((function(n){return Re(Re({},n),{},{tags:(0,L.$C)(e.uuid,Cn,(function(n){return n===e.uuid}))})}))},selectedTags:null===Cn||void 0===Cn?void 0:Cn.map((function(e){return{uuid:e}})),tags:ji,uuid:"TagsAutocompleteInputField-trigger-".concat(K)})]})]}),(pn||Zn)&&Ei]})})})}},97196:function(e,n,i){i.d(n,{S5:function(){return l},_P:function(){return o}});var t,r=i(86735);!function(e){e.AWS="aws_event"}(t||(t={}));var l=[{label:function(){return"AWS"},uuid:t.AWS}],o=(0,r.HK)(l,(function(e){return e.uuid}))},61599:function(e,n,i){i.d(n,{D5:function(){return j},MU:function(){return o},RL:function(){return c},Xv:function(){return a},Zj:function(){return f},_B:function(){return r},eL:function(){return d},fe:function(){return p},jL:function(){return u},kB:function(){return x},ks:function(){return h},th:function(){return m},u7:function(){return v},zS:function(){return s}});var t,r,l=i(82394);!function(e){e.FULL_TABLE="FULL_TABLE",e.INCREMENTAL="INCREMENTAL",e.LOG_BASED="LOG_BASED"}(r||(r={}));var o,s,u=[r.FULL_TABLE,r.INCREMENTAL];!function(e){e.IGNORE="IGNORE",e.UPDATE="UPDATE"}(o||(o={})),function(e){e.DATE_TIME="date-time",e.UUID="uuid"}(s||(s={}));var c,a="datetime",d=(t={},(0,l.Z)(t,s.DATE_TIME,a),(0,l.Z)(t,s.UUID,s.UUID),t);!function(e){e.ARRAY="array",e.BOOLEAN="boolean",e.INTEGER="integer",e.NULL="null",e.NUMBER="number",e.OBJECT="object",e.STRING="string"}(c||(c={}));var v,h,p,m,f,j=[c.ARRAY,c.BOOLEAN,a,c.INTEGER,c.NULL,c.NUMBER,c.OBJECT,c.STRING,s.UUID];!function(e){e.PROPERTIES="properties"}(v||(v={})),function(e){e.AUTOMATIC="automatic",e.AVAILABLE="available",e.UNSUPPORTED="unsupported"}(h||(h={})),function(e){e.FORCED_REPLICATION_METHOD="forced-replication-method",e.KEY_PROPERTIES="table-key-properties",e.REPLICATION_KEYS="valid-replication-keys",e.SCHEMA_NAME="schema-name"}(p||(p={})),function(e){e.AMPLITUDE="amplitude",e.BIGQUERY="bigquery",e.CHARGEBEE="chargebee",e.GOOGLE_ADS="google_ads",e.GOOGLE_SEARCH_CONSOLE="google_search_console",e.GOOGLE_SHEETS="google_sheets",e.INTERCOM="intercom",e.MYSQL="mysql",e.PIPEDRIVE="pipedrive",e.POSTGRESQL="postgresql",e.REDSHIFT="redshift",e.SALESFORCE="salesforce",e.STRIPE="stripe"}(m||(m={})),function(e){e.AMAZON_S3="amazon_s3",e.BIGQUERY="bigquery",e.DELTA_LAKE_S3="delta_lake_s3",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.MYSQL="mysql",e.POSTGRESQL="postgresql",e.SNOWFLAKE="snowflake"}(f||(f={}));var x=[f.AMAZON_S3,f.GOOGLE_CLOUD_STORAGE,f.KAFKA]},39457:function(e,n,i){var t,r=i(82394),l=(i(82684),i(64866)),o=i(21764),s=i(55485),u=i(48670),c=i(38276),a=i(30160),d=i(12468),v=i(72473),h=i(70515),p=i(28598);function m(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 f(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(t||(t={})),n.Z=function(e){var n,i=e.children,r=e.copiedText,m=e.iconPosition,j=void 0===m?t.LEFT:m,x=e.inverted,g=e.linkProps,Z=e.linkText,b=e.monospace,y=e.muted,P=e.small,O=e.toastMessage,_=e.withCopyIcon;return i?n=(0,p.jsx)("span",{children:i}):_&&(n=(0,p.jsx)(u.Z,f(f({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:P},g),{},{children:(0,p.jsxs)(s.ZP,{alignItems:"center",children:[j===t.LEFT&&(0,p.jsx)(c.Z,{mr:Z?1:0,children:(0,p.jsx)(s.ZP,{alignItems:"center",children:(0,p.jsx)(v.CK,{inverted:x,muted:y,size:2*h.iI})})}),Z&&(0,p.jsx)(a.ZP,{inverted:x,monospace:b,muted:y,small:P,children:Z}),j===t.RIGHT&&(0,p.jsx)(c.Z,{ml:Z?1:0,children:(0,p.jsx)(s.ZP,{alignItems:"center",children:(0,p.jsx)(v.CK,{inverted:x,muted:y})})})]})}))),(0,p.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,p.jsx)(l.CopyToClipboard,{onCopy:function(){return o.Am.success(O||"Successfully copied to clipboard.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:r})},text:r,children:n})})}},22286:function(e,n,i){i.d(n,{M:function(){return a}});var t=i(82394),r=i(75582),l=i(54193),o=i(81728),s=i(42122);function u(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 c(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?u(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function a(e,n){var i,u;if(!n||null===n||void 0===n||!n.length)return e;if(null!==n&&void 0!==n&&n.includes(l.zj.LIST))return((0,s.Kn)(e)?Object.keys(e||{}):[e]).map((function(e){return a(e,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.LIST!==e})))}));if(null!==n&&void 0!==n&&n.includes(l.zj.DICTIONARY)){var d=(0,s.Kn)(e)?e:(0,o.Pb)(e)?JSON.parse(e):e;if((0,s.Kn)(d))return Object.entries(d).reduce((function(e,i){var o=(0,r.Z)(i,2),s=o[0],u=o[1];return c(c({},e),{},(0,t.Z)({},s,a(u,null===n||void 0===n?void 0:n.filter((function(e){return l.zj.DICTIONARY!==e})))))}),{})}if(null!==n&&void 0!==n&&n.includes(l.zj.BOOLEAN)){var v,h;if("boolean"===typeof e)return e;if("true"===(null===(v=String(e))||void 0===v?void 0:v.toLowerCase()))return!0;if("false"===(null===(h=String(e))||void 0===h?void 0:h.toLowerCase()))return!1}return null!==n&&void 0!==n&&null!==(i=n.includes)&&void 0!==i&&i.call(n,l.zj.FLOAT)&&(0,o.HW)(e)?parseFloat(e):null!==n&&void 0!==n&&null!==(u=n.includes)&&void 0!==u&&u.call(n,l.zj.INTEGER)&&(0,o.HW)(e)?parseInt(e):e}},32080:function(e,n,i){i.d(n,{n:function(){return l}});var t=i(44425),r=i(61599);function l(e){var n,i={};return null===e||void 0===e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,l=e.type,o=e.uuid;if(t.tf.DATA_LOADER===l&&null!==n&&void 0!==n&&n.streams){var s,u=null===n||void 0===n||null===(s=n.streams)||void 0===s?void 0:s.filter((function(e){var n=e.replication_method;return r._B.INCREMENTAL===n}));(null===u||void 0===u?void 0:u.length)>=1&&(o in i||(i[o]={block:e,streams:[]}),i[o].streams.push(u))}})),i}}}]);