mage-ai 0.9.12__py3-none-any.whl → 0.9.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (325) hide show
  1. mage_ai/ai/generator.py +1 -1
  2. mage_ai/ai/generator_cmds.py +1 -1
  3. mage_ai/ai/llm_pipeline_wizard.py +31 -17
  4. mage_ai/api/policies/BlockPolicy.py +1 -0
  5. mage_ai/api/policies/PipelineRunPolicy.py +1 -0
  6. mage_ai/api/policies/PipelineSchedulePolicy.py +12 -0
  7. mage_ai/api/policies/TagPolicy.py +18 -0
  8. mage_ai/api/presenters/BlockRunPresenter.py +4 -1
  9. mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
  10. mage_ai/api/presenters/PipelineSchedulePresenter.py +9 -2
  11. mage_ai/api/presenters/TagPresenter.py +3 -0
  12. mage_ai/api/resources/BackfillResource.py +6 -3
  13. mage_ai/api/resources/BlockResource.py +2 -0
  14. mage_ai/api/resources/BlockRunResource.py +18 -12
  15. mage_ai/api/resources/DatabaseResource.py +23 -0
  16. mage_ai/api/resources/GitBranchResource.py +8 -1
  17. mage_ai/api/resources/GlobalDataProductResource.py +5 -2
  18. mage_ai/api/resources/PipelineResource.py +30 -14
  19. mage_ai/api/resources/PipelineScheduleResource.py +157 -1
  20. mage_ai/api/resources/SearchResultResource.py +1 -0
  21. mage_ai/api/resources/TagResource.py +16 -3
  22. mage_ai/data_integrations/sources/constants.py +1 -0
  23. mage_ai/data_preparation/git/__init__.py +18 -0
  24. mage_ai/data_preparation/models/block/__init__.py +34 -11
  25. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +37 -10
  26. mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
  27. mage_ai/data_preparation/models/block/sql/__init__.py +44 -2
  28. mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
  29. mage_ai/data_preparation/models/global_data_product/__init__.py +8 -0
  30. mage_ai/data_preparation/models/pipeline.py +4 -0
  31. mage_ai/data_preparation/models/variable.py +5 -2
  32. mage_ai/data_preparation/repo_manager.py +28 -16
  33. mage_ai/io/clickhouse.py +9 -6
  34. mage_ai/io/redshift.py +9 -10
  35. mage_ai/io/utils.py +3 -1
  36. mage_ai/orchestration/db/migrations/README.md +39 -2
  37. mage_ai/orchestration/db/migrations/env.py +1 -0
  38. mage_ai/orchestration/db/migrations/versions/386bcfebd48d_create_tag_and_tagassociation_tables.py +59 -0
  39. mage_ai/orchestration/db/models/schedules.py +29 -2
  40. mage_ai/orchestration/db/models/tags.py +57 -0
  41. mage_ai/orchestration/pipeline_scheduler.py +7 -7
  42. mage_ai/orchestration/triggers/global_data_product.py +41 -40
  43. mage_ai/orchestration/triggers/utils.py +11 -1
  44. mage_ai/server/constants.py +1 -1
  45. mage_ai/server/frontend_dist/404.html +2 -2
  46. mage_ai/server/frontend_dist/404.html.html +2 -2
  47. mage_ai/server/frontend_dist/_next/static/CNjkRIWPaAu1yJUmIaX_q/_buildManifest.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/1005-a2f0e3ee378ef02b.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  50. mage_ai/server/frontend_dist/_next/static/chunks/1484-87d4d4a698ac63dc.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/2485-39885e5335888821.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/2786-f71862671f66d948.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/3881-131cf690e54c23a3.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/437-331193bd9b2fe777.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4822-045cc7cdd7c95163.js → frontend_dist/_next/static/chunks/4822-ee62acb1927c8150.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/547-bd961ea93f3eb98b.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +1 -0
  59. mage_ai/server/frontend_dist/_next/static/chunks/6422-0cdd6e596dcd43b6.js +1 -0
  60. mage_ai/server/frontend_dist/_next/static/chunks/{6786-77c7e36678abb2c6.js → 6786-55e1bca3c897d5ee.js} +1 -1
  61. mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/7722-76c724a66240561b.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/7815-8b68b0eb665fcd2d.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/8190-d38ed1133030797d.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9dae6fa5126cf001.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +1 -0
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-6d3d53624debede6.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-2756fe6d9decae4a.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +1 -0
  72. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-6815a3ece7dc1678.js +1 -0
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +1 -0
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-33c7f2550add0719.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-07e4a3a674e83578.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b8b4bed1e8e50068.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +1 -0
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-d87d0c21758a2d7c.js +1 -0
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-68e1b861ef4fc0d7.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-9fa0c4ce1c921a41.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-d5ef19ca1f9931de.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-8872a6e00280f58c.js +1 -0
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-484581ae34a1c596.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js +1 -0
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js +1 -0
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-1169f4eecf752033.js +1 -0
  89. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-d2224a447987fa69.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-c3ff06a12baa40a2.js} +1 -1
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-60b4398d7ae00206.js +1 -0
  91. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-dd827816bf4a7908.js → frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-05b53444f0e7449b.js} +1 -1
  92. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-097aa0bef1e34cdb.js → frontend_dist/_next/static/chunks/pages/sign-in-a5e9561a6c0d2e38.js} +1 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-78a07e7fe8973811.js → [...slug]-c21b269750441494.js} +1 -1
  94. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-19df643f52679d5a.js → frontend_dist/_next/static/chunks/pages/templates-ce2a29d477a6ce94.js} +1 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js +1 -0
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-1dc780d52fbd1573.js +1 -0
  97. mage_ai/server/frontend_dist/files.html +2 -2
  98. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  99. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  100. mage_ai/server/frontend_dist/index.html +2 -2
  101. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  102. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  103. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  104. mage_ai/server/frontend_dist/manage/users.html +2 -2
  105. mage_ai/server/frontend_dist/manage.html +2 -2
  106. mage_ai/server/frontend_dist/overview.html +2 -2
  107. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  108. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  109. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  110. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  111. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  112. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  113. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  114. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  115. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  116. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  117. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  118. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  119. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  120. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  121. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  122. mage_ai/server/frontend_dist/pipelines.html +2 -2
  123. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  124. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  125. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  126. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  127. mage_ai/server/frontend_dist/settings.html +2 -2
  128. mage_ai/server/frontend_dist/sign-in.html +11 -11
  129. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  130. mage_ai/server/frontend_dist/templates.html +2 -2
  131. mage_ai/server/frontend_dist/terminal.html +2 -2
  132. mage_ai/server/frontend_dist/test.html +3 -3
  133. mage_ai/server/frontend_dist/triggers.html +2 -2
  134. mage_ai/server/frontend_dist/version-control.html +2 -2
  135. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  136. mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1005-a2f0e3ee378ef02b.js +1 -0
  138. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-87d4d4a698ac63dc.js +1 -0
  140. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2485-39885e5335888821.js +1 -0
  141. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-f71862671f66d948.js +1 -0
  142. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +1 -0
  143. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3881-131cf690e54c23a3.js +1 -0
  144. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/437-331193bd9b2fe777.js +1 -0
  145. mage_ai/server/{frontend_dist/_next/static/chunks/4822-045cc7cdd7c95163.js → frontend_dist_base_path_template/_next/static/chunks/4822-ee62acb1927c8150.js} +1 -1
  146. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/547-bd961ea93f3eb98b.js +1 -0
  147. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +1 -0
  148. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6422-0cdd6e596dcd43b6.js +1 -0
  149. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6786-77c7e36678abb2c6.js → 6786-55e1bca3c897d5ee.js} +1 -1
  150. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
  151. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7722-76c724a66240561b.js +1 -0
  152. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7815-8b68b0eb665fcd2d.js +1 -0
  153. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8190-d38ed1133030797d.js +1 -0
  154. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +1 -0
  155. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js +1 -0
  156. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-9dae6fa5126cf001.js +1 -0
  157. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +1 -0
  158. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-6d3d53624debede6.js +1 -0
  159. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-2756fe6d9decae4a.js +1 -0
  160. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +1 -0
  161. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-6815a3ece7dc1678.js +1 -0
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-7f790238fe70d9ab.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-33c7f2550add0719.js +1 -0
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-07e4a3a674e83578.js +1 -0
  165. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b8b4bed1e8e50068.js +1 -0
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +1 -0
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-d87d0c21758a2d7c.js +1 -0
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-68e1b861ef4fc0d7.js +1 -0
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-9fa0c4ce1c921a41.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-d5ef19ca1f9931de.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-8872a6e00280f58c.js +1 -0
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-484581ae34a1c596.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-1169f4eecf752033.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-d2224a447987fa69.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-c3ff06a12baa40a2.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-60b4398d7ae00206.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-dd827816bf4a7908.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-05b53444f0e7449b.js} +1 -1
  181. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-097aa0bef1e34cdb.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-a5e9561a6c0d2e38.js} +1 -1
  182. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-78a07e7fe8973811.js → [...slug]-c21b269750441494.js} +1 -1
  183. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-19df643f52679d5a.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-ce2a29d477a6ce94.js} +1 -1
  184. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js +1 -0
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-1dc780d52fbd1573.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/yJvL-3bfsNF3WCStZ10Dm/_buildManifest.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  188. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  189. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  190. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  191. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  192. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  193. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  194. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  195. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  196. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  197. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  198. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  199. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  200. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  201. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  202. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  203. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  204. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  205. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  206. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  207. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  208. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  209. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  210. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  211. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  212. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  213. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  214. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  215. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  216. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  217. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  218. mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
  219. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  220. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  221. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  222. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  223. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  224. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  225. mage_ai/server/server.py +53 -27
  226. mage_ai/services/spark/spark.py +75 -2
  227. mage_ai/streaming/constants.py +1 -0
  228. mage_ai/streaming/sources/kafka.py +17 -9
  229. mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
  230. mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
  231. mage_ai/tests/data_preparation/models/test_block.py +48 -0
  232. mage_ai/tests/data_preparation/test_repo_manager.py +19 -1
  233. mage_ai/tests/server/test_server.py +20 -2
  234. mage_ai/tests/services/spark/__init__.py +0 -0
  235. mage_ai/tests/services/spark/test_spark.py +52 -0
  236. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/METADATA +1 -1
  237. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/RECORD +245 -233
  238. mage_ai/server/frontend_dist/_next/static/RdDEYzOW6lfmOEilKsz4V/_buildManifest.js +0 -1
  239. mage_ai/server/frontend_dist/_next/static/chunks/1005-2f8ef0e28c917767.js +0 -1
  240. mage_ai/server/frontend_dist/_next/static/chunks/1424-a2cd1bfc708a323b.js +0 -1
  241. mage_ai/server/frontend_dist/_next/static/chunks/1484-a07f74ae5c40141c.js +0 -1
  242. mage_ai/server/frontend_dist/_next/static/chunks/2485-b569baad92049d6b.js +0 -1
  243. mage_ai/server/frontend_dist/_next/static/chunks/2786-acce6ea0d9b4898e.js +0 -1
  244. mage_ai/server/frontend_dist/_next/static/chunks/3654-14ee3eacc42b118a.js +0 -1
  245. mage_ai/server/frontend_dist/_next/static/chunks/3881-0eb04f7f7a244347.js +0 -1
  246. mage_ai/server/frontend_dist/_next/static/chunks/437-d43ccff3a064a528.js +0 -1
  247. mage_ai/server/frontend_dist/_next/static/chunks/547-4ad2cdae967055b6.js +0 -1
  248. mage_ai/server/frontend_dist/_next/static/chunks/6299-cf188c1b7a1bc33c.js +0 -1
  249. mage_ai/server/frontend_dist/_next/static/chunks/7496-ab1be388ae09d362.js +0 -1
  250. mage_ai/server/frontend_dist/_next/static/chunks/7722-a74e6f977993e75e.js +0 -1
  251. mage_ai/server/frontend_dist/_next/static/chunks/7815-fbd99c8f259d9e8b.js +0 -1
  252. mage_ai/server/frontend_dist/_next/static/chunks/8952-98e54b14c1af492f.js +0 -1
  253. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-74805cf1296fd50f.js +0 -1
  254. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-bcdaa82adcca891d.js +0 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-abdbda772d94c386.js +0 -1
  256. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-01f8ef10e87ec236.js +0 -1
  257. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-950fbcb72961eb3c.js +0 -1
  258. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-c6fd44191c812edf.js +0 -1
  259. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-6e46ed84cf3f4e9d.js +0 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-1d52bba72442c53f.js +0 -1
  261. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-8c33956a28fb4fa8.js +0 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b28d151c32c2a469.js +0 -1
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1708e5576cd26d1.js +0 -1
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-0f3468d52020dcbf.js +0 -1
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-489d02937d5f4695.js +0 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-544475d8e841638f.js +0 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e117a99f334b6022.js +0 -1
  268. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-f1ef481c7beb8aef.js +0 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-ab52e3174c3dcf64.js +0 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-3e290f7d76c68b3f.js +0 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-1ac4dc91ec394c6d.js +0 -1
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-4753de69f7e366c5.js +0 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cf285c43759e9b2a.js +0 -1
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3f86e7f1c8d63beb.js +0 -1
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +0 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-cacb24e3632cfdfc.js +0 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5a6e3a62fef551f1.js +0 -1
  278. mage_ai/server/frontend_dist_base_path_template/_next/static/4dbzHNz2XwS_s6Z0qsIGO/_buildManifest.js +0 -1
  279. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1005-2f8ef0e28c917767.js +0 -1
  280. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-a2cd1bfc708a323b.js +0 -1
  281. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1484-a07f74ae5c40141c.js +0 -1
  282. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2485-b569baad92049d6b.js +0 -1
  283. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-acce6ea0d9b4898e.js +0 -1
  284. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3654-14ee3eacc42b118a.js +0 -1
  285. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3881-0eb04f7f7a244347.js +0 -1
  286. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/437-d43ccff3a064a528.js +0 -1
  287. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/547-4ad2cdae967055b6.js +0 -1
  288. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-cf188c1b7a1bc33c.js +0 -1
  289. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-ab1be388ae09d362.js +0 -1
  290. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7722-a74e6f977993e75e.js +0 -1
  291. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7815-fbd99c8f259d9e8b.js +0 -1
  292. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-98e54b14c1af492f.js +0 -1
  293. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-74805cf1296fd50f.js +0 -1
  294. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-bcdaa82adcca891d.js +0 -1
  295. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-abdbda772d94c386.js +0 -1
  296. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-01f8ef10e87ec236.js +0 -1
  297. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-950fbcb72961eb3c.js +0 -1
  298. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-c6fd44191c812edf.js +0 -1
  299. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-6e46ed84cf3f4e9d.js +0 -1
  300. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-1d52bba72442c53f.js +0 -1
  301. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-8c33956a28fb4fa8.js +0 -1
  302. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-b28d151c32c2a469.js +0 -1
  303. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1708e5576cd26d1.js +0 -1
  304. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-0f3468d52020dcbf.js +0 -1
  305. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-489d02937d5f4695.js +0 -1
  306. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-544475d8e841638f.js +0 -1
  307. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e117a99f334b6022.js +0 -1
  308. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-f1ef481c7beb8aef.js +0 -1
  309. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-ab52e3174c3dcf64.js +0 -1
  310. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-3e290f7d76c68b3f.js +0 -1
  311. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-1ac4dc91ec394c6d.js +0 -1
  312. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-4753de69f7e366c5.js +0 -1
  313. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cf285c43759e9b2a.js +0 -1
  314. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3f86e7f1c8d63beb.js +0 -1
  315. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +0 -1
  316. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-cacb24e3632cfdfc.js +0 -1
  317. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5a6e3a62fef551f1.js +0 -1
  318. /mage_ai/server/frontend_dist/_next/static/{RdDEYzOW6lfmOEilKsz4V → CNjkRIWPaAu1yJUmIaX_q}/_middlewareManifest.js +0 -0
  319. /mage_ai/server/frontend_dist/_next/static/{RdDEYzOW6lfmOEilKsz4V → CNjkRIWPaAu1yJUmIaX_q}/_ssgManifest.js +0 -0
  320. /mage_ai/server/frontend_dist_base_path_template/_next/static/{4dbzHNz2XwS_s6Z0qsIGO → yJvL-3bfsNF3WCStZ10Dm}/_middlewareManifest.js +0 -0
  321. /mage_ai/server/frontend_dist_base_path_template/_next/static/{4dbzHNz2XwS_s6Z0qsIGO → yJvL-3bfsNF3WCStZ10Dm}/_ssgManifest.js +0 -0
  322. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/LICENSE +0 -0
  323. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/WHEEL +0 -0
  324. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/entry_points.txt +0 -0
  325. {mage_ai-0.9.12.dist-info → mage_ai-0.9.14.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1484],{67429:function(e,n,t){var o=t(82394),r=t(21831),i=t(82684),u=t(16115),l=t(41150),c=t(28598);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.highlightedItemIndexInitial,t=void 0===n?null:n,o=e.itemGroups,a=e.noResultGroups,d=e.onHighlightItemIndexChange,f=e.onMouseEnterItem,p=e.onMouseLeaveItem,m=e.onSelectItem,h=e.renderEmptyState,v=e.searchQuery,b=e.selectedItem,g=e.setItemRefs,x=e.uuid,j=(0,i.useState)(!0),C=j[0],_=j[1],O=(0,i.useMemo)((function(){var e=[],n=o.reduce((function(n,t){var o=t.items.filter((function(e){return!v||function(e,n){return e.searchQueries.filter((function(e){return String(e).toLowerCase().includes(n.toLowerCase())})).length>=1}(e,v)}));return 0===o.length?n:(e.push.apply(e,(0,r.Z)(o)),n.concat(s(s({},t),{},{items:o})))}),[]);return{itemGroups:n,itemsFlattened:e}}),[o,v]),Z=O.itemGroups,y=O.itemsFlattened;a&&0===y.length&&(Z.push.apply(Z,(0,r.Z)(a)),y.push.apply(y,(0,r.Z)(a.reduce((function(e,n){var t=n.items;return e.concat(t)}),[]))));var k=(0,i.useRef)(null);k.current=y.map((function(){return(0,i.createRef)()}));var E=(0,i.useState)(t),T=E[0],I=E[1],S=(0,i.useCallback)((function(e){null===d||void 0===d||d(e),I(e)}),[d,I]),R=y[T],A=(0,l.y)(),w=A.registerOnKeyDown,P=A.unregisterOnKeyDown;(0,i.useEffect)((function(){return function(){return P(x)}}),[P,x]),null===w||void 0===w||w(x,(function(e,n,t){var o,r=!0,i=y.length,l=y.findIndex((function(e,o){var r=e.keyboardShortcutValidation;return null===r||void 0===r?void 0:r({keyHistory:t,keyMapping:n},o)})),c=n[u.Gs]&&!n[u.XR]&&!b;return-1!==l?(e.preventDefault(),m(y[l]),_(r),S(l)):(n[u.Uq]||c)&&y[T]?(c&&e.preventDefault(),m(y[T]),_(r),S(T)):(n[u.Bu]?(r=!1,o=null===T?i-1:T-1):n[u.kD]?(r=!1,o=null===T?0:T+1):n[u.vP]&&S(null),"undefined"!==typeof o&&(o>=i?o=0:o<=-1&&(o=i-1),o>=0&&o<=i-1?(S(o),e.preventDefault()):S(null)),void _(r))}),[T,y,b,S,_]),(0,i.useEffect)((function(){null===g||void 0===g||g(k)}),[k,y,g]),(0,i.useEffect)((function(){var e=null===T||"undefined"===typeof T||T>=y.length;(null===v||void 0===v?void 0:v.length)>=1&&e&&S(0)}),[T,y,v,S]);var D=(0,i.useCallback)((function(){return _(!0)}),[_]);return(0,i.useEffect)((function(){return window.addEventListener("mousemove",D),function(){window.removeEventListener("mousemove",D)}}),[D]),0===Z.length&&h?h():(0,c.jsx)(c.Fragment,{children:Z.map((function(e,n){var t=e.items,o=e.renderItem,r=e.renderGroupHeader,i=e.uuid,u=n>=1?Z.slice(0,n).reduce((function(e,n){return e+n.items.length}),0):0,l=t.map((function(e,n){var t=e.itemObject,r=e.value,i=r===(null===R||void 0===R?void 0:R.value),l=n+u,a=(null===t||void 0===t?void 0:t.id)||(null===t||void 0===t?void 0:t.uuid);return(0,c.jsx)("div",{id:"item-".concat(r,"-").concat(a),onMouseMove:function(){return C&&S(l)},ref:k.current[l],children:o(e,{highlighted:i,onClick:function(){return m(e)},onMouseEnter:function(){return null===f||void 0===f?void 0:f(e)},onMouseLeave:function(){return null===p||void 0===p?void 0:p(e)}},n,l)},"item-".concat(r,"-").concat(a))}));return l.length>=1&&(0,c.jsxs)("div",{children:[null===r||void 0===r?void 0:r(),l]},i||"group-uuid-".concat(n))}))})}},78759:function(e,n,t){t.d(n,{G8:function(){return p},SR:function(){return h},VR:function(){return a},_H:function(){return v},x8:function(){return m}});var o,r,i,u,l,c,a,s=t(82394),d=t(42451);!function(e){e.COLUMNS="columns",e.METRICS="metrics",e.NUMBER="number"}(a||(a={}));var f={noCode:[{label:function(){return"time column"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"time interval"},options:[d.aE.ORIGINAL,d.aE.SECOND,d.aE.MINUTE,d.aE.HOUR,d.aE.DAY,d.aE.WEEK,d.aE.MONTH,d.aE.YEAR],uuid:d.Yg},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}]},p=(o={},(0,s.Z)(o,d.oV.BAR_CHART,{noCode:[{label:function(){return"group by columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE},{autoRun:!0,label:function(){return"chart style"},options:[d.JT.HORIZONTAL,d.JT.VERTICAL],uuid:d.R8},{autoRun:!0,label:function(){return"sort direction"},options:[null,d.MP.ASCENDING,d.MP.DESCENDING],uuid:d.$1}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.HISTOGRAM,{noCode:[{label:function(){return"number column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of buckets"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.LINE_CHART,{noCode:[{label:function(){return"group by columns"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{label:function(){return"metrics"},type:a.METRICS,uuid:d.bE}],code:[{label:function(){return"variable name of x-axis values"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of y-axis values"},monospace:!0,uuid:d.rj},{label:function(){return"labels of lines in chart (comma separated)"},uuid:d.e}]}),(0,s.Z)(o,d.oV.PIE_CHART,{noCode:[{label:function(){return"column for chart"},settings:{maxValues:1},type:a.COLUMNS,uuid:d.eN},{autoRun:!0,label:function(){return"Number of slices"},type:a.NUMBER,uuid:d.m7}],code:[{label:function(){return"variable name of values"},monospace:!0,uuid:d.a3}]}),(0,s.Z)(o,d.oV.TABLE,{noCode:[{label:function(){return"columns"},type:a.COLUMNS,uuid:d.eN},{label:function(){return"max number of rows"},type:a.NUMBER,uuid:d.PG}],code:[{label:function(){return"variable name of columns"},monospace:!0,uuid:d.a3},{label:function(){return"variable name of rows"},monospace:!0,uuid:d.rj}]}),(0,s.Z)(o,d.oV.TIME_SERIES_BAR_CHART,f),(0,s.Z)(o,d.oV.TIME_SERIES_LINE_CHART,f),o),m=(r={},(0,s.Z)(r,d.oV.BAR_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),(0,s.Z)(n,d.R8,d.JT.VERTICAL),n},content:function(e){return"columns = df_1.columns\nx = df_1.columns[:7]\ny = [[v] for v in [len(df_1[col].unique()) for col in x]]\n"}}),(0,s.Z)(r,d.oV.HISTOGRAM,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,10),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"columns = df_1.columns\ncol = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))[0]\nx = df_1[col]\n"}}),(0,s.Z)(r,d.oV.LINE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"columns = df_1.columns\ncols = list(filter(lambda x: df_1[x].dtype == float or df_1[x].dtype == int, columns))\nx = df_1[cols[0]]\ny = [df_1[cols[1]]]\n"}}),(0,s.Z)(r,d.oV.PIE_CHART,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.m7,7),(0,s.Z)(n,d.a3,"x"),n},content:function(e){return"x = df_1[df_1.columns[0]]"}}),(0,s.Z)(r,d.oV.TABLE,{configuration:function(e){var n;return n={},(0,s.Z)(n,d.PG,10),(0,s.Z)(n,d.a3,"x"),(0,s.Z)(n,d.rj,"y"),n},content:function(e){return"x = df_1.columns\ny = df_1.to_numpy()"}}),(0,s.Z)(r,d.oV.TIME_SERIES_BAR_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),(0,s.Z)(r,d.oV.TIME_SERIES_LINE_CHART,{configuration:function(e){return(0,s.Z)({},d.Yg,d.aE.ORIGINAL)}}),r),h=(c={},(0,s.Z)(c,d.oV.BAR_CHART,(i={},(0,s.Z)(i,d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."})),(0,s.Z)(i,d.rj,(function(){return"must be a list of lists containing integers or floats."})),i)),(0,s.Z)(c,d.oV.HISTOGRAM,(0,s.Z)({},d.a3,(function(){return"must be a list of integers or floats."}))),(0,s.Z)(c,d.oV.LINE_CHART,(u={},(0,s.Z)(u,d.a3,(function(){return"must be a list of integers or floats."})),(0,s.Z)(u,d.rj,(function(){return"must be a list of lists containing integers or floats. Each list is a single line in the chart."})),u)),(0,s.Z)(c,d.oV.PIE_CHART,(0,s.Z)({},d.a3,(function(){return"must be a list of booleans, dates, integers, floats, or strings."}))),(0,s.Z)(c,d.oV.TABLE,(l={},(0,s.Z)(l,d.a3,(function(){return"must be a list of strings."})),(0,s.Z)(l,d.rj,(function(){return"must be a list of lists containing booleans, dates, integers, floats, or strings."})),l)),c),v=[{label:function(){return"% of missing values"},widgetTemplate:function(e){var n,t=e.block;return{name:"missing values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns_with_mising_values"),(0,s.Z)(n,d.rj,"percentage_of_missing_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"number_of_rows = len(df_1.index)\ncolumns_with_mising_values = []\npercentage_of_missing_values = []\nfor col in df_1.columns:\n missing = df_1[col].isna().sum()\n if missing > 0:\n columns_with_mising_values.append(col)\n percentage_of_missing_values.append(100 * missing / number_of_rows)\n"}}},{label:function(){return"Unique values"},widgetTemplate:function(e){var n,t=e.block;return{name:"unique values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"number_of_unique_values"),(0,s.Z)(n,d.R8,d.JT.HORIZONTAL),(0,s.Z)(n,d.$1,d.MP.DESCENDING),(0,s.Z)(n,"chart_type",d.oV.BAR_CHART),n),content:"columns = df_1.columns\nnumber_of_unique_values = [df_1[col].nunique() for col in columns]\n"}}},{label:function(){return"Most frequent values"},widgetTemplate:function(e){var n,t=e.block;return{name:"most frequent values for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"column_index"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"columns = ['mode value', 'frequency', '% of values']\n\ncolumn_index = []\nrows = []\nfor col in df_1.columns:\n value_counts = df_1[col].value_counts()\n if len(value_counts.index) == 0:\n continue\n column_value = value_counts.index[0]\n value = value_counts[column_value]\n number_of_rows = df_1[col].count()\n column_index.append(col)\n rows.append([\n column_value,\n f'{round(100 * value / number_of_rows, 2)}%',\n value,\n ])\n"}}},{label:function(){return"Summary overview"},widgetTemplate:function(e){var n,t=e.block;return{name:"summary overview for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"headers"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\n\n\nheaders = ['value']\nstats = ['Columns', 'Rows']\nrows = [[len(df_1.columns)], [len(df_1.index)]]\n\ncol_counts = {}\nfor col, col_type in infer_column_types(df_1).items():\n col_type_name = col_type.value\n if not col_counts.get(col_type_name):\n col_counts[col_type_name] = 0\n col_counts[col_type_name] += 1\n\nfor col_type, count in sorted(col_counts.items()):\n stats.append(f'# of {col_type}')\n rows.append([count])\n"}}},{label:function(){return"Feature profiles"},widgetTemplate:function(e){var n,t=e.block;return{name:"feature profiles for ".concat(null===t||void 0===t?void 0:t.uuid),configuration:(n={},(0,s.Z)(n,d.JJ,3e3),(0,s.Z)(n,d.ED,"stats"),(0,s.Z)(n,d.a3,"columns"),(0,s.Z)(n,d.rj,"rows"),(0,s.Z)(n,"chart_type",d.oV.TABLE),n),content:"from mage_ai.data_cleaner.column_types.column_type_detector import infer_column_types\nimport statistics\n\n\ncolumns_and_types = infer_column_types(df_1).items()\ncolumns = [t[0] for t in columns_and_types]\nstats = ['Type', 'Missing values', 'Unique values', 'Min', 'Max', 'Mean', 'Median', 'Mode']\nrows = [[] for _ in stats]\n\nfor col, col_type in columns_and_types:\n series = df_1[col]\n min_value = None\n max_value = None\n mean = None\n median = None\n\n not_null = series[series.notnull()]\n\n if col_type.value in ['number', 'number_with_decimals']:\n count = len(not_null.index)\n if count >= 1:\n mean = round(not_null.sum() / count, 2)\n median = sorted(not_null)[int(count / 2)]\n min_value = round(series.min(), 2)\n max_value = round(series.max(), 2)\n else:\n min_value = not_null.astype(str).min()\n max_value = not_null.astype(str).max()\n\n _, mode = sorted(\n [(v, k) for k, v in not_null.value_counts().items()],\n reverse=True,\n )[0]\n\n for idx, value in enumerate([\n col_type.value,\n len(series[series.isna()].index),\n len(series.unique()),\n min_value,\n max_value,\n mean,\n median,\n mode,\n ]):\n rows[idx].append(value)\n"}}}]},22782:function(e,n,t){t.d(n,{MB:function(){return m},Nk:function(){return a},T5:function(){return s},_A:function(){return f},a3:function(){return p},wx:function(){return d}});var o=t(38626),r=t(23831),i=t(44162),u=t(73942),l=t(49125),c=t(19711),a=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-n38rkq-0"})([""," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;overflow:hidden;"," "," ",""],i.Kf,(function(e){return e.addBottomPadding&&"\n padding-bottom: ".concat(2*l.tr,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).table,";\n ")}),(function(e){return!e.executedAndIdle&&"\n border-bottom-left-radius: ".concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n border-bottom-style: solid;\n border-bottom-width: 2px;\n ")})),s=o.default.div.withConfig({displayName:"indexstyle__OutputRowStyle",componentId:"sc-n38rkq-1"})([""," "," ",""],(function(e){return e.first&&"\n padding-top: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.last&&"\n padding-bottom: ".concat(l.iI*l.cd,"px;\n ")}),(function(e){return e.contained&&"\n padding-left: ".concat(i.oh,"px;\n padding-right: ").concat(l.iI*l.cd,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__HTMLOutputStyle",componentId:"sc-n38rkq-2"})([""," table{"," border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;}td,th{padding:0 8px;}a{","}"],c.IH,i.Kf,(function(e){return"\n color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoStyle",componentId:"sc-n38rkq-3"})([""," border-bottom-style:solid;border-bottom-width:2px;border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;",""],i.Kf,(function(e){return"\n background-color: ".concat((e.theme.borders||r.Z.borders).light,";\n border-bottom-left-radius: ").concat(u.n_,"px;\n border-bottom-right-radius: ").concat(u.n_,"px;\n ")})),p=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoContentStyle",componentId:"sc-n38rkq-4"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],l.iI,i.oh,l.iI*l.cd,l.iI),m=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoBorderStyle",componentId:"sc-n38rkq-5"})(["height:1px;width:100%;",""],(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||r.Z.borders).medium,";\n ")}))},65051:function(e,n,t){var o=t(21831),r=t(82394),i=t(75582),u=t(82684),l=t(89565),c=t.n(l),a=t(62302),s=t(83455),d=t(35490),f=t(86422),p=t(60328),m=t(16634),h=t(57722),v=t(62976),b=t(48952),g=t(34744),x=t(93461),j=t(67971),C=t(82635),_=t(98781),O=t(66176),Z=t(86673),y=t(19711),k=t(46261),E=t(82531),T=t(66166),I=t(22341),S=t(22782),R=t(73828),A=t(35033),w=t(49125),P=t(94353),D=t(37391),M=t(93005),N=t(60701),L=t(43482),B=t(90211),U=t(96510),F=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var W={appearAbove:!0,appearBefore:!0,block:!0,size:null,widthFitContent:!0},z={basic:!0,iconOnly:!0,noPadding:!0,transparent:!0};n.Z=function(e){var n=e.block,t=e.blockMetadata,r=e.buttonTabs,l=e.collapsed,H=e.contained,Q=void 0===H||H,q=e.dynamicBlock,K=e.dynamicChildBlock,V=e.hasError,Y=e.hasOutput,X=e.hideExtraInfo,J=e.isInProgress,$=e.mainContainerWidth,ee=e.messages,ne=e.openSidekickView,te=e.pipeline,oe=e.runCount,re=e.runEndTime,ie=e.runStartTime,ue=e.selected,le=e.selectedTab,ce=e.setCollapsed,ae=e.setErrors,se=e.setOutputBlocks,de=e.setSelectedOutputBlock,fe=e.setSelectedTab,pe=n||{},me=pe.status,he=pe.type,ve=pe.uuid,be=(0,u.useMemo)((function(){return(null===ee||void 0===ee?void 0:ee.length)||0}),[ee]),ge=f.DA.EXECUTED===me||!J&&0===oe&&be>=1||!J&&oe>=1&&re>=ie,xe=(0,u.useState)(),je=xe[0],Ce=xe[1],_e=(0,u.useState)(),Oe=_e[0],Ze=_e[1],ye=(0,u.useState)(null),ke=ye[0],Ee=ye[1],Te=(0,u.useMemo)((function(){var e,n;return null===(e=new d.Z)||void 0===e||null===(n=e.decodedToken)||void 0===n?void 0:n.token}),[]),Ie=(0,s.Db)((function(){return E.ZP.block_outputs.pipelines.downloads.detailAsync(null===te||void 0===te?void 0:te.uuid,ve,{token:Te},{onDownloadProgress:function(e){return Ee((Number((null===e||void 0===e?void 0:e.loaded)||0)/1e6).toFixed(3))},responseType:P.E.BLOB})}),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(e){(0,L.uS)(e,"".concat(ve,".").concat(R.Lu.CSV))},onErrorCallback:function(e,n){return null===ae||void 0===ae?void 0:ae({errors:n,response:e})}})}}),Se=(0,i.Z)(Ie,2),Re=Se[0],Ae=Se[1].isLoading;(0,u.useEffect)((function(){J||Ze(100)}),[J]);var we=function(e){return Array.isArray(e)?e.join("\n"):e},Pe=(0,u.useMemo)((function(){return ee.reduce((function(e,n){var t=e.at(-1);if(C.jU.includes(null===t||void 0===t?void 0:t.type)&&(null===t||void 0===t?void 0:t.type)===n.type&&!we(null===n||void 0===n?void 0:n.data).match(A.Lz)){if(Array.isArray(t.data))t.data.concat(n.data);else if("string"===typeof t.data){var o=we(n.data)||"";t.data=[t.data,o].join("\n")}}else C.jU.includes(null===n||void 0===n?void 0:n.type)&&!we(null===n||void 0===n?void 0:n.data).match(A.Lz)?e.push(G(G({},n),{},{data:we(n.data)})):e.push(G({},n));return e}),[])}),[ee]),De=(0,u.useMemo)((function(){return(0,F.jsx)(O.Z,{progress:Oe})}),[Oe]),Me=f.tf.DBT===(null===n||void 0===n?void 0:n.type),Ne=(0,T.Z)(V);(0,u.useEffect)((function(){Me&&!Ne&&V&&fe(M.Rj)}),[V,Ne,Me,fe]);var Le=(0,u.useMemo)((function(){var e=function(e,n){var t=e.columns,o=e.index,r=e.rows,i=e.shape,u=n.borderTop,l=n.selected;return i&&Ce(i),r.length>=1&&(0,F.jsx)(v.Z,{columns:t,disableScrolling:!l,index:o,maxHeight:60*w.iI,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!u,rows:r,width:$-(2+w.cd*w.iI*2+2+D.nn)},"data-table-".concat(o))},n=[],t=[],r=[];return null===Pe||void 0===Pe||Pe.forEach((function(i,u){var l=i.data,s=i.type;if(l&&0!==(null===l||void 0===l?void 0:l.length)){var d=[];d=(d=Array.isArray(l)?l:[l]).filter((function(e){return e}));var f=[];d.forEach((function(e){if(s===C.Gi.TEXT_HTML)f.push(e);else if(e&&"string"===typeof e){var n=e.split("\n");f.push.apply(f,(0,o.Z)(n))}else"object"===typeof f&&f.push(e)}));var p=f.length,m=[];f.forEach((function(n,o){var i,l={contained:Q,first:0===u&&0===o,last:u===Pe.length-1&&o===p-1},d=u>=1;if("string"===typeof n&&n.match(A.Gr)){var f=n.split("\n"),h=[];f.forEach((function(e){if(e.match(A.Gr)){var t=e.split(A.Vc),o=t[t.length-1];(0,B.Pb)(o)&&r.push(JSON.parse(o))}else h.push(e);n=h.length>=1?h.join("\n"):null}))}if(null!==n){if("string"===typeof n&&n.match(A.Lz)){var v=n.split(A.gr),b=v[v.length-1],g=b.split("FloatProgress");if(v.length>=2&&(b=g[0]),(0,B.Pb)(b)){var x=JSON.parse(b),j=x.data,_=x.type;if(C.Gi.TABLE===_){!0;var O=e(j,{borderTop:d,selected:ue});t.push(O),Me||(i=O)}}}else if(s===C.Gi.TABLE){!0;var Z=e((0,B.Pb)(n)?JSON.parse(n):n,{borderTop:d,selected:ue});t.push(Z),Me||(i=Z)}else if(C.jU.includes(s)){var k,E=null===(k=n)||void 0===k?void 0:k.split("\\n");i=(0,F.jsx)(S.T5,G(G({},l),{},{children:E.map((function(e){return(0,F.jsx)(y.ZP,{monospace:!0,preWrap:!0,children:(0,F.jsx)(c(),{children:e})},e)}))}))}else if(s===C.Gi.TEXT_HTML)n&&(i=(0,F.jsx)(S.T5,G(G({},l),{},{children:(0,F.jsx)(S.wx,{monospace:!0,children:(0,F.jsx)(a.Z,{html:n})})})));else if(s===C.Gi.IMAGE_PNG)i=(0,F.jsx)("div",{style:{backgroundColor:"white"},children:(0,F.jsx)("img",{alt:"Image ".concat(u," from code output"),src:"data:image/png;base64, ".concat(n)})});else if(s===C.Gi.PROGRESS){var T=parseInt(n);Ze(T>90?90:T)}i&&m.push((0,F.jsx)("div",{children:i},"code-output-".concat(u,"-").concat(o)))}})),m.length>=1&&n.push(m)}})),J&&(null===te||void 0===te?void 0:te.type)===_.qL.PYSPARK&&n.unshift([(0,F.jsx)(S.T5,{contained:!0,children:(0,F.jsx)(Z.Z,{mt:1,children:De})},"progress_bar")]),{content:n,tableContent:t,testContent:r}}),[Pe,Q,Me,J,$,te,De,ue]),Be=Le.content,Ue=Le.tableContent,Fe=Le.testContent,He=(null===je||void 0===je?void 0:je[1])||0,Ge=He>30?" (30 out of ".concat(He," columns displayed)"):"",We=(0,u.useMemo)((function(){var e;if(Me&&le){var n=le.uuid;if(M.$m.uuid===n)(null===Ue||void 0===Ue?void 0:Ue.length)>=1?e=Ue:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(y.ZP,{muted:!0,children:V?"Error, check logs.":"No preview to display yet, try running the block."})}));else if(M.Rj.uuid===n)(null===Be||void 0===Be?void 0:Be.length)>=1?e=Be:J||(e=(0,F.jsx)(Z.Z,{px:2,py:1,children:(0,F.jsx)(y.ZP,{muted:!0,children:V?"Error, check logs.":"No logs to display yet, try running the block."})}));else if(M.Jt.uuid===n){var o,i=null===t||void 0===t||null===(o=t.dbt)||void 0===o?void 0:o.sql;e=i?(0,F.jsx)(h.Z,{autoHeight:!0,language:R.Lu.SQL,padding:!0,readOnly:!0,value:i,width:"100%"}):null}else if(M.gM.uuid===n){var u,l=null===t||void 0===t||null===(u=t.dbt)||void 0===u?void 0:u.lineage;e=l?(0,F.jsx)(b.Z,{disabled:!0,enablePorts:!1,height:55*w.iI,pannable:ue,pipeline:G(G({},te),{},{blocks:l}),zoomable:ue}):null}}else e=Be;return(0,F.jsxs)(F.Fragment,{children:[r,e]})}),[t,r,Be,V,Me,J,te,ue,le,Ue]);return r||V||Y?(0,F.jsxs)(F.Fragment,{children:[Q&&(0,F.jsxs)(S.Nk,{addBottomPadding:J&&(null===te||void 0===te?void 0:te.type)===_.qL.PYSPARK,blockType:he,dynamicBlock:q,dynamicChildBlock:K,executedAndIdle:ge,hasError:V,selected:ue,children:[!l&&(null===Fe||void 0===Fe?void 0:Fe.length)>=1&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Z.Z,{py:2,children:(0,F.jsx)(S.T5,{contained:!0,children:Fe.map((function(e,n){var t=e.error,o=e.message,r=e.stacktrace;return(0,F.jsxs)(Z.Z,{mt:n>=1?3:0,children:[(0,F.jsx)(y.ZP,{monospace:!0,preWrap:!0,children:(0,F.jsx)(c(),{children:"".concat(o).concat(t?" "+t:"")})}),null===r||void 0===r?void 0:r.map((function(e){return(0,F.jsx)(y.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:(0,F.jsx)(c(),{children:e})},e)}))]},o)}))})}),(0,F.jsx)(Z.Z,{mb:V?2:0,children:(0,F.jsx)(g.Z,{medium:!0})})]}),!l&&We]}),!Q&&We,ge&&!X&&(0,F.jsxs)(S._A,{blockType:he,dynamicBlock:q,dynamicChildBlock:K,hasError:V,selected:ue,children:[(0,F.jsx)(S.MB,{}),(0,F.jsxs)(j.Z,{justifyContent:"space-between",children:[ce&&(0,F.jsx)(x.Z,{alignItems:"center",px:1,children:(0,F.jsx)(p.Z,G(G({},z),{},{onClick:function(){return ce(!l)},children:l?(0,F.jsxs)(j.Z,{alignItems:"center",children:[(0,F.jsx)(I._M,{muted:!0,size:2*w.iI}),"\xa0",(0,F.jsx)(y.ZP,{default:!0,children:"Expand output"})]}):(0,F.jsxs)(j.Z,{alignItems:"center",children:[(0,F.jsx)(I.Kh,{muted:!0,size:2*w.iI}),je&&(0,F.jsx)(Z.Z,{ml:2,children:(0,F.jsx)(y.ZP,{children:"".concat(je[0]," rows x ").concat(je[1]," columns").concat(Ge)})})]})}))}),(0,F.jsx)(S.a3,{children:(0,F.jsxs)(j.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,F.jsx)(k.Z,G(G({},W),{},{label:oe>=1&&ie?"Last run at ".concat(new Date(ie.valueOf()).toLocaleString()):V?"Block executed with errors":"Block executed successfully",children:(0,F.jsxs)(j.Z,{alignItems:"center",children:[oe>=1&&Number(re)>Number(ie)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(y.ZP,{small:!0,children:[(Number(re)-Number(ie))/1e3,"s"]}),(0,F.jsx)(Z.Z,{mr:1})]}),!V&&(0,F.jsx)(I.Jr,{size:2*w.iI,success:!0}),V&&(0,F.jsx)(m.Z,{danger:!0,size:2*w.iI,children:(0,F.jsx)(y.ZP,{bold:!0,monospace:!0,small:!0,children:"!"})})]})})),!V&&!f.Qj.includes(he)&&(0,F.jsx)(Z.Z,{pl:2,children:(0,F.jsxs)(j.Z,{alignItems:"center",children:[(0,F.jsx)(k.Z,G(G({},W),{},{label:"Expand table",children:(0,F.jsx)(p.Z,G(G({},z),{},{onClick:function(){(0,L.OF)(null===te||void 0===te?void 0:te.uuid,ve),null===ne||void 0===ne||ne(N.cH.DATA),null===se||void 0===se||se((function(e){return e.find((function(e){return e.uuid===ve}))?e:(null===de||void 0===de||de(n),e.concat(n))}))},children:(0,F.jsx)(I.M0,{muted:!0,size:1.75*w.iI})}))})),(0,F.jsx)(Z.Z,{pl:2}),(0,F.jsx)(k.Z,G(G({},W),{},{forceVisible:Ae,label:Ae?"".concat(ke||0,"mb downloaded..."):"Save output as CSV file",children:(0,F.jsx)(p.Z,G(G({},z),{},{compact:!0,loading:Ae,onClick:function(){Ee(null),Re()},children:(0,F.jsx)(I.vc,{muted:!0,size:1.75*w.iI})}))}))]})})]})})]})]})]}):null}},93005:function(e,n,t){t.d(n,{$m:function(){return r},C:function(){return a},Jt:function(){return u},Rj:function(){return i},Xy:function(){return c},gM:function(){return l},vT:function(){return s}});var o=t(49125),r={uuid:"Preview results"},i={uuid:"Logs"},u={uuid:"SQL"},l={uuid:"Lineage"},c=function(e){var n,t,o=e.metadata,c=[i,u];return(null===o||void 0===o||null===(n=o.dbt)||void 0===n||null===(t=n.block)||void 0===t?void 0:t.snapshot)||(c.unshift(r),c.push(l)),c},a=2.5*o.iI,s="CodeBlock_HiddenBlock"},89949:function(e,n,t){t.d(n,{z:function(){return Ye},Z:function(){return Je}});var o=t(21831),r=t(75582),i=t(82394),u=t(12691),l=t.n(u),c=t(82684),a=t(38626),s=t(10975),d=t(14567),f=t(83455),p=t(28317),m=t(18283),h=t(60328),v=t(67971),b=t(86673),g=t(19711),x=t(44162),j=t(28598);var C=function(e){var n=e.blocks,t=e.onClick,o=(0,c.useContext)(a.ThemeContext);return(0,j.jsx)(v.Z,{alignItems:"center",children:null===n||void 0===n?void 0:n.map((function(e){var n=e.color,r=e.type,i=e.uuid,u=(0,x.qn)(r,{blockColor:n,theme:o}).accentLight;return(0,j.jsx)(b.Z,{ml:1,mt:1,children:(0,j.jsx)(h.Z,{backgroundColor:u,compact:!0,onClick:function(){return t(e)},small:!0,children:(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:i})})},i)}))})},_=t(93461),O=t(45419),Z=t(60701),y=t(24224);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function E(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,i.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}var T=function(e){var n=e.block,t=e.blocks,o=e.openSidekickView,i=e.pipeline,u=(0,c.useMemo)((function(){return(0,y.HK)(t,(function(e){return e.uuid}))}),[t]),l=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.callback_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),a=(0,c.useMemo)((function(){var e;return null===n||void 0===n||null===(e=n.conditional_blocks)||void 0===e?void 0:e.reduce((function(e,n){var t=null===u||void 0===u?void 0:u[n];return t?e.concat(t):e}),[])}),[n,u]),s=(0,c.useMemo)((function(){var e,t=[];return null===(e=Object.entries((null===i||void 0===i?void 0:i.extensions)||{}))||void 0===e||e.forEach((function(e){var o=(0,r.Z)(e,2),i=o[0],l=o[1].blocks;null===l||void 0===l||l.forEach((function(e){var o=e.upstream_blocks,r=e.uuid;if(null!==o&&void 0!==o&&o.includes(null===n||void 0===n?void 0:n.uuid)){var l=null===u||void 0===u?void 0:u[r];l&&t.push(E(E({},l),{},{extension_uuid:i}))}}))})),t}),[n,u,i]);return(0,j.jsxs)(j.Fragment,{children:[(null===a||void 0===a?void 0:a.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Conditionals"})}),(0,j.jsx)(C,{blocks:a,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:O.Q.CONDITIONAL,blockUUID:n})}})]})}),(null===l||void 0===l?void 0:l.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Callbacks"})}),(0,j.jsx)(C,{blocks:l,onClick:function(e){var n=e.uuid;return o(Z.cH.ADDON_BLOCKS,!0,{addon:O.Q.CALLBACK,blockUUID:n})}})]})}),(null===s||void 0===s?void 0:s.length)>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(_.Z,{flexDirection:"column",children:[(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{bold:!0,muted:!0,children:"Extensions"})}),(0,j.jsx)(C,{blocks:s,onClick:function(e){var n=e.extension_uuid,t=e.uuid;return o(Z.cH.EXTENSIONS,!0,{blockUUID:t,extension:n})}})]})})]})},I=t(86422),S=t(32316),R=t(38341),A=t(16634),w=t(57722),P=t(65051),D=t(62084),M=t(42451),N=t(78759),L=t(49125),B=t(90211);function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.addWidget,t=e.block,r=e.left,i=e.rightOffset,u=e.onClickCallback,l=e.open,a=e.parentRef,s=e.runBlock,d=e.topOffset,f=(0,c.useMemo)((function(){return M.CK.map((function(e){var o,r,i={configuration:{chart_type:e},language:t.language,type:I.tf.CHART,upstream_blocks:t?[t.uuid]:null},u=N.x8[e],l=(null===u||void 0===u||null===(o=u.configuration)||void 0===o?void 0:o.call(u,i))||{},c=I.t6.SQL===(null===t||void 0===t?void 0:t.language)?null:(null===u||void 0===u||null===(r=u.content)||void 0===r?void 0:r.call(u,i))||null,a=e;return t&&(a="".concat(a," for ").concat(t.uuid)),{label:function(){return(0,B.vg)(e)},onClick:function(){return n(F(F({},i),{},{name:"".concat(a," ").concat((0,B.Mp)()),configuration:F(F({},i.configuration),l),content:c}),{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:c,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:e}}))}),[M.CK,t,s]),p=(0,c.useMemo)((function(){return N._H.map((function(e){var o=e.label,r=F(F({},(0,e.widgetTemplate)({block:t})),{},{language:t.language,type:I.tf.CHART,upstream_blocks:t?[t.uuid]:null});return{label:o,onClick:function(){return n(r,{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===s||void 0===s||s({block:e,code:e.content,disableReset:!0}):null===s||void 0===s||s({block:t,runDownstream:!0}))}})},uuid:o()}}))}),[N._H,n,t,s]),m=[{isGroupingTitle:!0,label:function(){return"Custom charts"},uuid:"custom_charts"}].concat((0,o.Z)(f));return I.t6.SQL!==t.language&&m.push.apply(m,[{isGroupingTitle:!0,label:function(){return"Templates"},uuid:"chart_templates"}].concat((0,o.Z)(p))),(0,j.jsx)(D.Z,{items:m,left:r,onClickCallback:u,open:l,parentRef:a,rightOffset:i,topOffset:d,uuid:"CommandButtons/add_charts",width:25*L.iI})},G=t(47999),W=t(40656),z=a.default.svg.withConfig({displayName:"Convert__SVGStyle",componentId:"sc-fmw0vr-0"})([""]),Q=function(e){var n=e.fill,t=e.opacity,o=e.size,r=void 0===o?W.C:o,i=e.style,u=e.viewBox,l=void 0===u?"0 0 12 12":u;return(0,j.jsxs)(z,{fill:n,height:r,opacity:t,style:i,viewBox:l,width:r,children:[(0,j.jsx)("path",{clipRule:"evenodd",d:"M2.5 1C1.67157 1 1 1.67157 1 2.5v.0625c0 .27614-.223858.5-.5.5s-.5-.22386-.5-.5V2.5C0 1.11929 1.11929 0 2.5 0h7C10.8807 0 12 1.11929 12 2.5v7c0 1.3807-1.1193 2.5-2.5 2.5h-7C1.11929 12 0 10.8807 0 9.5v-.0625c0-.27614.223858-.5.5-.5s.5.22386.5.5V9.5c0 .8284.67157 1.5 1.5 1.5h7c.8284 0 1.5-.6716 1.5-1.5v-7c0-.82843-.6716-1.5-1.5-1.5h-7z",fill:"url(#paint0_linear_1332_60037)",fillRule:"evenodd"}),(0,j.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.05806 3.55806c.24408-.24408.6398-.24408.88388 0l2 2c.24408.24408.24408.6398 0 .88388l-2 2c-.24408.24408-.6398.24408-.88388 0-.24408-.24408-.24408-.6398 0-.88388l.93306-.93306H1C.654822 6.625.375 6.34518.375 6s.279822-.625.625-.625h5.99112l-.93306-.93306c-.24408-.24408-.24408-.6398 0-.88388z",fill:"#fff"}),(0,j.jsx)("defs",{children:(0,j.jsxs)("linearGradient",{id:"paint0_linear_1332_60037",x1:"-.618557",y1:"-.000001",x2:"10.5709",y2:".83113",gradientUnits:"userSpaceOnUse",children:[(0,j.jsx)("stop",{stopColor:"#FFCC19"}),(0,j.jsx)("stop",{offset:".585938",stopColor:"#2ECDF7"}),(0,j.jsx)("stop",{offset:"1",stopColor:"#9E7BFF"})]})})]})},q=t(30264),K=t(79749),V=t(33572),Y=t(10919),X=t(29237),J=t(54283),$=t(46261),ee=t(82531),ne=t(23831),te=t(82635),oe=t(22341),re=t(93005),ie=t(16115),ue=t(98781),le=t(75968),ce=t(54405),ae=t(96510);function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var fe,pe=function(e){var n,t,o=e.addNewBlock,i=e.addWidget,u=e.block,l=e.blocks,s=e.deleteBlock,d=e.executionState,p=e.fetchFileTree,m=e.fetchPipeline,C=e.hideExtraButtons,_=e.interruptKernel,O=e.isEditingBlock,k=e.openSidekickView,E=e.pipeline,T=e.project,S=e.runBlock,R=e.setIsEditingBlock,w=e.savePipelineContent,P=e.setErrors,M=e.setOutputCollapsed,N=e.showConfigureProjectModal,B=u.all_upstream_blocks_executed,U=void 0===B||B,F=u.color,W=u.metadata,z=u.type,se=u.uuid,fe=(0,c.useRef)(null),pe=(0,c.useRef)(null),me=(0,c.useRef)(null),he=(0,c.useRef)(null),ve=(0,c.useRef)(null),be=null===E||void 0===E?void 0:E.type,ge=(0,c.useState)(!1),xe=ge[0],je=ge[1],Ce=(0,c.useState)(!1),_e=Ce[0],Oe=Ce[1],Ze=(0,c.useState)(!1),ye=Ze[0],ke=Ze[1],Ee=(0,c.useState)(!1),Te=Ee[0],Ie=Ee[1],Se=(0,c.useState)(!1),Re=Se[0],Ae=Se[1],we=(0,c.useContext)(a.ThemeContext),Pe=te.uF.IDLE!==d,De=(0,x.qn)(z,{blockColor:F,theme:we}).accent,Me=(0,c.useMemo)((function(){return be===ue.qL.STREAMING}),[be]),Ne=(0,c.useMemo)((function(){return be===ue.qL.INTEGRATION}),[be]),Le=(0,c.useMemo)((function(){return(0,le.Ts)(u,l,"CommandButtons",o).map((function(e){return de(de({},e),{},{onClick:function(){return w().then((function(){return e.onClick()}))}})}))}),[o,u,l,w]),Be=(0,c.useMemo)((function(){return(0,y.HK)(l,(function(e){return e.uuid}))}),[l]),Ue=(0,c.useMemo)((function(){return I.tf.DBT===(null===u||void 0===u?void 0:u.type)}),[u]),Fe=(0,c.useMemo)((function(){return I.tf.MARKDOWN===(null===u||void 0===u?void 0:u.type)}),[u]),He=(0,f.Db)(ee.ZP.pipelines.useUpdate(null===E||void 0===E?void 0:E.uuid),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(){m()},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),Ge=(0,r.Z)(He,2),We=Ge[0],ze=Ge[1].isLoading,Qe=(0,c.useMemo)((function(){var e=!(null!==T&&void 0!==T&&T.openai_api_key),n=function(e){null===N||void 0===N||N({header:(0,j.jsx)(b.Z,{mb:L.HN,children:(0,j.jsxs)(X.Z,{children:[(0,j.jsx)(g.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(g.ZP,{warning:!0,children:["Read ",(0,j.jsx)(Y.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onSaveSuccess:function(n){null!==n&&void 0!==n&&n.openai_api_key&&We({pipeline:{llm:e}})}})},t={request:{block_uuid:null===u||void 0===u?void 0:u.uuid,pipeline_uuid:null===E||void 0===E?void 0:E.uuid}};return[{label:function(){return"Document block"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_BLOCK,e?n(t):We({pipeline:{llm:t}})},uuid:"Document block"},{label:function(){return"Document pipeline and all blocks"},onClick:function(){t.use_case=V.z.GENERATE_DOC_FOR_PIPELINE,e?n(t):We({pipeline:{llm:t}})},uuid:"Document pipeline and all blocks"}]}),[u,E,T,N,We]);return(0,j.jsxs)(v.Z,{alignItems:"center",children:[te.uF.QUEUED===d&&(0,j.jsx)(J.Z,{color:(we||ne.Z).content.active,type:"cylon"}),te.uF.BUSY===d&&(0,j.jsx)(J.Z,{color:(we||ne.Z).content.active}),S&&!Pe&&!Me&&(0,j.jsxs)(j.Fragment,{children:[!Ue&&(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Run block \xa0 \xa0",(0,j.jsx)(K.Z,{inline:!0,keyTextGroups:[[(0,ce.V5)()?ie.RJ:ie.hE,ie.Lz]],monospace:!0,uuidForKey:se})]}),size:3*L.iI,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){U?S({block:u}):ke(!0)},children:(0,j.jsx)(A.Z,{color:De,size:3*L.iI,children:(0,j.jsx)(oe.Py,{black:!0,size:1.5*L.iI})})})}),Ue&&(0,j.jsx)(h.Z,{backgroundColor:De,beforeIcon:(0,j.jsx)(oe.Py,{size:1.5*L.iI}),compact:!0,onClick:function(){U?S({block:u}):ke(!0)},small:!0,children:null!==W&&void 0!==W&&null!==(n=W.dbt)&&void 0!==n&&null!==(t=n.block)&&void 0!==t&&t.snapshot?"Run snapshot":"Compile & preview"}),(0,j.jsx)(G.Z,{disableEscape:!0,onClickOutside:function(){return ke(!1)},open:ye,children:(0,j.jsx)(D.Z,{items:[{label:function(){return"Execute block"},onClick:function(){return S({block:u})},uuid:"execute_block"},{label:function(){return"Execute with upstream blocks"},onClick:function(){return S({block:u,runUpstream:!0})},uuid:"execute_upstream"}],onClickCallback:function(){return ke(!1)},open:ye,parentRef:me,rightOffset:13.25*L.iI,topOffset:4.5*L.iI,uuid:"execute_actions",width:25*L.iI})})]}),Pe&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Interrupt kernel \xa0 \xa0",(0,j.jsx)(K.Z,{inline:!0,keyTextGroups:[[ie.kA],[ie.kA]],monospace:!0,uuidForKey:se})]}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return _()},children:(0,j.jsx)(A.Z,{borderSize:1.5,size:re.C,children:(0,j.jsx)(oe.x8,{size:1*L.iI})})})})}),!C&&I.tf.SCRATCHPAD===u.type&&!Me&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(q.Z,{items:Le,onClickCallback:function(){return Oe(!1)},onClickOutside:function(){return Oe(!1)},open:_e,parentRef:pe,rightOffset:0,topOffset:4,uuid:"CommandButtons/convert_block",children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"Convert block"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Oe(!_e)},ref:pe,children:(0,j.jsx)(Q,{size:re.C})})})})}),!C&&[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(u.type)&&!Me&&!Ne&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:L.cd,ref:fe,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:"Add chart",size:2.25*L.iI,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return je((function(e){return!e}))},children:(0,j.jsx)(oe.GQ,{size:2.25*L.iI})})})}),i&&(0,j.jsx)(G.Z,{disableEscape:!0,onClickOutside:function(){return je(!1)},open:xe,children:(0,j.jsx)(H,{addWidget:i,block:u,onClickCallback:function(){return je(!1)},open:xe,parentRef:fe,rightOffset:9*L.iI,runBlock:S,topOffset:2*L.iI})})]}),!C&&Fe&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:O?"Close editor":"Edit",size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return R((function(e){return!e}))},children:O?(0,j.jsx)(oe.Jr,{size:re.C,success:!0}):(0,j.jsx)(oe.I8,{size:re.C})})})}),!C&&I.tf.GLOBAL_DATA_PRODUCT!==(null===u||void 0===u?void 0:u.type)&&(0,j.jsx)("div",{ref:ve,children:(0,j.jsxs)(b.Z,{ml:L.cd,children:[ze&&(0,j.jsx)(J.Z,{inverted:!0,small:!0}),!ze&&(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"AI actions"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Ae((function(e){return!e}))},children:(0,j.jsx)(oe.xq,{default:!0,size:re.C})})})]})}),!C&&(0,j.jsx)(G.Z,{disableEscape:!0,onClickOutside:function(){return Ae(!1)},open:Re,children:(0,j.jsx)(D.Z,{items:Qe,onClickCallback:function(){return Ae(!1)},open:Re,parentRef:ve,rightOffset:4.75*L.iI,topOffset:2*L.iI,uuid:"FileHeaderMenu/AI_actions"})}),!C&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:"View and edit settings for this block",size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return null===k||void 0===k?void 0:k(Z.cH.BLOCK_SETTINGS)},children:(0,j.jsx)(oe.JG,{default:!0,size:re.C})})})}),!C&&(0,j.jsx)("div",{ref:he,children:(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)($.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"More actions"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Ie((function(e){return!e}))},children:(0,j.jsx)(A.Z,{borderSize:1.5,default:!0,size:re.C,children:(0,j.jsx)(oe.mH,{default:!0,size:L.iI})})})})})}),!C&&(0,j.jsx)(G.Z,{disableEscape:!0,onClickOutside:function(){return Ie(!1)},open:Te,children:(0,j.jsx)(D.Z,{items:(0,le.J8)(u,S,s,M,Me||Ne,{addNewBlock:o,blocksMapping:Be,fetchFileTree:p,fetchPipeline:m,savePipelineContent:w,updatePipeline:We}),onClickCallback:function(){return Ie(!1)},open:Te,parentRef:he,rightOffset:4.75*L.iI,topOffset:2*L.iI,uuid:"FileHeaderMenu/file_items"})})]})};!function(e){e.APPEND="append",e.FAIL="fail",e.REPLACE="replace"}(fe||(fe={}));var me,he=[fe.APPEND,fe.FAIL,fe.REPLACE];!function(e){e.BIGQUERY="bigquery",e.CLICKHOUSE="clickhouse",e.DRUID="druid",e.MYSQL="mysql",e.POSTGRES="postgres",e.REDSHIFT="redshift",e.SNOWFLAKE="snowflake",e.TRINO="trino"}(me||(me={}));var ve=t(34744),be=t(25717),ge=t(68792),xe=t(5882),je=t(87372),Ce=t(2005),_e=t(73942),Oe=t(31012),Ze=t(37391),ye="0.75em",ke=a.default.div.withConfig({displayName:"indexstyle__MarkdownContainer",componentId:"sc-j72mol-0"})(["font-family:",";margin:0 ","px;overflow:auto;"," "," p{margin:0.5em 0;}blockquote{margin:"," 0;padding:","px 0;","}blockquote:before{content:'';font-size:","px;line-height:0.1em;margin-right:0.25em;vertical-align:-0.4em;}blockquote p{display:inline;}pre{border-radius:","px;white-space:pre;margin:"," 0;padding:","px;overflow-x:auto;"," "," span{padding:0;}}ul,ol{margin-bottom:",";padding-left:","px;}li{","}li > input[type='checkbox']{pointer-events:none;}table{"," margin:",";thead{font-family:",";","}th,td{padding:","px ","px;","}}"],Ce.ry,L.iI,Ze.w5,(function(e){return"\n color: ".concat((e.theme||ne.Z).content.active,";\n ")}),ye,L.iI,(function(e){return"\n border-left: ".concat(.5*L.iI,"px solid ").concat((e.theme||ne.Z).content.active,";\n ")}),3*L.l4,_e.BG,ye,L.iI,Ze.w5,(function(e){return"\n background-color: ".concat((e.theme||ne.Z).interactive.defaultBorder,";\n ")}),ye,3*L.iI,Oe.iD,Oe.iD,ye,Ce.nF,(function(e){return"\n border-bottom: ".concat(_e.YF,"px solid ").concat((e.theme||ne.Z).content.active,";\n ")}),.5*L.iI,.75*L.iI,(function(e){return"\n border: ".concat(_e.YF,"px solid ").concat((e.theme||ne.Z).content.muted,";\n ")}));var Ee=function(e){var n=e.children;return(0,j.jsx)(ke,{children:(0,j.jsx)(ge.D,{components:{a:function(e){var n=e.children,t=e.href;return(0,j.jsx)(Y.Z,{href:t,inline:!0,openNewWindow:!0,primary:!0,children:n})},code:function(e){var n=e.children;return(0,j.jsx)(g.ZP,{backgroundColor:ne.Z.interactive.defaultBorder,inline:!0,monospace:!0,pre:!0,style:{fontSize:"13px"},children:n})},em:function(e){var n=e.children;return(0,j.jsx)(g.ZP,{inline:!0,italic:!0,children:n})},h1:function(e){var n=e.children;return(0,j.jsx)(je.Z,{level:1,children:n})},h2:function(e){var n=e.children;return(0,j.jsx)(je.Z,{level:2,children:n})},h3:function(e){var n=e.children;return(0,j.jsx)(je.Z,{level:3,children:n})},h4:function(e){var n=e.children;return(0,j.jsx)(je.Z,{level:4,children:n})},h5:function(e){var n=e.children;return(0,j.jsx)(je.Z,{level:5,children:n})},p:function(e){var n=e.children;return(0,j.jsx)(g.ZP,{children:n})},strong:function(e){var n=e.children;return(0,j.jsx)(g.ZP,{bold:!0,inline:!0,children:n})}},remarkPlugins:[xe.Z],children:n})})},Te=t(55378),Ie=t(82944),Se=t(87815),Re=t(66653);function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function we(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Pe=function(e){var n=e.block,t=e.blockConfiguration,o=e.blockRefs,r=e.blocks,u=e.updateBlockConfiguration,l=(0,c.useContext)(a.ThemeContext),s=I.t6.R===(null===n||void 0===n?void 0:n.language),d=I.t6.SQL===(null===n||void 0===n?void 0:n.language),f=null===r||void 0===r?void 0:r.find((function(e){var n=e.language;return I.t6.PYTHON===n})),p=(0,c.useMemo)((function(){var e=[null];return d&&f?e.push.apply(e,[null,1]):e.push(1),e}),[f,d]),m=(0,c.useMemo)((function(){var e=[{tooltipMessage:null,uuid:"Variable"},{tooltipMessage:null,uuid:"Block"}];return d&&f&&e.push({tooltipMessage:"Customize the full table name that this block gets created in. Include database, schema, and table name where applicable.",uuid:"Table name"}),e}),[f,d]),h=(0,c.useMemo)((function(){return null===r||void 0===r?void 0:r.map((function(e,n){var r,c=e.color,a=e.language,p=e.type,m=e.uuid,h=(0,x.qn)(p,{blockColor:c,theme:l}).accent,v=I.t6.PYTHON===a;r=d?"{{ df_".concat(n+1," }}"):s?"df".concat(n+1):"data".concat(n>=1?"_".concat(n+1):null);var b=[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:r},"variable-".concat(m)),(0,j.jsx)(Y.Z,{color:h,onClick:function(){var e,n,t=null===o||void 0===o||null===(e=o.current)||void 0===e?void 0:e["".concat(p,"s/").concat(m,".py")];null===t||void 0===t||null===(n=t.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:h,monospace:!0,small:!0,children:m})},"block-".concat(m))];if(d){var C="table-name-input-".concat(m),_=(null===t||void 0===t?void 0:t[M.Yf])||{},O=(null===_||void 0===_?void 0:_[m])||{};v?b.push((0,j.jsx)(Ie.Z,{borderless:!0,compact:!0,monospace:!0,onChange:function(e){var n=e.target.value;u((0,i.Z)({},M.Yf,we(we({},_),{},(0,i.Z)({},m,we(we({},O),{},(0,i.Z)({},M.aZ,n))))))},onClick:Re.j,placeholder:"[database_optional].[schema_optional].[table]",small:!0,value:(null===O||void 0===O?void 0:O[M.aZ])||""},C)):f&&b.push((0,j.jsx)(g.ZP,{italic:!0,muted:!0,small:!0,children:"Table name is defined in upstream block."},C))}return b}))}),[f,t,o,r,s,d,l,u]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(Se.Z,{columnFlex:p,columns:m,compact:!0,noBorder:!0,rows:h,uuid:"CodeBlock/UpstreamBlockSettings/".concat(null===n||void 0===n?void 0:n.uuid)})})},De=t(59582),Me=t(66166),Ne=t(31524),Le=t(32365),Be=t(84212),Ue=t(80636),Fe=t(91427),He=t(25958),Ge=t(43482),We=t(51504),ze=t(7715),Qe=t(87323),qe=t(41150);function Ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ke(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ye=1e3;function Xe(e,n){var t,u,C,O,k=e.addNewBlock,E=e.addNewBlockMenuOpenIdx,D=e.addWidget,N=e.allBlocks,U=e.allowCodeBlockShortcuts,F=e.autocompleteItems,H=e.block,G=e.blockIdx,W=e.blockRefs,z=e.blockTemplates,Q=e.blocks,K=void 0===Q?[]:Q,V=e.dataProviders,X=e.defaultValue,J=void 0===X?"":X,ne=e.deleteBlock,ce=e.disableDrag,se=e.disableShortcuts,de=e.executionState,ge=e.extraContent,xe=e.fetchFileTree,je=e.fetchPipeline,Ce=e.globalDataProducts,_e=e.height,Oe=e.hideExtraCommandButtons,Ze=e.hideExtraConfiguration,ye=e.hideHeaderInteractiveInformation,ke=e.hideRunButton,Se=e.interruptKernel,Ae=e.mainContainerRef,we=e.mainContainerWidth,Ke=e.messages,Xe=void 0===Ke?[]:Ke,Je=e.noDivider,$e=e.onCallbackChange,en=e.onChange,nn=e.onClickAddSingleDBTModel,tn=e.onDrop,on=e.openSidekickView,rn=e.pipeline,un=e.project,ln=e.runBlock,cn=e.runningBlocks,an=e.savePipelineContent,sn=e.selected,dn=e.setAddNewBlockMenuOpenIdx,fn=e.setAnyInputFocused,pn=e.setCreatingNewDBTModel,mn=e.setEditingBlock,hn=e.setErrors,vn=e.setOutputBlocks,bn=e.setSelected,gn=e.setSelectedBlock,xn=e.setSelectedOutputBlock,jn=e.setTextareaFocused,Cn=e.showBrowseTemplates,_n=e.showConfigureProjectModal,On=e.showGlobalDataProducts,Zn=e.textareaFocused,yn=e.widgets,kn=(0,c.useContext)(a.ThemeContext),En=H||{},Tn=En.callback_content,In=En.configuration,Sn=void 0===In?{}:In,Rn=En.color,An=En.error,wn=En.has_callback,Pn=En.language,Dn=En.pipelines,Mn=En.replicated_block,Nn=En.type,Ln=En.upstream_blocks,Bn=void 0===Ln?[]:Ln,Un=En.uuid,Fn=(0,c.useMemo)((function(){return Sn}),[Sn]),Hn=(0,c.useMemo)((function(){var e;return(null===(e=Object.values(Dn||{}))||void 0===e?void 0:e.length)||1}),[Dn]),Gn=(0,c.useMemo)((function(){return null===Fn||void 0===Fn?void 0:Fn.global_data_product}),[Fn]),Wn=(0,c.useMemo)((function(){return(0,y.HK)(Ce||[],(function(e){return e.uuid}))}),[Ce]),zn=(0,c.useState)(!1),Qn=zn[0],qn=zn[1],Kn=(0,c.useState)(null),Vn=Kn[0],Yn=Kn[1],Xn=(0,c.useState)(!1),Jn=Xn[0],$n=Xn[1],et=(0,c.useState)(!1),nt=et[0],tt=et[1],ot=(0,c.useState)(J),rt=ot[0],it=ot[1],ut=(0,c.useState)(null),lt=ut[0],ct=ut[1],at=rn||{},st=at.type,dt=at.uuid,ft=(0,c.useMemo)((function(){return ue.qL.STREAMING===st}),[st]),pt=I.tf.DBT===Nn,mt=I.t6.SQL===Pn,ht=I.t6.R===Pn,vt=I.tf.MARKDOWN===Nn,bt=Fn[M.mW];mt&&void 0===bt&&(bt=Ye);var gt=(0,c.useState)(Ve(Ve({},Fn),{},(t={},(0,i.Z)(t,M.cH,Fn[M.cH]),(0,i.Z)(t,M.Sv,Fn[M.Sv]),(0,i.Z)(t,M.sc,Fn[M.sc]),(0,i.Z)(t,M.BD,Fn[M.BD]),(0,i.Z)(t,M.m$,Fn[M.m$]),(0,i.Z)(t,M.Pi,Fn[M.Pi]||{}),(0,i.Z)(t,M.Mv,Fn[M.Mv]),(0,i.Z)(t,M.eW,Fn[M.eW]),(0,i.Z)(t,M.nq,Fn[M.nq]||fe.APPEND),(0,i.Z)(t,M.mW,bt),(0,i.Z)(t,M.bk,Fn[M.bk]),(0,i.Z)(t,M.Mi,!!Fn[M.Mi]),t))),xt=gt[0],jt=gt[1],Ct=(0,c.useState)(null),_t=Ct[0],Ot=Ct[1],Zt=(0,c.useState)(vt),yt=Zt[0],kt=Zt[1],Et=(0,c.useState)(!1),Tt=Et[0],It=Et[1],St=(0,c.useState)(Un),Rt=St[0],At=St[1],wt=(0,c.useState)(!1),Pt=wt[0],Dt=wt[1],Mt=(0,c.useState)(0),Nt=Mt[0],Lt=Mt[1],Bt=(0,c.useState)(null),Ut=Bt[0],Ft=Bt[1],Ht=(0,c.useState)(null),Gt=Ht[0],Wt=Ht[1],zt=(0,c.useState)(Xe),Qt=zt[0],qt=zt[1],Kt=(0,c.useState)((0,re.Xy)(H)[0]),Vt=Kt[0],Yt=Kt[1],Xt=(0,s.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:H,type:re.vT}}),[H]),Jt=(0,r.Z)(Xt,2),$t=Jt[0],eo=Jt[1],no=(0,d.L)((function(){return{accept:re.vT,drop:function(e){return null===tn||void 0===tn?void 0:tn(H,e)}}}),[H]),to=(0,r.Z)(no,2)[1],oo=(0,c.useMemo)((function(){var e;return(null===H||void 0===H||null===(e=H.metadata)||void 0===e?void 0:e.dbt)||{project:null,projects:{}}}),[H]),ro=(0,c.useMemo)((function(){return oo.projects||{}}),[oo]),io=(0,c.useMemo)((function(){return oo.project||xt[M.eW]}),[xt,oo]),uo=(0,c.useMemo)((function(){return ro[io]||{target:null,targets:[]}}),[io,ro]),lo=(0,c.useMemo)((function(){return uo.targets||[]}),[uo]),co=(0,c.useMemo)((function(){return xt[M.Mv]}),[xt]),ao=io?null!==uo&&void 0!==uo&&uo.target?(0,y.sE)(lo,(function(e){return e===uo.target})):"Select target":"Select project first",so=(0,c.useState)(co&&!(null!==lo&&void 0!==lo&&lo.includes(co))),fo=so[0],po=so[1],mo=(0,c.useState)(null),ho=mo[0],vo=mo[1];(0,c.useEffect)((function(){Tn!==ho&&vo(Tn)}),[ho,Tn]);var bo=(0,Me.Z)(H);(0,c.useEffect)((function(){if(JSON.stringify(H)!=JSON.stringify(bo)){var e,n=(0,Ge.Rt)([H]).messages,t=null===n||void 0===n||null===(e=n[Nn])||void 0===e?void 0:e[Un];(null===t||void 0===t?void 0:t.length)>=1&&qt(t)}}),[H,Nn,Un,bo,qt]);var go=(0,Me.Z)(Xe);(0,c.useEffect)((function(){"undefined"!==typeof Xe&&Xe.length!==(null===go||void 0===go?void 0:go.length)&&qt(Xe)}),[Xe,go,qt]);var xo=(0,c.useMemo)((function(){var e=new Set;return null===V||void 0===V||V.forEach((function(n){var t=n.profiles;e=new Set([].concat((0,o.Z)(e),(0,o.Z)(t)))})),(0,o.Z)(e)}),[V]),jo=(0,c.useMemo)((function(){return"".concat(dt,"/").concat(Un,"/codeCollapsed")}),[dt,Un]),Co=(0,c.useMemo)((function(){return"".concat(dt,"/").concat(Un,"/outputCollapsed")}),[dt,Un]);(0,c.useEffect)((function(){tt((0,Fe.U2)(jo,!1)),Dt((0,Fe.U2)(Co,!1))}),[jo,Co]);var _o=(0,c.useRef)(null),Oo=(0,c.useMemo)((function(){return(0,y.HK)(K,(function(e){return e.uuid}))}),[K]),Zo=(0,c.useMemo)((function(){return!(null===yn||void 0===yn||!yn.find((function(e){return e.upstream_blocks.includes(Un)})))}),[Un,yn]),yo=(0,c.useCallback)((function(e){var n=e||{},t=n.block,o=n.code,r=n.disableReset,i=n.runDownstream,u=n.runIncompleteUpstream,l=n.runSettings,c=n.runUpstream,a=n.runTests;if(null===a||"undefined"===typeof a){var s=(t||{}).type;a=[I.tf.DATA_LOADER,I.tf.DATA_EXPORTER,I.tf.TRANSFORMER].includes(s)}pt&&re.Rj!==Vt&&Yt(re.Rj),null===ln||void 0===ln||ln({block:t,code:o||rt,runDownstream:i||Zo,runIncompleteUpstream:u||!1,runSettings:l,runTests:a||!1,runUpstream:c||!1}),r||(Lt(1+Number(Nt)),Ft(null),Dt(!1))}),[rt,Zo,pt,ln,Nt,Vt,Lt,Ft,Yt]),ko=!(null===cn||void 0===cn||!cn.find((function(e){return e.uuid===Un})))||(null===Qt||void 0===Qt?void 0:Qt.length)>=1&&de!==te.uF.IDLE;(0,c.useEffect)((function(){ko&&Wt(Number(new Date))}),[ko,Wt]);var Eo=(0,Me.Z)(de);(0,c.useEffect)((function(){de===te.uF.IDLE&&de!==Eo&&Ft(Number(new Date))}),[de,Eo,Ft]);var To=(0,c.useCallback)((function(e){var n=e.editorRect.top,t=e.position.lineNumberTop;if(null!==Ae&&void 0!==Ae&&Ae.current){var o=Ae.current.getBoundingClientRect().height;if(n+t>o){var r=Ae.current.scrollTop+(t-o+n);Ae.current.scrollTo(0,r)}else if(t+n<Le.aU){var i=Ae.current.scrollTop+(t+n-Le.aU);Ae.current.scrollTo(0,i)}}}),[Ae]),Io=(0,c.useMemo)((function(){return(0,le.h5)(Qt,_t)}),[_t,Qt]),So=(0,le.oI)(Io),Ro=So.hasError,Ao=So.hasOutput,wo=(0,x.qn)(Nn,{blockColor:Rn,theme:kn}).accent,Po=(null===Bn||void 0===Bn?void 0:Bn.length)||0,Do=(0,Qe.cU)([H],K)[0],Mo=Do.dynamic,No=Do.dynamicUpstreamBlock,Lo=Do.reduceOutput,Bo=Do.reduceOutputUpstreamBlock,Uo=(0,c.useMemo)((function(){return(0,le._o)({block:H,dynamic:Mo,dynamicUpstreamBlock:No,hasError:Ro,reduceOutput:Lo,reduceOutputUpstreamBlock:Bo,selected:sn})}),[H,Mo,No,Ro,Lo,Bo,sn]),Fo=Uo.borderColorShareProps,Ho=Uo.tags,Go=(0,c.useCallback)((function(){sn||(null===fn||void 0===fn||fn(!1),null===bn||void 0===bn||bn(!0))}),[sn,fn,bn]),Wo=ee.ZP.blocks.pipelines.detail(dt,re.gM.uuid===(null===Vt||void 0===Vt?void 0:Vt.uuid)||re.Jt.uuid===(null===Vt||void 0===Vt?void 0:Vt.uuid)?encodeURIComponent(Un):null,{_format:"dbt"},{revalidateOnFocus:!0}),zo=Wo.data,Qo=Wo.mutate,qo=(0,c.useMemo)((function(){var e;return(null===zo||void 0===zo||null===(e=zo.block)||void 0===e?void 0:e.metadata)||{}}),[zo]),Ko=(0,f.Db)(ee.ZP.blocks.pipelines.useUpdate(dt,Un),{onError:function(e){var n=(0,ae.qQ)(e).messages;Ot(n)},onSuccess:function(e){return(0,ae.wD)(e,{callback:function(e){It(!1),je(),xe(),it(rt),null!==e&&void 0!==e&&e.block&&gn(null===e||void 0===e?void 0:e.block)},onErrorCallback:function(e,n){return hn({errors:n,response:e})}})}}),Vo=(0,r.Z)(Ko,1)[0],Yo="CodeBlock/".concat(Un),Xo=(0,qe.y)(),Jo=Xo.registerOnKeyDown,$o=Xo.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){$o(Yo)}}),[$o,Yo]),Jo(Yo,(function(e,n,t){se&&!U||(Tt&&String(t[0])===String(ie.Uq)&&String(t[1])!==String(ie.zX)?Un===Rt?e.target.blur():Vo({block:Ve(Ve({},H),{},{name:Rt})}):sn&&!ke&&((0,We.y)([ie.zX,ie.Uq],n)||(0,We.y)([ie.PQ,ie.Uq],n)?yo({block:H}):(0,We.y)([ie.XR,ie.Uq],n)&&k&&(e.preventDefault(),k({language:Pn,type:Nn,upstream_blocks:[Un]}),yo({block:H}))))}),[k,H,ke,Tt,Rt,yo,sn,Vo]),(0,c.useEffect)((function(){var e;return Gt&&(e=setInterval((function(){return ct(Number(new Date))}),1e3)),lt&&!ko&&clearInterval(e),function(){return clearInterval(e)}}),[lt,ko,Gt]);var er=(0,c.useCallback)((function(e){var n,t=(n={},(0,i.Z)(n,I.tf.CUSTOM,Object.values(I.Lq).reduce((function(n,t){return(null===e||void 0===e?void 0:e.color)!==t&&n.push({label:function(){return(0,j.jsx)(_.Z,{alignItems:"center",children:(0,j.jsxs)(g.ZP,{noWrapping:!0,children:["Change color to ",(0,j.jsx)(g.ZP,{color:(0,x.qn)(I.tf.CUSTOM,{blockColor:t}).accent,inline:!0,children:t})]})})},onClick:function(){Vo({block:Ve(Ve({},e),{},{color:t})})},uuid:t}),n}),[])),(0,i.Z)(n,I.tf.SCRATCHPAD,(0,o.Z)((0,le.Ts)(e,K,"block_menu/scratchpad",k)).map((function(e){return Ve(Ve({},e),{},{onClick:function(){return an().then((function(){return e.onClick()}))}})}))),n);return t[e.type]}),[k,K,an,Vo]),nr=(0,c.useMemo)((function(){return Mn&&(null===Oo||void 0===Oo?void 0:Oo[Mn])}),[Oo,Mn]),tr=(0,c.useMemo)((function(){if(Mn)return null;if(I.tf.GLOBAL_DATA_PRODUCT===Nn){var e=null===Wn||void 0===Wn?void 0:Wn[null===Gn||void 0===Gn?void 0:Gn.uuid];return(0,j.jsxs)(x.y9,{children:[(0,j.jsxs)(b.Z,{mb:L.cd,mt:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"UUID"}),(0,j.jsx)(g.ZP,{monospace:!0,children:null===e||void 0===e?void 0:e.uuid})]}),(0,j.jsxs)(b.Z,{mb:L.cd,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:(0,B.kC)((null===e||void 0===e?void 0:e.object_type)||"")}),(0,j.jsx)(l(),{as:"/pipelines/".concat(null===e||void 0===e?void 0:e.object_uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,j.jsx)(Y.Z,{monospace:!0,openNewWindow:!0,children:null===e||void 0===e?void 0:e.object_uuid})})]}),(0,j.jsxs)(b.Z,{mb:1,children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Override global data product settings"}),(0,j.jsx)(Y.Z,{monospace:!0,onClick:function(){return on(Z.cH.BLOCK_SETTINGS)},children:"Customize block settings"})]})]})}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(w.Z,{autoHeight:!0,autocompleteProviders:Vn,block:H,height:_e,language:Pn,onChange:function(e){it(e),null===en||void 0===en||en(e)},onDidChangeCursorPosition:To,placeholder:I.tf.DBT===Nn&&I.t6.YAML===Pn?"e.g. --select ".concat(io||"project","/models --exclude ").concat(io||"project","/models/some_dir"):"Start typing here...",selected:sn,setSelected:bn,setTextareaFocused:jn,shortcuts:ke?[]:[function(e,n){return(0,Ue.Q)(e,(function(){ke||yo({block:H,code:n.getValue()})}))}],textareaFocused:Zn,value:rt,width:"100%"}),wn&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ve.Z,{}),(0,j.jsxs)(b.Z,{mt:1,children:[(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsx)(g.ZP,{small:!0,children:"Callback block: define @on_success or @on_failure callbacks for this block."}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["kwargs",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:" \u2192 "}),"global variables"]})]}),(0,j.jsx)(w.Z,{autoHeight:!0,autocompleteProviders:Vn,language:"python",onChange:function(e){vo(e),null===$e||void 0===$e||$e(e)},onDidChangeCursorPosition:To,placeholder:"Start typing here...",selected:sn,setSelected:bn,setTextareaFocused:jn,textareaFocused:Zn,value:ho,width:"100%"})]})]})]})}),[Vn,H,Pn,Nn,ho,rt,io,Gn,Wn,wn,_e,ke,$e,en,To,on,Mn,yo,sn,it,bn,jn,Zn]);(0,c.useEffect)((function(){F&&Yn({python:(0,De.Z)({autocompleteItems:F,block:H,blocks:K,pipeline:rn})})}),[F,H,K,rn]);var or=(0,c.useMemo)((function(){return pt?(0,j.jsx)(b.Z,{py:1,children:(0,j.jsx)(S.Z,{onClickTab:function(e){Yt(e),re.gM.uuid!==e.uuid&&re.Jt.uuid!==e.uuid||Qo()},selectedTabUUID:null===Vt||void 0===Vt?void 0:Vt.uuid,small:!0,tabs:(0,re.Xy)(H)})}):null}),[H,Qo,pt,Vt]),rr=(0,c.useMemo)((function(){return(0,j.jsx)(P.Z,Ve(Ve({},Fo),{},{block:H,blockMetadata:qo,buttonTabs:or,collapsed:Pt,hasOutput:Ao,isInProgress:ko,mainContainerWidth:we,messages:Io,openSidekickView:on,pipeline:rn,runCount:Nt,runEndTime:Ut,runStartTime:Gt,selected:sn,selectedTab:Vt,setCollapsed:function(e){Dt((function(){return(0,Fe.t8)(Co,e),e}))},setErrors:hn,setOutputBlocks:vn,setSelectedOutputBlock:xn,setSelectedTab:Yt}))}),[H,qo,Fo,or,Ao,ko,we,Io,on,Pt,Co,rn,Nt,Ut,Gt,sn,Vt,hn,vn,Dt,xn]),ir=(0,c.useCallback)((function(){return $n(!1)}),[]),ur=(0,c.useRef)(null),lr=(0,c.useCallback)((function(e){clearTimeout(ur.current),jt((function(n){return Ve(Ve({},n),e)})),ur.current=setTimeout((function(){var n=Ve(Ve({},xt),e);("undefined"!==typeof n[M.cH]&&"undefined"!==n[M.sc]||"undefined"!==typeof n[M.Mv]||"undefined"!==typeof n[M.eW]||"undefined"!==typeof n[M.mW])&&an({block:{configuration:n,uuid:Un}})}),1e3)}),[Un,xt,an]),cr=Ne.zJ.BIGQUERY===xt[M.cH]||Ne.zJ.SNOWFLAKE===xt[M.cH],ar=(0,c.useMemo)((function(){return(null===K||void 0===K?void 0:K.length)||0}),[K]),sr=(0,c.useMemo)((function(){return rt?(0,j.jsx)(Ee,{children:rt}):(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"Double-click to edit"})})}),[rt]);(0,c.useEffect)((function(){vt&&yt&&!sn&&kt(!1)}),[yt,vt,sn]);var dr=(0,c.useMemo)((function(){return(0,j.jsx)(Ie.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){fn(!0),lr((0,i.Z)({},M.mW,+e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},small:!0,type:"number",value:xt[M.mW]||"",width:11*L.iI})}),[xt,fn,lr]);return(0,j.jsx)("div",{ref:to,children:(0,j.jsxs)("div",{ref:n,style:{position:"relative",zIndex:G===E?ar+9:null},children:[(0,j.jsxs)("div",{style:{position:"relative"},children:[(0,j.jsx)(x.nz,Ve(Ve({},Ve(Ve({},Fo),$t)),{},{bottomBorder:vt,onClick:function(){return Go()},ref:ce?null:eo,zIndex:ar+1-(G||0),children:(0,j.jsxs)(v.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(_.Z,{alignItems:"center",flex:1,children:[(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(m.Z,{monospace:!0,children:I.tf.GLOBAL_DATA_PRODUCT===(null===H||void 0===H?void 0:H.type)?"GDP":I.dO[Pn]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(A.Z,{color:wo,size:1.5*L.iI,square:!0}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(q.Z,{items:er(H),onClickCallback:ir,onClickOutside:ir,open:Jn,parentRef:_o,uuid:"CodeBlock/block_menu",children:(0,j.jsx)(g.ZP,{color:wo,monospace:!0,noWrapping:!0,children:null===(u=pt?I.tf.DBT:I.V4[Nn])||void 0===u?void 0:u.toUpperCase()})}),!ye&&[I.tf.CUSTOM,I.tf.SCRATCHPAD].includes(Nn)&&(0,j.jsxs)(j.Fragment,{children:["\xa0",(0,j.jsx)(h.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){return $n(!0)},transparent:!0,children:(0,j.jsx)(oe.K5,{muted:!0})})]})]}),!ye&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(oe.iU,{size:1.5*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(v.Z,{alignItems:"center",children:[pt&&I.t6.YAML!==Pn&&(0,j.jsx)($.Z,{block:!0,label:(0,He.$1)(H,{fullPath:!0}),size:null,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:(0,He.$1)(H)})}),(!pt||I.t6.YAML===Pn)&&(0,j.jsx)(be.Z,{bold:!1,inputValue:Rt,monospace:!0,muted:!0,notRequired:!0,onBlur:function(){return setTimeout((function(){fn(!1),It(!1)}),300)},onChange:function(e){At(e.target.value),e.preventDefault()},onClick:function(){fn(!0),It(!0)},onFocus:function(){fn(!0),It(!0)},stacked:!0,value:!Tt&&Un}),Tt&&!pt&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:1}),(0,j.jsx)(Y.Z,{onClick:function(){return an({block:{name:Rt,uuid:Un}}).then((function(){It(!1),je(),xe()}))},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Update name"})]})]}),(0,j.jsx)(b.Z,{mr:2}),!I.iZ.includes(Nn)&&we>800&&(0,j.jsx)($.Z,{appearBefore:!0,block:!0,label:"\n ".concat((0,B._6)("parent block",Po),". ").concat(0===Po?"Click to select 1 or more blocks to depend on.":"Edit parent blocks.","\n "),size:null,widthFitContent:Po>=1,children:(0,j.jsx)(h.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){bn(!0),mn({upstreamBlocks:{block:H,values:null===Bn||void 0===Bn?void 0:Bn.map((function(e){return{uuid:e}}))}})},children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsxs)(g.ZP,{monospace:Po>=1,noWrapping:!0,small:!0,underline:0===Po,children:[0===Po&&"Edit parent blocks",Po>=1&&(0,B._6)("parent block",Po)]}),(0,j.jsx)(b.Z,{mr:1}),0===Po&&(0,j.jsx)(oe.Jj,{size:3*L.iI}),Po>=1&&(0,j.jsx)(oe.eV,{size:3*L.iI})]})})}),Hn>=2&&we>725&&(0,j.jsx)(b.Z,{ml:2,children:(0,j.jsx)($.Z,{block:!0,label:"This block is used in ".concat(Hn," pipelines."),size:null,widthFitContent:!0,children:(0,j.jsxs)(Y.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return on(Z.cH.BLOCK_SETTINGS)},preventDefault:!0,small:!0,children:[Hn," pipelines"]})})})]})]}),ln&&(0,j.jsx)(pe,{addNewBlock:k,addWidget:D,block:H,blocks:K,deleteBlock:ne,executionState:de,fetchFileTree:xe,fetchPipeline:je,hideExtraButtons:Oe,interruptKernel:Se,isEditingBlock:yt,openSidekickView:on,pipeline:rn,project:un,runBlock:ke?null:yo,savePipelineContent:an,setErrors:hn,setIsEditingBlock:kt,setOutputCollapsed:Dt,showConfigureProjectModal:_n}),!Oe&&(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(h.Z,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){tt((function(e){return(0,Fe.t8)(jo,!e),!e})),nt||Dt((function(){return(0,Fe.t8)(Co,!0),!0}))},transparent:!0,children:nt?(0,j.jsx)(oe._M,{muted:!0,size:2*L.iI}):(0,j.jsx)(oe.Kh,{muted:!0,size:2*L.iI})})})]})})),(0,j.jsxs)(x.Nk,{onClick:function(){return Go()},children:[(0,j.jsxs)(x.jv,Ve(Ve({},Fo),{},{className:sn&&Zn?"selected":null,hasOutput:!!or||Ao,lightBackground:vt&&!yt,onDoubleClick:function(){vt&&!yt&&kt(!0)},children:[!Ze&&I.tf.DBT===Nn&&!nt&&(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsxs)(v.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(_.Z,{alignItems:"center",children:[I.t6.YAML===Pn&&(0,j.jsx)(Te.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){var n;lr((n={},(0,i.Z)(n,M.Mv,""),(0,i.Z)(n,M.eW,e.target.value),n)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},placeholder:"Project",small:!0,value:xt[M.eW]||"",children:Object.keys(ro||{}).map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),I.t6.YAML!==Pn&&(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:io}),(0,j.jsx)(b.Z,{mr:2}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Target"}),(0,j.jsx)("span",{children:"\xa0"}),!fo&&(0,j.jsx)(Te.Z,{compact:!0,disabled:!io,monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},placeholder:ao,small:!0,value:co||"",children:null===lo||void 0===lo?void 0:lo.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),fo&&(0,j.jsx)(Ie.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.Mv,e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},placeholder:io?(null===uo||void 0===uo?void 0:uo.target)||"Enter target":"Select project first",small:!0,value:co||"",width:21*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.Z,{alignItems:"center",children:(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Manually type the name of the target you want to use in the profile.",(0,j.jsx)("br",{}),"Interpolate environment variables and global variables using the following syntax:",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ env_var('NAME') }}"})," or ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"{{ variables('NAME') }}"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:fo,label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Manually enter target"}),onClick:function(e){(0,Re.j)(e),po(!fo),fo&&lr((0,i.Z)({},M.Mv,null))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})})})]}),I.t6.YAML!==Pn&&!(null!==oo&&void 0!==oo&&null!==(C=oo.block)&&void 0!==C&&C.snapshot)&&(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)($.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Sample limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),dr,(0,j.jsx)(b.Z,{mr:1})]})]}),I.t6.YAML===Pn&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsxs)(_.Z,{alignItems:"center",flex:1,children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"dbt"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(Ie.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.Pi,Ve(Ve({},null===xt||void 0===xt?void 0:xt[M.Pi]),{},(0,i.Z)({},M.pA,e.target.value)))),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},placeholder:"command",small:!0,value:(null===xt||void 0===xt||null===(O=xt[M.Pi])||void 0===O?void 0:O[M.pA])||"",width:10*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:"[type your --select and --exclude syntax below]"}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["(paths start from ",(null===xt||void 0===xt?void 0:xt[M.eW])||"project"," folder)"]})]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:(0,j.jsx)(Y.Z,{href:"https://docs.getdbt.com/reference/node-selection/syntax#examples",openNewWindow:!0,small:!0,children:"Examples"})}),(0,j.jsx)(b.Z,{mr:1})]})})]}),!Ze&&mt&&!nt&&I.tf.DBT!==Nn&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsxs)(v.Z,{flexWrap:"wrap",style:{marginTop:"-8px"},children:[(0,j.jsxs)(v.Z,{style:{marginTop:"8px"},children:[(0,j.jsx)(Te.Z,{compact:!0,label:"Connection",onChange:function(e){return lr((0,i.Z)({},M.cH,e.target.value))},onClick:Re.j,small:!0,value:xt[M.cH],children:null===V||void 0===V?void 0:V.map((function(e){var n=e.id,t=e.value;return(0,j.jsx)("option",{value:t,children:n},n)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(Te.Z,{compact:!0,label:"Profile",onChange:function(e){return lr((0,i.Z)({},M.sc,e.target.value))},onClick:Re.j,small:!0,value:xt[M.sc],children:null===xo||void 0===xo?void 0:xo.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.Z,{alignItems:"center",children:(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, you\u2019ll have to write your own custom",(0,j.jsx)("br",{}),"CREATE TABLE commands and INSERT commands.",(0,j.jsx)("br",{}),"Separate your commands using a semi-colon: ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:";"})]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:xt[M.Mi],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Use raw SQL"}),onClick:function(e){(0,Re.j)(e),lr((0,i.Z)({},M.Mi,!xt[M.Mi]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})})}),!xt[M.Mi]&&(0,j.jsxs)(j.Fragment,{children:[cr&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(v.Z,{alignItems:"center",children:(0,j.jsx)(Ie.Z,{compact:!0,label:"Database",monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.Sv,e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},small:!0,value:xt[M.Sv],width:10*L.iI})})]}),(0,j.jsx)(b.Z,{mr:1}),![me.CLICKHOUSE,me.MYSQL].includes(xt[M.cH])&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Schema that is used when creating a table and inserting values.",(0,j.jsx)("br",{}),"This field is required."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(v.Z,{alignItems:"center",children:(0,j.jsx)(Ie.Z,{compact:!0,label:"Schema",monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.BD,e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},small:!0,value:xt[M.BD],width:10*L.iI})})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["This value will be used as the table name.",(0,j.jsx)("br",{}),"If blank, the default table name will be:",(0,j.jsx)("br",{}),(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,children:[dt,"_",Un]}),(0,j.jsx)("br",{}),"This field is optional."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(v.Z,{alignItems:"center",children:(0,j.jsx)(Ie.Z,{compact:!0,label:"Table (optional)",monospace:!0,onBlur:function(){return setTimeout((function(){fn(!1)}),300)},onChange:function(e){lr((0,i.Z)({},M.m$,e.target.value)),e.preventDefault()},onClick:Re.j,onFocus:function(){fn(!0)},small:!0,value:xt[M.m$],width:20*L.iI})})})]}),(0,j.jsx)(b.Z,{mr:1})]}),!xt[M.Mi]&&(0,j.jsxs)(v.Z,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)($.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["Limit the number of results that are returned",(0,j.jsx)("br",{}),"when running this block in the notebook.",(0,j.jsx)("br",{}),"This limit won\u2019t affect the number of results",(0,j.jsx)("br",{}),"returned when running the pipeline end-to-end."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Limit"}),(0,j.jsx)("span",{children:"\xa0"})]})}),dr,(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)($.Z,{autoWidth:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["How do you want to handle existing data with the same",cr?" database,":""," schema, and table name?",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Append"}),": add rows to the existing table.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Replace"}),": delete the existing data.",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,children:"Fail"}),": raise an error during execution."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(oe.kI,{muted:!0}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Write policy:"}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(Te.Z,{compact:!0,label:"strategy",onChange:function(e){return lr((0,i.Z)({},M.nq,e.target.value))},onClick:Re.j,small:!0,value:xt[M.nq],children:null===he||void 0===he?void 0:he.map((function(e){return(0,j.jsx)("option",{value:e,children:(0,B.kC)(e)},e)}))})]})}),(0,j.jsx)(b.Z,{mr:1})]}),(null===xt||void 0===xt?void 0:xt[M.cH])===me.TRINO&&Bn.length>=1&&(0,j.jsxs)(v.Z,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)($.Z,{appearBefore:!0,block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["If checked, upstream blocks that aren\u2019t SQL blocks",(0,j.jsx)("br",{}),"will have their data exported into a table that is",(0,j.jsx)("br",{}),"uniquely named upon each block run. For example,",(0,j.jsx)("br",{}),(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"[pipeline_uuid]_[block_uuid]_[unique_timestamp]"}),"."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(v.Z,{alignItems:"center",children:[(0,j.jsx)(R.Z,{checked:xt[M.bk],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Unique upstream table names"}),onClick:function(e){(0,Re.j)(e),lr((0,i.Z)({},M.bk,!xt[M.bk]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(oe.kI,{muted:!0})]})}),(0,j.jsx)(b.Z,{mr:1})]})]})}),Ho.length>=1&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsx)(v.Z,{children:Ho.map((function(e,n){var t=e.description,o=e.title;return(0,j.jsx)(b.Z,{ml:n>=1?1:0,children:(0,j.jsx)($.Z,{block:!0,description:t,size:null,widthFitContent:!0,children:(0,j.jsx)(m.Z,{children:o})})},o)}))})}),Bn.length>=1&&!nt&&I.f2.includes(Nn)&&!ft&&!Mn&&(0,j.jsxs)(x.y9,{normalPadding:!0,children:[(0,j.jsx)(b.Z,{mr:1,children:(0,j.jsxs)(g.ZP,{muted:!0,small:!0,children:[!mt&&"Positional arguments for ".concat(ht?"":"decorated ","function:"),mt&&(0,j.jsxs)(j.Fragment,{children:["The interpolated tables below are available in queries from upstream blocks.",(0,j.jsx)("br",{}),"Example: ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:"SELECT * FROM {{ df_1 }}"})," to insert all rows from ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,small:!0,children:null===Bn||void 0===Bn?void 0:Bn[0]})," into a table."]})]})}),(0,j.jsxs)(b.Z,{mt:1,children:[!mt&&!ht&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Nn&&"@data_exporter",I.tf.DATA_LOADER===Nn&&"@data_loader",I.tf.TRANSFORMER===Nn&&"@transformer",I.tf.CUSTOM===Nn&&"@custom"]}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["def ",(I.tf.DATA_EXPORTER===Nn?"export_data":I.tf.DATA_LOADER===Nn&&"load_data")||I.tf.TRANSFORMER===Nn&&"transform"||I.tf.CUSTOM===Nn&&"transform_custom","(",Bn.map((function(e,n){return n>=1?"data_".concat(n+1):"data"})).join(", "),"):"]})]}),ht&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Nn?"export_data":I.tf.TRANSFORMER===Nn&&"transform","\xa0\u2190 function(",Bn.map((function(e,n){return"df_".concat(n+1)})).join(", "),"):"]})}),mt&&(null===Bn||void 0===Bn?void 0:Bn.length)>=1&&(0,j.jsx)(Pe,{block:H,blockConfiguration:xt,blockRefs:W,blocks:null===Bn||void 0===Bn?void 0:Bn.map((function(e){return null===Oo||void 0===Oo?void 0:Oo[e]})),updateBlockConfiguration:lr}),!mt&&Bn.map((function(e,n){var t=Oo[e],o=(0,x.qn)(null===t||void 0===t?void 0:t.type,{blockColor:null===t||void 0===t?void 0:t.color,theme:kn}).accent,r="{{ df_".concat(n+1," }}");return(0,j.jsxs)("div",{children:[!mt&&!ht&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0data",n>=1?"_".concat(n+1):null]}),mt&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r}),ht&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0","df".concat(n+1)]})," ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"\u2192"})," ",(0,j.jsx)(Y.Z,{color:o,onClick:function(){var e,n,o=null===W||void 0===W||null===(e=W.current)||void 0===e?void 0:e["".concat(null===t||void 0===t?void 0:t.type,"s/").concat(null===t||void 0===t?void 0:t.uuid,".py")];null===o||void 0===o||null===(n=o.current)||void 0===n||n.scrollIntoView()},preventDefault:!0,small:!0,children:(0,j.jsx)(g.ZP,{color:o,inline:!0,monospace:!0,small:!0,children:e})})]},e)}))]})]}),!An&&(0,j.jsx)(j.Fragment,{children:nt?(0,j.jsx)(b.Z,{px:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["(",(0,B._6)("line",null===rt||void 0===rt?void 0:rt.split(/\r\n|\r|\n/).length)," collapsed)"]})}):!vt||yt?nr?(0,j.jsx)(b.Z,{px:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["Replicated from block ",(0,j.jsx)(Y.Z,{color:(0,x.qn)(null===nr||void 0===nr?void 0:nr.type,{blockColor:null===nr||void 0===nr?void 0:nr.color,theme:kn}).accent,onClick:function(e){var n,t;(0,Re.j)(e);var o=null===W||void 0===W||null===(n=W.current)||void 0===n?void 0:n["".concat(null===nr||void 0===nr?void 0:nr.type,"s/").concat(null===nr||void 0===nr?void 0:nr.uuid,".py")];null===o||void 0===o||null===(t=o.current)||void 0===t||t.scrollIntoView()},preventDefault:!0,children:(0,j.jsx)(g.ZP,{color:(0,x.qn)(null===nr||void 0===nr?void 0:nr.type,{blockColor:null===nr||void 0===nr?void 0:nr.color,theme:kn}).accent,inline:!0,monospace:!0,children:null===nr||void 0===nr?void 0:nr.uuid})})]})}):tr:sr}),ge&&c.cloneElement(ge,{runBlockAndTrack:yo}),An&&(0,j.jsxs)(b.Z,{p:L.cd,children:[(0,j.jsx)(g.ZP,{bold:!0,danger:!0,children:null===An||void 0===An?void 0:An.error}),(0,j.jsx)(g.ZP,{muted:!0,children:null===An||void 0===An?void 0:An.message})]}),ko&&lt&&lt>Gt&&(0,j.jsx)(x.HC,{children:(0,j.jsxs)(g.ZP,{muted:!0,children:["".concat(Math.round((lt-Gt)/1e3)),"s"]})}),!nt&&![I.tf.CALLBACK,I.tf.CONDITIONAL,I.tf.EXTENSION].includes(Nn)&&(0,j.jsx)(T,{block:H,blocks:N,openSidekickView:on,pipeline:rn})]})),rr]})]}),!Je&&(0,j.jsxs)(x.gE,{additionalZIndex:ar-G,onMouseEnter:function(){return qn(!0)},onMouseLeave:function(){qn(!1),null===dn||void 0===dn||dn(null)},children:[Qn&&k&&(0,j.jsx)(b.Z,{mt:2,mx:2,style:{width:"100%"},children:(0,j.jsx)(p.Z,{addNewBlock:function(e){var n=e.content,t=e.configuration,o=(0,le.eY)(H,e),r=(0,le.fA)(rn,H,e).map((function(e){var n=Ve({},Oo[e]||{}),t=n.upstream_blocks;return t&&(n.upstream_blocks=t.filter((function(e){return e!==Un}))),n}));return[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(Nn)&&I.tf.SCRATCHPAD===e.type&&(n="from mage_ai.data_preparation.variable_manager import get_variable\n\n\n df = get_variable('".concat(dt,"', '").concat(Un,"', 'output_0')")),n=(0,Be.X7)(e,n),I.t6.SQL===Pn&&(t=Ve(Ve({},(0,ze.GL)(Fn,[M.cH,M.Sv,M.sc,M.BD,M.nq])),t)),I.t6.SQL===e.language&&(n=(0,Be.SF)(n)),k(Ve(Ve({},e),{},{configuration:t,content:n,upstream_blocks:o}),r)},blockIdx:G,blockTemplates:z,compact:!0,hideCustom:ft,hideDbt:ft,onClickAddSingleDBTModel:nn,pipeline:rn,project:un,setAddNewBlockMenuOpenIdx:dn,setCreatingNewDBTModel:pn,showBrowseTemplates:Cn,showConfigureProjectModal:_n,showGlobalDataProducts:On})}),(0,j.jsx)(x.t1,{className:"block-divider-inner"})]})]})})}var Je=c.forwardRef(Xe)},59582:function(e,n,t){t.d(n,{Z:function(){return v}});var o,r=t(21831),i=t(86422),u=t(82394),l=t(75582),c=t(17717);!function(e){e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.MAGE_LIBRARY="mage_library",e.TRANSFORMER="transformer",e.USER_LIBRARY="user_library"}(o||(o={}));var a=t(5677);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=t(24224);function p(e,n){var t=e;t.includes("__init__")||t.push("__init__");var o,r=t.length;return(0,f.w6)(r).forEach((function(e,i){if(o)return o;var u=t.slice(0,r-i).join(c.sep);o=n["".concat(u,".py")]})),o}function m(e,n,t){var o,r,i;return((null===(o=t.outputs)||void 0===o||null===(r=o[0])||void 0===r||null===(i=r.sample_data)||void 0===i?void 0:i.columns)||[]).map((function(t){return{label:"".concat(t," column"),kind:e.languages.CompletionItemKind.Variable,insertText:"'".concat(t,"'"),range:n}}))}function h(e,n){var t=e.word.split(""),o=new RegExp(t.reduce((function(e,n,o){var r=t[o+1],i=r?"^".concat(r):"";return e+"".concat(n,"[w ").concat(i,"]*")}),""));return n.reduce((function(e,n){return n.label.match(o)?e.concat(n):e}),[])}function v(e){var n=e.autocompleteItems,t=e.block,u=e.blocks,s=e.pipeline,v=t.type,b=t.upstream_blocks,g=(0,f.HK)(n,(function(e){return e.id}));return function(t){return function(x,j){var C=[],_=x.getValueInRange({endColumn:j.column,endLineNumber:j.lineNumber,startColumn:1,startLineNumber:1}),O=x.getWordUntilPosition(j),Z=O.endColumn,y=O.startColumn,k={endColumn:Z,endLineNumber:j.lineNumber,startColumn:y,startLineNumber:j.lineNumber},E=function(e,n,t){var o=(0,a.Yn)(e),r=(0,a.M4)(e,n),i=o.find((function(e){var n=e.variableName;return r.match(new RegExp(n))}));if(i){var u=i.assignmentValue,l=(0,a.S0)(e)[u];if(l){var c,s=p(l.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t),d=(0,a.rW)(l,u);return null===s||void 0===s||null===(c=s.methods_for_class)||void 0===c?void 0:c[d]}}return[]}(_,k,g);if((null===E||void 0===E?void 0:E.length)>=1){var T=h(O,E.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Method,label:e,range:k}})));if(T.length>=1)return{suggestions:T}}var I=function(e,n,t){var o=(0,a.M4)(e,n);if(o=o.match(/([\w_]+)./)){var r=(0,a.S0)(e)[o[1]];if(r){var i=p(r.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t);if(null!==i&&void 0!==i&&i.functions)return null===i||void 0===i?void 0:i.functions}}return[]}(_,k,g);if((null===I||void 0===I?void 0:I.length)>=1){var S=h(O,I.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Function,label:e,range:k}})));if(S.length>=1)return{suggestions:S}}if((null===b||void 0===b?void 0:b.length)>=1){var R=new RegExp("\n@".concat(v));_.match(R)&&C.push.apply(C,(0,r.Z)(h(O,function(e,n,t){var o=t.block,r=t.blocks,i=o.upstream_blocks,u=(0,f.HK)(r,(function(e){return e.uuid}));return i.map((function(t,o){var r=u[t].type,i=0===o?"output_0":"args[".concat(o-1,"]");return{label:"df ".concat(t," ").concat(r," block"),kind:e.languages.CompletionItemKind.Variable,documentation:"Variable for ".concat(r," ").concat(t," data."),insertText:i,range:n}}))}(t,k,e))))}if(O.word.match(/i|f/)){var A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,t=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,u=(arguments.length>2?arguments[2]:void 0).word,s=new Set,f={};e.forEach((function(e){var n=e.group,t=e.id,r=e.imports;if([o.MAGE_LIBRARY,o.USER_LIBRARY].includes(n)){var i=t;i.match(/__init__.py/)&&(i=i.replace(/\/__init__.py/,"")),i=i.split(".py")[0].replaceAll(c.sep,"."),f[i]=e}var u=t.replace(".py","").replace("/__init__","").split(c.sep);if(1===u.length)s.add("import ".concat(u[0]));else if(u.length>=2){var l=u.slice(0,u.length-1).join(".");s.add("from ".concat(l," import ").concat(u[u.length-1]))}r.forEach((function(e){return s.add(e)}))}));var p,m="i"===u,h="f"===u,v=m?"import":h?"from":"",b=(0,a.M4)(n,i);if(m&&b.match(/from/)&&(p=b.match(/from ([A-Za-z0-9_.]+) /)[1]),p&&f[p]){var g=f[p],x=g.classes,j=g.constants,C=g.files,_=g.functions,O=[];return[[j,t.languages.CompletionItemKind.Constant],[x,t.languages.CompletionItemKind.Class],[_,t.languages.CompletionItemKind.Function]].forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],o=n[1];t.forEach((function(e){O.push({filterText:"import ".concat(e),insertText:"import ".concat(e),kind:o,label:e,range:i})}))})),C.forEach((function(e){var n=e.split(c.sep),o=n[n.length-1].split(".py")[0];O.push({filterText:"import ".concat(o),insertText:"import ".concat(o),kind:t.languages.CompletionItemKind.Variable,label:o,range:i})})),O}return(0,r.Z)(s).map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.File,label:e,range:i}})).concat(Object.entries(f).map((function(e){var n=(0,l.Z)(e,2),o=n[0];return n[1],{filterText:"".concat(v," ").concat(o),insertText:"".concat(v," ").concat(o," "),kind:t.languages.CompletionItemKind.File,label:"".concat(o),range:d({},i)}})))}(n,_,O,t,k,e);C.push.apply(C,(0,r.Z)(A))}if(i.tf.CHART===v||i.tf.SCRATCHPAD===v){var w=[];if(i.tf.CHART===v?b.forEach((function(e,n){w.push({block:u.find((function(n){var t=n.uuid;return e===t})),matchIndex:0,variableName:"df_".concat(n+1)})})):i.tf.SCRATCHPAD===v&&function(e,n){return e.map((function(e){return{block:e,regex:new RegExp("([\\w_]+)[ ]*=[ ]*get_variable\\('".concat(n.uuid,"', '").concat(e.uuid,"', 'output_0'\\)"),"g")}}))}(u,s).forEach((function(e){var n=e.block,t=e.regex,o=_.matchAll(t);(0,r.Z)(o).forEach((function(e){var t=null===e||void 0===e?void 0:e.index,o=null===e||void 0===e?void 0:e[1];o&&w.push({block:n,matchIndex:t,variableName:o})}))})),w.length>=1){var P,D=null===(P=_.split("\n")[j.lineNumber-1])||void 0===P?void 0:P.slice(0,O.startColumn-1);if(D){var M=[];if(w.forEach((function(e){var n=e.block,o=e.matchIndex,r=e.variableName,i=new RegExp("".concat(r,"\\["));D.match(i)&&M.push({items:m(t,k,n),matchIndex:o})})),M.length>=1)return{suggestions:h(O,(0,f.YC)(M,"matchIndex",{ascending:!1})[0].items)}}}1===y&&(i.tf.CHART===v?C.push.apply(C,(0,r.Z)(h(O,b.map((function(e,n){var o="df_".concat(n+1);return{label:"".concat(o," ").concat(e," block"),kind:t.languages.CompletionItemKind.Snippet,insertText:o,range:k}}))))):i.tf.SCRATCHPAD===v&&C.push.apply(C,(0,r.Z)(h(O,function(e,n,t){var o=t.block,r=t.blocks,u=t.pipeline;return r.reduce((function(t,r){var l=r.type,c=r.uuid;return o.uuid!==c&&[i.tf.DATA_LOADER,i.tf.TRANSFORMER].includes(l)?t.concat({label:"df ".concat(c," ").concat(l," block"),kind:e.languages.CompletionItemKind.Snippet,documentation:"Get the data from ".concat(l," block ").concat(c,"."),insertText:"from mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable('".concat(u.uuid,"', '").concat(c,"', 'output_0')\n"),range:n}):t}),[])}(t,k,e)))))}var N=new Set;u.concat({content:_}).forEach((function(e){var n=e.content;(0,r.Z)(n.matchAll("([A-Za-z_0-9]+)","g")).forEach((function(e){return N.add(e[1])}))}));var L=(0,r.Z)(N);if(L.length){var B=L.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Variable,label:e,range:k}}));C.push.apply(C,(0,r.Z)(h(O,B)))}return{suggestions:C}}}}},27337:function(e,n,t){t.d(n,{iK:function(){return x},qy:function(){return j},hS:function(){return C},dP:function(){return g},n9:function(){return v},A2:function(){return b}});var o=t(26304),r=t(82394),i=t(28598);var u,l=function(e){var n=e.fill,t=void 0===n?"white":n,o=e.size;return(0,i.jsxs)("svg",{fill:"none",height:o,viewBox:"0 0 20 20",width:o,xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("g",{clipPath:"url(#clip0_11802_82850)",children:[(0,i.jsx)("path",{d:"M15.6276 1.73378C15.97 1.96689 16.022 2.44136 15.7638 2.76532C15.5057 3.08929 15.0355 3.13958 14.69 2.91102C13.3636 2.0334 11.8126 1.54269 10.2126 1.50266C8.36175 1.45636 6.54643 2.01561 5.04253 3.09541C3.53863 4.1752 2.4284 5.71649 1.8806 7.48498C1.40702 9.01387 1.37618 10.6403 1.7837 12.1777C1.88982 12.5781 1.69185 13.0076 1.30237 13.1486C0.912892 13.2896 0.479935 13.0887 0.368517 12.6897C-0.147093 10.8435 -0.122519 8.88224 0.447763 7.04116C1.09223 4.96057 2.39838 3.14729 4.16768 1.87695C5.93697 0.606601 8.07265 -0.0513415 10.2501 0.00312922C12.1769 0.0513296 14.0431 0.655033 15.6276 1.73378Z",fill:t}),(0,i.jsx)("path",{d:"M13.2714 5.89383C13.5295 5.56986 13.4781 5.09341 13.1245 4.87771C12.2306 4.33247 11.2055 4.02828 10.15 4.00188C8.84359 3.9692 7.56218 4.36396 6.50061 5.12617C5.43903 5.88838 4.65534 6.97634 4.26866 8.22469C3.95628 9.23316 3.91679 10.3017 4.14767 11.323C4.23901 11.727 4.67403 11.928 5.06351 11.787C5.45299 11.6461 5.64766 11.216 5.57323 10.8086C5.44361 10.0989 5.48588 9.36461 5.70149 8.66852C5.9915 7.73226 6.57927 6.91628 7.37545 6.34463C8.17164 5.77297 9.13269 5.4769 10.1125 5.50141C10.841 5.51963 11.5503 5.71432 12.1813 6.06401C12.5436 6.26478 13.0133 6.2178 13.2714 5.89383Z",fill:t}),(0,i.jsx)("path",{clipRule:"evenodd",d:"M10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5ZM9 10C9 10.5523 9.44772 11 10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10Z",fill:t,fillRule:"evenodd"}),(0,i.jsx)("path",{d:"M6.87554 15.1223C6.52192 14.9066 6.47052 14.4301 6.72863 14.1062C6.98673 13.7822 7.45642 13.7352 7.81872 13.936C8.44971 14.2857 9.15897 14.4804 9.88746 14.4986C10.8673 14.5231 11.8284 14.227 12.6245 13.6554C13.4207 13.0837 14.0085 12.2677 14.2985 11.3315C14.5141 10.6354 14.5564 9.90111 14.4268 9.19144C14.3523 8.78397 14.547 8.35395 14.9365 8.21295C15.326 8.07196 15.761 8.27297 15.8523 8.67699C16.0832 9.69826 16.0437 10.7668 15.7313 11.7753C15.3447 13.0237 14.561 14.1116 13.4994 14.8738C12.4378 15.636 11.1564 16.0308 9.84995 15.9981C8.79455 15.9717 7.76942 15.6675 6.87554 15.1223Z",fill:t}),(0,i.jsx)("path",{d:"M4.23615 17.2347C3.97805 17.5586 4.03001 18.0331 4.37241 18.2662C5.95691 19.345 7.82314 19.9487 9.74992 19.9969C11.9274 20.0513 14.063 19.3934 15.8323 18.1231C17.6016 16.8527 18.9078 15.0394 19.5522 12.9588C20.1225 11.1178 20.1471 9.15647 19.6315 7.31026C19.5201 6.91131 19.0871 6.7104 18.6976 6.85139C18.3082 6.99238 18.1102 7.42188 18.2163 7.82227C18.6238 9.35971 18.593 10.9861 18.1194 12.515C17.5716 14.2835 16.4614 15.8248 14.9575 16.9046C13.4536 17.9844 11.6382 18.5436 9.78743 18.4973C8.18738 18.4573 6.63645 17.9666 5.30996 17.089C4.96451 16.8604 4.49426 16.9107 4.23615 17.2347Z",fill:t})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_11802_82850",children:(0,i.jsx)("rect",{fill:t,height:o,width:o})})})]})},c=t(86422),a=t(22341),s=t(98781),d=t(44162),f=["uuid"],p=["uuid"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v={uuid:"Blocks"},b={uuid:"Pipelines"},g=[v,b],x=(u={},(0,r.Z)(u,c.tf.CALLBACK,a.AQ),(0,r.Z)(u,c.tf.CHART,a.GQ),(0,r.Z)(u,c.tf.CONDITIONAL,a.hW),(0,r.Z)(u,c.tf.CUSTOM,a.VS),(0,r.Z)(u,c.tf.DATA_EXPORTER,a.zS),(0,r.Z)(u,c.tf.DATA_LOADER,a.rH),(0,r.Z)(u,c.tf.DBT,a.xE),(0,r.Z)(u,c.tf.EXTENSION,a.Bf),(0,r.Z)(u,c.tf.MARKDOWN,a.$B),(0,r.Z)(u,c.tf.SENSOR,a.LM),(0,r.Z)(u,c.tf.TRANSFORMER,a.Sv),u),j=[{Icon:a.zQ,uuid:"All templates"}].concat([{uuid:c.tf.DATA_LOADER},{uuid:c.tf.TRANSFORMER},{selectedIconProps:{inverted:!0},uuid:c.tf.DATA_EXPORTER},{uuid:c.tf.SENSOR},{selectedIconProps:{inverted:!0},uuid:c.tf.CUSTOM},{uuid:c.tf.CHART},{selectedIconProps:{inverted:!0},uuid:c.tf.CALLBACK},{selectedIconProps:{inverted:!0},uuid:c.tf.CONDITIONAL},{uuid:c.tf.EXTENSION},{selectedBackgroundColor:null,uuid:c.tf.DBT},{selectedIconProps:{inverted:!0},uuid:c.tf.MARKDOWN}].map((function(e){var n=e.uuid,t=(0,o.Z)(e,f);return h({Icon:x[n],filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.block_type===n}))},label:function(){return c.V4[n]},selectedBackgroundColor:function(e){return(0,d.qn)(n,{theme:e}).accent},uuid:n},t)}))),C=[{Icon:a.zQ,uuid:"All templates"}].concat([{Icon:a.X5,uuid:s.qL.PYTHON},{Icon:a.ZG,uuid:s.qL.INTEGRATION},{Icon:l,uuid:s.qL.STREAMING}].map((function(e){var n=e.uuid,t=(0,o.Z)(e,p);return h({filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){var t;return(null===e||void 0===e||null===(t=e.pipeline)||void 0===t?void 0:t.type)===n}))},label:function(){return s.G7[n]},uuid:n},t)})))},38639:function(e,n,t){t.d(n,{EN:function(){return k},FX:function(){return E},HS:function(){return C},Nk:function(){return m},Rd:function(){return p},SL:function(){return y},Tj:function(){return Z},UE:function(){return O},Yf:function(){return v},ZG:function(){return s},bC:function(){return h},n5:function(){return f},n8:function(){return _},w5:function(){return j},wj:function(){return g},wl:function(){return b},ze:function(){return x}});var o=t(38626),r=t(23831),i=t(73942),u=t(3055),l=t(49125),c=t(90880),a=t(37391),s=2.5*l.iI,d=40*l.iI,f=10*l.iI,p=o.default.div.withConfig({displayName:"indexstyle__ContainedStyle",componentId:"sc-8sk2qr-0"})([""," overflow:auto;"," "," ",""],a.w5,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width-f,"px;\n ")})),m=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-8sk2qr-1"})(["height:100%;position:relative;"]),h=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-8sk2qr-2"})(["position:fixed;width:","px;z-index:1;"," "," ",""],d,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-f,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),v=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-8sk2qr-3"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;",""],1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),b=o.default.div.withConfig({displayName:"indexstyle__LinksContainerStyle",componentId:"sc-8sk2qr-4"})([""," overflow:auto;position:fixed;width:","px;",""],a.w5,d,(function(e){return"\n height: calc(100% - ".concat(55+(null!==e&&void 0!==e&&e.contained?f:u.Mz)+((null===e||void 0===e?void 0:e.heightOffset)||0),"px);\n ")})),g=o.default.div.withConfig({displayName:"indexstyle__NavLinkStyle",componentId:"sc-8sk2qr-5"})([""," padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;&:hover{cursor:pointer;}",""],(0,c.eR)(),1*l.iI,l.cd*l.iI,l.cd*l.iI,1*l.iI,(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||r.Z.background).codeTextarea,";\n ")})),x=o.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-8sk2qr-6"})([""," border-radius:","px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],(0,c.eR)(),i.n_,5*l.iI,1.25*l.iI,1.25*l.iI,5*l.iI,(function(e){return!e.backgroundColor&&"\n background-color: ".concat((e.theme.background||r.Z.background).chartBlock,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),j=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-8sk2qr-7"})(["margin-left:","px;"],d),C=o.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-8sk2qr-8"})(["padding:","px;",""],l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")})),_=o.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-8sk2qr-9"})(["display:flex;flex-wrap:wrap;padding:","px;"],.75*l.iI),O=o.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-8sk2qr-10"})(["border-radius:","px;margin:","px;padding:","px;width:","px;&:hover{cursor:pointer;}",""],i.n_,.75*l.iI,2.5*l.iI,50*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border: 1px solid ").concat((e.theme.background||r.Z.background).chartBlock,";\n box-shadow: ").concat((e.theme.shadow||r.Z.shadow).frame,";\n ")})),Z=o.default.div.withConfig({displayName:"indexstyle__CardTitleStyle",componentId:"sc-8sk2qr-11"})(["height:","px;"],2.5*l.iI),y=o.default.div.withConfig({displayName:"indexstyle__CardDescriptionStyle",componentId:"sc-8sk2qr-12"})(["height:","px;margin-top:","px;"],2.5*l.iI*2,1*l.iI),k=o.default.div.withConfig({displayName:"indexstyle__TagsStyle",componentId:"sc-8sk2qr-13"})(["height:","px;margin-top:","px;overflow:hidden;"],3.5*l.iI,.5*l.iI),E=o.default.div.withConfig({displayName:"indexstyle__BreadcrumbsStyle",componentId:"sc-8sk2qr-14"})(["padding-bottom:","px;padding-top:","px;",""],1*l.iI,1*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}))},49666:function(e,n,t){t.d(n,{Z:function(){return B}});var o=t(82394),r=t(75582),i=t(12691),u=t.n(i),l=t(21764),c=t(82684),a=t(83455),s=t(34376),d=t(60328),f=t(32316),p=t(18908),m=t(48952),h=t(93461),v=t(67971),b=t(10919),g=t(86673),x=t(19711),j=t(38435),C=t(82944),_=t(32063),O=t(82531),Z=t(29499),y=t(66166),k=t(3055),E={uuid:"Define"},T={uuid:"Document"},I=[E,T],S=t(49125),R=t(41422),A=t(72454),w=t(96510),P=t(9728),D=t(24141),M=t(28598);function N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?N(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):N(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B=function(e){var n=e.defaultTab,t=e.onMutateSuccess,o=e.pipelineUUID,i=e.template,N=e.templateAttributes,B=e.templateUUID,U=(0,D.i)().height,F=(k.Mz,(0,s.useRouter)()),H=(0,P.VI)(null,{},[],{uuid:"CustomTemplates/PipelineTemplateDetail"}),G=(0,r.Z)(H,1)[0],W=(0,c.useState)(!1),z=W[0],Q=W[1],q=(0,c.useState)(!1),K=q[0],V=q[1],Y=(0,c.useState)(N),X=Y[0],J=Y[1],$=(0,c.useCallback)((function(e){V(!0),J(e)}),[]),ee=(0,y.Z)(i);(0,c.useEffect)((function(){(null===ee||void 0===ee?void 0:ee.template_uuid)!==(null===i||void 0===i?void 0:i.template_uuid)&&J(i)}),[i,ee]);var ne=(0,c.useMemo)((function(){return null===i||void 0===i?void 0:i.pipeline}),[i]),te=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.blocks)||[]}),[ne]),oe=(0,c.useMemo)((function(){return!i&&!B}),[i,B]),re=(0,c.useState)(n?I.find((function(e){return e.uuid===(null===n||void 0===n?void 0:n.uuid)})):I[0]),ie=re[0],ue=re[1],le=(0,c.useMemo)((function(){return!!oe&&!(null!==X&&void 0!==X&&X.template_uuid)}),[oe,X]),ce=(0,c.useState)(!1),ae=ce[0],se=ce[1],de=(0,c.useState)(oe?400:300),fe=de[0],pe=de[1],me=(0,a.Db)(O.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),Q(!0),setTimeout((function(){F.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R))}),1)},onErrorCallback:function(e,n){return G({errors:n,response:e})}})}}),he=(0,r.Z)(me,2),ve=he[0],be=he[1].isLoading,ge=(0,a.Db)(O.ZP.custom_templates.useUpdate(i?encodeURIComponent(null===i||void 0===i?void 0:i.template_uuid):B&&encodeURIComponent(B),{object_type:p.R}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.custom_template;t&&(null===t||void 0===t||t()),null!==i&&void 0!==i&&i.template_uuid&&(null===n||void 0===n?void 0:n.template_uuid)!==(null===i||void 0===i?void 0:i.template_uuid)||B&&(null===n||void 0===n?void 0:n.template_uuid)!==B?F.replace("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid),"?object_type=").concat(p.R)):(J(n),V(!1),l.Am.success("Template successfully saved.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_pipeline_template"}))},onErrorCallback:function(e,n){return G({errors:n,response:e})}})}}),xe=(0,r.Z)(ge,2),je=xe[0],Ce=xe[1].isLoading,_e=(0,c.useCallback)((function(){var e={custom_template:L(L({},X),{},{object_type:p.R})};oe?ve(L(L({},e),{},{custom_template:L(L({},null===e||void 0===e?void 0:e.custom_template),{},{pipeline_uuid:o})})):je(e)}),[ve,oe,o,X,je]),Oe=(0,c.useMemo)((function(){return(0,M.jsx)(M.Fragment,{})}),[]),Ze=(0,c.useMemo)((function(){return(0,M.jsxs)(v.Z,{flexDirection:"column",fullHeight:!0,children:[(0,M.jsx)(R.Yf,{children:(0,M.jsx)(f.Z,{noPadding:!0,onClickTab:function(e){ue(e)},selectedTabUUID:null===ie||void 0===ie?void 0:ie.uuid,tabs:I})}),(0,M.jsxs)(h.Z,{flexDirection:"column",children:[E.uuid===(null===ie||void 0===ie?void 0:ie.uuid)&&(0,M.jsxs)(M.Fragment,{children:[o&&(0,M.jsx)(g.Z,{mt:S.cd,px:S.cd,children:(0,M.jsxs)(x.ZP,{default:!0,children:["This pipeline template will be based off the pipeline ",(0,M.jsx)(u(),{as:"/pipelines/".concat(o),href:"/pipelines/[pipeline]",passHref:!0,children:(0,M.jsx)(b.Z,{bold:!0,default:!0,inline:!0,monospace:!0,openNewWindow:!0,children:o})}),"."]})}),(0,M.jsxs)(g.Z,{mt:S.cd,px:S.cd,children:[(0,M.jsxs)(g.Z,{mb:1,children:[(0,M.jsx)(x.ZP,{bold:!0,children:"Template UUID"}),(0,M.jsx)(x.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,M.jsx)(C.Z,{monospace:!0,onChange:function(e){return $((function(n){return L(L({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.template_uuid)||""})]})]}),T.uuid===(null===ie||void 0===ie?void 0:ie.uuid)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(g.Z,{mt:S.cd,px:S.cd,children:[(0,M.jsxs)(g.Z,{mb:1,children:[(0,M.jsx)(x.ZP,{bold:!0,children:"Name"}),(0,M.jsx)(x.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,M.jsx)(C.Z,{onChange:function(e){return $((function(n){return L(L({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.name)||""})]}),(0,M.jsx)(g.Z,{mt:S.cd,px:S.cd,children:(0,M.jsx)(j.Z,{label:"Description",onChange:function(e){return $((function(n){return L(L({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===X||void 0===X?void 0:X.description)||""})})]})]}),(0,M.jsx)(R.ig,{children:(0,M.jsx)(g.Z,{p:S.cd,children:(0,M.jsx)(v.Z,{children:(0,M.jsxs)(d.Z,{disabled:le,fullWidth:!0,loading:be||Ce,onClick:function(){return _e()},primary:!0,children:[!oe&&"Save template",oe&&"Create new template"]})})})})]})}),[le,be,Ce,oe,o,_e,null===ie||void 0===ie?void 0:ie.uuid,$,X]),ye=(0,Z.Z)({shouldWarn:!z&&K,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,M.jsxs)(_.Z,{after:Oe,before:Ze,beforeHidden:ae,beforeWidth:fe,leftOffset:A.k1,setBeforeHidden:se,setBeforeWidth:pe,children:[(0,M.jsx)(ye,{}),(0,M.jsx)(m.Z,{blocks:te,height:U,heightOffset:k.Mz,noStatus:!0,pipeline:ne})]})}},41422:function(e,n,t){t.d(n,{Nk:function(){return c},Yf:function(){return s},bC:function(){return a},ig:function(){return d},w5:function(){return f}});var o=t(38626),r=t(23831),i=t(49125),u=t(38639),l=(i.iI,40*i.iI),c=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-axgvn9-0"})(["height:100%;position:relative;"]),a=o.default.div.withConfig({displayName:"indexstyle__NavigationStyle",componentId:"sc-axgvn9-1"})(["overflow:auto;position:fixed;width:","px;z-index:1;"," "," ",""],l,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-right: 1px solid ").concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height-u.n5,"px;\n ")}),(function(e){return!e.height&&"\n height: 100%;\n "})),s=o.default.div.withConfig({displayName:"indexstyle__TabsStyle",componentId:"sc-axgvn9-2"})(["padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],1*i.iI,i.cd*i.iI,i.cd*i.iI,1*i.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonsStyle",componentId:"sc-axgvn9-3"})(["margin-top:","px;width:100%;",""],i.cd*i.iI,(function(e){return"\n border-top: 1px solid ".concat((e.theme.borders||r.Z.borders).light,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-axgvn9-4"})(["margin-left:","px;"],l)},62749:function(e,n,t){t.d(n,{Z:function(){return Q}});var o=t(82394),r=t(75582),i=t(56085),u=t(82684),l=t(65701),c=t(1254),a=t(21764),s=t(83455),d=t(34376),f=t(35490),p=t(60328),m=t(32316),h=t(89949),v=t(18908),b=t(93461),g=t(67971),x=t(86673),j=t(55378),C=t(19711),_=t(38435),O=t(82944),Z=t(82531),y=t(29499),k=t(66166),E=t(86422),T=t(41422),I=t(82635),S=t(16115),R={uuid:"Define"},A={uuid:"Document"},w=[R,A],P=t(94353),D=t(49125),M=t(98781),N=t(28799),L=t(96510),B=t(51504),U=t(9728),F=t(41150),H=t(24141),G=t(28598);function W(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=function(e){var n=e.contained,t=e.defaultTab,W=e.heightOffset,Q=e.onCancel,q=e.onCreateCustomTemplate,K=e.onMutateSuccess,V=e.template,Y=e.templateAttributes,X=e.templateUUID,J=(0,H.i)().height,$=(0,d.useRouter)(),ee=(0,U.VI)(null,{},[],{uuid:"CustomTemplates/TemplateDetail"}),ne=(0,r.Z)(ee,1)[0],te=(0,u.useState)(Number(new Date)),oe=te[0],re=te[1],ie=(0,u.useState)(!1),ue=ie[0],le=ie[1],ce=(0,u.useState)(!1),ae=ce[0],se=ce[1],de=(0,u.useState)(t?w.find((function(e){return e.uuid===(null===t||void 0===t?void 0:t.uuid)})):w[0]),fe=de[0],pe=de[1],me=(0,u.useState)(!1),he=me[0],ve=me[1],be=(0,u.useState)(Y),ge=be[0],xe=be[1],je=(0,u.useCallback)((function(e){ve(!0),xe(e)}),[]),Ce=Z.ZP.custom_templates.detail(!V&&X&&encodeURIComponent(X),{object_type:v.Z}).data,_e=(0,u.useMemo)((function(){return V||(null===Ce||void 0===Ce?void 0:Ce.custom_template)}),[Ce,V]),Oe=(0,k.Z)(_e);(0,u.useEffect)((function(){(null===Oe||void 0===Oe?void 0:Oe.template_uuid)!==(null===_e||void 0===_e?void 0:_e.template_uuid)&&(re(Number(new Date)),xe(_e),se(!0))}),[_e,Oe]);var Ze=(0,s.Db)(Z.ZP.custom_templates.useCreate(),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(e){var n=e.custom_template;K&&(null===K||void 0===K||K()),q?null===q||void 0===q||q(n):(le(!0),setTimeout((function(){$.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(null===n||void 0===n?void 0:n.template_uuid)))}),1))},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),ye=(0,r.Z)(Ze,2),ke=ye[0],Ee=ye[1].isLoading,Te=(0,s.Db)(Z.ZP.custom_templates.useUpdate(V?encodeURIComponent(null===V||void 0===V?void 0:V.template_uuid):X&&encodeURIComponent(X),{object_type:v.Z}),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(e){var n=e.custom_template;K&&(null===K||void 0===K||K()),xe(n),ve(!1),a.Am.success("Template successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"custom_block_template"})},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Ie=(0,r.Z)(Te,2),Se=Ie[0],Re=Ie[1].isLoading,Ae=(0,u.useMemo)((function(){return E.tf.MARKDOWN===(null===ge||void 0===ge?void 0:ge.block_type)}),[null===ge||void 0===ge?void 0:ge.block_type]),we=!V&&!X,Pe=(0,u.useMemo)((function(){return!!we&&(!(null!==ge&&void 0!==ge&&ge.template_uuid)||!(null!==ge&&void 0!==ge&&ge.block_type)||!Ae&&!(null!==ge&&void 0!==ge&&ge.language))}),[Ae,we,ge]),De=Z.ZP.kernels.list({},{refreshInterval:5e3,revalidateOnFocus:!0}),Me=De.data,Ne=De.mutate,Le=null===Me||void 0===Me?void 0:Me.kernels,Be=(null===Le||void 0===Le?void 0:Le.find((function(e){return e.name===M.a_[M.qL.PYTHON]})))||(null===Le||void 0===Le?void 0:Le[0]),Ue=(0,s.Db)(Z.ZP.kernels.useUpdate(null===Be||void 0===Be?void 0:Be.id),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){return Ne()},onErrorCallback:function(e,n){return ne({errors:n,response:e})}})}}),Fe=(0,r.Z)(Ue,1)[0],He=(0,u.useCallback)((function(){Fe({kernel:{action_type:"interrupt"}}),Ke([])}),[Fe]),Ge=(0,u.useState)({}),We=Ge[0],ze=Ge[1],Qe=(0,u.useState)([]),qe=Qe[0],Ke=Qe[1],Ve=(0,u.useMemo)((function(){return{language:null===ge||void 0===ge?void 0:ge.language,name:null===ge||void 0===ge?void 0:ge.name,type:null===ge||void 0===ge?void 0:ge.block_type,uuid:null===ge||void 0===ge?void 0:ge.template_uuid}}),[ge]),Ye=(0,u.useMemo)((function(){return new f.Z}),[]),Xe=(0,u.useMemo)((function(){return{api_key:P.l,token:Ye.decodedToken.token}}),[Ye]),Je=(0,i.ZP)((0,N.Ib)(),{onClose:function(){return console.log("socketUrlPublish closed")},onMessage:function(e){if(e){var n=JSON.parse(e.data),t=n.execution_state,r=n.uuid;if(!r)return;ze((function(e){var t=e[r]||[];return z(z({},e),{},(0,o.Z)({},r,t.concat(n)))})),I.uF.BUSY===t?Ke((function(e){return e.find((function(e){var n=e.uuid;return r===n}))||!Ve?e:e.concat(Ve)})):I.uF.IDLE===t&&Ke((function(e){return e.filter((function(e){var n=e.uuid;return r!==n}))}))}},onOpen:function(){return console.log("socketUrlPublish opened")},reconnectAttempts:10,reconnectInterval:3e3,shouldReconnect:function(){return console.log("Attempting to reconnect..."),!0}}).sendMessage,$e=(0,u.useCallback)((function(e){var n=e.block,t=e.code,o=e.ignoreAlreadyRunning,r=e.runDownstream,i=void 0!==r&&r,u=e.runIncompleteUpstream,l=void 0!==u&&u,c=e.runSettings,a=void 0===c?{}:c,s=e.runTests,d=void 0!==s&&s,f=e.runUpstream,p=n.extension_uuid,m=n.upstream_blocks,h=n.uuid;qe.find((function(e){var n=e.uuid;return h===n}))&&!o||(Je(JSON.stringify(z(z({},Xe),{},{code:t,extension_uuid:p,run_downstream:i,run_incomplete_upstream:l,run_settings:a,run_tests:d,run_upstream:f,type:n.type,upstream_blocks:m,uuid:h}))),ze((function(e){return delete e[h],e})),Ke((function(e){return e.find((function(e){var n=e.uuid;return h===n}))?e:e.concat(n)})))}),[qe,Je,ze,Ke,Xe]),en=(0,u.useMemo)((function(){return qe.reduce((function(e,n,t){return z(z({},e),{},(0,o.Z)({},n.uuid,z(z({},n),{},{priority:t})))}),{})}),[qe]),nn=(0,u.useMemo)((function(){if(!ae)return(0,G.jsx)("div",{});var e=en[null===Ve||void 0===Ve?void 0:Ve.uuid],n=e?0===e.priority?I.uF.BUSY:I.uF.QUEUED:I.uF.IDLE;return(0,G.jsx)(h.Z,{block:Ve,defaultValue:null===ge||void 0===ge?void 0:ge.content,disableDrag:!0,executionState:n,hideExtraCommandButtons:!0,hideExtraConfiguration:!0,hideHeaderInteractiveInformation:!0,interruptKernel:He,messages:null===We||void 0===We?void 0:We[null===Ve||void 0===Ve?void 0:Ve.uuid],noDivider:!0,onChange:function(e){return je((function(n){return z(z({},n),{},{content:e})}))},runBlock:$e,runningBlocks:qe,selected:!0,setErrors:ne,textareaFocused:!0},String(oe))}),[Ve,oe,He,We,ae,$e,qe,en,je,ne,ge]),tn=(0,u.useCallback)((function(){var e={custom_template:z(z({},ge),{},{language:Ae?E.t6.MARKDOWN:null===ge||void 0===ge?void 0:ge.language,object_type:v.Z})};we?ke(e):Se(e)}),[ke,Ae,we,ge,Se]),on="CustomTemplates/TemplateDetail",rn=(0,F.y)(),un=rn.registerOnKeyDown,ln=rn.unregisterOnKeyDown;(0,u.useEffect)((function(){return function(){ln(on)}}),[ln,on]),un(on,(function(e,n){if(he&&(0,B.y)([S.zX,S.hS],n)){e.preventDefault();"undefined"!==typeof location&&window.confirm("You have changes that are unsaved. Click cancel and save your changes before reloading page.")&&location.reload()}else((0,B.y)([S.zX,S.Um],n)||(0,B.y)([S.PQ,S.Um],n))&&(e.preventDefault(),tn())}),[tn,he]);var cn=(0,u.useMemo)((function(){return J-W}),[J,W]),an=(0,y.Z)({shouldWarn:!ue&&he,warningMessage:"You have unsaved changes. Are you sure you want to leave?"}).ConfirmLeaveModal;return(0,G.jsxs)(T.Nk,{children:[(0,G.jsx)(an,{}),(0,G.jsx)(T.bC,{height:n?cn:null,children:(0,G.jsxs)(g.Z,{flexDirection:"column",fullHeight:!0,children:[(0,G.jsx)(T.Yf,{children:(0,G.jsx)(m.Z,{noPadding:!0,onClickTab:function(e){pe(e)},selectedTabUUID:null===fe||void 0===fe?void 0:fe.uuid,tabs:we?w.slice(0,1):w})}),(0,G.jsxs)(b.Z,{flexDirection:"column",children:[R.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,G.jsxs)(x.Z,{mb:1,children:[(0,G.jsx)(C.ZP,{bold:!0,children:"Template UUID"}),(0,G.jsx)(C.ZP,{muted:!0,small:!0,children:"Unique identifier for custom template. The UUID will also determine where the custom template file is stored in the project. You can use nested folder names in the template\u2019s UUID."})]}),(0,G.jsx)(O.Z,{monospace:!0,onChange:function(e){return je((function(n){return z(z({},n),{},{template_uuid:e.target.value})}))},placeholder:"e.g. some_template_name",primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.template_uuid)||""})]}),(0,G.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,G.jsx)(j.Z,{label:"Block type",onChange:function(e){return je((function(n){return z(z({},n),{},{block_type:e.target.value,language:E.tf.MARKDOWN===e.target.value?E.t6.MARKDOWN:null===n||void 0===n?void 0:n.language})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.block_type)||"",children:Object.values(E.tf).map((function(e){return(0,G.jsx)("option",{value:e,children:E.V4[e]},e)}))})}),!Ae&&(0,G.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,G.jsx)(j.Z,{label:"Language",onChange:function(e){return je((function(n){return z(z({},n),{},{language:e.target.value})}))},primary:!0,value:(null===ge||void 0===ge?void 0:ge.language)||"",children:Object.values(E.t6).map((function(e){return(0,G.jsx)("option",{value:e,children:E.LE[e]},e)}))})})]}),A.uuid===(null===fe||void 0===fe?void 0:fe.uuid)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(x.Z,{mt:D.cd,px:D.cd,children:[(0,G.jsxs)(x.Z,{mb:1,children:[(0,G.jsx)(C.ZP,{bold:!0,children:"Name"}),(0,G.jsx)(C.ZP,{muted:!0,small:!0,children:"A human readable name for your template."})]}),(0,G.jsx)(O.Z,{onChange:function(e){return je((function(n){return z(z({},n),{},{name:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.name)||""})]}),(0,G.jsx)(x.Z,{mt:D.cd,px:D.cd,children:(0,G.jsx)(_.Z,{label:"Description",onChange:function(e){return je((function(n){return z(z({},n),{},{description:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===ge||void 0===ge?void 0:ge.description)||""})})]})]}),(0,G.jsx)(T.ig,{children:(0,G.jsx)(x.Z,{p:D.cd,children:(0,G.jsxs)(g.Z,{children:[(0,G.jsxs)(p.Z,{disabled:Pe,fullWidth:!0,loading:Ee||Re,onClick:function(){return tn()},primary:!0,children:[!we&&"Save template",we&&"Create new template"]}),Q&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(x.Z,{mr:1}),(0,G.jsx)(p.Z,{onClick:Q,secondary:!0,children:"Cancel"})]})]})})})]})}),(0,G.jsx)(T.w5,{children:(0,G.jsx)(x.Z,{p:D.cd,children:(0,G.jsx)(l.W,{backend:c.PD,children:nn})})})]})}},19140:function(e,n,t){t.d(n,{W4:function(){return d},Wx:function(){return s},ZG:function(){return a}});var o=t(38626),r=t(23831),i=t(86422),u=t(73942),l=t(49125),c=t(44162),a=l.cd*l.iI,s=o.default.div.withConfig({displayName:"indexstyle__IconContainerStyle",componentId:"sc-oyfjzc-0"})(["align-items:center;border-radius:","px;border:1px solid transparent;display:flex;justify-content:center;"," "," "," "," "," "," "," "," "," ",""],u.BG,(function(e){return e.border&&"\n border: 1px dotted ".concat((e.theme.content||r.Z.content).active,";\n ")}),(function(e){return e.grey&&"\n background-color: ".concat((0,c.qn)(i.tf.SCRATCHPAD,e).accent,";\n ")}),(function(e){return e.blue&&"\n background-color: ".concat((0,c.qn)(i.tf.DATA_LOADER,e).accent,";\n ")}),(function(e){return e.purple&&"\n background-color: ".concat((0,c.qn)(i.tf.TRANSFORMER,e).accent,";\n ")}),(function(e){return e.sky&&"\n background-color: ".concat((0,c.qn)(i.tf.MARKDOWN,e).accent,";\n ")}),(function(e){return e.teal&&"\n background-color: ".concat((0,c.qn)(i.tf.EXTENSION,e).accent,";\n ")}),(function(e){return e.rose&&"\n background-color: ".concat((0,c.qn)(i.tf.CALLBACK,e).accent,";\n ")}),(function(e){return e.yellow&&"\n background-color: ".concat((0,c.qn)(i.tf.DATA_EXPORTER,e).accent,";\n ")}),(function(e){return!e.compact&&"\n height: ".concat(a+l.iI/2,"px;\n width: ").concat(a+l.iI/2,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(a/2+l.iI,"px;\n width: ").concat(a/2+l.iI,"px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-oyfjzc-1"})(["position:relative;margin-bottom:","px;margin-right:","px;",""],l.iI,l.iI,(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}))},28317:function(e,n,t){t.d(n,{Z:function(){return ve}});var o=t(82394),r=t(21831),i=t(82684),u=t(75582),l=t(83455),c=t(67429),a=t(72470),s=t(60328),d=t(47999),f=t(93461),p=t(67971),m=t(30264),h=t(79749),v=t(10919),b=t(28598);var g=function(e){var n=e.fill,t=void 0===n?"white":n,o=e.size;return(0,b.jsxs)("svg",{fill:"none",height:o,viewBox:"0 0 20 21",width:o,xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11802_82284)",children:(0,b.jsx)("path",{clipRule:"evenodd",d:"M10 20.0024C15.5228 20.0024 20 15.5253 20 10.0024C20 4.47959 15.5228 0.00244141 10 0.00244141C4.47715 0.00244141 0 4.47959 0 10.0024C0 15.5253 4.47715 20.0024 10 20.0024ZM10 18.5024C11.5782 18.5024 13.0559 18.0723 14.3224 17.323C14.3144 17.3061 14.307 17.2888 14.3002 17.2712L11.5045 10.0024H8.49587L5.70021 17.2712C5.69339 17.2889 5.68596 17.3062 5.67796 17.3231C6.94434 18.0724 8.42195 18.5024 10 18.5024ZM11.6336 6.15938L15.5784 16.416C17.3685 14.8577 18.5 12.5622 18.5 10.0024C18.5 5.30802 14.6944 1.50244 10 1.50244C5.30558 1.50244 1.5 5.30802 1.5 10.0024C1.5 12.5623 2.63162 14.8579 4.4219 16.4163L8.36685 6.15939C8.94212 4.66367 11.0583 4.66367 11.6336 6.15938Z",fill:t,fillRule:"evenodd"})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11802_82284",children:(0,b.jsx)("rect",{fill:t,height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]})},x=t(29237),j=t(91835),C=t(93812),_=t(40656),O=t(22341);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k,E=function(e){var n=(0,j.Z)({},e),t=(null===n||void 0===n?void 0:n.size)||_.C,o=(0,O.J_)([{clipRule:"evenodd",d:"M15.4697 1.47202C16.3149 0.62684 17.6852 0.62684 18.5304 1.47202C19.3756 2.3172 19.3756 3.6875 18.5304 4.53268L10.7445 12.3186C10.5002 12.5629 10.1891 12.7294 9.85027 12.7972L9.11804 12.9436C7.89353 13.1885 6.81392 12.1089 7.05882 10.8844L7.20527 10.1522C7.27302 9.81337 7.43954 9.50222 7.68384 9.25792L15.4697 1.47202ZM17.4697 2.53268C17.2104 2.27329 16.7898 2.27329 16.5304 2.53268L14.7522 4.31085L15.6916 5.25019L17.4697 3.47202C17.7291 3.21263 17.7291 2.79207 17.4697 2.53268ZM14.6309 6.31085L13.6916 5.37151L8.7445 10.3186C8.7096 10.3535 8.68582 10.3979 8.67614 10.4463L8.52969 11.1786C8.4947 11.3535 8.64893 11.5077 8.82386 11.4727L9.5561 11.3263C9.60449 11.3166 9.64894 11.2928 9.68384 11.2579L14.6309 6.31085Z",fillRule:"evenodd"},{clipRule:"evenodd",d:"M2.12221 16.4212C1.89178 16.7635 1.42775 16.8555 1.08405 16.6264C0.739408 16.3966 0.646278 15.931 0.876042 15.5863L1.50008 16.0023C0.876042 15.5863 0.87632 15.5859 0.876609 15.5855L0.877248 15.5845L0.878742 15.5823L0.882593 15.5766L0.893746 15.5605C0.902714 15.5476 0.914758 15.5306 0.929868 15.51C0.96007 15.4687 1.00264 15.4126 1.05749 15.345C1.16699 15.2102 1.32669 15.0283 1.53609 14.8278C1.95274 14.4289 2.58034 13.9427 3.41428 13.6164C5.14688 12.9384 7.5533 13.0314 10.475 15.4219C13.0533 17.5314 14.8969 17.4384 16.0393 16.9914C16.6428 16.7552 17.109 16.3976 17.4267 16.0934C17.5845 15.9424 17.7021 15.8078 17.7782 15.7142C17.8161 15.6675 17.8434 15.6313 17.8598 15.6089C17.868 15.5977 17.8735 15.5899 17.8762 15.586C17.8769 15.585 17.8774 15.5843 17.8777 15.5838L17.877 15.5849C18.1069 15.2409 18.5717 15.1487 18.9161 15.3783C19.2608 15.6081 19.3539 16.0737 19.1241 16.4184L18.5001 16.0023C19.1241 16.4184 19.1238 16.4188 19.1236 16.4192L19.1229 16.4202L19.1214 16.4224L19.1176 16.4281L19.1064 16.4442C19.0974 16.4571 19.0854 16.4741 19.0703 16.4947C19.0401 16.536 18.9975 16.5921 18.9427 16.6597C18.8332 16.7945 18.6735 16.9764 18.4641 17.1769C18.0474 17.5758 17.4198 18.062 16.5859 18.3883C14.8533 19.0663 12.4469 18.9733 9.52515 16.5828C6.94686 14.4733 5.10328 14.5663 3.96088 15.0133C3.35732 15.2495 2.89117 15.6071 2.57345 15.9113C2.41566 16.0623 2.29802 16.1969 2.22197 16.2905C2.18405 16.3372 2.15679 16.3734 2.14036 16.3958C2.13215 16.407 2.12668 16.4148 2.12396 16.4187C2.12332 16.4196 2.12254 16.4207 2.12221 16.4212ZM2.12221 16.4212C2.1222 16.4212 2.12221 16.4212 2.12221 16.4212V16.4212Z",fillRule:"evenodd"}],{viewBox:"0 0 20 21"});return(0,b.jsxs)(C.ZP,y(y({},n),{},{size:t,viewBox:null,children:[(0,b.jsx)("g",{clipPath:"url(#clip0_11826_796)",id:"Type / Scratchpad",children:(0,b.jsx)("g",{id:"Vector",children:o(y(y({},n),{},{size:t}))})}),(0,b.jsx)("defs",{children:(0,b.jsx)("clipPath",{id:"clip0_11826_796",children:(0,b.jsx)("rect",{fill:"white",height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]}))};!function(e){e.BLOCK_ACTION_OBJECTS="block_action_objects"}(k||(k={}));var T=t(86673),I=t(19711),S=t(82944),R=t(46261),A=t(82531),w=t(86422),P=t(27337),D=t(38626),M=t(23831),N=t(73942),L=t(49125),B=t(37391),U=t(90880),F=L.cd*L.iI,H=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1mqygp5-0"})([""," border-radius:","px;"," "," "," "," ",""],(0,U.eR)(),N.n_,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).dashboard,";\n box-shadow: ").concat((e.theme.shadow||M.Z.shadow).frame,";\n ")}),(function(e){return!e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||M.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||M.Z.interactive).hoverBorder,";\n ")}),(function(e){return!e.compact&&"\n padding-left: ".concat(2.5*L.iI,"px;\n padding-right: ").concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n padding-left: ".concat(1.5*L.iI,"px;\n padding-right: ").concat(1.5*L.iI,"px;\n ")})),G=D.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-1mqygp5-1"})(["height:","px;width:1px;",""],F,(function(e){return"\n background-color: ".concat((e.theme.interactive||M.Z.interactive).defaultBorder,";\n ")})),W=D.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-1mqygp5-2"})(["position:relative;"," "," ",""],(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}),(function(e){return!e.compact&&"\n margin-bottom: ".concat(2.5*L.iI,"px;\n margin-top: ").concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n margin-bottom: ".concat(1.5*L.iI,"px;\n margin-top: ").concat(1.5*L.iI,"px;\n ")})),z=D.default.div.withConfig({displayName:"indexstyle__TextInputFocusAreaStyle",componentId:"sc-1mqygp5-3"})(["width:100%;&:hover{cursor:text;}"," ",""],(function(e){return!e.compact&&"\n height: ".concat(2.5*L.iI,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(1.5*L.iI,"px;\n ")})),Q=D.default.div.withConfig({displayName:"indexstyle__SearchStyle",componentId:"sc-1mqygp5-4"})(["position:relative;width:100%;"]),q=D.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-1mqygp5-5"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],B.w5,N.BG,40*L.iI,(function(e){return"\n background-color: ".concat((e.theme.background||M.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||M.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")})),K=D.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-1mqygp5-6"})(["align-items:center;display:flex;justify-content:space-between;padding:","px ","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],1.5*L.iI,2.5*L.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||M.Z.interactive).hoverBackground,";\n ")})),V=t(16115),Y=t(11366),X=t(91427),J=t(44162),$=t(84212),ee=t(96510),ne=t(66653),te=t(9728),oe=t(41150);function re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=function(e){var n,t=e.addNewBlock,o=e.blockIdx,r=e.blockTemplatesByBlockType,j=e.compact,C=e.focused,_=e.itemsDBT,Z=e.pipelineType,y=e.project,D=e.searchTextInputRef,M=e.setAddNewBlockMenuOpenIdx,N=e.setFocused,B=e.showBrowseTemplates,U=e.showConfigureProjectModal,re=e.showGlobalDataProducts,ue=(0,i.useRef)(null),le=(0,i.useRef)(null),ce=(0,i.useRef)(null),ae=(0,i.useRef)(null),se="undefined"!==typeof D?D:ae,de=(0,i.useMemo)((function(){return"AddNewBlocksV2/".concat(o)}),[o]),fe=(0,te.VI)(null,{},[],{uuid:"AddNewBlocksV2/".concat(o)}),pe=(0,u.Z)(fe,1)[0],me=(0,i.useState)(null),he=me[0],ve=me[1],be=(0,i.useState)(!1),ge=be[0],xe=be[1],je=(0,i.useState)(null),Ce=je[0],_e=je[1],Oe=(0,i.useState)(null),Ze=Oe[0],ye=Oe[1],ke=(0,i.useState)(null),Ee=ke[0],Te=ke[1],Ie=(0,i.useCallback)((function(e){Te(e),(0,X.t8)(Y.Ch,e)}),[]);(0,i.useEffect)((function(){if(null===Ee){var e=(0,X.U2)(Y.Ch,!1);Ie(e)}}),[Ie,Ee]);var Se=(0,i.useMemo)((function(){return"undefined"!==typeof C?C:ge}),[C,ge]),Re=(0,i.useCallback)((function(e){return"undefined"!==typeof N?N(e):xe(e)}),[N,xe]),Ae=(0,oe.y)(),we=Ae.registerOnKeyDown,Pe=Ae.unregisterOnKeyDown;(0,i.useEffect)((function(){return function(){return Pe(de)}}),[Pe,de]),null===we||void 0===we||we(de,(function(e,n){var t;Se&&(n[V.vP]&&(Re(!1),null===se||void 0===se||null===(t=se.current)||void 0===t||t.blur()))}),[Se,se]);var De=(0,i.useCallback)((function(){return ve(null)}),[]),Me=(0,i.useCallback)((function(e){return null===M||void 0===M?void 0:M((function(n){return null===n||he!==e?o:null}))}),[o,he,M]),Ne=(0,i.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,w.tf.DATA_LOADER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(w.tf.DATA_LOADER,"/").concat(w.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Le=(0,i.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,w.tf.DATA_EXPORTER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(w.tf.DATA_EXPORTER,"/").concat(w.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Be=(0,i.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,w.tf.TRANSFORMER,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(w.tf.TRANSFORMER,"/").concat(w.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Ue=(0,i.useMemo)((function(){var e,n;return null===(e=(0,$.hr)(t,w.tf.SENSOR,Z,{blockTemplatesByBlockType:r,v2:!0}))||void 0===e||null===(n=e.find((function(e){return e.uuid==="".concat(w.tf.SENSOR,"/").concat(w.t6.PYTHON)})))||void 0===n?void 0:n.items}),[t,r,Z]),Fe=(0,i.useCallback)((function(e){return[{isGroupingTitle:!0,label:function(){return"SQL"},uuid:"".concat(w.t6.SQL,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:w.t6.SQL,type:e})},uuid:"".concat(w.t6.SQL,"/").concat(e,"/Base template (generic)")},{isGroupingTitle:!0,label:function(){return"R"},uuid:"".concat(w.t6.R,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){t({language:w.t6.R,type:e})},uuid:"".concat(w.t6.R,"/").concat(e,"/Base template (generic)")}]}),[t]),He=(0,i.useMemo)((function(){return[{beforeIcon:(0,b.jsx)(O.rH,{fill:(0,J.qn)(w.tf.DATA_LOADER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(w.t6.PYTHON).concat(w.tf.DATA_LOADER,"/group")}].concat(Ne).concat(Fe(w.tf.DATA_LOADER)),label:function(){return w.V4[w.tf.DATA_LOADER]},uuid:"".concat(w.tf.DATA_LOADER,"/").concat(w.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.Sv,{fill:(0,J.qn)(w.tf.TRANSFORMER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(w.t6.PYTHON).concat(w.tf.TRANSFORMER,"/group")}].concat(Be).concat(Fe(w.tf.TRANSFORMER)),label:function(){return w.V4[w.tf.TRANSFORMER]},uuid:"".concat(w.tf.TRANSFORMER,"/").concat(w.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.zS,{fill:(0,J.qn)(w.tf.DATA_EXPORTER).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(w.t6.PYTHON).concat(w.tf.DATA_EXPORTER,"/group")}].concat(Le).concat(Fe(w.tf.DATA_EXPORTER)),label:function(){return w.V4[w.tf.DATA_EXPORTER]},uuid:"".concat(w.tf.DATA_EXPORTER,"/").concat(w.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.LM,{fill:(0,J.qn)(w.tf.SENSOR).accent,size:F}),items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(w.t6.PYTHON).concat(w.tf.SENSOR,"/group")}].concat(Ue),label:function(){return w.V4[w.tf.SENSOR]},uuid:"".concat(w.tf.SENSOR,"/").concat(w.t6.PYTHON)},{beforeIcon:(0,b.jsx)(O.xE,{fill:(0,J.qn)(w.tf.DBT).accent,size:F}),items:_,label:function(){return w.V4[w.tf.DBT]},uuid:w.tf.DBT},{isGroupingTitle:!0,label:function(){return"Custom templates"},uuid:"custom_templates"},{beforeIcon:(0,b.jsx)(O.zQ,{default:!0,size:F}),label:function(){return"Browse templates"},onClick:function(){return B({addNewBlock:t})},uuid:"browse_templates"},{beforeIcon:(0,b.jsx)(O.o0,{default:!0,size:F}),label:function(){return"Create new template"},onClick:function(){return B({addNew:!0,addNewBlock:t})},uuid:"create_template"}]}),[t,Fe,Le,Ne,_,Ue,Be,B,re]),Ge=(0,i.useMemo)((function(){return[{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"Python block"},onClick:function(){t({language:w.t6.PYTHON,type:w.tf.CUSTOM})},uuid:"Python"},{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"SQL block"},onClick:function(){t({language:w.t6.SQL,type:w.tf.CUSTOM})},uuid:"SQL"},{beforeIcon:(0,b.jsx)(O.VS,{default:!0,size:F}),label:function(){return"R block"},onClick:function(){t({language:w.t6.R,type:w.tf.CUSTOM})},uuid:"R"},{beforeIcon:(0,b.jsx)(E,{default:!0,size:F}),label:function(){return"Scratchpad"},onClick:function(){t({language:w.t6.PYTHON,type:w.tf.SCRATCHPAD})},uuid:"scratchpad"}]}),[t]),We=(0,l.Db)(A.ZP.search_results.useCreate(),{onSuccess:function(e){return(0,ee.wD)(e,{callback:function(e){var n=e.search_result;ye(n)},onErrorCallback:function(e,n){return pe({errors:n,response:e})}})}}),ze=(0,u.Z)(We,1)[0],Qe=(0,i.useCallback)((function(e){clearTimeout(ce.current);var n=e.target.value;_e(n),n?ce.current=setTimeout((function(){ze({search_result:{pipeline_type:Z,query:n,ratio:70,type:k.BLOCK_ACTION_OBJECTS}})}),500):ye(null)}),[ze,Z,ce]),qe=(0,i.useMemo)((function(){return(null===Ze||void 0===Ze?void 0:Ze.results)||[]}),[Ze]),Ke=(0,i.useMemo)((function(){var e=null===Ze||void 0===Ze?void 0:Ze.uuid,n=null===qe||void 0===qe?void 0:qe.map((function(n){return{itemObject:n,searchQueries:[e],value:null===n||void 0===n?void 0:n.uuid}}));if(e){var t={itemObject:{description:e,object_type:a.L.GENERATE_BLOCK,title:"Generate block using AI (beta)"},searchQueries:[e],value:"generate_block"};Ee?n.push(t):n.unshift(t)}return n}),[qe,Ze,Ee]),Ve=(0,i.useMemo)((function(){return(0,b.jsx)(z,{compact:j,onClick:function(){var e;return null===se||void 0===se||null===(e=se.current)||void 0===e?void 0:e.focus()}})}),[j,se]),Ye=(0,i.useMemo)((function(){return!(null===y||void 0===y||!y.openai_api_key)}),[y]);return(0,b.jsx)(d.Z,{onClickOutside:De,open:!0,children:(0,b.jsx)(H,{compact:j,focused:Se,children:(0,b.jsxs)(p.Z,{alignItems:"center",children:[(0,b.jsx)(W,{compact:j,increasedZIndex:0===he,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:He,onClickCallback:De,open:0===he,parentRef:ue,uuid:"button_templates",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a block from a template",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(O.zQ,{secondary:0===he,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ve((function(e){return 0===e?null:0})),Me(0)},children:"Templates"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(W,{compact:j,increasedZIndex:1===he,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:Ge,onClickCallback:De,open:1===he,parentRef:le,uuid:"button_custom",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a blank custom block or scratchpad block",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(O.cW,{secondary:1===he,size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),ve((function(e){return 1===e?null:1})),Me(1)},children:"Custom"})})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(W,{compact:j,increasedZIndex:0===he,children:(0,b.jsx)(R.Z,{block:!0,label:"Add a markdown block for documentation",size:null,widthFitContent:!0,children:(0,b.jsx)(s.Z,{beforeIcon:(0,b.jsx)(g,{size:F}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){e.preventDefault(),t({language:w.t6.MARKDOWN,type:w.tf.MARKDOWN})},children:"Markdown"})})}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsx)(G,{}),(0,b.jsx)(T.Z,{mr:3}),(0,b.jsxs)(Q,{children:[Ve,(0,b.jsxs)(p.Z,{alignItems:"center",fullWidth:!0,children:[(0,b.jsx)(S.Z,{fullWidth:!0,noBackground:!0,noBorder:!0,onBlur:function(){return setTimeout((function(){return Re(!1)}),150)},onChange:Qe,onFocus:function(){return Re(!0)},paddingHorizontal:0,paddingVertical:0,placeholder:"Search for a block...",ref:se,value:Ce||""}),(0,b.jsx)(h.Z,{addPlusSignBetweenKeys:!0,disabled:!0,keyTextGroups:[[V.RJ,V.ZS]]})]}),Ve,(0,b.jsx)(q,{topOffset:(null===se||void 0===se||null===(n=se.current)||void 0===n?void 0:n.getBoundingClientRect().height)+(j?1.5*L.iI:2.5*L.iI),children:(0,b.jsx)(c.Z,{itemGroups:[{items:Se?Ke:[],renderItem:function(e,n){var t=e.itemObject,o=t.block_type,r=t.description,i=t.language,u=t.object_type,l=t.title,c={fill:(0,J.qn)(o).accent,size:F},s=P.iK[o],d=a.L.GENERATE_BLOCK===u;d&&(s=O.xq,c.default=!1,c.fill=null,c.warning=!0);var p="".concat(l).concat(r?": "+r:"").slice(0,80);return(0,b.jsxs)(K,ie(ie({},n),{},{onClick:function(e){var t;(0,ne.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:[(0,b.jsxs)(f.Z,{alignItems:"center",flex:1,children:[s&&(0,b.jsx)(s,ie({default:!(null!==c&&void 0!==c&&c.fill)},c)),(0,b.jsx)(T.Z,{mr:2}),(0,b.jsx)(I.ZP,{default:!0,overflowWrap:!0,textOverflow:!0,children:p})]}),(0,b.jsx)(T.Z,{mr:1}),(0,b.jsx)(I.ZP,{monospace:!0,muted:!0,uppercase:!0,children:d?"AI":w.dO[i]}),(0,b.jsx)(T.Z,{mr:1}),a.L.BLOCK_FILE===u&&(0,b.jsx)(O.$B,{muted:!0,size:F}),a.L.CUSTOM_BLOCK_TEMPLATE===u&&(0,b.jsx)(O.zQ,{muted:!0,size:F}),a.L.MAGE_TEMPLATE===u&&(0,b.jsx)(O.m1,{muted:!0,size:F}),d&&Ye&&(0,b.jsx)(O.xq,{muted:!0,size:F}),d&&!Ye&&(0,b.jsx)(O.uy,{muted:!0,size:F})]}))}}],onSelectItem:function(e){var n=e.itemObject,o=n.object_type;a.L.GENERATE_BLOCK!==o||Ye?(t({block_action_object:n}),_e(null),ye(null)):null===U||void 0===U||U({cancelButtonText:"Set this up later",header:(0,b.jsx)(T.Z,{mb:L.HN,children:(0,b.jsxs)(x.Z,{children:[(0,b.jsx)(I.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,b.jsx)(T.Z,{mt:1,children:(0,b.jsxs)(I.ZP,{warning:!0,children:["Read ",(0,b.jsx)(v.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){Ie(!0)},onSaveSuccess:function(e){null!==e&&void 0!==e&&e.openai_api_key&&(t({block_action_object:n}),_e(null),ye(null))}})},uuid:de})})]})]})})})};var le=function(e){var n=e.size;return(0,b.jsx)("svg",{fill:"none",height:n,preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",width:n,xmlns:"http://www.w3.org/2000/svg",children:(0,b.jsx)("path",{d:"M245.121138,10.6473813 C251.139129,16.4340053 255.074133,24.0723342 256,32.4050489 C256,35.8769778 255.074133,38.1917867 252.990862,42.5895822 C250.907876,46.9873778 225.215147,91.4286933 217.57696,103.696213 C213.179164,110.871609 210.864356,119.435947 210.864356,127.768462 C210.864356,136.3328 213.179164,144.6656 217.57696,151.840996 C225.215147,164.108516 250.907876,208.781084 252.990862,213.179164 C255.074133,217.57696 256,219.659947 256,223.131876 C255.074133,231.464676 251.370667,239.103147 245.352676,244.658347 C239.565938,250.676338 231.927751,254.611342 223.826489,255.305671 C220.35456,255.305671 218.039751,254.379804 213.873493,252.296533 C209.706951,250.213262 164.340053,225.215147 152.072249,217.57696 C151.146382,217.113884 150.220516,216.419556 149.063396,215.95648 L88.4195556,180.079502 C89.8082133,191.652693 94.9006222,202.763093 103.233138,210.864356 C104.853618,212.484551 106.473813,213.873493 108.325547,215.262151 C106.936604,215.95648 105.316409,216.651093 103.927751,217.57696 C91.6599467,225.215147 46.9873778,250.907876 42.5895822,252.990862 C38.1917867,255.074133 36.1085156,256 32.4050489,256 C24.0723342,255.074133 16.4340053,251.370667 10.8788338,245.352676 C4.86075733,239.565938 0.925858133,231.927751 0,223.594951 C0.231464676,220.123022 1.1573248,216.651093 3.00905244,213.641956 C5.09223822,209.24416 30.7848533,164.571307 38.42304,152.303787 C42.82112,145.128391 45.1356444,136.795591 45.1356444,128.231538 C45.1356444,119.6672 42.82112,111.3344 38.42304,104.159004 C30.7848533,91.4286933 4.86075733,46.75584 3.00905244,42.3580444 C1.1573248,39.3489067 0.231464676,35.8769778 0,32.4050489 C0.925858133,24.0723342 4.62930489,16.4340053 10.6473813,10.6473813 C16.4340053,4.62930489 24.0723342,0.925858133 32.4050489,0 C35.8769778,0.231464676 39.3489067,1.1573248 42.5895822,3.00905244 C46.2930489,4.62930489 78.9293511,23.6094009 96.28928,33.7939911 L100.224284,36.1085156 C101.612942,37.0343822 102.770347,37.7287111 103.696213,38.1917867 L105.547947,39.3489067 L167.348907,75.9204978 C165.960249,62.0324978 158.784853,49.3019022 147.674453,40.7378489 C149.063396,40.04352 150.683591,39.3489067 152.072249,38.42304 C164.340053,30.7848533 209.012622,4.86075733 213.410418,3.00905244 C216.419556,1.1573248 219.891484,0.231464676 223.594951,0 C231.696213,0.925858133 239.334684,4.62930489 245.121138,10.6473813 Z M131.240391,144.434062 L144.434062,131.240391 C146.285796,129.388658 146.285796,126.611342 144.434062,124.759609 L131.240391,111.565938 C129.388658,109.714204 126.611342,109.714204 124.759609,111.565938 L111.565938,124.759609 C109.714204,126.611342 109.714204,129.388658 111.565938,131.240391 L124.759609,144.434062 C126.379804,146.054258 129.388658,146.054258 131.240391,144.434062 Z",fill:"#FF694A"})})},ce=t(11135),ae=t(98781),se=t(46336),de=t(80906),fe=t(19140),pe=t(88859);function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function he(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?me(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):me(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ve=function(e){var n=e.addNewBlock,t=e.blockIdx,o=e.blockTemplates,u=e.compact,l=e.focusedAddNewBlockSearch,c=e.hideCustom,a=e.hideDataExporter,s=(e.hideDataLoader,e.hideDbt),f=e.hideMarkdown,h=e.hideScratchpad,v=e.hideSensor,g=e.hideTransformer,x=e.hideTransformerDataSources,j=e.onClickAddSingleDBTModel,C=e.pipeline,_=e.project,Z=e.searchTextInputRef,y=e.setAddNewBlockMenuOpenIdx,k=e.setCreatingNewDBTModel,E=e.setFocusedAddNewBlockSearch,T=e.showBrowseTemplates,I=e.showConfigureProjectModal,S=e.showGlobalDataProducts,A=(0,i.useState)(null),P=A[0],D=A[1],M=(0,i.useRef)(null),N=(0,i.useRef)(null),B=(0,i.useRef)(null),U=(0,i.useRef)(null),F=(0,i.useRef)(null),H=(0,i.useRef)(null),G=(0,i.useRef)(null),W={compact:u,inline:!0},z=null===C||void 0===C?void 0:C.type,Q=z===ae.qL.STREAMING,q=u?fe.ZG/2:fe.ZG,K=25*L.iI,V=(0,i.useMemo)((function(){return(0,$.q_)(pe.c1,de.qs.COLUMN,n)}),[n]),Y=(0,i.useMemo)((function(){return(0,$.q_)(pe.Wt,de.qs.ROW,n)}),[n]),X=(0,i.useMemo)((function(){var e=[{label:function(){return"Generic (no template)"},onClick:function(){n({language:w.t6.PYTHON,type:w.tf.TRANSFORMER})},uuid:"generic_transformer_action"},{bold:!0,items:Y,label:function(){return"Row actions"},uuid:"row_actions_grouping"},{isGroupingTitle:!0,label:function(){return"Column actions"},uuid:"column_actions_grouping"}].concat((0,r.Z)(V));return x||e.splice(1,0,{bold:!0,items:(0,$.hr)(n,w.tf.TRANSFORMER,z),label:function(){return"Data sources"},uuid:"data_sources_grouping"}),e}),[n,V,x,z,Y]),J=(0,i.useCallback)((function(){return D(null)}),[]),ee=(0,i.useCallback)((function(e){return null===y||void 0===y?void 0:y((function(n){return null===n||P!==e?t:null}))}),[t,P,y]),ne=ae.qL.PYSPARK===z,te=(0,i.useMemo)((function(){return(0,$.oM)(o,n)}),[n,o]),oe=(0,i.useMemo)((function(){return(0,$.hr)(n,w.tf.DATA_LOADER,z,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,z,T]),re=(0,i.useMemo)((function(){return(0,$.hr)(n,w.tf.DATA_EXPORTER,z,{blockTemplatesByBlockType:te,showBrowseTemplates:T})}),[n,te,z,T]),ie=(0,i.useMemo)((function(){return ne||ae.qL.INTEGRATION===z?X:Q?[{items:(0,$.hr)(n,w.tf.TRANSFORMER,z),label:function(){return"Python"},uuid:"transformers/python"}]:[{items:X,label:function(){return"Python"},uuid:"transformers/python_all"}].concat((0,r.Z)((0,$.qs)(n,w.tf.TRANSFORMER)),(0,r.Z)((0,$.hr)(n,w.tf.TRANSFORMER,z,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T})))}),[n,X,te,ne,Q,z,T]),me=(0,i.useMemo)((function(){return[{label:function(){return"New model"},onClick:function(){null===k||void 0===k||k(!0),null===j||void 0===j||j(t)},uuid:"dbt/new_model"},{label:function(){return"Single model or snapshot (from file)"},onClick:function(){return null===j||void 0===j?void 0:j(t)},uuid:"dbt/single_model"},{label:function(){return"All models (w/ optional exclusion)"},onClick:function(){return n({configuration:{dbt:{command:"run"}},language:w.t6.YAML,type:w.tf.DBT})},uuid:"dbt/all_models"},{label:function(){return"Generic dbt command"},onClick:function(){return n({configuration:{dbt:{command:null}},language:w.t6.YAML,type:w.tf.DBT})},uuid:"dbt/generic_command"}]}),[n,t,j,k]);return(0,i.useMemo)((function(){var e;return ae.qL.PYTHON===z&&!ne&&(null===_||void 0===_||null===(e=_.features)||void 0===e?void 0:e[se.d.ADD_NEW_BLOCK_V2])}),[ne,z,_])?(0,b.jsx)(ue,{addNewBlock:n,blockIdx:t,blockTemplatesByBlockType:te,compact:u,focused:l,itemsDBT:me,pipelineType:z,project:_,searchTextInputRef:Z,setAddNewBlockMenuOpenIdx:y,setFocused:E,showBrowseTemplates:T,showConfigureProjectModal:I,showGlobalDataProducts:S}):(0,b.jsx)(p.Z,{flexWrap:"wrap",inline:!0,children:(0,b.jsx)(d.Z,{onClickOutside:J,open:!0,children:(0,b.jsxs)(p.Z,{flexWrap:"wrap",children:[!a&&(0,b.jsx)(fe.W4,{increasedZIndex:0===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:oe,onClickCallback:J,open:0===P,parentRef:M,uuid:"data_loader_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{blue:!0,compact:u,children:(0,b.jsx)(O.mm,{size:q})}),onClick:function(e){e.preventDefault(),D((function(e){return 0===e?null:0})),ee(0)},uuid:"AddNewBlocks/Data_loader",children:"Data loader"}))})}),!g&&(0,b.jsx)(fe.W4,{increasedZIndex:1===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:ie,onClickCallback:J,open:1===P,parentRef:N,uuid:"transformer_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,purple:!0,children:(0,b.jsx)(O.mm,{size:q})}),onClick:function(e){e.preventDefault(),D((function(e){return 1===e?null:1})),ee(1)},uuid:"AddNewBlocks/Transformer",children:"Transformer"}))})}),!a&&(0,b.jsx)(fe.W4,{increasedZIndex:2===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:re,onClickCallback:J,open:2===P,parentRef:B,uuid:"data_exporter_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,yellow:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:q})}),onClick:function(e){e.preventDefault(),D((function(e){return 2===e?null:2})),ee(2)},uuid:"AddNewBlocks/Data_exporter",children:"Data exporter"}))})}),!s&&(0,b.jsx)(fe.W4,{increasedZIndex:3===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,r.Z)(me),(0,r.Z)((0,$.hr)(n,w.tf.DBT,z,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:3===P,parentRef:U,uuid:"dbt_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(le,{size:fe.ZG*(u?.75:1.25)}),onClick:function(e){e.preventDefault(),D((function(e){return 3===e?null:3})),ee(3)},uuid:"AddNewBlocks/DBT",children:"DBT model"}))})}),!c&&(0,b.jsx)(fe.W4,{increasedZIndex:4===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{items:(0,$.Bd)(n,w.tf.CUSTOM,w.t6.PYTHON),label:function(){return"Python"},uuid:"custom_block_python"},{items:(0,$.Bd)(n,w.tf.CUSTOM,w.t6.SQL),label:function(){return"SQL"},uuid:"custom_block_sql"}].concat((0,r.Z)((0,$.hr)(n,w.tf.CUSTOM,z,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:4===P,parentRef:F,uuid:"custom_block_button",children:(0,b.jsx)(R.Z,{block:!0,label:"Add a custom code block with a designated color.",maxWidth:K,size:null,children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,grey:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:q})}),onClick:function(e){e.preventDefault(),D((function(e){return 4===e?null:4})),ee(4)},uuid:"AddNewBlocks/Scratchpad",children:"Custom"}))})})}),!h&&(0,b.jsx)(fe.W4,{children:(0,b.jsx)(R.Z,{block:!0,label:"Write experimental code that doesn\u2019t get executed when you run your pipeline.",maxWidth:K,size:null,children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{border:!0,compact:u,children:(0,b.jsx)(O.mm,{size:q})}),onClick:function(e){e.preventDefault(),n({type:w.tf.SCRATCHPAD})},uuid:"AddNewBlocks/Scratchpad",children:"Scratchpad"}))})}),!Q&&!v&&(0,b.jsx)(fe.W4,{increasedZIndex:6===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,r.Z)((0,$.hr)(n,w.tf.SENSOR,z)),(0,r.Z)((0,$.hr)(n,w.tf.SENSOR,z,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:6===P,parentRef:H,uuid:"sensor_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,children:(0,b.jsx)(O.LM,{pink:!0,size:fe.ZG*(u?.75:1.25)})}),onClick:function(e){e.preventDefault(),D((function(e){return 6===e?null:6})),ee(6)},uuid:"AddNewBlocks/Sensor",children:"Sensor"}))})}),!f&&(0,b.jsx)(fe.W4,{increasedZIndex:7===P,children:(0,b.jsx)(m.Z,{disableKeyboardShortcuts:!0,items:[{label:function(){return"Generic (no template)"},onClick:function(){n({language:w.t6.MARKDOWN,type:w.tf.MARKDOWN})},uuid:"generic_markdown"}].concat((0,r.Z)((0,$.hr)(n,w.tf.MARKDOWN,z,{blockTemplatesByBlockType:te,onlyCustomTemplate:!0,showBrowseTemplates:T}))),onClickCallback:J,open:7===P,parentRef:G,uuid:"markdown_button",children:(0,b.jsx)(ce.ZP,he(he({},W),{},{beforeElement:(0,b.jsx)(fe.Wx,{compact:u,sky:!0,children:(0,b.jsx)(O.mm,{inverted:!0,size:q})}),onClick:function(e){e.preventDefault(),D((function(e){return 7===e?null:7})),ee(7)},uuid:"AddNewBlocks/Markdown",children:"Markdown"}))})})]})})})}},84212:function(e,n,t){t.d(n,{Bd:function(){return y},SF:function(){return k},X7:function(){return E},hr:function(){return _},oM:function(){return C},q_:function(){return Z},qs:function(){return j}});var o=t(21831),r=t(82394),i=t(67971),u=t(19711),l=t(88859),c=t(22341),a=t(86422),s=t(31524),d=t(98781),f=t(90211),p=t(44162),m=t(24224),h=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var b=function(e,n,t){var o=t===d.qL.STREAMING&&(e===a.tf.DATA_LOADER||e===a.tf.DATA_EXPORTER);return(function(e){var n;return e===d.qL.STREAMING?(n={},(0,r.Z)(n,a.tf.DATA_LOADER,[s.ZP.AMAZON_SQS,s.ZP.AZURE_EVENT_HUB,s.ZP.GOOGLE_CLOUD_PUBSUB,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.RABBITMQ]),(0,r.Z)(n,a.tf.DATA_EXPORTER,[s.ZP.AZURE_DATA_LAKE,s.ZP.DUMMY,s.ZP.S3,s.ZP.KAFKA,s.ZP.KINESIS,s.ZP.MONGODB,s.ZP.OPENSEARCH]),(0,r.Z)(n,a.tf.TRANSFORMER,[s.ZP.GENERIC]),n):s.cp}(t)[e]||[]).map((function(t){return{indent:e===a.tf.TRANSFORMER,label:function(){return s.MV[t]},onClick:function(){n({config:{data_source:t===s.ZP.GENERIC?null:t},language:o?a.t6.YAML:a.t6.PYTHON,type:e})},uuid:"".concat(e,"/").concat(t)}}))};function g(e,n){return{label:function(){return"SQL"},onClick:function(){return e({language:a.t6.SQL,type:n})},uuid:"".concat(n,"/sql")}}function x(e,n){return{label:function(){return"R"},onClick:function(){return e({language:a.t6.R,type:n})},uuid:"".concat(n,"/r")}}var j=function(e,n){return[g(e,n),x(e,n)]};function C(e,n){var t={};return null===e||void 0===e||e.forEach((function(e){var o=e.block_type,i=e.description,u=e.groups,l=e.language,c=e.name,a=e.path,s=e.template_variables;t[o]||(t[o]={}),t[o][l]||(t[o][l]={items:[],label:function(){return l},uuid:"".concat(o,"/").concat(l)});var d={label:function(){return c},onClick:function(){return n({config:{template_path:a,template_variables:s},language:l,type:o})},tooltip:function(){return i},uuid:a};if((null===u||void 0===u?void 0:u.length)>=1){var f=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},t[o][l]),p=[null],m=[f];u.forEach((function(e,n){var t="".concat(o,"/").concat(l,"/").concat(u.slice(0,n+1).join("/")),r=m[n],i=r.items.findIndex((function(e){var n=e.uuid;return t===n})),c=i>=0?r.items[i]:null;c||(c={items:[],label:function(){return e},uuid:t}),p.push(i),m.push(c)})),p.push(-1),m.push(d);var h=m.length;t[o][l]=m.reduce((function(e,n,t){var o=h-t,r=m[o-2],i=m[o-1],u=p[o-1];return r?(u>=0?r.items[u]=i:r.items.push(i),r):i}),{})}else t[o][l].items.push(d)})),t}var _=function(e,n,t,o){var r=o||{},i=r.blockTemplatesByBlockType,u=r.languages,l=r.onlyCustomTemplate,c=r.showBrowseTemplates,s={};null!==o&&void 0!==o&&o.v2||(s=Object.fromEntries(a.Ut.map((function(n){return[n,b(n,e,t)]}))));var f={label:function(){return"Custom template"},onClick:function(){return c({addNewBlock:e,blockType:n,language:a.t6.SQL})},uuid:"".concat(n,"/custom_template")};if(l)return[f];if(t===d.qL.PYSPARK||t===d.qL.STREAMING)return s[n];var p,h,v=(null===i||void 0===i||null===(p=i[n])||void 0===p||null===(h=p[a.t6.PYTHON])||void 0===h?void 0:h.items)||[],j=[{items:(0,m.YC)((s[n]||[]).concat(v),(function(e){return(0,e.label)()})),label:function(){return"Python"},uuid:"".concat(n,"/").concat(a.t6.PYTHON)}];return(!u||null!==u&&void 0!==u&&u.includes(a.t6.SQL))&&j.push(g(e,n)),(!u||null!==u&&void 0!==u&&u.includes(a.t6.R))&&j.push(x(e,n)),![a.tf.MARKDOWN,a.tf.SCRATCHPAD].includes(n)&&c&&j.push(f),j};function O(e,n,t){return e.map((function(e){return{indent:!0,label:function(){return l.NX[n][e]},onClick:function(){t({config:{action_type:e,axis:n},language:a.t6.PYTHON,type:a.tf.TRANSFORMER})},uuid:"".concat(n,"_").concat(e)}})).sort((function(e,n){return e.label().localeCompare(n.label())}))}function Z(e,n,t){var r=[];return e.forEach((function(e){if(e!==l._G.MISC)r.push({indent:!0,items:O(l.d9[n][e],n,t),label:function(){return e},uuid:"".concat(n,"_grouping_").concat((0,f.RA)(e))});else{var i=O(l.d9[n][e],n,t);r.push.apply(r,(0,o.Z)(i))}})),r}var y=function(e,n,t){return Object.values(a.Lq).map((function(o){return{label:function(){return(0,h.jsxs)(i.Z,{alignItems:"center",children:[(0,h.jsx)(c.mm,{fill:(0,p.qn)(a.tf.CUSTOM,{blockColor:o}).accent,size:16}),"\xa0",(0,h.jsx)(u.ZP,{children:(0,f.kC)(o)})]})},leftAligned:!0,onClick:function(){e({color:o,language:t,type:n})},uuid:"".concat(t,"_").concat(o)}}))},k=function(e){return"-- Docs: https://docs.mage.ai/guides/sql-blocks\n"+(e||"")};function E(e,n){var t=n;return a.tf.SCRATCHPAD===e.type&&(t='"""\nNOTE: Scratchpad blocks are used only for experimentation and testing out code.\nThe code written here will not be executed as part of the pipeline.\n"""\n'+(n||"")),t}},43482:function(e,n,t){t.d(n,{Dp:function(){return p},OF:function(){return m},Q9:function(){return v},Rt:function(){return s},h8:function(){return h},k1:function(){return d},uS:function(){return b}});var o=t(21831),r=t(82394),i=t(91427),u=t(24224),l=t(90211);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n={},t={};return null===e||void 0===e||e.forEach((function(e){var o=e.content,r=e.outputs,i=e.type,u=e.uuid;(null===r||void 0===r?void 0:r.length)>=1&&(n[u]=r.map((function(e){var n=e||{},t=n.sample_data,o=n.shape,r=n.text_data,i=n.type;return t?{data:a({shape:o},t),type:i}:r&&(0,l.Pb)(r)?JSON.parse(r):r}))),t[i]||(t[i]={}),t[i][u]=o})),{content:t,messages:n}}function d(e,n,t){e.forEach((function(e){(0,i.t8)("".concat(t,"/").concat(e.uuid,"/codeCollapsed"),(0,i.Od)("".concat(n,"/").concat(e.uuid,"/codeCollapsed"))),(0,i.t8)("".concat(t,"/").concat(e.uuid,"/outputCollapsed"),(0,i.Od)("".concat(n,"/").concat(e.uuid,"/outputCollapsed")))}))}function f(e){return"".concat(e,"/").concat(i.kP)}function p(e){return(0,i.U2)(f(e),[])}function m(e,n){var t=p(e);t.includes(n)||(0,i.t8)(f(e),[].concat((0,o.Z)(t),[n]))}function h(e,n){var t=p(e).filter((function(e){return e!==n}));(0,i.t8)(f(e),t)}function v(e,n){var t=(0,u.HK)(n,(function(e){return e.uuid}));return e.map((function(e){return t[e]})).filter((function(e){return!!e}))}var b=function(e,n){var t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=n,document.body.appendChild(o),o.click(),o.remove()}},80906:function(e,n,t){var o,r,i,u;t.d(n,{Q0:function(){return o},qs:function(){return r}}),function(e){e.ADD="add",e.AVERAGE="average",e.CLEAN_COLUMN_NAME="clean_column_name",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.CUSTOM="custom",e.DIFF="diff",e.DROP_DUPLICATE="drop_duplicate",e.EXPAND_COLUMN="expand_column",e.EXPLODE="explode",e.FILTER="filter",e.FIRST="first",e.FIX_SYNTAX_ERRORS="fix_syntax_errors",e.GROUP="group",e.IMPUTE="impute",e.JOIN="join",e.LAST="last",e.LIMIT="limit",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.NORMALIZE="normalize",e.REFORMAT="reformat",e.REMOVE="remove",e.REMOVE_OUTLIERS="remove_outliers",e.SCALE="scale",e.SELECT="select",e.SHIFT_DOWN="shift_down",e.SHIFT_UP="shift_up",e.SORT="sort",e.STANDARDIZE="standardize",e.SUM="sum",e.UNION="union",e.UPDATE_TYPE="update_type",e.UPDATE_VALUE="update_value"}(o||(o={})),function(e){e.COLUMN="column",e.ROW="row"}(r||(r={})),function(e){e.NOT_APPLIED="not_applied",e.COMPLETED="completed"}(i||(i={})),function(e){e.FEATURE="feature"}(u||(u={}))},45419:function(e,n,t){var o;t.d(n,{Q:function(){return o}}),function(e){e.CALLBACK="callbacks",e.CONDITIONAL="conditionals"}(o||(o={}))},72470:function(e,n,t){var o;t.d(n,{L:function(){return o}}),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.GENERATE_BLOCK="generate_block",e.MAGE_TEMPLATE="mage_template"}(o||(o={}))},42451:function(e,n,t){t.d(n,{$1:function(){return v},BD:function(){return j},CK:function(){return D},ED:function(){return c},JJ:function(){return l},JT:function(){return w},MP:function(){return M},Mi:function(){return I},Mv:function(){return _},PG:function(){return s},Pi:function(){return S},R8:function(){return i},Sv:function(){return g},Tv:function(){return A},Yf:function(){return E},Yg:function(){return f},a3:function(){return m},aE:function(){return N},aZ:function(){return T},bE:function(){return d},bk:function(){return k},bn:function(){return L},c0:function(){return B},cH:function(){return b},e:function(){return a},eN:function(){return u},eW:function(){return O},m$:function(){return C},m7:function(){return r},mW:function(){return y},nq:function(){return Z},oV:function(){return o},pA:function(){return R},rj:function(){return h},sc:function(){return x},v8:function(){return p}});var o,r="buckets",i="chart_style",u="group_by",l="height",c="index",a="legend_labels",s="limit",d="metrics",f="time_interval",p="width_percentage",m="x",h="y",v="y_sort_order",b="data_provider",g="data_provider_database",x="data_provider_profile",j="data_provider_schema",C="data_provider_table",_="dbt_profile_target",O="dbt_project_name",Z="export_write_policy",y="limit",k="unique_upstream_table_name",E="upstream_block_configuration",T="table_name",I="use_raw_sql",S="dbt",R="command",A=[m,h];!function(e){e.BAR_CHART="bar chart",e.HISTOGRAM="histogram",e.LINE_CHART="line chart",e.PIE_CHART="pie chart",e.TABLE="table",e.TIME_SERIES_BAR_CHART="time series bar chart",e.TIME_SERIES_LINE_CHART="time series line chart"}(o||(o={}));var w,P,D=[o.BAR_CHART,o.HISTOGRAM,o.LINE_CHART,o.PIE_CHART,o.TABLE,o.TIME_SERIES_BAR_CHART,o.TIME_SERIES_LINE_CHART];!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(w||(w={})),function(e){e.AVERAGE="average",e.COUNT="count",e.COUNT_DISTINCT="count_distinct",e.MAX="max",e.MEDIAN="median",e.MIN="min",e.MODE="mode",e.SUM="sum"}(P||(P={}));var M,N,L=[P.AVERAGE,P.COUNT,P.COUNT_DISTINCT,P.MAX,P.MEDIAN,P.MIN,P.MODE,P.SUM];function B(e){return"".concat(e.aggregation,"(").concat(e.column,")")}!function(e){e.ASCENDING="ascending",e.DESCENDING="descending"}(M||(M={})),function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.MONTH="month",e.ORIGINAL="original",e.SECOND="second",e.WEEK="week",e.YEAR="year"}(N||(N={}))},18908:function(e,n,t){t.d(n,{R:function(){return r},Z:function(){return o}});var o="blocks",r="pipelines"},31524:function(e,n,t){t.d(n,{MV:function(){return c},cp:function(){return a},zJ:function(){return i}});var o,r,i,u=t(82394),l=t(86422);!function(e){e.AMAZON_SQS="amazon_sqs",e.API="api",e.AZURE_BLOB_STORAGE="azure_blob_storage",e.AZURE_DATA_LAKE="azure_data_lake",e.AZURE_EVENT_HUB="azure_event_hub",e.BIGQUERY="bigquery",e.DRUID="druid",e.DUMMY="dummy",e.FILE="file",e.GENERIC="generic",e.GOOGLE_CLOUD_PUBSUB="google_cloud_pubsub",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.KAFKA="kafka",e.KINESIS="kinesis",e.MONGODB="mongodb",e.MYSQL="mysql",e.OPENSEARCH="opensearch",e.ORACLEDB="oracledb",e.POSTGRES="postgres",e.RABBITMQ="rabbitmq",e.REDSHIFT="redshift",e.S3="s3",e.SNOWFLAKE="snowflake"}(i||(i={}));var c=(o={},(0,u.Z)(o,i.AMAZON_SQS,"Amazon SQS"),(0,u.Z)(o,i.API,"API"),(0,u.Z)(o,i.AZURE_BLOB_STORAGE,"Azure Blob Storage"),(0,u.Z)(o,i.AZURE_DATA_LAKE,"Azure Data Lake"),(0,u.Z)(o,i.AZURE_EVENT_HUB,"Azure Event Hub"),(0,u.Z)(o,i.BIGQUERY,"Google BigQuery"),(0,u.Z)(o,i.DRUID,"Druid"),(0,u.Z)(o,i.DUMMY,"Dummy"),(0,u.Z)(o,i.FILE,"Local file"),(0,u.Z)(o,i.GENERIC,"Generic (no template)"),(0,u.Z)(o,i.GOOGLE_CLOUD_PUBSUB,"Google Cloud PubSub"),(0,u.Z)(o,i.GOOGLE_CLOUD_STORAGE,"Google Cloud Storage"),(0,u.Z)(o,i.KAFKA,"Kafka"),(0,u.Z)(o,i.KINESIS,"Kinesis"),(0,u.Z)(o,i.MONGODB,"MongoDB"),(0,u.Z)(o,i.MYSQL,"MySQL"),(0,u.Z)(o,i.OPENSEARCH,"OpenSearch"),(0,u.Z)(o,i.ORACLEDB,"OracleDB"),(0,u.Z)(o,i.POSTGRES,"PostgreSQL"),(0,u.Z)(o,i.RABBITMQ,"RabbitMQ"),(0,u.Z)(o,i.REDSHIFT,"Amazon Redshift"),(0,u.Z)(o,i.S3,"Amazon S3"),(0,u.Z)(o,i.SNOWFLAKE,"Snowflake"),o),a=(r={},(0,u.Z)(r,l.tf.DATA_LOADER,[i.GENERIC,i.FILE,i.API,i.AZURE_BLOB_STORAGE,i.BIGQUERY,i.DRUID,i.GOOGLE_CLOUD_STORAGE,i.MYSQL,i.ORACLEDB,i.POSTGRES,i.REDSHIFT,i.S3,i.SNOWFLAKE]),(0,u.Z)(r,l.tf.DATA_EXPORTER,[i.GENERIC,i.FILE,i.S3,i.AZURE_BLOB_STORAGE,i.GOOGLE_CLOUD_STORAGE,i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.MYSQL,i.POSTGRES]),(0,u.Z)(r,l.tf.TRANSFORMER,[i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.POSTGRES]),(0,u.Z)(r,l.tf.SENSOR,[i.GENERIC,i.S3,i.REDSHIFT,i.BIGQUERY,i.SNOWFLAKE,i.MYSQL,i.POSTGRES]),r);n.ZP=i},73828:function(e,n,t){t.d(n,{JD:function(){return v},Lu:function(){return i},PF:function(){return p},d2:function(){return f},dT:function(){return u},n6:function(){return a},nB:function(){return h},oy:function(){return m},xF:function(){return d}});var o,r,i,u,l=t(82394),c=t(86422);!function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(i||(i={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(u||(u={}));var a=[i.PY,i.SQL],s=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),f=new RegExp(s.map((function(e){return".".concat(e,"$")})).join("|")),p="charts",m="pipelines",h=(o={},(0,l.Z)(o,i.MD,c.t6.MARKDOWN),(0,l.Z)(o,i.JSON,i.JSON),(0,l.Z)(o,i.PY,c.t6.PYTHON),(0,l.Z)(o,i.R,c.t6.R),(0,l.Z)(o,i.SQL,c.t6.SQL),(0,l.Z)(o,i.TXT,"text"),(0,l.Z)(o,i.YAML,c.t6.YAML),(0,l.Z)(o,i.YML,c.t6.YAML),o),v=(r={},(0,l.Z)(r,c.t6.MARKDOWN,i.MD),(0,l.Z)(r,c.t6.PYTHON,i.PY),(0,l.Z)(r,c.t6.R,i.R),(0,l.Z)(r,c.t6.SQL,i.SQL),(0,l.Z)(r,c.t6.YAML,i.YAML),(0,l.Z)(r,"text",i.TXT),r)},33572:function(e,n,t){var o;t.d(n,{z:function(){return o}}),function(e){e.GENERATE_BLOCK_WITH_DESCRIPTION="generate_block_with_description",e.GENERATE_COMMENT_FOR_BLOCK="generate_comment_for_block",e.GENERATE_DOC_FOR_BLOCK="generate_doc_for_block",e.GENERATE_DOC_FOR_PIPELINE="generate_doc_for_pipeline"}(o||(o={}))},46336:function(e,n,t){var o,r;t.d(n,{d:function(){return o},k:function(){return r}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2"}(o||(o={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}))},88859:function(e,n,t){t.d(n,{NX:function(){return h},Wt:function(){return m},_G:function(){return c},c1:function(){return p},d9:function(){return f}});var o,r,i,u,l,c,a=t(82394),s=t(80906),d=(s.Q0.AVERAGE,s.Q0.CLEAN_COLUMN_NAME,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.CUSTOM,s.Q0.DIFF,s.Q0.FIRST,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.IMPUTE,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.NORMALIZE,s.Q0.REFORMAT,s.Q0.REMOVE,s.Q0.REMOVE_OUTLIERS,s.Q0.SELECT,s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP,s.Q0.STANDARDIZE,s.Q0.SUM,[s.Q0.DROP_DUPLICATE,s.Q0.FILTER,s.Q0.SORT,s.Q0.REMOVE]);!function(e){e.AGGREGATE="Aggregate",e.FORMATTING="Formatting",e.COLUMN_REMOVAL="Column removal",e.SHIFT_ROWS="Shift rows in a column",e.MISC="Miscellaneous",e.FEATURE_SCALING="Feature Scaling"}(c||(c={}));var f=(r={},(0,a.Z)(r,s.qs.COLUMN,(o={},(0,a.Z)(o,c.AGGREGATE,[s.Q0.AVERAGE,s.Q0.COUNT,s.Q0.COUNT_DISTINCT,s.Q0.FIRST,s.Q0.LAST,s.Q0.MAX,s.Q0.MEDIAN,s.Q0.MIN,s.Q0.SUM]),(0,a.Z)(o,c.FORMATTING,[s.Q0.CLEAN_COLUMN_NAME,s.Q0.FIX_SYNTAX_ERRORS,s.Q0.REFORMAT]),(0,a.Z)(o,c.COLUMN_REMOVAL,[s.Q0.REMOVE,s.Q0.SELECT]),(0,a.Z)(o,c.SHIFT_ROWS,[s.Q0.SHIFT_DOWN,s.Q0.SHIFT_UP]),(0,a.Z)(o,c.MISC,[s.Q0.DIFF,s.Q0.IMPUTE,s.Q0.REMOVE_OUTLIERS]),(0,a.Z)(o,c.FEATURE_SCALING,[s.Q0.NORMALIZE,s.Q0.STANDARDIZE]),o)),(0,a.Z)(r,s.qs.ROW,(0,a.Z)({},c.MISC,[].concat(d))),r),p=Object.keys(f[s.qs.COLUMN]),m=[c.MISC],h=(l={},(0,a.Z)(l,s.qs.COLUMN,(i={},(0,a.Z)(i,s.Q0.ADD,"Add column"),(0,a.Z)(i,s.Q0.AVERAGE,"Aggregate by average value"),(0,a.Z)(i,s.Q0.CLEAN_COLUMN_NAME,"Clean column name"),(0,a.Z)(i,s.Q0.COUNT_DISTINCT,"Aggregate by distinct count"),(0,a.Z)(i,s.Q0.COUNT,"Aggregate by total count"),(0,a.Z)(i,s.Q0.DIFF,"Difference"),(0,a.Z)(i,s.Q0.FIRST,"Aggregate by first value"),(0,a.Z)(i,s.Q0.FIX_SYNTAX_ERRORS,"Fix syntax errors"),(0,a.Z)(i,s.Q0.IMPUTE,"Fill in missing values"),(0,a.Z)(i,s.Q0.NORMALIZE,"Normalize Data"),(0,a.Z)(i,s.Q0.STANDARDIZE,"Standardize Data"),(0,a.Z)(i,s.Q0.LAST,"Aggregate by last value"),(0,a.Z)(i,s.Q0.MAX,"Aggregate by maximum value"),(0,a.Z)(i,s.Q0.MEDIAN,"Aggregate by median value"),(0,a.Z)(i,s.Q0.MIN,"Aggregate by mininum value"),(0,a.Z)(i,s.Q0.REFORMAT,"Reformat"),(0,a.Z)(i,s.Q0.REMOVE_OUTLIERS,"Remove outliers"),(0,a.Z)(i,s.Q0.REMOVE,"Remove column(s)"),(0,a.Z)(i,s.Q0.SELECT,"Keep columns"),(0,a.Z)(i,s.Q0.SHIFT_DOWN,"Shift rows down in a column"),(0,a.Z)(i,s.Q0.SHIFT_UP,"Shift rows up in a column"),(0,a.Z)(i,s.Q0.SUM,"Aggregate by sum of values"),i)),(0,a.Z)(l,s.qs.ROW,(u={},(0,a.Z)(u,s.Q0.DROP_DUPLICATE,"Drop duplicates"),(0,a.Z)(u,s.Q0.FILTER,"Filter"),(0,a.Z)(u,s.Q0.SORT,"Sort"),(0,a.Z)(u,s.Q0.REMOVE,"Remove rows"),u)),l)},30264:function(e,n,t){var o=t(82394),r=t(26304),i=(t(82684),t(47999)),u=t(62084),l=t(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,o=e.open,a=e.onClickCallback,d=e.onClickOutside,f=e.parentRef,p=e.uuid,m=(0,r.Z)(e,c),h=(0,l.jsxs)("div",{style:{position:"relative",zIndex:d?3:2},children:[(0,l.jsx)("div",{ref:f,children:n}),(0,l.jsx)(u.Z,s(s({},m),{},{items:t,onClickCallback:a,open:o,parentRef:f,uuid:p}))]});return d?(0,l.jsx)(i.Z,{onClickOutside:d,open:!0,children:h}):h}},25717:function(e,n,t){var o=t(82394),r=t(26304),i=t(82684),u=t(38626),l=t(93461),c=t(67971),a=t(10919),s=t(86673),d=t(19711),f=t(82944),p=t(46261),m=t(49125),h=t(28598),v=["bold","defaultColor","description","disableWordBreak","fullWidth","inputValue","inputWidth","invertedTheme","label","labelColor","menuOpen","monospace","muted","onClick","notRequired","selectedTextProps","small","stacked","suffixValue","tooltipProps","value"];function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=u.default.div.withConfig({displayName:"LabelWithValueClicker__LabelStyle",componentId:"sc-1hzpn4h-0"})(["margin-bottom:","px;"],.25*m.iI),j=u.default.div.withConfig({displayName:"LabelWithValueClicker__DescriptionStyle",componentId:"sc-1hzpn4h-1"})([""]);n.Z=function(e){var n=e.bold,t=void 0===n||n,o=e.defaultColor,u=e.description,m=e.disableWordBreak,b=e.fullWidth,C=e.inputValue,_=e.inputWidth,O=e.invertedTheme,Z=e.label,y=e.labelColor,k=e.menuOpen,E=void 0!==k&&k,T=e.monospace,I=e.muted,S=e.onClick,R=e.notRequired,A=e.selectedTextProps,w=e.small,P=e.stacked,D=e.suffixValue,M=e.tooltipProps,N=e.value,L=(0,r.Z)(e,v),B=(0,i.useRef)(null),U=(0,i.useState)(!1),F=U[0],H=U[1],G=(0,i.useState)(!1),W=G[0],z=G[1],Q=Z&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(d.ZP,{bold:t,color:y,inverted:O,lineHeight:20,monospace:T,muted:I,small:w,children:Z}),M&&(0,h.jsx)(s.Z,{ml:1,children:(0,h.jsx)(p.Z,g({muted:!0},M))})]}),q=(0,h.jsxs)(l.Z,{flex:b?"1":"none",children:[N&&(0,h.jsx)(a.Z,{block:!0,danger:null===A||void 0===A?void 0:A.danger,fullWidth:!0,muted:I,onClick:function(){S(),B.current&&B.current.focus(),H(!0)},preventDefault:!0,sameColorAsText:I||!(null!==A&&void 0!==A&&A.primary)&&!(null!==A&&void 0!==A&&A.danger)&&!(null!==A&&void 0!==A&&A.warning),underline:null===A||void 0===A?void 0:A.underline,warning:null===A||void 0===A?void 0:A.warning,children:(0,h.jsx)(d.ZP,g(g({inverted:O,muted:I},A),{},{disableWordBreak:m,monospace:T,small:w,width:_,children:N}))}),(0,h.jsx)(f.Z,g(g({},L),{},{basic:!0,defaultColor:o,fullWidth:b,invertedTheme:O,monospace:T,onBlur:function(e){H(!1),L.onBlur&&L.onBlur(e),W||z(!0)},onFocus:function(e){H(!0),L.onFocus&&L.onFocus(e)},ref:B,small:w,value:C,visible:!N}))]}),K=u&&(0,h.jsx)(j,{children:(0,h.jsx)(d.ZP,{dangerouslySetInnerHTML:{__html:u},monospace:T,muted:!0,small:w})}),V=(0,i.useMemo)((function(){return(0,h.jsx)(d.ZP,{default:!0,small:w,children:D})}),[w,D]);return(0,h.jsxs)(h.Fragment,{children:[P&&(0,h.jsxs)(h.Fragment,{children:[Q&&(0,h.jsxs)(x,{children:[(0,h.jsx)(c.Z,{alignItems:"center",fullHeight:!1,fullWidth:!0,children:Q}),K]}),(0,h.jsxs)(c.Z,{fullWidth:b,children:[q,D&&V]})]}),!P&&(0,h.jsxs)(c.Z,{alignItems:"center",fullWidth:!0,children:[Q&&(0,h.jsxs)(h.Fragment,{children:[Q,(0,h.jsx)(s.Z,{ml:1})]}),q,D&&V]}),W&&!F&&!N&&!E&&!R&&(0,h.jsx)(d.ZP,{danger:!0,small:w,children:"This field is required."})]})}},29237:function(e,n,t){var o=t(38626),r=t(67971),i=t(86673),u=t(19711),l=t(23831),c=t(73942),a=t(37391),s=t(49125),d=t(28598),f=(0,o.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),p=o.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],c.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=o.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],c.n_,c.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),h=o.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=o.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,o=e.containerRef,l=e.contentContainerRef,c=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,b=e.fullWidth,g=void 0===b||b,x=e.header,j=e.headerHeight,C=e.headerIcon,_=e.headerPaddingVertical,O=e.headerTitle,Z=e.maxHeight,y=e.maxWidth,k=e.minWidth,E=e.noPadding,T=e.overflowVisible,I=e.subtitle,S=e.success;return(0,d.jsxs)(p,{borderless:n,dark:c,fullHeight:f,fullWidth:g,maxHeight:Z,maxWidth:y,minWidth:k,overflowVisible:T,ref:o,success:S,children:[(x||O)&&(0,d.jsxs)(m,{headerPaddingVertical:_,height:j,children:[x&&x,O&&(0,d.jsx)(r.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(r.Z,{alignItems:"center",children:[C&&C,(0,d.jsx)(i.Z,{ml:C?1:0,children:(0,d.jsx)(u.ZP,{bold:!0,default:!0,children:O})})]})})]}),(0,d.jsxs)(h,{maxHeight:Z,noPadding:E,overflowVisible:T,ref:l,children:[I&&(0,d.jsx)(i.Z,{mb:2,children:(0,d.jsx)(u.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},66176:function(e,n,t){var o=t(82394),r=t(91835),i=(t(82684),t(38626)),u=t(23831),l=t(73942),c=t(49125),a=t(28598);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],l.BG,.75*c.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||u.Z.monotone).grey200,";\n ")})),p=i.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||u.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,r.Z)({},e);return(0,a.jsx)(f,d(d({},n),{},{children:(0,a.jsx)(p,d({},n))}))}},11366:function(e,n,t){t.d(n,{Ch:function(){return u},H8:function(){return o},Tz:function(){return l},g6:function(){return r},vF:function(){return i}});var o="pipeline_edit_before_tab_selected",r="pipeline_edit_hidden_blocks",i="pipeline_edit_block_output_logs",u="setup_ai_later",l="auto_scroll_logs"},29499:function(e,n,t){var o=t(75582),r=t(82684),i=t(34376),u=t(60328),l=t(67971),c=t(29237),a=t(86673),s=t(19711),d=t(99497),f=t(28598);n.Z=function(e){var n=e.shouldWarn,t=e.warningMessage,p=(0,i.useRouter)(),m=(0,r.useState)(!1),h=m[0],v=m[1],b=(0,r.useState)({isModalOpen:!1,nextRoute:null}),g=b[0],x=b[1];(0,r.useEffect)((function(){var e=function(e){if(n)return e.preventDefault(),(e||window.event).returnValue="Are you sure you want to leave?"};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}),[n]),(0,r.useEffect)((function(){var e=function(e){if(n&&!h)throw x({isModalOpen:!0,nextRoute:e}),p.events.emit("routeChangeError"),"navigation aborted"};p.events.on("routeChangeStart",e);var t=function(){return p.events.off("routeChangeStart",e)};if(h){if(!g.nextRoute)return;return p.push(g.nextRoute),t}return t}),[g,h,p,n]);var j=(0,d.dd)((function(){return(0,f.jsxs)(c.Z,{children:[(0,f.jsx)(s.ZP,{children:t}),(0,f.jsx)(a.Z,{mt:2,children:(0,f.jsxs)(l.Z,{alignItems:"center",children:[(0,f.jsx)(u.Z,{onClick:function(){return v(!0)},primary:!0,children:"Leave"}),(0,f.jsx)(a.Z,{mr:1}),(0,f.jsx)(u.Z,{onClick:function(){x({isModalOpen:!1,nextRoute:null})},secondary:!0,children:"Cancel"})]})})]})}),{},[t],{background:!0,hideCallback:function(){x({isModalOpen:!1,nextRoute:null})},uuid:"stale_pipeline_message"}),C=(0,o.Z)(j,2),_=C[0],O=C[1];(0,r.useEffect)((function(){g.isModalOpen?_():O()}),[O,g.isModalOpen,_]);return{ConfirmLeaveModal:function(){return(0,f.jsx)("div",{})}}}},87323:function(e,n,t){t.d(n,{cU:function(){return u}});var o=t(82684),r=t(24224);function i(e,n){return function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{includeAllNodes:!1},i=(0,r.HK)(t,(function(e){return e.uuid})),u=(o||{}).includeAllNodes,l=[];function c(t){if(t){var o=(t[n]||[]).reduce((function(n,t){return e.uuid===t?n:n.concat(i[t])}),[]);(0===o.length||u&&e.uuid!==t.uuid)&&l.push(t),o.forEach((function(e){c(e)}))}}return c(e),l}(e,"upstream_blocks",n,{includeAllNodes:!0})}function u(e,n){return(0,o.useMemo)((function(){return e.map((function(t){var o=function(e,n){var t=i(e,n),o=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.dynamic)&&o!==(null===e||void 0===e?void 0:e.uuid)})),r=t.filter((function(n){var t=n.configuration,o=n.uuid;return(null===t||void 0===t?void 0:t.reduce_output)&&o!==(null===e||void 0===e?void 0:e.uuid)}));return{dynamicUpstreamBlock:o[0],dynamicUpstreamBlocks:o,reduceOutputUpstreamBlock:r[0],reduceOutputUpstreamBlocks:r}}(t,n),r=o.dynamicUpstreamBlock,u=o.dynamicUpstreamBlocks,l=o.reduceOutputUpstreamBlock,c=o.reduceOutputUpstreamBlocks,a=(t||{}).configuration||{},s=a.dynamic,d=a.reduce_output;return{block:t,blocksToUse:e,dynamic:!!s,dynamicUpstreamBlock:r,dynamicUpstreamBlocks:u,reduceOutput:!!d,reduceOutputUpstreamBlock:l,reduceOutputUpstreamBlocks:c}}))}),[n,null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.dynamic})),null===n||void 0===n?void 0:n.map((function(e){var n=e.configuration;return null===n||void 0===n?void 0:n.reduce_output})),null===n||void 0===n?void 0:n.map((function(e){return e.upstream_blocks}))])}},35033:function(e,n,t){t.d(n,{Gr:function(){return r},Lz:function(){return o},Vc:function(){return u},gr:function(){return i}});var o=/\[__internal_output__\]/,r=/\[__internal_test__\]/,i="[__internal_output__]",u="[__internal_test__]"},54405:function(e,n,t){var o;t.d(n,{V5:function(){return i}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(o||(o={}));var r=o;function i(){return function(){var e,n,t,o,i,u,l,c=r.MAC,a=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,s=(null===(t=window)||void 0===t||null===(o=t.navigator)||void 0===o||null===(i=o.userAgentData)||void 0===i?void 0:i.platform)||(null===(u=window)||void 0===u||null===(l=u.navigator)||void 0===l?void 0:l.platform);return s?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(s)?c=r.MAC:["Win32","Win64","Windows","WinCE"].includes(s)?c=r.WINDOWS:["iPhone","iPad","iPod"].includes(s)&&(c=r.IOS):a&&(a.includes("Macintosh")?c=r.MAC:a.includes("Windows")?c=r.WINDOWS:a.includes("Linux")&&a.includes("X11")?c=r.LINUX:/(iPhone|iPad)/.test(a)?c=r.IOS:a.includes("Android")&&a.includes("Mobi")?c=r.ANDROID:a.includes("CrOS")&&(c=r.CHROME_OS)),c}()===r.MAC}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2485],{2485:function(e,n,t){var i=t(21831),l=t(82394),u=t(82684),o=t(38626),r=t(34376),d=t(28413),c=t(60328),s=t(32316),a=t(18908),p=t(67971),h=t(49666),m=t(86673),v=t(54283),j=t(55264),x=t(62749),f=t(19711),b=t(82531),g=t(22341),Z=t(38639),y=t(27337),k=t(33766),C=t(24141),w=t(28598);function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,l=e.defaultLinkUUID,I=e.defaultTab,O=e.objectType,T=e.onClickCustomTemplate,_=e.pipelineUUID,U=e.showAddingNewTemplates,M=e.showBreadcrumbs,A=e.tabs,S=(0,r.useRouter)(),N=(0,u.useContext)(o.ThemeContext),D=(0,C.i)(),R=D.height,q=D.width,E=(0,u.useMemo)((function(){return A||y.dP}),[A]),F=(0,u.useState)(U||!1),z=F[0],B=F[1],L=(0,u.useState)(l?y.qy.find((function(e){return e.uuid===l})):y.qy[0]),G=L[0],Y=L[1],H=(0,u.useState)(I?E.find((function(e){return e.uuid===(null===I||void 0===I?void 0:I.uuid)})):E[0]),W=H[0],X=H[1],J=(0,u.useState)(null),K=J[0],Q=J[1],V=b.ZP.custom_templates.list({object_type:a.Z},{},{pauseFetch:y.n9.uuid!==(null===W||void 0===W?void 0:W.uuid)}),$=V.data,ee=V.mutate,ne=(0,u.useMemo)((function(){var e=(null===$||void 0===$?void 0:$.custom_templates)||[];return null!==G&&void 0!==G&&G.filterTemplates?null===G||void 0===G?void 0:G.filterTemplates(e):e}),[$,G]),te=b.ZP.custom_templates.list({object_type:a.R},{},{pauseFetch:y.A2.uuid!==(null===W||void 0===W?void 0:W.uuid)}),ie=te.data,le=te.mutate,ue=(0,u.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==G&&void 0!==G&&G.filterTemplates?null===G||void 0===G?void 0:G.filterTemplates(e):e}),[ie,G]),oe=(0,u.useMemo)((function(){return y.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,l=e.selectedIconProps,u=e.uuid,o=(null===G||void 0===G?void 0:G.uuid)===u,r=P({size:Z.ZG},o&&l?l:{});return(0,w.jsx)(Z.wj,{onClick:function(){return Y(e)},selected:o,children:(0,w.jsxs)(p.Z,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:o&&i?i(N):null,children:n?(0,w.jsx)(n,P({},r)):(0,w.jsx)(g.pd,P({},r))}),(0,w.jsx)(f.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[G,N]),re=(0,u.useMemo)((function(){return y.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,l=e.selectedIconProps,u=e.uuid,o=(null===G||void 0===G?void 0:G.uuid)===u,r=P({size:Z.ZG},o&&l?l:{});return(0,w.jsx)(Z.wj,{onClick:function(){return Y(e)},selected:o,children:(0,w.jsxs)(p.Z,{alignItems:"center",children:[(0,w.jsx)(Z.ze,{backgroundColor:o&&i?i(N):null,children:n?(0,w.jsx)(n,P({},r)):(0,w.jsx)(g.pd,P({},r))}),(0,w.jsx)(f.ZP,{bold:!0,large:!0,children:t?t():u})]})},u)}))}),[G,N]),de=(0,u.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,l=e.tags,u=e.template_uuid,o=e.user,r=[];return null!==l&&void 0!==l&&l.length?r.push.apply(r,(0,i.Z)(l)):null!==o&&void 0!==o&&o.username&&r.push(null===o||void 0===o?void 0:o.username),(0,w.jsxs)(Z.UE,{onClick:function(){T?T(e):S.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u)))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(f.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(f.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===r||void 0===r?void 0:r.length)>=1&&(0,w.jsx)(j.Z,{tags:null===r||void 0===r?void 0:r.map((function(e){return{uuid:e}}))})})]},u)}))}),[ne,T,S]),ce=(0,u.useMemo)((function(){return null===ue||void 0===ue?void 0:ue.map((function(e){var n=e.description,t=e.name,l=e.tags,u=e.template_uuid,o=e.user,r=[];return null!==l&&void 0!==l&&l.length?r.push.apply(r,(0,i.Z)(l)):null!==o&&void 0!==o&&o.username&&r.push(null===o||void 0===o?void 0:o.username),(0,w.jsxs)(Z.UE,{onClick:function(){T?T(e):S.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(u),"?object_type=").concat(a.R))},children:[(0,w.jsx)(Z.Tj,{children:(0,w.jsx)(f.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||u})}),(0,w.jsx)(Z.SL,{children:(0,w.jsx)(f.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,w.jsx)(Z.EN,{children:(null===r||void 0===r?void 0:r.length)>=1&&(0,w.jsx)(j.Z,{tags:null===r||void 0===r?void 0:r.map((function(e){return{uuid:e}}))})})]},u)}))}),[ue,T,S]),se=(0,u.useMemo)((function(){if(!M)return null;var e=[];return z?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){B(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,w.jsx)(Z.FX,{children:(0,w.jsx)(d.Z,{breadcrumbs:e})})}),[z,M]),ae=(0,u.useMemo)((function(){return M?36:0}),[M]),pe=(0,u.useMemo)((function(){return R-ae}),[R,ae]);if(z)return n=a.R===O&&_?(0,w.jsx)(h.Z,{onMutateSuccess:le,pipelineUUID:_,templateAttributes:G&&(null===G||void 0===G?void 0:G.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{pipeline_type:null===G||void 0===G?void 0:G.uuid}:null,templateUUID:null===K||void 0===K?void 0:K.template_uuid}):(0,w.jsx)(x.Z,{contained:t,heightOffset:ae,onCreateCustomTemplate:t?function(e){Q(e)}:null,onMutateSuccess:ee,templateAttributes:G&&(null===G||void 0===G?void 0:G.uuid)!==(null===y.qy||void 0===y.qy?void 0:y.qy[0].uuid)?{block_type:null===G||void 0===G?void 0:G.uuid}:null,templateUUID:null===K||void 0===K?void 0:K.template_uuid}),t?(0,w.jsxs)(w.Fragment,{children:[M&&se,(0,w.jsx)(Z.Rd,{height:pe,width:q,children:n})]}):n;var he=(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?X(e):(0,k.u7)({object_type:y.A2.uuid===e.uuid?a.R:a.Z})},selectedTabUUID:null===W||void 0===W?void 0:W.uuid,tabs:E})}),(0,w.jsxs)(Z.wl,{contained:t,heightOffset:ae,children:[y.n9.uuid===(null===W||void 0===W?void 0:W.uuid)&&oe,y.A2.uuid===(null===W||void 0===W?void 0:W.uuid)&&re]})]}),(0,w.jsxs)(Z.w5,{children:[y.n9.uuid===(null===W||void 0===W?void 0:W.uuid)&&(0,w.jsx)(Z.HS,{children:(0,w.jsx)(c.Z,{beforeIcon:(0,w.jsx)(g.mm,{size:Z.ZG}),onClick:function(){B(!0)},primary:!0,children:"New block template"})}),y.n9.uuid===(null===W||void 0===W?void 0:W.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!$&&(0,w.jsx)(m.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),$&&!(null!==de&&void 0!==de&&de.length)&&(0,w.jsxs)(m.Z,{p:2,children:[(0,w.jsx)(f.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(f.ZP,{children:"Add a new template by clicking the button above."})]}),(null===de||void 0===de?void 0:de.length)>=1&&(0,w.jsx)(Z.n8,{children:de})]}),y.A2.uuid===(null===W||void 0===W?void 0:W.uuid)&&(0,w.jsxs)(w.Fragment,{children:[!ie&&(0,w.jsx)(m.Z,{p:2,children:(0,w.jsx)(v.Z,{inverted:!0})}),ie&&!(null!==ce&&void 0!==ce&&ce.length)&&(0,w.jsxs)(m.Z,{p:2,children:[(0,w.jsx)(f.ZP,{children:"There are currently no templates matching your search."}),(0,w.jsx)("br",{}),(0,w.jsx)(f.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})]})]})]});return t?(0,w.jsxs)(w.Fragment,{children:[M&&se,(0,w.jsx)(Z.Rd,{height:pe,width:q,children:he})]}):he}},55264:function(e,n,t){var i=t(82684),l=t(79891),u=t(67971),o=t(19711),r=t(24224),d=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,c=void 0===t?[]:t,s=(0,i.useMemo)((function(){return(null===c||void 0===c?void 0:c.length)||0}),[c]),a=(0,i.useMemo)((function(){return(0,r.YC)(c||[],"uuid")}),[c]);return(0,d.jsx)(u.Z,{alignItems:"center",flexWrap:"wrap",children:null===a||void 0===a?void 0:a.reduce((function(e,t){return e.push((0,d.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,d.jsx)(l.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,d.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},79891:function(e,n,t){var i=t(38626),l=t(60328),u=t(67971),o=t(86673),r=t(19711),d=t(23831),c=t(22341),s=t(49125),a=t(31012),p=t(28598),h=i.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||d.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||d.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+a.Al)/2,"px;\n height: ").concat(1.5*s.iI+a.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+a.Al)/2,"px;\n height: ").concat(a.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||d.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,i=e.disabled,d=e.label,a=e.onClick,m=e.primary,v=e.small;return(0,p.jsx)(h,{border:n,primary:m,small:v,children:(0,p.jsx)(l.Z,{basic:!0,disabled:i,noBackground:!0,noPadding:!0,onClick:a,transparent:!0,children:(0,p.jsxs)(u.Z,{alignItems:"center",children:[t,d&&(0,p.jsx)(r.ZP,{small:v,children:d}),!i&&a&&(0,p.jsx)(o.Z,{ml:1,children:(0,p.jsx)(c.x8,{default:m,muted:!m,size:v?s.iI:1.25*s.iI})})]})})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2786],{27125:function(n,e,t){var o=t(75582),u=t(82684),i=t(12691),r=t.n(i),c=t(34376),l=t.n(c),a=t(38626),s=t(83455),d=t(35490),p=t(66050),f=t(60328),v=t(16634),b=t(67971),h=t(10919),O=t(98781),j=t(86673),m=t(87815),g=t(19711),x=t(46261),Z=t(82531),_=t(73828),y=t(94353),P=t(22341),k=t(49125),T=t(44162),L=t(24224),w=t(96510),S=t(43482),D=t(28598);e.Z=function(n){var e=n.blockRuns,t=n.onClickRow,i=n.pipeline,c=n.selectedRun,C=n.setErrors,R=(0,u.useContext)(a.ThemeContext),M=(0,u.useState)(null),E=M[0],N=M[1],A=(0,u.useState)(null),I=A[0],Y=A[1],V=i||{},Q=V.uuid,U=V.type,F=(0,u.useMemo)((function(){return i.blocks||[]}),[i]),B=(0,u.useMemo)((function(){return(0,L.HK)(F,(function(n){return n.uuid}))}),[F]),H=(0,u.useMemo)((function(){return O.qL.INTEGRATION===U}),[U]),J=(0,u.useMemo)((function(){return O.qL.PYTHON===U}),[U]),K=(0,u.useMemo)((function(){var n,e;return null===(n=new d.Z)||void 0===n||null===(e=n.decodedToken)||void 0===e?void 0:e.token}),[]),q=(0,s.Db)((function(n){var e=n.blockUUID,t=n.pipelineRunId;return Z.ZP.block_outputs.pipelines.downloads.detailAsync(null===i||void 0===i?void 0:i.uuid,e,{pipeline_run_id:t,token:K},{onDownloadProgress:function(n){return N((Number((null===n||void 0===n?void 0:n.loaded)||0)/1e6).toFixed(3))},responseType:y.E.BLOB})}),{onSuccess:function(n){return(0,w.wD)(n,{callback:function(n){Y(null),(0,S.uS)(n,"block_output.".concat(_.Lu.CSV))},onErrorCallback:function(n,e){return null===C||void 0===C?void 0:C({errors:e,response:n})}})}}),X=(0,o.Z)(q,2),z=X[0],G=X[1].isLoading,W=[{uuid:"Date"},{uuid:"Status"},{uuid:"Trigger"},{uuid:"Block"},{uuid:"Completed"},{uuid:"Logs"}];return J&&W.push({uuid:"Output"}),(0,D.jsx)(m.Z,{columnFlex:[null,1,3,2,null,null,null],columns:W,isSelectedRow:function(n){return e[n].id===(null===c||void 0===c?void 0:c.id)},onClickRow:t,rows:null===e||void 0===e?void 0:e.map((function(n){var e,t,o,u,i=n||{},c=i.block_uuid,a=i.completed_at,s=i.created_at,d=i.id,O=i.pipeline_run_id,m=i.pipeline_schedule_id,Z=i.pipeline_schedule_name,_=i.status,y=c,L=y.split(":"),w=I===d&&G;H&&(y=L[0],o=L[1],u=L[2]);var S=B[y];S||(S=B[L[0]]);var C=[(0,D.jsx)(g.ZP,{default:!0,monospace:!0,children:s},"".concat(d,"_created_at")),(0,D.jsx)(g.ZP,{danger:p.V.FAILED===_,default:p.V.CANCELLED===_,info:p.V.INITIAL===_,monospace:!0,success:p.V.COMPLETED===_,warning:p.V.RUNNING===_,children:_},"".concat(d,"_status")),(0,D.jsx)(r(),{as:"/pipelines/".concat(Q,"/triggers/").concat(m),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,D.jsx)(h.Z,{bold:!0,sameColorAsText:!0,children:Z})},"".concat(d,"_trigger")),(0,D.jsx)(r(),{as:"/pipelines/".concat(Q,"/edit?block_uuid=").concat(y),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsxs)(h.Z,{bold:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,D.jsx)(v.Z,{color:(0,T.qn)(null===(e=S)||void 0===e?void 0:e.type,{blockColor:null===(t=S)||void 0===t?void 0:t.color,theme:R}).accent,size:1.5*k.iI,square:!0}),(0,D.jsx)(j.Z,{mr:1}),(0,D.jsxs)(g.ZP,{monospace:!0,children:[y,o&&": ",o&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:o}),u>=0&&": ",u>=0&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u})]})]})},"".concat(d,"_block_uuid")),(0,D.jsx)(g.ZP,{default:!0,monospace:!0,children:a||"-"},"".concat(d,"_completed_at")),(0,D.jsx)(f.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(Q,"/logs?block_run_id[]=").concat(d))},children:(0,D.jsx)(P.B4,{default:!0,size:2*k.iI})},"".concat(d,"_logs"))];return J&&C.push((0,D.jsx)(b.Z,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(x.Z,{appearBefore:!0,autoHide:!w,block:!0,forceVisible:w,label:w?"".concat(E||0,"mb downloaded..."):"Save block run output as CSV file",size:null,widthFitContent:!0,children:(0,D.jsx)(f.Z,{default:!0,disabled:!J||!(p.V.COMPLETED===_)||G,iconOnly:!0,loading:w,noBackground:!0,onClick:function(){N(null),Y(d),z({blockUUID:y,pipelineRunId:O})},children:(0,D.jsx)(P.vc,{default:!0,size:2*k.iI})})})},"".concat(d,"_save_output"))),C})),uuid:"block-runs"})}},43482:function(n,e,t){t.d(e,{Dp:function(){return f},OF:function(){return v},Q9:function(){return h},Rt:function(){return s},h8:function(){return b},k1:function(){return d},uS:function(){return O}});var o=t(21831),u=t(82394),i=t(91427),r=t(24224),c=t(90211);function l(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 a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function s(n){var e={},t={};return null===n||void 0===n||n.forEach((function(n){var o=n.content,u=n.outputs,i=n.type,r=n.uuid;(null===u||void 0===u?void 0:u.length)>=1&&(e[r]=u.map((function(n){var e=n||{},t=e.sample_data,o=e.shape,u=e.text_data,i=e.type;return t?{data:a({shape:o},t),type:i}:u&&(0,c.Pb)(u)?JSON.parse(u):u}))),t[i]||(t[i]={}),t[i][r]=o})),{content:t,messages:e}}function d(n,e,t){n.forEach((function(n){(0,i.t8)("".concat(t,"/").concat(n.uuid,"/codeCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/codeCollapsed"))),(0,i.t8)("".concat(t,"/").concat(n.uuid,"/outputCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/outputCollapsed")))}))}function p(n){return"".concat(n,"/").concat(i.kP)}function f(n){return(0,i.U2)(p(n),[])}function v(n,e){var t=f(n);t.includes(e)||(0,i.t8)(p(n),[].concat((0,o.Z)(t),[e]))}function b(n,e){var t=f(n).filter((function(n){return n!==e}));(0,i.t8)(p(n),t)}function h(n,e){var t=(0,r.HK)(e,(function(n){return n.uuid}));return n.map((function(n){return t[n]})).filter((function(n){return!!n}))}var O=function(n,e){var t=window.URL.createObjectURL(n),o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),o.remove()}},56681:function(n,e,t){t.d(e,{G7:function(){return Z},ZP:function(){return _},u$:function(){return m}});var o=t(75582),u=t(82394),i=t(26304),r=t(32316),c=t(22673),l=t(48952),a=t(86673),s=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(7715),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function O(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 j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var m=76,g={uuid:"Run details"},x={uuid:"Dependency tree"},Z=[x,g];function _(n){var e=n.height,t=n.heightOffset,u=n.pipeline,O=n.selectedRun,_=n.selectedTab,y=n.setSelectedTab,P=j({},(0,i.Z)(n,h));O?P.blockStatus=(0,f.IJ)(null===O||void 0===O?void 0:O.block_runs):P.noStatus=!0;var k=(0,v.Kn)(null===O||void 0===O?void 0:O.variables)?j({},null===O||void 0===O?void 0:O.variables):(null===O||void 0===O?void 0:O.variables)||{},T=null===O||void 0===O?void 0:O.event_variables;if(T&&(0,v.Kn)(T)&&!(0,v.Qr)(T))if((0,v.Kn)(k)&&k.hasOwnProperty("event")){var L=(0,v.Kn)(k.event)?k.event:{};k.event=j(j({},L),T)}else k.event=j({},T);var w=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(n){w.push(" ".concat(n))}));var S=O&&[["Run ID",null===O||void 0===O?void 0:O.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:w.join("\n")},"variable_value")]],D=O&&(0,b.jsx)(a.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(n){return 1===n?"100px":null},rows:S.map((function(n,e){var t=(0,o.Z)(n,2),u=t[0],i=t[1];return[(0,b.jsx)(s.ZP,{monospace:!0,muted:!0,children:u},"key_".concat(e)),(0,b.jsx)(s.ZP,{monospace:!0,textOverflow:!0,children:i},"val_".concat(e))]})),uuid:"LogDetail"})}),C=_&&y;return(0,b.jsxs)(b.Fragment,{children:[C&&(0,b.jsx)(a.Z,{py:p.cd,children:(0,b.jsx)(r.Z,{onClickTab:y,selectedTabUUID:null===_||void 0===_?void 0:_.uuid,tabs:Z})}),(!C||x.uuid===(null===_||void 0===_?void 0:_.uuid))&&(0,b.jsx)(l.Z,j(j({},P),{},{height:e,heightOffset:(t||0)+(C?m:0),pipeline:u})),g.uuid===(null===_||void 0===_?void 0:_.uuid)&&D]})}},73828:function(n,e,t){t.d(e,{JD:function(){return h},Lu:function(){return i},PF:function(){return f},d2:function(){return p},dT:function(){return r},n6:function(){return a},nB:function(){return b},oy:function(){return v},xF:function(){return d}});var o,u,i,r,c=t(82394),l=t(86422);!function(n){n.CSV="csv",n.JSON="json",n.MD="md",n.PY="py",n.R="r",n.SQL="sql",n.TXT="txt",n.YAML="yaml",n.YML="yml"}(i||(i={})),function(n){n.INIT_PY="__init__.py",n.METADATA_YAML="metadata.yaml",n.REQS_TXT="requirements.txt"}(r||(r={}));var a=[i.PY,i.SQL],s=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),p=new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),f="charts",v="pipelines",b=(o={},(0,c.Z)(o,i.MD,l.t6.MARKDOWN),(0,c.Z)(o,i.JSON,i.JSON),(0,c.Z)(o,i.PY,l.t6.PYTHON),(0,c.Z)(o,i.R,l.t6.R),(0,c.Z)(o,i.SQL,l.t6.SQL),(0,c.Z)(o,i.TXT,"text"),(0,c.Z)(o,i.YAML,l.t6.YAML),(0,c.Z)(o,i.YML,l.t6.YAML),o),h=(u={},(0,c.Z)(u,l.t6.MARKDOWN,i.MD),(0,c.Z)(u,l.t6.PYTHON,i.PY),(0,c.Z)(u,l.t6.R,i.R),(0,c.Z)(u,l.t6.SQL,i.SQL),(0,c.Z)(u,l.t6.YAML,i.YAML),(0,c.Z)(u,"text",i.TXT),u)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3654],{44162:function(n,t,e){e.d(t,{HC:function(){return T},Kf:function(){return f},Nk:function(){return s},PY:function(){return p},gE:function(){return g},jv:function(){return h},nz:function(){return m},oh:function(){return l},qn:function(){return d},t1:function(){return A},y9:function(){return y}});var r=e(38626),o=e(23831),i=e(86422),c=e(73942),a=e(49125),u=e(90880),l=68;function d(n,t){var e,r,c=((null===t||void 0===t||null===(e=t.theme)||void 0===e?void 0:e.borders)||o.Z.borders).light,a=((null===t||void 0===t||null===(r=t.theme)||void 0===r?void 0:r.monotone)||o.Z.monotone).grey500,u=t||{},l=u.blockColor,d=u.isSelected,f=u.theme;return d?c=(f||o.Z).content.active:i.tf.TRANSFORMER===n||l===i.Lq.PURPLE?(c=(f||o.Z).accent.purple,a=(f||o.Z).accent.purpleLight):i.tf.DATA_EXPORTER===n||l===i.Lq.YELLOW?(c=(f||o.Z).accent.yellow,a=(f||o.Z).accent.yellowLight):i.tf.DATA_LOADER===n||l===i.Lq.BLUE?(c=(f||o.Z).accent.blue,a=(f||o.Z).accent.blueLight):i.tf.MARKDOWN===n?(c=(f||o.Z).accent.sky,a=(f||o.Z).accent.skyLight):i.tf.SENSOR===n||l===i.Lq.PINK?(c=(f||o.Z).accent.pink,a=(f||o.Z).accent.pinkLight):i.tf.DBT===n?(c=(f||o.Z).accent.dbt,a=(f||o.Z).accent.dbtLight):i.tf.EXTENSION===n||l===i.Lq.TEAL?(c=((null===f||void 0===f?void 0:f.accent)||o.Z.accent).teal,a=((null===f||void 0===f?void 0:f.accent)||o.Z.accent).tealLight):i.tf.CALLBACK===n?(c=((null===f||void 0===f?void 0:f.accent)||o.Z.accent).rose,a=((null===f||void 0===f?void 0:f.accent)||o.Z.accent).roseLight):i.tf.CONDITIONAL===n||i.tf.SCRATCHPAD===n||l===i.Lq.GREY||i.tf.CUSTOM===n&&!l?(c=(f||o.Z).content.default,a=(f||o.Z).accent.contentDefaultTransparent):i.tf.GLOBAL_DATA_PRODUCT!==n||l||(c=(f||o.Z).monotone.white,a=(f||o.Z).monotone.whiteTransparent),{accent:c,accentLight:a}}var f=(0,r.css)([""," "," "," "," "," "," ",""],(0,u.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(d(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(d(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||o.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||o.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 "})),s=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),p=r.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],f,c.n_,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme||o.Z).background.content,";\n\n &:hover {\n border-color: ").concat(d(n.blockType,n).accent,";\n }\n ")})),m=r.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-2"})([""," 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:","px;position:sticky;top:-5px;"," "," ",""],f,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,a.iI,(function(n){return"\n background-color: ".concat((n.theme||o.Z).background.content,";\n ")}),(function(n){return n.bottomBorder&&"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((n.theme||o.Z).borders.medium2,";\n ")}),(function(n){return n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-3"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;position:relative;"," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],f,c.M8,c.mP,c.M8,c.mP,a.iI,a.iI,(function(n){return"\n background-color: ".concat((n.theme.background||o.Z.background).codeTextarea,";\n ")}),(function(n){return n.lightBackground&&"\n background-color: ".concat((n.theme||o.Z).background.content,";\n ")}),(function(n){return!n.hasOutput&&"\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 ")})),g=r.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-4"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;bottom:","px;&:hover{"," .block-divider-inner{","}}"],2*a.iI,.5*a.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||o.Z.text).fileBrowser,";\n ")})),A=r.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-5"})(["height 1px;width:100%;position:absolute;z-index:-1;top:","px;"],1.5*a.iI),y=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-6"})(["margin-bottom:","px;padding-bottom:","px;",""],1*a.iI,1*a.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||o.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?a.iI:l,"px;\n ")})),T=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-7"})(["bottom:","px;left:","px;position:absolute;"],1*a.iI,l)},86422:function(n,t,e){e.d(t,{$W:function(){return A},DA:function(){return h},HX:function(){return b},J8:function(){return T},L8:function(){return a},LE:function(){return s},Lq:function(){return p},M5:function(){return m},Qj:function(){return R},Ut:function(){return S},V4:function(){return O},VZ:function(){return y},dO:function(){return f},f2:function(){return N},iZ:function(){return E},t6:function(){return u},tf:function(){return d}});var r,o,i,c,a,u,l=e(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"}(a||(a={})),function(n){n.MARKDOWN="markdown",n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(u||(u={}));var d,f=(r={},(0,l.Z)(r,u.MARKDOWN,"MD"),(0,l.Z)(r,u.PYTHON,"PY"),(0,l.Z)(r,u.R,"R"),(0,l.Z)(r,u.SQL,"SQL"),(0,l.Z)(r,u.YAML,"YAML"),r),s=(o={},(0,l.Z)(o,u.MARKDOWN,"Markdown"),(0,l.Z)(o,u.PYTHON,"Python"),(0,l.Z)(o,u.R,"R"),(0,l.Z)(o,u.SQL,"SQL"),(0,l.Z)(o,u.YAML,"YAML"),o);!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"}(d||(d={}));var p,m=[d.CALLBACK,d.CONDITIONAL,d.EXTENSION];!function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(p||(p={}));var h,g,A=[d.CHART,d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.SCRATCHPAD,d.SENSOR,d.MARKDOWN,d.TRANSFORMER],y=[d.DATA_EXPORTER,d.DATA_LOADER],T=[d.DATA_EXPORTER,d.DATA_LOADER,d.TRANSFORMER],b=[d.DATA_EXPORTER,d.DATA_LOADER,d.DBT,d.TRANSFORMER],R=[d.CHART,d.SCRATCHPAD,d.SENSOR,d.MARKDOWN],E=[d.CALLBACK,d.CHART,d.EXTENSION,d.SCRATCHPAD,d.MARKDOWN];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(h||(h={})),function(n){n.BLOCK_FILE="block_file",n.CUSTOM_BLOCK_TEMPLATE="custom_block_template",n.MAGE_TEMPLATE="mage_template"}(g||(g={}));var N=[d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.TRANSFORMER],O=(i={},(0,l.Z)(i,d.CALLBACK,"Callback"),(0,l.Z)(i,d.CHART,"Chart"),(0,l.Z)(i,d.CONDITIONAL,"Conditional"),(0,l.Z)(i,d.CUSTOM,"Custom"),(0,l.Z)(i,d.DATA_EXPORTER,"Data exporter"),(0,l.Z)(i,d.DATA_LOADER,"Data loader"),(0,l.Z)(i,d.DBT,"DBT"),(0,l.Z)(i,d.EXTENSION,"Extension"),(0,l.Z)(i,d.GLOBAL_DATA_PRODUCT,"Global data product"),(0,l.Z)(i,d.MARKDOWN,"Markdown"),(0,l.Z)(i,d.SCRATCHPAD,"Scratchpad"),(0,l.Z)(i,d.SENSOR,"Sensor"),(0,l.Z)(i,d.TRANSFORMER,"Transformer"),i),S=[d.DATA_LOADER,d.TRANSFORMER,d.DATA_EXPORTER,d.SENSOR];c={},(0,l.Z)(c,d.DATA_EXPORTER,"DE"),(0,l.Z)(c,d.DATA_LOADER,"DL"),(0,l.Z)(c,d.SCRATCHPAD,"SP"),(0,l.Z)(c,d.SENSOR,"SR"),(0,l.Z)(c,d.MARKDOWN,"MD"),(0,l.Z)(c,d.TRANSFORMER,"TF")},98781:function(n,t,e){e.d(t,{$1:function(){return d},G7:function(){return s},LM:function(){return p},Mj:function(){return m},QK:function(){return l},a_:function(){return h},qL:function(){return c},r0:function(){return f}});var r,o,i,c,a=e(82394),u=e(22341);!function(n){n.INTEGRATION="integration",n.PYTHON="python",n.PYSPARK="pyspark",n.STREAMING="streaming"}(c||(c={}));var l,d,f,s=(r={},(0,a.Z)(r,c.INTEGRATION,"Integration"),(0,a.Z)(r,c.PYTHON,"Standard"),(0,a.Z)(r,c.PYSPARK,"PySpark"),(0,a.Z)(r,c.STREAMING,"Streaming"),r),p="all",m=(c.PYTHON,c.INTEGRATION,c.STREAMING,o={},(0,a.Z)(o,p,u.ie),(0,a.Z)(o,c.INTEGRATION,u.YC),(0,a.Z)(o,c.PYTHON,u.El),(0,a.Z)(o,c.STREAMING,u.dB),o);!function(n){n.ACTIVE="active",n.INACTIVE="inactive",n.NO_SCHEDULES="no_schedules",n.RETRY="retry"}(l||(l={})),function(n){n.GROUP="group_by",n.STATUS="status[]",n.TAG="tag[]",n.TYPE="type[]"}(d||(d={})),function(n){n.STATUS="status",n.TAG="tag",n.TYPE="type"}(f||(f={}));var h=(i={},(0,a.Z)(i,c.PYTHON,"python3"),(0,a.Z)(i,c.PYSPARK,"pysparkkernel"),i)},87372:function(n,t,e){var r,o,i,c,a,u,l,d,f=e(82394),s=e(26304),p=e(26653),m=e(38626),h=e(33591),g=e(23831),A=e(2005),y=e(31012),T=e(19711),b=e(49125),R=e(86673),E=e(28598),N=["children","condensed","inline","level","marketing","spacingBelow"];function O(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function S(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?O(Object(e),!0).forEach((function(t){(0,f.Z)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var _=(0,m.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],T.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||g.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(A.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(A.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(A.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(A.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(A.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(A.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(A.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(A.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(A.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=m.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||g.Z.content).active,";\n ")})),v=m.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,h.media.md(r||(r=(0,p.Z)(["\n ","\n "])),y.aQ),h.media.lg(o||(o=(0,p.Z)(["\n ","\n "])),y.aQ),h.media.xl(i||(i=(0,p.Z)(["\n ","\n "])),y.aQ)),w=m.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,y.MJ),Z=m.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,h.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),h.media.sm(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),h.media.md(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),h.media.lg(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),h.media.xl(d||(d=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI)),D=m.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,y.BL),L=m.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),x=m.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),I=m.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),P=m.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(n){return 1===n.level&&"\n ".concat(y.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(y.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),k=function(n){var t,e=n.children,r=n.condensed,o=n.inline,i=n.level,c=n.marketing,a=n.spacingBelow,u=(0,s.Z)(n,N);o?t=P:0===Number(i)?t=v:1===Number(i)?t=c?Z:w:2===Number(i)?t=D:3===Number(i)?t=L:4===Number(i)?t=x:5===Number(i)&&(t=I);var l=(0,E.jsxs)(t,S(S({},u),{},{level:i,children:[a&&(0,E.jsx)(R.Z,{mb:r?2:3,children:e}),!a&&e]}));return o?l:(0,E.jsx)(C,{children:l})};k.defaultProps={level:3,weightStyle:6},t.Z=k},90211:function(n,t,e){e.d(t,{RA:function(){return d},kC:function(){return f},vg:function(){return y},kE:function(){return N},Mp:function(){return s},Pb:function(){return u},HW:function(){return b},wX:function(){return p},x6:function(){return m},_6:function(){return h},zf:function(){return T},Y6:function(){return E},wE:function(){return O},J3:function(){return g},We:function(){return l},QV:function(){return R},C5:function(){return A}});var r=e(75582),o=e(17717),i=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],c=(e(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),a=e(24224);function u(n){if(!n)return!1;try{JSON.parse(n)}catch(t){return!1}return!0}function l(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return n.split(" ").join(t)}function d(n){return n.split(" ").join("_")}function f(n){return n?n.charAt(0).toUpperCase()+n.slice(1):""}function s(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*n)}function p(n){return n.charAt(0).toLowerCase()+n.slice(1)}function m(n){if(null===n||"undefined"===typeof n)return"";var t=n.toString().split("."),e=(0,r.Z)(t,2),o=e[0],i=e[1],c=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return i?"".concat(c,".").concat(i):c}function h(n,t){var e,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t,i=void 0!==o&&null!==o;if(i||(o=2),1===o)e=n;else{var c=n.length,a=n[c-1];e="y"===a&&"day"!==n?"".concat(n.slice(0,c-1),"ies"):"".concat(n,"s"===a?"es":"s")}if(i){var u=r?m(o):o;return"".concat(u," ").concat(e)}return e}function g(n){return null===n||void 0===n?void 0:n.replace(/_/g," ")}function A(n){var t=n.length;return"ies"===n.slice(t-3,t)?"".concat(n.slice(0,t-3),"y"):"es"===n.slice(t-2,t)&&"ces"!==n.slice(t-3,t)?n.slice(0,t-2):n.slice(0,t-1)}function y(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return f(g(n.toLowerCase()))}function T(n){var t,e=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return e.forEach((function(o,i){if(!t){var c=(0,r.Z)(o,2),a=c[0],u=c[1],l=e.slice(0,i).reduce((function(n,t){return n*Number(t[1])}),1);n<Number(u)*l&&(t=h(a,Math.round(n/l)))}})),t}function b(n){return"undefined"!==typeof n&&null!==n&&!isNaN(n)}function R(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,e=Math.pow(10,t);return Math.round((n||0)*e)/e}function E(){return"".concat((0,a.mp)(i)," ").concat((0,a.mp)(c))}function N(n){return null===n||void 0===n?void 0:n.toLowerCase().replace(/\W+/g,"_")}function O(n){var t,e=n.split(o.sep),r=e[e.length-1].split(".");return t=1===r.length?r[0]:r.slice(0,-1).join("."),e.slice(0,e.length-1).concat(t).join(o.sep)}}}]);