mage-ai 0.9.58__py3-none-any.whl → 0.9.59__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.
- mage_ai/api/logging.py +11 -7
- mage_ai/api/policies/BlockPolicy.py +1 -0
- mage_ai/api/policies/CommandCenterItemPolicy.py +56 -0
- mage_ai/api/policies/CustomTemplatePolicy.py +0 -3
- mage_ai/api/policies/GitBranchPolicy.py +8 -1
- mage_ai/api/policies/GitFilePolicy.py +1 -0
- mage_ai/api/policies/PipelinePolicy.py +2 -0
- mage_ai/api/policies/PipelineSchedulePolicy.py +1 -0
- mage_ai/api/policies/VersionControlBranchPolicy.py +98 -0
- mage_ai/api/policies/VersionControlFilePolicy.py +96 -0
- mage_ai/api/policies/VersionControlProjectPolicy.py +92 -0
- mage_ai/api/policies/VersionControlRemotePolicy.py +94 -0
- mage_ai/api/presenters/CommandCenterItemPresenter.py +19 -0
- mage_ai/api/presenters/GitBranchPresenter.py +2 -0
- mage_ai/api/presenters/GitCustomBranchPresenter.py +1 -0
- mage_ai/api/presenters/PipelinePresenter.py +5 -5
- mage_ai/api/presenters/PipelineSchedulePresenter.py +4 -0
- mage_ai/api/presenters/VersionControlBranchPresenter.py +15 -0
- mage_ai/api/presenters/VersionControlFilePresenter.py +15 -0
- mage_ai/api/presenters/VersionControlProjectPresenter.py +14 -0
- mage_ai/api/presenters/VersionControlRemotePresenter.py +15 -0
- mage_ai/api/resources/BlockResource.py +110 -80
- mage_ai/api/resources/CommandCenterItemResource.py +29 -0
- mage_ai/api/resources/FileResource.py +15 -1
- mage_ai/api/resources/FolderResource.py +2 -1
- mage_ai/api/resources/GitBranchResource.py +183 -108
- mage_ai/api/resources/GitCustomBranchResource.py +9 -2
- mage_ai/api/resources/GitFileResource.py +26 -13
- mage_ai/api/resources/KernelResource.py +9 -1
- mage_ai/api/resources/LogResource.py +1 -1
- mage_ai/api/resources/OauthResource.py +4 -5
- mage_ai/api/resources/PipelineResource.py +71 -38
- mage_ai/api/resources/PipelineRunResource.py +7 -2
- mage_ai/api/resources/PullRequestResource.py +12 -3
- mage_ai/api/resources/SearchResultResource.py +4 -4
- mage_ai/api/resources/VersionControlBranchResource.py +85 -0
- mage_ai/api/resources/VersionControlFileResource.py +65 -0
- mage_ai/api/resources/VersionControlProjectResource.py +46 -0
- mage_ai/api/resources/VersionControlRemoteResource.py +64 -0
- mage_ai/authentication/oauth/constants.py +13 -16
- mage_ai/authentication/operation_history/models.py +11 -32
- mage_ai/authentication/operation_history/utils.py +14 -14
- mage_ai/authentication/permissions/constants.py +5 -0
- mage_ai/authentication/providers/active_directory.py +2 -2
- mage_ai/authentication/providers/bitbucket.py +2 -2
- mage_ai/authentication/providers/constants.py +6 -12
- mage_ai/authentication/providers/ghe.py +2 -2
- mage_ai/authentication/providers/google.py +2 -2
- mage_ai/authentication/providers/okta.py +2 -2
- mage_ai/cache/base.py +11 -3
- mage_ai/cache/block.py +116 -32
- mage_ai/cache/block_action_object/__init__.py +52 -43
- mage_ai/cache/constants.py +1 -0
- mage_ai/cache/file.py +114 -0
- mage_ai/cache/pipeline.py +34 -8
- mage_ai/cache/tag.py +51 -10
- mage_ai/cache/utils.py +44 -3
- mage_ai/cluster_manager/kubernetes/workload_manager.py +9 -1
- mage_ai/command_center/__init__.py +0 -0
- mage_ai/command_center/applications/__init__.py +0 -0
- mage_ai/command_center/applications/constants.py +96 -0
- mage_ai/command_center/applications/factory.py +54 -0
- mage_ai/command_center/blocks/__init__.py +0 -0
- mage_ai/command_center/blocks/factory.py +39 -0
- mage_ai/command_center/blocks/utils.py +127 -0
- mage_ai/command_center/constants.py +66 -0
- mage_ai/command_center/factory.py +161 -0
- mage_ai/command_center/files/__init__.py +0 -0
- mage_ai/command_center/files/constants.py +235 -0
- mage_ai/command_center/files/factory.py +86 -0
- mage_ai/command_center/models.py +442 -0
- mage_ai/command_center/pipeline_runs/__init__.py +0 -0
- mage_ai/command_center/pipeline_runs/utils.py +141 -0
- mage_ai/command_center/pipelines/__init__.py +0 -0
- mage_ai/command_center/pipelines/constants.py +118 -0
- mage_ai/command_center/pipelines/factory.py +132 -0
- mage_ai/command_center/pipelines/utils.py +120 -0
- mage_ai/command_center/service.py +45 -0
- mage_ai/command_center/settings.py +37 -0
- mage_ai/command_center/support/__init__.py +0 -0
- mage_ai/command_center/support/constants.py +46 -0
- mage_ai/command_center/triggers/__init__.py +0 -0
- mage_ai/command_center/triggers/factory.py +49 -0
- mage_ai/command_center/triggers/utils.py +463 -0
- mage_ai/command_center/utils.py +30 -0
- mage_ai/data_preparation/executors/azure_container_instance_executor.py +1 -1
- mage_ai/data_preparation/executors/block_executor.py +68 -19
- mage_ai/data_preparation/executors/ecs_block_executor.py +2 -2
- mage_ai/data_preparation/executors/executor_factory.py +2 -0
- mage_ai/data_preparation/executors/gcp_cloud_run_block_executor.py +1 -1
- mage_ai/data_preparation/executors/k8s_block_executor.py +2 -2
- mage_ai/data_preparation/executors/pyspark_block_executor.py +7 -1
- mage_ai/data_preparation/git/__init__.py +29 -11
- mage_ai/data_preparation/git/api.py +14 -13
- mage_ai/data_preparation/git/clients/base.py +4 -8
- mage_ai/data_preparation/git/clients/github.py +1 -0
- mage_ai/data_preparation/git/utils.py +5 -7
- mage_ai/data_preparation/models/block/__init__.py +556 -329
- mage_ai/data_preparation/models/block/content.py +111 -0
- mage_ai/data_preparation/models/block/data_integration/mixins.py +1 -0
- mage_ai/data_preparation/models/block/dbt/block.py +29 -19
- mage_ai/data_preparation/models/block/dbt/block_sql.py +50 -260
- mage_ai/data_preparation/models/block/dbt/block_yaml.py +74 -156
- mage_ai/data_preparation/models/block/dbt/dbt_adapter.py +22 -10
- mage_ai/data_preparation/models/block/dbt/profiles.py +19 -15
- mage_ai/data_preparation/models/block/dbt/project.py +3 -0
- mage_ai/data_preparation/models/block/dynamic/constants.py +0 -0
- mage_ai/data_preparation/models/block/dynamic/dynamic_child.py +507 -47
- mage_ai/data_preparation/models/block/dynamic/utils.py +432 -1
- mage_ai/data_preparation/models/block/platform/mixins.py +68 -44
- mage_ai/data_preparation/models/block/r/__init__.py +19 -9
- mage_ai/data_preparation/models/block/sql/__init__.py +34 -20
- mage_ai/data_preparation/models/block/sql/utils/shared.py +4 -1
- mage_ai/data_preparation/models/block/utils.py +176 -71
- mage_ai/data_preparation/models/constants.py +7 -0
- mage_ai/data_preparation/models/file.py +21 -2
- mage_ai/data_preparation/models/pipeline.py +20 -8
- mage_ai/data_preparation/models/project/__init__.py +12 -7
- mage_ai/data_preparation/models/project/constants.py +1 -0
- mage_ai/data_preparation/models/triggers/__init__.py +7 -0
- mage_ai/data_preparation/models/utils.py +20 -0
- mage_ai/data_preparation/models/variable.py +113 -15
- mage_ai/data_preparation/shared/utils.py +6 -3
- mage_ai/data_preparation/storage/base_storage.py +17 -0
- mage_ai/data_preparation/storage/gcs_storage.py +4 -0
- mage_ai/data_preparation/storage/local_storage.py +15 -0
- mage_ai/data_preparation/storage/s3_storage.py +4 -0
- mage_ai/data_preparation/templates/data_exporters/qdrant.py +0 -1
- mage_ai/data_preparation/templates/data_loaders/qdrant.py +2 -1
- mage_ai/data_preparation/variable_manager.py +1 -0
- mage_ai/io/base.py +4 -1
- mage_ai/io/bigquery.py +25 -16
- mage_ai/io/clickhouse.py +3 -0
- mage_ai/io/druid.py +3 -0
- mage_ai/io/mongodb.py +1 -1
- mage_ai/io/pinot.py +3 -0
- mage_ai/io/postgres.py +13 -0
- mage_ai/io/snowflake.py +4 -0
- mage_ai/io/spark.py +8 -3
- mage_ai/io/sql.py +6 -0
- mage_ai/orchestration/db/__init__.py +26 -19
- mage_ai/orchestration/db/cache.py +4 -3
- mage_ai/orchestration/db/models/schedules.py +72 -16
- mage_ai/orchestration/db/models/schedules_project_platform.py +2 -3
- mage_ai/orchestration/pipeline_scheduler_original.py +19 -11
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +20 -11
- mage_ai/presenters/interactions/constants.py +1 -0
- mage_ai/presenters/interactions/models.py +4 -3
- mage_ai/presenters/pages/models/client_pages/pipeline_schedules.py +1 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +11 -11
- mage_ai/server/frontend_dist/_next/static/PPQxHOmWVJ0iQFzG2rc8m/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1235.c9ed47779baccc05.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/125-029194ff22eb33a5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-4f7485c2e2228f77.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2474-8e702cea23ddd16d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2479-727fa69ee9be6fab.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/26-38bc9380422f3900.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-3e7ea8543b3825b7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3366-420721116ea5a665.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3449-a9c98239582cd6f0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-13563a1ff815f922.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-9e0a8ba0db34b35f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4371-ef23f95888d6cd11.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4632.a4171dbf46b31c7c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/523-be11ad59861d00ca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5457-d582b00545b4cb5e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5831-2abc4063e887a03e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6085-692d2f784c0504f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/635-1e8857c2b6dde289.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7264-d05f4b7088533f6f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-b3d661ec743bfadf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/737-cc6467310a130dd9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4495-4f0340aa82e0c623.js → 7674-9ec4fe64b5bf64d5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8038-85d715c8c8394827.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8192-0c0b91523a38c4ca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8432-f736d101fc6d9215.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8513-d207733b485c8d03.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/9264-e7e040a54d34360c.js → frontend_dist/_next/static/chunks/9264-7cd9cd0ba86ec5e4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9440-54add041c392517f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/bd1a647f.fe5d87096be24a62.js → frontend_dist/_next/static/chunks/bd1a647f.04f7913662092327.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/404-7cabe357906f44f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-a11bd2ebe11b3fd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-ffca51945cd154ef.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-3ba957769292db80.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-45679fd18b3edd82.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-95735a218106aa99.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-cf98c2e4d20fd92c.js → global-data-products-81d6c7fd9a9cff38.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-eb4421d51fb7368f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-a8c712e20512fede.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-f1be1d4735ba6919.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-febe676687966276.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-70efe222130490b5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-0914c36b3c8fd59f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-81e6e5319a59cd07.js → users-4f12e989e7809ef9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-809d4c99b44991a1.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/oauth-0436d395963cd27a.js → frontend_dist/_next/static/chunks/pages/oauth-aa9079c8dbaea3a5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-4e30fb5b18383b71.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-5d31c3aace39182d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-85a80ee66f60a65c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0bd74047e257e6d9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-80619dc504d0103b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-3cc8d74ff8525bfd.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-cdc379ff24ff8858.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-03396d6086003e16.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d6d920758654f6d9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-27727bb87be506c3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-16aab67743651a0b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3ca1bedb660b252.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-9d58701fe7213727.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-0041fd76ee15e49f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-780be9a2da697915.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-db8bb970b1f2273f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-a3422b0ab1dbacd7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/[...slug]-987a1603f4201943.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks-3dc8bf89cab2722b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-43d3f2a5071b9537.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-c97b1a39b22c112a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-49efb66da67554ca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-be6aaec07c138656.js → [...slug]-5117d3555972484c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-ee1c19d4a192ae4d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-4dc5724486ee3396.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f380d293cff7592b.js → [...slug]-fa095aac732368c3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-ddce04fae28bd7f6.js → roles-db6d71f8692a33e7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-99c6a263d2ab9553.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-213a43564fdfbe17.js → [...slug]-9d881ac0a3db9baa.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-bee414d57c4b55d7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-e7030e1a7a9e88e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-312afc9a3f8d0a4f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates-e5300c340aa94c6b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-fa7ca0c86142d146.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-bd51b3918b39329e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-5158a9d98d2459e8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5ce099a7abb354ff.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-fea697dd168c6d0c.js → webpack-efa55343114c8128.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/css/d1e8e64d0b07af2f.css → frontend_dist/_next/static/css/b59541b123fd7191.css} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +11 -11
- mage_ai/server/frontend_dist/files.html +11 -11
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +11 -11
- mage_ai/server/frontend_dist/global-data-products.html +11 -11
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +11 -11
- mage_ai/server/frontend_dist/global-hooks.html +11 -11
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +11 -11
- mage_ai/server/frontend_dist/manage/settings.html +11 -11
- mage_ai/server/frontend_dist/manage/users/[user].html +11 -11
- mage_ai/server/frontend_dist/manage/users/new.html +11 -11
- mage_ai/server/frontend_dist/manage/users.html +11 -11
- mage_ai/server/frontend_dist/manage.html +11 -11
- mage_ai/server/frontend_dist/oauth.html +8 -8
- mage_ai/server/frontend_dist/overview.html +11 -11
- mage_ai/server/frontend_dist/pipeline-runs.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +11 -11
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +11 -11
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +11 -11
- mage_ai/server/frontend_dist/platform/global-hooks.html +11 -11
- mage_ai/server/frontend_dist/settings/account/profile.html +11 -11
- mage_ai/server/frontend_dist/settings/platform/preferences.html +11 -11
- mage_ai/server/frontend_dist/settings/platform/settings.html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/roles.html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +11 -11
- mage_ai/server/frontend_dist/settings/workspace/users.html +11 -11
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +41 -41
- mage_ai/server/frontend_dist/templates/[...slug].html +11 -11
- mage_ai/server/frontend_dist/templates.html +11 -11
- mage_ai/server/frontend_dist/terminal.html +11 -11
- mage_ai/server/frontend_dist/test.html +3 -5
- mage_ai/server/frontend_dist/triggers.html +11 -11
- mage_ai/server/frontend_dist/version-control.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/404.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1235.c9ed47779baccc05.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/125-029194ff22eb33a5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-4f7485c2e2228f77.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2474-8e702cea23ddd16d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2479-727fa69ee9be6fab.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/26-38bc9380422f3900.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-3e7ea8543b3825b7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3366-420721116ea5a665.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3449-a9c98239582cd6f0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-13563a1ff815f922.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e0a8ba0db34b35f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4371-ef23f95888d6cd11.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4632.a4171dbf46b31c7c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/523-be11ad59861d00ca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-d582b00545b4cb5e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5831-2abc4063e887a03e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6085-692d2f784c0504f2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-1e8857c2b6dde289.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7264-d05f4b7088533f6f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-b3d661ec743bfadf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/737-cc6467310a130dd9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4495-4f0340aa82e0c623.js → 7674-9ec4fe64b5bf64d5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8038-85d715c8c8394827.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8192-0c0b91523a38c4ca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-f736d101fc6d9215.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8513-d207733b485c8d03.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/9264-e7e040a54d34360c.js → frontend_dist_base_path_template/_next/static/chunks/9264-7cd9cd0ba86ec5e4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-54add041c392517f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/bd1a647f.fe5d87096be24a62.js → frontend_dist_base_path_template/_next/static/chunks/bd1a647f.04f7913662092327.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/404-7cabe357906f44f2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-a11bd2ebe11b3fd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-ffca51945cd154ef.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-3ba957769292db80.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-45679fd18b3edd82.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-95735a218106aa99.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-cf98c2e4d20fd92c.js → global-data-products-81d6c7fd9a9cff38.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-eb4421d51fb7368f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-a8c712e20512fede.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-f1be1d4735ba6919.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-febe676687966276.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-70efe222130490b5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-0914c36b3c8fd59f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-81e6e5319a59cd07.js → users-4f12e989e7809ef9.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-809d4c99b44991a1.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/oauth-0436d395963cd27a.js → frontend_dist_base_path_template/_next/static/chunks/pages/oauth-aa9079c8dbaea3a5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-4e30fb5b18383b71.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-5d31c3aace39182d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-85a80ee66f60a65c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0bd74047e257e6d9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-80619dc504d0103b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-3cc8d74ff8525bfd.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-cdc379ff24ff8858.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-03396d6086003e16.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d6d920758654f6d9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-27727bb87be506c3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-16aab67743651a0b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3ca1bedb660b252.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-9d58701fe7213727.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-0041fd76ee15e49f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-780be9a2da697915.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-db8bb970b1f2273f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-a3422b0ab1dbacd7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/[...slug]-987a1603f4201943.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-3dc8bf89cab2722b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-43d3f2a5071b9537.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-c97b1a39b22c112a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-49efb66da67554ca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-be6aaec07c138656.js → [...slug]-5117d3555972484c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-ee1c19d4a192ae4d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-4dc5724486ee3396.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f380d293cff7592b.js → [...slug]-fa095aac732368c3.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-ddce04fae28bd7f6.js → roles-db6d71f8692a33e7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-99c6a263d2ab9553.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-213a43564fdfbe17.js → [...slug]-9d881ac0a3db9baa.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-bee414d57c4b55d7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e7030e1a7a9e88e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-312afc9a3f8d0a4f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates-e5300c340aa94c6b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-fa7ca0c86142d146.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-bd51b3918b39329e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-5158a9d98d2459e8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5ce099a7abb354ff.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-d30cb09c85b4c4f0.js → webpack-bd35e1c7bd7b5a9a.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/css/d1e8e64d0b07af2f.css → frontend_dist_base_path_template/_next/static/css/b59541b123fd7191.css} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/do4WOsw7lNhouR0mtPTFi/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/files.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/manage.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/oauth.html +8 -8
- mage_ai/server/frontend_dist_base_path_template/overview.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +39 -39
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +11 -11
- mage_ai/server/frontend_dist_base_path_template/templates.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/terminal.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -5
- mage_ai/server/frontend_dist_base_path_template/triggers.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/version-control.html +11 -11
- mage_ai/server/logger.py +8 -2
- mage_ai/server/server.py +18 -1
- mage_ai/services/aws/ecs/config.py +3 -3
- mage_ai/services/aws/ecs/ecs.py +2 -2
- mage_ai/services/search/block_action_objects.py +59 -5
- mage_ai/settings/models/configuration_option.py +3 -1
- mage_ai/settings/platform/__init__.py +54 -18
- mage_ai/settings/repo.py +5 -4
- mage_ai/shared/custom_logger.py +213 -0
- mage_ai/shared/environments.py +4 -0
- mage_ai/shared/files.py +52 -1
- mage_ai/shared/models.py +2 -1
- mage_ai/shared/parsers.py +8 -1
- mage_ai/shared/path_fixer.py +62 -5
- mage_ai/shared/retry.py +4 -0
- mage_ai/shared/strings.py +4 -0
- mage_ai/tests/api/endpoints/test_blocks.py +101 -1
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +4 -1
- mage_ai/tests/base_test.py +21 -2
- mage_ai/tests/cache/test_pipeline_cache.py +11 -8
- mage_ai/tests/data_preparation/executors/test_block_executor.py +55 -45
- mage_ai/tests/data_preparation/git/test_api.py +4 -4
- mage_ai/tests/data_preparation/models/block/dbt/test_block.py +75 -43
- mage_ai/tests/data_preparation/models/block/dbt/test_block_sql.py +329 -329
- mage_ai/tests/data_preparation/models/block/dbt/test_block_yaml.py +296 -296
- mage_ai/tests/data_preparation/models/block/dbt/test_dbt_adapter.py +2 -2
- mage_ai/tests/data_preparation/models/block/dbt/test_dbt_cli.py +4 -4
- mage_ai/tests/data_preparation/models/block/dbt/test_profiles.py +2 -2
- mage_ai/tests/data_preparation/models/block/dbt/test_project.py +2 -2
- mage_ai/tests/data_preparation/models/block/dbt/test_sources.py +2 -2
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_child_block_factory.py +477 -474
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +25 -24
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +16 -25
- mage_ai/tests/data_preparation/models/block/test_utils.py +8 -8
- mage_ai/tests/data_preparation/models/test_block.py +6 -8
- mage_ai/tests/data_preparation/models/test_project.py +10 -5
- mage_ai/tests/data_preparation/models/test_variable.py +51 -4
- mage_ai/tests/orchestration/test_pipeline_scheduler_project_platform.py +1 -0
- mage_ai/version_control/__init__.py +0 -0
- mage_ai/version_control/models.py +288 -0
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/METADATA +6 -6
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/RECORD +490 -476
- mage_ai/server/frontend_dist/_next/static/0XnQ0C0nTr1w0o9CGC7wQ/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1154-2f262f7eb38ebaa1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1235.53172e14801844e5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1550-32333b36ac6b061b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-7cfe722a9b83b935.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1598-dd776e3a92e9cccd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1751-5adf859690505d7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1952-b2197a87dd67d8e0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2056-0ea1faa46646a77e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2213-52267f1e9ef5751c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2474-352ae192b826d896.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2512-46141494a1b75897.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-accc279ae116b1b9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2852872c-15b31a7081e6a868.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2886-9e73e1f48f248741.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2920.86a65e5f26ff1795.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3437-6055fd5aa82880f6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3449-214fce1a0e623b47.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3494-23a9cc2cd649abac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3745-3662911c364d917b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3763-70c7eb1fc203c903.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3943-a49377acc514e77f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4052-f89c85d2c8f51931.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4296-14eaf96d6479e673.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4804-1254a474f238d078.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5283-9df961e430a79bea.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-b373ebdf4d05d8e2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5499-bc2528f8e18f61a6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-e66141c1271bced6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5849-f30d8694e3318a81.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5896-7b8e36634d7d94eb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6043-728790621ca9014c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6050-e48b7f97e96bbcb6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6285-648f9a732e100b2f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6639-74eefed142e14ea6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6965-c613d1834c8ed92d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-ea92cb336bd1aab8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-06ef4c642a8fe8c4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7858-677c641010ac9160.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8125-b9d53e425b6ddc7e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-fb8f445644e573b0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8432-0ace6fb7bdbc6864.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/844-1e171f361e63b36d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9269-40e2101f56399dcc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9302-913007e2f801ad65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-c51bf1e8f271cb25.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-89a4b20eb3b3c754.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/976-0a8c2c4d7acd957b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9775-c1142b1312e8f95d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/404-5ddd12931e0e3e41.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ec5e62e8e5bb4e4c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/block-layout-44d7291d8f29eb36.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-a6661a9c3647532a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-26b899d3adb4ed19.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-9bd164317e652311.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-c87d46dc53e35638.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-24785a5ed4eb340d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-2c5fd116ecfacb33.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-8c9285af31efa3fd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-ec7e0419a64ae3b2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-039e083cc068da54.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-8e4d4f6edc515265.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-b73185fdcb7a131c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-97b3335bf60f8b07.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-83de126136539668.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-50f45e96892cfb63.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-5fe0f1de6fd365f8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-306db9e11fa94d21.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-ebea4be0562b08e3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-f09d21d5c2661504.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-61e770f155ae22ef.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-d347a4614130e2ab.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-056c5e5080a3754f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-208fa8de91f152bc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-a32e02f46a816eb3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-8012388b15f0e0a5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6714c72f90923cfb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-afc0525ef27fe1f2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-a91e7d86cd0540d9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/[...slug]-7c8e5a8908fe9c83.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks-be0684d1527587d8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-147660a34351147c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-ec5f01b683920ced.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-28aa4512c0e23ec5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-a2850b2e0a282d16.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-b1df80674dca4713.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-41abcd2241958dc8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-a2c5859f53b5e9e1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-1aea2a0c373bc6ae.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-e7485742708215d2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates-b4086d30a89d6801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-3cd171f43f0a0df8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-6a22493285c47ba2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ad20a31dde4fe59b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-267952b4c87927c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/RC0Yenm06LvZI-RWFoT5C/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1154-2f262f7eb38ebaa1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1235.53172e14801844e5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1550-32333b36ac6b061b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-7cfe722a9b83b935.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1598-dd776e3a92e9cccd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1751-5adf859690505d7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-b2197a87dd67d8e0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2056-0ea1faa46646a77e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2213-52267f1e9ef5751c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2474-352ae192b826d896.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2512-46141494a1b75897.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-accc279ae116b1b9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2852872c-15b31a7081e6a868.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2886-9e73e1f48f248741.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2920.86a65e5f26ff1795.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-6055fd5aa82880f6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3449-214fce1a0e623b47.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3494-23a9cc2cd649abac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3745-3662911c364d917b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3763-70c7eb1fc203c903.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-a49377acc514e77f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4052-f89c85d2c8f51931.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4296-14eaf96d6479e673.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4804-1254a474f238d078.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5283-9df961e430a79bea.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-b373ebdf4d05d8e2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5499-bc2528f8e18f61a6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e66141c1271bced6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5849-f30d8694e3318a81.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5896-7b8e36634d7d94eb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-728790621ca9014c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6050-e48b7f97e96bbcb6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6285-648f9a732e100b2f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6639-74eefed142e14ea6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6965-c613d1834c8ed92d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-ea92cb336bd1aab8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-06ef4c642a8fe8c4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7858-677c641010ac9160.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8125-b9d53e425b6ddc7e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-fb8f445644e573b0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-0ace6fb7bdbc6864.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/844-1e171f361e63b36d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9269-40e2101f56399dcc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9302-913007e2f801ad65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-c51bf1e8f271cb25.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-89a4b20eb3b3c754.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/976-0a8c2c4d7acd957b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9775-c1142b1312e8f95d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/404-5ddd12931e0e3e41.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ec5e62e8e5bb4e4c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/block-layout-44d7291d8f29eb36.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-a6661a9c3647532a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-26b899d3adb4ed19.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-9bd164317e652311.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-c87d46dc53e35638.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-24785a5ed4eb340d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-2c5fd116ecfacb33.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-8c9285af31efa3fd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-ec7e0419a64ae3b2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-039e083cc068da54.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-8e4d4f6edc515265.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-b73185fdcb7a131c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-97b3335bf60f8b07.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-83de126136539668.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-50f45e96892cfb63.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-5fe0f1de6fd365f8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-306db9e11fa94d21.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-ebea4be0562b08e3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-f09d21d5c2661504.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-61e770f155ae22ef.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-d347a4614130e2ab.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-056c5e5080a3754f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-208fa8de91f152bc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-a32e02f46a816eb3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-8012388b15f0e0a5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-6714c72f90923cfb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-afc0525ef27fe1f2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-a91e7d86cd0540d9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/[...slug]-7c8e5a8908fe9c83.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-be0684d1527587d8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-147660a34351147c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-ec5f01b683920ced.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-28aa4512c0e23ec5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-a2850b2e0a282d16.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-b1df80674dca4713.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-41abcd2241958dc8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-a2c5859f53b5e9e1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-1aea2a0c373bc6ae.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-e7485742708215d2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates-b4086d30a89d6801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-3cd171f43f0a0df8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-6a22493285c47ba2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ad20a31dde4fe59b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-267952b4c87927c7.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{0XnQ0C0nTr1w0o9CGC7wQ → PPQxHOmWVJ0iQFzG2rc8m}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{RC0Yenm06LvZI-RWFoT5C → do4WOsw7lNhouR0mtPTFi}/_ssgManifest.js +0 -0
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.58.dist-info → mage_ai-0.9.59.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4052],{88494:function(e,n,t){t.d(n,{MB:function(){return v},Nk:function(){return a},T5:function(){return d},_A:function(){return f},a3:function(){return p},wx:function(){return s}});var o=t(38626),i=t(44897),r=t(55283),l=t(42631),u=t(70515),c=t(30160),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;"," "," "," ",""],r.Kf,(function(e){return e.addBottomPadding&&"\n padding-bottom: ".concat(2*u.tr,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).table,";\n ")}),(function(e){return!e.executedAndIdle&&"\n border-bottom-left-radius: ".concat(l.n_,"px;\n border-bottom-right-radius: ").concat(l.n_,"px;\n border-bottom-style: solid;\n border-bottom-width: 2px;\n ")}),(function(e){return e.showBorderTop&&"\n border-top-left-radius: ".concat(l.n_,"px;\n border-top-right-radius: ").concat(l.n_,"px;\n border-top-style: solid;\n border-top-width: 2px;\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__OutputRowStyle",componentId:"sc-n38rkq-1"})([""," "," "," ",""],(function(e){return e.first&&"\n padding-top: ".concat(u.iI*u.cd,"px;\n ")}),(function(e){return e.last&&"\n padding-bottom: ".concat(u.iI*u.cd,"px;\n ")}),(function(e){return e.contained&&!e.normalPadding&&"\n padding-left: ".concat(r.oh,"px;\n padding-right: ").concat(u.iI*u.cd,"px;\n ")}),(function(e){return e.contained&&e.normalPadding&&"\n padding-left: ".concat(u.iI*u.cd,"px;\n padding-right: ").concat(u.iI*u.cd,"px;\n ")})),s=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,r.Kf,(function(e){return"\n color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),f=o.default.div.withConfig({displayName:"indexstyle__ExtraInfoStyle",componentId:"sc-n38rkq-3"})([""," border-bottom-left-radius:","px;border-bottom-right-radius:","px;border-bottom-style:solid;border-bottom-width:2px;border-left-style:solid;border-left-width:2px;border-right-style:solid;border-right-width:2px;",""],r.Kf,l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.borders||i.Z.borders).light,";\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;"],u.iI,r.oh,u.iI*u.cd,u.iI),v=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||i.Z.borders).medium,";\n ")}))},50450:function(e,n,t){t.d(n,{Z:function(){return q}});var o,i=t(21831),r=t(82394),l=t(75582),u=t(82684),c=t(89565),a=t.n(c),d=t(62302),s=t(69864),f=t(40761),p=t(44425),v=t(71180),m=t(39867),h=t(75810),b=t(93859),g=t(24138),x=t(15338),j=t(97618),C=t(55485),k=t(48339),O=t(57653),y=t(35185),Z=t(38276),E=t(30160),T=t(12468),P=t(35686),S=t(98464),I=t(72473),_=t(88494),w=t(92709),A=t(89706),R=t(65044);!function(e){e.LOGS="logs",e.DATA="data"}(o||(o={}));var D=t(70515),B=t(11498),N=t(47041),M=t(55283),L=t(41429),U=t(85385),F=t(74052),G=t(81728),H=t(72619),z=t(28598);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 Q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?K(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var W={appearAbove:!0,appearBefore:!0,block:!0,size:null,widthFitContent:!0},V={basic:!0,iconOnly:!0,noPadding:!0,transparent:!0};function Y(e,n){var t=e.alwaysShowExtraInfo,r=e.block,c=e.blockIndex,K=e.blockMetadata,Y=e.buttonTabs,q=e.children,X=e.childrenBelowTabs,J=e.collapsed,$=e.contained,ee=void 0===$||$,ne=e.dynamicBlock,te=e.dynamicChildBlock,oe=e.hasError,ie=e.hasOutput,re=e.hideExtraInfo,le=e.hideOutput,ue=e.isInProgress,ce=e.mainContainerWidth,ae=e.messages,de=e.messagesAll,se=e.onClickSelectBlock,fe=e.openSidekickView,pe=e.outputDisplayType,ve=e.outputRowNormalPadding,me=e.pipeline,he=e.runCount,be=e.runEndTime,ge=e.runStartTime,xe=e.scrollTogether,je=e.selected,Ce=e.selectedTab,ke=e.setCollapsed,Oe=e.setErrors,ye=e.setOutputBlocks,Ze=e.setSelectedOutputBlock,Ee=e.setSelectedTab,Te=e.showBorderTop,Pe=e.sideBySideEnabled,Se=e.sparkEnabled,Ie=(0,u.useState)(!1),_e=Ie[0],we=Ie[1];(0,u.useEffect)((function(){we(!0)}),[]);var Ae=(0,u.useCallback)((function(){var e=new CustomEvent(w.tK,{detail:{blockIndex:c}});window.dispatchEvent(e)}),[c]);(0,u.useEffect)((function(){_e&&Pe&&Ae()}),[de,_e,xe,Pe]);var Re=r||{},De=Re.color,Be=Re.status,Ne=Re.type,Me=Re.uuid,Le=(0,u.useMemo)((function(){return{blockColor:De,blockType:Ne,dynamicBlock:ne,dynamicChildBlock:te,hasError:oe,selected:je}}),[De,Ne,ne,te,oe,je]),Ue=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.length)||0}),[ae]),Fe=p.DA.EXECUTED===Be||!ue&&0===he&&Ue>=1||!ue&&he>=1&&be>=ge,Ge=(0,u.useState)(),He=Ge[0],ze=Ge[1],Ke=(0,u.useState)(),Qe=Ke[0],We=Ke[1],Ve=(0,u.useState)(null),Ye=Ve[0],qe=Ve[1],Xe=(0,u.useMemo)((function(){var e,n;return null===(e=new f.Z)||void 0===e||null===(n=e.decodedToken)||void 0===n?void 0:n.token}),[]),Je=(0,s.Db)((function(){return P.ZP.block_outputs.pipelines.downloads.detailAsync(null===me||void 0===me?void 0:me.uuid,Me,{token:Xe},{onDownloadProgress:function(e){return qe((Number((null===e||void 0===e?void 0:e.loaded)||0)/1e6).toFixed(3))},responseType:B.Eg.BLOB})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){(0,F.uS)(e,"".concat(Me,".").concat(A.Lu.CSV))},onErrorCallback:function(e,n){return null===Oe||void 0===Oe?void 0:Oe({errors:n,response:e})}})}}),$e=(0,l.Z)(Je,2),en=$e[0],nn=$e[1].isLoading;(0,u.useEffect)((function(){ue||We(100)}),[ue]);var tn=function(e){return Array.isArray(e)?e.join("\n"):e},on=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.length)>=1?ae.reduce((function(e,n){var t=e.at(-1);if(k.jU.includes(null===t||void 0===t?void 0:t.type)&&(null===t||void 0===t?void 0:t.type)===n.type&&!tn(null===n||void 0===n?void 0:n.data).match(R.Lz)){if(Array.isArray(t.data))t.data.concat(n.data);else if("string"===typeof t.data){var o=tn(n.data)||"";t.data=[t.data,o].join("\n")}}else k.jU.includes(null===n||void 0===n?void 0:n.type)&&!tn(null===n||void 0===n?void 0:n.data).match(R.Lz)?e.push(Q(Q({},n),{},{data:tn(n.data)})):e.push(Q({},n));return e}),[]):de||[]}),[ae,de]),rn=(0,u.useMemo)((function(){return!(null!==ae&&void 0!==ae&&ae.length)&&(null===de||void 0===de?void 0:de.length)>=1}),[ae,de]),ln=(0,u.useMemo)((function(){return(0,z.jsx)(y.Z,{progress:Qe})}),[Qe]),un=p.tf.DBT===(null===r||void 0===r?void 0:r.type),cn=(0,S.Z)(oe);(0,u.useEffect)((function(){un&&!cn&&oe&&Ee&&(null===Ee||void 0===Ee||Ee(L.Rj))}),[oe,cn,un,Ee]);var an=(0,u.useMemo)((function(){var e=function(e,n){var t=e.columns,o=e.index,i=e.rows,r=e.shape,l=n.borderTop,u=n.selected;return r&&ze(r),(null===t||void 0===t?void 0:t.some((function(e){return""===e})))?(0,z.jsx)(Z.Z,{mx:5,my:3,children:(0,z.jsx)(E.ZP,{monospace:!0,warning:!0,children:"Block output table could not be rendered due to empty string headers. Please check your data\u2019s column headers for empty strings."})}):i.length>=1&&(0,z.jsx)(b.Z,{columns:t,disableScrolling:!u,index:o,maxHeight:60*D.iI,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!l,rows:i,width:ce-(2+D.cd*D.iI*2+2+N.nn)},"data-table-".concat(o))},n=[],t=[],o=[];return null===on||void 0===on||on.forEach((function(r,l){var u,c,s,f=Array.isArray(r);if(rn&&f?(c={columns:["-"],index:0,rows:null===r||void 0===r?void 0:r.map((function(e){return[(0,G.Pb)(e)?JSON.parse(e):e]})),shape:[null===r||void 0===r?void 0:r.length,1]},s=k.Gi.TABLE):"string"===typeof r?(c=r,s=k.Gi.TEXT_PLAIN):(c=null===r||void 0===r?void 0:r.data,s=null===r||void 0===r?void 0:r.type),f||c&&0!==(null===(u=c)||void 0===u?void 0:u.length)){var p=[];p=(p=Array.isArray(c)?c:[c]).filter((function(e){return e}));var v=[];p.forEach((function(e){if(s===k.Gi.TEXT_HTML)v.push(e);else if(e&&"string"===typeof e){var n=e.split("\n");v.push.apply(v,(0,i.Z)(n))}else"object"===typeof v&&v.push(e)}));var m=v.length,h=[];v.forEach((function(n,i){var r,u,c={contained:ee,first:0===l&&0===i,last:l===on.length-1&&i===m-1,normalPadding:ve,sideBySideEnabled:Pe},f=l>=1;if("string"===typeof n&&n.match(R.Gr)){var p=n.split("\n"),v=[];p.forEach((function(e){if(e.match(R.Gr)){var t=e.split(R.Vc),i=t[t.length-1];(0,G.Pb)(i)&&o.push(JSON.parse(i))}else v.push(e);n=v.length>=1?v.join("\n"):null}))}if(null!==n){if("string"===typeof n&&n.match(R.Lz)){var b=n.split(R.gr),g=b[b.length-1],x=g.split("FloatProgress");if(b.length>=2&&(g=x[0]),(0,G.Pb)(g)){var j=JSON.parse(g),C=j.data,O=j.type;if(k.Gi.TABLE===O){!0;var y=e(C,{borderTop:f,selected:je});t.push(y),un||(u=y)}}}else if(s===k.Gi.TABLE){!0;var Z=e((0,G.Pb)(n)?JSON.parse(n):n,{borderTop:f,selected:je});t.push(Z),un||(u=Z)}else if(k.jU.includes(s)){var T,P=null===(T=n)||void 0===T?void 0:T.split("\\n");u=(0,z.jsx)(_.T5,Q(Q({},c),{},{children:P.map((function(e){return(0,z.jsxs)(E.ZP,{monospace:!0,preWrap:!0,children:[(null===e||void 0===e?void 0:e.length)>=1&&(0,z.jsx)(a(),{children:e}),!(null!==e&&void 0!==e&&e.length)&&(0,z.jsx)(z.Fragment,{children:"\xa0"})]},e)}))}))}else if(s===k.Gi.TEXT_HTML)n&&(u=(0,z.jsx)(_.T5,Q(Q({},c),{},{children:(0,z.jsx)(_.wx,{monospace:!0,children:(0,z.jsx)(d.Z,{html:n})})})));else if(s===k.Gi.IMAGE_PNG&&(null===(r=n)||void 0===r?void 0:r.length)>=1)u=(0,z.jsx)("div",{style:{backgroundColor:"white"},children:(0,z.jsx)("img",{alt:"Image ".concat(l," from code output"),src:"data:image/png;base64, ".concat(n)})});else if(s===k.Gi.PROGRESS){var S=parseInt(n);We(S>90?90:S)}u&&h.push((0,z.jsx)("div",{children:u},"code-output-".concat(l,"-").concat(i)))}})),h.length>=1&&n.push(h)}})),ue&&(null===me||void 0===me?void 0:me.type)===O.qL.PYSPARK&&!Se&&n.unshift([(0,z.jsx)(_.T5,{contained:!0,children:(0,z.jsx)(Z.Z,{mt:1,children:ln})},"progress_bar")]),{content:n,tableContent:t,testContent:o}}),[on,ee,un,ue,ce,ve,me,ln,rn,je,Se]),dn=an.content,sn=an.tableContent,fn=an.testContent,pn=(null===He||void 0===He?void 0:He[1])||0,vn=pn>30?" (30 out of ".concat(pn," columns displayed)"):"",mn=(0,u.useMemo)((function(){var e;if(un&&Ce||pe){var n=null===Ce||void 0===Ce?void 0:Ce.uuid;if(L.$m.uuid===n||o.DATA===pe)(null===sn||void 0===sn?void 0:sn.length)>=1?e=sn:ue||(e=(0,z.jsx)(Z.Z,{px:2,py:1,children:(0,z.jsx)(E.ZP,{muted:!0,children:oe?"Error, check logs.":"No preview to display yet, try running the block."})}));else if(L.Rj.uuid===n||o.LOGS===pe)(null===dn||void 0===dn?void 0:dn.length)>=1?e=dn:ue||(e=(0,z.jsx)(Z.Z,{px:2,py:1,children:(0,z.jsx)(E.ZP,{muted:!0,children:oe?"Error, check logs.":"No logs to display yet, try running the block."})}));else if(L.Jt.uuid===n){var t,i=null===K||void 0===K||null===(t=K.dbt)||void 0===t?void 0:t.sql;e=i?(0,z.jsx)(h.Z,{autoHeight:!0,language:A.Lu.SQL,padding:2*D.iI,readOnly:!0,value:i,width:"100%"}):null}else if(L.gM.uuid===n){var r,l=null===K||void 0===K||null===(r=K.dbt)||void 0===r?void 0:r.lineage;e=l?(0,z.jsx)(g.ZP,{disabled:!0,enablePorts:!1,height:55*D.iI,pannable:je,pipeline:Q(Q({},me),{},{blocks:l}),zoomable:je}):null}}else e=dn;return(0,z.jsxs)(z.Fragment,{children:[Y,X,!le&&e]})}),[K,Y,X,dn,oe,le,un,ue,pe,me,je,Ce,Pe,sn]);return Y||oe||ie||rn||q||t?(0,z.jsx)("div",{ref:n,children:(0,z.jsxs)("div",{onClick:se?function(){return null===se||void 0===se?void 0:se()}:null,style:{paddingTop:Pe?M.WC:0},children:[ee&&(0,z.jsxs)(_.Nk,Q(Q({},Le),{},{addBottomPadding:ue&&(null===me||void 0===me?void 0:me.type)===O.qL.PYSPARK,blockType:Ne,dynamicBlock:ne,dynamicChildBlock:te,executedAndIdle:Fe,hasError:oe,selected:je,showBorderTop:Te,children:[q,!J&&(null===fn||void 0===fn?void 0:fn.length)>=1&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Z.Z,{py:2,children:(0,z.jsx)(_.T5,{contained:!0,normalPadding:Pe,children:fn.map((function(e,n){var t=e.error,o=e.message,i=e.stacktrace;return(0,z.jsxs)(Z.Z,{mt:n>=1?3:0,children:[(0,z.jsx)(E.ZP,{monospace:!0,preWrap:!0,children:(0,z.jsx)(a(),{children:"".concat(o).concat(t?" "+t:"")})}),null===i||void 0===i?void 0:i.map((function(e){return(0,z.jsx)(E.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:(0,z.jsx)(a(),{children:e})},e)}))]},o)}))})}),(0,z.jsx)(Z.Z,{mb:Pe||oe?2:0,children:(0,z.jsx)(x.Z,{medium:!0})})]}),!J&&mn]})),!ee&&(0,z.jsxs)(z.Fragment,{children:[q,mn]}),(t||Fe&&!re)&&(0,z.jsxs)(_._A,Q(Q({},Le),{},{blockType:Ne,dynamicBlock:ne,dynamicChildBlock:te,hasError:oe,selected:je,children:[(0,z.jsx)(_.MB,{}),(0,z.jsxs)(C.ZP,{justifyContent:"space-between",children:[(0,z.jsxs)(j.Z,{alignItems:"center",px:1,children:[ke&&(0,z.jsx)(v.ZP,Q(Q({},V),{},{onClick:function(){return ke(!J)},children:J?(0,z.jsxs)(C.ZP,{alignItems:"center",children:[(0,z.jsx)(I._M,{muted:!0,size:2*D.iI}),"\xa0",(0,z.jsx)(E.ZP,{default:!0,children:"Expand output"})]}):(0,z.jsxs)(C.ZP,{alignItems:"center",children:[(0,z.jsx)(I.Kh,{muted:!0,size:2*D.iI}),He&&(0,z.jsx)(Z.Z,{ml:2,children:(0,z.jsx)(E.ZP,{children:"".concat(He[0]," rows x ").concat(He[1]," columns").concat(vn)})})]})})),!ke&&(0,z.jsx)(C.ZP,{alignItems:"center",children:He&&(0,z.jsx)(Z.Z,{pl:1,children:(0,z.jsx)(E.ZP,{children:"".concat(He[0]," rows x ").concat(He[1]," columns").concat(vn)})})})]}),(0,z.jsx)(_.a3,{children:(0,z.jsxs)(C.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,z.jsx)(T.Z,Q(Q({},W),{},{label:he>=1&&ge?"Last run at ".concat(new Date(ge.valueOf()).toLocaleString()):oe?"Block executed with errors":"Block executed successfully",children:(0,z.jsxs)(C.ZP,{alignItems:"center",children:[he>=1&&Number(be)>Number(ge)&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(E.ZP,{small:!0,children:[(Number(be)-Number(ge))/1e3,"s"]}),(0,z.jsx)(Z.Z,{mr:1})]}),!oe&&(0,z.jsx)(I.Jr,{size:2*D.iI,success:!0}),oe&&(0,z.jsx)(m.Z,{danger:!0,size:2*D.iI,children:(0,z.jsx)(E.ZP,{bold:!0,monospace:!0,small:!0,children:"!"})})]})})),!oe&&!p.Qj.includes(Ne)&&(0,z.jsx)(Z.Z,{pl:2,children:(0,z.jsxs)(C.ZP,{alignItems:"center",children:[(0,z.jsx)(T.Z,Q(Q({},W),{},{label:"Expand table",children:(0,z.jsx)(v.ZP,Q(Q({},V),{},{onClick:function(){(0,F.OF)(null===me||void 0===me?void 0:me.uuid,Me),null===fe||void 0===fe||fe(U.cH.DATA),null===ye||void 0===ye||ye((function(e){return e.find((function(e){return e.uuid===Me}))?e:(null===Ze||void 0===Ze||Ze(r),e.concat(r))}))},children:(0,z.jsx)(I.M0,{muted:!0,size:1.75*D.iI})}))})),(0,z.jsx)(Z.Z,{pl:2}),(0,z.jsx)(T.Z,Q(Q({},W),{},{forceVisible:nn,label:nn?"".concat(Ye||0,"mb downloaded..."):"Save output as CSV file",children:(0,z.jsx)(v.ZP,Q(Q({},V),{},{compact:!0,loading:nn,onClick:function(){qe(null),en()},children:(0,z.jsx)(I.vc,{muted:!0,size:1.75*D.iI})}))}))]})})]})})]})]}))]})}):null}var q=u.forwardRef(Y)},69632:function(e,n,t){t.d(n,{JX:function(){return c},NJ:function(){return d},au:function(){return u},eQ:function(){return a}});var o=t(38626),i=t(44897),r=t(42631),l=t(70515),u=(l.iI,o.default.div.withConfig({displayName:"indexstyle__HeaderSectionStyle",componentId:"sc-nlaveq-0"})(["",""],(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).content,";\n ")}))),c=o.default.div.withConfig({displayName:"indexstyle__StreamSectionStyle",componentId:"sc-nlaveq-1"})(["overflow:hidden;"," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).content,";\n ")}),(function(e){return!e.noBorderRadius&&"\n border-bottom-left-radius: ".concat(r.n_,"px;\n border-bottom-right-radius: ").concat(r.n_,"px;\n ")})),a=o.default.div.withConfig({displayName:"indexstyle__EmptyCodeSpace",componentId:"sc-nlaveq-2"})(["",""],(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),d=o.default.div.withConfig({displayName:"indexstyle__CalloutStyle",componentId:"sc-nlaveq-3"})(["border-radius:","px;padding:","px;",""],r.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||i.Z.borders).light,";\n ")}))},41429:function(e,n,t){t.d(n,{$m:function(){return i},C:function(){return v},C4:function(){return g},Jt:function(){return l},Rj:function(){return r},SD:function(){return s},Xy:function(){return c},aL:function(){return d},aj:function(){return b},gM:function(){return u},iz:function(){return p},p:function(){return f},qC:function(){return a},vT:function(){return m},zr:function(){return h}});var o=t(70515),i={uuid:"PREVIEW RESULTS"},r={uuid:"LOGS"},l={uuid:"SQL"},u={uuid:"LINEAGE"},c=function(e){var n,t,o=e.metadata,c=[r,l];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(i),c.push(u)),c},a={uuid:"Jobs"},d={uuid:"Output"},s={uuid:"SQLs"},f={uuid:"Stages & Tasks"},p=function(e){return[d,a,f,s]},v=2.5*o.iI,m="CodeBlock_HiddenBlock",h={label:function(){return"CODE"},uuid:"code"},b={label:function(){return"INTERACTIONS"},uuid:"interactions"},g=[h,b]},70693:function(e,n,t){t.d(n,{z:function(){return to},Z:function(){return io}});var o=t(75582),i=t(82394),r=t(21831),l=t(12691),u=t.n(l),c=t(82684),a=t(38626),d=t(10975),s=t(14567),f=t(69864),p=t(46510),v=t(79757),m=t(71180),h=t(55485),b=t(38276),g=t(30160),x=t(55283),j=t(28598);var C=function(e){var n=e.blocks,t=e.onClick,o=(0,c.useContext)(a.ThemeContext);return(0,j.jsx)(h.ZP,{alignItems:"center",children:null===n||void 0===n?void 0:n.map((function(e){var n=e.color,i=e.type,r=e.uuid,l=(0,x.qn)(i,{blockColor:n,theme:o}).accentLight;return(0,j.jsx)(b.Z,{ml:1,mt:1,children:(0,j.jsx)(m.ZP,{backgroundColor:l,compact:!0,onClick:function(){return t(e)},small:!0,children:(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:r})})},r)}))})},k=t(97618),O=t(26084),y=t(85385),Z=t(86735);function E(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 T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n=e.block,t=e.blocks,i=e.openSidekickView,r=e.pipeline,l=(0,c.useMemo)((function(){return(0,Z.HK)(t,(function(e){return e.uuid}))}),[t]),u=(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===l||void 0===l?void 0:l[n];return t?e.concat(t):e}),[])}),[n,l]),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===l||void 0===l?void 0:l[n];return t?e.concat(t):e}),[])}),[n,l]),d=(0,c.useMemo)((function(){var e,t=[];return null===(e=Object.entries((null===r||void 0===r?void 0:r.extensions)||{}))||void 0===e||e.forEach((function(e){var i=(0,o.Z)(e,2),r=i[0],u=i[1].blocks;null===u||void 0===u||u.forEach((function(e){var o=e.upstream_blocks,i=e.uuid;if(null!==o&&void 0!==o&&o.includes(null===n||void 0===n?void 0:n.uuid)){var u=null===l||void 0===l?void 0:l[i];u&&t.push(T(T({},u),{},{extension_uuid:r}))}}))})),t}),[n,l,r]),s=(0,c.useMemo)((function(){return null===a||void 0===a?void 0:a.length}),[a]),f=(0,c.useMemo)((function(){return null===u||void 0===u?void 0:u.length}),[u]),p=(0,c.useMemo)((function(){return null===d||void 0===d?void 0:d.length}),[d]);return s||f||p?(0,j.jsxs)(b.Z,{pb:s>=1||f>=1||p>=1?1:0,children:[s>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(k.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 i(y.cH.ADDON_BLOCKS,!0,{addon:O.Q.CONDITIONAL,blockUUID:n})}})]})}),f>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(k.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:u,onClick:function(e){var n=e.uuid;return i(y.cH.ADDON_BLOCKS,!0,{addon:O.Q.CALLBACK,blockUUID:n})}})]})}),p>=1&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(k.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:d,onClick:function(e){var n=e.extension_uuid,t=e.uuid;return i(y.cH.EXTENSIONS,!0,{blockUUID:t,extension:n})}})]})})]}):null},S=t(81769),I=t(44425),_=t(90299),w=t(70652),A=t(39867),R=t(75810),D=t(50450),B=t(70374),N=t(35058),M=t(85108),L=t(70515),U=t(81728);function F(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?F(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.addWidget,t=e.block,o=e.left,i=e.rightOffset,l=e.onClickCallback,u=e.open,a=e.parentRef,d=e.runBlock,s=e.topOffset,f=(0,c.useMemo)((function(){return N.CK.map((function(e){var o,i,r={configuration:{chart_type:e},language:t.language,type:I.tf.CHART,upstream_blocks:t?[t.uuid]:null},l=M.x8[e],u=(null===l||void 0===l||null===(o=l.configuration)||void 0===o?void 0:o.call(l,r))||{},c=I.t6.SQL===(null===t||void 0===t?void 0:t.language)?null:(null===l||void 0===l||null===(i=l.content)||void 0===i?void 0:i.call(l,r))||null,a=e;return t&&(a="".concat(a," for ").concat(t.uuid)),{label:function(){return(0,U.vg)(e)},onClick:function(){return n(G(G({},r),{},{name:"".concat(a," ").concat((0,U.Mp)()),configuration:G(G({},r.configuration),u),content:c}),{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===d||void 0===d||d({block:e,code:c,disableReset:!0}):null===d||void 0===d||d({block:t,runDownstream:!0}))}})},uuid:e}}))}),[N.CK,t,d]),p=(0,c.useMemo)((function(){return M._H.map((function(e){var o=e.label,i=G(G({},(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(i,{onCreateCallback:function(e){t&&I.t6.SQL!==t.language&&([I.DA.EXECUTED,I.DA.UPDATED].includes(t.status)?null===d||void 0===d||d({block:e,code:e.content,disableReset:!0}):null===d||void 0===d||d({block:t,runDownstream:!0}))}})},uuid:o()}}))}),[M._H,n,t,d]),v=[{isGroupingTitle:!0,label:function(){return"Custom charts"},uuid:"custom_charts"}].concat((0,r.Z)(f));return I.t6.SQL!==t.language&&v.push.apply(v,[{isGroupingTitle:!0,label:function(){return"Templates"},uuid:"chart_templates"}].concat((0,r.Z)(p))),(0,j.jsx)(B.Z,{items:v,left:o,onClickCallback:l,open:u,parentRef:a,rightOffset:i,topOffset:s,uuid:"CommandButtons/add_charts",width:25*L.iI})},z=t(50724),K=t(63403),Q=a.default.svg.withConfig({displayName:"Convert__SVGStyle",componentId:"sc-fmw0vr-0"})([""]),W=function(e){var n=e.fill,t=e.opacity,o=e.size,i=void 0===o?K.C:o,r=e.style,l=e.viewBox,u=void 0===l?"0 0 12 12":l;return(0,j.jsxs)(Q,{fill:n,height:i,opacity:t,style:r,viewBox:u,width:i,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"})]})})]})},V=t(46732),Y=t(49130),q=t(7267),X=t(48670),J=t(65956),$=t(4190),ee=t(12468),ne=t(35686),te=t(44897),oe=t(48339),ie=t(72473),re=t(41429),le=t(39643),ue=t(57653),ce=t(61709),ae=t(58325),de=t(72619),se=t(23780);function fe(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 pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ve,me,he,be=function(e){var n=e.addNewBlock,t=e.addWidget,i=e.block,r=e.blockContent,l=e.blocks,u=e.deleteBlock,d=e.executionState,s=e.fetchFileTree,p=e.fetchPipeline,v=e.hideExtraButtons,C=e.interruptKernel,k=e.isEditingBlock,O=e.openSidekickView,E=e.pipeline,T=e.project,P=e.runBlock,S=e.setBlockContent,_=e.setIsEditingBlock,w=e.savePipelineContent,R=e.setErrors,D=e.setOutputCollapsed,N=e.showConfigureProjectModal,M=(0,se.VI)(null,{},[],{uuid:"CommandButtons/".concat(null===i||void 0===i?void 0:i.uuid)}),U=(0,o.Z)(M,1)[0],F=i.all_upstream_blocks_executed,G=void 0===F||F,K=i.color,Q=i.language,fe=(i.metadata,i.type),ve=i.uuid,me=(0,c.useRef)(null),he=(0,c.useRef)(null),be=(0,c.useRef)(null),ge=(0,c.useRef)(null),xe=(0,c.useRef)(null),je=null===E||void 0===E?void 0:E.type,Ce=(0,c.useState)(!1),ke=Ce[0],Oe=Ce[1],ye=(0,c.useState)(!1),Ze=ye[0],Ee=ye[1],Te=(0,c.useState)(!1),Pe=Te[0],Se=Te[1],Ie=(0,c.useState)(!1),_e=Ie[0],we=Ie[1],Ae=(0,c.useState)(!1),Re=Ae[0],De=Ae[1],Be=(0,c.useContext)(a.ThemeContext),Ne=oe.uF.IDLE!==d,Me=(0,x.qn)(fe,{blockColor:K,theme:Be}).accent,Le=(0,c.useMemo)((function(){return je===ue.qL.STREAMING}),[je]),Ue=(0,c.useMemo)((function(){return je===ue.qL.INTEGRATION}),[je]),Fe=(0,c.useMemo)((function(){return(0,ce.Ts)(i,l,"CommandButtons",n).map((function(e){return pe(pe({},e),{},{onClick:function(){return w().then((function(){return e.onClick()}))}})}))}),[n,i,l,w]),Ge=(0,c.useMemo)((function(){return(0,Z.HK)(l,(function(e){return e.uuid}))}),[l]),He=(0,c.useMemo)((function(){return I.tf.DBT===(null===i||void 0===i?void 0:i.type)}),[i]),ze=(0,c.useMemo)((function(){return I.tf.MARKDOWN===(null===i||void 0===i?void 0:i.type)}),[i]),Ke=(0,f.Db)(ne.ZP.pipelines.useUpdate(null===E||void 0===E?void 0:E.uuid),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(){p()},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),Qe=(0,o.Z)(Ke,2),We=Qe[0],Ve=Qe[1].isLoading,Ye=(0,f.Db)(ne.ZP.llms.useCreate(),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){var n=e.llm;null!==n&&void 0!==n&&n.response&&S&&(null===S||void 0===S||S(null===n||void 0===n?void 0:n.response))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),qe=(0,o.Z)(Ye,2),Xe=qe[0],Je=(qe[1].isLoading,(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)(J.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)(X.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===i||void 0===i?void 0:i.uuid,pipeline_uuid:null===E||void 0===E?void 0:E.uuid}};return[{label:function(){return"Document block (beta)"},onClick:function(){t.use_case=q.z.GENERATE_DOC_FOR_BLOCK,e?n(t):We({pipeline:{llm:t}})},uuid:"Document block"},{label:function(){return"Document pipeline and all blocks (beta)"},onClick:function(){t.use_case=q.z.GENERATE_DOC_FOR_PIPELINE,e?n(t):We({pipeline:{llm:t}})},uuid:"Document pipeline and all blocks"},{label:function(){return"Add comments in code (beta)"},onClick:function(){e?n(t):Xe({llm:{request:{block_code:r},use_case:q.z.GENERATE_COMMENT_FOR_CODE}})},uuid:"Add comments in code"}]}),[i,r,Xe,E,T,N,We]));return(0,j.jsxs)(h.ZP,{alignItems:"center",children:[oe.uF.QUEUED===d&&(0,j.jsx)($.Z,{color:(Be||te.Z).content.active,type:"cylon"}),oe.uF.BUSY===d&&(0,j.jsx)($.Z,{color:(Be||te.Z).content.active}),P&&!Ne&&!Le&&(0,j.jsxs)(j.Fragment,{children:[!He&&(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Run block \xa0 \xa0",(0,j.jsx)(Y.Z,{inline:!0,keyTextGroups:[[(0,ae.V5)()?le.RJ:le.hE,le.Lz]],monospace:!0,uuidForKey:ve})]}),size:3*L.iI,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){G?P({block:i}):Se(!0)},children:(0,j.jsx)(A.Z,{color:Me,size:3*L.iI,children:(0,j.jsx)(ie.Py,{black:!0,size:1.5*L.iI})})})}),He&&(0,j.jsx)(m.ZP,{backgroundColor:Me,beforeIcon:(0,j.jsx)(ie.Py,{size:1.5*L.iI}),compact:!0,onClick:function(){G?P({block:i}):Se(!0)},small:!0,children:Q===I.t6.YAML?"Run command":"Compile & preview"}),(0,j.jsx)(z.Z,{disableEscape:!0,onClickOutside:function(){return Se(!1)},open:Pe,children:(0,j.jsx)(B.Z,{items:[{label:function(){return"Execute block"},onClick:function(){return P({block:i})},uuid:"execute_block"},{label:function(){return"Execute with upstream blocks"},onClick:function(){return P({block:i,runUpstream:!0})},uuid:"execute_upstream"}],onClickCallback:function(){return Se(!1)},open:Pe,parentRef:be,rightOffset:13.25*L.iI,topOffset:4.5*L.iI,uuid:"execute_actions",width:25*L.iI})})]}),Ne&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsxs)(g.ZP,{children:["Interrupt kernel \xa0 \xa0",(0,j.jsx)(Y.Z,{inline:!0,keyTextGroups:[[le.kA],[le.kA]],monospace:!0,uuidForKey:ve})]}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return C()},children:(0,j.jsx)(A.Z,{borderSize:1.5,size:re.C,children:(0,j.jsx)(ie.x8,{size:1*L.iI})})})})}),!v&&I.tf.SCRATCHPAD===i.type&&!Le&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(V.Z,{items:Fe,onClickCallback:function(){return Ee(!1)},onClickOutside:function(){return Ee(!1)},open:Ze,parentRef:he,rightOffset:0,topOffset:4,uuid:"CommandButtons/convert_block",children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"Convert block"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Ee(!Ze)},ref:he,children:(0,j.jsx)(W,{size:re.C})})})})}),!v&&[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(i.type)&&!Le&&!Ue&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{ml:L.cd,ref:me,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:"Add chart",size:2.25*L.iI,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return Oe((function(e){return!e}))},children:(0,j.jsx)(ie.GQ,{size:2.25*L.iI})})})}),t&&(0,j.jsx)(z.Z,{disableEscape:!0,onClickOutside:function(){return Oe(!1)},open:ke,children:(0,j.jsx)(H,{addWidget:t,block:i,onClickCallback:function(){return Oe(!1)},open:ke,parentRef:me,rightOffset:9*L.iI,runBlock:P,topOffset:2*L.iI})})]}),!v&&ze&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:k?"Close editor":"Edit",size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return _((function(e){return!e}))},children:k?(0,j.jsx)(ie.Jr,{size:re.C,success:!0}):(0,j.jsx)(ie.I8,{size:re.C})})})}),!v&&I.tf.GLOBAL_DATA_PRODUCT!==(null===i||void 0===i?void 0:i.type)&&(0,j.jsx)("div",{ref:xe,children:(0,j.jsxs)(b.Z,{ml:L.cd,children:[Ve&&(0,j.jsx)($.Z,{inverted:!0,small:!0}),!Ve&&(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"AI actions"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return De((function(e){return!e}))},children:(0,j.jsx)(ie.xq,{default:!0,size:re.C})})})]})}),!v&&(0,j.jsx)(z.Z,{disableEscape:!0,onClickOutside:function(){return De(!1)},open:Re,children:(0,j.jsx)(B.Z,{items:Je,onClickCallback:function(){return De(!1)},open:Re,parentRef:xe,rightOffset:4.75*L.iI,topOffset:2*L.iI,uuid:"FileHeaderMenu/AI_actions"})}),!v&&(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:"View and edit settings for this block",size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return null===O||void 0===O?void 0:O(y.cH.BLOCK_SETTINGS)},children:(0,j.jsx)(ie.JG,{default:!0,size:re.C})})})}),!v&&(0,j.jsx)("div",{ref:ge,children:(0,j.jsx)(b.Z,{ml:L.cd,children:(0,j.jsx)(ee.Z,{appearBefore:!0,default:!0,label:(0,j.jsx)(g.ZP,{children:"More actions"}),size:re.C,widthFitContent:!0,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return we((function(e){return!e}))},children:(0,j.jsx)(A.Z,{borderSize:1.5,default:!0,size:re.C,children:(0,j.jsx)(ie.mH,{default:!0,size:L.iI})})})})})}),!v&&(0,j.jsx)(z.Z,{disableEscape:!0,onClickOutside:function(){return we(!1)},open:_e,children:(0,j.jsx)(B.Z,{items:(0,ce.J8)(i,P,u,D,Le||Ue,{addNewBlock:n,blocksMapping:Ge,fetchFileTree:s,fetchPipeline:p,openSidekickView:O,project:T,savePipelineContent:w,updatePipeline:We}),onClickCallback:function(){return we(!1)},open:_e,parentRef:ge,rightOffset:4.75*L.iI,topOffset:2*L.iI,uuid:"FileHeaderMenu/file_items"})})]})};!function(e){e.DBT="dbt"}(ve||(ve={})),function(e){e.PROFILES="profiles",e.PROJECTS="projects",e.TARGETS="targets"}(me||(me={})),function(e){e.Block="Block"}(he||(he={}));var ge=t(15338),xe=t(85854),je=t(99236),Ce=t(75499),ke=t(69632),Oe=t(37443),ye=t(61599),Ze=t(53405);function Ee(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 Te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Pe,Se=function(e){var n=e.block,t=e.blockContent,o=e.blocksMapping,i=(e.children,e.codeEditor),r=e.callbackEl,l=e.hasElementsBelow,u=e.onChangeBlock,a=(e.openSidekickView,e.setContent),d=e.showDataIntegrationModal,s=(n.catalog,n.language),f=n.metadata,p=n.type,v=n.upstream_blocks,C=n.uuid,O=((null===f||void 0===f?void 0:f.data_integration)||{}).name,y=(0,c.useMemo)((function(){return(0,Ze.Uc)(n,{getAll:!0})}),[n]),E=(0,c.useMemo)((function(){return null===y||void 0===y?void 0:y.filter(Ze.Z5)}),[y]),T=(0,c.useMemo)((function(){return(null===y||void 0===y?void 0:y.length)||0}),[y]),P=(0,c.useMemo)((function(){return(null===E||void 0===E?void 0:E.length)||0}),[E]),S=I.tf.DATA_LOADER===p,_=S?"source":"destination",w=(0,c.useMemo)((function(){var e=[1,1,1,null],o=[{uuid:"Stream"},{center:!0,uuid:"Columns"},{center:!0,uuid:"Sync method"},{uuid:"Parallel"}];return S||(e=(0,Z.Hk)(1,1,e),o=(0,Z.Hk)({uuid:"Table name"},1,o)),(0,j.jsx)(Ce.Z,{columnFlex:e,columns:o,rows:null===E||void 0===E?void 0:E.map((function(e){var o,i,r,l=e||{},c=l.bookmark_properties,f=l.destination_table,p=l.replication_method,v=l.run_in_parallel,m=(l.tap_stream_id,(0,Ze.M$)(e)),x=(0,Ze.Qu)(e),C=(0,Ze.WD)(e),k=(0,Ze.JN)(e),O=k.allColumns,y=k.selectedColumns,E=(null===(o=Object.keys(O||[]))||void 0===o?void 0:o.length)||0,T=(null===(i=Object.keys(y||[]))||void 0===i?void 0:i.length)||0,P=I.t6.YAML===s&&!T,_=(0,j.jsxs)(X.Z,{danger:P,monospace:!0,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:m,defaultMainNavigationTabSub:x,defaultSubTab:P?Oe.tw.SETTINGS:Oe.tw.OVERVIEW,onChangeBlock:u,setContent:a})},preventDefault:!0,sameColorAsText:!P,children:[m," ",P&&(0,j.jsx)(g.ZP,{inline:!0,default:!0,monospace:!0,children:"will fail if no columns selected"})]},"".concat(C,"-stream"));r=T>=1||I.t6.PYTHON===s?(0,j.jsxs)(g.ZP,{center:!0,default:!0,monospace:!0,children:[T," ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:"/"})," ",E]}):(0,j.jsx)(g.ZP,{center:!0,danger:!0,children:"No columns selected"});var w=[_,(0,j.jsx)(X.Z,{danger:P,monospace:!0,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:m,defaultMainNavigationTabSub:x,defaultSubTab:Oe.tw.SETTINGS,onChangeBlock:u,setContent:a})},preventDefault:!0,sameColorAsText:!P,children:r},"".concat(C,"-columns")),(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"center",children:[(0,j.jsx)(g.ZP,{center:!0,default:!0,children:p&&(0,U.vg)(p)}),ye._B.INCREMENTAL===p&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),!(null!==c&&void 0!==c&&c.length)&&(0,j.jsx)(g.ZP,{danger:!0,xsmall:!0,children:"No bookmark properties set"}),(null===c||void 0===c?void 0:c.length)>=1&&(null===c||void 0===c?void 0:c.map((function(e,n){return(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,xsmall:!0,children:[n>=1&&", ",e]},e)})))]})]},"".concat(C,"-replicationMethod")),(0,j.jsx)(h.ZP,{justifyContent:"flex-end",children:v?(0,j.jsx)(ie.Jr,{size:2*L.iI,success:!0}):(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"-"})},"".concat(C,"-runInParallel"))];return S||(w=(0,Z.Hk)((0,j.jsx)(g.ZP,{default:!0,monospace:!0,children:f||m},"".concat(C,"-tableName")),1,w)),w}))})}),[n,t,s,S,a,d,E]),A=(0,c.useMemo)((function(){var e,t;return(0,Ze.Wi)(null===n||void 0===n||null===(e=n.upstream_blocks)||void 0===e?void 0:e.map((function(e){return null===o||void 0===o?void 0:o[e]})),null===n||void 0===n||null===(t=n.configuration)||void 0===t?void 0:t.data_integration)}),[n,o]);return(0,j.jsxs)(j.Fragment,{children:[I.t6.YAML===s&&(0,j.jsxs)(ke.au,{children:[(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{flex:1,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:_}),(0,j.jsx)(xe.Z,{default:!0,children:O})]}),(0,j.jsxs)(m.ZP,{compact:!0,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:Oe.uK.CONFIGURATION,onChangeBlock:u,setContent:a})},secondary:!0,children:["Configure ",_]})]})}),(0,j.jsx)(ge.Z,{light:!0}),(null===A||void 0===A?void 0:A.length)>=1&&(0,j.jsx)(je.Z,{inputsBlocks:A})]}),I.t6.PYTHON===s&&(0,j.jsxs)(ke.au,{children:[(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{flex:1,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:_}),(0,j.jsx)(xe.Z,{default:!0,children:O})]}),(0,j.jsxs)(m.ZP,{compact:!0,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:Oe.uK.CONFIGURATION,onChangeBlock:u,setContent:a})},secondary:!0,children:["Configure ",_]})]})}),(0,j.jsx)(ge.Z,{light:!0}),(null===v||void 0===v?void 0:v.length)>=1&&(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{flex:4,flexDirection:"column",children:[(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,uppercase:!0,children:"Inputs"}),(0,j.jsxs)(b.Z,{mt:1,children:[(null===A||void 0===A?void 0:A.length)>=1&&(0,j.jsx)(g.ZP,{default:!0,children:"The output of these upstream blocks are used as positional arguments for decorated functions."}),!(null!==A&&void 0!==A&&A.length)&&(0,j.jsxs)(g.ZP,{default:!0,children:["There are currently no positional arguments for decorated functions.",(0,j.jsx)("br",{}),"To use the output of 1 or more upstream blocks as positional arguments for decorated functions, add and configure 1 or more inputs."]})]})]}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(k.Z,{flex:1,justifyContent:"flex-end",children:(0,j.jsx)(m.ZP,{compact:!0,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:Oe.uK.CONFIGURATION,defaultSubTab:Oe.tw.UPSTREAM_BLOCK_SETTINGS,onChangeBlock:u,setContent:a})},secondary:!0,children:(null===A||void 0===A?void 0:A.length)>=1?"Configure inputs":"Add inputs"})})]})}),(null===A||void 0===A?void 0:A.length)>=1&&(0,j.jsx)(je.Z,{inputsBlocks:A})]}),(0,j.jsxs)(ke.JX,{noBorderRadius:l,children:[(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[P>=1&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(k.Z,{flex:1,flexDirection:"column",children:(0,j.jsxs)(g.ZP,{bold:!0,default:!0,large:!0,children:[P," ",(0,j.jsx)(g.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/"})," ",T," ",(0,U._6)("stream",T,!1,!0)," selected"]})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsxs)(m.ZP,{beforeIcon:!P&&(0,j.jsx)(ie.Zr,{size:2*L.iI}),compact:P>=1,onClick:function(){return d({block:Te(Te({},n),{},{content:t}),defaultMainNavigationTab:Oe.uK.STREAMS,onChangeBlock:u,setContent:a})},primary:!P,secondary:P>=1,children:[P>=1&&"Edit streams",!P&&"Set up streams"]})]})}),P>=1&&w,P>=1&&(0,j.jsx)(b.Z,{mb:L.cd})]}),I.t6.PYTHON===s&&(0,j.jsxs)(j.Fragment,{children:[P>=1&&(0,j.jsx)(ke.au,{children:(0,j.jsx)(b.Z,{pb:L.cd,px:L.cd,children:(0,j.jsx)(ke.NJ,{children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(k.Z,{children:(0,j.jsx)(ie.uy,{size:2*L.iI,warning:!0})}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsxs)(g.ZP,{muted:!0,children:["The decorated function ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,default:!0,children:"@selected_streams"})," and ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,default:!0,children:"@catalog"})," will override any stream settings configured for ",(0,j.jsx)(g.ZP,{bold:!0,color:(0,x.qn)(null===n||void 0===n?void 0:n.type,{blockColor:null===n||void 0===n?void 0:n.color}).accent,inline:!0,monospace:!0,children:C}),"."]})]})})})}),(0,j.jsx)(ke.eQ,{children:(0,j.jsx)(b.Z,{pb:L.cd})}),i,r]})]})};!function(e){e.APPEND="append",e.FAIL="fail",e.REPLACE="replace"}(Pe||(Pe={}));var Ie,_e=[Pe.APPEND,Pe.FAIL,Pe.REPLACE];function we(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 Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?we(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Re(e,n){var t,i=e.block,r=e.blocks,l=e.onClick,u=e.onDrop,f=i.type,p=(0,d.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:i,type:re.vT}}),[i]),m=(0,o.Z)(p,3),C=m[0],O=m[1],y=(m[2],(0,s.L)((function(){return{accept:re.vT,drop:function(e){return null===u||void 0===u?void 0:u(i,e)}}}),[i])),Z=(0,o.Z)(y,2)[1],E=(0,c.useContext)(a.ThemeContext),T=(0,x.qn)(f,{blockColor:i.color,theme:E}).accent,P=(0,Ze.cU)([i],r)[0],S=P.dynamic,_=P.dynamicUpstreamBlock,w=P.reduceOutput,R=P.reduceOutputUpstreamBlock,D=(0,c.useMemo)((function(){return(0,ce._o)({block:i,dynamic:S,dynamicUpstreamBlock:_,reduceOutput:w,reduceOutputUpstreamBlock:R})}),[i,S,_,w,R]).borderColorShareProps,B=(0,c.useMemo)((function(){return I.tf.DBT===(null===i||void 0===i?void 0:i.type)}),[i]);return(0,j.jsx)(b.Z,{pb:1,ref:Z,children:(0,j.jsx)(x.PY,Ae(Ae({},Ae(Ae({},D),C)),{},{ref:O,children:(0,j.jsx)(X.Z,{noHoverUnderline:!0,noOutline:!0,onClick:function(){return l()},preventDefault:!0,ref:n,children:(0,j.jsx)(b.Z,{p:1,children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{alignItems:"center",flex:1,children:[(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(v.Z,{monospace:!0,children:I.dO[i.language]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(A.Z,{color:T,size:1.5*L.iI,square:!0}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{color:T,monospace:!0,children:null===(t=B?I.tf.DBT:I.V4[i.type])||void 0===t?void 0:t.toUpperCase()})]}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(ie.iU,{size:1.5*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:null===i||void 0===i?void 0:i.uuid})]}),(0,j.jsx)(ee.Z,{appearAbove:!0,appearBefore:!0,block:!0,label:"Show ".concat(null===i||void 0===i?void 0:i.uuid," block"),size:2*L.iI,widthFitContent:!0,children:(0,j.jsx)(ie.Db,{muted:!0,size:2*L.iI})})]})})})}))})}!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"}(Ie||(Ie={}));var De=c.forwardRef(Re),Be=t(56747),Ne=t(82359),Me=t(44085),Le=t(74521);var Ue=function(e){var n,t=e.executionStates,o=(e.isInProgress,(null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.spark)||{jobs:null,sqls:null,stages:null}),i=o.jobs,r=(o.sqls,o.stages),l=(0,c.useMemo)((function(){return(r||[]).reduce((function(e,n){var t=null===n||void 0===n?void 0:n.application;return(null===t||void 0===t?void 0:t.calculated_id)in e||(e[null===t||void 0===t?void 0:t.calculated_id]={}),e[null===t||void 0===t?void 0:t.calculated_id][null===n||void 0===n?void 0:n.stage_id]=n,e}),{})}),[r]),u=(0,c.useMemo)((function(){return(0,j.jsx)(Le.Z,{disableStageExpansion:!0,jobs:i,stagesMapping:l})}),[i,l]);return(0,j.jsx)(j.Fragment,{children:u})},Fe=L.iI/2,Ge=a.default.div.withConfig({displayName:"indexstyle__ProgressDotsStyle",componentId:"sc-5dfsks-0"})(["border-top-width:","px;border-top-style:dotted;height:","px;",""],Fe,Fe,(function(e){return"\n border-top-color: ".concat(e.success?(e.theme||te.Z).accent.positive:(e.theme||te.Z).content.muted,";\n width: ").concat(e.progress,"%;\n ")})),He=t(88422);var ze=function(e){var n,t=e.children,o=e.executionStates,i=e.isInProgress,r=(null===o||void 0===o||null===(n=o[0])||void 0===n?void 0:n.spark)||{jobs:null,sqls:null,stages:null},l=r.jobs,u=(r.sqls,r.stages),a=(0,c.useMemo)((function(){var e=0,n=0,t=0,o=0;null===l||void 0===l||l.forEach((function(t){t.num_completed_stages;var o=t.status;e+=He.CN.SUCCEEDED===o?1:0,n+=1}));var i=0,r=0;return null===u||void 0===u||u.forEach((function(e){var n=e.num_complete_tasks,l=e.num_tasks,u=e.status;He.Dd.SKIPPED!==u&&(t+=He.Dd.COMPLETE===u?1:0,o+=1,i+=n||0,r+=l||0)})),{jobsCountCompleted:e,jobsCount:n,stagesCount:o,stagesCountCompleted:t,tasksCount:r,tasksCountCompleted:i}}),[l,u]),d=a.jobsCountCompleted,s=a.jobsCount,f=a.stagesCount,p=a.stagesCountCompleted,v=a.tasksCount,m=a.tasksCountCompleted,x=(0,c.useMemo)((function(){return s?Math.min(i?90:1,d/s):0}),[i,s,d]),C=(0,c.useMemo)((function(){return f?Math.min(x<1?90:1,p/f):0}),[x,f,p]),k=(0,c.useMemo)((function(){return v?Math.min(x<1?90:1,m/v):0}),[x,v,m]);return i||s?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(b.Z,{p:L.cd,children:[(0,j.jsx)(b.Z,{mb:1,children:(0,j.jsxs)(h.ZP,{alignContent:"center",justifyContent:"space-between",children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"Jobs"}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsxs)(g.ZP,{default:!0,monospace:!0,small:!0,children:[d," / ",s," (",Math.round(100*x),"%)"]})]})}),(0,j.jsxs)(h.ZP,{children:[(0,j.jsx)(Ge,{progress:100*x,success:!0}),x>0&&x<1&&(0,j.jsx)("div",{style:{width:L.iI/2}}),(0,j.jsx)(Ge,{progress:100*(1-x)})]})]}),(0,j.jsxs)(b.Z,{px:L.cd,pb:L.cd,children:[(0,j.jsx)(b.Z,{mb:1,children:(0,j.jsxs)(h.ZP,{alignContent:"center",justifyContent:"space-between",children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"Stages"}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsxs)(g.ZP,{default:!0,monospace:!0,small:!0,children:[p," / ",f," (",Math.round(100*C),"%)"]})]})}),(0,j.jsxs)(h.ZP,{children:[(0,j.jsx)(Ge,{progress:100*C,success:!0}),C>0&&C<1&&(0,j.jsx)("div",{style:{width:L.iI/2}}),(0,j.jsx)(Ge,{progress:100*(1-C)})]})]}),(0,j.jsxs)(b.Z,{px:L.cd,pb:L.cd,children:[(0,j.jsx)(b.Z,{mb:1,children:(0,j.jsxs)(h.ZP,{alignContent:"center",justifyContent:"space-between",children:[(0,j.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:"Tasks"}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsxs)(g.ZP,{default:!0,monospace:!0,small:!0,children:[m," / ",v," (",Math.round(100*k),"%)"]})]})}),(0,j.jsxs)(h.ZP,{children:[(0,j.jsx)(Ge,{progress:100*k,success:!0}),k>0&&k<1&&(0,j.jsx)("div",{style:{width:L.iI/2}}),(0,j.jsx)(Ge,{progress:100*(1-k)})]})]}),t]}):null},Ke=t(93004);var Qe=function(e){var n,t=e.disableGraph,o=e.executionStates,i=(e.isInProgress,e.overrideScrollForGraph),r=((null===o||void 0===o||null===(n=o[0])||void 0===n?void 0:n.spark)||{sqls:[]}).sqls,l=(0,c.useMemo)((function(){return(0,j.jsx)(Ke.Z,{disableGraph:t,disableJobExpansion:!0,overrideScrollForGraph:i,showSparkGraph:!0,sqls:r})}),[t,r]);return(0,j.jsx)(j.Fragment,{children:l})},We=t(71417);var Ve=function(e){var n,t=e.executionStates,o=(e.isInProgress,((null===t||void 0===t||null===(n=t[0])||void 0===n?void 0:n.spark)||{stages:null}).stages),i=(0,c.useMemo)((function(){return(0,j.jsx)(We.Z,{stages:o,tasksContained:!0})}),[o]);return(0,j.jsx)(j.Fragment,{children:i})},Ye=t(17488),qe=t(95924);function Xe(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 Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Xe(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var $e=function(e){var n=e.block,t=e.blockConfiguration,o=e.blockRefs,r=e.blocks,l=e.updateBlockConfiguration,u=(0,c.useContext)(a.ThemeContext),d=I.t6.R===(null===n||void 0===n?void 0:n.language),s=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 s&&f?e.push.apply(e,[null,1]):e.push(1),e}),[f,s]),v=(0,c.useMemo)((function(){var e=[{tooltipMessage:null,uuid:"Variable"},{tooltipMessage:null,uuid:"Block"}];return s&&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,s]),m=(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,v=e.uuid,m=(0,x.qn)(p,{blockColor:c,theme:u}).accent,h=I.t6.PYTHON===a;r=s?"{{ df_".concat(n+1," }}"):d?"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(v)),(0,j.jsx)(X.Z,{color:m,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(v,".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:m,monospace:!0,small:!0,children:v})},"block-".concat(v))];if(s){var C="table-name-input-".concat(v),k=(null===t||void 0===t?void 0:t[N.Yf])||{},O=(null===k||void 0===k?void 0:k[v])||{};h?b.push((0,j.jsx)(Ye.Z,{borderless:!0,compact:!0,monospace:!0,onChange:function(e){var n=e.target.value;l((0,i.Z)({},N.Yf,Je(Je({},k),{},(0,i.Z)({},v,Je(Je({},O),{},(0,i.Z)({},N.aZ,n))))))},onClick:qe.j,placeholder:"[database_optional].[schema_optional].[table]",small:!0,value:(null===O||void 0===O?void 0:O[N.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,d,s,u,l]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(Ce.Z,{columnFlex:p,columns:v,compact:!0,noBorder:!0,rows:m,uuid:"CodeBlock/UpstreamBlockSettings/".concat(null===n||void 0===n?void 0:n.uuid)})})},en=t(84820),nn=t(91835),tn=t(27277),on=t(92677),rn=t(93369),ln=t(42631),un=2.5*L.iI,cn=a.default.div.withConfig({displayName:"indexstyle__EditorWrapperStyle",componentId:"sc-1hwnytz-0"})(["position:relative;"]),an=a.default.div.withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-1hwnytz-1"})(["height:","px;position:absolute;left:","px;width:","px;z-index:7;"],un,L.iI/2,un),dn=a.default.div.withConfig({displayName:"indexstyle__InputStyle",componentId:"sc-1hwnytz-2"})(["border-radius:","px;display:none;left:","px;padding-left:","px;padding-right:","px;position:absolute;z-index:100;",""],ln.g5,x.oh,1*L.iI,2*L.iI+un,(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.dashboard,";\n border: ").concat(ln.mP,"px solid ").concat(null===e||void 0===e?void 0:e.color,";\n ")})),sn=a.default.div.withConfig({displayName:"indexstyle__TextInputFocusAreaStyle",componentId:"sc-1hwnytz-3"})(["width:100%;&:hover{cursor:text;}"]),fn=a.default.div.withConfig({displayName:"indexstyle__CloseStyle",componentId:"sc-1hwnytz-4"})(["position:absolute;right:","px;top:50%;transform:translateY(-50%);"],1*L.iI),pn=t(38118),vn=t(53808),mn=t(42041),hn=t(44688),bn=t(19183);function gn(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 xn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?gn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var jn=2*ln.mP+2*L.iI+x.oh;var Cn,kn=function(e){var n=e.autocompleteProviders,t=e.block,i=e.content,r=e.height,l=e.onChange,u=e.onContentSizeChangeCallback,a=e.onDidChangeCursorPosition,d=e.onMountCallback,s=e.pipeline,p=e.placeholder,v=e.project,m=e.selected,C=e.setSelected,k=e.setTextareaFocused,O=e.shortcuts,y=e.showConfigureProjectModal,Z=e.textareaFocused,E=e.theme,T=e.updatePipeline,P=(0,bn.i)().width,S="CodeBlockEditorV2/".concat(null===t||void 0===t?void 0:t.uuid,"/editor/button/AI"),I=(0,se.VI)(null,{},[],{uuid:S}),_=(0,o.Z)(I,1)[0],w=(0,c.useState)(!1),A=w[0],D=w[1],N=(0,c.useState)(!1),M=N[0],U=N[1],F=(0,vn.U2)(vn.HW,[]),G=(0,c.useRef)(null),H=(0,c.useRef)(null),K=(0,c.useRef)(null),Q=(0,c.useRef)(null),W=(0,c.useRef)(null),V=(0,c.useRef)(null),$=(0,c.useRef)(null),ee=(0,c.useRef)(null),te=t.color,oe=t.language,re=t.type,ue=(0,x.qn)(re,{blockColor:te,theme:E}),ce=(0,c.useCallback)((function(){H.current.style.opacity=1,ee.current.style.display="none",K.current.focus()}),[]),ae=(0,c.useCallback)((function(){H.current.style.opacity=0,ee.current.style.display="block",setTimeout((function(){var e,n;return null===V||void 0===V||null===(e=V.current)||void 0===e||null===(n=e.focus)||void 0===n?void 0:n.call(e)}),1)}),[]),fe=(0,c.useCallback)((function(e){var n=(null===i||void 0===i?void 0:i.split("\n"))||[],t=null===W||void 0===W?void 0:W.current,o=null===n||void 0===n?void 0:n.slice(0,t-1),r=null===n||void 0===n?void 0:n.slice(t,null===n||void 0===n?void 0:n.length),u=o.concat([e]).concat(r).join("\n");setTimeout((function(){return K.current.focus()}),1),setTimeout((function(){var e;null===K||void 0===K||null===(e=K.current)||void 0===e||e.setPosition({column:1,lineNumber:t})}),2),l(u)}),[i]),pe=(0,f.Db)(ne.ZP.llms.useCreate(),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){var n,o,i,r=e.llm;"string"===typeof(null===r||void 0===r?void 0:r.response)?o=null===r||void 0===r?void 0:r.response:o=null===r||void 0===r||null===(i=r.response)||void 0===i?void 0:i.code;(0,vn.t8)(vn.HW,null===(n=[{block:{uuid:null===t||void 0===t?void 0:t.uuid},code:o,description:$.current,language:oe,timestamp:Number(new Date)}].concat(F&&Array.isArray(F)?F:[]))||void 0===n?void 0:n.slice(0,40)),fe(o),V.current.value="",V.current.blur(),$.current="",C(!0),k(!0),ce()},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),ve=(0,o.Z)(pe,2),me=ve[0],he=ve[1].isLoading,be=(0,c.useCallback)((function(){me({llm:{request:{block_description:$.current,code_language:oe},use_case:q.z.GENERATE_CODE}})}),[me]),ge=(0,f.Db)(ne.ZP.llms.useCreate(),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){e.llm},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),xe=(0,o.Z)(ge,2),je=xe[0],Ce=xe[1].isLoading,ke=(0,c.useMemo)((function(){var e=!(null!==v&&void 0!==v&&v.openai_api_key),n=function(e){null===y||void 0===y||y({header:(0,j.jsx)(b.Z,{mb:L.HN,children:(0,j.jsxs)(J.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)(X.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&&T({pipeline:{llm:e}})}})},o={request:{block_uuid:null===t||void 0===t?void 0:t.uuid,pipeline_uuid:null===s||void 0===s?void 0:s.uuid}};return[{label:function(){return"Document block (beta)"},onClick:function(){o.use_case=q.z.GENERATE_DOC_FOR_BLOCK,e?n(o):T({pipeline:{llm:o}})},uuid:"Document block"},{label:function(){return"Document pipeline and all blocks (beta)"},onClick:function(){o.use_case=q.z.GENERATE_DOC_FOR_PIPELINE,e?n(o):T({pipeline:{llm:o}})},uuid:"Document pipeline and all blocks"},{label:function(){return"Add comments in code (beta)"},onClick:function(){e?n(o):je({llm:{request:{block_code:i},use_case:q.z.GENERATE_COMMENT_FOR_CODE}})},uuid:"Add comments in code"}]}),[t,i,je,s,v,y,T]),Oe=(0,c.useMemo)((function(){return(0,j.jsx)(sn,{onClick:function(){var e;return null===V||void 0===V||null===(e=V.current)||void 0===e?void 0:e.focus()}})}),[]),ye=(0,c.useMemo)((function(){var e=[];return null===F||void 0===F||F.forEach((function(n){var t;e.push({itemObject:n,searchQueries:[null===n||void 0===n||null===(t=n.block)||void 0===t?void 0:t.uuid,null===n||void 0===n?void 0:n.code,null===n||void 0===n?void 0:n.description,null===n||void 0===n?void 0:n.language],value:"".concat(null===n||void 0===n?void 0:n.description,"/").concat(null===n||void 0===n?void 0:n.timestamp)})})),e}),[F]),Ze=(0,c.useMemo)((function(){var e,n;return(0,j.jsxs)(dn,{color:null===ue||void 0===ue?void 0:ue.accent,ref:ee,children:[(0,j.jsx)(fn,{children:(0,j.jsx)(rn.ZP,{noBackground:!0,noPadding:!0,onClick:function(e){(0,qe.j)(e),ce()},uuid:"close-menu",children:(0,j.jsx)(ie.YO,{default:!0,size:un})})}),Oe,(0,j.jsx)(Ye.Z,{beforeIcon:(0,j.jsx)(Y.Z,{addPlusSignBetweenKeys:!0,keyTextGroups:[[le.hE,le.zw]]}),buttonAfter:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(on.Z,{children:[(0,j.jsx)(rn.ZP,{backgroundColor:null===ue||void 0===ue?void 0:ue.accent,bold:!0,loading:he,onClick:function(e){(0,qe.j)(e),be()},pill:!0,uuid:"generate-code",children:"Generate code"}),(0,j.jsx)(rn.ZP,{backgroundColor:null===ue||void 0===ue?void 0:ue.accentLight,bold:!0,loading:Ce,onClick:function(e){(0,qe.j)(e),U(!0)},pill:!0,uuid:"document-code",children:"Document code"})]}),(0,j.jsx)(z.Z,{disableEscape:!0,onClickOutside:function(){return U(!1)},open:M,children:(0,j.jsx)(B.Z,{items:ke,onClickCallback:function(){return U(!1)},open:M,parentRef:G,rightOffset:4.75*L.iI,topOffset:2*L.iI,uuid:"FileHeaderMenu/AI_actions"})})]}),fullWidth:!0,monospace:!0,noBackground:!0,noBorder:!0,noBorderRadiusBottom:!0,noBorderRadiusTop:!0,onKeyDown:function(e){var n;le.vP===e.keyCode?((0,qe.j)(e),ce()):le.Uq===e.keyCode&&(null===(n=$.current)||void 0===n?void 0:n.length)>=1&&((0,qe.j)(e),be())},onBlur:function(){return setTimeout((function(){return D(!1)}),150)},onChange:function(e){$.current=e.target.value},onFocus:function(){return D(!0)},paddingLeft:10*L.iI,paddingRight:32*L.iI,paddingVertical:1.5*L.iI,placeholder:"e.g. Read files from disk asynchronously",ref:V}),Oe,(0,j.jsx)(pn.rS,{maxHeight:80*L.iI,topOffset:(null===ee||void 0===ee||null===(e=ee.current)||void 0===e?void 0:e.getBoundingClientRect().height)-1,width:"".concat((null===ee||void 0===ee||null===(n=ee.current)||void 0===n?void 0:n.getBoundingClientRect().width)-3*L.iI,"px"),children:(0,j.jsx)(tn.Z,{itemGroups:[{items:A?ye:[],renderItem:function(e,n){var t=e.itemObject;return(0,j.jsx)(pn.gI,xn(xn({},n),{},{onClick:function(e){var t;(0,qe.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,j.jsxs)(h.ZP,{flexDirection:"column",children:[(0,j.jsx)(g.ZP,{breakSpaces:!0,default:!0,monospace:!0,xsmall:!0,children:null===t||void 0===t?void 0:t.code}),(null===t||void 0===t?void 0:t.description)&&(0,j.jsx)("div",{style:{marginTop:2},children:(0,j.jsx)(g.ZP,{breakSpaces:!0,monospace:!0,muted:!0,xsmall:!0,children:null===t||void 0===t?void 0:t.description})})]})}))}}],maxResults:10,onSelectItem:function(e){var n=e.itemObject;fe(null===n||void 0===n?void 0:n.code)},searchQuery:$.current,uuid:"".concat(S,"/AutocompleteDropdown")})})]})}),[ye,ue,me,A,he,oe]),Ee=(0,c.useMemo)((function(){return(0,j.jsx)(R.Z,{autoHeight:!0,autocompleteProviders:n,block:t,editorRef:K,height:r,language:oe,onChange:function(e){null===l||void 0===l||l(e)},onContentSizeChangeCallback:u,onDidChangeCursorPosition:function(e){var n,t,o,i,r;a&&(null===a||void 0===a||a(e));var l=null===e||void 0===e?void 0:e.editor,u=null===e||void 0===e||null===(n=e.position)||void 0===n?void 0:n.lineNumber;W.current=u;var c=(null===l||void 0===l?void 0:l.getContentHeight())/(null===l||void 0===l||null===(t=l.getModel())||void 0===t?void 0:t.getLineCount()),d=u*c;H.current.style.top="".concat(d-c-un/2,"px"),ee.current.style.top="".concat(d,"px");var s=((null===Q||void 0===Q||null===(o=Q.current)||void 0===o||null===(i=o.getBoundingClientRect)||void 0===i||null===(r=i.call(o))||void 0===r?void 0:r.width)||0)-jn;ee.current.style.width="".concat(s,"px")},onMountCallback:function(e,n){d&&(null===d||void 0===d||d(e,n)),setTimeout((function(){var e,n,t,o=((null===Q||void 0===Q||null===(e=Q.current)||void 0===e||null===(n=e.getBoundingClientRect)||void 0===n||null===(t=n.call(e))||void 0===t?void 0:t.width)||0)-jn;ee.current.style.width="".concat(o,"px")}),1)},placeholder:p,ref:Q,selected:m,setSelected:C,setTextareaFocused:k,shortcuts:O,textareaFocused:Z,value:i,width:"100%"})}),[n,t,i,r,oe,l,u,a,d,p,m,C,k,O,Z]),Te=(0,hn.y)(),Pe=(Te.disableGlobalKeyboardShortcuts,Te.registerOnKeyDown),Se=Te.unregisterOnKeyDown;return(0,c.useEffect)((function(){return function(){Se(S)}}),[Se,S]),Pe(S,(function(e,n,t){null!==v&&void 0!==v&&v.openai_api_key&&m&&(0,mn.y)([le.PQ,le.cP],n)&&ae()}),[v,m]),(0,c.useEffect)((function(){setTimeout((function(){var e,n,t,o=((null===Q||void 0===Q||null===(e=Q.current)||void 0===e||null===(n=e.getBoundingClientRect)||void 0===n||null===(t=n.call(e))||void 0===t?void 0:t.width)||0)-jn;ee.current.style.width="".concat(o,"px")}),1)}),[P]),(0,j.jsxs)(cn,{children:[!(null===v||void 0===v||!v.openai_api_key)&&(0,j.jsx)(an,{ref:H,children:(0,j.jsx)(rn.ZP,{noBackground:!0,noPadding:!0,onClick:function(e){m&&((0,qe.j)(e),ae())},uuid:S,children:(0,j.jsx)(ie.xq,{size:un,warning:!0})})}),Ze,Ee]})},On=t(17717),yn=t(65976),Zn=t(87418),En=t(26304),Tn=["loadingStyle"];function Pn(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 Sn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.DEFAULT="default",e.BLOCKS="blocks"}(Cn||(Cn={}));var In=a.default.div.withConfig({displayName:"Loading__LoadingStyleBlocks",componentId:"sc-1kzj0xr-0"})(["",""],(function(e){return'\n .loader {\n display: inline-flex;\n gap: 5px;\n }\n .loader:before,\n .loader:after {\n content: "";\n width: '.concat("string"===typeof e.width?e.width:"number"===typeof e.width?"".concat(e.width,"px"):"".concat(2*L.iI,"px"),";\n aspect-ratio: 1;\n box-shadow: 0 0 0 1px inset ").concat((null===e||void 0===e?void 0:e.color)||(e.theme||te.Z).content.active,";\n animation: l4 1.5s infinite;\n }\n .loader:after {\n --s: -1;\n animation-delay: 0.75s\n }\n @keyframes l4 {\n 0% {transform:scaleX(var(--s,1)) translate(0) rotate(0)}\n 16.67% {transform:scaleX(var(--s,1)) translate(-50%) rotate(0)}\n 33.33% {transform:scaleX(var(--s,1)) translate(-50%) rotate(90deg)}\n 50%,\n 100% {transform:scaleX(var(--s,1)) translate(0) rotate(90deg)}\n }\n")})),_n=(a.default.div.withConfig({displayName:"Loading__InfiniteBlocksStyle",componentId:"sc-1kzj0xr-1"})([".loader{width:120px;height:20px;background:linear-gradient(#000 0 0) left/20px 20px no-repeat #ddd;animation:l1 1s infinite linear;}@keyframes l1{50%{background-position:right}}.loader{width:120px;height:20px;background:linear-gradient(#000 50%,#0000 0),linear-gradient(#0000 50%,#000 0),linear-gradient(#000 50%,#0000 0),linear-gradient(#0000 50%,#000 0),linear-gradient(#000 50%,#0000 0),linear-gradient(#0000 50%,#000 0) #ddd;background-size:calc(100%/6 + 1px) 200%;background-repeat:no-repeat;animation:l12 2s infinite;}@keyframes l12{0%{background-position:calc(0*100%/5) 100%,calc(1*100%/5) 0%,calc(2*100%/5) 100%,calc(3*100%/5) 0%,calc(4*100%/5) 100%,calc(5*100%/5) 0%}16.67%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 0%,calc(2*100%/5) 100%,calc(3*100%/5) 0%,calc(4*100%/5) 100%,calc(5*100%/5) 0%}33.33%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 100%,calc(2*100%/5) 100%,calc(3*100%/5) 0%,calc(4*100%/5) 100%,calc(5*100%/5) 0%}50%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 100%,calc(2*100%/5) 0%,calc(3*100%/5) 0%,calc(4*100%/5) 100%,calc(5*100%/5) 0%}66.67%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 100%,calc(2*100%/5) 0%,calc(3*100%/5) 100%,calc(4*100%/5) 100%,calc(5*100%/5) 0%}83.33%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 100%,calc(2*100%/5) 0%,calc(3*100%/5) 100%,calc(4*100%/5) 0%,calc(5*100%/5) 0%}100%{background-position:calc(0*100%/5) 0%,calc(1*100%/5) 100%,calc(2*100%/5) 0%,calc(3*100%/5) 100%,calc(4*100%/5) 0%,calc(5*100%/5) 100%}}"]),a.default.div.withConfig({displayName:"Loading__ScrollingBarsStyle",componentId:"sc-1kzj0xr-2"})([".loader{width:90px;height:14px;background:repeating-linear-gradient(90deg,#000 0 calc(25% - 5px),#0000 0 25%) left/calc(4*100%/3) 100%;animation:l1 0.5s infinite linear;}@keyframes l1{100%{background-position:right}}"]),a.default.div.withConfig({displayName:"Loading__RepeatingBarStyle",componentId:"sc-1kzj0xr-3"})(["",""],(function(e){return"\n .loader {\n height: ".concat((null===e||void 0===e?void 0:e.height)||L.iI/4,"px;\n width: ").concat(e.width||"100%",";\n --c:no-repeat linear-gradient(").concat((null===e||void 0===e?void 0:e.color)||(e.theme||te.Z).background.success," 0 0);\n background: var(--c),var(--c), ").concat((null===e||void 0===e?void 0:e.colorLight)||(e.theme||te.Z).background.successLight,";\n background-size: 60% 100%;\n animation: l16 3s infinite;\n }\n\n @keyframes l16 {\n 0% {background-position:-150% 0,-150% 0}\n 66% {background-position: 250% 0,-150% 0}\n 100% {background-position: 250% 0, 250% 0}\n }\n")})));var wn=function(e){var n=e.loadingStyle,t=void 0===n?Cn.DEFAULT:n,o=(0,En.Z)(e,Tn);return Cn.BLOCKS===t?(0,j.jsx)(In,Sn(Sn({},o),{},{children:(0,j.jsx)("div",{className:"loader"})})):(0,j.jsx)(_n,Sn(Sn({},o),{},{children:(0,j.jsx)("div",{className:"loader"})}))},An=t(32929),Rn=t(47041),Dn=2*L.iI,Bn=1.5*L.iI,Nn=a.default.div.withConfig({displayName:"indexstyle__HeaderWrapperStyle",componentId:"sc-k2ohx5-0"})([""," ",""],(function(e){return e.subheaderVisible&&"\n &:hover {\n .chevron-down-exit-done {\n transform: translate(0, 0);\n transition: all 200ms;\n }\n .chevron-down-enter-active {\n transform: translate(0, ".concat(-.75*L.iI,"px);\n transition: all 200ms;\n }\n .chevron-down-enter-done,\n .chevron-down-enter-done-visible {\n transform: translate(0, ").concat(-.75*L.iI,"px);\n transition: all 300ms;\n }\n .chevron-down-exit {\n transform: translate(0, 0);\n transition: all 300ms;\n }\n }\n ")}),(function(e){return!e.subheaderVisible&&"\n &:hover {\n .chevron-down-exit-done {\n transform: translate(0, 0);\n transition: all 200ms;\n }\n .chevron-down-enter-active {\n transform: translate(0, ".concat(.75*L.iI,"px);\n transition: all 200ms;\n }\n .chevron-down-enter-done,\n .chevron-down-enter-done-visible {\n transform: translate(0, ").concat(.75*L.iI,"px);\n transition: all 300ms;\n }\n .chevron-down-exit {\n transform: translate(0, 0);\n transition: all 300ms;\n }\n }\n ")})),Mn=a.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-k2ohx5-1"})(["align-items:center;border-top-left-radius:","px;border-top-right-radius:","px;display:flex;justify-content:space-between;padding:","px;",""],ln.n_,ln.n_,1*L.iI,(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.dashboard,";\n ")})),Ln=a.default.div.withConfig({displayName:"indexstyle__InfoStyle",componentId:"sc-k2ohx5-2"})([""," align-items:center;display:flex;overflow:auto;"],(0,Rn.y$)()),Un=a.default.div.withConfig({displayName:"indexstyle__SubheaderButtonStyle",componentId:"sc-k2ohx5-3"})(["bottom:-","px;left:0;margin-left:auto;margin-right:auto;position:absolute;right:0;width:","px;z-index:11;"],2.75*L.iI,Dn),Fn=a.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-k2ohx5-4"})(["position:relative;z-index:10;"]),Gn=a.default.div.withConfig({displayName:"indexstyle__SubheaderMenuStyle",componentId:"sc-k2ohx5-5"})(["padding-bottom:","px;padding-top:","px;"],L.iI/2,L.iI/2),Hn=a.default.div.withConfig({displayName:"indexstyle__TagStyle",componentId:"sc-k2ohx5-6"})(["align-items:center;border-radius:","px;display:flex;padding:2px ","px;margin-right:","px;",""],ln.BG,1*L.iI,1*L.iI,(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme||te.Z).background.chartBlock,";\n ")}));function zn(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 Kn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?zn(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):zn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Qn(e,n){var t=e.block,o=e.buttons,i=e.executionState,r=e.menuGroups,l=e.selected,u=e.selectedHeaderTab,a=e.setSelectedHeaderTab,d=(e.setSideMenuVisible,e.setSubheaderVisible),s=(e.sideMenuVisible,e.subheaderVisible),f=e.subheaderVisibleDefault,p=e.subtitle,v=e.tabs,m=e.theme,C=e.title,k=t.color,O=t.language,y=(t.status,t.type),Z=t.uuid;(0,c.useEffect)((function(){d(!!f&&(null===f||void 0===f?void 0:f(t)))}),[]);var E=(0,c.useMemo)((function(){return{active:oe.uF.IDLE!==i,running:oe.uF.BUSY===i,waiting:oe.uF.QUEUED===i}}),[i]),T=E.active,P=void 0!==T&&T,S=E.running,w=void 0!==S&&S,R=E.waiting,D=void 0!==R&&R,B=(0,x.qn)(y,{blockColor:k,theme:m}),N=An.iK[y],M=(0,c.useMemo)((function(){var e,n=[],t=null===(e=C||Z)||void 0===e?void 0:e.split(On.sep),o=(null===t||void 0===t?void 0:t.length)||0;return null===t||void 0===t||t.forEach((function(e,t){t>=1&&n.push((0,j.jsx)("div",{style:{paddingLeft:L.iI/4,paddingRight:L.iI/4},children:(0,j.jsx)(g.ZP,{noWrapping:!0,muted:!0,children:"/"})},"".concat(e,"-spacing-").concat(t))),n.push((0,j.jsx)(g.ZP,{muted:t<o-1,noWrapping:!0,weightStyle:4,children:e},e))})),n}),[C,Z]),U=(0,c.useMemo)((function(){var e=[],n=[];return null===o||void 0===o||o.forEach((function(o,i){var r=o.Icon,d=o.color,s=o.description,f=o.disabled,p=o.icon,v=o.keyTextGroups,m=o.keyTextsPosition,h=o.keyboardShortcutValidation,g=o.label,x=o.loading,C=o.onClick,k=o.uuid,O=o.visible,y=f&&(null===f||void 0===f?void 0:f({active:P,running:w,waiting:D})),E=(p||r)&&!g,T=p?c.cloneElement(p,Kn(Kn({},(null===p||void 0===p?void 0:p.props)||{}),y?{color:null,disabled:y}:{})):r&&(0,j.jsx)(r,{disabled:y,fill:y?null:d,size:Dn}),S=(0,j.jsxs)(rn.ZP,{addPlusSignBetweenKeys:!0,backgroundColor:y?null:d,compact:!0,disabled:y,keyTextGroups:v,keyTextsPosition:m,keyboardShortcutValidation:h?function(e,n){return null===h||void 0===h?void 0:h(e,n,{block:t,selected:l})}:null,loading:x,noBackground:E,borderless:E,noPadding:E,onClick:function(){C&&(null===C||void 0===C||C({selectedHeaderTab:u,setSelectedHeaderTab:a}))},outline:!0,uuid:"CodeBlockV2/Header/KeyboardShortcutButton/".concat(Z,"/").concat(k,"/").concat(i),children:[T,T&&g&&(0,j.jsx)(b.Z,{mr:1}),g&&(null===g||void 0===g?void 0:g())]},"KeyboardShortcutButton/".concat(Z,"/").concat(k,"/").concat(i));s&&(S=(0,j.jsx)("div",{style:{position:"relative"},children:(0,j.jsx)(ee.Z,{block:!0,label:s,size:null,visibleDelay:300,widthFitContent:!0,children:S})})),!O||null!==O&&void 0!==O&&O({active:P,running:w,waiting:D})?(n.push(S),n.push((0,j.jsx)("div",{style:{marginRight:12}},"spacing/".concat(Z,"/").concat(k,"/").concat(i)))):e.push(S)})),{buttonsDropdown:e,buttonsVisible:n}}),[P,o,w,l,Z,D]),F=(U.buttonsDropdown,U.buttonsVisible),G=(0,c.useMemo)((function(){return null===r||void 0===r?void 0:r.map((function e(n){var t,o,i=null===n||void 0===n?void 0:n.onClick;(i&&(n.onClick=function(){return null===i||void 0===i?void 0:i({selectedHeaderTab:u,setSelectedHeaderTab:a})}),(null===n||void 0===n||null===(t=n.items)||void 0===t?void 0:t.length)>=1)&&(n.items=null===n||void 0===n||null===(o=n.items)||void 0===o?void 0:o.map(e));return n}))}),[r,a]),H=(0,c.useMemo)((function(){return(0,ce.MS)(t)}),[t]),z=(0,c.useMemo)((function(){if((null===G||void 0===G||!G.length)&&(null===H||void 0===H||!H.length))return null;var e=(0,j.jsx)(Zn.Z,{defaultTextContent:!0,menuGroups:G,rightOffset:0});return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(null===v||void 0===v?void 0:v.length)>=1?(0,j.jsx)(_.Z,{allowScroll:!0,onClickTab:function(e){null===a||void 0===a||a(e)},selectedTabUUID:null===u||void 0===u?void 0:u.uuid,tabs:v,underlineColor:null===B||void 0===B?void 0:B.accent,underlineStyle:!0}):(0,j.jsx)("div",{}),(null===v||void 0===v?void 0:v.length)>=1?e:(0,j.jsx)(Gn,{children:e})]}),(null===H||void 0===H?void 0:H.length)>=1&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ge.Z,{light:!0}),(0,j.jsx)(Gn,{children:(0,j.jsxs)(h.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"space-between",children:[(0,j.jsx)("div",{}),(0,j.jsx)(h.ZP,{alignItems:"center",justifyContent:"flex-end",children:null===H||void 0===H?void 0:H.map((function(e){var n=e.description,t=e.title;return(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,label:n||t,size:null,visibleDelay:300,widthFitContent:!0,children:(0,j.jsx)(Hn,{backgroundColor:null===B||void 0===B?void 0:B.accentLight,children:(0,j.jsx)(g.ZP,{small:!0,children:t})})},t)}))})]})})]})]})}),[B,G,u,a,v,H]);return(0,c.useEffect)((function(){null!==v&&void 0!==v&&v.length&&!u&&(null===a||void 0===a||a(v[0]))}),[]),(0,j.jsxs)(Nn,{ref:n,style:{position:"relative"},subheaderVisible:s,children:[(0,j.jsxs)(Mn,{children:[(0,j.jsxs)(h.ZP,{alignItems:"center",children:[F,D&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(wn,{color:null===B||void 0===B?void 0:B.accent,colorLight:null===B||void 0===B?void 0:B.accentLight,loadingStyle:Cn.BLOCKS}),(0,j.jsx)(b.Z,{mr:L.cd})]})]}),(0,j.jsxs)(Ln,{children:[(0,j.jsxs)(h.ZP,{flexDirection:"column",children:[(0,j.jsx)(h.ZP,{alignItems:"center",flexDirection:"row",justifyContent:"flex-end",children:M}),p&&(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,noWrapping:!0,xsmall:!0,children:p})]}),(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,label:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,children:I.LE[O]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{color:null===B||void 0===B?void 0:B.accent,inline:!0,monospace:!0,children:I.V4[y]})]}),size:null,visibleDelay:300,widthFitContent:!0,children:(0,j.jsx)(A.Z,{color:null===B||void 0===B?void 0:B.accent,size:4*L.iI,square:!0,children:(0,j.jsx)(N,{active:!0,size:Dn})})})]})]}),(null===r||void 0===r?void 0:r.length)>=1&&(0,j.jsx)(Un,{children:(0,j.jsx)(yn.Z,{classNames:"chevron-down",in:!0,timeout:400,children:(0,j.jsx)(rn.ZP,{className:"chevron-down-enter-done-visible",noBackground:!0,borderless:!0,noPadding:!0,onClick:function(){d(!s)},uuid:"KeyboardShortcutButton/".concat(Z,"/subheader/menu/button"),children:(0,j.jsxs)(b.Z,{py:1,children:[s&&(0,j.jsx)(ie.wJ,{active:!0,size:2.5*L.iI}),!s&&(0,j.jsx)(ie.UY,{fill:null===B||void 0===B?void 0:B.accent,size:2.5*L.iI})]})})})}),w&&(0,j.jsx)("div",{style:{position:"absolute",width:"100%"},children:(0,j.jsx)(wn,{width:"100%"})}),(null===r||void 0===r?void 0:r.length)>=1&&s&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ge.Z,{light:!0}),(0,j.jsx)(Fn,{children:z})]})]})}var Wn=c.forwardRef(Qn),Vn=t(93859),Yn=(t(2842),t(91437)),qn=a.default.div.withConfig({displayName:"indexstyle__ColumnStyle",componentId:"sc-qieo1u-0"})(["align-items:stretch;display:flex;height:100%;",""],(function(e){return"\n width: ".concat(e.width,"px;\n ")})),Xn=a.default.div.withConfig({displayName:"indexstyle__VerticalDividerStyle",componentId:"sc-qieo1u-1"})([""," position:relative;width:","px;z-index:5;",""],(0,Yn.eR)(),2,(function(e){return"\n background-color: ".concat((null===e||void 0===e?void 0:e.backgroundColor)||(e.theme||te.Z).borders.medium2,";\n\n // &:hover {\n // background-color: ").concat((null===e||void 0===e?void 0:e.backgroundColorHover)||(null===e||void 0===e?void 0:e.backgroundColor)||(e.theme||te.Z).content.active,";\n // }\n ")}));var Jn=function(e){var n=e.dividerBackgroundColor,t=e.dividerBackgroundColorHover,o=e.columnsOfItems,i=e.uuid,r=e.width,l=(0,c.useState)((0,vn.U2)("".concat(vn.kh,"_").concat(i),{})),u=l[0],a=(l[1],(0,c.useState)(null)),d=(a[0],a[1],(0,c.useRef)({})),s=(0,c.useRef)({}),f=(0,c.useRef)({}),p=((0,c.useRef)(null),(0,c.useState)(null)),v=(p[0],p[1],(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.length)||0}),[o])),m=(0,c.useMemo)((function(){return r-2*(v-1)}),[v,r]),b=(0,c.useMemo)((function(){var e=[];return null===o||void 0===o||o.forEach((function(n,t){var o=m/v,i=null===u||void 0===u?void 0:u[t];if("undefined"===typeof i||null===i||isNaN(i)||(o=i*m),t>=1&&t<=v-1){var r="vertical-divider-".concat(t);r in f.current||(f.current[r]=(0,c.createRef)());var l=f.current[r];e.push((0,j.jsx)(Xn,{ref:l},r))}var a=[];null===n||void 0===n||n.forEach((function(e,n){var t="column-{colNumber}-item-{idx}";t in d.current||(d.current[t]=(0,c.createRef)());var i=d.current[t];a.push((0,j.jsx)("div",{ref:i,style:{width:"100%"},children:null===e||void 0===e?void 0:e.render({numberOfColumns:v,columnWidth:o,width:m})},t))}));var p="column-".concat(t);p in s.current||(s.current[p]=(0,c.createRef)());var h=s.current[p];e.push((0,j.jsx)(qn,{ref:h,width:o,children:a},p))})),e}),[u,n,t,o,v,m]);return(0,j.jsx)(h.ZP,{flexDirection:"row",children:b})},$n=t(39457);var et=function(e){var n=e.allContentCleaned,t=e.contentAll,o=e.contentNoErrors,i=e.contentWithErrors,r=e.errorsCleaned,l=e.infoCleaned,u=(0,c.useState)(0),a=u[0],d=u[1];return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsxs)(h.ZP,{justifyContent:"space-between",children:[(0,j.jsxs)(h.ZP,{children:[(0,j.jsx)(w.Z,{label:"All logs",checked:0===a,onClick:function(){return d((function(e){return 0}))}}),(0,j.jsx)(b.Z,{mr:2}),(0,j.jsx)(w.Z,{label:"Errors",checked:1===a,onClick:function(){return d((function(e){return 1===e?0:1}))}}),(0,j.jsx)(b.Z,{mr:2}),(0,j.jsx)(w.Z,{label:"Info",checked:2===a,onClick:function(){return d((function(e){return 2===e?0:2}))}})]}),(0,j.jsx)(h.ZP,{children:(null===n||void 0===n?void 0:n.length)>=1&&(0,j.jsx)(h.ZP,{children:(0,j.jsx)($n.Z,{copiedText:0===a?null===n||void 0===n?void 0:n.join("\n"):1===a?null===r||void 0===r?void 0:r.join("\n"):null===l||void 0===l?void 0:l.join("\n"),monospace:!0,withCopyIcon:!0,children:(0,j.jsxs)(m.ZP,{beforeIcon:(0,j.jsx)(ie.CK,{inverted:!0}),compact:!0,onClick:function(){return!0},small:!0,warning:!0,children:["Copy ",0===a?"all":1===a?"error":"info"," logs to clipboard"]})})})})]})}),0===a&&t,1===a&&i,2===a&&o]})},nt=t(89565),tt=t.n(nt),ot=t(62302),it=t(40761),rt=t(88494),lt=t(89706),ut=t(65044),ct=t(11498),at=t(74052);function dt(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 st(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?dt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ft,pt,vt={appearAbove:!0,appearBefore:!0,block:!0,size:null,widthFitContent:!0},mt={basic:!0,iconOnly:!0,noPadding:!0,transparent:!0};function ht(e){e.alwaysShowExtraInfo;var n,t,i=e.block,l=(e.blockIndex,e.blockMetadata,e.buttonTabs,e.children,e.childrenBelowTabs,e.collapsed),u=e.contained,a=void 0===u||u,d=e.dynamicBlock,s=e.dynamicChildBlock,p=e.hasError,v=(e.hasOutput,e.hideExtraInfo,e.hideOutput,e.isInProgress,e.mainContainerWidth),x=e.messages,C=e.messagesAll,O=(e.onClickSelectBlock,e.openSidekickView),Z=(e.outputDisplayType,e.outputRowNormalPadding),E=e.pipeline,T=e.runCount,P=e.runEndTime,S=e.runStartTime,_=(e.scrollTogether,e.selected),w=(e.selectedTab,e.setCollapsed),R=e.setErrors,D=e.setOutputBlocks,B=e.setSelectedOutputBlock,N=(e.setSelectedTab,e.showBorderTop,e.sideBySideEnabled),M=(e.sparkEnabled,(0,c.useRef)(null)),F=M.current,G=i||{},H=G.color,z=(G.status,G.type),K=G.uuid,Q=(0,c.useState)(null),W=Q[0],V=Q[1],Y=null===(n=new it.Z)||void 0===n||null===(t=n.decodedToken)||void 0===t?void 0:t.token,q=(0,f.Db)((function(){return ne.ZP.block_outputs.pipelines.downloads.detailAsync(null===E||void 0===E?void 0:E.uuid,K,{token:Y},{onDownloadProgress:function(e){return V((Number((null===e||void 0===e?void 0:e.loaded)||0)/1e6).toFixed(3))},responseType:ct.Eg.BLOB})}),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){(0,at.uS)(e,"".concat(K,".").concat(lt.Lu.CSV))},onErrorCallback:function(e,n){return null===R||void 0===R?void 0:R({errors:n,response:e})}})}}),X=(0,o.Z)(q,2),J=X[0],$=X[1].isLoading,te=(0,c.useCallback)((function(e){return Array.isArray(e)?e.join("\n"):e}),[]),re=(0,c.useMemo)((function(){return(null===x||void 0===x?void 0:x.length)>=1?x.reduce((function(e,n){var t=e.at(-1);if(oe.jU.includes(null===t||void 0===t?void 0:t.type)&&(null===t||void 0===t?void 0:t.type)===n.type&&!te(null===n||void 0===n?void 0:n.data).match(ut.Lz)){if(Array.isArray(t.data))t.data.concat(n.data);else if("string"===typeof t.data){var o=te(n.data)||"";t.data=[t.data,o].join("\n")}}else oe.jU.includes(null===n||void 0===n?void 0:n.type)&&!te(null===n||void 0===n?void 0:n.data).match(ut.Lz)?e.push(st(st({},n),{},{data:te(n.data)})):e.push(st({},n));return e}),[]):C||[]}),[te,x,C]),le=(0,c.useMemo)((function(){return!(null!==x&&void 0!==x&&x.length)&&(null===C||void 0===C?void 0:C.length)>=1}),[x,C]),ue=(0,c.useCallback)((function(e,n){var t=e.columns,o=e.index,i=e.rows,r=e.shape,l=n.borderTop,u=n.selected;return r&&(M.current=r),{borderTop:l,columnHeadersContainEmptyString:null===t||void 0===t?void 0:t.some((function(e){return""===e})),columns:t,index:o,mainContainerWidth:v,rows:i,selected:u,width:v-(2+L.cd*L.iI*2+2+Rn.nn)}}),[v]),ce=(0,c.useMemo)((function(){var e=[],n=[],t=[];return null===re||void 0===re||re.forEach((function(o,i){var l,u,c,d=Array.isArray(o);if(le&&d?(u={columns:["-"],index:0,rows:null===o||void 0===o?void 0:o.map((function(e){return[(0,U.Pb)(e)?JSON.parse(e):e]})),shape:[null===o||void 0===o?void 0:o.length,1]},c=oe.Gi.TABLE):"string"===typeof o?(u=o,c=oe.Gi.TEXT_PLAIN):(u=null===o||void 0===o?void 0:o.data,c=null===o||void 0===o?void 0:o.type),d||u&&0!==(null===(l=u)||void 0===l?void 0:l.length)){var s=[];s=(s=Array.isArray(u)?u:[u]).filter((function(e){return e}));var f=[];s.forEach((function(e){if(c===oe.Gi.TEXT_HTML)f.push(e);else if(e&&"string"===typeof e){var n=e.split("\n");f.push.apply(f,(0,r.Z)(n))}else"object"===typeof f&&f.push(e)}));var p=f.length,v=[];f.forEach((function(e,o){var r,l,u={contained:a,first:0===i&&0===o,last:i===re.length-1&&o===p-1,normalPadding:Z,sideBySideEnabled:N},d=i>=1;if("string"===typeof e&&e.match(ut.Gr)){var s=e.split("\n"),f=[];s.forEach((function(n){if(n.match(ut.Gr)){var o=n.split(ut.Vc),i=o[o.length-1];(0,U.Pb)(i)&&t.push(JSON.parse(i))}else f.push(n);e=f.length>=1?f.join("\n"):null}))}if(null!==e){if("string"===typeof e&&e.match(ut.Lz)){var m=e.split(ut.gr),h=m[m.length-1],b=h.split("FloatProgress");if(m.length>=2&&(h=b[0]),(0,U.Pb)(h)){var x=JSON.parse(h),C=x.data,k=x.type;if(oe.Gi.TABLE===k){var O=ue(C,{borderTop:d,selected:_});n.push(O)}}}else if(c===oe.Gi.TABLE){var y=ue((0,U.Pb)(e)?JSON.parse(e):e,{borderTop:d,selected:_});n.push(y)}else if(oe.jU.includes(c)){var E,T=null===(E=e)||void 0===E?void 0:E.split("\\n");l=(0,j.jsx)(rt.T5,st(st({},u),{},{children:T.map((function(e){return(0,j.jsxs)(g.ZP,{monospace:!0,preWrap:!0,children:[(null===e||void 0===e?void 0:e.length)>=1&&(0,j.jsx)(tt(),{children:e}),!(null!==e&&void 0!==e&&e.length)&&(0,j.jsx)(j.Fragment,{children:"\xa0"})]},e)}))}))}else c===oe.Gi.TEXT_HTML?e&&(l=(0,j.jsx)(rt.T5,st(st({},u),{},{children:(0,j.jsx)(rt.wx,{monospace:!0,children:(0,j.jsx)(ot.Z,{html:e})})}))):c===oe.Gi.IMAGE_PNG&&(null===(r=e)||void 0===r?void 0:r.length)>=1&&(l=(0,j.jsx)("div",{style:{backgroundColor:"white"},children:(0,j.jsx)("img",{alt:"Image ".concat(i," from code output"),src:"data:image/png;base64, ".concat(e)})}));l&&v.push((0,j.jsx)("div",{children:l},"code-output-".concat(i,"-").concat(o)))}})),v.length>=1&&e.push(v)}})),{tableContentData:n,testMessages:t,textContent:e}}),[re,ue,Z,le,N]),ae=ce.tableContentData,se=ce.testMessages,fe=ce.textContent,pe={blockColor:H,blockType:z,dynamicBlock:d,dynamicChildBlock:s,hasError:p,selected:_},ve=(null===F||void 0===F?void 0:F[1])||0,me=ve>30?" (30 out of ".concat(ve," columns displayed)"):"";return{extraInfo:(0,j.jsxs)(rt._A,st(st({},pe),{},{blockType:z,dynamicBlock:d,dynamicChildBlock:s,hasError:p,selected:_,children:[(0,j.jsx)(rt.MB,{}),(0,j.jsxs)(h.ZP,{justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{alignItems:"center",px:1,children:[w&&(0,j.jsx)(m.ZP,st(st({},mt),{},{onClick:function(){return w(!l)},children:l?(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie._M,{muted:!0,size:2*L.iI}),"\xa0",(0,j.jsx)(g.ZP,{default:!0,children:"Expand output"})]}):(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie.Kh,{muted:!0,size:2*L.iI}),F&&(0,j.jsx)(b.Z,{ml:2,children:(0,j.jsx)(g.ZP,{children:"".concat(F[0]," rows x ").concat(F[1]," columns").concat(me)})})]})})),!w&&(0,j.jsx)(h.ZP,{alignItems:"center",children:F&&(0,j.jsx)(b.Z,{pl:1,children:(0,j.jsx)(g.ZP,{children:"".concat(F[0]," rows x ").concat(F[1]," columns").concat(me)})})})]}),(0,j.jsx)(rt.a3,{children:(0,j.jsxs)(h.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,j.jsx)(ee.Z,st(st({},vt),{},{label:T>=1&&S?"Last run at ".concat(new Date(S.valueOf()).toLocaleString()):p?"Block executed with errors":"Block executed successfully",children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[T>=1&&Number(P)>Number(S)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(g.ZP,{small:!0,children:[(Number(P)-Number(S))/1e3,"s"]}),(0,j.jsx)(b.Z,{mr:1})]}),!p&&(0,j.jsx)(ie.Jr,{size:2*L.iI,success:!0}),p&&(0,j.jsx)(A.Z,{danger:!0,size:2*L.iI,children:(0,j.jsx)(g.ZP,{bold:!0,monospace:!0,small:!0,children:"!"})})]})})),!p&&!I.Qj.includes(z)&&(0,j.jsx)(b.Z,{pl:2,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ee.Z,st(st({},vt),{},{label:"Expand table",children:(0,j.jsx)(m.ZP,st(st({},mt),{},{onClick:function(){(0,at.OF)(null===E||void 0===E?void 0:E.uuid,K),null===O||void 0===O||O(y.cH.DATA),null===D||void 0===D||D((function(e){return e.find((function(e){return e.uuid===K}))?e:(null===B||void 0===B||B(i),e.concat(i))}))},children:(0,j.jsx)(ie.M0,{muted:!0,size:1.75*L.iI})}))})),(0,j.jsx)(b.Z,{pl:2}),(0,j.jsx)(ee.Z,st(st({},vt),{},{forceVisible:$,label:$?"".concat(W||0,"mb downloaded..."):"Save output as CSV file",children:(0,j.jsx)(m.ZP,st(st({},mt),{},{compact:!0,loading:$,onClick:function(){V(null),J()},children:(0,j.jsx)(ie.vc,{muted:!0,size:1.75*L.iI})}))}))]})})]})})]})]})),tableContentData:ae,testMessages:se,textContent:fe}}function bt(e){var n=e.configuration;return null!==n&&void 0!==n&&n[N.eW]?null!==n&&void 0!==n&&n[N.Mv]?void 0:{displayMessage:"dbt profile target is missing from block\u2019s configuration. Please click the configuration tab and select a profile target."}:{displayMessage:"dbt project name is missing from block\u2019s configuration. Please click the configuration tab and select a project."}}!function(e){e.CODE="code",e.CONFIGURATION="configuration",e.LINEAGE="lineage",e.OVERVIEW="overview"}(ft||(ft={})),function(e){e.LOGS="execution logs",e.OUTPUT="output data"}(pt||(pt={}));var gt=a.default.div.withConfig({displayName:"indexstyle__SubheaderMenuStyle",componentId:"sc-qef3pm-0"})([""," border-left-style:solid;border-left-width:","px;border-right-style:solid;border-right-width:","px;",""],x.Kf,ln.mP,ln.mP,(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.dashboard,";\n top: ").concat(e.top+ln.mP,"px;\n ")})),xt=a.default.div.withConfig({displayName:"indexstyle__WrapperStyle",componentId:"sc-qef3pm-1"})([""," border-left-style:solid;border-left-width:","px;border-right-style:solid;border-right-width:","px;min-height:","px;overflow:hidden;"," ",""],x.Kf,ln.mP,ln.mP,5*L.iI,(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.codeArea,";\n ")}),(function(e){return e.borderBottom&&"\n border-bottom-left-radius: ".concat(ln.n_,"px;\n border-bottom-right-radius: ").concat(ln.n_,"px;\n border-bottom-style: solid;\n border-bottom-width: ").concat(ln.mP,"px;\n ")}));function jt(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 Ct(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var kt=function(e){var n=e.block,t=e.blockIndex,o=(e.blockOutputRef,e.blocks),r=e.collapsed,l=e.errorMessages,u=e.executionState,a=e.headerRef,d=e.isHidden,s=e.mainContainerWidth,f=e.menuGroups,p=e.messages,v=e.openSidekickView,m=e.pipeline,b=e.runCount,g=e.runEndTime,C=e.runStartTime,k=e.runningBlocks,O=e.scrollTogether,y=e.selected,Z=e.selectedOutputTabs,E=e.setErrors,T=e.setOutputBlocks,P=e.setSelectedOutputBlock,S=e.setSelectedOutputTabs,I=e.sideBySideEnabled,w=e.subheaderVisible,A=e.tabs,R=e.theme,D=(0,c.useState)(0),B=D[0],N=D[1],M=(0,c.useRef)(null);(0,c.useEffect)((function(){setTimeout((function(){var e,n;return N(null===a||void 0===a||null===(e=a.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)}),1)}),[w]),(0,c.useEffect)((function(){if(null!==A&&void 0!==A&&A.length&&!Z){var e=A[0];null===S||void 0===S||S((function(n){return(0,i.Z)({},null===e||void 0===e?void 0:e.uuid,e)}))}}),[]);var F=(0,x.qn)(null===n||void 0===n?void 0:n.type,{blockColor:null===n||void 0===n?void 0:n.color,theme:R}),G=(0,c.useMemo)((function(){return(0,ce.h5)(p,l)}),[l,p]),H=function(e,n){var t,o=[],i=[],r=[],l=(0,ce.h5)(e,n);null===l||void 0===l||l.forEach((function(e){null!==e&&void 0!==e&&e.error?(r.push(e),o.push(null===e||void 0===e?void 0:e.error)):(i.push(e),o.push(null===e||void 0===e?void 0:e.data))}));var u=null===r||void 0===r?void 0:r.reduce((function(e,n){var t=n.error;return e.concat(t)}),[]),c=null===u||void 0===u?void 0:u.map((function(e){return(0,U.Si)((0,U.c0)(e))})),a=null===i||void 0===i?void 0:i.reduce((function(e,n){var t=n.data;return Array.isArray(t)&&null!==t&&void 0!==t&&t.every((function(e){return"string"===typeof e}))?e.concat(t):e}),[]),d=null===a||void 0===a?void 0:a.map((function(e){return(0,U.Si)((0,U.c0)(e))}));return{allContentCleaned:null===o||void 0===o||null===(t=o.reduce((function(e,n){return Array.isArray(n)&&null!==n&&void 0!==n&&n.every((function(e){return"string"===typeof e}))?e.concat(n):e}),[]))||void 0===t?void 0:t.map((function(e){return(0,U.Si)((0,U.c0)(e))})),errors:u,errorsCleaned:c,info:a,infoCleaned:d,withError:r,withoutError:i}}(G,l),z=H.allContentCleaned,K=(H.errors,H.errorsCleaned),Q=(H.info,H.infoCleaned),W=H.withError,V=H.withoutError,Y=(0,ce.oI)(G),q=Y.hasError,X=Y.hasOutput,J=(0,c.useMemo)((function(){return X||(null===p||void 0===p?void 0:p.length)>=1}),[X,p]);(0,c.useEffect)((function(){q&&!(pt.LOGS in(Z||{}))&&(null===S||void 0===S||S((function(e){return Ct(Ct({},e),{},(0,i.Z)({},pt.LOGS,{uuid:pt.LOGS}))})))}),[q]);var $=!(null===k||void 0===k||!k.find((function(e){return e.uuid===(null===n||void 0===n?void 0:n.uuid)})))||(null===p||void 0===p?void 0:p.length)>=1&&oe.uF.IDLE!==u,ee=(0,Ze.cU)([n],o)[0].reduceOutputUpstreamBlock,ne=(0,c.useMemo)((function(){return(0,ce._o)({block:n,dynamic:(0,Ze.vV)(n),dynamicUpstreamBlock:(0,Ze.be)(n),hasError:q,reduceOutput:(0,Ze.kW)(n),reduceOutputUpstreamBlock:ee,selected:y})}),[n,q,y]),te=ne.borderColorShareProps,ie=(ne.tags,(0,c.useMemo)((function(){return(null===f||void 0===f?void 0:f.length)>=1&&(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(null===A||void 0===A?void 0:A.length)>=1?(0,j.jsx)(_.Z,{allowScroll:!0,multiSelection:!0,onClickTab:function(e){null===S||void 0===S||S((function(n){var t,o=Ct({},n||{});o&&(null===e||void 0===e?void 0:e.uuid)in o?(null===(t=Object.keys(o))||void 0===t?void 0:t.length)>=2&&delete o[null===e||void 0===e?void 0:e.uuid]:o[null===e||void 0===e?void 0:e.uuid]=e;return o}))},selectedTabUUIDs:Z,tabs:A,underlineColor:null===F||void 0===F?void 0:F.accent,underlineStyle:!0}):(0,j.jsx)("div",{}),(null===A||void 0===A?void 0:A.length)>=1?(0,j.jsx)(Zn.Z,{defaultTextContent:!0,menuGroups:f,rightOffset:0}):(0,j.jsx)(gt,{children:(0,j.jsx)(Zn.Z,{defaultTextContent:!0,menuGroups:f,rightOffset:0})})]})}),[F,f,Z,S,A])),re=(0,c.useMemo)((function(){return Ct(Ct({},te),{},{alwaysShowExtraInfo:!0,block:n,blockIndex:t,collapsed:r,hasOutput:J,isInProgress:$,mainContainerWidth:s,messages:G,messagesAll:p,openSidekickView:v,outputRowNormalPadding:!0,pipeline:m,runCount:b,runEndTime:g,runStartTime:C,scrollTogether:O,selected:y&&(!d||!I),setErrors:E,setOutputBlocks:T,setSelectedOutputBlock:P,showBorderTop:I,sideBySideEnabled:I})}),[n,t,te,r,J,d,$,s,p,G,v,m,b,g,C,O,y,E,T,P,I,I]),le=ht(re),ue=le.extraInfo,ae=le.tableContentData,de=(le.testMessages,le.textContent),se=ht(Ct(Ct({},re),{},{messages:(null===W||void 0===W?void 0:W.length)>=1?W:[]})).textContent,fe=ht(Ct(Ct({},re),{},{messages:(null===V||void 0===V?void 0:V.length)>=1?V:[]})).textContent,pe=(0,c.useMemo)((function(){var e=[];return pt.OUTPUT in(Z||{})&&(null===ae||void 0===ae?void 0:ae.length)>=1&&e.push(null===ae||void 0===ae?void 0:ae.map((function(e){return{render:function(n){n.numberOfColumns;var t,o,i=n.columnWidth;n.width;return(0,j.jsx)(Vn.Z,{columns:null===e||void 0===e?void 0:e.columns,disableScrolling:!y,index:null===e||void 0===e?void 0:e.index,maxHeight:(null===de||void 0===de?void 0:de.length)>=1?null===M||void 0===M||null===(t=M.current)||void 0===t||null===(o=t.getBoundingClientRect())||void 0===o?void 0:o.height:60*L.iI,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,noBorderTop:!(null!==e&&void 0!==e&&e.borderTop),rows:null===e||void 0===e?void 0:e.rows,width:i},"data-table-".concat(null===e||void 0===e?void 0:e.index))}}}))),pt.LOGS in(Z||{})&&e.push([{render:function(){var e;return(0,j.jsxs)("div",{ref:M,style:{width:"100%"},children:[1===(null===(e=Object.keys(Z||{}))||void 0===e?void 0:e.length)&&(0,j.jsx)(ge.Z,{light:!0}),(0,j.jsx)(et,{allContentCleaned:z,contentAll:de,contentNoErrors:fe,contentWithErrors:se,errorsCleaned:K,infoCleaned:Q})]})}}]),e}),[y,Z,ae,de,se,fe]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(gt,Ct(Ct({},te),{},{top:B,children:[(0,j.jsx)(ge.Z,{light:!0}),ie]})),(0,j.jsx)(xt,Ct(Ct({borderBottom:!ue},te),{},{children:(0,j.jsx)(Jn,{columnsOfItems:pe,dividerBackgroundColor:null===F||void 0===F?void 0:F.accentLight,dividerBackgroundColorHover:null===F||void 0===F?void 0:F.accent,uuid:"".concat(null===m||void 0===m?void 0:m.uuid,"_").concat(null===n||void 0===n?void 0:n.uuid),width:s-(2*L.cd*L.iI+2*ln.mP+Rn.nn)})})),ue]})},Ot=a.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1rm42ok-0"})(["display:flex;position:relative;width:100%;",""],(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.dashboard,";\n ")})),yt=a.default.div.withConfig({displayName:"indexstyle__MenuStyle",componentId:"sc-1rm42ok-1"})(["min-width:","px;"],40*L.iI),Zt=a.default.div.withConfig({displayName:"indexstyle__EditorStyle",componentId:"sc-1rm42ok-2"})(["padding-bottom:","px;padding-top:","px;position:relative;"," ",""],L.cd*L.iI,L.cd*L.iI,(function(e){return"\n background-color: ".concat((e.theme||te.Z).background.codeTextarea,";\n ")}),(function(e){return!e.solo&&"\n max-width: 100%;\n width: 100%;\n "}));var Et=function(e){var n=e.children,t=e.renderTabContent,o=e.selectedHeaderTab,i=e.sideMenuVisible,r=(0,c.useMemo)((function(){var e=i?n:(0,j.jsx)(Zt,{solo:!0,children:n});return t&&o?t(o,e):e}),[n,t,o,i]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Ot,{children:i&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(yt,{children:(0,j.jsx)(h.ZP,{flexDirection:"column",children:(0,j.jsx)(b.Z,{p:L.cd,children:(0,j.jsx)(g.ZP,{children:"Space for a menu"})})})}),(0,j.jsx)(Zt,{children:r})]})}),!i&&r]})},Tt=t(88543);function Pt(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 St(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var It=function(e){var n,t,o,r,l,u,a,d=e.block,s=e.pipeline,f=e.savePipelineContent,p=(0,c.useState)(d),v=p[0],g=p[1],x=ne.ZP.configuration_options.pipelines.list(null===s||void 0===s?void 0:s.uuid,{configuration_type:ve.DBT,option_type:me.PROJECTS,resource_type:he.Block,resource_uuid:I.t6.SQL===(null===d||void 0===d?void 0:d.language)?null===d||void 0===d?void 0:d.uuid:null},{revalidateOnFocus:!1}).data,C=(0,c.useMemo)((function(){return null===x||void 0===x?void 0:x.configuration_options}),[x]),k=(0,c.useMemo)((function(){var e;return null===C||void 0===C||null===(e=C.find((function(e){var n,t,o=e.option;return(null===v||void 0===v||null===(n=v.configuration)||void 0===n?void 0:n[N.eW])===(null===o||void 0===o||null===(t=o.project)||void 0===t?void 0:t.name)})))||void 0===e?void 0:e.option}),[v,C]),O=(0,c.useMemo)((function(){return(null===k||void 0===k?void 0:k.profiles)||[]}),[k]),y=(0,c.useMemo)((function(){return null===O||void 0===O?void 0:O.find((function(e){var n;e.full_path;return null===v||void 0===v||null===(n=v.configuration)||void 0===n?void 0:n[N.yY]}))}),[v,O]),Z=(0,c.useMemo)((function(){return null===y||void 0===y?void 0:y.targets}),[y]);return(0,j.jsxs)(b.Z,{p:L.cd,children:[(0,j.jsxs)(Tt.Z,{title:"Configuration",children:[(0,j.jsx)(Tt.S,{title:"Project",invalid:!(null!==v&&void 0!==v&&null!==(n=v.configuration)&&void 0!==n&&n[N.eW]),selectInput:{monospace:!0,onChange:function(e){return g((function(n){return St(St({},n),{},{configuration:St(St({},(null===n||void 0===n?void 0:n.configuration)||{}),{},(0,i.Z)({},N.eW,e.target.value))})}))},options:null===C||void 0===C?void 0:C.map((function(e){var n,t,o=e.option;return{label:null===o||void 0===o||null===(n=o.project)||void 0===n?void 0:n.name,value:null===o||void 0===o||null===(t=o.project)||void 0===t?void 0:t.name}})),placeholder:"Select project",value:null===v||void 0===v||null===(t=v.configuration)||void 0===t?void 0:t[N.eW]}}),(0,j.jsx)(Tt.S,{title:"Profile",invalid:!(null!==v&&void 0!==v&&null!==(o=v.configuration)&&void 0!==o&&o[N.yY]),selectInput:{monospace:!0,onChange:function(e){return g((function(n){return St(St({},n),{},{configuration:St(St({},(null===n||void 0===n?void 0:n.configuration)||{}),{},(0,i.Z)({},N.yY,e.target.value))})}))},options:null===O||void 0===O?void 0:O.map((function(e){var n=e.full_path;return{label:n,value:n}})),placeholder:"Select profile",value:null===v||void 0===v||null===(r=v.configuration)||void 0===r?void 0:r[N.yY]}}),(0,j.jsx)(Tt.S,{title:"Target",invalid:!(null!==v&&void 0!==v&&null!==(l=v.configuration)&&void 0!==l&&l[N.Mv]),selectInput:{monospace:!0,onChange:function(e){return g((function(n){return St(St({},n),{},{configuration:St(St({},(null===n||void 0===n?void 0:n.configuration)||{}),{},(0,i.Z)({},N.Mv,e.target.value))})}))},options:null===Z||void 0===Z?void 0:Z.map((function(e){return{label:e,value:e}})),placeholder:"Select target",value:null===v||void 0===v||null===(u=v.configuration)||void 0===u?void 0:u[N.Mv]}}),(0,j.jsx)(Tt.S,{title:"Preview query result limit",description:"Limit the number of rows that are fetched when compiling and previewing.",textInput:{fullWidth:!0,monospace:!0,onChange:function(e){return g((function(n){return St(St({},n),{},{configuration:St(St({},(null===n||void 0===n?void 0:n.configuration)||{}),{},(0,i.Z)({},N.mW,e.target.value))})}))},type:"number",placeholder:"e.g. 1000",value:null===v||void 0===v||null===(a=v.configuration)||void 0===a?void 0:a[N.mW]}})]}),(0,j.jsx)(b.Z,{mt:L.cd,children:(0,j.jsx)(h.ZP,{justifyContent:"flex-end",children:(0,j.jsx)(m.ZP,{onClick:function(){f({block:{configuration:null===v||void 0===v?void 0:v.configuration,uuid:null===d||void 0===d?void 0:d.uuid}})},primary:!0,children:"Save configuration"})})})]})},_t=t(83905),wt=t(24138);var At,Rt=function(e){var n,t,o,i=e.block,r=(null===i||void 0===i?void 0:i.configuration)||{},l=(null===r||void 0===r?void 0:r.file_path)||(null===r||void 0===r||null===(n=r.file_source)||void 0===n?void 0:n.path),u={item_type:_t.N.DBT,project_path:null===r||void 0===r?void 0:r[N.eW]},c=ne.ZP.cache_items.detail(encodeURIComponent(l),u,{pauseFetch:!(null!==r&&void 0!==r&&null!==(t=r[N.eW])&&void 0!==t&&t.length)}).data,a=null===c||void 0===c?void 0:c.cache_item,d=(null===a||void 0===a||null===(o=a.item)||void 0===o?void 0:o.upstream_blocks)||[];return(0,j.jsx)(j.Fragment,{children:(null===d||void 0===d?void 0:d.length)>=1&&(0,j.jsx)(wt.ZP,{disabled:!0,enablePorts:!1,height:80*L.iI,pannable:!0,pipeline:{blocks:d,uuid:null},zoomable:!0})})};!function(e){e.BUILD="build",e.EXECUTE="execute",e.EXECUTE_CANCEL="execute_cancel",e.RUN="run",e.RUN_UPSTREAM="run_upstream",e.TEST="test"}(At||(At={}));var Dt=t(37529);function Bt(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 Nt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Bt(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Bt(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Mt={default:!0,size:Bn};function Lt(e){var n,t,o,r,l,u=e.addNewBlock,c=e.allowCodeBlockShortcuts,a=e.block,d=e.codeCollapsed,s=e.deleteBlock,f=e.disableShortcuts,p=(e.executionState,e.hideRunButton),v=e.interruptKernel,m=e.openSidekickView,C=e.outputCollapsed,k=e.pipeline,Z=e.runBlockAndTrack,E=e.savePipelineContent,T=e.scrollTogether,P=e.setCodeCollapsed,S=e.setErrors,_=e.setHiddenBlocks,w=e.setOutputCollapsed,A=e.setScrollTogether,R=e.setSideBySideEnabled,D=e.sideBySideEnabled,B=e.theme,N=e.updatePipeline,M=a.color,L=a.configuration,U=a.replicated_block,F=a.type,G=a.uuid,H=L||{},z=H.dynamic,K=H.reduce_output,Q=(0,x.qn)(F,{blockColor:M,theme:B}),W=null===L||void 0===L||null===(n=L.file_source)||void 0===n?void 0:n.project_path,V=G;W&&(null!==(r=V=null===(o=V)||void 0===o?void 0:o.replace(W,""))&&void 0!==r&&r.startsWith(On.sep)&&(V=null===(l=V)||void 0===l?void 0:l.slice(1)));var q=(null===L||void 0===L?void 0:L.file_path)||(null===L||void 0===L||null===(t=L.file_source)||void 0===t?void 0:t.path);function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{setSelectedHeaderTab:null},n=e.setSelectedHeaderTab,t=bt(a);return!t||(n&&(t.links=[{closeAfterClick:!0,label:"Continue dbt configuration",onClick:function(){return null===n||void 0===n?void 0:n(null===J||void 0===J?void 0:J.find((function(e){return ft.CONFIGURATION===e.uuid})))}}]),S(t),!1)}var J=function(e){var n=e.block;return[{uuid:ft.CODE},{icon:bt(n)?(0,j.jsx)(ie.uy,{danger:!0}):null,uuid:ft.CONFIGURATION},{uuid:ft.LINEAGE}]}({block:a}),$=function(e){return e.block,[{uuid:pt.OUTPUT},{uuid:pt.LOGS}]}({block:a}),ee=c||!f,ne={color:null===Q||void 0===Q?void 0:Q.accent,description:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(Y.Z,{addPlusSignBetweenKeys:!0,keyTextGroups:[[le.RJ,le.Lz]]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,children:"Compile SQL and excute query for sample data."})]}),disabled:function(e){return e.active},icon:(0,j.jsx)(ie.Py,{size:Dn}),keyTextsPosition:rn.Yo.LEFT,keyboardShortcutValidation:ee?function(e,n,t){e.keyHistory;var o=e.keyMapping;return t.selected&&((0,mn.y)([le.zX,le.Uq],o)||(0,mn.y)([le.PQ,le.Uq],o))}:null,label:function(){return"Preview"},onClick:function(e){X(e)&&Z({block:a})},uuid:At.EXECUTE},te={color:null===Q||void 0===Q?void 0:Q.accent,description:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(Y.Z,{addPlusSignBetweenKeys:!0,keyTextGroups:[[le.kA],[le.kA]]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,children:"Interrupt kernel and cancel execution"})]}),icon:(0,j.jsx)(ie.GE,{active:!0,size:Dn}),keyTextsPosition:rn.Yo.RIGHT,keyboardShortcutValidation:ee?function(e,n,t){var o=e.keyHistory;return t.selected&&o[0]===le.xD&&o[1]===le.xD}:null,onClick:v,uuid:At.EXECUTE_CANCEL,visible:function(e){return e.active}},oe={Icon:ie.AQ,description:"Run model",disabled:function(e){return e.active},label:function(){return"Run"},onClick:function(e){X(e)&&Z({block:a,runSettings:{run_model:!0}})},uuid:At.RUN},re={Icon:ie.ug,description:"Test model",disabled:function(e){return e.active},label:function(){return"Test"},onClick:function(e){X(e)&&Z({block:a,runSettings:{test_model:!0}})},uuid:At.TEST},ue={Icon:ie.Nd,description:"Build model",disabled:function(e){return e.active},label:function(){return"Build"},onClick:function(e){X(e)&&Z({block:a,runSettings:{build_model:!0}})},uuid:At.BUILD},ce=[{uuid:"Execute",items:[{beforeIcon:(0,j.jsx)(ie.uk,Nt({},Mt)),uuid:"Run all upstream blocks then execute",onClick:function(e){X(e)&&Z({block:a,runUpstream:!0})}},{beforeIcon:(0,j.jsx)(ie.uk,Nt({},Mt)),uuid:"Run incomplete upstream blocks then execute",onClick:function(e){X(e)&&Z({block:a,runIncompleteUpstream:!0})}},{beforeIcon:(0,j.jsx)(ie.g,Nt({},Mt)),uuid:"Execute then run downstream blocks",onClick:function(e){X(e)&&Z({block:a,runDownstream:!0})}},{beforeIcon:(0,j.jsx)(ie.ug,Nt({},Mt)),label:function(){return(0,j.jsxs)(g.ZP,{children:["Run ",(0,j.jsx)(g.ZP,{color:null===Q||void 0===Q?void 0:Q.accent,inline:!0,monospace:!0,children:"@tests"})," defined in block"]})},leftAligned:!0,uuid:"Run @tests defined in block",onClick:function(e){X(e)&&Z({block:a,runTests:!0})}}]},{uuid:"Enhance",items:[{isGroupingTitle:!0,uuid:"Dynamic"},{beforeIcon:(0,j.jsx)(ie.g,Nt({success:z},Mt)),disabled:z,uuid:"Set block as dynamic",onClick:function(){return E({block:Nt(Nt({},a),{},{configuration:Nt(Nt({},L),{},{dynamic:!0})})})}},{beforeIcon:(0,j.jsx)(ie.x8,Nt({disabled:!z},Mt)),disabled:!z,uuid:"Disable block as dynamic",onClick:function(){return E({block:Nt(Nt({},a),{},{configuration:Nt(Nt({},L),{},{dynamic:!1})})})}},{beforeIcon:(0,j.jsx)(ie.wn,Nt({success:K},Mt)),uuid:"Reduce output",disabled:K,onClick:function(){return E({block:Nt(Nt({},a),{},{configuration:Nt(Nt({},L),{},{reduce_output:!0})})})}},{beforeIcon:(0,j.jsx)(ie.x8,Nt({disabled:!K},Mt)),uuid:"Don\u2019t reduce output",disabled:!K,onClick:function(){return E({block:Nt(Nt({},a),{},{configuration:Nt(Nt({},L),{},{reduce_output:!1})})})}}]},{uuid:"Blocks",items:[{beforeIcon:(0,j.jsx)(ie.uk,Nt({},Mt)),uuid:"Add upstream models",tooltip:function(){return"Add upstream models for this model to the pipeline."},onClick:function(){return N({pipeline:{add_upstream_for_block_uuid:G}})}},{beforeIcon:(0,j.jsx)(ie.hW,Nt({},Mt)),uuid:"Add conditional",onClick:function(){return m(y.cH.ADDON_BLOCKS,!0,{addon:O.Q.CONDITIONAL,blockUUID:null===a||void 0===a?void 0:a.uuid})}},{beforeIcon:(0,j.jsx)(ie.AQ,Nt({},Mt)),uuid:"Add callback",onClick:function(){return m(y.cH.ADDON_BLOCKS,!0,{addon:O.Q.CALLBACK,blockUUID:null===a||void 0===a?void 0:a.uuid})}},{beforeIcon:(0,j.jsx)(ie.jt,Nt({},Mt)),uuid:"Add power up",onClick:function(){return m(y.cH.EXTENSIONS,!0)}},{beforeIcon:(0,j.jsx)(ie.yd,Nt({},Mt)),uuid:"Add/Edit interactions",onClick:function(){return m(y.cH.INTERACTIONS,!0)}},{beforeIcon:(0,j.jsx)(ie.GQ,Nt({},Mt)),uuid:"Add charts",onClick:function(){return m(y.cH.CHARTS,!0)}}]},{uuid:"Edit",items:[{beforeIcon:(0,j.jsx)(ie.KJ,Nt({},Mt)),uuid:"Change name",onClick:function(){return m(y.cH.BLOCK_SETTINGS,!0)}},{beforeIcon:(0,j.jsx)(ie.I8,Nt({},Mt)),uuid:"Change color",onClick:function(){return m(y.cH.BLOCK_SETTINGS,!0)}},{beforeIcon:(0,j.jsx)(ie.JG,Nt({},Mt)),uuid:"All settings",onClick:function(){return m(y.cH.BLOCK_SETTINGS,!0)}},{beforeIcon:(0,j.jsx)(ie.V3,Nt({disabled:!!U},Mt)),uuid:"Replicate block",disabled:!!U,onClick:function(){return u({replicated_block:G})}},{beforeIcon:(0,j.jsx)(ie.rF,Nt({},Mt)),uuid:"Delete block",onClick:function(){s(a)}}]},{uuid:"View",items:[{beforeIcon:(0,j.jsx)(ie.G8,Nt({},Mt)),uuid:"Hide block",onClick:function(){_((function(e){return Nt(Nt({},e),{},(0,i.Z)({},G,a))}))}},{disabled:d,beforeIcon:(0,j.jsx)(ie.Kh,Nt({disabled:d},Mt)),uuid:"Collapse code",onClick:function(){return P(!0)}},{disabled:!d,beforeIcon:(0,j.jsx)(ie._M,Nt({disabled:!d},Mt)),uuid:"Expand code",onClick:function(){return P(!1)}},{disabled:C,beforeIcon:(0,j.jsx)(ie.Kh,Nt({disabled:C},Mt)),uuid:"Collapse output",onClick:function(){return w(!0)}},{disabled:!C,beforeIcon:(0,j.jsx)(ie._M,Nt({disabled:!C},Mt)),uuid:"Expand output",onClick:function(){return w(!1)}},{isGroupingTitle:!0,uuid:"Split view"},{disabled:!D,beforeIcon:(0,j.jsx)(ie.vR,Nt({disabled:!D},Mt)),uuid:"Show output below block",onClick:function(){return R(!1)}},{disabled:D,beforeIcon:(0,j.jsx)(ie.lx,Nt({success:D,disabled:D},Mt)),uuid:"Show output next to code (beta)",onClick:function(){return R(!0)}},{disabled:!D||T,beforeIcon:(0,j.jsx)(ie.lx,Nt({success:T,disabled:!D||T},Mt)),uuid:"Scroll output alongside code (beta)",onClick:function(){return A(!0)}}]},{uuid:"Support",items:[{beforeIcon:(0,j.jsx)(ie.en,Nt({},Mt)),uuid:"Live chat 24/7",linkProps:{href:"https://mage.ai/chat",openNewWindow:!0}},{beforeIcon:(0,j.jsx)(ie.$l,Nt({},Mt)),uuid:"Developer documentation",linkProps:{href:"https://docs.mage.ai",openNewWindow:!0}}]}],ae=[{uuid:"Explore data",items:[{beforeIcon:(0,j.jsx)(ie.$l,Nt({},Mt)),uuid:"Play with data in a scratchpad",onClick:function(){return u({content:'"""\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"""\nfrom mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable(\''.concat(k.uuid,"', '").concat(a.uuid,"', 'output_0')\n"),language:I.t6.PYTHON,type:I.tf.SCRATCHPAD})}},{beforeIcon:(0,j.jsx)(ie.GQ,Nt({},Mt)),uuid:"Visualize output data",onClick:function(){return m(y.cH.CHARTS,!0)}}]}];return{editor:{shortcuts:p&&ee?[]:[function(e,n){return(0,Dt.Q)(e,(function(){X()&&Z({block:a,code:n.getValue()})}))}]},header:{buttons:[ne,oe,re,ue,te],menuGroups:ce,subheaderVisibleDefault:function(e){return null===e||void 0===e||!e.status||I.DA.NOT_EXECUTED===(null===e||void 0===e?void 0:e.status)||(!!bt(e)||void 0)},subtitle:q,tabs:J,title:V},headerTabContent:{renderTabContent:function(e,n){return ft.CONFIGURATION===(null===e||void 0===e?void 0:e.uuid)?(0,j.jsx)(It,{block:a,pipeline:k,savePipelineContent:E}):ft.LINEAGE===(null===e||void 0===e?void 0:e.uuid)?(0,j.jsx)(Rt,{block:a}):n}},output:{menuGroups:ae,tabs:$}}}var Ut=t(77417);function Ft(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 Gt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ft(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ft(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ht=t(98464),zt=t(19698),Kt=t(98777),Qt=t(84438),Wt=t(92709),Vt=t(89678),Yt=t(38399),qt=t(22286),Xt=t(44375),Jt=t(15752),$t=t(42122);function eo(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 no(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eo(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eo(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var to=1e3;function oo(e,n){var t,l,C=e.addNewBlock,O=e.addNewBlockMenuOpenIdx,E=e.addWidget,T=e.allBlocks,B=e.allowCodeBlockShortcuts,M=e.autocompleteItems,F=e.block,G=e.blockIdx,H=e.blockInteractions,z=e.blockOutputRef,K=e.blockRefs,Q=e.blockTemplates,W=e.blocks,Y=void 0===W?[]:W,q=e.children,J=e.containerRef,te=e.cursorHeight1,ae=e.cursorHeight2,se=e.cursorHeight3,fe=e.dataProviders,pe=e.defaultValue,xe=void 0===pe?"":pe,je=e.deleteBlock,Ce=e.disableDrag,ke=e.disableShortcuts,Oe=e.executionState,ye=e.extraContent,Ee=e.fetchFileTree,Te=e.fetchPipeline,we=e.globalDataProducts,Ae=e.height,Re=e.hideExtraCommandButtons,Le=e.hideExtraConfiguration,Fe=e.hideHeaderInteractiveInformation,Ge=e.hideRunButton,He=e.interactionsMapping,Ke=e.interruptKernel,We=e.isHidden,Xe=e.mainContainerRect,Je=e.mainContainerRef,tn=e.mainContainerWidth,on=e.messages,rn=void 0===on?[]:on,ln=e.noDivider,un=e.onCallbackChange,cn=e.onChange,an=e.onClickAddSingleDBTModel,dn=e.onDrop,sn=e.openSidekickView,fn=e.pipeline,pn=e.project,bn=e.runBlock,gn=e.runningBlocks,xn=e.savePipelineContent,jn=e.scrollTogether,Cn=e.selected,On=e.setAddNewBlockMenuOpenIdx,yn=e.setAnyInputFocused,Zn=e.setCreatingNewDBTModel,En=e.setEditingBlock,Tn=e.setErrors,Pn=e.setHiddenBlocks,Sn=(e.setMountedBlocks,e.setOutputBlocks),In=e.setSelected,_n=e.setSelectedBlock,wn=e.setSelectedOutputBlock,An=e.setTextareaFocused,Dn=e.setScrollTogether,Bn=e.setSideBySideEnabled,Nn=e.showBlockBrowserModal,Mn=e.showBrowseTemplates,Ln=e.showConfigureProjectModal,Un=e.showDataIntegrationModal,Fn=e.showGlobalDataProducts,Gn=e.showUpdateBlockModal,Hn=e.sideBySideEnabled,zn=e.textareaFocused,Kn=e.updatePipeline,Qn=e.widgets,Vn=e.windowWidth,Yn=(0,c.useContext)(a.ThemeContext),qn=(0,c.useRef)(null),Xn=(0,c.useRef)(null),Jn=(0,c.useRef)(null),$n=(0,c.useRef)(null),et=(0,Ut.Z)(),nt=et.featureEnabled,tt=et.featureUUIDs,ot=et.sparkEnabled,it=(0,zt.Z)().status,lt=(0,c.useMemo)((function(){return null===nt||void 0===nt?void 0:nt(tt.CODE_BLOCK_V2)}),[nt,tt]),ut=(0,c.useState)(!1),ct=ut[0],dt=ut[1],st=(0,c.useState)(0),ft=st[0],pt=st[1],vt=(0,c.useState)(!1),mt=vt[0],ht=vt[1],bt=(0,c.useCallback)((function(){var e=new CustomEvent(Wt.$e,{detail:{blockIndex:G}});window.dispatchEvent(e)}),[G]),gt=(0,c.useCallback)((function(){var e=new CustomEvent(Wt.tK,{detail:{blockIndex:G}});window.dispatchEvent(e)}),[G]),xt=(0,c.useCallback)((function(e){Pn&&(null===Pn||void 0===Pn||Pn(e),clearTimeout($n.current),$n.current=setTimeout((function(){gt(),bt()}),Kt.e+1))}),[bt,gt,Pn]);(0,c.useEffect)((function(){var e=function(e){var n,t=null===Jn||void 0===Jn||null===(n=Jn.current)||void 0===n?void 0:n.getBoundingClientRect();t&&(null===e||void 0===e?void 0:e.clientX)>=(null===t||void 0===t?void 0:t.x)&&(null===e||void 0===e?void 0:e.clientX)<=(null===t||void 0===t?void 0:t.x)+(null===t||void 0===t?void 0:t.width)&&(null===e||void 0===e?void 0:e.clientY)>=(null===t||void 0===t?void 0:t.y)&&(null===e||void 0===e?void 0:e.clientY)<=(null===t||void 0===t?void 0:t.y)+(null===t||void 0===t?void 0:t.height)&&(clearTimeout($n.current),$n.current=setTimeout(gt,Kt.e+1))};return ct&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[gt,ct]),(0,c.useEffect)((function(){mt&&Hn&&bt()}),[mt,jn,Hn]);var jt=(0,c.useMemo)((function(){var e;return!(null===pn||void 0===pn||null===(e=pn.features)||void 0===e||!e[Ne.d.INTERACTIONS])}),[null===pn||void 0===pn?void 0:pn.features]),Ct=(0,c.useCallback)((function(e){var n,t,o,i,l=e.columnScrolling,u=e.refCursor,c=e.refCursorContainer,a=e.refsMappings,d=null===Y||void 0===Y?void 0:Y.map((function(e){var n=(0,at.zv)(e);return Math.max.apply(Math,(0,r.Z)(a.map((function(e){var t,o,i,r=null===e||void 0===e||null===(t=e.current)||void 0===t?void 0:t[n];return(null===r||void 0===r||null===(o=r.current)||void 0===o||null===(i=o.getBoundingClientRect())||void 0===i?void 0:i.height)||0}))))})),s=(0,Z.Sm)(d||[]),f=null===c||void 0===c||null===(n=c.current)||void 0===n?void 0:n.getBoundingClientRect(),p=null===u||void 0===u||null===(t=u.current)||void 0===t||null===(o=t.getBoundingClientRect)||void 0===o?void 0:o.call(t),v=(null===f||void 0===f?void 0:f.y)+(null===p||void 0===p?void 0:p.height),m=100*((0===(null===p||void 0===p?void 0:p.height)?0:(null===p||void 0===p?void 0:p.y)+(null===p||void 0===p?void 0:p.height))-v)/((null===f||void 0===f?void 0:f.height)-(null===p||void 0===p?void 0:p.height))/100,h=(0,ce.IT)(d,s,null===Xe||void 0===Xe?void 0:Xe.height)||0,b=(null===f||void 0===f?void 0:f.y)-Math.max(0,m*(1-h))*s+(0,Z.Sm)((null===(i=d||[])||void 0===i?void 0:i.slice(0,G))||[]);if(jn)null!==qn&&void 0!==qn&&qn.current&&(qn.current.style.top="".concat(b,"px")),null!==Xn&&void 0!==Xn&&Xn.current&&(Xn.current.style.top="".concat(b,"px"));else{var g=0===l?qn:Xn;null!==g&&void 0!==g&&g.current&&(g.current.style.top="".concat(b,"px"))}}),[G,Xe,qn,Xn,jn]);(0,c.useEffect)((function(){var e=function(e){var n=e.detail;Ct(n)};return Hn&&window.addEventListener(Wt.m$,e),function(){window.removeEventListener(Wt.m$,e)}}),[Ct,Hn]);var Ot=F||{},yt=Ot.callback_content,Zt=Ot.configuration,Tt=void 0===Zt?{}:Zt,Pt=Ot.color,St=Ot.error,It=Ot.has_callback,_t=Ot.language,wt=Ot.name,At=Ot.pipelines,Rt=Ot.replicated_block,Bt=Ot.type,Nt=Ot.upstream_blocks,Mt=void 0===Nt?[]:Nt,Ft=Ot.uuid,eo=(0,c.useMemo)((function(){return Tt}),[Tt]),oo=(0,c.useMemo)((function(){var e;return(null===(e=Object.values(At||{}))||void 0===e?void 0:e.length)||1}),[At]),io=(0,c.useMemo)((function(){return null===eo||void 0===eo?void 0:eo.global_data_product}),[eo]),ro=(0,c.useMemo)((function(){return(0,Z.HK)(we||[],(function(e){return e.uuid}))}),[we]),lo=(0,c.useState)(!1),uo=lo[0],co=lo[1],ao=(0,c.useState)(null),so=ao[0],fo=ao[1],po=(0,c.useState)(!1),vo=po[0],mo=po[1],ho=(0,c.useState)(!1),bo=ho[0],go=ho[1],xo=(0,c.useState)(xe),jo=xo[0],Co=xo[1],ko=(0,c.useState)(null),Oo=ko[0],yo=ko[1],Zo=(0,c.useState)(re.C4[0].uuid),Eo=Zo[0],To=Zo[1],Po=(0,c.useState)(null),So=Po[0],Io=Po[1],_o=fn||{},wo=_o.type,Ao=_o.uuid,Ro=(0,c.useMemo)((function(){return ue.qL.STREAMING===wo}),[wo]),Do=(0,c.useMemo)((function(){return I.tf.DBT===Bt}),[Bt]),Bo=I.t6.SQL===_t,No=I.t6.R===_t,Mo=I.tf.MARKDOWN===Bt,Lo=(0,c.useMemo)((function(){return(0,Ze.jO)(F,fn)}),[F,fn]),Uo=eo[N.mW];Bo&&void 0===Uo&&(Uo=to);var Fo=(0,c.useState)(no(no({},eo),{},(t={},(0,i.Z)(t,N.cH,eo[N.cH]),(0,i.Z)(t,N.Sv,eo[N.Sv]),(0,i.Z)(t,N.sc,eo[N.sc]),(0,i.Z)(t,N.BD,eo[N.BD]),(0,i.Z)(t,N.m$,eo[N.m$]),(0,i.Z)(t,N.Pi,eo[N.Pi]||{}),(0,i.Z)(t,N.Mv,eo[N.Mv]),(0,i.Z)(t,N.eW,eo[N.eW]),(0,i.Z)(t,N.nq,eo[N.nq]||Pe.APPEND),(0,i.Z)(t,N.mW,Uo),(0,i.Z)(t,N.bk,eo[N.bk]),(0,i.Z)(t,N.Mi,!!eo[N.Mi]),(0,i.Z)(t,N.V_,!!eo[N.V_]),t))),Go=Fo[0],Ho=Fo[1],zo=(0,c.useState)(null),Ko=zo[0],Qo=zo[1],Wo=(0,c.useState)(Mo),Vo=Wo[0],Yo=Wo[1],qo=(0,c.useState)(!1),Xo=qo[0],Jo=qo[1],$o=(0,c.useState)(0),ei=$o[0],ni=$o[1],ti=(0,c.useState)(null),oi=ti[0],ii=ti[1],ri=(0,c.useState)(null),li=ri[0],ui=ri[1],ci=(0,c.useState)(rn),ai=ci[0],di=ci[1],si=(0,c.useState)(null),fi=si[0],pi=si[1],vi=(0,c.useCallback)((function(e){gt(),null===In||void 0===In||In(!!e),pi(e)}),[gt,In,pi]);(0,c.useEffect)((function(){fi||(ct?vi((0,re.iz)(F)[0]):Do&&vi((0,re.Xy)(F)[0]))}),[F,Do,fi,vi,ct]);var mi=(0,c.useCallback)((function(e){Yo(e),setTimeout((function(){return bt()}),1)}),[bt,Yo]),hi=(0,d.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:F,type:re.vT}}),[F]),bi=(0,o.Z)(hi,2),gi=bi[0],xi=bi[1],ji=(0,s.L)((function(){return{accept:re.vT,drop:function(e){return null===dn||void 0===dn?void 0:dn(F,e)}}}),[F]),Ci=(0,o.Z)(ji,2)[1],ki=ne.ZP.configuration_options.pipelines.list(Ao,{configuration_type:ve.DBT,option_type:me.PROJECTS,resource_type:he.Block,resource_uuid:I.t6.SQL===_t?Ft:null},{revalidateOnFocus:!1}).data,Oi=(0,c.useMemo)((function(){return null===ki||void 0===ki?void 0:ki.configuration_options}),[ki]),yi=(0,c.useMemo)((function(){var e;return(null===F||void 0===F||null===(e=F.metadata)||void 0===e?void 0:e.dbt)||{project:null,projects:{}}}),[F]),Zi=(0,c.useMemo)((function(){return Oi?(0,Z.HK)(Oi,(function(e){return e.uuid})):yi.projects||{}}),[Oi,yi]),Ei=(0,c.useMemo)((function(){return yi.project||Go[N.eW]}),[Go,yi]),Ti=(0,c.useMemo)((function(){var e;if(!Oi)return[Zi[Ei]||{target:null,targets:[]}];var n=1===(null===Oi||void 0===Oi?void 0:Oi.length)?null===Oi||void 0===Oi?void 0:Oi[0]:null===Oi||void 0===Oi?void 0:Oi.find((function(e){var n=e.uuid;return Ei===n}));return(null===n||void 0===n||null===(e=n.option)||void 0===e?void 0:e.profiles)||[]}),[Oi,Ei,Zi]),Pi=(0,c.useMemo)((function(){var e;return null===(e=Ti||[])||void 0===e?void 0:e.reduce((function(e,n){var t=n.targets;return e.concat(t||[])}),[])}),[Ti]),Si=(0,c.useMemo)((function(){return Go[N.Mv]}),[Go]),Ii=Ei?null!==Ti&&void 0!==Ti&&null!==(l=Ti[0])&&void 0!==l&&l.target?(0,Z.sE)(Pi,(function(e){var n;return e===(null===Ti||void 0===Ti||null===(n=Ti[0])||void 0===n?void 0:n.target)})):"Select target":"Select project first",_i=(0,c.useState)(Si&&!(null!==Pi&&void 0!==Pi&&Pi.includes(Si))),wi=_i[0],Ai=_i[1],Ri=(0,c.useState)(null),Di=Ri[0],Bi=Ri[1];(0,c.useEffect)((function(){yt!==Di&&Bi(yt)}),[Di,yt]);var Ni=(0,Ht.Z)(F);(0,c.useEffect)((function(){if(JSON.stringify(F)!=JSON.stringify(Ni)){var e,n=(0,at.Rt)([F]).messages,t=null===n||void 0===n||null===(e=n[Bt])||void 0===e?void 0:e[Ft];(null===t||void 0===t?void 0:t.length)>=1&&di(t)}}),[F,Bt,Ft,Ni,di]);var Mi=(0,Ht.Z)(rn);(0,c.useEffect)((function(){"undefined"!==typeof rn&&rn.length!==(null===Mi||void 0===Mi?void 0:Mi.length)&&di(rn)}),[rn,Mi,di]);var Li=(0,c.useMemo)((function(){var e=new Set;return null===fe||void 0===fe||fe.forEach((function(n){var t=n.profiles;e=new Set([].concat((0,r.Z)(e),(0,r.Z)(t)))})),(0,r.Z)(e)}),[fe]),Ui=(0,c.useMemo)((function(){return"".concat(Ao,"/").concat(Ft,"/codeCollapsed")}),[Ao,Ft]),Fi=(0,c.useMemo)((function(){return"".concat(Ao,"/").concat(Ft,"/outputCollapsed")}),[Ao,Ft]);(0,c.useEffect)((function(){go((0,vn.U2)(Ui,!1)),Jo((0,vn.U2)(Fi,!1))}),[Ui,Fi]);var Gi=(0,c.useRef)(null),Hi=(0,c.useMemo)((function(){return(0,Z.HK)(Y,(function(e){return e.uuid}))}),[Y]),zi=(0,c.useMemo)((function(){return!(null===Qn||void 0===Qn||!Qn.find((function(e){return e.upstream_blocks.includes(Ft)})))}),[Ft,Qn]),Ki=(0,c.useCallback)((function(e){var n=e.bypassOffScreen,t=e.columnIndex,o=e.rect,i=e.y;if(n||(null===o||void 0===o?void 0:o.y)>=(null===Xe||void 0===Xe?void 0:Xe.y)+(null===Xe||void 0===Xe?void 0:Xe.height)||(null===o||void 0===o?void 0:o.y)<=(null===Xe||void 0===Xe?void 0:Xe.y)){var r=new CustomEvent(Wt.Wf,{detail:{blockIndex:G,columnIndex:t,lockScroll:!0,y:i}});window.dispatchEvent(r)}}),[G,Xe]),Qi=!(null===gn||void 0===gn||!gn.find((function(e){return e.uuid===Ft})))||(null===ai||void 0===ai?void 0:ai.length)>=1&&Oe!==oe.uF.IDLE;(0,c.useEffect)((function(){dt(ot&&!Ro&&!Lo&&I.t6.PYTHON===_t&&(ue.qL.PYSPARK===(null===fn||void 0===fn?void 0:fn.type)||!(null!==pn&&void 0!==pn&&pn.emr_config)))}),[_t,Lo,Ro,fn,pn,ot]);var Wi=ne.ZP.execution_states.list({block_uuid:"undefined"!==typeof Ft?Ft:null,pipeline_uuid:"undefined"!==typeof Ao?Ao:null},{refreshInterval:Cn&&Qi?1e3:5e3,revalidateOnFocus:!0},{pauseFetch:!Cn&&ft>=1||!ct}),Vi=Wi.data,Yi=Wi.mutate,qi=(0,c.useCallback)((function(e){var n,t,i;Hn&&Ki(no({columnIndex:jn?2:1,bypassOffScreen:jn},(null===e||void 0===e?void 0:e.syncColumnPositions)||{rect:null===Xn||void 0===Xn||null===(n=Xn.current)||void 0===n?void 0:n.getBoundingClientRect(),y:null===qn||void 0===qn||null===(t=qn.current)||void 0===t||null===(i=t.getBoundingClientRect())||void 0===i?void 0:i.y}));var r=e||{},l=r.block,u=r.code,c=r.disableReset,a=r.runDownstream,d=r.runIncompleteUpstream,s=r.runSettings,f=r.runUpstream,p=r.runTests,v=r.variables,m=p;if(null===m||"undefined"===typeof m){var h=(l||{}).type;m=[I.tf.DATA_LOADER,I.tf.DATA_EXPORTER,I.tf.TRANSFORMER].includes(h)}Do&&re.Rj!==fi&&vi(re.Rj);var b=no({},v||So);(null===H||void 0===H?void 0:H.length)>=1&&(null===H||void 0===H||H.forEach((function(e){var n=e.uuid,t=null===He||void 0===He?void 0:He[n];Object.entries((null===t||void 0===t?void 0:t.variables)||{}).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1].types;b&&t in b&&(b[t]=(0,qt.M)(b[t],i))}))}))),null===bn||void 0===bn||bn({block:l,code:u||jo,runDownstream:a||zi,runIncompleteUpstream:d||!1,runSettings:s,runTests:m||!1,runUpstream:f||!1,variables:b}),c||(ni(1+Number(ei)),ii(null),Jo(!1)),ct&&Yi()}),[H,jo,Yi,zi,He,Do,qn,Xn,bn,ei,jn,fi,ni,ii,vi,Hn,ct,So]),Xi=(0,c.useState)(null),Ji=Xi[0],$i=Xi[1];(0,c.useEffect)((function(){Vi&&(pt((function(e){return e+1})),$i((null===Vi||void 0===Vi?void 0:Vi.execution_states)||[]))}),[Vi,$i,pt]),(0,c.useEffect)((function(){null!==Ji&&(clearTimeout($n.current),$n.current=setTimeout(gt,1))}),[Ji,gt,fi]),(0,c.useEffect)((function(){Qi&&ui(Number(new Date))}),[Qi,ui]);var er=(0,Ht.Z)(Oe);(0,c.useEffect)((function(){Oe===oe.uF.IDLE&&Oe!==er&&ii(Number(new Date))}),[Oe,er,ii]);var nr=(0,c.useCallback)((function(e){var n=e.editorRect.top,t=e.position.lineNumberTop;if(null!==Je&&void 0!==Je&&Je.current){var o=Je.current.getBoundingClientRect().height;if(n+t>o){var i=Je.current.scrollTop+(t-o+n);Je.current.scrollTo(0,i)}else if(t+n<Vt.aU){var r=Je.current.scrollTop+(t+n-Vt.aU);Je.current.scrollTo(0,r)}}}),[Je]),tr=(0,c.useMemo)((function(){return(0,ce.h5)(ai,Ko)}),[Ko,ai]),or=(0,ce.oI)(tr),ir=or.hasError,rr=or.hasOutput,lr=(0,c.useMemo)((function(){return rr||(null===ai||void 0===ai?void 0:ai.length)>=1}),[rr,ai]),ur=(0,x.qn)(Bt,{blockColor:Pt,theme:Yn}).accent,cr=(null===Mt||void 0===Mt?void 0:Mt.length)||0,ar=(0,Ze.cU)([F],Y)[0],dr=ar.dynamic,sr=ar.dynamicUpstreamBlock,fr=ar.reduceOutput,pr=ar.reduceOutputUpstreamBlock,vr=(0,c.useMemo)((function(){return(0,ce._o)({block:F,dynamic:dr,dynamicUpstreamBlock:sr,hasError:ir,reduceOutput:fr,reduceOutputUpstreamBlock:pr,selected:Cn})}),[F,dr,sr,ir,fr,pr,Cn]),mr=vr.borderColorShareProps,hr=vr.tags,br=(0,c.useCallback)((function(){Cn||(null===yn||void 0===yn||yn(!1),null===In||void 0===In||In(!0))}),[Cn,yn,In]),gr=ne.ZP.blocks.pipelines.detail(Ao,re.gM.uuid===(null===fi||void 0===fi?void 0:fi.uuid)||re.Jt.uuid===(null===fi||void 0===fi?void 0:fi.uuid)?encodeURIComponent(Ft):null,{_format:"dbt"},{revalidateOnFocus:!0}),xr=gr.data,jr=gr.mutate,Cr=(0,c.useMemo)((function(){var e;return(null===xr||void 0===xr||null===(e=xr.block)||void 0===e?void 0:e.metadata)||{}}),[xr]),kr=(0,f.Db)(ne.ZP.blocks.pipelines.useUpdate(encodeURIComponent(Ao),encodeURIComponent(Ft)),{onError:function(e){var n=(0,de.qQ)(e).messages;Qo(n)},onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){Te(),Ee(),Co(jo),null!==e&&void 0!==e&&e.block&&_n(null===e||void 0===e?void 0:e.block)},onErrorCallback:function(e,n){return Tn({errors:n,response:e})}})}}),Or=(0,o.Z)(kr,1)[0];(0,c.useEffect)((function(){var e;return li&&(e=setInterval((function(){return yo(Number(new Date))}),1e3)),Oo&&!Qi&&clearInterval(e),function(){return clearInterval(e)}}),[Oo,Qi,li]);var yr=(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)(k.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(){Or({block:no(no({},e),{},{color:t})})},uuid:t}),n}),[])),(0,i.Z)(n,I.tf.SCRATCHPAD,(0,r.Z)((0,ce.Ts)(e,Y,"block_menu/scratchpad",C)).map((function(e){return no(no({},e),{},{onClick:function(){return xn().then((function(){return e.onClick()}))}})}))),n);return t[e.type]}),[C,Y,xn,Or]),Zr=(0,c.useMemo)((function(){return Rt&&(null===Hi||void 0===Hi?void 0:Hi[Rt])}),[Hi,Rt]),Er=(0,c.useMemo)((function(){return!bo&&![I.tf.CALLBACK,I.tf.CONDITIONAL,I.tf.EXTENSION].includes(Bt)&&(0,j.jsx)(P,{block:F,blocks:T,openSidekickView:sn,pipeline:fn})}),[T,F,Bt,bo,sn,fn]),Tr=function(e){var n=(0,nn.Z)({},e),t=(0,c.useRef)(null),o=(0,c.useState)(null),i=o[0],r=o[1],l=(0,c.useState)(null),u=l[0],a=l[1],d=(0,c.useState)(!1),s=d[0],f=d[1],p=(0,c.useState)(null),v=p[0],m=p[1],h=n.autocompleteProviders,b=n.block,g=n.blocks,x=n.content,C=n.executionState,k=n.height,O=n.interruptKernel,y=n.onChange,Z=n.onContentSizeChangeCallback,E=n.onDidChangeCursorPosition,T=n.onMountCallback,P=n.openSidekickView,S=n.outputProps,_=n.pipeline,w=n.placeholder,A=n.runBlockAndTrack,R=(n.savePipelineContent,n.scrollTogether),D=n.selected,B=n.setErrors,N=n.setSelected,M=n.setTextareaFocused,L=n.showConfigureProjectModal,U=n.sideBySideEnabled,F=n.status,G=n.textareaFocused,H=n.theme,z=n.updatePipeline,K=S||{},Q=K.blockIndex,W=K.blockOutputRef,V=K.collapsed,Y=K.errorMessages,q=K.isHidden,X=K.mainContainerWidth,J=K.messages,$=K.runCount,ee=K.runEndTime,ne=K.runStartTime,te=K.runningBlocks,oe=K.setOutputBlocks,ie=K.setSelectedOutputBlock,re=(0,Ut.Z)(),le=re.featureEnabled,ce=re.featureUUIDs,ae=re.project,de=(0,c.useMemo)((function(){return[ue.qL.PYTHON,ue.qL.PYSPARK].includes(null===_||void 0===_?void 0:_.type)&&(null===le||void 0===le?void 0:le(null===ce||void 0===ce?void 0:ce.CODE_BLOCK_V2))}),[le,ce,_]),se=(b||{type:null}).type,fe=(0,c.useMemo)((function(){return de?I.tf.DBT===se?Lt(n):void 0:null}),[de,n,se]),pe=(0,c.useMemo)((function(){return de&&null!==fe&&void 0!==fe&&fe.editor?(0,j.jsx)(kn,Gt({autocompleteProviders:h,block:b,content:x,height:k,onChange:y,onContentSizeChangeCallback:Z,onDidChangeCursorPosition:E,onMountCallback:T,pipeline:_,placeholder:w,project:ae,runBlockAndTrack:A,selected:D,setSelected:N,setTextareaFocused:M,sideMenuVisible:s,showConfigureProjectModal:L,textareaFocused:G,theme:H,updatePipeline:z},(null===fe||void 0===fe?void 0:fe.editor)||{})):null}),[h,b,fe,x,de,k,y,Z,E,T,_,w,ae,A,D,N,M,s,L,G,H,z]);return{editor:(0,c.useMemo)((function(){var e;return pe?(0,j.jsx)(Et,{renderTabContent:null===fe||void 0===fe||null===(e=fe.headerTabContent)||void 0===e?void 0:e.renderTabContent,selectedHeaderTab:i,sideMenuVisible:s,children:pe}):null}),[fe,pe,i,s]),header:(0,c.useMemo)((function(){return de?null!==fe&&void 0!==fe&&fe.header?(0,j.jsx)(Wn,Gt({block:b,executionState:C,interruptKernel:O,ref:t,selected:D,selectedHeaderTab:i,setSelectedHeaderTab:r,setSideMenuVisible:f,setSubheaderVisible:m,sideMenuVisible:s,status:F,subheaderVisible:v,theme:H},(null===fe||void 0===fe?void 0:fe.header)||{})):void 0:null}),[b,fe,de,C,O,D,i,r,f,m,s,F,v,H]),output:(0,c.useMemo)((function(){return de?null!==fe&&void 0!==fe&&fe.output?(0,j.jsx)(kt,Gt({block:b,blockIndex:Q,blockOutputRef:W,blocks:g,collapsed:V,errorMessages:Y,executionState:C,headerRef:t,isHidden:q,mainContainerWidth:X,messages:J,openSidekickView:P,pipeline:_,runCount:$,runEndTime:ee,runStartTime:ne,runningBlocks:te,scrollTogether:R,selected:D,selectedOutputTabs:u,setErrors:B,setOutputBlocks:oe,setSelectedOutputBlock:ie,setSelectedOutputTabs:a,sideBySideEnabled:U,subheaderVisible:v,theme:H},(null===fe||void 0===fe?void 0:fe.output)||{})):void 0:null}),[b,Q,W,g,fe,V,Y,C,q,X,J,P,_,$,ee,ne,te,R,D,u,B,oe,ie,a,U,v,H])}}({addNewBlock:C,allowCodeBlockShortcuts:B,autocompleteProviders:so,block:F,blocks:Y,codeCollapsed:bo,content:jo,deleteBlock:function(e){je(e),Jo(!1)},disableShortcuts:ke,executionState:Oe,height:Ae,hideRunButton:Ge,interruptKernel:Ke,onChange:function(e){Co(e),null===cn||void 0===cn||cn(e)},onContentSizeChangeCallback:Hn?function(){return bt()}:null,onDidChangeCursorPosition:nr,onMountCallback:Hn?function(){ht(!0)}:null,openSidekickView:sn,outputCollapsed:Xo,outputProps:{blockIndex:G,blockOutputRef:z,collapsed:Xo,errorMessages:Ko,isHidden:We,mainContainerWidth:tn,messages:ai,runCount:ei,runEndTime:oi,runStartTime:li,runningBlocks:gn,setOutputBlocks:Sn,setSelectedOutputBlock:wn},pipeline:fn,placeholder:Do&&I.t6.YAML===_t?"e.g. --select ".concat(Ei||"project","/models --exclude ").concat(Ei||"project","/models/some_dir"):"Start typing here...",runBlockAndTrack:function(e){var n,t,o;return qi(no(no({},e),{},{syncColumnPositions:no(no({},(null===e||void 0===e?void 0:e.syncColumnPositions)||{}),{},{rect:null===qn||void 0===qn||null===(n=qn.current)||void 0===n?void 0:n.getBoundingClientRect(),y:null===Xn||void 0===Xn||null===(t=Xn.current)||void 0===t||null===(o=t.getBoundingClientRect())||void 0===o?void 0:o.y})}))},savePipelineContent:xn,scrollTogether:jn,selected:Cn,setCodeCollapsed:go,setErrors:Tn,setHiddenBlocks:xt,setOutputCollapsed:Jo,setScrollTogether:Dn,setSelected:In,setSideBySideEnabled:Bn,setTextareaFocused:An,showConfigureProjectModal:Ln,sideBySideEnabled:Hn,status:it,textareaFocused:zn,theme:Yn,updatePipeline:Kn}),Pr=Tr.editor,Sr=Tr.header,Ir=Tr.output,_r="CodeBlock/".concat(Ft),wr=(0,hn.y)(),Ar=wr.registerOnKeyDown,Rr=wr.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){Rr(_r)}}),[Rr,_r]),Ar(_r,(function(e,n){ke&&!B||lt&&Sr||Cn&&!Ge&&((0,mn.y)([le.zX,le.Uq],n)||(0,mn.y)([le.PQ,le.Uq],n)?qi({block:F}):(0,mn.y)([le.XR,le.Uq],n)&&C&&(e.preventDefault(),C({language:_t,type:Bt,upstream_blocks:[Ft]}),qi({block:F})))}),[C,F,Sr,lt,Ge,qi,Cn,Or]);var Dr=(0,c.useMemo)((function(){if(Rt&&!Lo)return null;if(I.tf.GLOBAL_DATA_PRODUCT===Bt){var e=null===ro||void 0===ro?void 0:ro[null===io||void 0===io?void 0:io.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,U.kC)((null===e||void 0===e?void 0:e.object_type)||"")}),(0,j.jsx)(u(),{as:"/pipelines/".concat(null===e||void 0===e?void 0:e.object_uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,j.jsx)(X.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)(X.Z,{monospace:!0,onClick:function(){return sn(y.cH.BLOCK_SETTINGS)},children:"Customize block settings"})]})]})}return lt&&Pr?Pr:(Lo&&I.t6.PYTHON!==_t||(n=(0,j.jsx)(R.Z,{autoHeight:!0,autocompleteProviders:so,block:F,height:Ae,language:_t,onChange:function(e){Co(e),null===cn||void 0===cn||cn(e)},onContentSizeChangeCallback:Hn?function(){return bt()}:null,onDidChangeCursorPosition:nr,onMountCallback:Hn?function(){ht(!0)}:null,placeholder:Do&&I.t6.YAML===_t?"e.g. --select ".concat(Ei||"project","/models --exclude ").concat(Ei||"project","/models/some_dir"):"Start typing here...",selected:Cn,setSelected:In,setTextareaFocused:An,shortcuts:Ge?[]:[function(e,n){return(0,Dt.Q)(e,(function(){Ge||qi({block:F,code:n.getValue()})}))}],textareaFocused:zn,value:jo,width:"100%"}),t=It&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ge.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)(R.Z,{autoHeight:!0,autocompleteProviders:so,language:"python",onChange:function(e){Bi(e),null===un||void 0===un||un(e)},onDidChangeCursorPosition:nr,placeholder:"Start typing here...",selected:Cn,setSelected:In,setTextareaFocused:An,textareaFocused:zn,value:Di,width:"100%"})]})]})),Lo?(0,j.jsx)(Se,{block:F,blocksMapping:Hi,blockContent:jo,callbackEl:t,codeEditor:n,hasElementsBelow:(null===ai||void 0===ai?void 0:ai.length)>=1||!!Er,onChangeBlock:function(e){return Or({block:e})},openSidekickView:sn,savePipelineContent:xn,setContent:Co,showDataIntegrationModal:Un}):(0,j.jsxs)(b.Z,{py:Lo?0:L.cd,children:[n,t]}));var n,t}),[so,F,Er,_t,Bt,Hi,Di,Pr,lt,jo,Ei,io,ro,It,Ae,Ge,Lo,ai,un,cn,nr,sn,Rt,qi,Cn,Co,ht,In,An,Hn,zn]);(0,c.useEffect)((function(){M&&fo({python:(0,en.Z)({autocompleteItems:M,block:F,blocks:Y,pipeline:fn})})}),[M,F,Y,fn]);var Br=(0,c.useMemo)((function(){var e;return Do?e=(0,j.jsx)(_.Z,{onClickTab:function(e){vi(e),re.gM.uuid!==e.uuid&&re.Jt.uuid!==e.uuid||jr()},selectedTabUUID:null===fi||void 0===fi?void 0:fi.uuid,tabs:(0,re.Xy)(F),underlineColor:(0,x.qn)(I.tf.DBT,{theme:Yn}).accent,underlineStyle:!0}):ct&&![I.tf.CALLBACK,I.tf.CONDITIONAL,I.tf.EXTENSION].includes(Bt)&&(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(_.Z,{onClickTab:function(e){vi(e)},selectedTabUUID:null===fi||void 0===fi?void 0:fi.uuid,tabs:(0,re.iz)(F),underlineColor:ur,underlineStyle:!0}),(0,j.jsx)(ge.Z,{medium:!0})]})),e?(0,j.jsx)(x.HS,{children:e}):null}),[F,Bt,ur,jr,Do,fi,ct,Yn]),Nr=(0,c.useMemo)((function(){if(Qi&&Oo&&Oo>li){var e=(0,j.jsxs)(g.ZP,{muted:!0,children:["".concat(Math.round((Oo-li)/1e3)),"s"]});return Lo&&I.t6.PYTHON!==_t?(0,j.jsx)(rt.Nk,{children:(0,j.jsx)(b.Z,{p:1,children:e})}):(0,j.jsx)(x.HC,{children:e})}return null}),[_t,Oo,Lo,Qi,li]),Mr=(0,c.useMemo)((function(){var e,n,t;oe.uF.QUEUED===Oe&&(e=(0,j.jsx)($.Z,{color:null===Yn||void 0===Yn||null===(n=Yn.content)||void 0===n?void 0:n.active,type:"cylon"}));oe.uF.BUSY===Oe&&(e=(0,j.jsx)($.Z,{color:null===Yn||void 0===Yn||null===(t=Yn.content)||void 0===t?void 0:t.active}));var o,r=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{childrenBelowTabs:null,hideOutput:!1},t=n.childrenBelowTabs,o=n.hideOutput;return(0,j.jsx)(D.Z,no(no({},mr),{},{block:F,blockIndex:G,blockMetadata:Cr,buttonTabs:ct?null:Br,childrenBelowTabs:t,collapsed:Xo,hasOutput:lr,hideOutput:o,isInProgress:Qi,mainContainerWidth:tn,messages:tr,messagesAll:ai,onClickSelectBlock:Hn?We&&xt?function(){return xt((function(e){return no(no({},e),{},(0,i.Z)({},Ft,!We))}))}:br:null,openSidekickView:sn,outputRowNormalPadding:Hn||Lo||ct,pipeline:fn,ref:z,runCount:ei,runEndTime:oi,runStartTime:li,scrollTogether:jn,selected:Cn&&(!We||!Hn),selectedTab:fi,setCollapsed:Hn?null:function(e){Jo((function(){return(0,vn.t8)(Fi,e),e}))},setErrors:Tn,setOutputBlocks:Sn,setSelectedOutputBlock:wn,setSelectedTab:vi,showBorderTop:Hn,sideBySideEnabled:Hn,sparkEnabled:ct,children:Hn&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{px:L.cd,py:1,children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsx)(X.Z,{color:ur,monospace:!0,onClick:function(){var e,n,t;Ki({bypassOffScreen:!0,columnIndex:0,rect:null===qn||void 0===qn||null===(e=qn.current)||void 0===e?void 0:e.getBoundingClientRect(),y:null===Xn||void 0===Xn||null===(n=Xn.current)||void 0===n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.y})},preventDefault:!0,children:null===F||void 0===F?void 0:F.uuid}),(0,j.jsx)(b.Z,{mr:L.cd}),e,!e&&(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){var e,n,t;return qi({block:F,syncColumnPositions:{rect:null===qn||void 0===qn||null===(e=qn.current)||void 0===e?void 0:e.getBoundingClientRect(),y:null===Xn||void 0===Xn||null===(n=Xn.current)||void 0===n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.y}})},children:(0,j.jsx)(A.Z,{color:ur,size:3*L.iI,children:(0,j.jsx)(ie.Py,{black:!0,size:1.5*L.iI})})})]})}),lr&&(0,j.jsx)(ge.Z,{medium:!0})]})}))},l=re.aL.uuid===(null===fi||void 0===fi?void 0:fi.uuid);return lt&&Ir?Ir:ct&&![I.tf.CALLBACK,I.tf.CONDITIONAL,I.tf.EXTENSION].includes(null===F||void 0===F?void 0:F.type)?(l?o=(0,j.jsx)(ze,{executionStates:Ji,isInProgress:Qi}):re.qC.uuid===(null===fi||void 0===fi?void 0:fi.uuid)?o=(0,j.jsx)(Ue,{executionStates:Ji,isInProgress:Qi}):re.p.uuid===(null===fi||void 0===fi?void 0:fi.uuid)?o=(0,j.jsx)(Ve,{executionStates:Ji}):re.SD.uuid===(null===fi||void 0===fi?void 0:fi.uuid)&&(o=(0,j.jsx)(Qe,{disableGraph:!Cn,executionStates:Ji,overrideScrollForGraph:Cn})),Hn?r({childrenBelowTabs:!We&&(0,j.jsxs)(j.Fragment,{children:[Br,(0,j.jsx)(ge.Z,{medium:!0}),(0,j.jsx)("div",{ref:Jn,children:o})]}),hideOutput:!l||We}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(x.jv,no(no({},mr),{},{className:Cn&&zn?"selected":null,hideBorderBottom:l&&lr,lightBackground:!0,noPadding:!0,children:[Br,(0,j.jsx)(ge.Z,{light:!0}),o]})),l&&r()]})):r()}),[F,Ji,G,Cr,z,Bt,mr,Br,Ir,lt,ur,Ki,Oe,lr,Lo,Vo,We,Qi,Mo,tn,ai,tr,br,sn,Xo,Fi,fn,qn,Xn,qi,ei,oi,li,jn,Cn,fi,Tn,xt,Sn,Jo,wn,Hn,ct,zn]),Lr=(0,c.useCallback)((function(){return mo(!1)}),[]),Ur=(0,c.useRef)(null),Fr=(0,c.useCallback)((function(e){clearTimeout(Ur.current),Ho((function(n){return no(no({},n),e)})),Ur.current=setTimeout((function(){var n=no(no({},Go),e);("undefined"!==typeof n[N.cH]&&"undefined"!==n[N.sc]||"undefined"!==typeof n[N.Mv]||"undefined"!==typeof n[N.eW]||"undefined"!==typeof n[N.mW])&&xn({block:{configuration:n,uuid:Ft}})}),1e3)}),[Ft,Go,xn]),Gr=Qt.zJ.BIGQUERY===Go[N.cH]||Qt.zJ.SNOWFLAKE===Go[N.cH],Hr=(0,c.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.length)||0}),[Y]),zr=(0,c.useMemo)((function(){return jo?(0,j.jsx)(Be.Z,{children:jo}):(0,j.jsx)(b.Z,{px:1,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:"Double-click to edit"})})}),[jo]);(0,c.useEffect)((function(){Mo&&Vo&&!Cn&&mi(!1)}),[Vo,Mo,Cn]);var Kr=(0,c.useMemo)((function(){return(0,j.jsx)(Ye.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){yn(!0),Fr((0,i.Z)({},N.mW,+e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},small:!0,type:"number",value:Go[N.mW]||"",width:11*L.iI})}),[Go,yn,Fr]),Qr=(0,c.useMemo)((function(){return te>=1}),[te]),Wr=(0,c.useMemo)((function(){return ae>=1}),[ae]),Vr=(0,c.useMemo)((function(){return se>=1}),[se]),Yr=(0,c.useMemo)((function(){var e=3*x.IN;return jn?Vr&&(e+=Rn.nn):(Qr&&(e+=Rn.nn),Wr&&(e+=Rn.nn)),(tn-e)/2}),[Qr,Wr,Vr,tn,jn]),qr=(0,c.useMemo)((function(){var e;if(jt)return Hn&&(e=0,jn?Vr&&(e=18):(Qr&&(e+=18),Wr&&(e+=2))),null===H||void 0===H?void 0:H.map((function(n,t){return(0,j.jsx)("div",{children:(0,j.jsx)(S.Z,{blockInteraction:n,contained:!0,containerRef:Hn?qn:J,containerWidth:Hn?Yr:tn,interaction:null===He||void 0===He?void 0:He[null===n||void 0===n?void 0:n.uuid],setVariables:Io,showVariableUUID:!0,variables:So,widthOffset:e})},"".concat(null===n||void 0===n?void 0:n.uuid,"-").concat(t))}))}),[H,Qr,Wr,Vr,J,He,jt,tn,jn,Io,Hn,So,Yr]);(0,c.useEffect)((function(){(0,Jt.h)()}),[qr,Eo,So]);var Xr,Jr=(0,c.useMemo)((function(){return jt&&null!==H&&void 0!==H&&H.length?(0,j.jsx)(x.HS,{children:(0,j.jsx)(b.Z,{px:L.cd,children:(0,j.jsx)(_.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return To(n)},selectedTabUUID:Eo,tabs:re.C4,underlineColor:(0,x.qn)(null===F||void 0===F?void 0:F.type,{blockColor:null===F||void 0===F?void 0:F.color,theme:Yn}).accent,underlineStyle:!0})})}):null}),[F,H,jt,Eo,To,Yn]),$r=(0,c.useMemo)((function(){if(!jt)return null;var e=[],n={};if(null===H||void 0===H||H.forEach((function(t){var o=t.uuid,i=null===He||void 0===He?void 0:He[o],r=null===i||void 0===i?void 0:i.variables;Object.keys(r||{}).forEach((function(t){null!==n&&void 0!==n&&n[t]||(e.push(t),n[t]=!0)}))})),null===e||void 0===e||!e.length)return null;var t=(null===e||void 0===e?void 0:e.length)||0;return(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"Interaction variables:"}),(0,j.jsx)(b.Z,{mr:L.cd}),null===e||void 0===e?void 0:e.map((function(e,n){return(0,j.jsx)(b.Z,{mr:1,children:(0,j.jsxs)(g.ZP,{default:!0,monospace:!0,small:!0,children:[e,t>=2&&n<t-1&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:","})]})},e)}))]})}),[H,He,jt]),el=(0,c.useCallback)((function(e,n){return(0,j.jsx)(p.Z,{addNewBlock:function(n){var t=n.content,o=n.configuration,i=(0,ce.eY)(e,n),r=(0,ce.fA)(fn,e,n).map((function(e){var n=no({},Hi[e]||{}),t=n.upstream_blocks;return t&&(n.upstream_blocks=t.filter((function(e){return e!==Ft}))),n}));return[I.tf.DATA_LOADER,I.tf.TRANSFORMER].includes(Bt)&&I.tf.SCRATCHPAD===n.type&&(t="from mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable('".concat(Ao,"', '").concat(Ft,"', 'output_0')")),t=(0,Yt.X7)(n,t),I.t6.SQL===_t&&(o=no(no({},(0,$t.GL)(eo,[N.cH,N.Sv,N.sc,N.BD,N.nq])),o)),I.t6.SQL===n.language&&(t=(0,Yt.SF)(t)),C(no(no({},n),{},{configuration:o,content:t,upstream_blocks:i}),r)},blockIdx:n,blockTemplates:Q,compact:!0,hideCustom:Ro,hideDbt:Ro,onClickAddSingleDBTModel:an,pipeline:fn,project:pn,setAddNewBlockMenuOpenIdx:On,setCreatingNewDBTModel:Zn,showBlockBrowserModal:Nn,showBrowseTemplates:Mn,showConfigureProjectModal:Ln,showGlobalDataProducts:Fn})}),[eo,Q,Bt,Ft,Hi,Ro,Ro,an,fn,fn,Ao,pn,On,Nn,Zn,Mn,Ln,Fn]);if(We)Xr=(0,j.jsx)(De,{block:F,blocks:Y,onClick:function(){return xt((function(e){return no(no({},e),{},(0,i.Z)({},Ft,!We))}))}});else{var nl,tl,ol,il,rl=function(e){return(0,j.jsx)(x.nz,no(no({},no(no({},mr),gi)),{},{className:"code-block-header-sticky",onClick:function(){return br()},ref:Ce?null:xi,zIndex:Hn?null:Hr+1-(G||0),noSticky:Hn,children:e}))};Xr=(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{style:{position:"relative"},children:[lt&&Sr&&rl(Sr),(!lt||!Sr)&&rl((0,j.jsx)(b.Z,{py:1,children:(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsx)(b.Z,{pr:1}),(0,j.jsxs)(k.Z,{alignItems:"center",flex:1,children:[(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(v.Z,{monospace:!0,children:I.tf.GLOBAL_DATA_PRODUCT===(null===F||void 0===F?void 0:F.type)?"GDP":I.dO[_t]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(A.Z,{color:ur,size:1.5*L.iI,square:!0}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(V.Z,{items:yr(F),onClickCallback:Lr,onClickOutside:Lr,open:vo,parentRef:Gi,uuid:"CodeBlock/block_menu",children:(0,j.jsx)(g.ZP,{color:ur,monospace:!0,noWrapping:!0,children:null===(nl=Do?I.tf.DBT:I.V4[Bt])||void 0===nl?void 0:nl.toUpperCase()})}),!Fe&&[I.tf.CUSTOM,I.tf.SCRATCHPAD].includes(Bt)&&(0,j.jsxs)(j.Fragment,{children:["\xa0",(0,j.jsx)(m.ZP,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){return mo(!0)},transparent:!0,children:(0,j.jsx)(ie.K5,{muted:!0})})]})]}),!Fe&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(ie.iU,{size:1.5*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(h.ZP,{alignItems:"center",children:[Do&&I.t6.YAML!==_t&&(0,j.jsx)(ee.Z,{block:!0,label:(0,Xt.$1)(F,{fullPath:!0}),size:null,children:(0,j.jsx)(g.ZP,{monospace:!0,muted:!0,children:(0,Xt.$1)(F)})}),(!Do||I.t6.YAML===_t)&&(0,j.jsx)(X.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return Gn(F,wt)},preventDefault:!0,sameColorAsText:!0,children:Ft})]}),!I.iZ.includes(Bt)&&tn>800&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(ee.Z,{appearBefore:!0,block:!0,label:"\n ".concat((0,U._6)("parent block",cr),". ").concat(0===cr?"Click to select 1 or more blocks to depend on.":"Edit parent blocks.","\n "),size:null,widthFitContent:cr>=1,children:(0,j.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){In(!0),En({upstreamBlocks:{block:F,values:null===Mt||void 0===Mt?void 0:Mt.map((function(e){return{uuid:e}}))}})},children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[0===cr&&(0,j.jsx)(ie.Jj,{size:3*L.iI}),cr>=1&&(0,j.jsx)(ie.eV,{size:3*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsxs)(g.ZP,{default:!0,monospace:cr>=1,noWrapping:!0,small:!0,underline:0===cr,children:[0===cr&&"Edit parents",cr>=1&&(0,U._6)("parent",cr)]})]})})})]}),oo>=2&&tn>725&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:L.cd}),(0,j.jsx)(ee.Z,{block:!0,label:"This block is used in ".concat(oo," pipelines."),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie.BG,{size:14}),(0,j.jsx)(b.Z,{ml:1}),(0,j.jsxs)(X.Z,{default:!0,monospace:!0,noWrapping:!0,onClick:function(){return sn(y.cH.BLOCK_SETTINGS)},preventDefault:!0,small:!0,children:[oo," pipelines"]})]})})]})]})]}),bn&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{pr:L.cd}),(0,j.jsx)(be,{addNewBlock:C,addWidget:E,block:F,blockContent:jo,blocks:Y,deleteBlock:je,executionState:Oe,fetchFileTree:Ee,fetchPipeline:Te,hideExtraButtons:Re,interruptKernel:Ke,isEditingBlock:Vo,openSidekickView:sn,pipeline:fn,project:pn,runBlock:Ge?null:qi,savePipelineContent:xn,setBlockContent:function(e){Co(e),null===cn||void 0===cn||cn(e)},setErrors:Tn,setIsEditingBlock:mi,setOutputCollapsed:Jo,showConfigureProjectModal:Ln})]}),!Hn&&!Re&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{pr:L.cd}),(0,j.jsx)(m.ZP,{basic:!0,iconOnly:!0,noPadding:!0,onClick:function(){go((function(e){return(0,vn.t8)(Ui,!e),!e})),bo||Jo((function(){return(0,vn.t8)(Fi,!0),!0}))},transparent:!0,children:bo?(0,j.jsx)(ie._M,{muted:!0,size:2*L.iI}):(0,j.jsx)(ie.Kh,{muted:!0,size:2*L.iI})})]}),(0,j.jsx)(k.Z,{children:(0,j.jsx)("div",{style:{height:1,width:L.iI}})})]})})),(0,j.jsx)(x.Nk,{onClick:function(){return br()},children:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(x.jv,no(no({},mr),{},{className:Cn&&zn?"selected":null,hideBorderBottom:!Hn&&(!!Br||lr),lightBackground:Mo&&!Vo,noPadding:!0,onClick:br,onDoubleClick:function(){Mo&&!Vo&&mi(!0)},children:[(0,j.jsx)(x.PB,{}),(!lt||!Sr)&&hr.length>=1&&(0,j.jsx)(x.HS,{children:(0,j.jsx)(b.Z,{p:1,children:(0,j.jsx)(h.ZP,{children:null===hr||void 0===hr?void 0:hr.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)(ee.Z,{block:!0,description:t,size:null,widthFitContent:!0,children:(0,j.jsx)(v.Z,{children:o})})},o)}))})})}),(!lt||!Sr)&&!Le&&Do&&!bo&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mt:1}),(0,j.jsx)(x.y9,{noMargin:!0,normalPadding:!0,children:(0,j.jsxs)(b.Z,{pb:1,children:[(0,j.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,j.jsxs)(k.Z,{alignItems:"center",children:[I.t6.YAML===_t&&(0,j.jsx)(Me.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){var n;Fr((n={},(0,i.Z)(n,N.Mv,""),(0,i.Z)(n,N.eW,e.target.value),n)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},placeholder:"Project",small:!0,value:Go[N.eW]||"",children:Object.keys(Zi||{}).map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),I.t6.YAML!==_t&&(0,j.jsx)(g.ZP,{monospace:!0,small:!0,children:Ei}),(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"}),!wi&&(0,j.jsx)(Me.Z,{compact:!0,disabled:!Ei,monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.Mv,e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},placeholder:Ii,small:!0,value:Si||"",children:null===Pi||void 0===Pi?void 0:Pi.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),wi&&(0,j.jsx)(Ye.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.Mv,e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},placeholder:Ei?(null===Ti||void 0===Ti||null===(tl=Ti[0])||void 0===tl?void 0:tl.target)||"Enter target":"Select project first",small:!0,value:Si||"",width:21*L.iI}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(w.Z,{checked:wi,label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Manually enter target"}),onClick:function(e){(0,qe.j)(e),Ai(!wi),wi&&Fr((0,i.Z)({},N.Mv,null))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(ie.kI,{muted:!0})]})})})]}),I.t6.YAML!==_t&&!(null!==yi&&void 0!==yi&&null!==(ol=yi.block)&&void 0!==ol&&ol.snapshot)&&(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie.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"})]})}),Kr,(0,j.jsx)(b.Z,{mr:1})]})]}),I.t6.YAML===_t&&(0,j.jsx)(b.Z,{mt:1,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsxs)(k.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)(Ye.Z,{compact:!0,monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.Pi,no(no({},null===Go||void 0===Go?void 0:Go[N.Pi]),{},(0,i.Z)({},N.pA,e.target.value)))),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},placeholder:"command",small:!0,value:(null===Go||void 0===Go||null===(il=Go[N.Pi])||void 0===il?void 0:il[N.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===Go||void 0===Go?void 0:Go[N.eW])||"project"," folder)"]})]}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:(0,j.jsx)(X.Z,{href:"https://docs.getdbt.com/reference/node-selection/syntax#examples",openNewWindow:!0,small:!0,children:"Examples"})}),(0,j.jsx)(b.Z,{mr:1})]})})]})})]}),!Le&&Bo&&!bo&&!Do&&(0,j.jsx)(x.y9,{normalPadding:!0,children:(0,j.jsxs)(h.ZP,{flexWrap:"wrap",children:[(0,j.jsxs)(h.ZP,{style:{marginTop:"8px"},children:[(0,j.jsx)(Me.Z,{compact:!0,label:"Connection",onChange:function(e){return Fr((0,i.Z)({},N.cH,e.target.value))},onClick:qe.j,small:!0,value:Go[N.cH],children:null===fe||void 0===fe?void 0:fe.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)(Me.Z,{compact:!0,label:"Profile",onChange:function(e){return Fr((0,i.Z)({},N.sc,e.target.value))},onClick:qe.j,small:!0,value:Go[N.sc],children:null===Li||void 0===Li?void 0:Li.map((function(e){return(0,j.jsx)("option",{value:e,children:e},e)}))}),(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(w.Z,{checked:Go[N.Mi],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Use raw SQL"}),onClick:function(e){(0,qe.j)(e),Fr((0,i.Z)({},N.Mi,!Go[N.Mi]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(ie.kI,{muted:!0})]})})}),(null===Go||void 0===Go?void 0:Go[N.Mi])&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(ee.Z,{block:!0,description:(0,j.jsxs)(g.ZP,{default:!0,inline:!0,children:["After successfully running this block",(0,j.jsx)("br",{}),"a ",(0,j.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:"SELECT"})," query will be executed",(0,j.jsx)("br",{}),"to fetch sample output data.",(0,j.jsx)("br",{}),"Check this box to disable this behavior."]}),size:null,widthFitContent:!0,children:(0,j.jsxs)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(w.Z,{checked:null===Go||void 0===Go?void 0:Go[N.V_],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Disable query output"}),onClick:function(e){(0,qe.j)(e),Fr((0,i.Z)({},N.V_,!(null!==Go&&void 0!==Go&&Go[N.V_])))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(ie.kI,{muted:!0})]})})})]}),!Go[N.Mi]&&(0,j.jsxs)(j.Fragment,{children:[Gr&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ye.Z,{compact:!0,label:"Database",monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.Sv,e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},small:!0,value:Go[N.Sv],width:10*L.iI})})]}),(0,j.jsx)(b.Z,{mr:1}),![Ie.CLICKHOUSE,Ie.MYSQL].includes(Go[N.cH])&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ye.Z,{compact:!0,label:"Schema",monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.BD,e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},small:!0,value:Go[N.BD],width:10*L.iI})})}),(0,j.jsx)(b.Z,{mr:1})]}),(0,j.jsx)(ee.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:[Ao,"_",Ft]}),(0,j.jsx)("br",{}),"This field is optional."]}),size:null,widthFitContent:!0,children:(0,j.jsx)(h.ZP,{alignItems:"center",children:(0,j.jsx)(Ye.Z,{compact:!0,label:"Table (optional)",monospace:!0,onBlur:function(){return setTimeout((function(){yn(!1)}),300)},onChange:function(e){Fr((0,i.Z)({},N.m$,e.target.value)),e.preventDefault()},onClick:qe.j,onFocus:function(){yn(!0)},small:!0,value:Go[N.m$],width:20*L.iI})})})]}),(0,j.jsx)(b.Z,{mr:1})]}),!Go[N.Mi]&&(0,j.jsxs)(h.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie.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"})]})}),Kr,(0,j.jsx)(b.Z,{mr:1}),(0,j.jsx)(ee.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",Gr?" 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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(ie.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)(Me.Z,{compact:!0,label:"strategy",onChange:function(e){return Fr((0,i.Z)({},N.nq,e.target.value))},onClick:qe.j,small:!0,value:Go[N.nq],children:null===_e||void 0===_e?void 0:_e.map((function(e){return(0,j.jsx)("option",{value:e,children:(0,U.kC)(e)},e)}))})]})}),(0,j.jsx)(b.Z,{mr:1})]}),(null===Go||void 0===Go?void 0:Go[N.cH])===Ie.TRINO&&Mt.length>=1&&(0,j.jsxs)(h.ZP,{alignItems:"center",style:{marginTop:"8px"},children:[(0,j.jsx)(ee.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)(h.ZP,{alignItems:"center",children:[(0,j.jsx)(w.Z,{checked:Go[N.bk],label:(0,j.jsx)(g.ZP,{muted:!0,small:!0,children:"Unique upstream table names"}),onClick:function(e){(0,qe.j)(e),Fr((0,i.Z)({},N.bk,!Go[N.bk]))}}),(0,j.jsx)("span",{children:"\xa0"}),(0,j.jsx)(ie.kI,{muted:!0})]})}),(0,j.jsx)(b.Z,{mr:1})]})]})}),(!lt||!Sr)&&Jr,Mt.length>=1&&!bo&&(I.f2.includes(Bt)||Do&&I.t6.YAML===_t)&&!Ro&&!Rt&&!Lo&&(!Eo||Eo===re.zr.uuid)&&(0,j.jsxs)(x.y9,{noMargin:!0,normalPadding:!0,children:[Do&&I.t6.YAML===_t&&(0,j.jsxs)(b.Z,{py:1,children:[(0,j.jsxs)(g.ZP,{muted:!0,small:!0,children:["Positional order of upstream block outputs for ",(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"block_output"})," function:"]}),(0,j.jsx)(h.ZP,{children:Mt.reduce((function(e,n,t){var o=Hi[n],i=(0,x.qn)(null===o||void 0===o?void 0:o.type,{blockColor:null===o||void 0===o?void 0:o.color,theme:Yn}).accent;e.push((0,j.jsx)(X.Z,{color:i,onClick:function(){var e,n,t=null===K||void 0===K||null===(e=K.current)||void 0===e?void 0:e["".concat(null===o||void 0===o?void 0:o.type,"s/").concat(null===o||void 0===o?void 0:o.uuid,".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:i,inline:!0,monospace:!0,small:!0,children:n})},n));var r=(null===Mt||void 0===Mt?void 0:Mt.length)||0;return r>=2&&t<r-1&&e.push((0,j.jsx)(g.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0\xa0"},"".concat(n,"-comma"))),e}),[])})]}),!Do&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.Z,{mr:1,pt:1,children:(0,j.jsxs)(g.ZP,{muted:!0,small:!0,children:[!Bo&&"Positional arguments for ".concat(No?"":"decorated ","function:"),Bo&&(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===Mt||void 0===Mt?void 0:Mt[0]})," into a table."]})]})}),(0,j.jsxs)(b.Z,{my:1,children:[!Bo&&!No&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Bt&&"@data_exporter",I.tf.DATA_LOADER===Bt&&"@data_loader",I.tf.TRANSFORMER===Bt&&"@transformer",I.tf.CUSTOM===Bt&&"@custom"]}),(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:["def ",(I.tf.DATA_EXPORTER===Bt?"export_data":I.tf.DATA_LOADER===Bt&&"load_data")||I.tf.TRANSFORMER===Bt&&"transform"||I.tf.CUSTOM===Bt&&"transform_custom","(",Mt.map((function(e,n){return n>=1?"data_".concat(n+1):"data"})).join(", "),"):"]})]}),No&&(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[I.tf.DATA_EXPORTER===Bt?"export_data":I.tf.TRANSFORMER===Bt&&"transform","\xa0\u2190 function(",Mt.map((function(e,n){return"df_".concat(n+1)})).join(", "),"):"]})}),Bo&&(null===Mt||void 0===Mt?void 0:Mt.length)>=1&&(0,j.jsx)($e,{block:F,blockConfiguration:Go,blockRefs:K,blocks:null===Mt||void 0===Mt?void 0:Mt.map((function(e){return null===Hi||void 0===Hi?void 0:Hi[e]})),updateBlockConfiguration:Fr}),!Bo&&Mt.map((function(e,n){var t=Hi[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:Yn}).accent,i="{{ df_".concat(n+1," }}");return(0,j.jsxs)("div",{children:[!Bo&&!No&&(0,j.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:["\xa0\xa0\xa0\xa0data",n>=1?"_".concat(n+1):null]}),Bo&&(0,j.jsx)(g.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),No&&(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)(X.Z,{color:o,onClick:function(){var e,n,o=null===K||void 0===K||null===(e=K.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)}))]})]})]}),(!Eo||!(null!==H&&void 0!==H&&H.length)||Eo===re.zr.uuid)&&!bo&&$r&&(0,j.jsx)(x.HS,{darkBorder:!0,noBackground:!0,children:(0,j.jsx)(b.Z,{p:1,children:$r})}),re.aj.uuid===Eo&&(null===H||void 0===H?void 0:H.length)>=1&&!bo&&(0,j.jsx)(j.Fragment,{children:qr}),!St&&(!Eo||!(null!==H&&void 0!==H&&H.length)||re.zr.uuid===Eo)&&(0,j.jsx)(j.Fragment,{children:bo?(0,j.jsx)(b.Z,{p:1,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["(",(0,U._6)("line",null===jo||void 0===jo?void 0:jo.split(/\r\n|\r|\n/).length)," collapsed)"]})}):!Mo||Vo?Zr&&!Lo?(0,j.jsx)(b.Z,{px:1,py:L.cd,children:(0,j.jsxs)(g.ZP,{monospace:!0,muted:!0,children:["Replicated from block ",(0,j.jsx)(X.Z,{color:(0,x.qn)(null===Zr||void 0===Zr?void 0:Zr.type,{blockColor:null===Zr||void 0===Zr?void 0:Zr.color,theme:Yn}).accent,onClick:function(e){var n,t;(0,qe.j)(e);var o=null===K||void 0===K||null===(n=K.current)||void 0===n?void 0:n["".concat(null===Zr||void 0===Zr?void 0:Zr.type,"s/").concat(null===Zr||void 0===Zr?void 0:Zr.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===Zr||void 0===Zr?void 0:Zr.type,{blockColor:null===Zr||void 0===Zr?void 0:Zr.color,theme:Yn}).accent,inline:!0,monospace:!0,children:null===Zr||void 0===Zr?void 0:Zr.uuid})})]})}):Dr:zr}),ye&&c.cloneElement(ye,{runBlockAndTrack:qi}),St&&(0,j.jsxs)(b.Z,{p:L.cd,children:[(0,j.jsx)(g.ZP,{bold:!0,danger:!0,children:null===St||void 0===St?void 0:St.error}),(0,j.jsx)(g.ZP,{muted:!0,children:null===St||void 0===St?void 0:St.message})]}),!(Lo&&I.t6.PYTHON!==_t)&&Nr,Lo&&I.t6.PYTHON!==_t&&Nr,Er]})),!Hn&&Mr]})})]})})}var ll=(0,j.jsx)(x.Ig,{ref:n,children:(0,j.jsx)("div",{ref:Ci,style:{zIndex:G===O?Hr+9:null},children:(0,j.jsxs)("div",{style:{paddingTop:Hn&&0===G?x.WC:0,position:"relative"},children:[Hn&&G>=1&&(0,j.jsxs)(x.gE,{additionalZIndex:Hr-G,bottom:0,height:x.WC,onMouseEnter:function(){return co(!0)},onMouseLeave:function(){co(!1),null===On||void 0===On||On(null)},children:[uo&&C&&(0,j.jsx)(b.Z,{mx:2,style:{width:"100%"},children:el(null===Y||void 0===Y?void 0:Y[G-1],G-1)}),(0,j.jsx)(x.t1,{className:"block-divider-inner"})]}),Xr,!Hn&&!ln&&(0,j.jsxs)(x.gE,{additionalZIndex:Hr-G,onMouseEnter:function(){return co(!0)},onMouseLeave:function(){co(!1),null===On||void 0===On||On(null)},children:[uo&&C&&(0,j.jsx)(b.Z,{mt:2,mx:2,style:{width:"100%"},children:el(F,G)}),(0,j.jsx)(x.t1,{className:"block-divider-inner"})]}),q]})})}),ul=(0,c.useMemo)((function(){var e=Xe||{},n=(e.height,e.x),t=(e.width,e.y),o=n+x.IN;return Qr&&!jn&&(o+=Rn.nn),(0,j.jsx)(x.j1,{left:o,ref:qn,top:t,width:Yr,children:ll})}),[G,ll,Qr,Xe,jn]),cl=(0,c.useMemo)((function(){return((null===Y||void 0===Y?void 0:Y.length)||0)-G}),[G,Y]),al=(0,c.useMemo)((function(){var e=Xe||{},n=(e.height,e.x),t=e.width,o=e.y,i=Vn+x.IN-(n+t);return jn?Vr&&(i+=x.IN):Wr&&(i+=x.IN),(0,j.jsx)(x.j1,{ref:Xn,right:i,top:o,width:Yr,zIndex:cl,children:Mr})}),[G,Y,Mr,Wr,Vr,Xe,Yr,Vn,cl]);return Hn?(0,j.jsxs)(x.fk,{zIndex:Cn?cl:uo?2*cl:null,children:[ul,al]}):ll}var io=c.forwardRef(oo)},84820:function(e,n,t){t.d(n,{Z:function(){return h}});var o,i=t(21831),r=t(44425),l=t(82394),u=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(89209);function d(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?d(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=t(86735);function p(e,n){var t=e;t.includes("__init__")||t.push("__init__");var o,i=t.length;return(0,f.w6)(i).forEach((function(e,r){if(o)return o;var l=t.slice(0,i-r).join(c.sep);o=n["".concat(l,".py")]})),o}function v(e,n,t){var o,i,r;return((null===(o=t.outputs)||void 0===o||null===(i=o[0])||void 0===i||null===(r=i.sample_data)||void 0===r?void 0:r.columns)||[]).map((function(t){return{label:"".concat(t," column"),kind:e.languages.CompletionItemKind.Variable,insertText:"'".concat(t,"'"),range:n}}))}function m(e,n){var t=e.word.split(""),o=new RegExp(t.reduce((function(e,n,o){var i=t[o+1],r=i?"^".concat(i):"";return e+"".concat(n,"[w ").concat(r,"]*")}),""));return n.reduce((function(e,n){return n.label.match(o)?e.concat(n):e}),[])}function h(e){var n=e.autocompleteItems,t=e.block,l=e.blocks,d=e.pipeline,h=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=[],k=x.getValueInRange({endColumn:j.column,endLineNumber:j.lineNumber,startColumn:1,startLineNumber:1}),O=x.getWordUntilPosition(j),y=O.endColumn,Z=O.startColumn,E={endColumn:y,endLineNumber:j.lineNumber,startColumn:Z,startLineNumber:j.lineNumber},T=function(e,n,t){var o=(0,a.Yn)(e),i=(0,a.M4)(e,n),r=o.find((function(e){var n=e.variableName;return i.match(new RegExp(n))}));if(r){var l=r.assignmentValue,u=(0,a.S0)(e)[l];if(u){var c,d=p(u.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t),s=(0,a.rW)(u,l);return null===d||void 0===d||null===(c=d.methods_for_class)||void 0===c?void 0:c[s]}}return[]}(k,E,g);if((null===T||void 0===T?void 0:T.length)>=1){var P=m(O,T.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Method,label:e,range:E}})));if(P.length>=1)return{suggestions:P}}var S=function(e,n,t){var o=(0,a.M4)(e,n);if(o=o.match(/([\w_]+)./)){var i=(0,a.S0)(e)[o[1]];if(i){var r=p(i.split(" as ")[0].replace("from ","").replace("import ","").split(" ").reduce((function(e,n){return n.trim()?e.concat(n):e}),[]).join(".").split("."),t);if(null!==r&&void 0!==r&&r.functions)return null===r||void 0===r?void 0:r.functions}}return[]}(k,E,g);if((null===S||void 0===S?void 0:S.length)>=1){var I=m(O,S.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Function,label:e,range:E}})));if(I.length>=1)return{suggestions:I}}if((null===b||void 0===b?void 0:b.length)>=1){var _=new RegExp("\n@".concat(h));k.match(_)&&C.push.apply(C,(0,i.Z)(m(O,function(e,n,t){var o=t.block,i=t.blocks,r=o.upstream_blocks,l=(0,f.HK)(i,(function(e){return e.uuid}));return r.map((function(t,o){var i=l[t].type,r=0===o?"output_0":"args[".concat(o-1,"]");return{label:"df ".concat(t," ").concat(i," block"),kind:e.languages.CompletionItemKind.Variable,documentation:"Variable for ".concat(i," ").concat(t," data."),insertText:r,range:n}}))}(t,E,e))))}if(O.word.match(/i|f/)){var w=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,r=arguments.length>4?arguments[4]:void 0,l=(arguments.length>2?arguments[2]:void 0).word,d=new Set,f={};e.forEach((function(e){var n=e.group,t=e.id,i=e.imports;if([o.MAGE_LIBRARY,o.USER_LIBRARY].includes(n)){var r=t;r.match(/__init__.py/)&&(r=r.replace(/\/__init__.py/,"")),r=r.split(".py")[0].replaceAll(c.sep,"."),f[r]=e}var l=t.replace(".py","").replace("/__init__","").split(c.sep);if(1===l.length)d.add("import ".concat(l[0]));else if(l.length>=2){var u=l.slice(0,l.length-1).join(".");d.add("from ".concat(u," import ").concat(l[l.length-1]))}i.forEach((function(e){return d.add(e)}))}));var p,v="i"===l,m="f"===l,h=v?"import":m?"from":"",b=(0,a.M4)(n,r);if(v&&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,k=g.functions,O=[];return[[j,t.languages.CompletionItemKind.Constant],[x,t.languages.CompletionItemKind.Class],[k,t.languages.CompletionItemKind.Function]].forEach((function(e){var n=(0,u.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:r})}))})),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:r})})),O}return(0,i.Z)(d).map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.File,label:e,range:r}})).concat(Object.entries(f).map((function(e){var n=(0,u.Z)(e,2),o=n[0];return n[1],{filterText:"".concat(h," ").concat(o),insertText:"".concat(h," ").concat(o," "),kind:t.languages.CompletionItemKind.File,label:"".concat(o),range:s({},r)}})))}(n,k,O,t,E,e);C.push.apply(C,(0,i.Z)(w))}if(r.tf.CHART===h||r.tf.SCRATCHPAD===h){var A=[];if(r.tf.CHART===h?b.forEach((function(e,n){A.push({block:l.find((function(n){var t=n.uuid;return e===t})),matchIndex:0,variableName:"df_".concat(n+1)})})):r.tf.SCRATCHPAD===h&&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")}}))}(l,d).forEach((function(e){var n=e.block,t=e.regex,o=k.matchAll(t);(0,i.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&&A.push({block:n,matchIndex:t,variableName:o})}))})),A.length>=1){var R,D=null===(R=k.split("\n")[j.lineNumber-1])||void 0===R?void 0:R.slice(0,O.startColumn-1);if(D){var B=[];if(A.forEach((function(e){var n=e.block,o=e.matchIndex,i=e.variableName,r=new RegExp("".concat(i,"\\["));D.match(r)&&B.push({items:v(t,E,n),matchIndex:o})})),B.length>=1)return{suggestions:m(O,(0,f.YC)(B,"matchIndex",{ascending:!1})[0].items)}}}1===Z&&(r.tf.CHART===h?C.push.apply(C,(0,i.Z)(m(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:E}}))))):r.tf.SCRATCHPAD===h&&C.push.apply(C,(0,i.Z)(m(O,function(e,n,t){var o=t.block,i=t.blocks,l=t.pipeline;return i.reduce((function(t,i){var u=i.type,c=i.uuid;return o.uuid!==c&&[r.tf.DATA_LOADER,r.tf.TRANSFORMER].includes(u)?t.concat({label:"df ".concat(c," ").concat(u," block"),kind:e.languages.CompletionItemKind.Snippet,documentation:"Get the data from ".concat(u," block ").concat(c,"."),insertText:"from mage_ai.data_preparation.variable_manager import get_variable\n\n\ndf = get_variable('".concat(l.uuid,"', '").concat(c,"', 'output_0')\n"),range:n}):t}),[])}(t,E,e)))))}var N=new Set;l.concat({content:k}).forEach((function(e){var n=e.content;(0,i.Z)(n.matchAll("([A-Za-z_0-9]+)","g")).forEach((function(e){return N.add(e[1])}))}));var M=(0,i.Z)(N);if(M.length){var L=M.map((function(e){return{filterText:e,insertText:e,kind:t.languages.CompletionItemKind.Variable,label:e,range:E}}));C.push.apply(C,(0,i.Z)(m(O,L)))}return{suggestions:C}}}}},32929:function(e,n,t){t.d(n,{A2:function(){return h},dP:function(){return b},hS:function(){return j},iK:function(){return g},n9:function(){return m},qy:function(){return x}});var o,i=t(26304),r=t(82394),l=t(13507),u=t(44425),c=t(72473),a=t(57653),d=t(55283),s=["uuid"],f=["uuid"];function p(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 v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={uuid:"Blocks"},h={uuid:"Pipelines"},b=[m,h],g=(o={},(0,r.Z)(o,u.tf.CALLBACK,c.AQ),(0,r.Z)(o,u.tf.CHART,c.GQ),(0,r.Z)(o,u.tf.CONDITIONAL,c.hW),(0,r.Z)(o,u.tf.CUSTOM,c.VS),(0,r.Z)(o,u.tf.DATA_EXPORTER,c.zS),(0,r.Z)(o,u.tf.DATA_LOADER,c.rH),(0,r.Z)(o,u.tf.DBT,c.xE),(0,r.Z)(o,u.tf.EXTENSION,c.Bf),(0,r.Z)(o,u.tf.MARKDOWN,c.$B),(0,r.Z)(o,u.tf.SENSOR,c.LM),(0,r.Z)(o,u.tf.TRANSFORMER,c.Sv),o),x=[{Icon:c.zQ,uuid:"All templates"}].concat([{uuid:u.tf.DATA_LOADER},{uuid:u.tf.TRANSFORMER},{selectedIconProps:{inverted:!0},uuid:u.tf.DATA_EXPORTER},{uuid:u.tf.SENSOR},{selectedIconProps:{inverted:!0},uuid:u.tf.CUSTOM},{uuid:u.tf.CHART},{selectedIconProps:{inverted:!0},uuid:u.tf.CALLBACK},{selectedIconProps:{inverted:!0},uuid:u.tf.CONDITIONAL},{uuid:u.tf.EXTENSION},{selectedBackgroundColor:null,uuid:u.tf.DBT},{selectedIconProps:{inverted:!0},uuid:u.tf.MARKDOWN}].map((function(e){var n=e.uuid,t=(0,i.Z)(e,s);return v({Icon:g[n],filterTemplates:function(e){return null===e||void 0===e?void 0:e.filter((function(e){return e.block_type===n}))},label:function(){return u.V4[n]},selectedBackgroundColor:function(e){return(0,d.qn)(n,{theme:e}).accent},uuid:n},t)}))),j=[{Icon:c.zQ,uuid:"All templates"}].concat([{Icon:c.X5,uuid:a.qL.PYTHON},{Icon:c.ZG,uuid:a.qL.INTEGRATION},{Icon:l.Z,uuid:a.qL.STREAMING}].map((function(e){var n=e.uuid,t=(0,i.Z)(e,f);return v({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 a.G7[n]},uuid:n},t)})))},99236:function(e,n,t){var o=t(55485),i=t(75499),r=t(30160),l=t(72473),u=t(55283),c=t(28598);n.Z=function(e){var n=e.inputsBlocks;return(0,c.jsx)(i.Z,{columnFlex:[null,1,null,1,null],columns:[{uuid:"Position"},{uuid:"Block"},{center:!0,uuid:"Catalog"},{center:!0,uuid:"Streams"},{rightAligned:!0,uuid:"Argument shape"}],rows:null===n||void 0===n?void 0:n.map((function(e,n){var t=e.block,i=t.color,a=t.type,d=t.uuid,s=e.input,f=s.catalog,p=s.streams,v=(null===p||void 0===p?void 0:p.length)>=1,m=(0,u.qn)(a,{blockColor:i}).accent;return[(0,c.jsx)(r.ZP,{default:!0,monospace:!0,children:n},"position-".concat(d)),(0,c.jsx)(r.ZP,{color:m,monospace:!0,children:d},"block-".concat(d)),(0,c.jsx)(o.ZP,{justifyContent:"center",children:f?(0,c.jsx)(l.Jr,{success:!0}):(0,c.jsx)(l.x8,{muted:!0})},"catalog-".concat(d)),(0,c.jsxs)(o.ZP,{justifyContent:"center",children:[!v&&(0,c.jsx)(l.x8,{muted:!0},"catalog-".concat(d)),v&&null!==p&&void 0!==p&&p.includes(d)?(0,c.jsx)(l.Jr,{success:!0}):(0,c.jsx)(r.ZP,{center:!0,default:!0,monospace:!0,small:!0,children:null===p||void 0===p?void 0:p.join(", ")})]},"selected-streams-".concat(d)),(0,c.jsxs)(r.ZP,{default:!0,monospace:!0,rightAligned:!0,children:[f&&!v&&"Dict",!f&&v&&"Union[Dict, pd.DataFrame]",f&&v&&"Tuple[Union[Dict, pd.DataFrame], Dict]"]},"shape-".concat(d))]}))})}},37443:function(e,n,t){t.d(n,{C0:function(){return v},Pf:function(){return f},TD:function(){return s},mU:function(){return d},oI:function(){return l},tw:function(){return a},uK:function(){return u}});var o,i,r,l,u,c=t(82394);!function(e){e.CHECKBOX="checkbox",e.CUSTOM="custom",e.SELECT="select",e.TOGGLE="toggle"}(l||(l={})),function(e){e.CONFIGURATION="configuration",e.OVERVIEW="overview",e.STREAMS="streams",e.SYNC="sync"}(u||(u={}));var a,d=(o={},(0,c.Z)(o,u.CONFIGURATION,u.CONFIGURATION),(0,c.Z)(o,u.OVERVIEW,u.OVERVIEW),(0,c.Z)(o,u.STREAMS,u.STREAMS),(0,c.Z)(o,u.SYNC,u.SYNC),o),s=(i={},(0,c.Z)(i,u.CONFIGURATION,"Configuration"),(0,c.Z)(i,u.OVERVIEW,"Overview"),(0,c.Z)(i,u.STREAMS,"Streams"),(0,c.Z)(i,u.SYNC,"Sync"),i);!function(e){e.BOOKMARKS="bookmarks",e.CREDENTIALS="credentials",e.OVERVIEW="overview",e.SAMPLE_DATA="sample_data",e.SETTINGS="settings",e.STREAM_CONFLICTS="stream_conflicts",e.UPSTREAM_BLOCK_SETTINGS="upstream_block_settings"}(a||(a={}));var f=(r={},(0,c.Z)(r,u.CONFIGURATION,[{label:function(){return"Credentials"},uuid:a.CREDENTIALS},{label:function(){return"Upstream block settings"},uuid:a.UPSTREAM_BLOCK_SETTINGS}]),(0,c.Z)(r,u.SYNC,[{label:function(){return"Bookmarks"},uuid:a.BOOKMARKS}]),(0,c.Z)(r,u.STREAMS,[]),(0,c.Z)(r,u.OVERVIEW,[]),r),p={label:function(){return"Schema property conflicts"},uuid:a.STREAM_CONFLICTS};function v(e){var n=[{label:function(){return"Overview"},uuid:a.OVERVIEW},{label:function(){return"Schema properties"},uuid:a.SETTINGS}];return null!==e&&void 0!==e&&e.addStreamConflicts&&n.push(p),n.push({label:function(){return"Sample data"},uuid:a.SAMPLE_DATA}),n}},87418:function(e,n,t){var o=t(82394),i=t(82684),r=t(71180),l=t(50724),u=t(55485),c=t(70374),a=t(30160),d=t(72473),s=t(39643),f=t(26419),p=t(58325),v=t(44688),m=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 b(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,o.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}n.Z=function(e){var n=e.children,t=e.defaultTextContent,o=e.fileVersionsVisible,h=e.menuGroups,g=e.onSave,x=e.rightOffset,j=e.setFilesVersionsVisible,C=(0,i.useState)(null),k=C[0],O=C[1],y=(0,i.useRef)({}),Z=(0,i.useRef)(null),E=(0,i.useRef)(null),T=(0,i.useMemo)((function(){return[{disabled:!g,keyTextGroups:[[(0,p.V5)()?s.RJ:s.hE,s.SS]],label:function(){return"Save"},onClick:function(){return g?g():null},uuid:"save"}]}),[g]),P=(0,i.useMemo)((function(){return[{label:function(){return o?"Hide versions":"Show versions"},onClick:function(){return null===j||void 0===j?void 0:j(!o)},uuid:"versions"}]}),[o,j]),S="FileHeaderMenu/index",I=(0,v.y)(),_=I.registerOnKeyDown,w=I.unregisterOnKeyDown;return(0,i.useEffect)((function(){return function(){w(S)}}),[w,S]),_(S,(function(e,n){null!==k&&(n[s.QK]?O((function(e){return 0===e?2:e-1})):n[s.DY]&&O((function(e){return 2===e?0:e+1})))}),[k,O]),(0,m.jsx)(l.Z,{onClickOutside:function(){return O(null)},open:!0,style:{height:"100%",position:"relative"},children:(0,m.jsxs)(u.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,children:[!h&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(r.ZP,b(b({},f.a),{},{noBackground:0!==k,onClick:function(){return O((function(e){return 0===e?null:0}))},onMouseEnter:function(){return O((function(e){return null!==e?0:null}))},ref:Z,children:(0,m.jsx)(a.ZP,{children:"File"})})),(0,m.jsx)(c.Z,{items:T,onClickCallback:function(){return O(null)},open:0===k,parentRef:Z,uuid:"FileHeaderMenu/file"})]}),(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(r.ZP,b(b({},f.a),{},{noBackground:1!==k,onClick:function(){return O((function(e){return 1===e?null:1}))},onMouseEnter:function(){return O((function(e){return null!==e?1:null}))},ref:E,children:(0,m.jsx)(a.ZP,{children:"Edit"})})),(0,m.jsx)(c.Z,{items:P,onClickCallback:function(){return O(null)},open:1===k,parentRef:E,uuid:"FileHeaderMenu/edit"})]}),(0,m.jsx)("div",{style:{position:"relative"},children:(0,m.jsx)(r.ZP,b(b({},f.a),{},{beforeIcon:(0,m.jsx)(d.$B,{muted:!o}),noBackground:!o,onClick:function(){return null===j||void 0===j?void 0:j(!o)},children:(0,m.jsx)(a.ZP,{children:o?"Hide file versions":"Show file versions"})}))})]}),h&&(null===h||void 0===h?void 0:h.map((function(e,n){var o,l=e.items,u=e.label,d=e.uuid,s=(null===y||void 0===y||null===(o=y.current)||void 0===o?void 0:o[d])||(0,i.createRef)();return y.current[d]=s,(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(r.ZP,b(b({},f.a),{},{noBackground:k!==n,onClick:function(){return O((function(e){return e===n?null:n}))},onMouseEnter:function(){return O((function(e){return null!==e?n:null}))},ref:s,children:(0,m.jsx)(a.ZP,{default:t,children:u?null===u||void 0===u?void 0:u():d})})),(0,m.jsx)(c.Z,{items:l,onClickCallback:function(){return O(null)},open:k===n,parentRef:s,rightOffset:x,uuid:"FileHeaderMenu/".concat(d,"/").concat(n)})]},d)}))),n]})})}},75634:function(e,n,t){t.d(n,{W4:function(){return s},Wx:function(){return d},ZG:function(){return a}});var o=t(38626),i=t(44897),r=t(44425),l=t(42631),u=t(70515),c=t(55283),a=u.cd*u.iI,d=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;"," "," "," "," "," "," "," "," "," ",""],l.BG,(function(e){return e.border&&"\n border: 1px dotted ".concat((e.theme.content||i.Z.content).active,";\n ")}),(function(e){return e.grey&&"\n background-color: ".concat((0,c.qn)(r.tf.SCRATCHPAD,e).accent,";\n ")}),(function(e){return e.blue&&"\n background-color: ".concat((0,c.qn)(r.tf.DATA_LOADER,e).accent,";\n ")}),(function(e){return e.purple&&"\n background-color: ".concat((0,c.qn)(r.tf.TRANSFORMER,e).accent,";\n ")}),(function(e){return e.sky&&"\n background-color: ".concat((0,c.qn)(r.tf.MARKDOWN,e).accent,";\n ")}),(function(e){return e.teal&&"\n background-color: ".concat((0,c.qn)(r.tf.EXTENSION,e).accent,";\n ")}),(function(e){return e.rose&&"\n background-color: ".concat((0,c.qn)(r.tf.CALLBACK,e).accent,";\n ")}),(function(e){return e.yellow&&"\n background-color: ".concat((0,c.qn)(r.tf.DATA_EXPORTER,e).accent,";\n ")}),(function(e){return!e.compact&&"\n height: ".concat(a+u.iI/2,"px;\n width: ").concat(a+u.iI/2,"px;\n ")}),(function(e){return e.compact&&"\n height: ".concat(a/2+u.iI,"px;\n width: ").concat(a/2+u.iI,"px;\n ")})),s=o.default.div.withConfig({displayName:"indexstyle__ButtonWrapper",componentId:"sc-oyfjzc-1"})(["position:relative;margin-bottom:","px;margin-right:","px;",""],u.iI,u.iI,(function(e){return e.increasedZIndex&&"\n z-index: 3;\n "}))},46510:function(e,n,t){t.d(n,{Z:function(){return be}});var o=t(82394),i=t(21831),r=t(82684),l=t(75582),u=t(69864),c=t(27277),a=t(2548),d=t(71180),s=t(46732),f=t(28598);var p=function(e){var n=e.fill,t=void 0===n?"white":n,o=e.size;return(0,f.jsxs)("svg",{fill:"none",height:o,viewBox:"0 0 20 21",width:o,xmlns:"http://www.w3.org/2000/svg",children:[(0,f.jsx)("g",{clipPath:"url(#clip0_11802_82284)",children:(0,f.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,f.jsx)("defs",{children:(0,f.jsx)("clipPath",{id:"clip0_11802_82284",children:(0,f.jsx)("rect",{fill:t,height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]})},v=t(91835),m=t(45373),h=t(63403),b=t(72473);function g(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 x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=(0,v.Z)({},e),t=(null===n||void 0===n?void 0:n.size)||h.C,o=(0,b.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,f.jsxs)(m.ZP,x(x({},n),{},{size:t,viewBox:null,children:[(0,f.jsx)("g",{clipPath:"url(#clip0_11826_796)",id:"Type / Scratchpad",children:(0,f.jsx)("g",{id:"Vector",children:o(x(x({},n),{},{size:t}))})}),(0,f.jsx)("defs",{children:(0,f.jsx)("clipPath",{id:"clip0_11826_796",children:(0,f.jsx)("rect",{fill:"white",height:"20",transform:"translate(0 0.00244141)",width:"20"})})})]}))},C=t(38276),k=t(12468),O=t(44425),y=t(32929),Z="items_more",E="templates/list",T="templates/new",P=[O.tf.CUSTOM,O.tf.MARKDOWN],S=[O.tf.DATA_LOADER,O.tf.TRANSFORMER,O.tf.DATA_EXPORTER,O.tf.CUSTOM,O.tf.DBT,O.tf.SENSOR,O.tf.GLOBAL_DATA_PRODUCT,O.tf.MARKDOWN,E,T],I=t(38118),_=t(13803),w=t(81728),A=t(55283),R=t(38399),D=t(42122);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 N(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 M,L=function(e){var n=e.addNewBlock,t=e.blockIdx,i=e.blockTemplatesByBlockType,u=e.buttonMenuOpenIndex,c=e.closeButtonMenu,a=e.compact,v=e.design,m=e.itemsDBT,h=e.pipelineType,g=e.setAddNewBlockMenuOpenIdx,x=e.setButtonMenuOpenIndex,B=(e.showBlockBrowserModal,e.showBrowseTemplates),M=e.showGlobalDataProducts,L=[(0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null)],U=(0,r.useCallback)((function(e){return null===g||void 0===g?void 0:g((function(n){return null===n||u!==e?t:null}))}),[t,u,g]),F=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.DATA_LOADER,h,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.DATA_LOADER,"/").concat(O.t6.PYTHON)})))||void 0===t?void 0:t.items}),[n,i,h]),G=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.DATA_LOADER,h,{blockTemplatesByBlockType:i,dataIntegrationType:_.O.SOURCES,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.DATA_LOADER,"/").concat(_.O.SOURCES)})))||void 0===t?void 0:t.items}),[n,i,h]),H=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.DATA_EXPORTER,h,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.DATA_EXPORTER,"/").concat(O.t6.PYTHON)})))||void 0===t?void 0:t.items}),[n,i,h]),z=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.DATA_EXPORTER,h,{blockTemplatesByBlockType:i,dataIntegrationType:_.O.DESTINATIONS,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.DATA_EXPORTER,"/").concat(_.O.DESTINATIONS)})))||void 0===t?void 0:t.items}),[n,i,h]),K=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.TRANSFORMER,h,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.TRANSFORMER,"/").concat(O.t6.PYTHON)})))||void 0===t?void 0:t.items}),[n,i,h]),Q=(0,r.useMemo)((function(){var e,t;return null===(e=(0,R.hr)(n,O.tf.SENSOR,h,{blockTemplatesByBlockType:i,v2:!0}))||void 0===e||null===(t=e.find((function(e){return e.uuid==="".concat(O.tf.SENSOR,"/").concat(O.t6.PYTHON)})))||void 0===t?void 0:t.items}),[n,i,h]),W=(0,r.useCallback)((function(e){return[{isGroupingTitle:!0,label:function(){return"SQL"},uuid:"".concat(O.t6.SQL,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){n({language:O.t6.SQL,type:e})},uuid:"".concat(O.t6.SQL,"/").concat(e,"/Base template (generic)")},{isGroupingTitle:!0,label:function(){return"R"},uuid:"".concat(O.t6.R,"/").concat(e,"/group")},{label:function(){return"Base template (generic)"},onClick:function(){n({language:O.t6.R,type:e})},uuid:"".concat(O.t6.R,"/").concat(e,"/Base template (generic)")}]}),[n]),V=(0,r.useMemo)((function(){var e=[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(O.t6.PYTHON).concat(O.tf.DATA_LOADER,"/group")}].concat(F).concat(W(O.tf.DATA_LOADER));return G&&e.push.apply(e,[{isGroupingTitle:!0,label:function(){return"Data integrations"},uuid:[O.tf.DATA_LOADER,_.I.DATA_INTEGRATION,"group"].join("/")},{items:G,label:function(){return(0,w.kC)(_.O.SOURCES)},uuid:[O.tf.DATA_LOADER,_.I.DATA_INTEGRATION,_.O.SOURCES].join("/")}]),e}),[W,F,G]),Y=(0,r.useMemo)((function(){var e=[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(O.t6.PYTHON).concat(O.tf.DATA_EXPORTER,"/group")}].concat(H).concat(W(O.tf.DATA_EXPORTER));return z&&e.push.apply(e,[{isGroupingTitle:!0,label:function(){return"Data integrations"},uuid:"".concat(O.tf.DATA_EXPORTER,"/").concat(_.I.DATA_INTEGRATION,"/group")},{items:z,label:function(){return(0,w.kC)(_.O.DESTINATIONS)},uuid:"".concat(O.tf.DATA_EXPORTER,"/").concat(_.I.DATA_INTEGRATION,"/").concat(_.O.DESTINATIONS)}]),e}),[W,H,z]),q=(0,r.useMemo)((function(){return[{beforeIcon:(0,f.jsx)(b.VS,{default:!0,size:I.ZG}),label:function(){return"Python block"},onClick:function(){n({language:O.t6.PYTHON,type:O.tf.CUSTOM})},uuid:"Python"},{beforeIcon:(0,f.jsx)(b.VS,{default:!0,size:I.ZG}),label:function(){return"SQL block"},onClick:function(){n({language:O.t6.SQL,type:O.tf.CUSTOM})},uuid:"SQL"},{beforeIcon:(0,f.jsx)(b.VS,{default:!0,size:I.ZG}),label:function(){return"R block"},onClick:function(){n({language:O.t6.R,type:O.tf.CUSTOM})},uuid:"R"},{beforeIcon:(0,f.jsx)(j,{default:!0,size:I.ZG}),label:function(){return"Scratchpad"},onClick:function(){n({language:O.t6.PYTHON,type:O.tf.SCRATCHPAD})},uuid:"scratchpad"}]}),[n]),X=(0,r.useMemo)((function(){var e,n,t,o,i,r,l=[Z],u=null===v||void 0===v||null===(e=v.pages)||void 0===e||null===(n=e.pipelines)||void 0===n||null===(t=n.edit)||void 0===t||null===(o=t.buttons)||void 0===o||null===(i=o.block)||void 0===i||null===(r=i.add)||void 0===r?void 0:r.items;return u?l.concat(u):l.concat(P)}),[v]),J=(0,r.useMemo)((function(){var e,n,t,o,i,r,l=[],u=null===v||void 0===v||null===(e=v.pages)||void 0===e||null===(n=e.pipelines)||void 0===n||null===(t=n.edit)||void 0===t||null===(o=t.buttons)||void 0===o||null===(i=o.block)||void 0===i||null===(r=i.add)||void 0===r?void 0:r.items_more;return u?l.concat(u):l.concat(S.filter((function(e){return!X.includes(e)})))}),[v,X]),$=(0,r.useCallback)((function(e){var t,i,r=e.index;return Object.entries((i={},(0,o.Z)(i,O.tf.CUSTOM,{Icon:b.cW,items:q,tooltip:function(){return"Add a blank custom block or scratchpad block"}}),(0,o.Z)(i,O.tf.DATA_EXPORTER,{Icon:b.zS,items:Y,label:function(){return O.V4[O.tf.DATA_EXPORTER]},uuid:"".concat(O.tf.DATA_EXPORTER,"/").concat(O.t6.PYTHON)}),(0,o.Z)(i,O.tf.SENSOR,{Icon:b.LM,items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:"".concat(O.t6.PYTHON).concat(O.tf.SENSOR,"/group")}].concat(Q),label:function(){return O.V4[O.tf.SENSOR]},uuid:"".concat(O.tf.SENSOR,"/").concat(O.t6.PYTHON)}),(0,o.Z)(i,O.tf.DATA_LOADER,{Icon:b.rH,items:V,label:function(){return O.V4[O.tf.DATA_LOADER]},uuid:"".concat(O.tf.DATA_LOADER,"/").concat(O.t6.PYTHON)}),(0,o.Z)(i,O.tf.DBT,{Icon:b.xE,items:m,label:function(){return"dbt"}}),(0,o.Z)(i,O.tf.GLOBAL_DATA_PRODUCT,{Icon:b.ie,onClick:function(){return M({addNewBlock:n})}}),(0,o.Z)(i,O.tf.MARKDOWN,{Icon:p,onClick:function(e){null===e||void 0===e||e.preventDefault(),n({language:O.t6.MARKDOWN,type:O.tf.MARKDOWN})},tooltip:function(){return"Add a markdown block for documentation"}}),(0,o.Z)(i,O.tf.TRANSFORMER,{Icon:b.Sv,items:[{isGroupingTitle:!0,label:function(){return"Python"},uuid:[O.t6.PYTHON,O.tf.TRANSFORMER,"group"].join("/")}].concat(K).concat(W(O.tf.TRANSFORMER)),label:function(){return O.V4[O.tf.TRANSFORMER]},uuid:[O.t6.PYTHON,O.tf.TRANSFORMER].join("/")}),(0,o.Z)(i,Z,{Icon:b.zQ,buildItems:function(){return null===J||void 0===J?void 0:J.map((function(e,n){var t=$({index:100*n})[e],o=t.Icon;if(o){var i,r=[E,T].includes(e),l=null===(i=(0,A.qn)(e))||void 0===i?void 0:i.accent;t.beforeIcon=(0,f.jsx)(o,{default:r,fill:r?null:l,size:I.ZG})}return(0,D.gR)(t,t.beforeIcon?["Icon"]:[])}))},customSubmenuHeights:(t={},(0,o.Z)(t,[O.tf.DATA_EXPORTER,_.I.DATA_INTEGRATION,_.O.DESTINATIONS].join("/"),504),(0,o.Z)(t,[O.tf.DATA_LOADER,_.I.DATA_INTEGRATION,_.O.SOURCES].join("/"),504),t),label:function(){return"Templates"},tooltip:function(){return"Add a block from a template"}}),(0,o.Z)(i,E,{Icon:b.zQ,label:function(){return"Browse templates"},onClick:function(){return B({addNewBlock:n})}}),(0,o.Z)(i,T,{Icon:b.o0,label:function(){return"Create new template"},onClick:function(){return B({addNew:!0,addNewBlock:n})}}),i)).reduce((function(e,n){var t=(0,l.Z)(n,2),i=t[0],u=t[1];return N(N({},e),{},(0,o.Z)({},i,N({Icon:y.iK[i],index:r,label:function(){return O.V4[i]},onClick:function(e){null===e||void 0===e||e.preventDefault(),x((function(e){return e===r?null:r})),U(r)},uuid:(null===u||void 0===u?void 0:u.uuid)||i},u)))}),{})}),[n,Y,V,U,q,m,J,Q,K,x,B,M]),ee=(0,r.useCallback)((function(e){var n=e.Icon,t=e.beforeIcon,o=e.buildItems,i=e.customSubmenuHeights,r=e.index,l=e.items,p=e.label,v=e.onClick,m=e.tooltip,h=e.uuid;return(0,f.jsx)(I.W4,{compact:a,increasedZIndex:r===u,children:(0,f.jsx)(s.Z,{customSubmenuHeights:i,disableKeyboardShortcuts:!0,items:(null===o||void 0===o?void 0:o())||l,onClickCallback:c,open:r===u,parentRef:L[r],uuid:h,children:(0,f.jsx)(k.Z,{block:!0,label:m,size:null,widthFitContent:!0,children:(0,f.jsx)(d.ZP,{beforeIcon:t||n&&(0,f.jsx)(n,{secondary:r===u,size:I.ZG}),noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){null===v||void 0===v||v(e)},children:(null===p||void 0===p?void 0:p())||h})})})},h)}),[u,c,a]);return(0,f.jsx)(f.Fragment,{children:null===X||void 0===X?void 0:X.reduce((function(e,n,t){return e.concat([ee($({index:t})[n]),(0,f.jsx)(C.Z,{mr:3},"spacing-".concat(n,"-").concat(t))])}),[])})},U=t(50724),F=t(97618),G=t(55485),H=t(49130),z=t(48670),K=t(65956);!function(e){e.BLOCK_ACTION_OBJECTS="block_action_objects"}(M||(M={}));var Q=t(30160),W=t(17488),V=t(35686),Y=t(58401),q=t(39643),X=t(78419),J=t(70515),$=t(53808),ee=t(72619),ne=t(95924),te=t(23780),oe=t(44688);function ie(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 re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var le=function(e){var n,t=e.addNewBlock,o=e.blockIdx,i=e.blockTemplatesByBlockType,d=e.compact,s=e.focused,p=e.itemsDBT,v=e.pipelineType,m=e.project,h=e.searchTextInputRef,g=e.setAddNewBlockMenuOpenIdx,x=e.setFocused,j=e.showBrowseTemplates,k=e.showConfigureProjectModal,Z=e.showGlobalDataProducts,E=((0,r.useRef)(null),(0,r.useRef)(null),(0,r.useRef)(null)),T=(0,r.useRef)(null),P="undefined"!==typeof h?h:T,S=(0,Y.Z)().design,_=(0,r.useMemo)((function(){return"AddNewBlocksV2/".concat(o)}),[o]),w=(0,te.VI)(null,{},[],{uuid:"AddNewBlocksV2/".concat(o)}),R=(0,l.Z)(w,1)[0],D=(0,r.useState)(null),B=D[0],N=D[1],ie=(0,r.useCallback)((function(){return N(null)}),[]),le=(0,r.useState)(!1),ue=le[0],ce=le[1],ae=(0,r.useState)(null),de=ae[0],se=ae[1],fe=(0,r.useState)(null),pe=fe[0],ve=fe[1],me=(0,r.useState)(null),he=me[0],be=me[1],ge=(0,r.useCallback)((function(e){be(e),(0,$.t8)(X.Ch,e)}),[]);(0,r.useEffect)((function(){if(null===he){var e=(0,$.U2)(X.Ch,!1);ge(e)}}),[ge,he]);var xe=(0,r.useMemo)((function(){return"undefined"!==typeof s?s:ue}),[s,ue]),je=(0,r.useCallback)((function(e){return"undefined"!==typeof x?x(e):ce(e)}),[x,ce]),Ce=(0,oe.y)(),ke=Ce.registerOnKeyDown,Oe=Ce.unregisterOnKeyDown;(0,r.useEffect)((function(){return function(){return Oe(_)}}),[Oe,_]),null===ke||void 0===ke||ke(_,(function(e,n){var t;xe&&(n[q.vP]&&(je(!1),null===P||void 0===P||null===(t=P.current)||void 0===t||t.blur()))}),[xe,P]);var ye=(0,u.Db)(V.ZP.search_results.useCreate(),{onSuccess:function(e){return(0,ee.wD)(e,{callback:function(e){var n=e.search_result;ve(n)},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),Ze=(0,l.Z)(ye,1)[0],Ee=(0,r.useCallback)((function(e){clearTimeout(E.current);var n=e.target.value;se(n),n?E.current=setTimeout((function(){Ze({search_result:{pipeline_type:v,query:n,ratio:70,type:M.BLOCK_ACTION_OBJECTS}})}),500):ve(null)}),[Ze,v,E]),Te=(0,r.useMemo)((function(){return(null===pe||void 0===pe?void 0:pe.results)||[]}),[pe]),Pe=(0,r.useMemo)((function(){var e=null===pe||void 0===pe?void 0:pe.uuid,n=null===Te||void 0===Te?void 0:Te.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"};he?n.push(t):n.unshift(t)}return n}),[Te,pe,he]),Se=(0,r.useMemo)((function(){return(0,f.jsx)(I.NV,{compact:d,onClick:function(){var e;return null===P||void 0===P||null===(e=P.current)||void 0===e?void 0:e.focus()}})}),[d,P]),Ie=(0,r.useMemo)((function(){return!(null===m||void 0===m||!m.openai_api_key)}),[m]);return(0,f.jsx)(U.Z,{onClickOutside:ie,open:!0,children:(0,f.jsx)(I.Nk,{compact:d,focused:xe,children:(0,f.jsxs)(G.ZP,{alignItems:"center",children:[(0,f.jsx)(F.Z,{children:(0,f.jsx)(L,{addNewBlock:t,blockIdx:o,blockTemplatesByBlockType:i,buttonMenuOpenIndex:B,closeButtonMenu:ie,compact:d,design:S,itemsDBT:p,pipelineType:v,setAddNewBlockMenuOpenIdx:g,setButtonMenuOpenIndex:N,showBrowseTemplates:j,showGlobalDataProducts:Z})}),(0,f.jsx)(I.HL,{}),(0,f.jsx)(C.Z,{mr:3}),(0,f.jsx)(F.Z,{flex:1,children:(0,f.jsxs)(I.eS,{children:[Se,(0,f.jsxs)(G.ZP,{alignItems:"center",fullWidth:!0,children:[(0,f.jsx)(W.Z,{fullWidth:!0,noBackground:!0,noBorder:!0,noBorderRadiusBottom:!0,noBorderRadiusTop:!0,onBlur:function(){return setTimeout((function(){return je(!1)}),150)},onChange:Ee,onFocus:function(){return je(!0)},paddingHorizontal:0,paddingVertical:0,placeholder:"Search for a block...",ref:P,value:de||""}),(0,f.jsx)(H.Z,{addPlusSignBetweenKeys:!0,disabled:!0,keyTextGroups:[[q.RJ,q.ZS]]})]}),Se,(0,f.jsx)(I.rS,{topOffset:(null===P||void 0===P||null===(n=P.current)||void 0===n?void 0:n.getBoundingClientRect().height)+(d?1.5*J.iI:2.5*J.iI),children:(0,f.jsx)(c.Z,{itemGroups:[{items:xe?Pe:[],renderItem:function(e,n){var t=e.itemObject,o=t.block_type,i=t.description,r=t.language,l=t.object_type,u=t.title,c={fill:(0,A.qn)(o).accent,size:I.ZG},d=y.iK[o],s=a.L.GENERATE_BLOCK===l;s&&(d=b.xq,c.default=!1,c.fill=null,c.warning=!0);var p="".concat(u).concat(i?": "+i:"").slice(0,80);return(0,f.jsxs)(I.gI,re(re({},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,f.jsxs)(F.Z,{alignItems:"center",flex:1,children:[d&&(0,f.jsx)(d,re({default:!(null!==c&&void 0!==c&&c.fill)},c)),(0,f.jsx)(C.Z,{mr:2}),(0,f.jsx)(Q.ZP,{default:!0,overflowWrap:!0,textOverflow:!0,children:p})]}),(0,f.jsx)(C.Z,{mr:1}),(0,f.jsx)(Q.ZP,{monospace:!0,muted:!0,uppercase:!0,children:s?"AI":O.dO[r]}),(0,f.jsx)(C.Z,{mr:1}),a.L.BLOCK_FILE===l&&(0,f.jsx)(b.$B,{muted:!0,size:I.ZG}),a.L.CUSTOM_BLOCK_TEMPLATE===l&&(0,f.jsx)(b.zQ,{muted:!0,size:I.ZG}),a.L.MAGE_TEMPLATE===l&&(0,f.jsx)(b.m1,{muted:!0,size:I.ZG}),s&&Ie&&(0,f.jsx)(b.xq,{muted:!0,size:I.ZG}),s&&!Ie&&(0,f.jsx)(b.uy,{muted:!0,size:I.ZG})]}))}}],onSelectItem:function(e){var n=e.itemObject,o=n.object_type;a.L.GENERATE_BLOCK!==o||Ie?(t({block_action_object:n,require_unique_name:!1}),se(null),ve(null)):null===k||void 0===k||k({cancelButtonText:"Set this up later",header:(0,f.jsx)(C.Z,{mb:J.HN,children:(0,f.jsxs)(K.Z,{children:[(0,f.jsx)(Q.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate blocks using AI."}),(0,f.jsx)(C.Z,{mt:1,children:(0,f.jsxs)(Q.ZP,{warning:!0,children:["Read ",(0,f.jsx)(z.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(){ge(!0)},onSaveSuccess:function(e){null!==e&&void 0!==e&&e.openai_api_key&&(t({block_action_object:n}),se(null),ve(null))}})},uuid:_})})]})})]})})})};var ue=function(e){var n=e.size;return(0,f.jsx)("svg",{fill:"none",height:n,preserveAspectRatio:"xMidYMid",viewBox:"0 0 256 256",width:n,xmlns:"http://www.w3.org/2000/svg",children:(0,f.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(93369),ae=t(57653),de=t(82359),se=t(77417),fe=t(8454),pe=t(75634),ve=t(5677);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 be=function(e){var n=e.addNewBlock,t=e.blockIdx,o=e.blockTemplates,l=e.compact,u=e.focusedAddNewBlockSearch,c=e.hideCustom,a=e.hideDataExporter,d=(e.hideDataLoader,e.hideDbt),p=e.hideMarkdown,v=e.hideScratchpad,m=e.hideSensor,h=e.hideTransformer,g=e.hideTransformerDataSources,x=e.onClickAddSingleDBTModel,j=e.pipeline,C=e.project,y=e.searchTextInputRef,Z=e.setAddNewBlockMenuOpenIdx,E=e.setCreatingNewDBTModel,T=e.setFocusedAddNewBlockSearch,P=e.showBlockBrowserModal,S=e.showBrowseTemplates,I=e.showConfigureProjectModal,_=e.showGlobalDataProducts,w=(0,se.Z)(),A=w.featureEnabled,D=w.featureUUIDs,B=(0,r.useState)(null),N=B[0],M=B[1],L=(0,r.useRef)(null),F=(0,r.useRef)(null),H=(0,r.useRef)(null),z=(0,r.useRef)(null),K=(0,r.useRef)(null),Q=(0,r.useRef)(null),W=(0,r.useRef)(null),V={compact:l,inline:!0},Y=null===j||void 0===j?void 0:j.type,q=Y===ae.qL.STREAMING,X=l?pe.ZG/2:pe.ZG,$=25*J.iI,ee=(0,r.useMemo)((function(){return(0,R.q_)(ve.c1,fe.qs.COLUMN,n)}),[n]),ne=(0,r.useMemo)((function(){return(0,R.q_)(ve.Wt,fe.qs.ROW,n)}),[n]),te=(0,r.useMemo)((function(){var e=[{label:function(){return"Generic (no template)"},onClick:function(){n({language:O.t6.PYTHON,type:O.tf.TRANSFORMER})},uuid:"generic_transformer_action"},{bold:!0,items:ne,label:function(){return"Row actions"},uuid:"row_actions_grouping"},{isGroupingTitle:!0,label:function(){return"Column actions"},uuid:"column_actions_grouping"}].concat((0,i.Z)(ee));return g||e.splice(1,0,{bold:!0,items:(0,R.hr)(n,O.tf.TRANSFORMER,Y),label:function(){return"Data sources"},uuid:"data_sources_grouping"}),e}),[n,ee,g,Y,ne]),oe=(0,r.useCallback)((function(){return M(null)}),[]),ie=(0,r.useCallback)((function(e){return null===Z||void 0===Z?void 0:Z((function(n){return null===n||N!==e?t:null}))}),[t,N,Z]),re=ae.qL.PYSPARK===Y,me=(0,r.useMemo)((function(){return(0,R.oM)(o,n,{"data_integrations/destinations/base":!0,"data_integrations/sources/base":!0})}),[n,o]),be=(0,r.useMemo)((function(){return(0,R.hr)(n,O.tf.DATA_LOADER,Y,{blockTemplatesByBlockType:me,showBrowseTemplates:S})}),[n,me,Y,S]),ge=(0,r.useMemo)((function(){return(0,R.hr)(n,O.tf.DATA_EXPORTER,Y,{blockTemplatesByBlockType:me,showBrowseTemplates:S})}),[n,me,Y,S]),xe=(0,r.useMemo)((function(){return re||ae.qL.INTEGRATION===Y?te:q?[{items:(0,R.hr)(n,O.tf.TRANSFORMER,Y),label:function(){return"Python"},uuid:"transformers/python"}].concat((0,i.Z)((0,R.hr)(n,O.tf.TRANSFORMER,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S}))):[{items:te,label:function(){return"Python"},uuid:"transformers/python_all"}].concat((0,i.Z)((0,R.qs)(n,O.tf.TRANSFORMER)),(0,i.Z)((0,R.hr)(n,O.tf.TRANSFORMER,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S})))}),[n,te,me,re,q,Y,S]),je=(0,r.useMemo)((function(){return[{label:function(){return"Single model or snapshot (from file)"},onClick:function(){null!==A&&void 0!==A&&A(D.DBT_V2)?P({blockIndex:t}):null===x||void 0===x||x(t)},uuid:"dbt/single_model"},{label:function(){return"All models (w/ optional exclusion)"},onClick:function(){return n({configuration:{dbt:{command:"run"}},language:O.t6.YAML,type:O.tf.DBT})},uuid:"dbt/all_models"},{label:function(){return"Generic dbt command"},onClick:function(){return n({configuration:{dbt:{command:"run"}},language:O.t6.YAML,type:O.tf.DBT})},uuid:"dbt/generic_command"},{isGroupingTitle:!0,label:function(){return"Create new models"},uuid:"dbt/new_model/group"},{disabled:!0,label:function(){return"Use the file browser to create new SQL files"},uuid:"dbt/new_model"}]}),[n,t,A,D,x,E,P]);return(0,r.useMemo)((function(){var e;return ae.qL.PYTHON===Y&&!re&&(null===C||void 0===C||null===(e=C.features)||void 0===e?void 0:e[de.d.ADD_NEW_BLOCK_V2])}),[re,Y,C])?(0,f.jsx)(le,{addNewBlock:n,blockIdx:t,blockTemplatesByBlockType:me,compact:l,focused:u,itemsDBT:je,pipelineType:Y,project:C,searchTextInputRef:y,setAddNewBlockMenuOpenIdx:Z,setFocused:T,showBrowseTemplates:S,showConfigureProjectModal:I,showGlobalDataProducts:_}):(0,f.jsx)(G.ZP,{flexWrap:"wrap",inline:!0,children:(0,f.jsx)(U.Z,{onClickOutside:oe,open:!0,children:(0,f.jsxs)(G.ZP,{flexWrap:"wrap",children:[!a&&(0,f.jsx)(pe.W4,{increasedZIndex:0===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:be,onClickCallback:oe,open:0===N,parentRef:L,uuid:"data_loader_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{blue:!0,compact:l,children:(0,f.jsx)(b.mm,{size:X})}),onClick:function(e){e.preventDefault(),M((function(e){return 0===e?null:0})),ie(0)},uuid:"AddNewBlocks/Data_loader",children:"Data loader"}))})}),!h&&(0,f.jsx)(pe.W4,{increasedZIndex:1===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:xe,onClickCallback:oe,open:1===N,parentRef:F,uuid:"transformer_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,purple:!0,children:(0,f.jsx)(b.mm,{size:X})}),onClick:function(e){e.preventDefault(),M((function(e){return 1===e?null:1})),ie(1)},uuid:"AddNewBlocks/Transformer",children:"Transformer"}))})}),!a&&(0,f.jsx)(pe.W4,{increasedZIndex:2===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:ge,onClickCallback:oe,open:2===N,parentRef:H,uuid:"data_exporter_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,yellow:!0,children:(0,f.jsx)(b.mm,{inverted:!0,size:X})}),onClick:function(e){e.preventDefault(),M((function(e){return 2===e?null:2})),ie(2)},uuid:"AddNewBlocks/Data_exporter",children:"Data exporter"}))})}),!d&&(0,f.jsx)(pe.W4,{increasedZIndex:3===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,i.Z)(je),(0,i.Z)((0,R.hr)(n,O.tf.DBT,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S}))),onClickCallback:oe,open:3===N,parentRef:z,uuid:"dbt_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(ue,{size:pe.ZG*(l?.75:1.25)}),onClick:function(e){e.preventDefault(),M((function(e){return 3===e?null:3})),ie(3)},uuid:"AddNewBlocks/DBT",children:"DBT model"}))})}),!c&&(0,f.jsx)(pe.W4,{increasedZIndex:4===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:[{items:(0,R.Bd)(n,O.tf.CUSTOM,O.t6.PYTHON),label:function(){return"Python"},uuid:"custom_block_python"},{items:(0,R.Bd)(n,O.tf.CUSTOM,O.t6.SQL),label:function(){return"SQL"},uuid:"custom_block_sql"}].concat((0,i.Z)((0,R.hr)(n,O.tf.CUSTOM,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S}))),onClickCallback:oe,open:4===N,parentRef:K,uuid:"custom_block_button",children:(0,f.jsx)(k.Z,{block:!0,label:"Add a custom code block with a designated color.",maxWidth:$,size:null,children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,grey:!0,children:(0,f.jsx)(b.mm,{inverted:!0,size:X})}),onClick:function(e){e.preventDefault(),M((function(e){return 4===e?null:4})),ie(4)},uuid:"AddNewBlocks/Scratchpad",children:"Custom"}))})})}),!v&&(0,f.jsx)(pe.W4,{children:(0,f.jsx)(k.Z,{block:!0,label:"Write experimental code that doesn\u2019t get executed when you run your pipeline.",maxWidth:$,size:null,children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{border:!0,compact:l,children:(0,f.jsx)(b.mm,{size:X})}),onClick:function(e){e.preventDefault(),n({type:O.tf.SCRATCHPAD})},uuid:"AddNewBlocks/Scratchpad",children:"Scratchpad"}))})}),!v&&(0,f.jsx)(pe.W4,{children:(0,f.jsx)(k.Z,{block:!0,label:"Add a global data product block",maxWidth:$,size:null,children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,children:(0,f.jsx)(b.ie,{size:X})}),onClick:function(e){e.preventDefault(),_({addNewBlock:n})},uuid:"AddNewBlocks/GlobalDataProducts",children:"Global data product"}))})}),!q&&!m&&(0,f.jsx)(pe.W4,{increasedZIndex:6===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:[].concat((0,i.Z)((0,R.hr)(n,O.tf.SENSOR,Y)),(0,i.Z)((0,R.hr)(n,O.tf.SENSOR,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S}))),onClickCallback:oe,open:6===N,parentRef:Q,uuid:"sensor_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,children:(0,f.jsx)(b.LM,{pink:!0,size:pe.ZG*(l?.75:1.25)})}),onClick:function(e){e.preventDefault(),M((function(e){return 6===e?null:6})),ie(6)},uuid:"AddNewBlocks/Sensor",children:"Sensor"}))})}),!p&&(0,f.jsx)(pe.W4,{increasedZIndex:7===N,children:(0,f.jsx)(s.Z,{disableKeyboardShortcuts:!0,items:[{label:function(){return"Generic (no template)"},onClick:function(){n({language:O.t6.MARKDOWN,type:O.tf.MARKDOWN})},uuid:"generic_markdown"}].concat((0,i.Z)((0,R.hr)(n,O.tf.MARKDOWN,Y,{blockTemplatesByBlockType:me,onlyCustomTemplate:!0,showBrowseTemplates:S}))),onClickCallback:oe,open:7===N,parentRef:W,uuid:"markdown_button",children:(0,f.jsx)(ce.ZP,he(he({},V),{},{beforeElement:(0,f.jsx)(pe.Wx,{compact:l,sky:!0,children:(0,f.jsx)(b.mm,{inverted:!0,size:X})}),onClick:function(e){e.preventDefault(),M((function(e){return 7===e?null:7})),ie(7)},uuid:"AddNewBlocks/Markdown",children:"Markdown"}))})})]})})})}},38399:function(e,n,t){t.d(n,{Bd:function(){return Z},SF:function(){return E},X7:function(){return T},hr:function(){return k},oM:function(){return C},q_:function(){return y},qs:function(){return j}});var o=t(21831),i=t(82394),r=t(55485),l=t(30160),u=t(5677),c=t(72473),a=t(44425),d=t(84438),s=t(57653),f=t(81728),p=t(55283),v=t(86735),m=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}var b=function(e,n,t){var o=t===s.qL.STREAMING&&(e===a.tf.DATA_LOADER||e===a.tf.DATA_EXPORTER);return(function(e){var n;return e===s.qL.STREAMING?(n={},(0,i.Z)(n,a.tf.DATA_LOADER,[d.ZP.ACTIVEMQ,d.ZP.AMAZON_SQS,d.ZP.AZURE_EVENT_HUB,d.ZP.GOOGLE_CLOUD_PUBSUB,d.ZP.INFLUXDB,d.ZP.KAFKA,d.ZP.NATS,d.ZP.KINESIS,d.ZP.RABBITMQ,d.ZP.MONGODB]),(0,i.Z)(n,a.tf.DATA_EXPORTER,[d.ZP.ACTIVEMQ,d.ZP.AZURE_DATA_LAKE,d.ZP.BIGQUERY,d.ZP.CLICKHOUSE,d.ZP.DUCKDB,d.ZP.DUMMY,d.ZP.ELASTICSEARCH,d.ZP.GOOGLE_CLOUD_PUBSUB,d.ZP.INFLUXDB,d.ZP.S3,d.ZP.KAFKA,d.ZP.KINESIS,d.ZP.MONGODB,d.ZP.MSSQL,d.ZP.MYSQL,d.ZP.OPENSEARCH,d.ZP.POSTGRES,d.ZP.RABBITMQ,d.ZP.REDSHIFT,d.ZP.SNOWFLAKE,d.ZP.TRINO]),(0,i.Z)(n,a.tf.TRANSFORMER,[d.ZP.GENERIC]),n):d.cp}(t)[e]||[]).map((function(t){return{indent:e===a.tf.TRANSFORMER,label:function(){return d.MV[t]},onClick:function(){n({config:{data_source:t===d.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,t){var o={};return null===e||void 0===e||e.forEach((function(e){var r=e.block_type,l=e.configuration,u=e.defaults,c=e.description,a=e.groups,d=e.language,s=e.name,f=e.path,p=e.template_type,v=e.template_variables;o[r]||(o[r]={}),o[r][d]||(o[r][d]={items:[],label:function(){return d},uuid:"".concat(r,"/").concat(d)});var m={label:function(){return s},onClick:function(){return n({config:{template_path:f,template_type:p,template_variables:v},configuration:l,defaults:u,language:d,type:r})},uuid:"".concat(f,"/").concat(s)};if(null!==t&&void 0!==t&&t[f]||(m.tooltip=function(){return c}),(null===a||void 0===a?void 0:a.length)>=1){var b=function(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,i.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}({},o[r][d]),g=[null],x=[b];a.forEach((function(e,n){var t="".concat(r,"/").concat(d,"/").concat(a.slice(0,n+1).join("/")),o=x[n],i=o.items.findIndex((function(e){var n=e.uuid;return t===n})),l=i>=0?o.items[i]:null;l||(l={items:[],label:function(){return e},uuid:t}),g.push(i),x.push(l)})),g.push(-1),x.push(m);var j=x.length;o[r][d]=x.reduce((function(e,n,t){var o=j-t,i=x[o-2],r=x[o-1],l=g[o-1];return i?(l>=0?i.items[l]=r:i.items.push(r),i):r}),{})}else o[r][d].items.push(m)})),o}var k=function(e,n,t,o){var i=o||{},r=i.blockTemplatesByBlockType,l=i.dataIntegrationType,u=i.languages,c=i.onlyCustomTemplate,d=i.showBrowseTemplates,f={};null!==o&&void 0!==o&&o.v2||(f=Object.fromEntries(a.Ut.map((function(n){return[n,b(n,e,t)]}))));var p={label:function(){return"Custom template"},onClick:function(){return d({addNewBlock:e,blockType:n,language:a.t6.SQL})},uuid:"".concat(n,"/custom_template")};if(c)return[p];if(t===s.qL.PYSPARK||t===s.qL.STREAMING)return f[n];if(l&&null!==o&&void 0!==o&&o.v2){var m,h,j=(null===r||void 0===r||null===(m=r[n])||void 0===m||null===(h=m[l])||void 0===h?void 0:h.items)||[];return[{items:(0,v.YC)(j,(function(e){return(0,e.label)()})),uuid:"".concat(n,"/").concat(l)}]}var C,k,O=(null===r||void 0===r||null===(C=r[n])||void 0===C||null===(k=C[a.t6.PYTHON])||void 0===k?void 0:k.items)||[],y=[{items:(0,v.YC)((f[n]||[]).concat(O),(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))&&y.push(g(e,n)),(!u||null!==u&&void 0!==u&&u.includes(a.t6.R))&&y.push(x(e,n)),![a.tf.MARKDOWN,a.tf.SCRATCHPAD].includes(n)&&d&&y.push(p),y};function O(e,n,t){return e.map((function(e){return{indent:!0,label:function(){return u.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 y(e,n,t){var i=[];return e.forEach((function(e){if(e!==u._G.MISC)i.push({indent:!0,items:O(u.d9[n][e],n,t),label:function(){return e},uuid:"".concat(n,"_grouping_").concat((0,f.RA)(e))});else{var r=O(u.d9[n][e],n,t);i.push.apply(i,(0,o.Z)(r))}})),i}var Z=function(e,n,t){return Object.values(a.Lq).map((function(o){return{label:function(){return(0,m.jsxs)(r.ZP,{alignItems:"center",children:[(0,m.jsx)(c.mm,{fill:(0,p.qn)(a.tf.CUSTOM,{blockColor:o}).accent,size:16}),"\xa0",(0,m.jsx)(l.ZP,{children:(0,f.kC)(o)})]})},leftAligned:!0,onClick:function(){e({color:o,language:t,type:n})},uuid:"".concat(t,"_").concat(o)}}))},E=function(e){return"-- Docs: https://docs.mage.ai/guides/sql-blocks\n"+(e||"")};function T(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}},38118:function(e,n,t){t.d(n,{HL:function(){return s},NV:function(){return p},Nk:function(){return d},W4:function(){return f},ZG:function(){return a},eS:function(){return v},gI:function(){return h},rS:function(){return m}});var o=t(38626),i=t(44897),r=t(42631),l=t(70515),u=t(47041),c=t(91437),a=l.cd*l.iI,d=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1mqygp5-0"})([""," border-radius:","px;"," "," "," "," ",""],(0,c.eR)(),r.n_,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).dashboard,";\n box-shadow: ").concat((e.theme.shadow||i.Z.shadow).frame,";\n ")}),(function(e){return!e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.focused&&"\n border: 1px solid ".concat((e.theme.interactive||i.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 ")})),s=o.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-1mqygp5-1"})(["height:","px;width:1px;",""],a,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBorder,";\n ")})),f=o.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 ")})),p=o.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 ")})),v=o.default.div.withConfig({displayName:"indexstyle__SearchStyle",componentId:"sc-1mqygp5-4"})(["position:relative;width:100%;"]),m=o.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-1mqygp5-5"})([""," border-radius:","px;overflow:auto;position:absolute;z-index:5;"," ",""],u.w5,r.BG,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||i.Z.shadow).window,";\n max-height: ").concat((null===e||void 0===e?void 0:e.maxHeight)||40*l.iI,"px;\n width: ").concat(e.width||"100%",";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")})),h=o.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||i.Z.interactive).hoverBackground,";\n ")}))},15752:function(e,n,t){t.d(n,{F:function(){return r},h:function(){return i}});var o=t(92709);function i(){var e=new CustomEvent(o.Qj);window.dispatchEvent(e)}function r(e){var n=new CustomEvent(o.Em,{detail:{block:e}});window.dispatchEvent(n)}},26419:function(e,n,t){t.d(n,{a:function(){return o}});var o={compact:!0,highlightOnHoverAlt:!0,noBorder:!0,padding:"4px 12px"}},92709:function(e,n,t){t.d(n,{$e:function(){return a},Em:function(){return f},IY:function(){return l},Jf:function(){return r},LR:function(){return i},NR:function(){return u},Qj:function(){return s},Wf:function(){return p},b7:function(){return o},m$:function(){return d},tK:function(){return c}});var o="edit",i="[ERR_BLOCK_EXISTS]",r={uuid:"All files"},l={uuid:"Current blocks"},u=[r,l],c="CUSTOM_EVENT_BLOCK_OUTPUT_CHANGED",a="CUSTOM_EVENT_CODE_BLOCK_CHANGED",d="CUSTOM_EVENT_COLUMN_SCROLLER_CURSOR_MOVED",s="CUSTOM_EVENT_COLUMN_SCROLLER_RESET",f="CUSTOM_EVENT_COLUMN_SCROLLER_SCROLL_TO_BLOCK",p="CUSTOM_EVENT_SYNC_COLUMN_POSITIONS"},74052:function(e,n,t){t.d(n,{Dp:function(){return O},J8:function(){return I},OF:function(){return y},Q9:function(){return E},Rt:function(){return j},Rz:function(){return P},h8:function(){return Z},k1:function(){return C},uS:function(){return T},zv:function(){return S}});var o=t(21831),i=t(82394),r=t(17717),l=t(92083),u=t.n(l),c=t(44425),a=t(89706),d=t(48339),s=t(70693),f=t(53808),p=t(81728),v=t(3917),m=t(61709),h=t(86735),b=t(70320);function g(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 x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function j(e){var n={},t={};return null===e||void 0===e||e.forEach((function(e){var o=e.content,i=e.outputs,r=e.type,l=e.uuid;(null===i||void 0===i?void 0:i.length)>=1&&(n[l]=i.map((function(e){if("object"===typeof e){var n=e||{},t=n.sample_data,o=n.shape,i=n.text_data,r=n.type;return t?{data:x({shape:o},t),type:r}:i&&(0,p.Pb)(i)?JSON.parse(i):i}return{data:String(e),type:d.Gi.TEXT}}))),t[r]||(t[r]={}),t[r][l]=o})),{content:t,messages:n}}function C(e,n,t){e.forEach((function(e){(0,f.t8)("".concat(t,"/").concat(e.uuid,"/codeCollapsed"),(0,f.Od)("".concat(n,"/").concat(e.uuid,"/codeCollapsed"))),(0,f.t8)("".concat(t,"/").concat(e.uuid,"/outputCollapsed"),(0,f.Od)("".concat(n,"/").concat(e.uuid,"/outputCollapsed")))}))}function k(e){return"".concat(e,"/").concat(f.kP)}function O(e){return(0,f.U2)(k(e),[])}function y(e,n){var t=O(e);t.includes(n)||(0,f.t8)(k(e),[].concat((0,o.Z)(t),[n]))}function Z(e,n){var t=O(e).filter((function(e){return e!==n}));(0,f.t8)(k(e),t)}function E(e,n){var t=(0,h.HK)(n,(function(e){return e.uuid}));return e.map((function(e){return t[e]})).filter((function(e){return!!e}))}var T=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()};function P(e,n){var t,o=(0,b.qB)(),i=null===n||void 0===n?void 0:n.isPipelineUpdating,r=null===n||void 0===n?void 0:n.pipelineContentTouched,l=null===n||void 0===n?void 0:n.pipelineLastSaved;if(r)t="Unsaved changes";else if(i)t="Saving changes...";else if(l){var c=u()().utc().unix();if(null!==n&&void 0!==n&&n.displayRelative&&c-l<3600){var a=u().unix(c-(c-l)).utc().fromNow();t="Saved ".concat(a)}else{var d=(0,v.JX)(l/1e3);null!==e&&void 0!==e&&e.updated_at&&(d=(0,v.XG)(null===e||void 0===e?void 0:e.updated_at,o)),t="Last saved ".concat(d)}}else t="All changes saved";return t}function S(e){var n=e.type,t=e.uuid;return"".concat(n,"s/").concat(t,".py")}function I(e){var n,t,o=e.blockIndex,i=e.blocks,l=e.filePath,u=e.isNewBlock,d=e.name,f=e.repoPathRelativeRoot,v="".concat(f).concat(r.sep).concat(a.aZ.DBT).concat(r.sep),h=l;null!==(n=h)&&void 0!==n&&n.startsWith(v)&&(h=null===(t=h)||void 0===t?void 0:t.replace(v,""));if(u){var b=(0,p.RA)(d||(0,p.Y6)()),g=".".concat(a.Lu.SQL);b.endsWith(g)&&(b=b.slice(0,-4)),h="".concat(l).concat(r.sep).concat(b,".").concat(a.Lu.SQL)}var j={configuration:{file_path:h,file_source:{path:l},limit:s.z},language:c.t6.SQL,name:(0,p.wE)(h),type:c.tf.DBT};u&&(j.content="--Docs: https://docs.mage.ai/dbt/sources\n");var C=i["undefined"===typeof o||null===o?i.length-1:o],k=C?(0,m.eY)(C,j):[];return x(x({},j),{},{upstream_blocks:k})}},26084:function(e,n,t){var o;t.d(n,{Q:function(){return o}}),function(e){e.CALLBACK="callbacks",e.CONDITIONAL="conditionals"}(o||(o={}))},2548: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={}))},13803:function(e,n,t){var o,i;t.d(n,{I:function(){return i},O:function(){return o}}),function(e){e.DESTINATIONS="destinations",e.SOURCES="sources"}(o||(o={})),function(e){e.DATA_INTEGRATION="data_integration"}(i||(i={}))},83905:function(e,n,t){var o;t.d(n,{N:function(){return o}}),function(e){e.DBT="dbt"}(o||(o={}))},84438:function(e,n,t){t.d(n,{MV:function(){return c},cp:function(){return a},zJ:function(){return r}});var o,i,r,l=t(82394),u=t(44425);!function(e){e.ACTIVEMQ="activemq",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.CLICKHOUSE="clickhouse",e.DRUID="druid",e.DUCKDB="duckdb",e.DUMMY="dummy",e.ELASTICSEARCH="elasticsearch",e.FILE="file",e.GENERIC="generic",e.GOOGLE_CLOUD_PUBSUB="google_cloud_pubsub",e.GOOGLE_CLOUD_STORAGE="google_cloud_storage",e.GOOGLE_SHEETS="google_sheets",e.INFLUXDB="influxdb",e.KAFKA="kafka",e.KINESIS="kinesis",e.MONGODB="mongodb",e.MSSQL="mssql",e.MYSQL="mysql",e.NATS="nats",e.OPENSEARCH="opensearch",e.ORACLEDB="oracledb",e.PINOT="pinot",e.POSTGRES="postgres",e.RABBITMQ="rabbitmq",e.REDSHIFT="redshift",e.S3="s3",e.SNOWFLAKE="snowflake",e.TRINO="trino"}(r||(r={}));var c=(o={},(0,l.Z)(o,r.ACTIVEMQ,"ActiveMQ"),(0,l.Z)(o,r.AMAZON_SQS,"Amazon SQS"),(0,l.Z)(o,r.API,"API"),(0,l.Z)(o,r.AZURE_BLOB_STORAGE,"Azure Blob Storage"),(0,l.Z)(o,r.AZURE_DATA_LAKE,"Azure Data Lake"),(0,l.Z)(o,r.AZURE_EVENT_HUB,"Azure Event Hub"),(0,l.Z)(o,r.BIGQUERY,"Google BigQuery"),(0,l.Z)(o,r.CLICKHOUSE,"ClickHouse"),(0,l.Z)(o,r.DRUID,"Druid"),(0,l.Z)(o,r.DUCKDB,"DuckDB"),(0,l.Z)(o,r.DUMMY,"Dummy"),(0,l.Z)(o,r.ELASTICSEARCH,"ElasticSearch"),(0,l.Z)(o,r.FILE,"Local file"),(0,l.Z)(o,r.GENERIC,"Generic (no template)"),(0,l.Z)(o,r.GOOGLE_CLOUD_PUBSUB,"Google Cloud PubSub"),(0,l.Z)(o,r.GOOGLE_CLOUD_STORAGE,"Google Cloud Storage"),(0,l.Z)(o,r.GOOGLE_SHEETS,"Google Sheets"),(0,l.Z)(o,r.INFLUXDB,"InfluxDB"),(0,l.Z)(o,r.KAFKA,"Kafka"),(0,l.Z)(o,r.KINESIS,"Kinesis"),(0,l.Z)(o,r.MONGODB,"MongoDB"),(0,l.Z)(o,r.MSSQL,"Microsoft SQL Server"),(0,l.Z)(o,r.MYSQL,"MySQL"),(0,l.Z)(o,r.NATS,"NATS"),(0,l.Z)(o,r.OPENSEARCH,"OpenSearch"),(0,l.Z)(o,r.ORACLEDB,"OracleDB"),(0,l.Z)(o,r.PINOT,"Pinot"),(0,l.Z)(o,r.POSTGRES,"PostgreSQL"),(0,l.Z)(o,r.RABBITMQ,"RabbitMQ"),(0,l.Z)(o,r.REDSHIFT,"Amazon Redshift"),(0,l.Z)(o,r.S3,"Amazon S3"),(0,l.Z)(o,r.SNOWFLAKE,"Snowflake"),(0,l.Z)(o,r.TRINO,"Trino"),o),a=(i={},(0,l.Z)(i,u.tf.DATA_LOADER,[r.GENERIC,r.FILE,r.API,r.AZURE_BLOB_STORAGE,r.BIGQUERY,r.DRUID,r.GOOGLE_CLOUD_STORAGE,r.GOOGLE_SHEETS,r.MYSQL,r.ORACLEDB,r.PINOT,r.POSTGRES,r.REDSHIFT,r.S3,r.SNOWFLAKE,r.MONGODB]),(0,l.Z)(i,u.tf.DATA_EXPORTER,[r.GENERIC,r.FILE,r.S3,r.AZURE_BLOB_STORAGE,r.GOOGLE_CLOUD_STORAGE,r.GOOGLE_SHEETS,r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.MYSQL,r.POSTGRES]),(0,l.Z)(i,u.tf.TRANSFORMER,[r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.POSTGRES]),(0,l.Z)(i,u.tf.SENSOR,[r.GENERIC,r.S3,r.GOOGLE_CLOUD_STORAGE,r.REDSHIFT,r.BIGQUERY,r.SNOWFLAKE,r.MYSQL,r.POSTGRES]),i);n.ZP=r},89706:function(e,n,t){t.d(n,{BB:function(){return f},JD:function(){return C},Lu:function(){return u},PF:function(){return g},aZ:function(){return l},d2:function(){return b},dT:function(){return c},n6:function(){return p},nB:function(){return j},oy:function(){return x},tE:function(){return v},xF:function(){return h}});var o,i,r,l,u,c,a,d=t(82394),s=t(44425);!function(e){e.DBT="dbt"}(l||(l={})),function(e){e.CSV="csv",e.JSON="json",e.MD="md",e.PY="py",e.R="r",e.SH="sh",e.SQL="sql",e.TXT="txt",e.YAML="yaml",e.YML="yml"}(u||(u={})),function(e){e.INIT_PY="__init__.py",e.METADATA_YAML="metadata.yaml",e.REQS_TXT="requirements.txt"}(c||(c={})),function(e){e.EXCLUDE_DIR_PATTERN="exclude_dir_pattern",e.EXCLUDE_PATTERN="exclude_pattern",e.PATTERN="pattern"}(a||(a={}));var f=(o={},(0,d.Z)(o,a.EXCLUDE_PATTERN,"a^"),(0,d.Z)(o,a.EXCLUDE_DIR_PATTERN,"a^"),o),p=[u.PY,u.SQL],v=[u.MD,u.PY,u.R,u.SQL,u.YAML],m=[u.JSON,u.MD,u.PY,u.R,u.SH,u.SQL,u.TXT,u.YAML,u.YML],h=new RegExp(m.map((function(e){return".".concat(e,"$")})).join("|")),b=new RegExp([u.CSV,u.JSON,u.MD,u.PY,u.R,u.SH,u.SQL,u.TXT,u.YAML,u.YML].map((function(e){return".".concat(e,"$")})).join("|")),g="charts",x="pipelines",j=(i={},(0,d.Z)(i,u.MD,s.t6.MARKDOWN),(0,d.Z)(i,u.JSON,u.JSON),(0,d.Z)(i,u.PY,s.t6.PYTHON),(0,d.Z)(i,u.R,s.t6.R),(0,d.Z)(i,u.SQL,s.t6.SQL),(0,d.Z)(i,u.TXT,"text"),(0,d.Z)(i,u.YAML,s.t6.YAML),(0,d.Z)(i,u.YML,s.t6.YAML),i),C=(r={},(0,d.Z)(r,s.t6.MARKDOWN,u.MD),(0,d.Z)(r,s.t6.PYTHON,u.PY),(0,d.Z)(r,s.t6.R,u.R),(0,d.Z)(r,s.t6.SQL,u.SQL),(0,d.Z)(r,s.t6.YAML,u.YAML),(0,d.Z)(r,"text",u.TXT),r)},7267: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_CODE="generate_code",e.GENERATE_COMMENT_FOR_CODE="generate_comment_for_code",e.GENERATE_DOC_FOR_BLOCK="generate_doc_for_block",e.GENERATE_DOC_FOR_PIPELINE="generate_doc_for_pipeline",e.GENERATE_PIPELINE_WITH_DESCRIPTION="generate_pipeline_with_description"}(o||(o={}))},5677:function(e,n,t){t.d(n,{NX:function(){return m},Wt:function(){return v},_G:function(){return c},c1:function(){return p},d9:function(){return f}});var o,i,r,l,u,c,a=t(82394),d=t(8454),s=(d.Q0.AVERAGE,d.Q0.CLEAN_COLUMN_NAME,d.Q0.COUNT,d.Q0.COUNT_DISTINCT,d.Q0.CUSTOM,d.Q0.DIFF,d.Q0.FIRST,d.Q0.FIX_SYNTAX_ERRORS,d.Q0.IMPUTE,d.Q0.LAST,d.Q0.MAX,d.Q0.MEDIAN,d.Q0.MIN,d.Q0.NORMALIZE,d.Q0.REFORMAT,d.Q0.REMOVE,d.Q0.REMOVE_OUTLIERS,d.Q0.SELECT,d.Q0.SHIFT_DOWN,d.Q0.SHIFT_UP,d.Q0.STANDARDIZE,d.Q0.SUM,[d.Q0.DROP_DUPLICATE,d.Q0.FILTER,d.Q0.SORT,d.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=(i={},(0,a.Z)(i,d.qs.COLUMN,(o={},(0,a.Z)(o,c.AGGREGATE,[d.Q0.AVERAGE,d.Q0.COUNT,d.Q0.COUNT_DISTINCT,d.Q0.FIRST,d.Q0.LAST,d.Q0.MAX,d.Q0.MEDIAN,d.Q0.MIN,d.Q0.SUM]),(0,a.Z)(o,c.FORMATTING,[d.Q0.CLEAN_COLUMN_NAME,d.Q0.FIX_SYNTAX_ERRORS,d.Q0.REFORMAT]),(0,a.Z)(o,c.COLUMN_REMOVAL,[d.Q0.REMOVE,d.Q0.SELECT]),(0,a.Z)(o,c.SHIFT_ROWS,[d.Q0.SHIFT_DOWN,d.Q0.SHIFT_UP]),(0,a.Z)(o,c.MISC,[d.Q0.DIFF,d.Q0.IMPUTE,d.Q0.REMOVE_OUTLIERS]),(0,a.Z)(o,c.FEATURE_SCALING,[d.Q0.NORMALIZE,d.Q0.STANDARDIZE]),o)),(0,a.Z)(i,d.qs.ROW,(0,a.Z)({},c.MISC,[].concat(s))),i),p=Object.keys(f[d.qs.COLUMN]),v=[c.MISC],m=(u={},(0,a.Z)(u,d.qs.COLUMN,(r={},(0,a.Z)(r,d.Q0.ADD,"Add column"),(0,a.Z)(r,d.Q0.AVERAGE,"Aggregate by average value"),(0,a.Z)(r,d.Q0.CLEAN_COLUMN_NAME,"Clean column name"),(0,a.Z)(r,d.Q0.COUNT_DISTINCT,"Aggregate by distinct count"),(0,a.Z)(r,d.Q0.COUNT,"Aggregate by total count"),(0,a.Z)(r,d.Q0.DIFF,"Difference"),(0,a.Z)(r,d.Q0.FIRST,"Aggregate by first value"),(0,a.Z)(r,d.Q0.FIX_SYNTAX_ERRORS,"Fix syntax errors"),(0,a.Z)(r,d.Q0.IMPUTE,"Fill in missing values"),(0,a.Z)(r,d.Q0.NORMALIZE,"Normalize Data"),(0,a.Z)(r,d.Q0.STANDARDIZE,"Standardize Data"),(0,a.Z)(r,d.Q0.LAST,"Aggregate by last value"),(0,a.Z)(r,d.Q0.MAX,"Aggregate by maximum value"),(0,a.Z)(r,d.Q0.MEDIAN,"Aggregate by median value"),(0,a.Z)(r,d.Q0.MIN,"Aggregate by mininum value"),(0,a.Z)(r,d.Q0.REFORMAT,"Reformat"),(0,a.Z)(r,d.Q0.REMOVE_OUTLIERS,"Remove outliers"),(0,a.Z)(r,d.Q0.REMOVE,"Remove column(s)"),(0,a.Z)(r,d.Q0.SELECT,"Keep columns"),(0,a.Z)(r,d.Q0.SHIFT_DOWN,"Shift rows down in a column"),(0,a.Z)(r,d.Q0.SHIFT_UP,"Shift rows up in a column"),(0,a.Z)(r,d.Q0.SUM,"Aggregate by sum of values"),r)),(0,a.Z)(u,d.qs.ROW,(l={},(0,a.Z)(l,d.Q0.DROP_DUPLICATE,"Drop duplicates"),(0,a.Z)(l,d.Q0.FILTER,"Filter"),(0,a.Z)(l,d.Q0.SORT,"Sort"),(0,a.Z)(l,d.Q0.REMOVE,"Remove rows"),l)),u)},56747:function(e,n,t){t.d(n,{Z:function(){return j}});var o=t(21124),i=t(40583),r=t(85223),l=t(45993),u=t(85854),c=t(48670),a=t(30160),d=t(44897),s=t(38626),f=t(95363),p=t(70515),v=t(42631),m=t(61896),h=t(47041),b="0.75em",g=s.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;","}}"],f.ry,p.iI,h.w5,(function(e){return"\n color: ".concat((e.theme||d.Z).content.active,";\n ")}),b,p.iI,(function(e){return"\n border-left: ".concat(.5*p.iI,"px solid ").concat((e.theme||d.Z).content.active,";\n ")}),3*p.l4,v.BG,b,p.iI,h.w5,(function(e){return"\n background-color: ".concat((e.theme||d.Z).interactive.defaultBorder,";\n ")}),b,3*p.iI,m.iD,m.iD,b,f.nF,(function(e){return"\n border-bottom: ".concat(v.YF,"px solid ").concat((e.theme||d.Z).content.active,";\n ")}),.5*p.iI,.75*p.iI,(function(e){return"\n border: ".concat(v.YF,"px solid ").concat((e.theme||d.Z).content.muted,";\n ")})),x=t(28598);var j=function(e){var n=e.children;return(0,x.jsx)(g,{children:(0,x.jsx)(o.D,{components:{a:function(e){var n=e.children,t=e.href;return(0,x.jsx)(c.Z,{href:t,inline:!0,openNewWindow:!0,primary:!0,children:n})},code:function(e){var n=e.children;return(0,x.jsx)(a.ZP,{backgroundColor:d.Z.interactive.defaultBorder,inline:!0,monospace:!0,pre:!0,style:{fontSize:"13px"},children:n})},em:function(e){var n=e.children;return(0,x.jsx)(a.ZP,{inline:!0,italic:!0,children:n})},h1:function(e){var n=e.children;return(0,x.jsx)(u.Z,{level:1,children:n})},h2:function(e){var n=e.children;return(0,x.jsx)(u.Z,{level:2,children:n})},h3:function(e){var n=e.children;return(0,x.jsx)(u.Z,{level:3,children:n})},h4:function(e){var n=e.children;return(0,x.jsx)(u.Z,{level:4,children:n})},h5:function(e){var n=e.children;return(0,x.jsx)(u.Z,{level:5,children:n})},p:function(e){var n=e.children;return(0,x.jsx)(a.ZP,{children:n})},strong:function(e){var n=e.children;return(0,x.jsx)(a.ZP,{bold:!0,inline:!0,children:n})}},rehypePlugins:[i.Z,r.Z],remarkPlugins:[l.Z],children:n})})}},92677:function(e,n,t){var o=t(82684),i=t(38626),r=t(97618),l=t(55485),u=t(28598),c=i.default.div.withConfig({displayName:"ButtonGroup__ButtonGroupStyle",componentId:"sc-15vbmc8-0"})([""]),a=i.default.div.withConfig({displayName:"ButtonGroup__VerticalDivider",componentId:"sc-15vbmc8-1"})(["width:1px;"]);n.Z=function(e){var n=e.children,t=e.divider,i=o.Children.toArray(n).length;return(0,u.jsx)(c,{children:(0,u.jsx)(l.ZP,{children:o.Children.map(n,(function(e,n){return e&&(0,u.jsxs)(r.Z,{children:[n>=1&&t&&(0,u.jsx)(a,{}),o.cloneElement(e,{borderRadiusLeft:i>=2&&0===n,borderRadiusRight:i>=2&&n===i-1,halfPaddingLeft:i>=2&&0!==n,halfPaddingRight:i>=2&&n!==i-1,noBorder:i>=2&&n>0&&n<i-1,noBorderRight:i>=2&&n!==i-1})]},"button-group-child-".concat(n))}))})})}},13507:function(e,n,t){var o=t(28598);n.Z=function(e){var n=e.fill,t=void 0===n?"white":n,i=e.size;return(0,o.jsxs)("svg",{fill:"none",height:i,viewBox:"0 0 20 20",width:i,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsxs)("g",{clipPath:"url(#clip0_11802_82850)",children:[(0,o.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,o.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,o.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,o.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,o.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,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_11802_82850",children:(0,o.jsx)("rect",{fill:t,height:"20",width:"20"})})})]})}},53405:function(e,n,t){t.d(n,{$C:function(){return O},AP:function(){return M},I1:function(){return o},JN:function(){return V},KN:function(){return N},Kq:function(){return K},M$:function(){return g},MB:function(){return k},Nf:function(){return R},Qu:function(){return x},RP:function(){return A},UA:function(){return T},Uc:function(){return E},VZ:function(){return U},WD:function(){return j},WE:function(){return Q},Wi:function(){return W},XE:function(){return y},Z5:function(){return Z},bX:function(){return z},be:function(){return q},cU:function(){return h},eH:function(){return P},iN:function(){return H},ig:function(){return I},jC:function(){return B},jO:function(){return b},kW:function(){return X},p$:function(){return _},qf:function(){return w},qx:function(){return L},th:function(){return G},vV:function(){return Y},wx:function(){return F},zB:function(){return S}});var o,i=t(75582),r=t(82394),l=t(21831),u=t(82684),c=t(44425),a=t(57653),d=t(61599),s=t(86735),f=t(42122);function p(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 v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function m(e,n){return function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{includeAllNodes:!1},i=(0,s.HK)(t,(function(e){return e.uuid})),r=(o||{}).includeAllNodes,l=[];function u(t){if(t){var o=(t[n]||[]).reduce((function(n,t){return e.uuid===t?n:n.concat(i[t])}),[]);(0===o.length||r&&e.uuid!==t.uuid)&&l.push(t),o.forEach((function(e){u(e)}))}}return u(e),l}(e,"upstream_blocks",n,{includeAllNodes:!0})}function h(e,n){return(0,u.useMemo)((function(){return e.map((function(t){var o=function(e,n){var t=m(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)})),i=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:i[0],reduceOutputUpstreamBlocks:i}}(t,n),i=o.dynamicUpstreamBlock,r=o.dynamicUpstreamBlocks,l=o.reduceOutputUpstreamBlock,u=o.reduceOutputUpstreamBlocks,c=(t||{}).configuration||{},a=c.dynamic,d=c.reduce_output;return{block:t,blocksToUse:e,dynamic:!!a,dynamicUpstreamBlock:i,dynamicUpstreamBlocks:r,reduceOutput:!!d,reduceOutputUpstreamBlock:l,reduceOutputUpstreamBlocks:u}}))}),[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}))])}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=e||{},o=t.configuration,i=t.language,r=t.type,l=o||{},u=l.data_integration,d=[c.tf.DATA_LOADER,c.tf.DATA_EXPORTER].includes(r);if(a.qL.PYTHON===(null===n||void 0===n?void 0:n.type)&&d){if(c.t6.YAML===i)return!0;if(c.t6.PYTHON===i&&u)return!0}return!1}function g(e){return(null===e||void 0===e?void 0:e.stream)||(null===e||void 0===e?void 0:e.tap_stream_id)}function x(e){return null===e||void 0===e?void 0:e.parent_stream}function j(e){return[x(e),g(e)].filter((function(e){return e})).join("/")}function C(e){var n;return 0===(null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.length)}function k(e){var n;return(null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.find(C))||{breadcrumb:[],metadata:{}}}function O(e,n){var t=(null===n||void 0===n?void 0:n.catalog)||{streams:[]},o=(0,l.Z)((null===t||void 0===t?void 0:t.streams)||[]),i=null===o||void 0===o?void 0:o.findIndex((function(n){return j(n)===j(e)}));return i>=0?o[i]=e:o.push(e),v(v({},n),{},{catalog:v(v({},t),{},{streams:o})})}function y(e,n){var t,o,i=v({},e);null!==i&&void 0!==i&&i.metadata||(i.metadata=[]);var r=null===i||void 0===i||null===(t=i.metadata)||void 0===t?void 0:t.findIndex(C),l={breadcrumb:[],metadata:{}};r>=0&&(l=k(i)||{breadcrumb:[],metadata:{}});var u=v(v({},l),{},{metadata:v(v({},null===(o=l)||void 0===o?void 0:o.metadata),n)});return r>=0?i.metadata[r]=u:i.metadata.push(u),i}function Z(e){var n,t,o=(e||{}).metadata;return null===o||void 0===o||null===(n=o.find(C))||void 0===n||null===(t=n.metadata)||void 0===t?void 0:t.selected}function E(e,n){var t=(n||{}).getAll,o=null===e||void 0===e?void 0:e.catalog,i=(null===o||void 0===o?void 0:o.streams)||[];return t?i:null===i||void 0===i?void 0:i.filter(Z)}function T(e,n){var t=n||{},o=t.noParents,i=t.parents,r={noParents:{},parents:{}};return null===e||void 0===e||e.forEach((function(e){var n,t=null===e||void 0===e?void 0:e.parent_stream,l=g(e);t?null!==i&&void 0!==i&&null!==(n=i[t])&&void 0!==n&&n[l]||(r.parents[t]||(r.parents[t]={}),r.parents[t][l]=e):null!==o&&void 0!==o&&o[l]||(r.noParents[l]=e)})),r}function P(e){var n=e||{},t=n.noParents,o=void 0===t?{}:t,i=n.parents,r=void 0===i?{}:i;return Object.values(o||[]).concat(Object.values(r||[]).reduce((function(e,n){return e.concat(Object.values(n))}),[]))}function S(e,n){var t,o,i,r=null===e||void 0===e?void 0:e.parent_stream,l=g(e);return r?null===n||void 0===n||null===(o=n.parents)||void 0===o||null===(i=o[r])||void 0===i?void 0:i[l]:null===n||void 0===n||null===(t=n.noParents)||void 0===t?void 0:t[l]}function I(e,n,t){return!!S(e,n)&&!!S(e,t)}function _(e,n,t){var o=function(e,n){var t,o,r={},l=[],u={};function c(e,n){null!==r&&void 0!==r&&r[e]||(r[e]={}),r[e]=v(v({},null===r||void 0===r?void 0:r[e]),n)}var a=(null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties)||{},d=(null===n||void 0===n||null===(o=n.schema)||void 0===o?void 0:o.properties)||{};return Object.entries(a).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0],o=n[1],a=null===d||void 0===d?void 0:d[t];if(a){var p=(null===o||void 0===o?void 0:o.type)||[];p=Array.isArray(p)?p:[p];var v=(null===a||void 0===a?void 0:a.type)||[];v=Array.isArray(v)?v:[v],(0,s.fS)(p,v)||c(t,{type:p});var m=null===o||void 0===o?void 0:o.format;m!==(null===a||void 0===a?void 0:a.format)&&c(t,{format:m});var h=(null===o||void 0===o?void 0:o.anyOf)||{},b=(null===a||void 0===a?void 0:a.anyOf)||{};(0,f.Xy)(h,b)||c(t,{anyOf:h}),null!==r&&void 0!==r&&r[t]&&(u[t]=o)}else l.push(t),u[t]=o})),{newColumnSettings:r,newColumns:l,stream:v(v({},n),{},{schema:v(v({},null===n||void 0===n?void 0:n.schema),{},{properties:v(v(v({},d),u),r)})})}}(S(e,n),S(e,t)),r=o||{},l=r.newColumnSettings,u=r.newColumns;if(!(0,f.Qr)(l||{})||(null===u||void 0===u?void 0:u.length)>=1)return o}function w(e,n){return[].concat((0,l.Z)(Object.values(e||{})),(0,l.Z)(Object.values(n||{}))).every((function(e){return(0,f.Qr)(e)}))}function A(e){var n,t,o=v({},(null===e||void 0===e||null===(n=e.schema)||void 0===n?void 0:n.properties)||{});return null===e||void 0===e||null===(t=e.metadata)||void 0===t||t.forEach((function(e){if(!C(e)){var n,t=null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.find((function(e){return e!==d.u7.PROPERTIES}));t&&null!==o&&void 0!==o&&o[t]&&(o[t]=v(v({},o[t]),{},{metadata:e}))}})),o}function R(e){var n;return null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.reduce((function(e,n){if(C(n))return e;var t=D(n);return t&&(e[t]=n),e}),{})}function D(e){var n;return null===e||void 0===e||null===(n=e.breadcrumb)||void 0===n?void 0:n.find((function(e){return e!==d.u7.PROPERTIES}))}function B(e){return{breadcrumb:[d.u7.PROPERTIES,e],metadata:{inclusion:d.ks.AVAILABLE,selected:!0}}}function N(e,n){var t;return v(v({},e),{},{schema:v(v({},null===e||void 0===e?void 0:e.schema),{},{properties:v(v({},null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties),n)})})}function M(e,n){var t=k(e),o=v(v({},R(e)),n);return v(v({},e),{},{metadata:[t].concat((0,l.Z)(Object.values(o||{})))})}function L(e,n){var t=n||{},o=t.type,i=t.typesDerived,r=v({},n),u=(0,l.Z)(o),c=(0,l.Z)(i);return null===e||void 0===e||e.forEach((function(e){d.Xv===e?r.format=d.zS.DATE_TIME:d.zS.UUID===e?r.format=d.zS.UUID:(null!==u&&void 0!==u&&u.includes(e)||u.push(e),null!==c&&void 0!==c&&c.includes(e)||c.push(e))})),v(v({},r),{},{type:u,typesDerived:c})}function U(e,n){var t=n||{},o=t.format,i=t.type,r=t.typesDerived,u=v({},n),c=(0,l.Z)(i),a=(0,l.Z)(r);return null===e||void 0===e||e.forEach((function(e){if(o&&d.eL[o]===e)delete u.format;else{var n,t,i,r;if(null!==(n=c)&&void 0!==n&&n.includes(e))c=(0,l.Z)(null===(i=c)||void 0===i?void 0:i.filter((function(n){return n!==e})));if(null!==(t=a)&&void 0!==t&&t.includes(e))a=(0,l.Z)(null===(r=a)||void 0===r?void 0:r.filter((function(n){return n!==e})))}})),v(v({},u),{},{type:c,typesDerived:a})}function F(e,n){var t=n||{},o=t.format,i=t.type,r=void 0===i?[]:i,l=null===r||void 0===r?void 0:r.filter((function(e){var n;return!(null!==(n=[d.Xv,d.zS.UUID])&&void 0!==n&&n.includes(e))}));return d.eL[o]&&(null!==l&&void 0!==l&&l.includes(d.eL[o])||l.push(d.eL[o])),v(v({},n),{},{typesDerived:l,uuid:e})}function G(e){var n=e||{},t=n.noParents,o=n.parents;return[{groupHeader:null,streams:(0,s.YC)(Object.values(t),(function(e){return g(e)}))}].concat((0,l.Z)((0,s.YC)(Object.entries(o),(function(e){return(0,i.Z)(e,1)[0]})).map((function(e){var n=(0,i.Z)(e,2),t=n[0],o=n[1];return{groupHeader:t,streams:(0,s.YC)(Object.values(o),(function(e){return g(e)}))}}))))}function H(e,n,t){var o,i,l,u=(t||{}).remove,c=g(e||{}),a=x(e||{}),d=v({},n);if(a)u?null===d||void 0===d||(null===(o=d.parents)||void 0===o||(null===(i=o[a])||void 0===i||delete i[c])):d.parents=v(v({},null===d||void 0===d?void 0:d.parents),{},(0,r.Z)({},a,v(v({},null===d||void 0===d||null===(l=d.parents)||void 0===l?void 0:l[a]),{},(0,r.Z)({},c,e))));else if(c){var s;if(u)null===d||void 0===d||(null===(s=d.noParents)||void 0===s||delete s[c]);else d.noParents=v(v({},null===d||void 0===d?void 0:d.noParents),{},(0,r.Z)({},c,e))}return d}function z(e,n){var t=[o.AUTO_ADD_NEW_FIELDS,o.DISABLE_COLUMN_TYPE_CHECK,o.REPLICATION_METHOD,o.RUN_IN_PARALLEL,o.UNIQUE_CONFLICT_METHOD],l=Object.entries(n||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),o=t[0],l=t[1],u=l.selected,c=l.value;return v(v({},e),u?(0,r.Z)({},o,c):{})}),{}),u=v({},e),c=e&&P(e)||[];return null===c||void 0===c||c.forEach((function(e){u=H(function(e){var n,o=v({},e);return null===o||void 0===o||null===(n=o.schema)||void 0===n||n.properties,Object.entries(l||{}).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],l=n[1];t.includes(r)&&(o[r]=l)})),o}(e),u)})),u}function K(e,n,t){var l=[o.BOOKMARK_PROPERTIES,o.KEY_PROPERTIES,o.PARTITION_KEYS,o.UNIQUE_CONSTRAINTS],u=Object.entries(n||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),o=t[0];return t[1]?e.concat(o):e}),[]),c=Object.entries(t||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),o=t[0],l=t[1],u=l.selected,c=l.value;return v(v({},e),u?(0,r.Z)({},o,c):{})}),{}),a=v({},e),p=e&&P(e)||[];return null===p||void 0===p||p.forEach((function(e){a=H(function(e){var n,t=v({},e),r=(null===t||void 0===t||null===(n=t.schema)||void 0===n?void 0:n.properties)||{},a=R(e);return null===u||void 0===u||u.forEach((function(e){null!==r&&void 0!==r&&r[e]&&Object.entries(c||{}).forEach((function(n){var u=(0,i.Z)(n,2),c=u[0],p=u[1];if(o.PROPERTY_SELECTED===c){var m=(null===a||void 0===a?void 0:a[e])||B(e)||{breadcrumb:[],metadata:{}},h=v(v({},m),{},{metadata:v(v({},null===m||void 0===m?void 0:m.metadata),{},{selected:p})});a[e]=h}else if(l.includes(c)){var b;null!==t&&void 0!==t&&t[c]||(t[c]=[]);var g=null===(b=t[c])||void 0===b?void 0:b.includes(e);p&&!g?t[c].push(e):!p&&g&&(t[c]=(0,s.Od)(t[c],(function(n){return n===e})))}else if(d.D5.includes(c)){var x,j=v({},(null===r||void 0===r?void 0:r[e])||{}),C=(p?L:U)([c],F(e,j)),k=C.anyOf,O=C.format,y=C.type;null!==t&&void 0!==t&&t.schema||(t.schema={properties:{}}),null!==t&&void 0!==t&&null!==(x=t.schema)&&void 0!==x&&x.properties||(t.schema=v(v({},null===t||void 0===t?void 0:t.schema),{},{properties:{}}));var Z=(0,f.hB)({anyOf:k,format:O,type:y});t.schema.properties[e]=Z}}))})),M(t,a)}(e),a)})),a}function Q(e){var n,t,o=(null===e||void 0===e||null===(n=e.schema)||void 0===n?void 0:n.properties)||{};return null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.reduce((function(e,n){var t;if(C(n))return e;if(!(null===n||void 0===n||null===(t=n.metadata)||void 0===t?void 0:t.selected))return e;var i=D(n),l=null===o||void 0===o?void 0:o[i];return v(v({},e),{},(0,r.Z)({},i,v(v({},l),{},{metadata:n,uuid:i})))}),{})}function W(e,n){var t=(null===n||void 0===n?void 0:n.inputs)||{};return null===e||void 0===e?void 0:e.reduce((function(e,n){var o=null===n||void 0===n?void 0:n.uuid,i=o&&(null===t||void 0===t?void 0:t[o]);return i?e.concat({block:n,input:i}):e}),[])}function V(e){var n,t,o={},r={},l={};return null===e||void 0===e||null===(n=e.metadata)||void 0===n||n.forEach((function(e){if(!C(e)){var n,t=D(e);if(t&&null!==e&&void 0!==e&&e.metadata)l[t]=null===e||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.selected}})),Object.entries((null===e||void 0===e||null===(t=e.schema)||void 0===t?void 0:t.properties)||{}).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0],u=v(v({},n[1]),{},{uuid:t});t in l?null!==l&&void 0!==l&&l[t]&&(r[t]=u):r[t]=u,o[t]=u})),{allColumns:o,selectedColumns:r}}function Y(e){var n=e||{},t=n.configuration,o=n.tags;return(null===t||void 0===t?void 0:t.dynamic)||(null===o||void 0===o?void 0:o.includes(c.L8.DYNAMIC))}function q(e){var n=(e||{}).tags;return null===n||void 0===n?void 0:n.includes(c.L8.DYNAMIC_CHILD)}function X(e){var n=e||{},t=n.configuration,o=n.tags;return(null===t||void 0===t?void 0:t.reduce_output)||(null===o||void 0===o?void 0:o.includes(c.L8.REDUCE_OUTPUT))}!function(e){e.AUTO_ADD_NEW_FIELDS="auto_add_new_fields",e.BOOKMARK_PROPERTIES="bookmark_properties",e.DISABLE_COLUMN_TYPE_CHECK="disable_column_type_check",e.KEY_PROPERTIES="key_properties",e.PARTITION_KEYS="partition_keys",e.PROPERTY_SELECTED="property_selected",e.REPLICATION_METHOD="replication_method",e.RUN_IN_PARALLEL="run_in_parallel",e.UNIQUE_CONFLICT_METHOD="unique_conflict_method",e.UNIQUE_CONSTRAINTS="unique_constraints"}(o||(o={}))},65044:function(e,n,t){t.d(n,{Gr:function(){return i},Lz:function(){return o},Vc:function(){return l},gr:function(){return r}});var o=/\[__internal_output__\]/,i=/\[__internal_test__\]/,r="[__internal_output__]",l="[__internal_test__]"},19698:function(e,n,t){var o=t(82684),i=t(35686);n.Z=function(){var e=i.ZP.statuses.list().data;return{status:(0,o.useMemo)((function(){var n;return null===e||void 0===e||null===(n=e.statuses)||void 0===n?void 0:n[0]}),[e])}}},58325:function(e,n,t){var o;t.d(n,{V5:function(){return r}}),function(e){e.ANDROID="Android",e.CHROME_OS="ChromeOS",e.IOS="iOS",e.LINUX="Linux",e.MAC="macOS",e.WINDOWS="Windows"}(o||(o={}));var i=o;function r(){return function(){var e,n,t,o,r,l,u,c=i.MAC,a=null===(e=window)||void 0===e||null===(n=e.navigator)||void 0===n?void 0:n.userAgent,d=(null===(t=window)||void 0===t||null===(o=t.navigator)||void 0===o||null===(r=o.userAgentData)||void 0===r?void 0:r.platform)||(null===(l=window)||void 0===l||null===(u=l.navigator)||void 0===u?void 0:u.platform);return d?["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(d)?c=i.MAC:["Win32","Win64","Windows","WinCE"].includes(d)?c=i.WINDOWS:["iPhone","iPad","iPod"].includes(d)&&(c=i.IOS):a&&(a.includes("Macintosh")?c=i.MAC:a.includes("Windows")?c=i.WINDOWS:a.includes("Linux")&&a.includes("X11")?c=i.LINUX:/(iPhone|iPad)/.test(a)?c=i.IOS:a.includes("Android")&&a.includes("Mobi")?c=i.ANDROID:a.includes("CrOS")&&(c=i.CHROME_OS)),c}()===i.MAC}}}]);
|