mage-ai 0.9.46__py3-none-any.whl → 0.9.47__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mage_ai/api/operations/base.py +27 -5
- mage_ai/api/policies/GlobalHookPolicy.py +1 -1
- mage_ai/api/policies/IntegrationSourcePolicy.py +62 -0
- mage_ai/api/policies/OauthPolicy.py +6 -6
- mage_ai/api/presenters/GlobalHookPresenter.py +1 -1
- mage_ai/api/presenters/IntegrationSourcePresenter.py +9 -2
- mage_ai/api/presenters/PipelinePresenter.py +2 -0
- mage_ai/api/presenters/PipelineRunPresenter.py +8 -3
- mage_ai/api/presenters/PipelineSchedulePresenter.py +22 -1
- mage_ai/api/resources/BlockResource.py +5 -0
- mage_ai/api/resources/DataProviderResource.py +2 -0
- mage_ai/api/resources/IntegrationSourceResource.py +149 -2
- mage_ai/data_integrations/sources/constants.py +5 -0
- mage_ai/data_integrations/utils/scheduler.py +57 -2
- mage_ai/data_preparation/executors/block_executor.py +9 -1
- mage_ai/data_preparation/models/block/__init__.py +25 -12
- mage_ai/data_preparation/models/block/data_integration/constants.py +3 -0
- mage_ai/data_preparation/models/block/data_integration/utils.py +196 -37
- mage_ai/data_preparation/models/block/sql/utils/shared.py +18 -1
- mage_ai/data_preparation/models/block/utils.py +28 -13
- mage_ai/data_preparation/models/global_hooks/constants.py +50 -1
- mage_ai/data_preparation/models/global_hooks/models.py +148 -84
- mage_ai/data_preparation/models/global_hooks/predicates.py +316 -0
- mage_ai/data_preparation/models/pipeline.py +2 -0
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +0 -1
- mage_ai/data_preparation/preferences.py +29 -18
- mage_ai/data_preparation/repo_manager.py +12 -2
- mage_ai/data_preparation/sync/__init__.py +2 -0
- mage_ai/data_preparation/templates/constants.py +14 -0
- mage_ai/data_preparation/templates/data_exporters/chroma.py +24 -0
- mage_ai/data_preparation/templates/data_exporters/streaming/rabbitmq.yaml +7 -0
- mage_ai/data_preparation/templates/data_loaders/chroma.py +27 -0
- mage_ai/data_preparation/templates/repo/io_config.yaml +3 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/chroma.py +153 -0
- mage_ai/io/config.py +8 -0
- mage_ai/orchestration/db/models/schedules.py +98 -34
- mage_ai/orchestration/pipeline_scheduler.py +58 -19
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/N3FS4bHv0jpYeeg672uYK/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +5 -5
- mage_ai/server/frontend_dist/files.html +5 -5
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist/global-data-products.html +5 -5
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +5 -5
- mage_ai/server/frontend_dist/global-hooks.html +5 -5
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +5 -5
- mage_ai/server/frontend_dist/manage/settings.html +5 -5
- mage_ai/server/frontend_dist/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist/manage/users.html +5 -5
- mage_ai/server/frontend_dist/manage.html +5 -5
- mage_ai/server/frontend_dist/oauth.html +4 -4
- mage_ai/server/frontend_dist/overview.html +5 -5
- mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +5 -5
- mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +20 -20
- mage_ai/server/frontend_dist/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist/templates.html +5 -5
- mage_ai/server/frontend_dist/terminal.html +5 -5
- mage_ai/server/frontend_dist/test.html +5 -5
- mage_ai/server/frontend_dist/triggers.html +5 -5
- mage_ai/server/frontend_dist/version-control.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/aoO6jYZLVlUGCCdY-wmy8/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9a6276b2918fdae1.js → 1749-bf512b4dabbab7fa.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1952-ac7722e8b1ab88fe.js → 1952-57858e7445d24413.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/2714-1e79e9f2e998b544.js → frontend_dist_base_path_template/_next/static/chunks/2714-68fef54789d7eaeb.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-92cdffd87b6f6e05.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3419-f8d518d024e7b5c8.js → frontend_dist_base_path_template/_next/static/chunks/3419-715ca383fa15a5ef.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-b4d6a037cf5781f8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-c9fb980f03df6450.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-cb102e060a43d9bd.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/4366-93e09e5a4a7e182c.js → frontend_dist_base_path_template/_next/static/chunks/4366-3e52497942acbafe.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4783-1a21d9be47574bba.js → 4783-422429203610c318.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5896-14e5a23b1c6a0769.js → 5896-7b8e36634d7d94eb.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{6285-e9b45335bfb9ccaf.js → 6285-648f9a732e100b2f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6798-b904395b0c18647b.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/7022-070ec0144a4d029c.js → frontend_dist_base_path_template/_next/static/chunks/7022-e76cae3ba5ee5312.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-900f786d24f91b2e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7361-694e1e4fb9c97d68.js → 7361-6c5c9063b9f91700.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/8146-92e7ccfed169ee9c.js → frontend_dist_base_path_template/_next/static/chunks/8146-27f0e31f309897a5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/845-9a73c65fe3fdc328.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-8e1c09546dff4dbf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-cc44b07f248707b0.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-4eb49cdbd1ba11d7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{976-18c98af60b76f1a7.js → 976-0a8c2c4d7acd957b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-78c4a077a2f279c2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-b37d221eb5ddc248.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-7adc543fc490367a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-51d366993f6dd449.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-449a022f2f0f2d94.js → files-fe6e73463a20d67c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{manage-f83deb790548693b.js → manage-d8a38b5d1f50e798.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-9adc2974aada27ba.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-51b1311dff2a974e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-2333e524d34b474a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-e051057d9fe94f23.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-6d1afeb4a84f50f7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1ff9bb8e22ca1e75.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-11363aa58d51f4e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-779c3ef0676a12ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-bbea9a088657404a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3737f2b0afc2ede3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-3c8f062913c66f3e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-c1f4ed17d501ccca.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-8bdd858240d5dbf6.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-dd4fb405695f74bf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/oauth.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +23 -23
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/test.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
- mage_ai/server/server.py +9 -3
- mage_ai/services/k8s/job_manager.py +1 -0
- mage_ai/settings/repo.py +3 -0
- mage_ai/shared/files.py +47 -0
- mage_ai/shared/models.py +1 -0
- mage_ai/streaming/constants.py +1 -0
- mage_ai/streaming/sinks/postgres.py +2 -0
- mage_ai/streaming/sinks/rabbitmq.py +76 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/tests/api/operations/test_operations_with_hooks.py +136 -91
- mage_ai/tests/api/policies/test_oauth_policy.py +38 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_global_hooks.py +33 -8
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +82 -38
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +803 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_utils.py +6 -1
- mage_ai/tests/data_preparation/models/test_block.py +26 -0
- mage_ai/tests/data_preparation/models/test_pipeline.py +10 -0
- mage_ai/tests/factory.py +40 -2
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +82 -1
- mage_ai/tests/services/k8s/test_job_manager.py +16 -0
- mage_ai/tests/shared/mixins.py +60 -23
- mage_ai/tests/streaming/sinks/test_rabbitmq.py +36 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/METADATA +7 -4
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/RECORD +257 -243
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/9jB4XPuz6BzxBcG9VNao5/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/722-a1584445357a276c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3943-9e1105393a3be0de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4267-fd4d8049e83178de.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5810-12eadc488265d55b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/595-0d174b1f9fbfce4f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/722-a1584445357a276c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-1d4f0327d42fed91.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9618-2c5045255ac5a6e7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-ebef928183f9a3bb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-0f2d4be6fdca86ca.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-77edfa32d000e88b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-e561ae38cf5592e8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-10e9a2d19541caa2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c8d3a5289ab93f88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-ff7e9108502f5716.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-0691711636fa95c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-2914e326a5f1ffe0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a7500e6e53084d3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-c0e551d265a8d467.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-e47db5c3eaf683af.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-55ac955dfa9a5a8d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-29c92a9bc54ae5cd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-572d82d6eb7a5d43.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-2d26d80370a2e481.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/uPDjJYpJMst1q6psbRyte/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{9jB4XPuz6BzxBcG9VNao5 → N3FS4bHv0jpYeeg672uYK}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{uPDjJYpJMst1q6psbRyte → aoO6jYZLVlUGCCdY-wmy8}/_ssgManifest.js +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.46.dist-info → mage_ai-0.9.47.dist-info}/top_level.txt +0 -0
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-bc1b433b428a9095.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6333],{27277:function(e,n,t){var i=t(82394),r=t(21831),o=t(82684),l=t(39643),u=t(44688),c=t(28598);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.highlightedItemIndexInitial,t=void 0===n?null:n,i=e.itemGroups,s=e.noResultGroups,d=e.onHighlightItemIndexChange,p=e.onMouseEnterItem,f=e.onMouseLeaveItem,h=e.onSelectItem,v=e.renderEmptyState,m=e.searchQuery,j=e.selectedItem,g=e.setItemRefs,x=e.uuid,Z=(0,o.useState)(!0),b=Z[0],y=Z[1],P=(0,o.useMemo)((function(){var e=[],n=i.reduce((function(n,t){var i=t.items.filter((function(e){return!m||function(e,n){return e.searchQueries.filter((function(e){return String(e).toLowerCase().includes(n.toLowerCase())})).length>=1}(e,m)}));return 0===i.length?n:(e.push.apply(e,(0,r.Z)(i)),n.concat(a(a({},t),{},{items:i})))}),[]);return{itemGroups:n,itemsFlattened:e}}),[i,m]),O=P.itemGroups,_=P.itemsFlattened;s&&0===_.length&&(O.push.apply(O,(0,r.Z)(s)),_.push.apply(_,(0,r.Z)(s.reduce((function(e,n){var t=n.items;return e.concat(t)}),[]))));var w=(0,o.useRef)(null);w.current=_.map((function(){return(0,o.createRef)()}));var I=(0,o.useState)(t),k=I[0],S=I[1],C=(0,o.useCallback)((function(e){null===d||void 0===d||d(e),S(e)}),[d,S]),T=_[k],E=(0,u.y)(),M=E.registerOnKeyDown,D=E.unregisterOnKeyDown;(0,o.useEffect)((function(){return function(){return D(x)}}),[D,x]),null===M||void 0===M||M(x,(function(e,n,t){var i,r=!0,o=_.length,u=_.findIndex((function(e,i){var r=e.keyboardShortcutValidation;return null===r||void 0===r?void 0:r({keyHistory:t,keyMapping:n},i)})),c=n[l.Gs]&&!n[l.XR]&&!j;return-1!==u?(e.preventDefault(),h(_[u]),y(r),C(u)):(n[l.Uq]||c)&&_[k]?(c&&e.preventDefault(),h(_[k]),y(r),C(k)):(n[l.Bu]?(r=!1,i=null===k?o-1:k-1):n[l.kD]?(r=!1,i=null===k?0:k+1):n[l.vP]&&C(null),"undefined"!==typeof i&&(i>=o?i=0:i<=-1&&(i=o-1),i>=0&&i<=o-1?(C(i),e.preventDefault()):C(null)),void y(r))}),[k,_,j,C,y]),(0,o.useEffect)((function(){null===g||void 0===g||g(w)}),[w,_,g]),(0,o.useEffect)((function(){var e=null===k||"undefined"===typeof k||k>=_.length;(null===m||void 0===m?void 0:m.length)>=1&&e&&C(0)}),[k,_,m,C]);var N=(0,o.useCallback)((function(){return y(!0)}),[y]);return(0,o.useEffect)((function(){return window.addEventListener("mousemove",N),function(){window.removeEventListener("mousemove",N)}}),[N]),0===O.length&&v?v():(0,c.jsx)(c.Fragment,{children:O.map((function(e,n){var t=e.items,i=e.renderItem,r=e.renderGroupHeader,o=e.uuid,l=n>=1?O.slice(0,n).reduce((function(e,n){return e+n.items.length}),0):0,u=t.map((function(e,n){var t=e.itemObject,r=e.value,o=r===(null===T||void 0===T?void 0:T.value),u=n+l,s=(null===t||void 0===t?void 0:t.id)||(null===t||void 0===t?void 0:t.uuid);return(0,c.jsx)("div",{id:"item-".concat(r,"-").concat(s),onMouseMove:function(){return b&&C(u)},ref:w.current[u],children:i(e,{highlighted:o,onClick:function(){return h(e)},onMouseEnter:function(){return null===p||void 0===p?void 0:p(e)},onMouseLeave:function(){return null===f||void 0===f?void 0:f(e)}},n,u)},"item-".concat(r,"-").concat(s))}));return u.length>=1&&(0,c.jsxs)("div",{children:[null===r||void 0===r?void 0:r(),u]},o||"group-uuid-".concat(n))}))})}},8916:function(e,n,t){t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return f},wx:function(){return a}});var i=t(75582),r=t(82394),o=t(83784),l=t(30229);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=a(e,(function(e){return e.uuid===o.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,i=n.value;return c(c({},e),{},(0,r.Z)({},t,i))}),{})}function p(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function f(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),o=t[0],l=t[1],u=l;try{u=JSON.parse(l)}catch(s){}return c(c({},e),{},(0,r.Z)({},o,u))}),{}):e}},81334:function(e,n,t){t.d(n,{Z:function(){return _}});var i=t(82394),r=t(82684),o=t(27277),l=t(31882),u=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(38626),p=t(44897),f=t(42631),h=t(47041),v=t(70515),m=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],h.w5,f.BG,40*v.iI,(function(e){return"\n background-color: ".concat((e.theme.background||p.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||p.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*v.iI,"px;\n ")})),j=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*v.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||p.Z.interactive).hoverBackground,";\n ")})),g=t(39643),x=t(3314),Z=t(86735),b=t(44688),y=t(28598);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=function(e){var n,t=e.removeTag,i=e.selectTag,d=e.selectedTags,p=void 0===d?[]:d,f=e.tags,h=void 0===f?[]:f,v=e.uuid,P=(0,r.useRef)(null),_=(0,r.useState)(!1),w=_[0],I=_[1],k=(0,r.useState)(null),S=k[0],C=k[1],T=(0,r.useMemo)((function(){return(0,Z.YC)(h||[],"uuid")}),[h]),E=(0,r.useMemo)((function(){return null===T||void 0===T?void 0:T.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[T]),M=(0,r.useMemo)((function(){return(null===S||void 0===S?void 0:S.length)>=1?E.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):E}),[E,S]),D=(0,b.y)(),N=D.registerOnKeyDown,A=D.unregisterOnKeyDown;return(0,r.useEffect)((function(){return function(){return A(v)}}),[A,v]),null===N||void 0===N||N(v,(function(e,n){var t;w&&n[g.vP]&&(I(!1),null===P||void 0===P||null===(t=P.current)||void 0===t||t.blur())}),[w,P]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.Z,{onClickTag:t,tags:p}),(0,y.jsxs)(u.Z,{mt:1,style:{position:"relative"},children:[(0,y.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return I(!1)}),150)},onChange:function(e){return C(e.target.value)},onFocus:function(){return I(!0)},ref:P,value:S||""}),(0,y.jsx)(m,{topOffset:null===P||void 0===P||null===(n=P.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,y.jsx)(o.Z,{itemGroups:[{items:w?M:[],renderItem:function(e,n){var t=e.value;return(0,y.jsx)(j,O(O({},n),{},{onClick:function(e){var t;(0,x.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,y.jsx)(l.Z,{small:!0,children:(0,y.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===i||void 0===i||i(n),C(null)},searchQuery:S,uuid:v})})]})]})}},88785:function(e,n,t){t.d(n,{J:function(){return c},U:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),l=t(70515),u=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),c=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},12717:function(e,n,t){t.d(n,{Z:function(){return Le}});var i=t(21831),r=t(82394),o=t(75582),l=t(12691),u=t.n(l),c=t(82684),s=t(20026),a=t.n(s),d=t(92083),p=t.n(d),f=t(21764),h=t(69864),v=t(34376),m=t(71180),j=t(90299),g=t(14805),x=t(70652),Z=t(50724),b=t(9134),y=t(39457),P=t(38626),O=t(39867),_=t(55485),w=t(85854),I=t(38276),k=t(75499),S=t(30160),C=t(17488),T=t(12468),E=t(44375),M=t(70515),D=t(55283),N=t(86735),A=t(28598);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=function(e){var n=e.blocks,t=e.updateVariables,i=e.variables,o=(0,c.useContext)(P.ThemeContext),l=(0,c.useCallback)((function(e,n){return t((function(){var t=(null===i||void 0===i?void 0:i.__mage_variables)||{},o=(null===t||void 0===t?void 0:t.blocks)||{},l=o[e]||{},u=(null===l||void 0===l?void 0:l.configuration)||{};return H(H({},i),{},{__mage_variables:H(H({},t),{},{blocks:H(H({},o),{},(0,r.Z)({},e,H(H({},l),{},{configuration:H(H({},u),n)})))})})}))}),[t,i]);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(w.Z,{children:"dbt runtime settings"}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(k.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,r,u=e.type,c=e.uuid,s=(0,E.IU)(e).name,a=(0,D.qn)(u,{blockColor:e.color,theme:o}).accent,d=null===i||void 0===i||null===(n=i.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(r=t[c])||void 0===r?void 0:r.configuration,p=d||{},f=p.prefix,h=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],m=!(null===v||void 0===v||!v.includes(E.Dy));return[(0,A.jsx)(T.Z,{block:!0,label:(0,A.jsx)(S.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(O.Z,{color:a,size:1.5*M.iI,square:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsxs)(S.ZP,{monospace:!0,small:!0,children:[f&&(0,A.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),s,h&&(0,A.jsx)(S.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h})]})]})},"uuid-".concat(c)),(0,A.jsx)(_.ZP,{alignItems:"center",children:(0,A.jsx)(x.Z,{checked:m,label:E.Dy,monospace:!0,onClick:function(){return l(c,{flags:m?(0,N.Od)(v,(function(e){return E.Dy===e})):v.concat(E.Dy)})},small:!0})},"flags-".concat(c)),(0,A.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return l(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*M.iI},"prefix-".concat(c)),(0,A.jsx)(C.Z,{compact:!0,monospace:!0,onChange:function(e){return l(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:h,width:10*M.iI},"suffix-".concat(c))]}))})})]})},F=t(97196),q=t(15338),U=t(97618),R=t(48670),W=t(26304),B=t(44897),K=t(95363),Y=t(61896),J=["children","large","lineHeight","ordered"];function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function V(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,r.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 X=(0,P.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||B.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||B.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||B.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(K.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(K.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(Y.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(Y.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(Y.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),Q=P.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],X),$=P.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],X),ee=P.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*M.iI,"px;\n ")}));var ne,te=function(e){var n=e.children,t=e.large,i=e.lineHeight,r=e.ordered,o=(0,W.Z)(e,J),l=r?$:Q;return(0,A.jsx)(l,V(V({large:t,lineHeight:i},o),{},{children:c.Children.map(n,(function(e,n){var i;return(0,A.jsx)(ee,V(V({large:t,marginTop:n>=1},o),{},{children:c.cloneElement(e)}),(null===(i=e.props)||void 0===i?void 0:i.key)||n)}))}))},ie=t(75457),re=t(30229),oe=t(57653),le=t(83784),ue=t(82359),ce=t(44085),se=t(81334),ae=t(69650),de=t(81769),pe=t(54193),fe=t(72473),he=t(81728),ve=t(16488),me=t(70320),je=(ne={},(0,r.Z)(ne,pe.zj.DATE,fe.aw),(0,r.Z)(ne,pe.zj.DATETIME,fe.Pf),(0,r.Z)(ne,pe.zj.DICTIONARY,fe.$l),(0,r.Z)(ne,pe.zj.FLOAT,fe.As),(0,r.Z)(ne,pe.zj.INTEGER,fe.qZ),(0,r.Z)(ne,pe.zj.LIST,fe.B4),(0,r.Z)(ne,pe.zj.STRING,fe.KJ),ne);var ge=function(e){var n,t,i,r=e.containerRef,l=e.date,u=e.interactions,s=e.pipeline,a=e.pipelineInteraction,d=e.pipelineSchedule,p=e.setVariables,f=e.showSummary,h=e.time,v=e.triggerTypes,m=e.variables,j=(0,c.useMemo)((function(){return(0,N.HK)(u||[],(function(e){return e.uuid}))}),[u]),g=(0,c.useMemo)((function(){return(null===s||void 0===s?void 0:s.blocks)||[]}),[s]),x=(0,c.useMemo)((function(){return(null===a||void 0===a?void 0:a.blocks)||{}}),[a]),Z=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,o=(null===x||void 0===x?void 0:x[i])||[];null===o||void 0===o||o.length;e.push((0,A.jsx)(I.Z,{p:M.cd,children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,A.jsx)(I.Z,{mt:n>=1?2*M.cd:0,children:(0,A.jsx)(de.Z,{blockInteraction:e,containerRef:r,interaction:null===j||void 0===j?void 0:j[null===e||void 0===e?void 0:e.uuid],setVariables:p,variables:m})},"".concat(null===e||void 0===e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[g,r,j,p,m]),b=(0,me.q)(),y=(0,c.useMemo)((function(){return l&&null!==h&&void 0!==h&&h.hour&&null!==h&&void 0!==h&&h.minute?(0,ve.XM)(l,h,{convertToUtc:b,includeSeconds:!0,localTimezone:b}):null}),[l,b,h]),P=(0,c.useMemo)((function(){var e=[];null===g||void 0===g||g.length;return null===g||void 0===g||g.map((function(n,t){var i=(n||{uuid:null}).uuid,r=(null===x||void 0===x?void 0:x[i])||[];null===r||void 0===r||r.forEach((function(n,r){var l=null===j||void 0===j?void 0:j[null===n||void 0===n?void 0:n.uuid];Object.entries((null===l||void 0===l?void 0:l.variables)||{}).forEach((function(n,l){var u,c=(0,o.Z)(n,2),s=c[0],a=c[1],d=a.name,p=a.required,f=a.types,h=null===m||void 0===m?void 0:m[s],v="undefined"===typeof h,j=p&&v,g=(null===je||void 0===je?void 0:je[f[0]])||fe.KJ,x=[];"undefined"!==typeof h?h&&Array.isArray(h||[])?null===h||void 0===h||h.forEach((function(e){x.push(e&&"object"===typeof e?x.push(JSON.stringify(e)):x.push(String(e)))})):h&&"object"===typeof h?Object.entries(h||{}).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];n[1]&&x.push(String(t))})):x.push(String(h)):x.push(h||""),e.push([(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(g,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,monospace:!0,children:s})]},"".concat(i,"-").concat(s,"-label-").concat(d,"-").concat(t,"-").concat(r,"-").concat(l)),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsxs)(S.ZP,{danger:j,monospace:!j,muted:v,children:[v&&!j&&"-",j&&"This is required",!v&&!j&&(null===x||void 0===x||null===(u=x.map((function(e){return String(e)})))||void 0===u?void 0:u.join(", "))]})},"".concat(i,"-").concat(s,"-value-").concat(d,"-").concat(h,"-").concat(t,"-").concat(r,"-").concat(l))])}))}))})),(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:e})}),[g,j,m]);return(0,A.jsxs)(A.Fragment,{children:[!f&&Z,f&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{p:M.cd,children:(0,A.jsx)(w.Z,{children:"Settings"})}),(0,A.jsx)(q.Z,{light:!0,short:!0}),(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:[[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.Bf,{default:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsx)(S.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_type),monospace:!0,children:null!==d&&void 0!==d&&d.schedule_type?null===v||void 0===v||null===(n=v.find((function(e){return e.uuid===(null===d||void 0===d?void 0:d.schedule_type)})))||void 0===n||null===(t=n.label)||void 0===t?void 0:t.call(n):"This is required"})},"trigger_type_input")],[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.KJ,{default:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsx)(S.ZP,{danger:!(null!==d&&void 0!==d&&d.name),monospace:!0,children:(null===d||void 0===d?void 0:d.name)||"This is required"})},"trigger_name_input")],[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.KJ,{default:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsx)(S.ZP,{monospace:!0,muted:!(null!==d&&void 0!==d&&d.description),children:(null===d||void 0===d?void 0:d.description)||"-"})},"trigger_description_input")],[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.Pf,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsxs)(S.ZP,{danger:!(null!==d&&void 0!==d&&d.schedule_interval),monospace:!0,muted:!(null!==d&&void 0!==d&&d.schedule_interval),children:[(null===d||void 0===d?void 0:d.schedule_interval)&&(0,he.vg)((null===d||void 0===d||null===(i=d.schedule_interval)||void 0===i?void 0:i.substring(1))||""),!(null!==d&&void 0!==d&&d.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.aw,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,A.jsx)(I.Z,{py:M.cd,children:(0,A.jsx)(S.ZP,{danger:!y,monospace:!!y,muted:!y,children:y||"This is required"})},"start_time_input")]]}),(0,A.jsx)(I.Z,{p:M.cd,children:(0,A.jsx)(w.Z,{children:"Customize"})}),(0,A.jsx)(q.Z,{light:!0,short:!0}),P]})]})},xe=t(35686),Ze=t(77417),be=t(44425),ye=t(88785),Pe=t(44265),Oe=t(28795),_e={label:function(){return"CUSTOMIZE"},uuid:"customize"},we={label:function(){return"SETTINGS"},uuid:"settings"},Ie={label:function(){return"REVIEW"},uuid:"review"},ke=[we,_e,Ie],Se=t(22286),Ce=t(79500),Te=t(8916),Ee=t(42122),Me=t(72619),De=t(3917);function Ne(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Le=function(e){var n=e.creatingWithLimitation,t=e.errors,l=e.fetchPipelineSchedule,s=e.onCancel,d=e.pipeline,P=e.pipelineSchedule,O=e.setErrors,T=e.variables,E=e.useCreateScheduleMutation,L=(0,Ze.Z)().project,H=(0,c.useRef)(null),W=(0,v.useRouter)(),B=(0,me.q)(),K=null===d||void 0===d?void 0:d.uuid,Y=(0,c.useMemo)((function(){return null===P||void 0===P?void 0:P.id}),[P]),J=(null===d||void 0===d?void 0:d.type)===oe.qL.STREAMING,G=(0,c.useState)([]),V=G[0],X=G[1],Q=(0,c.useState)(!1),$=Q[0],ee=Q[1],ne=(0,c.useState)(!1),de=ne[0],pe=ne[1],je=(0,c.useState)(!1),Ne=je[0],Le=je[1],He=(0,c.useState)(null),ze=He[0],Fe=He[1],qe=(0,c.useState)({}),Ue=qe[0],Re=qe[1],We=(0,c.useState)(null),Be=We[0],Ke=We[1],Ye=(0,c.useState)(null),Je=Ye[0],Ge=Ye[1],Ve=(0,c.useState)(!1),Xe=Ve[0],Qe=Ve[1],$e=(0,c.useState)(null),en=$e[0],nn=$e[1],tn=xe.ZP.client_pages.detail("pipeline_schedule:create",{"pipeline_schedules[]":[Y],"pipelines[]":[K]},{},{key:"Triggers/Edit/".concat(K,"/").concat(Y),pauseFetch:!K||!Y}).data,rn=((0,c.useMemo)((function(){return null===tn||void 0===tn?void 0:tn.client_page}),[tn]),(0,c.useState)(ke[0].uuid)),on=rn[0],ln=rn[1],un=(0,c.useMemo)((function(){var e;return!(null===L||void 0===L||null===(e=L.features)||void 0===e||!e[ue.d.INTERACTIONS])}),[null===L||void 0===L?void 0:L.features]),cn=(0,c.useMemo)((function(){return!Y&&n}),[n,Y]),sn=xe.ZP.pipeline_interactions.detail(un&&K,{filter_for_permissions:1}).data,an=xe.ZP.interactions.pipeline_interactions.list(un&&K).data,dn=(0,c.useMemo)((function(){return(null===sn||void 0===sn?void 0:sn.pipeline_interaction)||{}}),[sn]),pn=(0,c.useMemo)((function(){return(null===an||void 0===an?void 0:an.interactions)||[]}),[an]),fn=(0,c.useMemo)((function(){var e;return un&&(null===(e=Object.keys((null===dn||void 0===dn?void 0:dn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[un,dn]),hn=(0,c.useMemo)((function(){return!!Y&&fn}),[fn,Y]),vn=(0,c.useMemo)((function(){var e,n={};return null===dn||void 0===dn||null===(e=dn.permissions)||void 0===e||e.forEach((function(e){var t=e.triggers;null===t||void 0===t||t.forEach((function(e){var t=e.schedule_interval,i=e.schedule_type;null!==n&&void 0!==n&&n[i]||(n[i]={}),t&&(n[i][t]=!0)}))})),n}),[dn]),mn=(0,c.useMemo)((function(){return(0,Te.wx)(T,(function(e){return e.uuid===le.C}))}),[T]),jn=(0,c.useMemo)((function(){return Be||{}}),[Be]),gn=jn.description,xn=jn.name,Zn=jn.schedule_interval,bn=jn.schedule_type,yn=jn.settings,Pn=void 0===yn?{}:yn,On=jn.start_time,_n=jn.tags,wn=jn.variables,In=void 0===wn?{}:wn;(0,c.useEffect)((function(){!ze&&Pn&&Fe(Pn)}),[ze,Pn]);var kn=(0,c.useState)(null),Sn=kn[0],Cn=kn[1],Tn=(0,c.useState)({hour:"00",minute:"00"}),En=Tn[0],Mn=Tn[1],Dn=(0,c.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),Nn=Dn[0],An=Dn[1],Ln=xe.ZP.event_rules.detail(re.Xm.EVENT===bn?"aws":null).data,Hn=(0,c.useMemo)((function(){var e;return(null===Ln||void 0===Ln||null===(e=Ln.event_rule)||void 0===e?void 0:e.rules)||[]}),[Ln]),zn=(0,c.useMemo)((function(){return(0,N.HK)(Hn,(function(e){return e.name}))}),[Hn]),Fn=(0,h.Db)(xe.ZP.pipeline_schedules.useUpdate(Y),{onSuccess:function(e){return(0,Me.wD)(e,{callback:function(){null===l||void 0===l||l(),W.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(K,"/triggers/").concat(Y))},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),qn=(0,o.Z)(Fn,2),Un=qn[0],Rn=qn[1].isLoading,Wn=(0,c.useMemo)((function(){return In||{}}),[In]);(0,c.useEffect)((function(){if(On){var e=(0,Ce.a)(On,{localTimezone:B});Cn(null===e||void 0===e?void 0:e.date),Mn(null===e||void 0===e?void 0:e.time);var n=p()(On).utc();An({dayOfMonth:n.date(),dayOfWeek:n.day(),hour:n.hours(),minute:n.minutes(),second:n.seconds()})}else{var t=new Date;Cn(t),Mn(B?{hour:(0,De.lJ)(String(t.getHours())),minute:(0,De.lJ)(String(t.getMinutes()))}:{hour:(0,De.lJ)(String(t.getUTCHours())),minute:(0,De.lJ)(String(t.getUTCMinutes()))})}}),[B,On]),(0,c.useEffect)((function(){Wn&&Object.keys(Wn).length>0&&ee(!0)}),[Wn]),(0,c.useEffect)((function(){Re($?null===mn||void 0===mn?void 0:mn.reduce((function(e,n){var t=n.uuid,i=n.value;return Ae(Ae({},e),{},(0,r.Z)({},t,Wn[t]||i))}),{}):null)}),[mn,$,Wn]);var Bn=(0,c.useMemo)((function(){return(0,ve._U)(Zn)}),[Zn]),Kn=(0,c.useMemo)((function(){return Bn&&en?a().toString(en,{throwExceptionOnParseError:!1}):""}),[en,Bn]),Yn=(0,c.useMemo)((function(){return null===Kn||void 0===Kn?void 0:Kn.toLowerCase().includes("error")}),[Kn]);(0,c.useEffect)((function(){if(P&&!Be){if(X(P.event_matchers),(0,ve._U)(null===P||void 0===P?void 0:P.schedule_interval)){var e=B?(0,ve.lO)(null===P||void 0===P?void 0:P.schedule_interval):null===P||void 0===P?void 0:P.schedule_interval;nn(e),Ke(Ae(Ae({},P),{},{schedule_interval:"custom"}))}else Ke(J?Ae(Ae({},P),{},{schedule_interval:re.U5.ONCE}):P);var n=P.sla;if(n){pe(!0);var t=(0,ve.gU)(n),i=t.time,r=t.unit;Ke((function(e){return Ae(Ae({},e),{},{slaAmount:i,slaUnit:r})}))}}}),[B,J,P,Be,Zn]);var Jn=(0,c.useMemo)((function(){return!(null===ze||void 0===ze||!ze.landing_time_enabled)}),[ze]),Gn=(0,c.useMemo)((function(){return re.Xm.TIME!==bn||![re.U5.DAILY,re.U5.HOURLY,re.U5.MONTHLY,re.U5.WEEKLY].includes(Zn)}),[Zn,bn]),Vn=(0,c.useMemo)((function(){return Jn&&!Gn}),[Gn,Jn]),Xn=(0,c.useCallback)((function(){var e=Ae(Ae({},(0,Ee.GL)(Be,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Te.e7)(Ue)});if(Vn){var n=Nn.dayOfMonth,t=Nn.dayOfWeek,i=Nn.hour,r=Nn.minute,o=Nn.second,l=p()("2023-07-01").utc();(0,he.HW)(n)&&(l=l.date(n)),(0,he.HW)(t)&&(l=l.day(t)),(0,he.HW)(i)&&(l=l.hours(i)),(0,he.HW)(r)&&(l=l.minutes(r)),(0,he.HW)(o)&&(l=l.seconds(o)),e.schedule_interval=Bn?en:Be.schedule_interval,e.start_time=l.toISOString()}else re.Xm.EVENT===Be.schedule_type?e.event_matchers=V:(e.schedule_interval=Bn?B&&!Yn&&en?(0,ve.lO)(en,!0):en:Be.schedule_interval,e.start_time=Sn&&null!==En&&void 0!==En&&En.hour&&null!==En&&void 0!==En&&En.minute?(0,ve.XM)(Sn,En,{convertToUtc:B,includeSeconds:!0,localTimezone:B}):null);if(de){var u=null===Be||void 0===Be?void 0:Be.slaAmount,c=null===Be||void 0===Be?void 0:Be.slaUnit;if(!u||isNaN(u)||!c)return void f.Am.error("Please enter a valid SLA",{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,ve.vJ)(u,c)}else null!==P&&void 0!==P&&P.sla&&(e.sla=0);e.settings=ze,Un({pipeline_schedule:Ae(Ae({},e),{},{variables:Je||(null===e||void 0===e?void 0:e.variables)})})}),[Yn,en,Sn,B,de,V,Bn,Nn,P,Ue,Be,ze,Vn,En,Un,Je]),Qn=(0,c.useMemo)((function(){if(null===P||void 0===P||!P.runtime_average)return"Trigger doesn\u2019t have enough history to estimate runtime.";var e=Number(null===P||void 0===P?void 0:P.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),i=Math.max(Math.floor(e-(60*n*60+60*t)),0),r=[];return n>=1&&r.push((0,he._6)("hour",n,!0)),t>=1&&r.push((0,he._6)("minute",t,!0)),i>=1&&r.push((0,he._6)("second",i,!0)),r.join(" ")}),[P]),$n=(0,c.useMemo)((function(){if(!Vn)return null;var e=[(0,A.jsxs)(I.Z,{mr:1,children:[(0,A.jsx)(I.Z,{mb:1,children:(0,A.jsx)(S.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,A.jsxs)(ce.Z,{compact:!0,monospace:!0,onChange:function(e){An((function(n){return Ae(Ae({},n),{},{minute:e.target.value})}))},value:(null===Nn||void 0===Nn?void 0:Nn.minute)||"",children:[(0,A.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,A.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,A.jsxs)(I.Z,{mr:1,children:[(0,A.jsx)(I.Z,{mb:1,children:(0,A.jsx)(S.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,A.jsxs)(ce.Z,{compact:!0,monospace:!0,onChange:function(e){An((function(n){return Ae(Ae({},n),{},{second:e.target.value})}))},value:(null===Nn||void 0===Nn?void 0:Nn.second)||"",children:[(0,A.jsx)("option",{value:""}),(0,N.w6)(60).map((function(e,n){return(0,A.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[re.U5.DAILY,re.U5.MONTHLY,re.U5.WEEKLY].includes(Zn)&&e.unshift((0,A.jsxs)(I.Z,{mr:1,children:[(0,A.jsx)(I.Z,{mb:1,children:(0,A.jsx)(S.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,A.jsxs)(ce.Z,{compact:!0,monospace:!0,onChange:function(e){An((function(n){return Ae(Ae({},n),{},{hour:e.target.value})}))},value:(null===Nn||void 0===Nn?void 0:Nn.hour)||"",children:[(0,A.jsx)("option",{value:""}),(0,N.w6)(24).map((function(e,n){return(0,A.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),re.U5.WEEKLY===Zn?e.unshift((0,A.jsxs)(I.Z,{mr:1,children:[(0,A.jsx)(I.Z,{mb:1,children:(0,A.jsx)(S.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,A.jsxs)(ce.Z,{compact:!0,monospace:!0,onChange:function(e){An((function(n){return Ae(Ae({},n),{},{dayOfWeek:e.target.value})}))},value:(null===Nn||void 0===Nn?void 0:Nn.dayOfWeek)||"",children:[(0,A.jsx)("option",{value:""}),(0,A.jsx)("option",{value:6,children:"Sunday"}),(0,A.jsx)("option",{value:0,children:"Monday"}),(0,A.jsx)("option",{value:1,children:"Tuesday"}),(0,A.jsx)("option",{value:2,children:"Wednesday"}),(0,A.jsx)("option",{value:3,children:"Thursday"}),(0,A.jsx)("option",{value:4,children:"Friday"}),(0,A.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):re.U5.MONTHLY===Zn&&e.unshift((0,A.jsxs)(I.Z,{mr:1,children:[(0,A.jsx)(I.Z,{mb:1,children:(0,A.jsx)(S.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,A.jsxs)(ce.Z,{compact:!0,monospace:!0,onChange:function(e){An((function(n){return Ae(Ae({},n),{},{dayOfMonth:e.target.value})}))},value:(null===Nn||void 0===Nn?void 0:Nn.dayOfMonth)||"",children:[(0,A.jsx)("option",{value:""}),(0,N.w6)(31).map((function(e,n){return(0,A.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,A.jsx)(_.ZP,{children:e})}),[Nn,Zn,Vn]),et=(0,c.useMemo)((function(){return[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.KJ,{default:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,A.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Ke((function(n){return Ae(Ae({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:xn},"trigger_name_input")]}),[xn]),nt=(0,c.useMemo)((function(){return[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.KJ,{default:!0}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,A.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Ke((function(n){return Ae(Ae({},n),{},{description:e.target.value})}))},placeholder:"Description",value:gn},"trigger_description_input")]}),[gn]),tt=(0,c.useMemo)((function(){var e=[et,nt,[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.Pf,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,A.jsxs)("div",{children:[(0,A.jsxs)(ce.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;Ke((function(e){return Ae(Ae({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Zn,children:[Object.values(re.U5).reduce((function(e,n){var t;return!cn||null!==vn&&void 0!==vn&&null!==(t=vn[re.Xm.TIME])&&void 0!==t&&t[n]?e.concat((0,A.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!cn&&(0,A.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!cn&&(0,A.jsx)(I.Z,{mt:1,p:1,children:(0,A.jsxs)(S.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,A.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return cn||e.push([(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.rs,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Enable landing time"})]},"frequency"),(0,A.jsxs)("div",{children:[(0,A.jsx)(ae.Z,{checked:Jn,disabled:Gn,onCheck:function(){Fe((function(e){return Ae(Ae({},e),{},{landing_time_enabled:!Jn})}))}}),(0,A.jsxs)(I.Z,{mt:1,p:1,children:[Gn&&(0,A.jsxs)(S.ZP,{muted:!0,small:!0,children:["In order to enable landing time, the trigger\u2019s frequency must be ",(0,A.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:re.U5.HOURLY}),", ",(0,A.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:re.U5.DAILY}),", ",(0,A.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:re.U5.WEEKLY}),", or ",(0,A.jsx)(S.ZP,{inline:!0,monospace:!0,small:!0,children:re.U5.MONTHLY}),"."]}),!Gn&&(0,A.jsx)(S.ZP,{muted:!0,small:!0,children:"Instead of starting at a specific time, this trigger will schedule pipeline runs at a time where it will finish by the specified time below."})]})]},"frequency_input")]),Vn&&e.push([(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.Pf,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,A.jsx)(_.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*M.iI,"px")},children:(0,A.jsx)(S.ZP,{monospace:!0,children:Qn})},"runtime_average_value")]),e.push([(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.aw,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsxs)(S.ZP,{default:!0,children:[Vn&&"Pipeline complete by",!Vn&&"Start date and time"]})]},"start_time"),Vn?$n:(0,A.jsxs)("div",{style:{minHeight:"".concat(5.75*M.iI,"px")},children:[!Xe&&(0,A.jsx)(C.Z,{monospace:!0,onClick:function(){return Qe((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Sn?(0,ve.XM)(Sn,En,{localTimezone:B}):""}),(0,A.jsx)("div",{style:{width:"400px"},children:(0,A.jsx)(Z.Z,{disableEscape:!0,onClickOutside:function(){return Qe(!1)},open:Xe,style:{position:"relative"},children:(0,A.jsx)(g.Z,{localTime:B,selectedDate:Sn,selectedTime:En,setSelectedDate:Cn,setSelectedTime:Mn,topPosition:!0})})})]},"start_time_input")]),J&&e.splice(2,2),Bn&&e.splice(2,0,[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.EK,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,A.jsxs)("div",{children:[(0,A.jsx)(C.Z,{monospace:!0,onChange:function(e){e.preventDefault(),nn(e.target.value)},placeholder:"* * * * *",value:en}),(0,A.jsxs)(I.Z,{mt:1,p:1,children:[(0,A.jsx)(S.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,A.jsx)(I.Z,{mb:"2px"}),en?(0,A.jsx)(S.ZP,{danger:Yn,muted:!0,small:!0,children:Yn?"Invalid cron expression. Please check the cron syntax.":(0,A.jsxs)(A.Fragment,{children:['"',Kn,'"']})}):null,B&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(S.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note:\xa0"}),(0,A.jsxs)(S.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,A.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,A.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{mb:2,px:M.cd,children:(0,A.jsx)(w.Z,{children:"Settings"})}),(0,A.jsx)(q.Z,{light:!0,short:!0}),(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[Yn,en,Sn,B,cn,Bn,J,Gn,Jn,$n,vn,Kn,Qn,Zn,Xe,Vn,En,et,nt]),it=(0,c.useCallback)((function(e,n){X((function(t){return Object.entries(n).forEach((function(n){var i=(0,o.Z)(n,2),r=i[0],l=i[1];t[e][r]=l})),(0,i.Z)(t)}))}),[X]),rt=(0,c.useMemo)((function(){return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{mb:M.cd,px:M.cd,children:(0,A.jsx)(w.Z,{children:"Settings"})}),(0,A.jsx)(q.Z,{light:!0,short:!0}),(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:[et,nt]}),(0,A.jsxs)(I.Z,{mb:2,mt:5,px:M.cd,children:[(0,A.jsx)(w.Z,{children:"Events"}),(0,A.jsxs)(S.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,A.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,A.jsxs)(I.Z,{mt:M.Mq,children:[(0,A.jsx)(S.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,A.jsxs)(S.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,A.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,A.jsx)(R.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,A.jsx)(I.Z,{mt:1,children:(0,A.jsxs)(te,{monospace:!0,ordered:!0,children:[(0,A.jsx)(S.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,A.jsx)(S.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,A.jsx)(S.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,A.jsx)(q.Z,{light:!0,short:!0}),(null===V||void 0===V?void 0:V.length)>=1&&(0,A.jsx)(k.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===V||void 0===V?void 0:V.map((function(e,n){var t=e.event_type,i=e.name,r=e.pattern,o=e.id||"".concat(t,"-").concat(i,"-").concat(n,"-").concat(JSON.stringify(r)),l=[];return r&&JSON.stringify(r,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,A.jsx)(ce.Z,{monospace:!0,onChange:function(e){return it(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:F.S5.map((function(e){var n=e.label,t=e.uuid;return(0,A.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,A.jsx)(ce.Z,{monospace:!0,onChange:function(e){var t,i=e.target.value,r=null===(t=zn[i])||void 0===t?void 0:t.event_pattern;it(n,{name:i,pattern:r?JSON.parse(r):null})},placeholder:"Event name",value:i,children:Hn.map((function(e){var n=e.name;return(0,A.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),r&&(0,A.jsx)(b.Z,{language:"json",small:!0,source:l.join("\n")}),(0,A.jsx)(m.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return X((function(e){return(0,N.oM)(e,n)}))},children:(0,A.jsx)(fe.rF,{default:!0,size:2*M.iI})},"remove_event")]}))}),(0,A.jsx)(I.Z,{p:M.cd,children:(0,A.jsx)(m.ZP,{beforeIcon:(0,A.jsx)(fe.mm,{size:2*M.iI}),onClick:function(){return X((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[V,Hn,zn,et,nt,it]),ot=(0,c.useMemo)((function(){var e=(0,ve.M8)(P,Ne);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{mb:M.cd,px:M.cd,children:(0,A.jsx)(w.Z,{children:"Settings"})}),(0,A.jsx)(q.Z,{light:!0,short:!0}),(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:[et,nt]}),(0,A.jsxs)(I.Z,{mb:2,mt:5,px:M.cd,children:[(0,A.jsx)(w.Z,{children:"Endpoint"}),(0,A.jsxs)(S.ZP,{muted:!0,children:["Make a ",(0,A.jsx)(S.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(y.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(I.Z,{mr:1,children:(0,A.jsx)(ae.Z,{checked:Ne,onCheck:function(){return Le(!Ne)}})}),(0,A.jsx)(S.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),Ne&&(0,A.jsxs)(I.Z,{mb:2,mt:5,px:M.cd,children:[(0,A.jsx)(w.Z,{children:"Headers"}),(0,A.jsx)(S.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(y.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n "),withCopyIcon:!0,children:(0,A.jsx)(b.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null===P||void 0===P?void 0:P.token,"\n ")})})})]}),(0,A.jsxs)(I.Z,{mb:2,mt:5,px:M.cd,children:[(0,A.jsx)(w.Z,{children:"Payload"}),(0,A.jsx)(S.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(y.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,A.jsx)(b.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,A.jsxs)(I.Z,{mb:2,mt:5,px:M.cd,children:[(0,A.jsx)(w.Z,{children:"Sample cURL command"}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(b.Z,{language:"bash",small:!0,source:Ne?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null===P||void 0===P?void 0:P.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[P,Le,nt,et,Ne]),lt=!bn||re.Xm.TIME===bn&&!(J&&Sn||!J&&Sn&&Zn)||re.Xm.EVENT===bn&&(!(null!==V&&void 0!==V&&V.length)||!V.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),ut=(0,c.useMemo)((function(){var e;return(null===d||void 0===d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return be.tf.DBT===n})))||[]}),[d]),ct=(0,c.useMemo)((function(){return(0,A.jsxs)(I.Z,{p:M.cd,children:[(0,A.jsxs)(I.Z,{mb:M.HN,children:[(0,A.jsx)(w.Z,{children:"Run settings"}),(0,A.jsxs)(I.Z,{mt:M.Mq,children:[!J&&(0,A.jsxs)(I.Z,{mb:M.Mq,children:[(0,A.jsx)(S.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,A.jsx)(I.Z,{mb:1}),(0,A.jsx)(C.Z,{label:"Timeout (in seconds)",onChange:function(e){return Fe((function(n){return Ae(Ae({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null===ze||void 0===ze?void 0:ze.timeout})]}),(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(I.Z,{mr:2,children:(0,A.jsx)(ae.Z,{checked:de,onCheck:function(e){pe(e),e||Ke((function(e){return Ae(Ae({},e),{},{slaAmount:0})}))}})}),(0,A.jsx)(S.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),de&&(0,A.jsx)(k.Z,{columnFlex:[null,1],rows:[[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(fe.aw,{default:!0,size:1.5*M.iI}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,A.jsxs)(_.ZP,{children:[(0,A.jsx)(U.Z,{flex:1,children:(0,A.jsx)(C.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Ke((function(n){return Ae(Ae({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===Be||void 0===Be?void 0:Be.slaAmount})}),(0,A.jsx)(U.Z,{flex:1,children:(0,A.jsx)(ce.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),Ke((function(n){return Ae(Ae({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===Be||void 0===Be?void 0:Be.slaUnit,children:Object.keys(ve.tL).map((function(e){return(0,A.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(_.ZP,{alignItems:"center",children:(0,A.jsx)(x.Z,{checked:null===ze||void 0===ze?void 0:ze.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Fe((function(e){return Ae(Ae({},e),{},{allow_blocks_to_fail:!(null!==ze&&void 0!==ze&&ze.allow_blocks_to_fail)})}))}})})}),re.Xm.TIME===bn&&(0,A.jsx)(I.Z,{mt:M.Mq,children:(0,A.jsx)(_.ZP,{alignItems:"center",children:(0,A.jsx)(x.Z,{checked:null===ze||void 0===ze?void 0:ze.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Fe((function(e){return Ae(Ae({},e),{},{skip_if_previous_running:!(null!==ze&&void 0!==ze&&ze.skip_if_previous_running)})}))}})})})]}),(0,A.jsxs)(I.Z,{mb:M.HN,children:[(0,A.jsx)(w.Z,{children:"Runtime variables"}),(0,Ee.Qr)(mn)&&(0,A.jsxs)(I.Z,{mt:1,children:[(0,A.jsx)(S.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,A.jsx)(u(),{as:"/pipelines/".concat(K,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,A.jsx)(R.Z,{primary:!0,children:"Click here"})})," ",(0,A.jsx)(S.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]}),(0,A.jsxs)(I.Z,{mt:M.Mq,children:[(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(I.Z,{mr:2,children:(0,A.jsx)(ae.Z,{checked:$,disabled:(0,Ee.Qr)(mn),onCheck:ee})}),(0,A.jsx)(S.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),$&&Ue&&Object.entries(Ue).length>0&&(0,A.jsx)(I.Z,{mt:1,children:(0,A.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(Ue).reduce((function(e,n){var t=(0,o.Z)(n,2),i=t[0],l=t[1];return Pe.sZ===i?e:e.concat([[(0,A.jsx)(S.ZP,{default:!0,monospace:!0,children:i},"variable_".concat(i)),(0,A.jsx)(C.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),Re((function(n){return Ae(Ae({},n),{},(0,r.Z)({},i,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:l},"variable_uuid_input_".concat(i))]])}),[])})})]})]}),(null===ut||void 0===ut?void 0:ut.length)>=1&&(0,A.jsx)(I.Z,{mb:M.HN,children:(0,A.jsx)(z,{blocks:ut,updateVariables:Re,variables:Ae(Ae({},Wn),Ue)})})]})}),[ut,de,mn,J,$,K,Ue,Be,bn,Wn,pe,ee,Re,ze]),st=xe.ZP.tags.list().data,at=(0,c.useMemo)((function(){return((null===st||void 0===st?void 0:st.tags)||[]).filter((function(e){var n=e.uuid;return!(null!==_n&&void 0!==_n&&_n.includes(n))}))}),[st,_n]),dt=(0,c.useMemo)((function(){return(0,ve.ri)(J)}),[J]),pt=(0,c.useMemo)((function(){return(0,A.jsx)(ge,{containerRef:H,date:Sn,interactions:pn,pipeline:d,pipelineInteraction:dn,pipelineSchedule:Be,setVariables:function(e){Ke((function(n){var t=Ae({},e((null===n||void 0===n?void 0:n.variables)||{})),i=Ae({},t);return null===pn||void 0===pn||pn.forEach((function(e){Object.entries((null===e||void 0===e?void 0:e.variables)||{}).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1].types;i&&t in i&&(i[t]=(0,Se.M)(i[t],r))}))})),Ge(i),Ae(Ae({},n),{},{variables:t})}))},showSummary:Ie.uuid===on,time:En,triggerTypes:dt,variables:null===Be||void 0===Be?void 0:Be.variables})}),[H,Sn,pn,d,dn,Be,on,Ke,Ge,En,dt]),ft=(0,c.useMemo)((function(){return re.fq.ACTIVE===(null===Be||void 0===Be?void 0:Be.status)}),[Be]),ht=E?null===E||void 0===E?void 0:E((function(e){return W.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===d||void 0===d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],vt=(0,o.Z)(ht,2),mt=vt[0],jt=vt[1].isLoading,gt=(0,c.useCallback)((function(){null===mt||void 0===mt||mt({pipeline_schedule:Ae(Ae({},Be),{},{variables:Je||(null===Be||void 0===Be?void 0:Be.variables)})})}),[mt,Je,Be]),xt=(0,c.useMemo)((function(){var e,n;return Y?(e=(0,A.jsx)(m.ZP,{linkProps:{as:"/pipelines/".concat(K,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,A.jsx)(m.ZP,{onClick:Xn,primary:!0,children:"Save trigger"})):we.uuid===on?(e=(0,A.jsx)(m.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"}),n=(0,A.jsx)(m.ZP,{afterIcon:(0,A.jsx)(fe.Kw,{}),onClick:function(){return ln(_e.uuid)},primary:!0,children:"Next: Customize"})):_e.uuid===on?(e=(0,A.jsx)(m.ZP,{beforeIcon:(0,A.jsx)(fe.Hd,{}),onClick:function(){return ln(we.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,A.jsx)(m.ZP,{afterIcon:(0,A.jsx)(fe.Kw,{}),onClick:function(){return ln(Ie.uuid)},primary:!0,children:"Next: Review"})):Ie.uuid===on&&(e=(0,A.jsx)(m.ZP,{beforeIcon:(0,A.jsx)(fe.Hd,{}),onClick:function(){return ln(_e.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(m.ZP,{beforeIcon:(0,A.jsx)(fe.Bf,{}),loading:jt,onClick:function(){return gt()},primary:!0,children:Y?"Save trigger":"Create trigger"}),!Y&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{mr:M.cd}),(0,A.jsx)(ae.Z,{checked:ft,compact:!0,onCheck:function(e){return Ke((function(n){return Ae(Ae({},n),{},{status:e(ft)?re.fq.ACTIVE:re.fq.INACTIVE})}))}}),(0,A.jsx)(I.Z,{mr:1}),(0,A.jsx)(S.ZP,{default:ft,muted:!ft,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,A.jsx)(I.Z,{p:M.cd,children:(0,A.jsxs)(_.ZP,{alignItems:"center",children:[e,e&&n&&(0,A.jsx)(I.Z,{mr:M.cd}),n]})})}),[gt,jt,ft,s,Xn,Y,K,on,ln]),Zt=(0,c.useMemo)((function(){var e,n,t,i,r,o,l;return"undefined"===typeof(null===d||void 0===d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===L||void 0===L||null===(t=L.pipelines)||void 0===t||null===(i=t.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically:null===d||void 0===d||null===(o=d.settings)||void 0===o||null===(l=o.triggers)||void 0===l?void 0:l.save_in_code_automatically}),[d,L]);return(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(ie.Z,{after:!cn&&ct,afterHidden:cn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(K,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===P||void 0===P?void 0:P.name},linkProps:{as:"/pipelines/".concat(K,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:t,pageName:Oe.M.TRIGGERS,pipeline:d,setErrors:O,subheader:cn||hn?(0,A.jsx)(I.Z,{px:M.cd,children:(0,A.jsx)(j.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return ln(n)},regularSizeText:!0,selectedTabUUID:on,tabs:ke,underlineColor:(0,D.qn)(be.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(m.ZP,{disabled:lt,loading:Rn,onClick:Xn,outline:!0,primary:!0,children:"Save changes"}),(0,A.jsx)(I.Z,{mr:M.cd}),(0,A.jsx)(m.ZP,{linkProps:{as:"/pipelines/".concat(K,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),Zt&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(I.Z,{mr:M.cd}),(0,A.jsxs)(S.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,A.jsx)("br",{}),"To change this behavior, update the ",(0,A.jsx)(u(),{as:"/pipelines/".concat(K,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,A.jsx)(R.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline\u2019s settings"})})," or ",(0,A.jsx)(u(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,A.jsx)(R.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:cn||hn,title:function(){return null!==P&&void 0!==P&&P.name?"Edit ".concat(null===P||void 0===P?void 0:P.name):"New trigger"},uuid:"triggers/edit",children:(0,A.jsxs)("div",{ref:H,children:[(cn||hn)&&(0,A.jsx)(q.Z,{light:!0}),(cn||hn)&&(_e.uuid===on||Ie.uuid===on)&&pt,(!cn||we.uuid===on)&&(!hn||we.uuid===on)&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(I.Z,{p:M.cd,children:[(0,A.jsxs)(I.Z,{mb:2,children:[(0,A.jsx)(w.Z,{children:"Trigger type"}),(0,A.jsx)(S.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,A.jsx)(_.ZP,{children:dt.reduce((function(e,n){var t=n.label,i=n.description,r=n.uuid,o=bn===r,l=bn&&!o;return!cn||null!==vn&&void 0!==vn&&vn[r]?e.concat((0,A.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){re.Xm.EVENT!==r||null!==V&&void 0!==V&&V.length||X([{}]),Ke((function(e){return Ae(Ae({},e),{},{schedule_type:r})}))},children:(0,A.jsx)(ye.U,{selected:o,children:(0,A.jsxs)(_.ZP,{alignItems:"center",children:[(0,A.jsx)(U.Z,{children:(0,A.jsx)("input",{checked:o,type:"radio"})}),(0,A.jsx)(I.Z,{mr:M.cd}),(0,A.jsxs)(U.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,A.jsx)(w.Z,{bold:!0,default:!o&&!l,level:5,muted:!o&&l,children:t()}),(0,A.jsx)(S.ZP,{default:!o&&!l,leftAligned:!0,muted:l,children:i()})]})]})})},r)):e}),[])})]}),(0,A.jsxs)(I.Z,{mt:M.HN,children:[re.Xm.TIME===bn&&tt,re.Xm.EVENT===bn&&rt,re.Xm.API===bn&&ot]}),!cn&&(0,A.jsxs)(I.Z,{mt:M.HN,px:M.cd,children:[(0,A.jsxs)(I.Z,{mb:2,children:[(0,A.jsx)(w.Z,{children:"Tags"}),(0,A.jsx)(S.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,A.jsx)(se.Z,{removeTag:function(e){Ke((function(n){return Ae(Ae({},n),{},{tags:null===_n||void 0===_n?void 0:_n.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){Ke((function(n){return Ae(Ae({},n),{},{tags:(0,N.$C)(e.uuid,_n,(function(n){return n===e.uuid}))})}))},selectedTags:null===_n||void 0===_n?void 0:_n.map((function(e){return{uuid:e}})),tags:at,uuid:"TagsAutocompleteInputField-trigger-".concat(Y)})]})]}),(cn||hn)&&xt]})})})}},55072:function(e,n,t){t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var i=t(71180),r=t(55485),o=t(38276),l=t(31748),u=t(72473),c=t(79633),s=t(70515),a=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],h=t;if(h>p)f=Array.from({length:p},(function(e,n){return n}));else{var v=Math.floor(h/2),m=n-v;n+v>=p?(m=p-h+2,h-=2):n-v<=0?(m=0,h-=2):(h-=4,m=n-Math.floor(h/2)),f=Array.from({length:h},(function(e,n){return n+m}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(r.ZP,{alignItems:"center",children:[(0,a.jsx)(i.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(u.Hd,{size:1.5*s.iI,stroke:l.Av})}),!f.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(i.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(i.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(i.ZP,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!f.includes(p-2)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(i.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(i.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(o.Z,{ml:1}),(0,a.jsx)(i.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(u.Kw,{size:1.5*s.iI,stroke:l.Av})})]})})}},97196:function(e,n,t){t.d(n,{S5:function(){return o},_P:function(){return l}});var i,r=t(86735);!function(e){e.AWS="aws_event"}(i||(i={}));var o=[{label:function(){return"AWS"},uuid:i.AWS}],l=(0,r.HK)(o,(function(e){return e.uuid}))},83784:function(e,n,t){t.d(n,{C:function(){return i}});var i="global"},14805:function(e,n,t){var i=t(82394),r=t(44495),o=t(55485),l=t(44085),u=t(38276),c=t(30160),s=t(88785),a=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?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}n.Z=function(e){var n=e.localTime,t=e.selectedDate,i=e.selectedTime,f=e.setSelectedDate,v=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(r.ZP,{onChange:f,value:t}),(0,p.jsx)(u.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsxs)(c.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(u.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===i||void 0===i?void 0:i.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(u.Z,{px:1,children:(0,p.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===i||void 0===i?void 0:i.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){t.d(n,{a:function(){return o}});var i=t(16488),r=t(3917);function o(e,n){var t,o;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,r.n$)(e),o={hour:(0,r.lJ)(String(t.getHours())),minute:(0,r.lJ)(String(t.getMinutes()))};else{var l=e.split(" ")[1];t=(0,i.eI)(e),o={hour:l.substring(0,2),minute:l.substring(3,5)}}return{date:t,time:o}}},9134:function(e,n,t){var i=t(82684),r=t(21124),o=t(68432),l=t(38626),u=t(65292),c=t(44897),s=t(95363),a=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,v=e.wrapLines,m=(0,i.useContext)(l.ThemeContext);function j(e){var i=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(m.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(m.content||c.Z.content).muted},showLineNumbers:p,style:u._4,useInlineStyles:!0,wrapLines:v,children:i})}return(0,d.jsx)(r.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(j,{value:n})}},children:h})}},39457:function(e,n,t){var i,r=t(82394),o=(t(82684),t(64866)),l=t(21764),u=t(55485),c=t(48670),s=t(38276),a=t(30160),d=t(12468),p=t(72473),f=t(70515),h=t(28598);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(i||(i={})),n.Z=function(e){var n,t=e.children,r=e.copiedText,v=e.iconPosition,j=void 0===v?i.LEFT:v,g=e.inverted,x=e.linkProps,Z=e.linkText,b=e.monospace,y=e.muted,P=e.small,O=e.toastMessage,_=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):_&&(n=(0,h.jsx)(c.Z,m(m({href:"#",inline:!0,muted:y,preventDefault:!0,sameColorAsText:!0,small:P},x),{},{children:(0,h.jsxs)(u.ZP,{alignItems:"center",children:[j===i.LEFT&&(0,h.jsx)(s.Z,{mr:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y,size:2*f.iI})})}),Z&&(0,h.jsx)(a.ZP,{inverted:g,monospace:b,muted:y,small:P,children:Z}),j===i.RIGHT&&(0,h.jsx)(s.Z,{ml:Z?1:0,children:(0,h.jsx)(u.ZP,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:g,muted:y})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(O||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:r})},text:r,children:n})})}},22286:function(e,n,t){t.d(n,{M:function(){return a}});var i=t(82394),r=t(75582),o=t(54193),l=t(81728),u=t(42122);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){var t,c;if(!n||null===n||void 0===n||!n.length)return e;if(null!==n&&void 0!==n&&n.includes(o.zj.LIST))return((0,u.Kn)(e)?Object.keys(e||{}):[e]).map((function(e){return a(e,null===n||void 0===n?void 0:n.filter((function(e){return o.zj.LIST!==e})))}));if(null!==n&&void 0!==n&&n.includes(o.zj.DICTIONARY)){var d=(0,u.Kn)(e)?e:(0,l.Pb)(e)?JSON.parse(e):e;if((0,u.Kn)(d))return Object.entries(d).reduce((function(e,t){var l=(0,r.Z)(t,2),u=l[0],c=l[1];return s(s({},e),{},(0,i.Z)({},u,a(c,null===n||void 0===n?void 0:n.filter((function(e){return o.zj.DICTIONARY!==e})))))}),{})}if(null!==n&&void 0!==n&&n.includes(o.zj.BOOLEAN)){var p,f;if("boolean"===typeof e)return e;if("true"===(null===(p=String(e))||void 0===p?void 0:p.toLowerCase()))return!0;if("false"===(null===(f=String(e))||void 0===f?void 0:f.toLowerCase()))return!1}return null!==n&&void 0!==n&&null!==(t=n.includes)&&void 0!==t&&t.call(n,o.zj.FLOAT)&&(0,l.HW)(e)?parseFloat(e):null!==n&&void 0!==n&&null!==(c=n.includes)&&void 0!==c&&c.call(n,o.zj.INTEGER)&&(0,l.HW)(e)?parseInt(e):e}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[722],{61709:function(n,o,e){e.d(o,{IT:function(){return w},J8:function(){return k},MS:function(){return g},Ts:function(){return b},YW:function(){return C},_o:function(){return m},eY:function(){return p},fA:function(){return h},h5:function(){return x},oI:function(){return y}});var i=e(82394),t=e(44425),l=e(48339),r=e(57653),u=e(82359),d=e(85385),c=e(81728),a=e(55283),s=e(15610);function v(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function f(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?v(Object(e),!0).forEach((function(o){(0,i.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var p=function(n,o){var e=(null===o||void 0===o?void 0:o.upstream_blocks)||[];return t.iZ.includes(null===n||void 0===n?void 0:n.type)||t.iZ.includes(null===o||void 0===o?void 0:o.type)||t.tf.DATA_LOADER===(null===o||void 0===o?void 0:o.type)&&t.tf.SENSOR!==n.type||e.push(n.uuid),e},h=function(n,o,e){var i=[];return(null===n||void 0===n?void 0:n.type)!==r.qL.STREAMING||t.iZ.includes(null===o||void 0===o?void 0:o.type)||t.iZ.includes(null===e||void 0===e?void 0:e.type)||(i=i.concat((null===o||void 0===o?void 0:o.downstream_blocks)||[])),i},b=function(n,o,e,i){for(var l,r=[],u=o.findIndex((function(o){return o.uuid===n.uuid}));!l&&u>=0;){var d;l=o[u-1],t.tf.SCRATCHPAD===(null===(d=l)||void 0===d?void 0:d.type)&&(l=null),u-=1}return l&&r.push(l.uuid),t.Ut.map((function(o){return{label:function(){return"Convert to ".concat((0,c.wX)(t.V4[o]))},onClick:function(){return i({converted_from_type:o,converted_from_uuid:n.uuid,type:o,upstream_blocks:r})},uuid:"".concat(e,"/convert_to/").concat(o)}}))},k=function(n,o,e,i,l,r){var c,a,v=n||{},p=v.configuration,h=v.downstream_blocks,b=v.has_callback,k=v.language,g=v.metadata,m=v.replicated_block,x=v.type,y=v.upstream_blocks,C=v.uuid,w=p||{},O=w.dynamic,S=w.reduce_output,j=t.tf.DBT===x,B=[],E=!(null===r||void 0===r||null===(c=r.project)||void 0===c||null===(a=c.features)||void 0===a||!a[u.d.INTERACTIONS]);if(t.tf.SCRATCHPAD!==x&&![t.tf.CALLBACK,t.tf.EXTENSION,t.tf.MARKDOWN].includes(x)){B.push.apply(B,[{label:function(){return j?"Execute and run all upstream blocks":"Execute with all upstream blocks"},onClick:function(){return o({block:n,runUpstream:!0})},uuid:"execute_upstream"},{label:function(){return j?"Execute and run incomplete upstream blocks":"Execute with incomplete upstream blocks"},onClick:function(){return o({block:n,runIncompleteUpstream:!0})},uuid:"execute_incomplete_upstream"}]),j||t.tf.GLOBAL_DATA_PRODUCT===x||B.push({label:function(){return"Execute block and run tests"},onClick:function(){return o({block:n,runTests:!0})},uuid:"run_tests"});var I,T,_,Z,D=r||{},P=D.addNewBlock,A=D.blocksMapping,R=D.fetchFileTree,N=D.fetchPipeline,L=D.savePipelineContent,M=D.updatePipeline,H=[];if(null===h||void 0===h||h.forEach((function(n){var o=null===A||void 0===A?void 0:A[n];o&&o.upstream_blocks.forEach((function(n){var o,e;null!==A&&void 0!==A&&null!==(o=A[n])&&void 0!==o&&null!==(e=o.configuration)&&void 0!==e&&e.dynamic&&H.push(A[n])}))})),j&&t.t6.SQL===k)B.unshift.apply(B,[{label:function(){return"Test model"},onClick:function(){return o({block:n,runSettings:{test_model:!0}})},tooltip:function(){return"Execute command dbt test."},uuid:"test_model"},{label:function(){return"Build model"},onClick:function(){return o({block:n,runSettings:{build_model:!0}})},tooltip:function(){return"Execute command dbt build."},uuid:"build_model"},{label:function(){return"Add upstream models"},onClick:function(){M({pipeline:{add_upstream_for_block_uuid:null===n||void 0===n?void 0:n.uuid}})},tooltip:function(){return"Add upstream models for this model to the pipeline."},uuid:"add_upstream_models"}]),null!==g&&void 0!==g&&null!==(I=g.dbt)&&void 0!==I&&null!==(T=I.block)&&void 0!==T&&T.snapshot||B.unshift.apply(B,[{label:function(){return"Run model"},onClick:function(){return o({block:n,runSettings:{run_model:!0}})},tooltip:function(){return"Execute command dbt run."},uuid:"run_model"}]),null!==g&&void 0!==g&&null!==(_=g.dbt)&&void 0!==_&&null!==(Z=_.block)&&void 0!==Z&&Z.snapshot&&B.unshift.apply(B,[{label:function(){return"Run snapshot"},onClick:function(){return o({block:n,runSettings:{run_model:!0}})},tooltip:function(){return"Execute command dbt snapshot."},uuid:"run_model"}]);if(j||t.tf.GLOBAL_DATA_PRODUCT===x||!L||!O&&0!==H.length||B.push({label:function(){return O?"Disable block as dynamic":"Set block as dynamic"},onClick:function(){return L({block:f(f({},n),{},{configuration:f(f({},p),{},{dynamic:!O})})})},uuid:"dynamic"}),A)(null===y||void 0===y?void 0:y.find((function(n){var o,e;return null===A||void 0===A||null===(o=A[n])||void 0===o||null===(e=o.configuration)||void 0===e?void 0:e.dynamic})))&&B.push({label:function(){return S?"Don\u2019t reduce output":"Reduce output"},onClick:function(){return L({block:f(f({},n),{},{configuration:f(f({},p),{},{reduce_output:!S})})})},uuid:"reduce_output"});B.push({label:function(){return b?"Remove callback":"Add callback"},onClick:function(){if(b)return L({block:f(f({},n),{},{has_callback:!b})}).then((function(){R(),N()}));(0,s.u7)({addon:d.cH.CALLBACKS,sideview:d.cH.ADDON_BLOCKS})},uuid:"has_callback"}),j||B.push({disabled:!!m,label:function(){return"Replicate block"},onClick:function(){return P({replicated_block:C})},uuid:"Replicate block"})}return E&&B.push({label:function(){return"Add / Edit interactions"},onClick:function(){var n;null===r||void 0===r||null===(n=r.openSidekickView)||void 0===n||n.call(r,d.cH.INTERACTIONS)},uuid:"Add interactions"}),B.push({label:function(){return"Delete block"},onClick:function(){e(n),i(!1)},uuid:"delete_block"}),l?[B.pop()]:B};function g(n){var o=n.tags,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],l=e.conditionFailed;return null===o||void 0===o||o.forEach((function(n){t.L8.DBT_SNAPSHOT===n?i.push({description:"This is a dbt snapshot file.",title:(0,c.vg)(t.L8.DBT_SNAPSHOT)}):t.L8.DYNAMIC===n?i.push({description:"This block will create N blocks for each of its downstream blocks.",title:(0,c.vg)(t.L8.DYNAMIC)}):t.L8.DYNAMIC_CHILD===n?i.push({description:"This block is dynamically created by its upstream parent block that is dynamic.",title:(0,c.vg)(t.L8.DYNAMIC_CHILD)}):t.L8.REDUCE_OUTPUT===n?i.push({description:"Reduce output from all dynamically created blocks into a single array output.",title:(0,c.vg)(t.L8.REDUCE_OUTPUT)}):t.L8.REPLICA===n?i.push({description:"This block is a replica of another block in the current pipeline.",title:(0,c.vg)(t.L8.REPLICA)}):t.L8.CONDITION===n?l?i.push({description:"This block condition evaluated as false.",title:"Condition unmet"}):i.push({description:"This block has a condition that will be run before its execution.",title:(0,c.vg)(t.L8.CONDITION)}):i.push({title:n})})),i}function m(n){var o=n.block,e=n.dynamic,i=n.dynamicUpstreamBlock,t=n.hasError,l=(n.reduceOutput,n.reduceOutputUpstreamBlock),r=n.selected,u=i&&!l;return{borderColorShareProps:{blockColor:null===o||void 0===o?void 0:o.color,blockType:null===o||void 0===o?void 0:o.type,dynamicBlock:e,dynamicChildBlock:u,hasError:t,selected:r},tags:g(o)}}function x(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o&&(null===o||void 0===o?void 0:o.length)>=0?o.map((function(n){return{data:n,execution_state:l.uF.IDLE,type:l.Gi.TEXT_PLAIN}})):n.filter((function(n){return null===n||void 0===n?void 0:n.type}))}function y(n){return{hasError:!!n.find((function(n){return n.error})),hasOutput:n.length>=1}}var C=function(){return Object.values(t.Lq).reduce((function(n,o){return f(f({},n),{},(0,i.Z)({},o,(0,a.qn)(t.tf.CUSTOM,{blockColor:o}).accent))}),{})};function w(n,o,e){var i=null===n||void 0===n?void 0:n.reduce((function(n,o){return o?n.concat(o):n}),[]),t=(null===i||void 0===i?void 0:i[(null===i||void 0===i?void 0:i.length)-1])||0;return(.25*Math.min(t,e)||0)/o}},47001:function(n,o,e){e.d(o,{Gi:function(){return c},Go:function(){return p},I5:function(){return f},Pq:function(){return s},RJ:function(){return a},YF:function(){return d},ZG:function(){return u},ze:function(){return v}});var i=e(38626),t=e(44897),l=e(42631),r=e(70515),u=3*r.iI,d=2,c=i.default.div.withConfig({displayName:"indexstyle__NodeContainerStyle",componentId:"sc-kc7274-0"})(["min-width:fit-content;"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(function(n){return!n.isDragging&&"\n &:hover {\n cursor: pointer;\n }\n "}),(function(n){return n.isDragging&&"\n cursor: grab;\n "}),(function(n){return!n.active&&(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border: ".concat(d,"px dotted ").concat((n.theme.content||t.Z.content).muted,";\n cursor: not-allowed;\n opacity: 0.5;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorBottom&&"\n border-bottom-color: ".concat(n.borderColorBottom,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorLeft&&"\n border-left-color: ".concat(n.borderColorLeft,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorRight&&"\n border-right-color: ".concat(n.borderColorRight,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorTop&&"\n border-top-color: ".concat(n.borderColorTop,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return n.selected&&!n.active&&n.backgroundGradient&&"\n background: ".concat(n.backgroundGradient,";\n padding: ").concat(d,"px;\n ")}),(function(n){return!n.borderDeemphasized&&"\n border-style: solid;\n "}),(function(n){return n.borderDeemphasized&&"\n border-style: double;\n "}),(function(n){return!n.borderRadiusLarge&&"\n border-radius: ".concat(l.n_,"px;\n ")}),(function(n){return n.borderRadiusLarge&&"\n border-radius: ".concat(l.Ro,"px;\n ")}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&"\n animation: border-dance ".concat(null!==n&&void 0!==n&&n.activeSlow?"2s":".5s"," infinite linear;\n background: linear-gradient(90deg, ").concat(n.borderColorTop||n.borderColorBottom||n.borderColorLeft||n.borderColorRight," 50%, transparent 50%),\n linear-gradient(90deg, ").concat(n.borderColorRight||n.borderColorTop||n.borderColorBottom||n.borderColorLeft," 50%, transparent 50%),\n linear-gradient(0deg, ").concat(n.borderColorLeft||n.borderColorRight||n.borderColorTop||n.borderColorBottom," 50%, transparent 50%),\n linear-gradient(0deg, ").concat(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop," 50%, transparent 50%);\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n padding: ").concat(d,"px;\n\n @keyframes border-dance {\n 0% {\n background-position: left top,\n right bottom,\n left bottom,\n right top;\n }\n 100% {\n background-position: left 15px top,\n right 15px bottom,\n left bottom 15px,\n right top 15px;\n }\n }\n ")}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&!n.noBackground&&"\n background-size: 15px 4px, 15px 4px, 4px 15px, 4px 15px;\n "}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&n.noBackground&&"\n background-size: 15px 1.5px, 15px 1.5px, 1.5px 15px, 1.5px 15px;\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.opacity&&"\n opacity: ".concat(n.opacity,";\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-kc7274-1"})(["border-radius:","px;min-width:fit-content;overflow:hidden;"," "," "," "," ",""],l.n_,(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||t.Z.background).codeTextarea,";\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||t.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||t.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-kc7274-2"})(["height:","px;width:","px;"],2*r.iI,2*r.iI),v=i.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-kc7274-3"})(["align-items:center;border-radius:","px;border:2px solid transparent;display:flex;height:","px;justify-content:center;width:","px;"," ",""],l.BG,5*r.iI,5*r.iI,(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n border-color: ").concat(n.backgroundColor,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")})),f=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-kc7274-4"})(["padding:","px;",""],1*r.iI,(function(n){return"\n background-color: ".concat((n.theme.background||t.Z.background).dashboard,";\n ")})),p=i.default.div.withConfig({displayName:"indexstyle__BodyStyle",componentId:"sc-kc7274-5"})(["padding-left:","px;padding-right:","px;"],1*r.iI,1*r.iI);i.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-kc7274-6"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*r.iI)},99543:function(n,o,e){e.d(o,{DS:function(){return s},HI:function(){return B},SX:function(){return f},YE:function(){return p},_7:function(){return w},p1:function(){return j},qj:function(){return O},rQ:function(){return y}});var i=e(21831),t=e(44425),l=e(57653),r=e(47001),u=e(70515),d=e(61709),c=e(44375),a=e(4804),s=u.cd,v=u.cd*u.iI,f=2*u.iI,p=8.62,h=7.43,b=2*r.YF,k=2*r.YF,g=2*u.iI+5*u.iI,m=2*u.iI+5*u.iI+v+v+f,x=30*u.iI;function y(n){var o=(0,d.MS)(n);if((null===o||void 0===o?void 0:o.length)>=1)return(null===o||void 0===o?void 0:o.map((function(n){return n.title})).join(", "))||"";if(t.tf.GLOBAL_DATA_PRODUCT===(null===n||void 0===n?void 0:n.type)){var e,i=null===n||void 0===n||null===(e=n.configuration)||void 0===e?void 0:e.global_data_product;if(null!==i&&void 0!==i&&i.uuid)return null===i||void 0===i?void 0:i.uuid}return t.dO[null===n||void 0===n?void 0:n.language]||""}function C(n,o){var e,i,r,u=n.description,d=n.name,s=n.type,v=u||(null===t.V4||void 0===t.V4?void 0:t.V4[s])||s;if(l.qL.INTEGRATION===(null===o||void 0===o?void 0:o.type)&&t.tf.TRANSFORMER!==n.type){var f,p,h={};if(t.t6.YAML===n.language&&(null===n||void 0===n||null===(f=n.content)||void 0===f?void 0:f.length)>=1&&(h=(0,a.Qc)(n.content)),t.tf.DATA_LOADER===n.type)r="".concat(n.uuid,": ").concat(null===(p=h)||void 0===p?void 0:p.source);else if(t.tf.DATA_EXPORTER===n.type){var b;r="".concat(n.uuid,": ").concat(null===(b=h)||void 0===b?void 0:b.destination)}}else if(t.tf.DBT===n.type&&t.t6.SQL===n.language){var k=(0,c.IU)(n),g=k.name,m=k.project;r=g,v="".concat(v,"/").concat(m)}return null!==n&&void 0!==n&&n.replicated_block&&(r=d&&u?d:null===n||void 0===n?void 0:n.uuid,u||(v=null===n||void 0===n?void 0:n.replicated_block)),(null===n||void 0===n||null===(e=n.uuid)||void 0===e||null===(i=e.split(":"))||void 0===i?void 0:i.length)>=2&&d&&(r=d),r||(r=n.uuid),{displayText:r,subtitle:v}}function w(n,o){return C(n,o).displayText||""}function O(n,o){return C(n,o).subtitle||""}function S(n){var o=0;return null===n||void 0===n||n.forEach((function(n,e){var i=n.uuid;o+=4+i.length*h,e>=1&&(o+=4)})),o}function j(n,o,e){var i,t=0,l=b+g,r=B(n,o,e)-(k+2*u.iI),d=y(n),c=(null===d||void 0===d?void 0:d.length)*h;if(c>=1){var a=1;c>r&&(a=Math.ceil(c/r)),t+=1,l+=18*a}var s=e||{},v=s.blockStatus;return[s.callbackBlocks,s.conditionalBlocks,s.extensionBlocks].forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1){var o=S(n),e=1;o>r&&(e=Math.ceil(o/r)),t+=1,l+=18.5*e+4*(e-1)}})),"undefined"!==typeof(null===v||void 0===v||null===(i=v[n.uuid])||void 0===i?void 0:i.runtime)&&(l+=18,t+=1),l+=(t+=1)*(1*u.iI)}function B(n,o,e){var t,l,r=Math.max((null===(t=w(n,o))||void 0===t?void 0:t.length)*p,(null===(l=O(n,o))||void 0===l?void 0:l.length)*h),u=y(n),d=(null===u||void 0===u?void 0:u.length)*h,c=e||{},a=c.callbackBlocks,s=c.conditionalBlocks,v=c.extensionBlocks,f=Math.max.apply(Math,(0,i.Z)([a,s,v].map((function(n){return S(n)})).concat(d)));return f>r&&(r=Math.min(x,f)),k+m+r}},21978:function(n,o,e){e.d(o,{Jo:function(){return l},WN:function(){return u},bJ:function(){return r},rl:function(){return i}});var i,t=e(44425),l=(e(70515).iI,1e4),r={height:10,width:10},u={height:6,width:6};t.tf.DATA_EXPORTER,t.tf.SENSOR,t.Lq.GREY,t.Lq.PINK,t.Lq.TEAL,t.Lq.YELLOW;!function(n){n.NORTH="NORTH",n.SOUTH="SOUTH"}(i||(i={}))},55187:function(n,o,e){e.d(o,{$4:function(){return v},dg:function(){return c},ki:function(){return a}});var i=e(75582),t=e(38626),l=e(44897),r=e(42631),u=e(47041),d=e(70515),c=2;function a(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.Z,o={};return[null===n||void 0===n?void 0:n.accent,null===n||void 0===n?void 0:n.content,null===n||void 0===n?void 0:n.monotone].forEach((function(n){Object.entries(n).forEach((function(n){var e=(0,i.Z)(n,2),t=e[0],l=e[1];o[l]=t}))})),o}var s=Object.entries(a()).reduce((function(n,o){var e=(0,i.Z)(o,2),t=e[0],l=e[1];return n.concat("\n .edge-rect-".concat(l," {\n rect {\n fill: ").concat(t,";\n }\n }\n\n .edge-line-").concat(l," {\n line {\n stroke: ").concat(t,";\n }\n }\n "))}),[]),v=t.default.div.withConfig({displayName:"indexstyle__GraphContainerStyle",componentId:"sc-bc2ei5-0"})(["position:relative;div{","}"," .edge{&.activeSlow{animation:dashdraw 2s linear infinite;stroke-dasharray:5;stroke-width:",";}&.active{animation:dashdraw .5s linear infinite;stroke-dasharray:5;stroke-width:",";}&.inactive{}&.selected-twice{stroke-dasharray:4 2 4 2 4 8;stroke-width:",";}&.selected-twice.group{stroke-dasharray:8 24;stroke-width:",";}}@keyframes dashdraw{0%{stroke-dashoffset:10;}}.edge-rect{rect{fill:none;}}.edge-line{line{stroke-width:","px;}}.edge-line-remove{line{","}}",""],u.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),c,c,c,c,d.iI/4,(function(n){return"\n stroke: ".concat((n.theme.accent||l.Z.accent).negative,";\n ")}),s.join("\n"));t.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-bc2ei5-1"})(["border-radius:","px;border:1px solid transparent;min-width:fit-content;"," "," "," "," "," ",""],r.BG,(function(n){return n.selected&&"\n border-color: ".concat((n.theme.content||l.Z.content).active,";\n ")}),(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")}),(function(n){return(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border-color: ".concat((n.theme.content||l.Z.content).active,";\n border-style: dashed;\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||l.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),t.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-bc2ei5-2"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*d.iI)},24138:function(n,o,e){e.d(o,{Xz:function(){return En},kS:function(){return Tn},NB:function(){return In},GR:function(){return _n},ZP:function(){return Zn}});var i=e(75582),t=e(21831),l=e(82394),r=e(26304),u=e(77837),d=e(38860),c=e.n(d),a=e(51774),s=e.n(a),v=e(38626),f=e(82684),p=e(69864),h=e(79757),b=e(44425),k=e(39867),g=e(97618),m=e(55485),x=e(38276),y=e(30160),C=e(72473),w=e(47001),O=e(99543),S=e(55283),j=e(21978),B=e(41143),E=e(70515),I=e(86735);var T=e(61709),_=e(81728);function Z(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function D(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Z(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Z(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var P=function(n){var o=n/1e3,e=4-Math.floor(o).toString().length,i=(0,_.QV)(o,e>=0?e:0),t="s";return i>1e3&&(i=(0,_.QV)(i/60,0),t="m"),"".concat(i).concat(t)};function A(n){return"parent:".concat(n)}function R(n){return["parent"].concat((0,I.YC)(n,(function(n){return n}))).join(":")}function N(n,o){return"".concat(o,":").concat(n)}function L(n,o){return{from:o,fromPort:"".concat(o,":").concat(n,":from"),id:N(n,o),to:n,toPort:"".concat(o,":").concat(n,":to")}}function M(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return[n,o,"from"].filter((function(n){return n})).join(":")}function H(n,o,e){var i,t={},l=D(D({},j.WN),{},{disabled:!0});if(null!==e&&void 0!==e&&null!==(i=e.activeNodes)&&void 0!==i&&i[n]&&(l.height=0,l.width=0),(null===o||void 0===o?void 0:o.length)>=1)o.forEach((function(o){var e=M(n,o);t[e]=D(D({},l),{},{id:e,side:j.rl.SOUTH})}));else{var r=M(n);t[r]=D(D({},l),{},{id:r,side:j.rl.SOUTH})}return t}function U(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return[o,n,"to"].filter((function(n){return n})).join(":")}function G(n,o,e){var i,t={},l=D(D({},j.WN),{},{disabled:!0});if(null!==e&&void 0!==e&&null!==(i=e.activeNodes)&&void 0!==i&&i[n]&&(l.height=0,l.width=0),(null===o||void 0===o?void 0:o.length)>=1)o.forEach((function(o){var e=U(n,o);t[e]=D(D({},l),{},{id:e,side:j.rl.NORTH})}));else{var r=U(n);t[r]=D(D({},l),{},{id:r,side:j.rl.NORTH})}return t}function W(n){var o,e=n.activeNodes,r=n.blockStatus,u=(n.blockUUIDMapping,n.blocks),d=n.callbackBlocksByBlockUUID,c=n.conditionalBlocksByBlockUUID,a=n.downstreamBlocksMapping,s=n.enablePorts,v=n.extensionBlocksByBlockUUID,f=n.nodeHovering,p=n.pipeline,h=n.selectedBlock,b=D({},e);f&&(b[null===f||void 0===f?void 0:f.id]=f);var k={},g={},m={},x=(0,I.HK)(u||[],(function(n){return n.uuid})),y={};null===u||void 0===u||u.forEach((function(n){var o;if((null===n||void 0===n||null===(o=n.upstream_blocks)||void 0===o?void 0:o.length)>=1){var e=(null===n||void 0===n?void 0:n.upstream_blocks)||[],i=(0,I.YC)(e,(function(n){return n})).join(",");i in y||(y[i]={downstreamBlocks:[],upstreamBlocks:null===e||void 0===e?void 0:e.reduce((function(n,o){var e=null===x||void 0===x?void 0:x[o];return e?n.concat(e):n}),[])}),y[i].downstreamBlocks.push(n)}}));var C={},w={};Object.values(y||{}).forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks;if((null===o||void 0===o?void 0:o.length)>=2){var i={};null===o||void 0===o||o.forEach((function(n){var o=n.downstream_blocks;if((null===o||void 0===o?void 0:o.length)>=1){var e=(0,I.YC)(o||[],(function(n){return n})).join(",");e in i||(i[e]=0),i[e]+=1}}));var l=Object.values(i||{})||[],r=Math.max.apply(Math,(0,t.Z)(l));(null===l||void 0===l||!l.length||r>=2)&&(null===o||void 0===o||o.forEach((function(o){var e=null===o||void 0===o?void 0:o.uuid;e in C||(C[e]=[]),C[e].push(n)})),null===e||void 0===e||e.forEach((function(o){var e=null===o||void 0===o?void 0:o.uuid;e in w||(w[e]=[]),w[e].push(n)})))}})),null===u||void 0===u||u.forEach((function(n){n.tags;var o=n.upstream_blocks,e=void 0===o?[]:o,i=n.uuid,t=a[i];i in m||(m[i]={});var u=null===d||void 0===d?void 0:d[null===n||void 0===n?void 0:n.uuid],s=null===c||void 0===c?void 0:c[null===n||void 0===n?void 0:n.uuid],f=null===v||void 0===v?void 0:v[null===n||void 0===n?void 0:n.uuid];k[i]={data:{block:n},height:(0,O.p1)(n,p,{blockStatus:r,callbackBlocks:u,conditionalBlocks:s,extensionBlocks:f}),id:i,width:(0,O.HI)(n,p,{blockStatus:r,callbackBlocks:u,conditionalBlocks:s,extensionBlocks:f})};var h={height:null!==b&&void 0!==b&&b[i]?2*E.iI:0,width:null!==b&&void 0!==b&&b[i]?2*E.iI:0},x="".concat(i,"-upstream-add"),y=function(n){return"".concat(n,"-dowstream-add")}(i);if(m[i][x]=D(D({},h),{},{id:x,side:j.rl.NORTH}),m[i][y]=D(D({},h),{},{id:y,side:j.rl.SOUTH}),!(i in C)){(null===e||void 0===e?void 0:e.length)>=1&&(m[i]=D(D({},null===m||void 0===m?void 0:m[i]),G(i,e,{activeNodes:b})),null===e||void 0===e||e.forEach((function(n){var o=L(i,n);g[o.id]=o})));var S=(null===w||void 0===w?void 0:w[i])||[],B=null===S||void 0===S?void 0:S.reduce((function(n,o){var e;return D(D({},n),null===o||void 0===o||null===(e=o.downstreamBlocks)||void 0===e?void 0:e.reduce((function(n,o){return D(D({},n),{},(0,l.Z)({},null===o||void 0===o?void 0:o.uuid,o))}),{}))}),{});null===t||void 0===t||t.forEach((function(n){var o=n.uuid;o in B||(m[i]=D(D({},null===m||void 0===m?void 0:m[i]),H(i,[o],{activeNodes:b})))}))}}));var S={};null===(o=Object.entries(w||{}))||void 0===o||o.forEach((function(n){var o=(0,i.Z)(n,2),e=(o[0],o[1]);null===e||void 0===e||e.forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks,i=R(null===e||void 0===e?void 0:e.reduce((function(n,o){return o&&null!==o&&void 0!==o&&o.uuid?n.concat(null===o||void 0===o?void 0:o.uuid):n}),[]));i in S||(S[i]={downstreamBlocks:o,upstreamBlocks:e})}))}));var B={};return Object.entries(S||{}).forEach((function(n){var o,e=(0,i.Z)(n,2),t=e[0],l=e[1],r=l.downstreamBlocks,u=l.upstreamBlocks,d={data:{block:null===u||void 0===u?void 0:u[0],blocks:u,children:r},id:t};k[t]=d;var c=function(n,o,e,t,l){(0,I.YC)((null===n||void 0===n?void 0:n.map((function(n){return n.uuid})))||[],(function(n){return n.uuid}));var r,u={};null===n||void 0===n||n.forEach((function(n){var e=n.uuid,i=null===o||void 0===o?void 0:o[e];null===i||void 0===i||i.forEach((function(o){o.downstreamBlocks;var e=o.upstreamBlocks,i=R((0,I.YC)((null===e||void 0===e?void 0:e.map((function(n){return n.uuid})))||[],(function(n){return n.uuid})));i in u||(u[i]=[]),u[i].push(n)}))}));var d={};if(Object.entries(u||{}).forEach((function(n){var o=(0,i.Z)(n,2),l=(o[0],o[1]),r=null===l||void 0===l?void 0:l.filter((function(n){var o=n.uuid;return null===e||void 0===e?void 0:e[o]})),u=R(null===r||void 0===r?void 0:r.map((function(n){return n.uuid})));if(u in t){var c=null===t||void 0===t?void 0:t[u];d[u]=c}})),(null===(r=Object.keys(d))||void 0===r?void 0:r.length)>=1)return d}(r,C,w,S);c&&(B[t]=c);var a=null===(o=Object.values(c||{}))||void 0===o?void 0:o.reduce((function(n,o){var e=o.upstreamBlocks;return n.concat(null===e||void 0===e?void 0:e.map((function(n){return n.uuid})))}),[]);null===r||void 0===r||r.forEach((function(n){var o=n.uuid;null!==a&&void 0!==a&&a.includes(o)||!(o in k)||(k[o].parent=t)})),null===u||void 0===u||u.forEach((function(n){var o=null===n||void 0===n?void 0:n.uuid;null===r||void 0===r||r.forEach((function(n){var e=n.uuid;if((null===h||void 0===h?void 0:h.uuid)===o||(null===h||void 0===h?void 0:h.uuid)===e){var i=L(e,o);g[i.id]=i,m[o]=D(D({},null===m||void 0===m?void 0:m[o]),H(o,[e],{activeNodes:b})),m[e]=D(D({},null===m||void 0===m?void 0:m[e]),G(e,[o],{activeNodes:b}))}}));var e=L(t,o);g[e.id]=e,m[o]=D(D({},null===m||void 0===m?void 0:m[o]),H(o,[t],{activeNodes:b})),m[t]=D(D({},null===m||void 0===m?void 0:m[t]),G(t,[o],{activeNodes:b}))}))})),Object.entries(B||{}).forEach((function(n){var o=(0,i.Z)(n,2),e=o[0],t=o[1];Object.entries(t||{}).forEach((function(n){var o=(0,i.Z)(n,2),t=o[0],l=o[1],r=l.downstreamBlocks,u=l.upstreamBlocks,d=R([e,t]),c={data:{block:null===u||void 0===u?void 0:u[0],blocks:u,children:r},id:d,parent:e};k[d]=c,null===u||void 0===u||u.forEach((function(n){var o=n.uuid;o in k&&(k[o].parent=d);var e=N(t,o);if(e in g&&delete g[e],o in m){var i=M(o,t);i in(null===m||void 0===m?void 0:m[o])&&delete m[o][i]}if(t in m){var l=U(t,o);l in(null===m||void 0===m?void 0:m[t])&&delete m[t][l]}}));var a=L(t,d);g[a.id]=a,m[d]=D(D({},null===m||void 0===m?void 0:m[d]),H(d,[t],{activeNodes:b})),m[t]=D(D({},null===m||void 0===m?void 0:m[t]),G(t,[d],{activeNodes:b}))}))})),s&&Object.entries(m).forEach((function(n){var o=(0,i.Z)(n,2),e=o[0],t=o[1],l=null===k||void 0===k?void 0:k[e];l&&(l.ports=Object.values(t))})),{blocksWithDownstreamBlockSet:w,edges:Object.values(g||{}),nodes:Object.values(k||{}),ports:m}}function F(n){var o=n.block,e=n.blockStatus,i=n.messages,t=n.noStatus,l=n.runningBlocks,r=n.runningBlocksMapping;if(t||!o)return{};if(e){var u=(null===e||void 0===e?void 0:e[function(n){var o=n.uuid,e=n.replicated_block;return e?"".concat(o,":").concat(e):o}(o)])||{},d=u.status,c=u.runtime;return{hasFailed:B.V.FAILED===d,isCancelled:B.V.CANCELLED===d,isConditionFailed:B.V.CONDITION_FAILED===d,isInProgress:B.V.RUNNING===d,isQueued:B.V.INITIAL===d,isSuccessful:B.V.COMPLETED===d,runtime:c}}var a,s=(0,T.h5)((null===i||void 0===i?void 0:i[null===o||void 0===o?void 0:o.uuid])||[]),v=(0,T.oI)(s),f=v.hasError,p=v.hasOutput,h=!(null===r||void 0===r||!r[null===o||void 0===o?void 0:o.uuid]);return{hasFailed:!h&&(f||b.DA.FAILED===o.status),isInProgress:h,isQueued:h&&(null===(a=l[0])||void 0===a?void 0:a.uuid)!==o.uuid,isSuccessful:!h&&(!f&&p||b.DA.EXECUTED===o.status)}}var V,Y=e(28598);function q(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function X(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?q(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):q(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var K=(V={},(0,l.Z)(V,b.tf.DATA_EXPORTER,C.zS),(0,l.Z)(V,b.tf.DATA_LOADER,C.rH),(0,l.Z)(V,b.tf.DBT,C.xE),(0,l.Z)(V,b.tf.GLOBAL_DATA_PRODUCT,C.ie),(0,l.Z)(V,b.tf.SENSOR,C.LM),(0,l.Z)(V,b.tf.TRANSFORMER,C.Sv),V);var z=function(n){var o=n.anotherBlockSelected,e=n.block,i=n.blocksWithSameDownstreamBlocks,r=n.callbackBlocks,u=n.children,d=n.conditionalBlocks,c=n.disabled,a=n.downstreamBlocks,s=n.extensionBlocks,p=n.hasFailed,j=n.height,B=n.hideNoStatus,E=n.hideStatus,T=n.isCancelled,_=n.isConditionFailed,Z=n.isDragging,D=n.isInProgress,A=n.isQueued,R=n.isSuccessful,N=n.opacity,L=n.pipeline,M=n.runtime,H=n.selected,U=n.selectedBlock,G=(0,f.useContext)(v.ThemeContext),W=!(D||A||p||R||T||_),F=p&&!(D||A),V=!F&&R&&!(D||A),q="";W?q="No status":V?q="Successful execution":F?q="Failed execution":D?q="Currently executiing":T&&(q="Cancelled execution");var z=e.color,Q=e.runtime,J=e.type,$=(0,S.qn)(J,{blockColor:z,theme:G}),nn=$.accent,on=$.accentLight,en=(0,f.useMemo)((function(){return(0,O.rQ)(e)}),[e]),tn=(0,f.useMemo)((function(){var n,o,e=K[J]||C.EJ,i=!1;return[b.tf.CALLBACK,b.tf.CHART,b.tf.CONDITIONAL,b.tf.CUSTOM,b.tf.DATA_EXPORTER,b.tf.DATA_LOADER,b.tf.EXTENSION,b.tf.SCRATCHPAD,b.tf.SENSOR,b.tf.MARKDOWN,b.tf.TRANSFORMER].includes(J)?n=nn:[b.tf.DBT].includes(J)&&(o=nn),[b.tf.DATA_EXPORTER].includes(J)&&(i=!0),(0,Y.jsx)(w.ze,{backgroundColor:n,borderColor:o,children:(0,Y.jsx)("div",{style:{height:w.ZG,width:w.ZG},children:(0,Y.jsx)(e,{inverted:i,size:w.ZG})})})}),[nn,J]),ln=(0,f.useMemo)((function(){var n=[],e=[];if(A)(0,I.w6)(4).forEach((function(){var o,i;n.push(null===G||void 0===G||null===(o=G.content)||void 0===o?void 0:o.muted),e.push(null===G||void 0===G||null===(i=G.content)||void 0===i?void 0:i.muted)}));else if((null===i||void 0===i?void 0:i.length)>=2&&(null===a||void 0===a?void 0:a.length)>=1){var r,u=[];null!==i&&void 0!==i&&i.find((function(n){var o=n.uuid;return(null===U||void 0===U?void 0:U.uuid)===o}))?u.push(U):u.push.apply(u,(0,t.Z)(i)),null===u||void 0===u||null===(r=u.slice(0,4))||void 0===r||r.forEach((function(o){var i=(0,S.qn)(null===o||void 0===o?void 0:o.type,{blockColor:null===o||void 0===o?void 0:o.color,theme:G}),t=i.accent,l=i.accentLight;n.push(l),e.push(t)}))}else n.push.apply(n,[on,on,on,on]),e.push.apply(e,[nn,nn,nn,nn]);if((null===n||void 0===n?void 0:n.length)<4)for(var d=0,c=(null===n||void 0===n?void 0:n.length)||0;(null===n||void 0===n?void 0:n.length)<4;)n.push(null===n||void 0===n?void 0:n[d]),(d+=1)===c&&(d=0);if((null===e||void 0===e?void 0:e.length)<4)for(var s=0,v=(null===e||void 0===e?void 0:e.length)||0;(null===e||void 0===e?void 0:e.length)<4;)e.push(null===e||void 0===e?void 0:e[s]),(s+=1)===v&&(s=0);return["borderColorBottom","borderColorLeft","borderColorRight","borderColorTop"].reduce((function(i,t,r){return X(X({},i),{},(0,l.Z)({},t,!H&&o?null===n||void 0===n?void 0:n[r]:null===e||void 0===e?void 0:e[r]))}),{})}),[nn,on,o,i,a,A,H,U,G]),rn=ln.borderColorBottom,un=ln.borderColorLeft,dn=ln.borderColorRight,cn=ln.borderColorTop;return(0,Y.jsx)(w.Gi,{active:D,activeSlow:A,backgroundGradient:!(null!==a&&void 0!==a&&a.length)&&(0,S.u2)(J),borderColorBottom:rn,borderColorLeft:un,borderColorRight:dn,borderColorTop:cn,borderDeemphasized:(null===a||void 0===a?void 0:a.length)>=1,borderRadiusLarge:(null===a||void 0===a?void 0:a.length)>=1,disabled:c,height:j,isCancelled:T,isDragging:Z,noBackground:(null===a||void 0===a?void 0:a.length)>=1,opacity:N,selected:H,children:(0,Y.jsxs)(w.RJ,{disabled:c,height:j-2*w.YF,isConditionFailed:_,noBackground:(null===a||void 0===a?void 0:a.length)>=1,children:[!(null!==a&&void 0!==a&&a.length)&&(0,Y.jsx)(w.I5,{children:(0,Y.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Y.jsxs)(g.Z,{flex:1,children:[tn,(0,Y.jsx)(x.Z,{mr:O.DS}),(0,Y.jsxs)(g.Z,{flexDirection:"column",children:[(0,Y.jsx)(y.ZP,{bold:!0,monospace:!0,children:(0,O._7)(e,L)}),(0,Y.jsx)(y.ZP,{default:!0,monospace:!0,small:!0,children:(0,O.qj)(e,L)})]})]}),(0,Y.jsx)(x.Z,{mr:"15px"}),(0,Y.jsx)(w.Pq,{title:q,children:!E&&(0,Y.jsxs)(Y.Fragment,{children:[V&&(0,Y.jsx)(C.Jr,{size:O.SX,success:!0}),F&&(0,Y.jsx)(C.x8,{danger:!0,size:O.SX}),W&&!B&&(0,Y.jsx)(k.Z,{borderSize:1,muted:!0,size:O.SX})]})})]})}),(0,Y.jsxs)(w.Go,{children:[!(null!==a&&void 0!==a&&a.length)&&(0,Y.jsxs)(Y.Fragment,{children:[(null===en||void 0===en?void 0:en.length)>=1&&(0,Y.jsx)(x.Z,{mt:1,children:(0,Y.jsx)(y.ZP,{default:!0,monospace:!0,small:!0,children:en})}),[d,r,s].map((function(n,o){if((null===n||void 0===n?void 0:n.length)>=1)return(0,Y.jsx)("div",{style:{marginTop:4},children:(0,Y.jsx)(m.ZP,{alignItems:"center",flexWrap:"wrap",children:n.reduce((function(n,o,e){return e>=1&&n.push((0,Y.jsx)("div",{style:{width:4}},"space-".concat(o.uuid))),n.push((0,Y.jsx)("div",{style:{marginTop:4},children:(0,Y.jsx)(h.Z,{color:(0,S.qn)(o.type,{blockColor:o.color,theme:G}).accentLight,monospace:!0,small:!0,children:o.uuid})},"badge-".concat(o.uuid))),n}),[])})},"badge-blocks-".concat(o))})),(Q||M)&&(0,Y.jsx)(x.Z,{mt:1,children:(0,Y.jsx)(y.ZP,{monospace:!0,muted:!0,small:!0,children:P(Q||M)})})]}),u]})]})})},Q=e(50724),J=e(15338),$=e(93369),nn=e(48670),on=e(65956),en=e(57653),tn=e(71180),ln=e(12468),rn=e(42631),un=e(72191),dn=e(44897),cn=v.default.div.withConfig({displayName:"indexstyle__ZoomControlsStyle",componentId:"sc-1usy46j-0"})(["position:absolute;bottom:","px;left:50%;transform:translateX(-50%);display:flex;justify-content:center;background-color:",";border:1px solid ",";border-radius:","px;box-shadow:",";"],3*E.iI,(function(n){return(n.theme.background||dn.Z.background).panel}),(function(n){return(n.theme.borders||dn.Z.borders).darkLight}),rn.g5,(function(n){return(n.theme.shadow||dn.Z.shadow).frame})),an=v.default.div.withConfig({displayName:"indexstyle__ZoomDisplayStyle",componentId:"sc-1usy46j-1"})(["padding:","px ","px ","px ","px;border-radius:0 ","px ","px 0;cursor:default;",""],1.5*E.iI,3.25*E.iI,1.5*E.iI,1.875*E.iI,rn.g5,rn.g5,(function(n){return n.minimizeControls&&"\n padding: ".concat(1.5*E.iI,"px ").concat(1.875*E.iI,"px;\n border-radius: ").concat(rn.g5,"px;\n ")}));function sn(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function vn(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?sn(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):sn(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var fn=35*E.iI,pn={bottomOffset:6.5*E.iI,size:null,widthFitContent:!0},hn={highlightOnHoverAlt:!0,iconOnly:!0,noBorder:!0,padding:"".concat(1.5*E.iI,"px ").concat(1.875*E.iI,"px"),transparent:!0},bn={size:un._k};function kn(n){var o=n.canvasRef,e=n.containerRef,i=n.zoomLevel,t=(0,f.useState)(!1),l=t[0],r=t[1];return(0,f.useEffect)((function(){if(null!==e&&void 0!==e&&e.current){var n=new ResizeObserver((function(){var n=e.current.offsetWidth;r(n<fn)}));return n.observe(e.current),function(){return n.disconnect()}}}),[e]),(0,Y.jsxs)(cn,{onDoubleClick:function(n){n.stopPropagation()},children:[!l&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Reset (shortcut: double-click canvas)",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{borderRadius:"".concat(rn.g5,"px 0 0 ").concat(rn.g5,"px"),onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.fitCanvas)||void 0===e?void 0:e.call(n)},padding:"".concat(1.5*E.iI,"px ").concat(1.875*E.iI,"px ").concat(1.5*E.iI,"px ").concat(3.25*E.iI,"px"),children:(0,Y.jsx)(C.Qc,vn({},bn))}))})),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom in",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.setZoom)||void 0===e?void 0:e.call(n,i-1+.5)},children:(0,Y.jsx)(C.DY,vn({},bn))}))})),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom out",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.setZoom)||void 0===e?void 0:e.call(n,i-1-.5)},children:(0,Y.jsx)(C.H9,vn({},bn))}))}))]}),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom level",children:(0,Y.jsx)(an,{minimizeControls:l,children:(0,Y.jsx)(y.ZP,{center:!0,large:!0,minWidth:5*E.iI,children:"".concat(Math.round(100*i),"%")})})}))]})}var gn=(0,f.memo)(kn),mn=e(35686),xn=e(77417),yn=e(55187),Cn=e(85385),wn=e(72619),On=e(3314),Sn=["forwardedRef"];function jn(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function Bn(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?jn(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):jn(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var En=s()((0,u.Z)(c().mark((function n(){var o,i;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,i=o.Canvas,n.abrupt("return",(function(n){var o=n.forwardedRef,e=(0,r.Z)(n,Sn);return(0,Y.jsx)(i,Bn({ref:o},e))}));case 5:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),In=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Node);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),Tn=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Edge);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),_n=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Port);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}});s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Add);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Remove);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.MarkerArrow);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}});var Zn=function(n){var o=n.addNewBlockAtIndex,e=n.blockRefs,r=n.blockStatus,u=n.blocksOverride,d=n.blocks,c=n.contentByBlockUUID,a=n.contextMenuEnabled,s=n.deleteBlock,h=n.disabled,k=n.dragEnabled,g=n.editingBlock,C=n.enablePorts,w=void 0!==C&&C,B=n.fetchPipeline,T=n.height,_=n.heightOffset,Z=void 0===_?10*E.iI:_,D=n.messages,P=n.noStatus,N=n.onClickNode,L=n.runBlock,H=n.pannable,U=void 0===H||H,G=n.pipeline,V=n.runningBlocks,q=void 0===V?[]:V,X=n.selectedBlock,K=n.setActiveSidekickView,tn=n.setEditingBlock,ln=n.setErrors,rn=n.setSelectedBlock,un=n.setZoom,dn=n.showDynamicBlocks,cn=void 0!==dn&&dn,an=n.showUpdateBlockModal,sn=n.treeRef,vn=n.zoomable,fn=void 0===vn||vn,pn=(0,xn.Z)(),hn=pn.featureEnabled,bn=pn.featureUUIDs,kn=(0,f.useContext)(v.ThemeContext),Sn=((0,f.useMemo)((function(){return(0,yn.ki)(kn)}),[kn]),(0,f.useRef)(null)),jn=((0,f.useRef)({}),(0,f.useRef)({})),Zn=(0,f.useRef)({}),Dn=(0,f.useRef)(null),Pn=sn||Dn,An=(0,f.useState)(1),Rn=An[0],Nn=An[1],Ln=(0,f.useState)(null),Mn=Ln[0],Hn=Ln[1],Un=(0,f.useState)({}),Gn=Un[0],Wn=Un[1],Fn=(0,f.useState)({}),Vn=Fn[0],Yn=Fn[1],qn=(0,f.useState)(null),Xn=qn[0],Kn=qn[1],zn=(0,f.useState)(!1),Qn=zn[0],Jn=zn[1],$n=(0,f.useState)(null),no=$n[0],oo=$n[1],eo=(0,f.useState)(null),io=eo[0],to=eo[1],lo=(0,f.useState)(null),ro=lo[0],uo=lo[1];(0,f.useEffect)((function(){var n=function(n){Qn&&no&&oo((function(o){return Bn(Bn({},o),{},{event:n})}))},o=function(n){Qn&&no&&(Jn(!1),setTimeout((function(){return oo(null)}),1))};return window.addEventListener("mousemove",n),window.addEventListener("mouseup",o),function(){window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",o)}}),[Qn,no]);var co=(0,f.useState)(null),ao=co[0],so=co[1],vo=(0,f.useState)([]),fo=vo[0],po=vo[1],ho=(0,f.useState)(!1),bo=(ho[0],ho[1],(null===g||void 0===g?void 0:g.upstreamBlocks)||{}),ko=bo.block,go=bo.values,mo=void 0===go?[]:go,xo=(0,f.useMemo)((function(){return mo.length}),[mo]),yo=(0,f.useMemo)((function(){var n;return(null===(n=u||(null===G||void 0===G?void 0:G.blocks))||void 0===n?void 0:n.filter((function(n){var o=n.type;return!b.iZ.includes(o)})))||[]}),[u,null===G||void 0===G?void 0:G.blocks]),Co=(0,f.useMemo)((function(){return yo}),[yo,cn]),wo=(0,f.useMemo)((function(){if(u)return u;if(d)return d;if(G){var n={},o=[];return o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.blocks)),o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.callbacks)),o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.conditionals)),Object.values(null===G||void 0===G?void 0:G.extensions).forEach((function(n){var e=n.blocks;o.push.apply(o,(0,t.Z)(e))})),o.reduce((function(o,e){return n[e.uuid]||o.push(e),o}),[])}return[]}),[d,u,G]),Oo=(0,f.useMemo)((function(){return(0,I.HK)(wo||[],(function(n){return n.uuid}))}),[wo]),So=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e;n[o.uuid]=null===o||void 0===o||null===(e=o.callback_blocks)||void 0===e?void 0:e.reduce((function(n,o){var e=null===Oo||void 0===Oo?void 0:Oo[o];return e?n.concat(e):n}),[])})),n}),[Co,Oo]),jo=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e;n[o.uuid]=null===o||void 0===o||null===(e=o.conditional_blocks)||void 0===e?void 0:e.reduce((function(n,o){var e=null===Oo||void 0===Oo?void 0:Oo[o];return e?n.concat(e):n}),[])})),n}),[Co,Oo]),Bo=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e,t=[];null===(e=Object.entries((null===G||void 0===G?void 0:G.extensions)||{}))||void 0===e||e.forEach((function(n){var e=(0,i.Z)(n,2),l=e[0],r=e[1].blocks;null===r||void 0===r||r.forEach((function(n){var e=n.upstream_blocks,i=n.uuid;if(null!==e&&void 0!==e&&e.includes(null===o||void 0===o?void 0:o.uuid)){var r=null===Oo||void 0===Oo?void 0:Oo[i];r&&t.push(Bn(Bn({},r),{},{extension_uuid:l}))}}))})),n[o.uuid]=t})),n}),[Co,Oo,G]),Eo=(0,f.useMemo)((function(){return(0,I.HK)(q,(function(n){return n.uuid}))}),[q]);(0,f.useEffect)((function(){setTimeout((function(){var n,o,e,i,t;0===(null===Pn||void 0===Pn||null===(n=Pn.current)||void 0===n||null===(o=n.containerRef)||void 0===o||null===(e=o.current)||void 0===e?void 0:e.scrollTop)&&(null===Pn||void 0===Pn||null===(i=Pn.current)||void 0===i||null===(t=i.fitCanvas)||void 0===t||t.call(i))}),1e3)}),[Pn]);var Io=(0,p.Db)(mn.ZP.blocks.pipelines.useUpdate(null===G||void 0===G?void 0:G.uuid,encodeURIComponent(null===ko||void 0===ko?void 0:ko.uuid)),{onSuccess:function(n){return(0,wn.wD)(n,{callback:function(){tn({upstreamBlocks:null}),null===B||void 0===B||B()},onErrorCallback:function(n,o){return null===ln||void 0===ln?void 0:ln({errors:o,response:n})}})}}),To=(0,i.Z)(Io,2),_o=To[0],Zo=To[1].isLoading,Do=(0,p.Db)((function(n){var o=n.block,e=n.downstreamBlocks,i=n.upstreamBlocks,t=Bn({},o);return"undefined"!==typeof e&&(t.downstream_blocks=e),"undefined"!==typeof i&&(t.upstream_blocks=i),mn.ZP.blocks.pipelines.useUpdate(null===G||void 0===G?void 0:G.uuid,encodeURIComponent(null===o||void 0===o?void 0:o.uuid))({block:t})}),{onSuccess:function(n){return(0,wn.wD)(n,{callback:function(){null===B||void 0===B||B()},onErrorCallback:function(n,o){return null===ln||void 0===ln?void 0:ln({errors:o,response:n})}})}}),Po=(0,i.Z)(Do,1)[0],Ao=(0,f.useCallback)((function(n){var o=n.type,i=n.uuid;if(null===rn||void 0===rn||rn(n),po([]),null!==e&&void 0!==e&&e.current){var t,l=e.current["".concat(o,"s/").concat(i,".py")];null===l||void 0===l||null===(t=l.current)||void 0===t||t.scrollIntoView()}}),[e,rn]),Ro=(0,f.useCallback)((function(n){po([]),tn((function(o){var e=o.upstreamBlocks.values||[],i=e.findIndex((function(o){var e=o.uuid;return n.uuid===e}));return Bn(Bn({},o),{},{upstreamBlocks:Bn(Bn({},o.upstreamBlocks),{},{values:i>=0?(0,I.oM)(e,i):e.concat(n)})})}))}),[tn]),No=(0,f.useMemo)((function(){var n={};return Co.forEach((function(o){o.upstream_blocks.forEach((function(e){n[e]||(n[e]=[]),n[e].push(o)}))})),n}),[Co]),Lo=(0,f.useMemo)((function(){return W({activeNodes:Gn,blockStatus:r,blockUUIDMapping:Oo,blocks:Co,callbackBlocksByBlockUUID:So,conditionalBlocksByBlockUUID:jo,downstreamBlocksMapping:No,enablePorts:w,extensionBlocksByBlockUUID:Bo,nodeHovering:io,pipeline:G,selectedBlock:ao})}),[Gn,r,Oo,Co,So,jo,No,w,Bo,io,G,ao]),Mo=Lo.edges,Ho=Lo.nodes,Uo=(Lo.ports,Lo.blocksWithDownstreamBlockSet),Go=(0,f.useMemo)((function(){var n=0;return T&&(n+=T),Z&&(n-=Z),Math.max(0,n)}),[T,Z]),Wo=(0,f.useCallback)((function(n,o){(0,On.j)(n);var e,i,t,l,r,u=o.data,d=u.block,c=u.blocks,a=d;if((null===c||void 0===c?void 0:c.length)>=2&&X){var s=null===c||void 0===c?void 0:c.findIndex((function(n){var o=n.uuid;return(null===X||void 0===X?void 0:X.uuid)===o}));a=s<(null===c||void 0===c?void 0:c.length)-1?null===c||void 0===c?void 0:c[s+1]:null===c||void 0===c?void 0:c[0]}if(!((null===ko||void 0===ko?void 0:ko.uuid)===a.uuid))if(ko)Ro(a);else if(null===N||void 0===N||N({block:a}),X&&(null===X||void 0===X?void 0:X.uuid)===(null===(e=a)||void 0===e?void 0:e.uuid)&&(((null===(i=a)||void 0===i||null===(t=i.downstream_blocks)||void 0===t?void 0:t.length)||0)<=1&&(null===(l=a)||void 0===l||null===(r=l.upstream_blocks)||void 0===r||!r.length)||ao&&(null===ao||void 0===ao?void 0:ao.uuid)===(null===X||void 0===X?void 0:X.uuid)))null===rn||void 0===rn||rn(null),so(null);else{var v;if(X)(null===X||void 0===X?void 0:X.uuid)===(null===(v=a)||void 0===v?void 0:v.uuid)?so(a):so(null);setTimeout((function(){Ao(a)}),1)}}),[ko,Ao,N,Ro,X,ao,so]),Fo=(0,f.useCallback)((function(n){var o,e=null===n||void 0===n?void 0:n.id;e in jn.current&&clearTimeout(null===jn||void 0===jn||null===(o=jn.current)||void 0===o?void 0:o[e])}),[Gn]),Vo=(0,f.useCallback)((function(n){var o=null===n||void 0===n?void 0:n.id;jn.current[o]=setTimeout((function(){Wn((function(n){var e=Bn({},n);return null===e||void 0===e||delete e[o],e}))}),1e3)}),[Wn]),Yo=(0,f.useCallback)((function(n,o,e){var i;if((0,On.j)(n),!Qn&&no){var t,r,u,d,c,a,s,v,f,p=null===o||void 0===o||null===(t=o.data)||void 0===t?void 0:t.block,h=null===no||void 0===no||null===(r=no.node)||void 0===r||null===(u=r.data)||void 0===u?void 0:u.block;if(!((null===G||void 0===G?void 0:G.type)===en.qL.INTEGRATION&&((null===p||void 0===p?void 0:p.type)===b.tf.DATA_EXPORTER||(null===p||void 0===p?void 0:p.type)===b.tf.DATA_LOADER&&(null===h||void 0===h?void 0:h.type)===b.tf.DATA_EXPORTER))&&(null===p||void 0===p||null===(d=p.upstream_blocks)||void 0===d||!d.includes(null===h||void 0===h?void 0:h.uuid))&&(null===p||void 0===p?void 0:p.uuid)!==(null===h||void 0===h?void 0:h.uuid))if((null===o||void 0===o||null===(c=o.data)||void 0===c||null===(a=c.children)||void 0===a?void 0:a.length)>=1){var k,m=null===p||void 0===p||null===(k=p.downstream_blocks)||void 0===k?void 0:k.filter((function(n){var o;return!(null!==h&&void 0!==h&&null!==(o=h.upstream_blocks)&&void 0!==o&&o.includes(n))}));Po({block:h,upstreamBlocks:m})}else if((null===no||void 0===no||null===(s=no.node)||void 0===s||null===(v=s.data)||void 0===v||null===(f=v.children)||void 0===f?void 0:f.length)>=1){var x,y=null===h||void 0===h||null===(x=h.downstream_blocks)||void 0===x?void 0:x.filter((function(n){var o;return!(null!==p&&void 0!==p&&null!==(o=p.downstream_blocks)&&void 0!==o&&o.includes(n))}));Po({block:p,downstreamBlocks:y})}else Po({block:h,upstreamBlocks:((null===h||void 0===h?void 0:h.upstream_blocks)||[]).concat(null===p||void 0===p?void 0:p.uuid)})}if(null===g||void 0===g||!g.upstreamBlocks){Fo(o),to(o);var C=null===o||void 0===o?void 0:o.id;null===(i=Object.keys(Vn||{}))||void 0===i||!i.length||C in Vn?Wn((function(n){return Object.values(n||{}).forEach((function(n){Vo(n)})),Bn(Bn({},n),{},(0,l.Z)({},C,o))})):uo(o)}}),[Vn,Fo,g,Qn,no,G,Wn,to,uo,Vo]),qo=(0,f.useCallback)((function(n,o,e){(0,On.j)(n),to(null),Vo(o)}),[to,Vo]),Xo=(0,f.useCallback)((function(n,o,e){if((0,On.j)(n),!Xn){var i=null===o||void 0===o?void 0:o.id;Zn.current[i]=setTimeout((function(){Xn||(Hn(null),Wn({}),Jn(!0),oo({data:e,event:n,node:o}))}),500)}}),[Xn,Wn,Hn,Jn,oo]),Ko=(0,f.useCallback)((function(n,o,e){(0,On.j)(n);var i,t=null===o||void 0===o?void 0:o.id;t in Zn.current&&clearTimeout(null===Zn||void 0===Zn||null===(i=Zn.current)||void 0===i?void 0:i[t])}),[]),zo=(0,f.useCallback)((function(n,o,e){var i;(0,On.j)(n);var t=null===o||void 0===o?void 0:o.id;clearTimeout(null===(i=Zn.current)||void 0===i?void 0:i[t]),Kn({data:e,event:n,node:o}),Hn(null)}),[Hn,Kn]),Qo=(0,f.useCallback)((function(n){var o=n.event,e=n.node;n.port;(0,On.j)(o),Fo(e),to(e)}),[Fo,to]),Jo=(0,f.useCallback)((function(n){var o=n.event,e=n.node;n.port;(0,On.j)(o),to(null),Vo(e)}),[to,Vo]),$o=(0,f.useCallback)((function(n){var o=n.event,e=n.node,i=n.port;Yn((function(n){return Bn(Bn({},n),{},(0,l.Z)({},null===e||void 0===e?void 0:e.id,{event:o,node:e,port:i}))}))}),[Yn]),ne=(0,f.useCallback)((function(n){n.event;var o=n.node,e=n.port,i=null===o||void 0===o?void 0:o.id;null===e||void 0===e||e.side;if(ro){var t,l,r,u,d=null===o||void 0===o||null===(t=o.properties)||void 0===t||null===(l=t.data)||void 0===l?void 0:l.block,c=null===ro||void 0===ro||null===(r=ro.data)||void 0===r?void 0:r.block;if(!((null===G||void 0===G?void 0:G.type)===en.qL.INTEGRATION&&((null===d||void 0===d?void 0:d.type)===b.tf.DATA_EXPORTER||(null===d||void 0===d?void 0:d.type)===b.tf.DATA_LOADER&&(null===c||void 0===c?void 0:c.type)===b.tf.DATA_EXPORTER))&&(null===d||void 0===d||null===(u=d.upstream_blocks)||void 0===u||!u.includes(c.uuid))&&(null===o||void 0===o?void 0:o.id)!==(null===ro||void 0===ro?void 0:ro.id)){var a={};j.rl.SOUTH===(null===e||void 0===e?void 0:e.side)?a.upstreamBlocks=((null===c||void 0===c?void 0:c.upstream_blocks)||[]).concat(null===d||void 0===d?void 0:d.uuid):a.downstreamBlocks=((null===c||void 0===c?void 0:c.downstream_blocks)||[]).concat(null===d||void 0===d?void 0:d.uuid),Po(Bn({block:c},a))}}Yn((function(n){var o=Bn({},n);return null===o||void 0===o||delete o[i],o})),Vo(o)}),[G,Yn,Vo,ro]),oe=(0,f.useCallback)((function(n,o,e){var i,t;if(no)return{anotherBlockSelected:!0,selected:!1};var l=(null===(i=Object.values(Vn||{}))||void 0===i?void 0:i.length)>=1,r=null===Vn||void 0===Vn?void 0:Vn[null===n||void 0===n?void 0:n.id],u=!1;if(ko)u=!!(0,I.sE)(mo,(function(n){return n.uuid===(null===o||void 0===o?void 0:o.uuid)}));else if(l)u=!!r;else if((null===e||void 0===e||null===(t=e.blocksWithSameDownstreamBlocks)||void 0===t?void 0:t.length)>=2){var d,c;u=null===e||void 0===e||null===(d=e.blocksWithSameDownstreamBlocks)||void 0===d||null===(c=d.map((function(n){return n.uuid})))||void 0===c?void 0:c.includes(null===X||void 0===X?void 0:X.uuid)}else u=(null===X||void 0===X?void 0:X.uuid)===(null===o||void 0===o?void 0:o.uuid);return{anotherBlockSelected:l?!r:!!X,selected:u}}),[Vn,ko,no,X,mo]),ee=(0,f.useCallback)((function(n,o,e){var i,t=e.isDragging,l=e.nodeHeight,u=e.nodeWidth,d=e.opacity,c=n.data,a=c.blocks,s=c.children;if((null===s||void 0===s?void 0:s.length)>=1){var v=[];null===s||void 0===s||s.forEach((function(o){var e=oe(n,o),i=e.anotherBlockSelected,l=e.selected,u=F({block:o,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}),c=u.hasFailed,a=u.isInProgress,s=u.isQueued,f=u.isSuccessful,p=null===So||void 0===So?void 0:So[null===o||void 0===o?void 0:o.uuid],b=null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],k=null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid];v.push((0,Y.jsx)(z,{anotherBlockSelected:i,block:o,callbackBlocks:null===So||void 0===So?void 0:So[null===o||void 0===o?void 0:o.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],disabled:(null===ko||void 0===ko?void 0:ko.uuid)===(null===o||void 0===o?void 0:o.uuid),extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid],hasFailed:c,height:(0,O.p1)(o,G,{blockStatus:r,callbackBlocks:p,conditionalBlocks:b,extensionBlocks:k}),hideNoStatus:!0,hideStatus:h||P,isDragging:t,isInProgress:a,isQueued:s,isSuccessful:f,opacity:d,pipeline:G,selected:l},null===o||void 0===o?void 0:o.uuid))})),i=(0,Y.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",style:{height:l,width:u},children:[(0,Y.jsx)(x.Z,{pr:E.cd}),v,(0,Y.jsx)(x.Z,{pr:E.cd})]})}var f,p=oe(n,o,{blocksWithSameDownstreamBlocks:a}),b=p.anotherBlockSelected,k=p.selected,g=F({block:o,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}),y=g.hasFailed,C=g.isInProgress,w=g.isQueued,S=g.isSuccessful;return f=(null===s||void 0===s?void 0:s.length)>=1?null===s||void 0===s?void 0:s.some((function(n){var e;return n&&(null===(e=F({block:o,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}))||void 0===e?void 0:e.isInProgress)})):C,(0,Y.jsx)(z,{anotherBlockSelected:b,block:o,blocksWithSameDownstreamBlocks:a,callbackBlocks:null===So||void 0===So?void 0:So[null===o||void 0===o?void 0:o.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],disabled:(null===ko||void 0===ko?void 0:ko.uuid)===(null===o||void 0===o?void 0:o.uuid),downstreamBlocks:s,extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid],hasFailed:y,height:l,hideNoStatus:!0,hideStatus:h||P,isDragging:t,isInProgress:f,isQueued:w,isSuccessful:S,opacity:d,pipeline:G,selected:k,children:i},null===o||void 0===o?void 0:o.uuid)}),[ko,r,So,jo,h,Bo,D,P,G,q,Eo]),ie=(0,f.useMemo)((function(){var n,o;if(Qn&&no){var e=no.event,i=no.node,t=no.data,l=e.clientX,u=e.clientY,d=(null===Sn||void 0===Sn||null===(n=Sn.current)||void 0===n?void 0:n.getBoundingClientRect())||{},c=d.x,a=d.y,s=null===i||void 0===i||null===(o=i.data)||void 0===o?void 0:o.block;if(s){var v=F({block:s,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}),f=(v.hasFailed,v.isInProgress,v.isQueued,v.isSuccessful,null===So||void 0===So?void 0:So[null===s||void 0===s?void 0:s.uuid]),p=null===jo||void 0===jo?void 0:jo[null===s||void 0===s?void 0:s.uuid],h=null===Bo||void 0===Bo?void 0:Bo[null===s||void 0===s?void 0:s.uuid],b={blockStatus:r,callbackBlocks:f,conditionalBlocks:p,extensionBlocks:h},k=(0,O.p1)(s,G,b),g=(0,O.HI)(s,G,b),m=ee(i,s,{isDragging:!0,nodeHeight:null===t||void 0===t?void 0:t.nodeHeight,nodeWidth:null===t||void 0===t?void 0:t.nodeWidth,opacity:.5});return(0,Y.jsx)("div",{style:{left:l-c-g/2,position:"absolute",top:u-a-k/2},children:m})}}}),[r,ee,So,jo,Bo,Qn,D,P,no,G,q,Eo]),te=(0,f.useMemo)((function(){var n,e,i,t;if(Mn){var l,r=Mn.edge,u=Oo[null===r||void 0===r?void 0:r.from],d=Oo[null===r||void 0===r?void 0:r.to],c=null===(n=event)||void 0===n?void 0:n.clientX,a=null===(e=event)||void 0===e?void 0:e.clientY,s=(null===Sn||void 0===Sn||null===(i=Sn.current)||void 0===i?void 0:i.getBoundingClientRect())||{},v=s.x,f=s.y;u&&!d?l=null===Uo||void 0===Uo?void 0:Uo[null===u||void 0===u?void 0:u.uuid]:!u&&d&&(l=null===Uo||void 0===Uo?void 0:Uo[null===d||void 0===d?void 0:d.uuid]);var p,h=function(){Po({block:d,upstreamBlocks:((null===d||void 0===d?void 0:d.upstream_blocks)||[]).filter((function(n){return n!==(null===u||void 0===u?void 0:u.uuid)}))})};if((null===(t=l)||void 0===t?void 0:t.length)>=1)null===(p=l)||void 0===p||p.forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks,i=R(null===e||void 0===e?void 0:e.map((function(n){return n.uuid})));if(u&&!d&&(null===r||void 0===r?void 0:r.to)===i){var t=(0,I.HK)(o||[],(function(n){return n.uuid}));h=function(){Po({block:u,downstreamBlocks:((null===u||void 0===u?void 0:u.downstream_blocks)||[]).filter((function(n){return!(n in t)}))})}}else if(!u&&d&&(null===r||void 0===r?void 0:r.from)===i){var l=(0,I.HK)(e||[],(function(n){return n.uuid}));h=function(){Po({block:d,upstreamBlocks:((null===d||void 0===d?void 0:d.upstream_blocks)||[]).filter((function(n){return!(n in l)}))})}}}));else if(!u&&!d){var k,g,m=[];null===r||void 0===r||null===(k=r.to)||void 0===k||null===(g=k.split(":"))||void 0===g||g.forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1&&"parent"!==n){var o=null===Oo||void 0===Oo?void 0:Oo[n];o&&m.push(o)}})),h=function(){null===m||void 0===m||m.forEach((function(n){return Po({block:n,downstreamBlocks:[]})}))}}return(0,Y.jsx)("div",{style:{left:c-v,position:"absolute",top:a-f},children:(0,Y.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return Hn(null)},open:!0,children:(0,Y.jsxs)(on.Z,{noPadding:!0,children:[(0,Y.jsx)(x.Z,{px:E.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,onClick:function(){var n=null===Co||void 0===Co?void 0:Co.findIndex((function(n){return n.uuid===(null===d||void 0===d?void 0:d.uuid)}));null===o||void 0===o||o({downstream_blocks:d?[null===d||void 0===d?void 0:d.uuid]:null,language:null===d||void 0===d?void 0:d.language,type:b.tf.CUSTOM,upstream_blocks:u?[null===u||void 0===u?void 0:u.uuid]:null},n,(function(){Hn(null)}))},preventDefault:!0,sameColorAsText:!0,children:"Add new block between"})}),(0,Y.jsx)(J.Z,{light:!0}),(0,Y.jsx)(x.Z,{px:E.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,onClick:function(){var n;null===(n=h)||void 0===n||n(),Hn(null)},preventDefault:!0,sameColorAsText:!0,children:"Remove connection"})})]})})})}}),[Mn,Co,Hn,Po]),le=(0,f.useMemo)((function(){return null===hn||void 0===hn?void 0:hn(bn.INTERACTIONS)}),[hn,bn]),re=(0,f.useMemo)((function(){var n;if(Xn){var e,i,t,l,r=Xn.event,u=Xn.node,d=(Xn.data,u.data),a=d.block,v=d.blocks,f=(d.children,r.clientX),p=r.clientY,h=(null===Sn||void 0===Sn||null===(n=Sn.current)||void 0===n?void 0:n.getBoundingClientRect())||{},k=h.x,g=h.y,m=X&&(null===X||void 0===X?void 0:X.uuid)===(null===a||void 0===a?void 0:a.uuid)&&ao&&(null===ao||void 0===ao?void 0:ao.uuid)===(null===a||void 0===a?void 0:a.uuid),y=null===v||void 0===v?void 0:v.findIndex((function(n){return n.uuid===(null===a||void 0===a?void 0:a.uuid)})),C=en.qL.INTEGRATION===(null===G||void 0===G?void 0:G.type),w=[];if(C||w.push({onClick:function(){var n,o;null===L||void 0===L||L({block:a,code:null===c||void 0===c||null===(n=c.current)||void 0===n||null===(o=n[null===a||void 0===a?void 0:a.type])||void 0===o?void 0:o[null===a||void 0===a?void 0:a.uuid]})},uuid:"Run block"}),w.push.apply(w,[{onClick:function(){an(a,null===a||void 0===a?void 0:a.name)},uuid:"Rename block"}]),!C)w.push.apply(w,[{disabled:((null===a||void 0===a||null===(e=a.downstream_blocks)||void 0===e?void 0:e.length)||0)<=1&&!(null!==a&&void 0!==a&&null!==(i=a.upstream_blocks)&&void 0!==i&&i.length),onClick:function(){null===rn||void 0===rn||rn(m?null:a),so(m?null:a)},uuid:m?"Hide all dependencies":"Show all dependencies"},{onClick:function(){null===o||void 0===o||o({downstream_blocks:a?[null===a||void 0===a?void 0:a.uuid]:null,language:b.t6.YAML===(null===a||void 0===a?void 0:a.language)?b.t6.PYTHON:null===a||void 0===a?void 0:a.language,type:b.tf.CUSTOM},Math.max(0,y-1))},uuid:"Add upstream block"},{onClick:function(){null===o||void 0===o||o({language:b.t6.YAML===(null===a||void 0===a?void 0:a.language)?b.t6.PYTHON:null===a||void 0===a?void 0:a.language,type:b.tf.CUSTOM,upstream_blocks:a?[null===a||void 0===a?void 0:a.uuid]:null},y+1)},uuid:"Add downstream block"},{disabled:!(null!==a&&void 0!==a&&null!==(t=a.upstream_blocks)&&void 0!==t&&t.length),onClick:function(){Po({block:a,upstreamBlocks:[]})},uuid:"Remove upstream dependencies"},{disabled:!(null!==a&&void 0!==a&&null!==(l=a.downstream_blocks)&&void 0!==l&&l.length),onClick:function(){Po({block:a,downstreamBlocks:[]})},uuid:"Remove downstream dependencies"}]);return le&&w.push({onClick:function(){null===Ao||void 0===Ao||Ao(a),null===K||void 0===K||K(Cn.cH.INTERACTIONS)},uuid:"Add / Edit interactions"}),w.push.apply(w,[{onClick:function(){null===s||void 0===s||s(a)},uuid:"Delete block"},{onClick:function(){null===s||void 0===s||s(Bn(Bn({},a),{},{force:!0}))},uuid:"Delete block (ignore dependencies)"},{onClick:function(){null===Ao||void 0===Ao||Ao(a),null===K||void 0===K||K(Cn.cH.FILE_VERSIONS)},uuid:"View file versions"}]),(0,Y.jsx)("div",{style:{left:f-k,position:"absolute",top:p-g},children:(0,Y.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return Kn(null)},open:!0,children:(0,Y.jsx)(on.Z,{noPadding:!0,children:w.map((function(n){var o=n.disabled,e=n.onClick,i=n.uuid;return(0,Y.jsx)(x.Z,{px:E.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,disabled:o,onClick:function(){e(),Kn(null)},preventDefault:!0,sameColorAsText:!0,children:i})},i)}))})})})}}),[o,Co,c,Xn,s,le,Ao,G,L,K,Kn,rn,so]);return(0,Y.jsxs)("div",{ref:Sn,style:{position:"relative"},children:[ko&&(0,Y.jsxs)(x.Z,{my:3,px:E.cd,children:[(0,Y.jsxs)(x.Z,{mb:E.cd,children:[(0,Y.jsxs)(y.ZP,{children:["Select parent block(s) for ",(0,Y.jsx)(y.ZP,{color:(0,S.qn)(ko.type,{blockColor:ko.color,theme:kn}).accent,inline:!0,monospace:!0,children:ko.uuid}),":"]}),(0,Y.jsx)(x.Z,{mt:1,children:mo.map((function(n,o){var e,i,t=n.uuid;return(0,Y.jsxs)(y.ZP,{color:(0,S.qn)(null===(e=Oo[t])||void 0===e?void 0:e.type,{blockColor:null===(i=Oo[t])||void 0===i?void 0:i.type,theme:kn}).accent,inline:!0,monospace:!0,children:[t,xo>=2&&o<=xo-2?(0,Y.jsx)(y.ZP,{inline:!0,children:",\xa0"}):null]},t)}))})]}),(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)($.ZP,{compact:!0,inline:!0,loading:Zo,onClick:function(){return _o({block:Bn(Bn({},ko),{},{upstream_blocks:mo.map((function(n){return n.uuid}))})})},uuid:"DependencyGraph/save_parents",children:"Save dependencies"}),(0,Y.jsx)(x.Z,{ml:1}),(0,Y.jsx)($.ZP,{compact:!0,inline:!0,noBackground:!0,onClick:function(){po([]),tn({upstreamBlocks:null})},uuid:"DependencyGraph/cancel_save_parents",children:"Cancel"})]})]}),(0,Y.jsxs)(yn.$4,{height:Go,onDoubleClick:function(){var n,o;return null===Pn||void 0===Pn||null===(n=Pn.current)||void 0===n||null===(o=n.fitCanvas)||void 0===o?void 0:o.call(n)},children:[(0,Y.jsx)(gn,{canvasRef:Pn,containerRef:Sn,zoomLevel:Rn}),(0,Y.jsx)(En,{arrow:null,disabled:h,edge:function(n){var o,e,i,l,u,d,c,s=Oo[null===n||void 0===n?void 0:n.source],v=[];s||(null===n||void 0===n||null===(u=n.id)||void 0===u||null===(d=u.replace(null===n||void 0===n?void 0:n.source,""))||void 0===d||null===(c=d.split(":"))||void 0===c||c.forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1&&"parent"!==n){var o=null===Oo||void 0===Oo?void 0:Oo[n];o&&v.push(o)}})),null!==v&&void 0!==v&&v.length&&(s=v[0]));var f,p,h,b=null===(o=s)||void 0===o?void 0:o.uuid,k=[];if(b in(Uo||{})){var g=null===Uo||void 0===Uo?void 0:Uo[b];null===g||void 0===g||g.map((function(o){var e=o.downstreamBlocks,i=o.upstreamBlocks;R((0,I.YC)((null===i||void 0===i?void 0:i.map((function(n){return n.uuid})))||[],(function(n){return n})))===(null===n||void 0===n?void 0:n.target)&&(k.push.apply(k,(0,t.Z)(e)),f=i)}))}if(null===k||void 0===k||!k.length)if(A(b)===(null===n||void 0===n?void 0:n.target)){var m,x;k.push.apply(k,(0,t.Z)(null===(m=s)||void 0===m||null===(x=m.downstream_blocks)||void 0===x?void 0:x.map((function(n){return null===Oo||void 0===Oo?void 0:Oo[n]}))))}else{var y,C,w=null===(y=s)||void 0===y||null===(C=y.downstream_blocks)||void 0===C?void 0:C.find((function(o){return M(b,o)===(null===n||void 0===n?void 0:n.sourcePort)||A(b)===n.target})),O=null===Oo||void 0===Oo?void 0:Oo[w];k.push(O)}null===k||void 0===k||k.forEach((function(n){if(!p&&!h&&n){var o=F({block:n,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo});null!==o&&void 0!==o&&o.isInProgress&&(p=null===o||void 0===o?void 0:o.isInProgress),null!==o&&void 0!==o&&o.isQueued&&(h=null===o||void 0===o?void 0:o.isQueued)}}));var j,B=oe({id:b},s,{blocksWithSameDownstreamBlocks:f}),E=B.anotherBlockSelected,T=B.selected,_=(0,S.qn)(null===(e=s)||void 0===e?void 0:e.type,{blockColor:null===(i=s)||void 0===i?void 0:i.color,theme:kn}),Z=["edge",p?h?"activeSlow":"active":"inactive"],N=v.map((function(n){return n.uuid}));ao&&(((null===ao||void 0===ao?void 0:ao.uuid)===b||null!==N&&void 0!==N&&N.includes(null===ao||void 0===ao?void 0:ao.uuid)||null!==k&&void 0!==k&&null!==(j=k.map((function(n){return n.uuid})))&&void 0!==j&&j.includes(null===ao||void 0===ao?void 0:ao.uuid))&&Z.push("selected-twice"));return null!==n&&void 0!==n&&null!==(l=n.target)&&void 0!==l&&l.startsWith("parent")&&Z.push("group"),(0,Y.jsx)(Tn,Bn(Bn({},n),{},{className:Z.join(" "),onClick:a?function(n,o){Hn((function(e){var i;return(null===e||void 0===e||null===(i=e.edge)||void 0===i?void 0:i.id)===(null===o||void 0===o?void 0:o.id)?null:{block:s,edge:o,event:n}})),Kn(null)}:null,style:{stroke:E&&!T?null===_||void 0===_?void 0:_.accentLight:null===_||void 0===_?void 0:_.accent,strokeWidth:yn.dg}}))},edges:Mo,fit:!0,forwardedRef:Pn,layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN"},maxHeight:j.Jo,maxWidth:j.Jo,maxZoom:1,minZoom:-.7,node:function(n){null===n||void 0===n||n.id;var o,e=(null===n||void 0===n||null===(o=n.properties)||void 0===o?void 0:o.data)||{},i=e.block,t=e.blocks,l=null===i||void 0===i?void 0:i.uuid,u=(0,S.qn)(null===i||void 0===i?void 0:i.type,{blockColor:null===i||void 0===i?void 0:i.color,theme:kn}),d=(null===io||void 0===io?void 0:io.id)===(null===n||void 0===n?void 0:n.id)||!(null===Gn||void 0===Gn||!Gn[l]),c=oe(n,i,{blocksWithSameDownstreamBlocks:t}),s=c.anotherBlockSelected,v=c.selected;return(0,Y.jsx)(In,Bn(Bn({},n),{},{dragType:"port",linkable:!0,port:(0,Y.jsx)(_n,{onDrag:function(){Hn(null),Fo(n)},onDragEnd:function(o,e,i){ne({event:o,node:n,port:i})},onDragStart:function(o,e,i){$o({event:o,node:n,port:i})},onEnter:function(o,e){Qo({event:o,node:n,port:e})},onLeave:function(o,e){Jo({event:o,node:n,port:e})},rx:d?10:0,ry:d?10:0,style:{fill:null===u||void 0===u?void 0:u.accentLight,stroke:s&&!v?null===u||void 0===u?void 0:u.accentLight:null===u||void 0===u?void 0:u.accent,strokeWidth:1}}),style:{fill:"transparent",stroke:"transparent",strokeWidth:0},children:function(n){var o,e=n.height,i=n.node,t=n.width,l=i.data,u=l.block,d=l.blocks,c=l.children,s=oe(i,u,{blocksWithSameDownstreamBlocks:d}),v=s.anotherBlockSelected,f=s.selected,p=F({block:u,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}),b=p.hasFailed,g=p.isInProgress,m=p.isQueued,x=p.isSuccessful;return o=(null===c||void 0===c?void 0:c.length)>=1?null===c||void 0===c?void 0:c.some((function(n){var o;return n&&(null===(o=F({block:n,blockStatus:r,messages:D,noStatus:P,runningBlocks:q,runningBlocksMapping:Eo}))||void 0===o?void 0:o.isInProgress)})):g,(0,Y.jsx)("foreignObject",{height:e,onClick:function(n){return Wo(n,i)},onContextMenu:a?function(n){return zo(n,i,{nodeHeight:e,nodeWidth:t})}:null,onMouseDown:k?function(n){return Xo(n,i,{nodeHeight:e,nodeWidth:t})}:null,onMouseEnter:function(n){return Yo(n,i,{nodeHeight:e,nodeWidth:t})},onMouseLeave:function(n){return qo(n,i,{nodeHeight:e,nodeWidth:t})},onMouseUp:k?function(n){return Ko(n,i,{nodeHeight:e,nodeWidth:t})}:null,style:{},width:n.width,x:0,y:0,children:(0,Y.jsx)(z,{anotherBlockSelected:v,block:u,blocksWithSameDownstreamBlocks:d,callbackBlocks:null===So||void 0===So?void 0:So[null===u||void 0===u?void 0:u.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===u||void 0===u?void 0:u.uuid],disabled:(null===ko||void 0===ko?void 0:ko.uuid)===u.uuid,downstreamBlocks:c,extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===u||void 0===u?void 0:u.uuid],hasFailed:b,height:e,hideNoStatus:!0,hideStatus:h||P,isInProgress:o,isQueued:m,isSuccessful:x,pipeline:G,selected:f,selectedBlock:X},u.uuid)})}}))},nodes:Ho,onNodeLinkCheck:function(n,o,e){return!Mo.some((function(n){return n.from===o.id&&n.to===e.id}))},onZoomChange:function(n){null===un||void 0===un||un(n),Nn(n)},pannable:U,selections:fo,zoomable:fn})]}),te,re,ie]})}},85385:function(n,o,e){e.d(o,{Qq:function(){return p},Z7:function(){return h},cH:function(){return t},du:function(){return v},fp:function(){return s},j5:function(){return f},uM:function(){return a}});var i,t,l=e(82394),r=e(57653),u=e(82359),d=e(72473),c=e(86735),a="sideview",s=90;!function(n){n.ADDON_BLOCKS="addon_blocks",n.BLOCK_SETTINGS="block_settings",n.CALLBACKS="callbacks",n.CHARTS="charts",n.DATA="data",n.EXTENSIONS="power_ups",n.FILE_VERSIONS="file_versions",n.GRAPHS="graphs",n.INTERACTIONS="interactions",n.REPORTS="reports",n.SECRETS="secrets",n.SETTINGS="settings",n.TERMINAL="terminal",n.TREE="tree",n.VARIABLES="variables"}(t||(t={}));t.BLOCK_SETTINGS,t.CALLBACKS,t.CHARTS,t.DATA,t.EXTENSIONS,t.TREE;var v=[t.DATA];function f(n){var o,e,i,l=[{key:t.TREE,label:"Tree"},{buildLabel:function(n){var o=(n.pipeline||{}).widgets,e=void 0===o?[]:o;return(null===e||void 0===e?void 0:e.length)>=1?"Charts (".concat(e.length,")"):"Charts"},key:t.CHARTS},{buildLabel:function(n){var o=n.variables;return(null===o||void 0===o?void 0:o.length)>=1?"Variables (".concat(o.length,")"):"Variables"},key:t.VARIABLES},{buildLabel:function(n){var o=n.secrets;return(null===o||void 0===o?void 0:o.length)>=1?"Secrets (".concat(o.length,")"):"Secrets"},key:t.SECRETS}];return r.qL.PYSPARK!==(null===n||void 0===n||null===(o=n.pipeline)||void 0===o?void 0:o.type)&&l.push.apply(l,[{buildLabel:function(n){n.pipeline;return"Add-on blocks"},key:t.ADDON_BLOCKS},{buildLabel:function(n){var o=(n.pipeline||{}).extensions,e=void 0===o?{}:o,i=0;return Object.values(e).forEach((function(n){var o=n.blocks;i+=(null===o||void 0===o?void 0:o.length)||0})),i>=1?"Power ups (".concat(i,")"):"Power ups"},key:t.EXTENSIONS}]),l.push.apply(l,[{key:t.DATA,label:"Data"},{key:t.TERMINAL,label:"Terminal"},{key:t.BLOCK_SETTINGS,label:"Block settings"}]),null!==n&&void 0!==n&&null!==(e=n.project)&&void 0!==e&&null!==(i=e.features)&&void 0!==i&&i[u.d.INTERACTIONS]&&l.push({key:t.INTERACTIONS,label:"Interactions"}),l}function p(n){return(0,c.HK)(f(n),(function(n){return n.key}))}var h=(i={},(0,l.Z)(i,t.ADDON_BLOCKS,d.EJ),(0,l.Z)(i,t.BLOCK_SETTINGS,d.JG),(0,l.Z)(i,t.CALLBACKS,d.AQ),(0,l.Z)(i,t.CHARTS,d.GQ),(0,l.Z)(i,t.DATA,d.iA),(0,l.Z)(i,t.EXTENSIONS,d.Bf),(0,l.Z)(i,t.INTERACTIONS,d.yd),(0,l.Z)(i,t.SECRETS,d.Yo),(0,l.Z)(i,t.SETTINGS,d.Zr),(0,l.Z)(i,t.TERMINAL,d.oI),(0,l.Z)(i,t.TREE,d.mp),(0,l.Z)(i,t.VARIABLES,d.LO),i)},70320:function(n,o,e){e.d(o,{h:function(){return r},q:function(){return l}});var i=e(78419),t=e(53808);function l(){return(0,t.U2)(i.am,null)||!1}function r(n){return"undefined"!==typeof n&&(0,t.t8)(i.am,n),n}},79757:function(n,o,e){var i=e(82394),t=e(26304),l=(e(82684),e(38626)),r=e(44897),u=e(42631),d=e(95363),c=e(70515),a=e(61896),s=e(28598),v=["children"];function f(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function p(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?f(Object(e),!0).forEach((function(o){(0,i.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):f(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var h=l.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;white-space:nowrap;",";"," "," ",";",";"," "," "," "," "," "," "," ",""],u.BG,d.ry,a.iD,(function(n){return n.small&&"\n ".concat(a.HC,";\n ")}),(function(n){return n.xxsmall&&"\n font-size: ".concat(a.VK,"px;\n line-height: ").concat(a.VK,"px;\n ")}),(function(n){return!n.regular&&"\n padding: 2px 4px;\n "}),(function(n){return n.regular&&"\n padding: ".concat(1*c.iI,"px ").concat(1.25*c.iI,"px;\n ")}),(function(n){return n.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(n){return!n.disabled&&!n.inverted&&"\n background-color: ".concat((n.theme||r.Z).background.row,";\n color: ").concat((n.theme||r.Z).content.default,";\n ")}),(function(n){return!n.disabled&&n.inverted&&"\n background-color: ".concat((n.theme||r.Z).background.dark,";\n color: ").concat((n.theme||r.Z).content.inverted,";\n ")}),(function(n){return n.cyan&&"\n background-color: ".concat((n.theme||r.Z).accent.cyan,";\n color: ").concat((n.theme||r.Z).monotone.black,";\n ")}),(function(n){return n.disabled&&"\n background-color: ".concat((n.theme||r.Z).feature.disabled,";\n color: ").concat((n.theme||r.Z).content.disabled,";\n ")}),(function(n){return n.color&&"\n background-color: ".concat(n.color," !important;\n color: ").concat((n.theme||r.Z).content.active,";\n ")}),(function(n){return n.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}),(function(n){return n.monospace&&"\n font-family: ".concat(d.Vp,";\n word-break: break-all;\n ")}));o.Z=function(n){var o=n.children,e=(0,t.Z)(n,v);return(0,s.jsx)(h,p(p({},e),{},{children:o}))}},65956:function(n,o,e){var i=e(38626),t=e(55485),l=e(38276),r=e(30160),u=e(44897),d=e(42631),c=e(47041),a=e(70515),s=e(28598),v=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||u.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||u.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||u.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||u.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(n){return"\n background-color: ".concat((n.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),v,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),h=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,c.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),b=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*a.iI);o.Z=function(n){var o=n.borderless,e=n.children,i=n.containerRef,u=n.contentContainerRef,d=n.dark,c=n.footer,a=n.fullHeight,v=void 0===a||a,k=n.fullWidth,g=void 0===k||k,m=n.header,x=n.headerHeight,y=n.headerIcon,C=n.headerPaddingVertical,w=n.headerTitle,O=n.maxHeight,S=n.maxWidth,j=n.minWidth,B=n.noPadding,E=n.overflowVisible,I=n.subtitle,T=n.success;return(0,s.jsxs)(f,{borderless:o,dark:d,fullHeight:v,fullWidth:g,maxHeight:O,maxWidth:S,minWidth:j,overflowVisible:E,ref:i,success:T,children:[(m||w)&&(0,s.jsxs)(p,{headerPaddingVertical:C,height:x,children:[m&&m,w&&(0,s.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(t.ZP,{alignItems:"center",children:[y&&y,(0,s.jsx)(l.Z,{ml:y?1:0,children:(0,s.jsx)(r.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,s.jsxs)(h,{maxHeight:O,noPadding:B,overflowVisible:E,ref:u,children:[I&&(0,s.jsx)(l.Z,{mb:2,children:(0,s.jsx)(r.ZP,{default:!0,children:I})}),e]}),c&&(0,s.jsx)(b,{children:c})]})}},72191:function(n,o,e){e.d(o,{_k:function(){return l},bL:function(){return t},l2:function(){return r},nz:function(){return u}});var i=e(70515),t=(i.iI,2*i.iI),l=2.5*i.iI,r=3*i.iI,u=3.5*i.iI},44375:function(n,o,e){e.d(o,{$1:function(){return l},Dy:function(){return t},IU:function(){return r}});var i=e(17717),t="--full-refresh";function l(n,o){var e,t=null===o||void 0===o?void 0:o.fullPath,l=null===n||void 0===n||null===(e=n.configuration)||void 0===e?void 0:e.file_path;if(t)return null===n||void 0===n?void 0:n.uuid;if(l){var r=l.split(i.sep),u=r[r.length-1].split(".");return u.pop(),u.join(".")}}function r(n){var o,e=null===n||void 0===n||null===(o=n.configuration)||void 0===o?void 0:o.file_path;if(e){var t=e.split(i.sep),l=t[0],r=t[t.length-1].split(".");return r.pop(),{directory:t.slice(1,t.length-1).join(i.sep),filePath:e,name:r.join("."),project:l}}return{filePath:e}}}}]);
|
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8487-032ef9b17d20aad9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8487],{87848:function(e,n,t){t.d(n,{u:function(){return c}});var r=t(38626),i=t(44897),o=t(70515),c=r.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-y3uzxv-0"})(["padding:","px;&:hover{cursor:pointer;","}",""],o.iI,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).hoverBackground,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).hoverBackground,";\n ")}))},28026:function(e,n,t){t.d(n,{Z:function(){return S}});var r=t(82394),i=t(89565),o=t.n(i),c=t(82684),l=t(40761),a=t(50724),s=t(30160),u=t(38626),d=t(44897),h=t(70515),f=t(47041),p=(0,u.css)([""," ",""],(function(e){return!e.width&&"\n width: 100%;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),x=u.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-11d4rgl-0"})([""," "," height:100%;overflow:auto;position:absolute;",""],p,f.w5,(function(e){return"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),g=u.default.div.withConfig({displayName:"indexstyle__InnerStyle",componentId:"sc-11d4rgl-1"})([""," padding:","px;"],p,h.cd*h.iI),v=(u.default.div.withConfig({displayName:"indexstyle__LineStyle",componentId:"sc-11d4rgl-2"})(["height:","px;"],20),(0,u.css)(["@keyframes cursor-blink{0%{opacity:0;}}::before{","}::after{","}"],(function(e){return e.focusBeginning&&"\n position: absolute;\n background-color: ".concat((e.theme.accent||d.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(h.iI,"px;\n opacity: 0.3;\n ")}),(function(e){return e.focused&&"\n background-color: ".concat((e.theme.accent||d.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(h.iI,"px;\n opacity: 0.3;\n ")}))),m=u.default.div.withConfig({displayName:"indexstyle__InputStyle",componentId:"sc-11d4rgl-3"})(["align-items:center;display:flex;gap:2px;",""],v),b=u.default.span.withConfig({displayName:"indexstyle__CharacterStyle",componentId:"sc-11d4rgl-4"})([""," ::after{","}"],v,(function(e){return e.focused&&"\n position: absolute;\n "})),j=t(48339),y=t(39643),w=t(11498),Z=t(42041),k=t(3314),C=t(44688),O=t(28598);function P(e,n){var t="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"===typeof e)return F(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(e,n)}(e))||n&&e&&"number"===typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function F(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var S=function(e){var n=e.lastMessage,t=e.onFocus,r=e.sendMessage,i=e.uuid,u=void 0===i?"terminal":i,d=e.width,h=(0,c.useRef)(null),f=(0,c.useRef)(null),p=(0,c.useState)(""),v=p[0],F=p[1],M=(0,c.useState)(0),S=M[0],z=M[1],H=(0,c.useState)(0),D=H[0],I=H[1],E=(0,c.useState)([]),T=E[0],L=E[1],A=(0,c.useState)(!1),N=A[0],B=A[1],R=(0,c.useState)(),U=R[0],G=R[1],q=(0,c.useMemo)((function(){return new l.Z}),[]),X=(0,c.useMemo)((function(){return{api_key:w.l,token:q.decodedToken.token}}),[q]);(0,c.useEffect)((function(){if(n){var e=JSON.parse(n.data);G((function(n){var t=n||"";return"stdout"===e[0]?t+e[1]:t}))}}),[n]);var W=(0,c.useMemo)((function(){return U?U.split("\n").filter((function(e){return!e.includes("# Mage terminal settings command")})).map((function(e){return{data:e,type:j.Gi.TEXT}})):[]}),[U]);(0,c.useEffect)((function(){if(h.current&&f.current){var e=f.current.getBoundingClientRect().height;h.current.scrollTo(0,e)}}),[v,W,h,f]);var Y=(0,C.y)(),V=Y.registerOnKeyDown,J=Y.setDisableGlobalKeyboardShortcuts,Q=Y.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){Q(u)}}),[Q,u]);var K=(0,c.useCallback)((function(){I((function(e){return e>0?e-1:e}))}),[]),$=(0,c.useCallback)((function(){I((function(e){return e<v.length?e+1:e}))}),[v]),ee=(0,c.useCallback)((function(e){r(JSON.stringify(_(_({},X),{},{command:["stdin",e]}))),r(JSON.stringify(_(_({},X),{},{command:["stdin","\r"]}))),(null===e||void 0===e?void 0:e.length)>=2&&(z(T.length+1),L((function(n){return n.concat(e)})),I(0)),F("")}),[T,r,F,L,z,I]),ne=(0,c.useCallback)((function(e){var n=(null===e||void 0===e?void 0:e.split(/\n/))||[];if(n.length>1){var t=n.slice(0,-1);ee(v+t.join("\n"));var r=(n.slice(-1)[0]||"").trim();F(r),I(r.length)}else F((function(n){return n+e})),I(v.length+e.length)}),[v,ee,F,I]);V(u,(function(e,n,t){var i=e.code,o=e.key;if(N)if((0,k.j)(e),(0,Z.y)([y.PQ,y.VS],n))(null===v||void 0===v?void 0:v.length)>=0&&(r(JSON.stringify(_(_({},X),{},{command:["stdin",v]}))),r(JSON.stringify(_(_({},X),{},{command:["stdin","\x03"]}))),I(0)),F("");else if(y.Qj!==i||n[y.zX])if((0,Z.y)([y.QK],n))K();else if((0,Z.y)([y.DY],n))$();else if((0,Z.y)([y.Bu],n)){if(T.length>=1){var c,l=Math.max(0,S-1);F(T[l]),z(l),I((null===(c=T[l])||void 0===c?void 0:c.length)||0)}}else if((0,Z.y)([y.kD],n)){if(T.length>=1){var a=Math.min(T.length,S+1),s=T[a]||"";F(s),z(a),I(s.length)}}else if((0,Z.y)([y.Uq],n))ee(v);else if((0,Z.y)([y.zX,y.VS],n))navigator.clipboard.writeText(window.getSelection().toString());else if((0,Z.y)([y.zX,y.Pd],n)||(0,Z.y)([y.PQ,y.Pd],n)){var u,d,h,f,p;"undefined"===typeof(null===(u=navigator)||void 0===u?void 0:u.clipboard)?alert('Clipboard pasting is not allowed in insecure contexts. If your Mage deployment is not secure but you still want to use clipboard paste, you can override this setting (which should only be done temporarily) on Chrome browsers by going to "chrome://flags/#unsafely-treat-insecure-origin-as-secure", adding your origin to "Insecure origins treated as secure", and enabling that setting.'):null!==(d=navigator)&&void 0!==d&&null!==(h=d.clipboard)&&void 0!==h&&h.readText?navigator.clipboard.readText().then(ne).catch((function(e){return alert("".concat(e,'\n For Chrome, users need to allow clipboard permissions for this site under "Privacy and security" -> "Site settings".\n For Safari, users need to allow the clipboard paste by clicking "Paste" in the context menu that appears.'))})):null!==(f=navigator)&&void 0!==f&&null!==(p=f.clipboard)&&void 0!==p&&p.read?navigator.clipboard.read().then((function(e){var n,t=P(e);try{for(t.s();!(n=t.n()).done;){var r,i=n.value,o=P(i.types);try{for(o.s();!(r=o.n()).done;){var c=r.value;if("text/plain"===c)return i.getType(c)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){t.e(l)}finally{t.f()}})).then((function(e){return e.text()})).then(ne).catch((function(e){return alert("".concat(e,'\n For Firefox, users need to allow clipboard paste by setting the "dom.events.asyncClipboard.read" preference in "about:config" to "true" and clicking "Paste" in the context menu that appears.'))})):alert('If pasting is not working properly, you may need to adjust some settings in your browser.\n\n For Firefox, users need to allow clipboard paste by setting both the "dom.events.asyncClipboard.clipboardItem" and "dom.events.asyncClipboard.read" preferences in "about:config" to "true" and clicking "Paste" in the context menu that appears.\n For Chrome, users need to allow clipboard permissions for this site under "Privacy and security" -> "Site settings".\n For Safari, users need to allow the clipboard paste by clicking "Paste" in the context menu that appears.\n')}else n[y.zX]||n[y.PQ]||1!==o.length||(F((function(e){return e.slice(0,D)+o+e.slice(D)})),I((function(e){return e+1})));else{var x=Math.max(0,D-1);F((function(e){return e.slice(0,x)+e.slice(D)})),I((function(e){return Math.max(0,e-1)}))}}),[v,T,S,N,F,L,z,u]);var te=(0,c.useMemo)((function(){var e;return null===(e=W[W.length-1])||void 0===e?void 0:e.data}),[W]);return(0,O.jsx)(x,{ref:h,width:d,children:(0,O.jsx)(a.Z,{isOpen:!0,onClick:function(){null===t||void 0===t||t(),B(!0),J(!0)},onClickOutside:function(){B(!1),J(!1)},style:{minHeight:"100%"},children:(0,O.jsxs)(g,{ref:f,width:d,children:[null===W||void 0===W?void 0:W.reduce((function(e,n,t){if(t==W.length-1)return e;var r=n||{},i=r.command,c=r.data,l=r.type,a=[];a=(a=Array.isArray(c)?c:[c]).filter((function(e){return e}));var u=[];return a.forEach((function(e,n){var r;if(j.jU.includes(l)&&(r=(0,O.jsx)(s.ZP,{monospace:!0,preWrap:!0,children:e&&(0,O.jsx)(o(),{children:e})})),r){var c="command-".concat(t,"-").concat(n,"-").concat(e);i||u.push((0,O.jsx)("div",{children:r},c))}})),e.concat(u)}),[]),(0,O.jsx)(m,{focused:N&&0===(null===v||void 0===v?void 0:v.length),children:(0,O.jsxs)(s.ZP,{monospace:!0,children:[(0,O.jsx)(s.ZP,{inline:!0,monospace:!0,children:te&&(0,O.jsx)(o(),{children:te})}),null===v||void 0===v?void 0:v.split("").map((function(e,n,t){return(0,O.jsxs)(b,{focusBeginning:N&&0===D&&0===n,focused:N&&(D===n+1||D>=t.length&&n===t.length-1),children:[" "===e&&(0,O.jsx)(O.Fragment,{children:"\xa0"}),"\n"===e&&(0,O.jsx)("br",{})," "!==e&&e]},"command-".concat(n,"-").concat(e))}))]})})]})})})}},31353:function(e,n,t){t.d(n,{Mz:function(){return a},T5:function(){return u},bf:function(){return s}});var r,i=t(82394),o=t(72473),c=t(89370),l=t(70515),a=7*l.iI,s=22,u=(l.iI,l.iI,r={},(0,i.Z)(r,c.RL.CATEGORY,o.WD),(0,i.Z)(r,c.RL.CATEGORY_HIGH_CARDINALITY,o.Rj),(0,i.Z)(r,c.RL.DATETIME,o.aw),(0,i.Z)(r,c.RL.EMAIL,o.GT),(0,i.Z)(r,c.RL.LIST,o.aV),(0,i.Z)(r,c.RL.NUMBER,o.qZ),(0,i.Z)(r,c.RL.NUMBER_WITH_DECIMALS,o.As),(0,i.Z)(r,c.RL.PHONE_NUMBER,o.LP),(0,i.Z)(r,c.RL.TEXT,o.KJ),(0,i.Z)(r,c.RL.TRUE_OR_FALSE,o.Kb),(0,i.Z)(r,c.RL.UUID,o.SS),(0,i.Z)(r,c.RL.ZIP_CODE,o.$t),r)},68487:function(e,n,t){t.d(n,{Z:function(){return Se}});var r=t(75582),i=t(12691),o=t.n(i),c=t(38626),l=t(82684),a=t(34376),s=t(40761),u=t(54750),d=t(71180),h=t(39867),f=t(50724),p=t(58036),x=t(97618),g=t(55485),v=t(70374),m=t(82394),b=t(56085),j=t(69864),y=t(70652),w=t(44085),Z=t(38276),k=t(4190),C=t(28026),O=t(30160),P=t(35576),F=t(17488),M=t(69650),_=t(35686),S=t(72473),z=t(44897),H=t(42631),D=t(31353),I=t(47041),E=t(70515),T=c.default.div.withConfig({displayName:"GitActionsstyle__HeaderStyle",componentId:"sc-ynrhio-0"})(["border-bottom:1px solid #1B1C20;height:","px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;"],D.Mz),L=c.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],D.Mz),A=c.default.div.withConfig({displayName:"GitActionsstyle__PanelStyle",componentId:"sc-ynrhio-2"})(["height:75vh;min-height:300px;width:75vw;backgroundColor:#232429;border-radius:","px;",""],H.n_,(function(e){return"\n background-color: ".concat((e.theme.background||z.Z.background).panel,";\n ")})),N=c.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],I.w5,2*E.iI,D.Mz),B=t(4383),R=t(72619),U=t(86735),G=t(50178),q=t(28598);function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){(0,m.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var V=function(e){var n,t=e.branch,i=(e.fetchBranch,(0,l.useState)()),o=i[0],c=i[1],a=(0,l.useState)(),s=a[0],u=a[1],h=(0,l.useState)(),f=h[0],p=h[1],x=(0,l.useState)(),v=x[0],m=x[1],z=(0,l.useState)(),H=z[0],D=z[1],I=(0,l.useState)(),E=I[0],X=I[1],V=_.ZP.git_custom_branches.list(),J=V.data,Q=V.mutate,K=(0,l.useMemo)((function(){return null===J||void 0===J?void 0:J.git_custom_branches}),[J]),$=_.ZP.syncs.list().data,ee=(0,l.useMemo)((function(){var e;if($)return null===(e=$.syncs)||void 0===e?void 0:e[0]}),[$]),ne=(0,j.Db)(_.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){Q(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;D(n)}})}}),te=(0,r.Z)(ne,2),re=te[0],ie=te[1].isLoading,oe=(0,j.Db)((function(){return _.ZP.git_branches.useUpdate(t)({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;D(n)}})}}),ce=(0,r.Z)(oe,1)[0],le=(0,j.Db)(_.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){D(null),m("DONE")},onErrorCallback:function(e){var n=e.error.exception;D(n)}})}}),ae=(0,r.Z)(le,2),se=ae[0],ue=ae[1].isLoading,de=(0,j.Db)(_.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){D(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;D(n)}})}}),he=(0,r.Z)(de,2),fe=he[0],pe=he[1].isLoading,xe=(0,l.useState)(),ge=xe[0],ve=xe[1],me=(0,l.useState)([]),be=me[0],je=me[1],ye=(0,l.useState)([]),we=ye[0],Ze=ye[1],ke=(0,l.useCallback)((function(){ce().then((function(e){var n=e.data,t=null===n||void 0===n?void 0:n.git_branch,r=null===t||void 0===t?void 0:t.status,i=null===t||void 0===t?void 0:t.modified_files,o=null===t||void 0===t?void 0:t.untracked_files;ve(r),je(o),Ze(i)}))}),[ce]),Ce=(0,l.useMemo)((function(){return ie||ue||pe}),[ie,ue,pe]);(0,l.useEffect)((function(){return ke()}),[f,ke]);var Oe=(0,l.useMemo)((function(){return(0,G.PR)()||{}}),[]),Pe=(0,l.useMemo)((function(){var e={term_name:null!==Oe&&void 0!==Oe&&Oe.id?"git_".concat(null===Oe||void 0===Oe?void 0:Oe.id):"git"};return null!==ee&&void 0!==ee&&ee.repo_path&&(e.cwd=null===ee||void 0===ee?void 0:ee.repo_path),e}),[null===ee||void 0===ee?void 0:ee.repo_path,Oe]),Fe=(0,b.ZP)((0,B.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in Pe),Me=Fe.lastMessage,_e=Fe.sendMessage,Se=(0,l.useCallback)((function(e){return(0,q.jsx)(y.Z,{checked:((null===o||void 0===o?void 0:o.files)||[]).includes(e),label:(0,q.jsx)(O.ZP,{small:!0,children:e}),onClick:function(){c((function(n){var t=(null===n||void 0===n?void 0:n.files)||[];return t=t.includes(e)?(0,U.Od)(t,(function(n){return n===e})):[e].concat(t),W(W({},n),{},{files:t})}))},small:!0},e)}),[o]),ze=(0,l.useMemo)((function(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(d.ZP,{onClick:function(){return c((function(e){return W(W({},e),{},{files:we.concat(be)})}))},children:"Include all changes"}),we&&we.length>0&&(0,q.jsxs)(Z.Z,{mb:1,children:[(0,q.jsx)(Z.Z,{my:1,children:(0,q.jsx)(O.ZP,{children:"Modified files"})}),we.map(Se)]}),be&&be.length>0&&(0,q.jsxs)(Z.Z,{mb:1,children:[(0,q.jsx)(Z.Z,{my:1,children:(0,q.jsx)(O.ZP,{children:"Untracked files"})}),be.map(Se)]})]})}),[Se,we,be]),He=(0,l.useMemo)((function(){return(0,q.jsx)(Z.Z,{p:2,children:Ce?(0,q.jsx)(k.Z,{color:"white"}):(0,q.jsxs)(q.Fragment,{children:["commit"===f&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(P.Z,{compact:!0,fullWidth:!0,label:"Commit message",monospace:!0,onChange:function(e){return c((function(n){return W(W({},n),{},{message:e.target.value})}))},required:!0,value:null===o||void 0===o?void 0:o.message}),(0,q.jsx)(Z.Z,{mt:1}),(0,q.jsxs)(g.ZP,{children:[(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){se({git_branch:W({action_type:"commit"},o)}).then((function(){ke(),c(null)}))},success:!0,children:"Commit"}),(0,q.jsx)(Z.Z,{mr:1}),(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){se({git_branch:{action_type:"push"}})},primary:!0,children:"Push"})]})]}),"new_branch"===f&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(F.Z,{compact:!0,fullWidth:!0,label:"Branch name",monospace:!0,onChange:function(e){return c({name:e.target.value})},value:null===o||void 0===o?void 0:o.name}),(0,q.jsx)(Z.Z,{mt:1}),(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){re({git_branch:o})},primary:!0,children:"Create"})]}),"clone"===f&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(O.ZP,{children:["Clone from ",(0,q.jsx)(O.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.remote_repo_link})," to ",(0,q.jsx)(O.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.repo_path}),". This ",(0,q.jsx)(O.ZP,{danger:!0,inline:!0,children:"will overwrite"})," any existing data in the local repository."]}),(0,q.jsx)(Z.Z,{mt:1}),(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===f&&(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"pull"}})},primary:!0,children:"Pull"}),"reset_hard"===f&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Z.Z,{mb:1,children:(0,q.jsx)(O.ZP,{children:s||"This will reset your local branch to match the remote branch."})}),s?(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){u(null),fe({git_branch:{action_type:"reset"}})},warning:!0,children:"Confirm"}):(0,q.jsx)(d.ZP,{borderLess:!0,onClick:function(){return u("Are you sure you want to reset your branch? Your local changes may be erased.")},primary:!0,children:"Reset branch"})]}),(0,q.jsx)(Z.Z,{mt:1,children:!Ce&&(0,q.jsxs)(q.Fragment,{children:[!H&&v&&(0,q.jsx)(O.ZP,{children:v}),H&&(0,q.jsx)(O.ZP,{preWrap:!0,danger:!0,children:H})]})})]})})}),[Ce,f,H,ee,v,o,s,ge]),De=(0,l.useMemo)((function(){return(0,q.jsx)(C.Z,{lastMessage:Me,sendMessage:_e})}),[Me,_e]);return(0,q.jsxs)(A,{children:[(0,q.jsxs)(T,{children:[(0,q.jsx)(Z.Z,{m:2,children:(0,q.jsxs)(g.ZP,{children:[(0,q.jsx)(w.Z,{beforeIcon:(0,q.jsx)(S.I0,{}),compact:!0,onChange:function(e){e.preventDefault(),re({git_branch:{name:e.target.value}})},placeholder:"Select a branch",value:t,children:null===K||void 0===K?void 0:K.map((function(e){var n=e.name;return(0,q.jsx)("option",{value:n,children:n},n)}))},"select_branch"),(0,q.jsx)(Z.Z,{ml:2}),(0,q.jsxs)(w.Z,{compact:!0,onChange:function(e){e.preventDefault(),p(e.target.value),X(!1),m(null),c(null)},value:f,children:[(0,q.jsx)("option",{value:"",children:"Select an action"}),Object.entries(Y).map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return(0,q.jsx)("option",{value:t,children:i},t)}))]},"select_git_action")]})}),(0,q.jsx)(Z.Z,{m:2,children:(0,q.jsxs)(g.ZP,{alignItems:"center",children:[(0,q.jsx)(O.ZP,{children:"UI"}),(0,q.jsx)(Z.Z,{ml:1}),(0,q.jsx)(M.Z,{checked:!!E,monotone:!0,onCheck:function(){return X((function(e){return!e}))}}),(0,q.jsx)(Z.Z,{ml:1}),(0,q.jsx)(O.ZP,{children:"Terminal"})]})})]}),(0,q.jsxs)(g.ZP,{children:[(0,q.jsx)("div",{style:{width:"50%"},children:(0,q.jsx)(N,{children:"commit"===f?ze:(0,q.jsx)(q.Fragment,{children:null===ge||void 0===ge||null===(n=ge.split("\\n"))||void 0===n?void 0:n.map((function(e){return(0,q.jsx)(O.ZP,{monospace:!0,preWrap:!0,small:!0,children:e},e)}))})})}),(0,q.jsx)("div",{style:{width:"50%"},children:E?(0,q.jsx)(L,{children:De}):He})]})]})},J=18.53/14;var Q=function(e){var n=e.height,t=e.width,r=n||(t?t*(1/J):14),i=t||(n?n*J:18.53);return(0,q.jsxs)("svg",{width:i,height:r,viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,q.jsx)("path",{opacity:"0.4",d:"M15.3266 0L19.2641 1.82961e-06L11.9687 14L8.03125 14L15.3266 0Z",fill:"url(#paint0_linear_1303_5)"}),(0,q.jsx)("path",{d:"M11.9692 1.82961e-06L8.03164 0L0.736328 14L4.67383 14L8.03164 7.55626V14H11.9691V8.38194e-05L11.9692 1.82961e-06Z",fill:"url(#paint1_linear_1303_5)"}),(0,q.jsx)("path",{d:"M15.3269 2.57679e-06H19.2644V14H15.3269V2.57679e-06Z",fill:"url(#paint2_linear_1303_5)"}),(0,q.jsxs)("defs",{children:[(0,q.jsxs)("linearGradient",{id:"paint0_linear_1303_5",x1:"8.03125",y1:"7",x2:"19.2641",y2:"7",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,q.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,q.jsxs)("linearGradient",{id:"paint1_linear_1303_5",x1:"0.736328",y1:"7",x2:"19.2644",y2:"7",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,q.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,q.jsxs)("linearGradient",{id:"paint2_linear_1303_5",x1:"0.736328",y1:"7",x2:"19.2644",y2:"7",gradientUnits:"userSpaceOnUse",children:[(0,q.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,q.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})]})]})},K=t(93369),$=t(48670),ee=t(63637),ne=t(89515),te=t(26304),re="12px 20px",ie="1px",oe=(0,c.default)(d.ZP).withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-hssntx-0"})(["",";"],(function(e){return e.active&&"\n background-color: ".concat((e.theme.background||z.Z.background).dashboard,";\n ")})),ce=c.default.div.withConfig({displayName:"indexstyle__DropdownContainerStyle",componentId:"sc-hssntx-1"})(["position:absolute;top:",";right:0;width:","px;display:flex;flex-direction:column;gap:",";overflow:hidden;background-color:",";border-radius:","px;border:1px solid ",";"],(function(e){return e.top||0}),45*E.iI,ie,(function(e){return(e.theme.borders||z.Z.borders).darkLight}),H.n_,(function(e){return(e.theme.borders||z.Z.borders).darkLight})),le=c.default.div.withConfig({displayName:"indexstyle__DropdownHeaderStyle",componentId:"sc-hssntx-2"})(["padding:",";background-color:",";"],re,(function(e){return(e.theme.background||z.Z.background).panel})),ae=c.default.div.withConfig({displayName:"indexstyle__TimeListContainerStyle",componentId:"sc-hssntx-3"})(["height:","px;display:flex;gap:",";"],20*E.iI,ie),se=c.default.div.withConfig({displayName:"indexstyle__TimeColumnStyle",componentId:"sc-hssntx-4"})(["display:flex;flex-direction:column;align-items:center;flex:1;gap:",";"],ie),ue=c.default.div.withConfig({displayName:"indexstyle__DropdownCellStyle",componentId:"sc-hssntx-5"})(["width:100%;padding:",";display:flex;flex-direction:",";flex-grow:",";justify-content:center;align-items:center;background-color:",";"],re,(function(e){return e.flexDirection||"unset"}),(function(e){return e.flexGrow||"unset"}),(function(e){return(e.theme.background||z.Z.background).dashboard})),de=c.default.div.withConfig({displayName:"indexstyle__ToggleGroupStyle",componentId:"sc-hssntx-6"})(["display:flex;flex-direction:column;"]),he=(0,c.default)(ue).withConfig({displayName:"indexstyle__ToggleDropdownCellStyle",componentId:"sc-hssntx-7"})(["justify-content:flex-start;gap:12px;"]),fe=["active","mountedCallback","time","timeZone"];function pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){(0,m.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ge(e){var n=e.active,t=e.mountedCallback,r=e.time,i=e.timeZone,o=(0,te.Z)(e,fe),c=(0,l.useRef)(null);return(0,l.useEffect)((function(){null!==c&&void 0!==c&&c.current&&t(c.current.offsetHeight)}),[t]),(0,q.jsx)(oe,xe(xe({},o),{},{active:n,borderLess:!0,borderRadius:"".concat(H.BG,"px"),compact:!0,highlightOnHoverAlt:!0,ref:c,transparent:!0,children:(0,q.jsx)(O.ZP,{inline:!0,monospace:!0,small:!0,children:"".concat(r," ").concat(i)})}))}var ve=(0,l.memo)(ge),me=t(63055),be=t(79633),je=t(3917),ye=t(78419),we=t(53808);var Ze=[je.Oh.UTC,je.Oh.LOCAL];var ke=function(){var e=(0,l.useState)((0,we.U2)(ye.Uo,!1)),n=e[0],t=e[1],r=(0,l.useState)((0,we.U2)(ye.kL,!1)),i=r[0],o=r[1],c=(0,l.useState)(!1),a=c[0],s=c[1],u=(0,l.useState)((0,je.e)({includeSeconds:!0,timeZones:Ze})),d=u[0],h=u[1],p=(0,l.useState)(0),x=p[0],g=p[1],v=n?je.Oh.LOCAL:je.Oh.UTC,m=window.innerWidth<me.nc,b=(0,l.useCallback)((function(){s((function(e){return!e}))}),[]),j=(0,l.useCallback)((function(e){g(e)}),[]),y=(0,l.useCallback)((function(){var e=(0,je.e)({includeSeconds:i,timeZones:Ze});h((function(n){return n.size===e.size&&n.get(je.Oh.UTC)===e.get(je.Oh.UTC)?n:e}))}),[i]),w=[{checked:n,label:"Show as local time",onCheck:function(){var e;t((e=!n,(0,we.uN)(ye.Uo,e)))}},{checked:i,label:"Include seconds",onCheck:function(){var e;o((e=!i,(0,we.uN)(ye.kL,e)))}}];return(0,l.useEffect)((function(){var e=setInterval((function(){y()}),1e3);return function(){return clearInterval(e)}}),[y]),(0,l.useEffect)((function(){y()}),[i,y]),d?(0,q.jsx)(f.Z,{onClickOutside:function(){return s(!1)},open:!0,children:(0,q.jsxs)("div",{style:{position:"relative"},children:[(0,q.jsx)(ve,{active:a,disabled:m,mountedCallback:j,onClick:b,time:d.get(v),timeZone:(0,je.WT)(v)}),!m&&a&&(0,q.jsxs)(ce,{top:x,children:[(0,q.jsx)(le,{children:(0,q.jsx)(O.ZP,{bold:!0,muted:!0,uppercase:!0,children:"Current Time"})}),(0,q.jsx)(ae,{children:Ze.map((function(e){return(0,q.jsxs)(se,{children:[(0,q.jsx)(ue,{children:(0,q.jsx)(O.ZP,{bold:!0,center:!0,muted:!0,uppercase:!0,children:"".concat(e).concat(e===je.Oh.LOCAL?" - ".concat((0,je.WT)(e)):"")})}),(0,q.jsxs)(ue,{flexDirection:"column",flexGrow:3,children:[(0,q.jsx)(O.ZP,{bold:!0,center:!0,color:be.J$,largeLg:!0,children:d.get(e)}),(0,q.jsx)(O.ZP,{center:!0,muted:!0,small:!0,children:e===je.Oh.UTC?"Universal Time":je.mi[e]})]})]},e)}))}),(0,q.jsx)(de,{children:w.map((function(e){return(0,q.jsxs)(he,{children:[(0,q.jsx)(M.Z,{checked:e.checked,compact:!0,onCheck:e.onCheck,purpleBackground:!0}),(0,q.jsx)(O.ZP,{children:e.label})]},e.label)}))})]})]})}):null},Ce=t(12468),Oe=t(46684),Pe=t(87848),Fe=t(95363),Me=t(69419),_e=t(89538);var Se=function(e){var n=e.breadcrumbs,t=e.menuItems,i=e.project,m=e.version,b=(0,l.useContext)(c.ThemeContext),j=(0,G.PR)(),y=(0,l.useState)(!1),w=y[0],k=y[1],C=(0,l.useState)(null),P=C[0],F=C[1],M=(0,l.useState)(!1),z=M[0],H=M[1],D=(0,l.useState)(null),I=D[0],T=D[1],L=(0,l.useRef)(null),A=(0,l.useRef)(null),N=(0,a.useRouter)(),B=_.ZP.git_branches.detail("test",{_format:"with_basic_details"},{revalidateOnFocus:!1}),R=B.data,U=B.mutate,X=(0,l.useMemo)((function(){return(null===R||void 0===R?void 0:R.git_branch)||{}}),[R]),W=X.is_git_integration_enabled,Y=X.name,J=_.ZP.projects.list({},{revalidateOnFocus:!1},{pauseFetch:!!i}).data,te=(0,l.useMemo)((function(){var e;return i||(null===J||void 0===J||null===(e=J.projects)||void 0===e?void 0:e[0])}),[J,i]),re=(0,l.useMemo)((function(){return m||(null===te||void 0===te?void 0:te.version)}),[te,m]),ie=s.Z.isLoggedIn(),oe=(0,l.useMemo)((function(){return n||[{bold:!0,label:function(){return null===te||void 0===te?void 0:te.name},linkProps:{href:"/",sameColorText:!0}}]}),[n,te]),ce=N.query.pipeline,le=(te||{}).latest_version,ae=(0,l.useMemo)((function(){return(0,q.jsx)(o(),{as:"/",href:"/",passHref:!0,children:(0,q.jsx)($.Z,{block:!0,height:Oe.y7,noHoverUnderline:!0,noOutline:!0,children:(0,q.jsx)(Q,{height:Oe.y7})})})}),[]),se=[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"}];(0,G.YB)()&&se.push({label:function(){return"Sign out"},onClick:function(){s.Z.logout((function(){_.ZP.sessions.updateAsync(null,1).then((function(){(0,Me.nL)("/sign-in")})).catch((function(){(0,Me.nL)("/")}))}))},uuid:"sign_out"});var ue=(0,_e.dd)((function(){return(0,q.jsx)(V,{branch:Y,fetchBranch:U})}),{},[Y,U],{background:!0,uuid:"git_actions"}),de=(0,r.Z)(ue,2),he=de[0],fe=(de[1],(0,l.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.length)>=21?"".concat(Y.slice(0,21),"..."):Y}),[Y])),pe=(0,l.useMemo)((function(){return!(!j||null===j||void 0===j||!j.avatar)&&!!/[A-Za-z0-9]+/.exec((null===j||void 0===j?void 0:j.avatar)||"")}),[j]),xe=(0,l.useMemo)((function(){var e;if(!j||null===j||void 0===j||!j.avatar)return(0,q.jsx)(ee.Z,{});var n={color:null===b||void 0===b||null===(e=b.content)||void 0===e?void 0:e.active,fontFamily:Fe.v$};return pe?(n.fontSize=2*E.iI,n.lineHeight="".concat(2*E.iI,"px"),n.position="relative",n.top=1):n.fontSize=3*E.iI,(0,q.jsx)("div",{style:n,children:null===j||void 0===j?void 0:j.avatar})}),[pe,j]);return(0,q.jsx)(Oe.I5,{children:(0,q.jsx)(p.Z,{children:(0,q.jsxs)(g.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,q.jsxs)(x.Z,{alignItems:"center",children:[re&&(0,q.jsx)(Ce.Z,{height:Oe.y7,label:"Version ".concat(re),size:null,visibleDelay:300,widthFitContent:!0,children:ae}),!re&&ae,(0,q.jsx)(u.Z,{breadcrumbs:oe})]}),(0,q.jsxs)(x.Z,{alignItems:"center",children:[W&&Y&&(0,q.jsx)(Z.Z,{ml:1,children:(0,q.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:he,sameColorAsText:!0,title:Y,uuid:"Header/GitActions",children:(0,q.jsxs)(g.ZP,{alignItems:"center",children:[(0,q.jsx)(S.I0,{size:1.5*E.iI}),(0,q.jsx)(Z.Z,{ml:1}),(0,q.jsx)(O.ZP,{monospace:!0,small:!0,children:fe})]})})}),(0,q.jsx)(Z.Z,{ml:1,children:(0,q.jsx)(ke,{})}),re&&"undefined"!==typeof re&&(0,q.jsx)(Z.Z,{ml:2,children:(0,q.jsx)($.Z,{href:"https://www.mage.ai/changelog",monospace:!0,openNewWindow:!0,sameColorAsText:!0,small:!0,children:"v".concat(re)})}),le&&re&&le!==re&&(0,q.jsx)(Z.Z,{ml:1,children:(0,q.jsx)(d.ZP,{backgroundColor:be.$R,borderLess:!0,compact:!0,linkProps:{href:"https://docs.mage.ai/about/releases"},noHoverUnderline:!0,pill:!0,sameColorAsText:!0,target:"_blank",title:"Update to version ".concat(le),children:(0,q.jsx)(O.ZP,{black:!0,bold:!0,children:"Update"})})}),(0,q.jsx)(Z.Z,{ml:3,children:(0,q.jsx)(K.ZP,{beforeElement:(0,q.jsx)(S.jR,{}),compact:!0,highlightOnHoverAlt:!0,inline:!0,linkProps:{as:"https://www.mage.ai/chat",href:"https://www.mage.ai/chat"},noBackground:!0,noHoverUnderline:!0,openNewTab:!0,sameColorAsText:!0,uuid:"Header/live_chat",children:"Live help"})}),t&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Z.Z,{ml:2}),(0,q.jsx)(f.Z,{onClickOutside:function(){return F(null)},open:!0,style:{position:"relative"},children:(0,q.jsxs)(g.ZP,{children:[(0,q.jsx)(Pe.u,{highlighted:0===P,onClick:function(){return F((function(e){return 0===e?null:0}))},onMouseEnter:function(){return F((function(e){return null!==e?0:null}))},ref:L,children:(0,q.jsx)(O.ZP,{children:"Menu"})}),(0,q.jsx)(v.Z,{alternateBackground:!0,items:t,onClickCallback:function(){return F(null)},open:0===P,parentRef:L,rightOffset:0,setConfirmationAction:T,setConfirmationDialogueOpen:H,uuid:"PipelineDetail/Header/menu"})]})}),(0,q.jsx)(f.Z,{onClickOutside:function(){return H(!1)},open:z,children:(0,q.jsx)(ne.Z,{danger:!0,onCancel:function(){return H(!1)},onClick:I,right:16*E.iI,subtitle:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",title:"Are you sure you want to delete the pipeline ".concat(ce,"?"),width:40*E.iI})})]}),(ie||!(0,G.YB)())&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Z.Z,{ml:2}),(0,q.jsx)(f.Z,{onClickOutside:function(){return k(!1)},open:!0,style:{position:"relative"},children:(0,q.jsxs)(g.ZP,{children:[(0,q.jsx)(Pe.u,{onClick:function(){return k(!0)},ref:A,children:(0,q.jsx)(h.Z,{color:be.Jm,size:4*E.iI,children:xe})}),(0,q.jsx)(v.Z,{alternateBackground:!0,items:se,onClickCallback:function(){return k(!1)},open:w,parentRef:A,rightOffset:0,uuid:"shared/Header/user_menu"})]})})]})]})]})})})}},48339:function(e,n,t){var r,i;t.d(n,{Gi:function(){return i},jU:function(){return c},uF:function(){return r}}),function(e){e.BUSY="busy",e.IDLE="idle",e.QUEUED="queued"}(r||(r={})),function(e){e.IMAGE_PNG="image/png",e.PROGRESS="progress",e.TABLE="table",e.TEXT="text",e.TEXT_HTML="text/html",e.TEXT_PLAIN="text/plain"}(i||(i={}));var o,c=[i.TEXT,i.TEXT_PLAIN];!function(e){e.DISPLAY_DATA="display_data",e.STATUS="status",e.STREAM="stream",e.STREAM_PIPELINE="stream_pipeline"}(o||(o={}))},89515:function(e,n,t){t.d(n,{Z:function(){return g}});var r=t(71180),i=t(55485),o=t(38626),c=t(44897),l=t(42631),a=t(31353),s=t(70515),u=t(28598),d=o.default.div.withConfig({displayName:"PopupMenuContainer__ContainerStyle",componentId:"sc-lq9od4-0"})(["border-radius:","px;padding:","px;position:absolute;z-index:",";cursor:default;"," "," "," "," "," "," "," "," ",""],l.TR,2*s.iI,a.bf+100,(function(e){return"\n background-color: ".concat((e.theme.interactive||c.Z.interactive).defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||c.Z.shadow).window,";\n ")}),(function(e){return"undefined"!==typeof e.left&&"\n left: ".concat(e.left,"px;\n ")}),(function(e){return"undefined"!==typeof e.right&&"\n right: ".concat(e.right,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")}),(function(e){return"undefined"!==typeof e.bottom&&"\n bottom: ".concat(e.bottom,"px;\n ")}),(function(e){return"undefined"===typeof e.top&&"undefined"===typeof e.bottom&&"\n top: ".concat(a.Mz-1*s.iI,"px;\n ")}),(function(e){return e.centerOnScreen&&"\n top: 40%;\n left: 50%;\n transform: translate(-50%,-50%);\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}),(function(e){return!e.width&&"\n min-width: ".concat(33*s.iI,"px;\n ")}));var h=function(e){var n=e.bottom,t=e.centerOnScreen,r=e.children,i=e.left,o=e.right,c=e.top,l=e.width;return(0,u.jsx)(d,{bottom:n,centerOnScreen:t,left:i,right:o,top:c,width:l,children:r})},f=t(38276),p=t(30160),x=32*s.iI;var g=function(e){var n=e.bottom,t=e.cancelText,o=e.centerOnScreen,c=e.confirmText,l=e.danger,a=e.left,s=e.isLoading,d=e.neutral,g=e.onCancel,v=e.onClick,m=e.right,b=e.subtitle,j=e.title,y=e.top,w=e.width;return(0,u.jsxs)(h,{bottom:n,centerOnScreen:o,left:a,right:m,top:y,width:w||x,children:[(0,u.jsxs)(i.ZP,{alignItems:"center",flexDirection:"column",children:[(0,u.jsx)(f.Z,{pb:1,children:(0,u.jsx)(p.ZP,{bold:!0,danger:l,large:!0,warning:!l,whiteSpaceNormal:!0,children:j})}),(0,u.jsx)(p.ZP,{small:!0,children:b})]}),(0,u.jsx)(f.Z,{mt:2,children:(0,u.jsxs)(i.ZP,{alignItems:"center",justifyContent:"center",children:[g&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.ZP,{onClick:g,children:t||"Cancel"}),(0,u.jsx)(f.Z,{mr:1})]}),(0,u.jsx)(r.ZP,{loading:s,onClick:v,children:(0,u.jsx)(p.ZP,{bold:!0,danger:l,success:!l&&!d,children:c||"Confirm"})})]})})]})}},70652:function(e,n,t){var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(38626)),l=t(55485),a=t(38276),s=t(30160),u=t(44897),d=t(72473),h=t(42631),f=t(70515),p=t(28598),x=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(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}var m=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),b=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),j=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,"\n border-color: ").concat((e.theme.content||u.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),y=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||u.Z.background).popup,";\n border: ").concat(h.PV,"px ").concat(h.M8," ").concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||u.Z.interactive).checked,";\n border: ").concat(h.YF,"px ").concat(h.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border: ").concat(h.YF,"px ").concat(h.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||u.Z.content).disabled,";\n border-color: ").concat((e.theme.content||u.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||u.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,"\n ")})),w=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,u=e.label,h=e.labelDescription,g=e.large,Z=e.meta,k=e.monospace,C=void 0!==k&&k,O=e.onClick,P=e.required,F=e.small,M=void 0!==F&&F,_=e.warning,S=e.xsmall,z=void 0!==S&&S,H=(0,o.Z)(e,x),D=_||!!(c||Z&&Z.touched&&Z.error);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(w,{onClick:function(e){e.preventDefault(),O&&!i&&O(e)},children:[(0,p.jsxs)(m,{children:[(0,p.jsx)(j,v(v({},H),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,p.jsx)(y,{checked:t,disabled:i,large:g,required:P,warning:D,children:(0,p.jsx)(d.Jr,{size:f.iI*(g?3:2)})})]}),n&&(0,p.jsx)(a.Z,{ml:1,children:(0,p.jsx)(l.ZP,{children:n})}),u&&(0,p.jsxs)(a.Z,{pl:1,children:["string"===typeof u&&(0,p.jsx)(s.ZP,{disabled:i,lineThrough:i,monospace:C,small:M,xsmall:z,children:u}),"string"!==typeof u&&u,h&&(0,p.jsx)(s.ZP,{muted:!0,small:!0,children:h})]})]}),(c||Z&&Z.touched&&Z.error)&&(0,p.jsx)(b,{children:(0,p.jsx)(s.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):Z.error})})]})}},39867:function(e,n,t){var r=t(82394),i=t(26304),o=t(38626),c=t(97618),l=t(55485),a=t(44897),s=t(42631),u=t(70515),d=t(28598),h=["children"];function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(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,r.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 x=o.default.div.withConfig({displayName:"Circle__CircleStyle",componentId:"sc-1o70504-0"})([""," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.square&&"\n border-radius: 50%;\n "}),(function(e){return e.square&&"\n border-radius: ".concat(e.size>=2*u.iI?s.BG:2,"px;\n ")}),(function(e){return!e.color&&!(e.borderSize||e.borderColor)&&"\n background-color: ".concat((e.theme.content||a.Z.content).muted,";\n ")}),(function(e){return!e.color&&e.primary&&"\n background-color: ".concat((e.theme.interactive||a.Z.interactive).linkPrimary,";\n ")}),(function(e){return!e.color&&e.primaryLight&&"\n background-color: ".concat((e.theme.interactive||a.Z.interactive).linkPrimaryLight,";\n ")}),(function(e){return e.success&&!e.borderSize&&"\n background-color: ".concat((e.theme.status||a.Z.status).positive,";\n ")}),(function(e){return e.warning&&!e.borderSize&&"\n background-color: ".concat((e.theme.accent||a.Z.accent).warning,";\n ")}),(function(e){return e.success&&e.borderSize&&"\n border-color: ".concat((e.theme.status||a.Z.status).positive," !important;\n ")}),(function(e){return e.warning&&e.borderSize&&"\n border-color: ".concat((e.theme.accent||a.Z.accent).warning," !important;\n ")}),(function(e){return e.borderSize&&"\n border-style: solid;\n border-width: ".concat(e.borderSize,"px;\n ")}),(function(e){return(e.borderSize||e.borderColor)&&"\n border: ".concat(e.borderSize||1,"px solid ").concat(e.borderColor||(e.theme.content||a.Z.content).active,";\n ")}),(function(e){return e.color&&"\n background-color: ".concat(e.color,";\n ")}),(function(e){return e.size&&"\n height: ".concat(e.size,"px;\n width: ").concat(e.size,"px;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.borders||a.Z.borders).danger,";\n ")}),(function(e){return e.muted&&"\n border-color: ".concat((e.theme.content||a.Z.content).muted,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.monotone||a.Z.monotone).gray,";\n ")}));n.Z=function(e){var n=e.children,t=(0,i.Z)(e,h);return(0,d.jsx)(x,p(p({},t),{},{children:(0,d.jsx)(l.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:n&&(0,d.jsx)(c.Z,{children:n})})}))}},35576:function(e,n,t){var r=t(82394),i=t(26304),o=t(82684),c=t(38626),l=t(28968),a=t(28598),s=["rows"];function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],l.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,s);return(0,a.jsx)(l.Z,d(d({},o),{},{input:(0,a.jsx)(h,d({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},69650:function(e,n,t){var r=t(82394),i=t(26304),o=t(82684),c=t(38626),l=t(28968),a=t(44897),s=t(3314),u=t(28598),d=["checked","disabled","onCheck","pauseEvent"];function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:","px;",' & input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:',"px;top:","px;width:","px;height:",'px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:',";}"," ",""],l.p,46,46,26,(function(e){return e.compact&&"\n width: ".concat(35,"px;\n min-width: ").concat(35,"px;\n height: ").concat(20,"px;\n ")}),(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?a.Z.monotone.white:a.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(a.Z.monotone.grey200)}),(function(e){return e.compact?"1":"2"}),(function(e){return e.compact?"1":"2"}),(function(e){return e.compact?"18":"22"}),(function(e){return e.compact?"18":"22"}),(function(e){return e.compact?"translateX(15px)":"translateX(20px)"}),(function(e){return!e.disabled&&!e.monotone&&'\n & input[type="checkbox"]:checked + span {\n background-color: '.concat(a.Z.accent.sky,';\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: ').concat(a.Z.monotone.white,";\n }\n ")}),(function(e){return e.purpleBackground&&'\n & input[type="checkbox"]:checked + span {\n background-color: '.concat(a.Z.interactive.purple,";\n }\n ")})),x=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=e.pauseEvent,a=void 0===c||c,h=(0,i.Z)(e,d);return(0,u.jsx)(l.Z,f(f({},h),{},{disabled:r,input:(0,u.jsxs)(p,f(f({},h),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,u.jsx)("input",{checked:t,readOnly:!0,type:"checkbox"}),(0,u.jsx)("span",{onClick:r?null:function(e){a&&(0,s.j)(e),null===o||void 0===o||o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(x)},63637:function(e,n,t){var r=t(38626),i=t(28598),o=r.default.svg.withConfig({displayName:"Mage8Bit__SVGStyle",componentId:"sc-cj6ltf-0"})([""]);n.Z=function(e){var n=e.size,t=void 0===n?20:n,r=e.viewBox,c=void 0===r?"0 0 20 20":r;return(0,i.jsxs)(o,{height:t,viewBox:c,width:t,children:[(0,i.jsxs)("g",{clipPath:"url(#clip0_297_42814)",children:[(0,i.jsx)("path",{d:"M13.334 0h1.66667v1.66667H13.334zM11.666 1.6665h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M10 1.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M8.33398 1.6665h1.66667v1.66667H8.33398z",fill:"#AF93FF"}),(0,i.jsx)("path",{d:"M8.33398 3.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 3.3335h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,i.jsx)("path",{d:"M3.33398 5h1.66667v1.66667H3.33398z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M5 5h1.66667v1.66667H5z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 8.3335h1.66667v1.66667H6.66602z",fill:"#000"}),(0,i.jsx)("path",{d:"M6.66602 6.6665h1.66667v1.66667H6.66602z",fill:"#AD8FFF"}),(0,i.jsx)("path",{d:"M6.66602 10h1.66667v1.66667H6.66602z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M8.33398 6.6665h1.66667v1.66667H8.33398z",fill:"#AD8FFF"}),(0,i.jsx)("path",{d:"M1.66602 13.3335h1.66667v1.66667H1.66602z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M1.66602 11.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,i.jsx)("path",{d:"M1.66602 10h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,i.jsx)("path",{d:"M1.66602 8.3335h1.66667v1.66667H1.66602zM1.66602 6.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,i.jsx)("path",{d:"M1.66602 6.6665h1.66667v1.66667H1.66602zM0 0h1.66667v1.66667H0zM3.33398 1.6665h1.66667v1.66667H3.33398zM0 3.3335h1.66667v1.66667H0z",fill:"#2ECDF7"}),(0,i.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,i.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602zM1.66602 18.3335h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,i.jsx)("path",{d:"M1.66602 15h1.66667v1.66667H1.66602zM3.33398 15h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M3.33398 16.6665h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M3.33398 13.3335h1.66667v1.66667H3.33398z",fill:"#AD8FFF"}),(0,i.jsx)("path",{d:"M8.33398 8.3335h1.66667v1.66667H8.33398z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M10 6.6665h1.66667v1.66667H10z",fill:"#AD8FFF"}),(0,i.jsx)("path",{d:"M10 10h1.66667v1.66667H10z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M11.666 6.6665h1.66667v1.66667H11.666z",fill:"#AD8FFF"}),(0,i.jsx)("path",{d:"M11.666 8.3335h1.66667v1.66667H11.666z",fill:"#C9B6FF"}),(0,i.jsx)("path",{d:"M8.33398 10h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,i.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,i.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M5 10h1.66667v1.66667H5z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M5 8.3335h1.66667v1.66667H5z",fill:"#232429"}),(0,i.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398zM8.33398 13.3335h1.66667v1.66667H8.33398z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M10 11.6665h1.66667v1.66667H10z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M11.666 10h1.66667v1.66667H11.666zM13.334 6.6665h1.66667v1.66667H13.334zM13.334 8.3335h1.66667v1.66667H13.334z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M15 8.3335h1.66667v1.66667H15z",fill:"#757575"}),(0,i.jsx)("path",{d:"M15 10h1.66667v1.66667H15z",fill:"#D9D9D9"}),(0,i.jsx)("path",{d:"M10 8.3335h1.66667v1.66667H10z",fill:"#000"}),(0,i.jsx)("path",{d:"M8.33398 5h1.66667v1.66667H8.33398zM11.666 5h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M13.334 10h1.66667v1.66667H13.334zM11.666 11.6665h1.66667v1.66667H11.666zM10 13.3335h1.66667v1.66667H10z",fill:"#501FD8"}),(0,i.jsx)("path",{d:"M8.33398 15h1.66667v1.66667H8.33398zM6.66602 13.3335h1.66667v1.66667H6.66602zM15 11.6665h1.66667v1.66667H15z",fill:"#501FD8"}),(0,i.jsx)("path",{d:"M16.666 11.6665h1.66667v1.66667H16.666zM16.666 13.3335h1.66667v1.66667H16.666z",fill:"#501FD8"}),(0,i.jsx)("path",{d:"M15 13.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M13.334 13.3335h1.66667v1.66667H13.334zM13.334 11.6665h1.66667v1.66667H13.334zM11.666 13.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M11.666 15h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M10 15h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M8.33398 16.6665h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 15h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,i.jsx)("path",{d:"M6.66602 16.6665h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M5 16.6665h1.66667v1.66667H5z",fill:"#AF93FF"}),(0,i.jsx)("path",{d:"M5 18.3335h1.66667v1.66667H5z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M6.66602 18.3335h1.66667v1.66667H6.66602zM8.33398 18.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M10 18.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M11.666 18.3335h1.66667v1.66667H11.666zM13.334 18.3335h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M15 18.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M16.666 18.3335h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,i.jsx)("path",{d:"M3.33398 18.3335h1.66667v1.66667H3.33398zM10 16.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M11.666 16.6665h1.66667v1.66667H11.666zM13.334 15h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M13.334 16.6665h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M15 16.6665h1.66667v1.66667H15z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M15 15h1.66667v1.66667H15z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M16.666 15h1.66667v1.66667H16.666zM18.334 16.6665h1.66667v1.66667H18.334zM18.334 18.3335h1.66667v1.66667H18.334z",fill:"#501FD8"}),(0,i.jsx)("path",{d:"M16.666 16.6665h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,i.jsx)("path",{d:"M13.334 5h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M15 5h1.66667v1.66667H15zM10 5h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M10 3.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M11.666 3.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,i.jsx)("path",{d:"M11.666 0h1.66667v1.66667H11.666z",fill:"#AF93FF"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_297_42814",children:(0,i.jsx)("path",{d:"M0 0h20v20H0z",fill:"#fff"})})})]})}},42041:function(e,n,t){t.d(n,{y:function(){return o}});var r=t(75582),i=t(39643);function o(e,n){var t=e.map((function(e){return String(e)})),o=e.includes(i.PQ),c=e.includes(i.zX),l=e.includes(i.XR),a=i.xU.map((function(e){return String(e)})),s=i.vk.map((function(e){return String(e)})),u=i.Tr.map((function(e){return String(e)})),d=Object.entries(n).find((function(e){var n=(0,r.Z)(e,2),i=n[0];return n[1]&&!t.includes(String(i))&&(!c||!s.includes(String(i)))&&(!o||!a.includes(String(i)))&&(!l||!u.includes(String(i)))}));return e.every((function(e){return n[e]}))&&!d}}}]);
|