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
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6285],{52136:function(t,n,e){"use strict";e.d(n,{Z:function(){return _}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),s=e(5237),a=e(29989),l=e(81352),f=e(46119),h=e(88543),y=e(12765),p=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function d(){return d=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d.apply(this,arguments)}function _(t){var n=t.top,e=void 0===n?0:n,i=t.left,r=void 0===i?0:i,u=t.scale,_=t.height,v=t.stroke,x=void 0===v?"#eaf0f6":v,m=t.strokeWidth,b=void 0===m?1:m,g=t.strokeDasharray,Z=t.className,O=t.numTicks,E=void 0===O?10:O,T=t.lineStyle,w=t.offset,k=t.tickValues,j=t.children,P=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,p),N=null!=k?k:(0,f.Z)(u,E),R=(null!=w?w:0)+(0,y.Z)(u)/2,S=N.map((function(t,n){var e,i=(null!=(e=(0,h.Z)(u(t)))?e:0)+R;return{index:n,from:new l.Z({x:i,y:0}),to:new l.Z({x:i,y:_})}}));return o.createElement(a.Z,{className:c()("visx-columns",Z),top:e,left:r},j?j({lines:S}):S.map((function(t){var n=t.from,e=t.to,i=t.index;return o.createElement(s.Z,d({key:"column-line-"+i,from:n,to:e,stroke:x,strokeWidth:b,strokeDasharray:g,style:T},P))})))}_.propTypes={tickValues:r().array,height:r().number.isRequired}},85587:function(t,n,e){"use strict";e.d(n,{Z:function(){return a}});var i=e(82684),r=e(63588),o=e.n(r),u=e(39309),c=["children","data","x","y","fill","className","curve","innerRef","defined"];function s(){return s=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},s.apply(this,arguments)}function a(t){var n=t.children,e=t.data,r=void 0===e?[]:e,a=t.x,l=t.y,f=t.fill,h=void 0===f?"transparent":f,y=t.className,p=t.curve,d=t.innerRef,_=t.defined,v=void 0===_?function(){return!0}:_,x=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,c),m=(0,u.jv)({x:a,y:l,defined:v,curve:p});return n?i.createElement(i.Fragment,null,n({path:m})):i.createElement("path",s({ref:d,className:o()("visx-linepath",y),d:m(r)||"",fill:h,strokeLinecap:"round"},x))}},39309:function(t,n,e){"use strict";e.d(n,{SO:function(){return u},jv:function(){return c}});var i=e(48167),r=e(92201),o=e(49894);function u(t){var n=void 0===t?{}:t,e=n.x,r=n.x0,u=n.x1,c=n.y,s=n.y0,a=n.y1,l=n.defined,f=n.curve,h=(0,i.Z)();return e&&(0,o.Z)(h.x,e),r&&(0,o.Z)(h.x0,r),u&&(0,o.Z)(h.x1,u),c&&(0,o.Z)(h.y,c),s&&(0,o.Z)(h.y0,s),a&&(0,o.Z)(h.y1,a),l&&h.defined(l),f&&h.curve(f),h}function c(t){var n=void 0===t?{}:t,e=n.x,i=n.y,u=n.defined,c=n.curve,s=(0,r.Z)();return e&&(0,o.Z)(s.x,e),i&&(0,o.Z)(s.y,i),u&&s.defined(u),c&&s.curve(c),s}},98889:function(t,n,e){"use strict";e.d(n,{Z:function(){return _}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),s=e(39309),a=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function l(){return l=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},l.apply(this,arguments)}function f(t){var n=t.children,e=t.x,i=t.x0,r=t.x1,u=t.y,f=t.y0,h=t.y1,y=t.data,p=void 0===y?[]:y,d=t.defined,_=void 0===d?function(){return!0}:d,v=t.className,x=t.curve,m=t.innerRef,b=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,a),g=(0,s.SO)({x:e,x0:i,x1:r,y:u,y0:f,y1:h,defined:_,curve:x});return n?o.createElement(o.Fragment,null,n({path:g})):o.createElement("path",l({ref:m,className:c()("visx-area",v),d:g(p)||""},b))}var h=["id","children"];function y(){return y=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y.apply(this,arguments)}function p(t){var n=t.id,e=t.children,i=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,h);return o.createElement("defs",null,o.createElement("clipPath",y({id:n},i),e))}function d(){return d=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d.apply(this,arguments)}function _(t){var n=t.className,e=t.curve,i=t.clipAboveTo,r=t.clipBelowTo,u=t.data,s=t.defined,a=t.x,l=t.y0,h=t.y1,y=t.aboveAreaProps,_=t.belowAreaProps,v=t.id,x=void 0===v?"":v;return o.createElement("g",{className:c()("visx-threshold",n)},o.createElement(f,{curve:e,data:u,x:a,y1:h,defined:s},(function(t){var n=t.path,e=null,c=null;return e=n.y0(r)(u),c=n.y0(i)(u),o.createElement("g",null,o.createElement(p,{id:"threshold-clip-below-"+x},o.createElement("path",{d:e||""})),o.createElement(p,{id:"threshold-clip-above-"+x},o.createElement("path",{d:c||""})))})),o.createElement(f,d({curve:e,data:u,defined:s,x:a,y0:l,y1:h,strokeWidth:0,clipPath:"url(#threshold-clip-below-"+x+")"},_)),o.createElement(f,d({curve:e,data:u,defined:s,x:a,y0:l,y1:h,strokeWidth:0,clipPath:"url(#threshold-clip-above-"+x+")"},y)))}p.propTypes={id:r().string.isRequired,children:r().node},_.propTypes={className:r().string,clipAboveTo:r().oneOfType([r().func,r().number]).isRequired,clipBelowTo:r().oneOfType([r().func,r().number]).isRequired,id:r().string.isRequired,data:r().array.isRequired,defined:r().func,x:r().oneOfType([r().func,r().number]).isRequired,y0:r().oneOfType([r().func,r().number]).isRequired,y1:r().oneOfType([r().func,r().number]).isRequired}},61655:function(t,n,e){"use strict";e.d(n,{Z:function(){return u}});var i=e(82684),r=e(29179);function o(){return o=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},o.apply(this,arguments)}function u(t,n,e){void 0===n&&(n={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===e&&(e=function(t,n){return i.createElement("div",n,t)});return function(u){var c=(0,r.Z)();return e(i.createElement(t,o({},c,u)),n)}}},35681:function(t,n){"use strict";var e=Math.PI,i=2*e,r=1e-6,o=i-r;function u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c(){return new u}u.prototype=c.prototype={constructor:u,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,n,i,o,u){t=+t,n=+n,i=+i,o=+o,u=+u;var c=this._x1,s=this._y1,a=i-t,l=o-n,f=c-t,h=s-n,y=f*f+h*h;if(u<0)throw new Error("negative radius: "+u);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(y>r)if(Math.abs(h*a-l*f)>r&&u){var p=i-c,d=o-s,_=a*a+l*l,v=p*p+d*d,x=Math.sqrt(_),m=Math.sqrt(y),b=u*Math.tan((e-Math.acos((_+y-v)/(2*x*m)))/2),g=b/m,Z=b/x;Math.abs(g-1)>r&&(this._+="L"+(t+g*f)+","+(n+g*h)),this._+="A"+u+","+u+",0,0,"+ +(h*p>f*d)+","+(this._x1=t+Z*a)+","+(this._y1=n+Z*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,u,c,s,a){t=+t,n=+n,a=!!a;var l=(u=+u)*Math.cos(c),f=u*Math.sin(c),h=t+l,y=n+f,p=1^a,d=a?c-s:s-c;if(u<0)throw new Error("negative radius: "+u);null===this._x1?this._+="M"+h+","+y:(Math.abs(this._x1-h)>r||Math.abs(this._y1-y)>r)&&(this._+="L"+h+","+y),u&&(d<0&&(d=d%i+i),d>o?this._+="A"+u+","+u+",0,1,"+p+","+(t-l)+","+(n-f)+"A"+u+","+u+",0,1,"+p+","+(this._x1=h)+","+(this._y1=y):d>r&&(this._+="A"+u+","+u+",0,"+ +(d>=e)+","+p+","+(this._x1=t+u*Math.cos(s))+","+(this._y1=n+u*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},n.Z=c},48167:function(t,n,e){"use strict";e.d(n,{Z:function(){return s}});var i=e(35681),r=e(90875),o=e(23622),u=e(92201),c=e(98930);function s(){var t=c.x,n=null,e=(0,r.Z)(0),s=c.y,a=(0,r.Z)(!0),l=null,f=o.Z,h=null;function y(r){var o,u,c,y,p,d=r.length,_=!1,v=new Array(d),x=new Array(d);for(null==l&&(h=f(p=(0,i.Z)())),o=0;o<=d;++o){if(!(o<d&&a(y=r[o],o,r))===_)if(_=!_)u=o,h.areaStart(),h.lineStart();else{for(h.lineEnd(),h.lineStart(),c=o-1;c>=u;--c)h.point(v[c],x[c]);h.lineEnd(),h.areaEnd()}_&&(v[o]=+t(y,o,r),x[o]=+e(y,o,r),h.point(n?+n(y,o,r):v[o],s?+s(y,o,r):x[o]))}if(p)return h=null,p+""||null}function p(){return(0,u.Z)().defined(a).curve(f).context(l)}return y.x=function(e){return arguments.length?(t="function"===typeof e?e:(0,r.Z)(+e),n=null,y):t},y.x0=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),y):t},y.x1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),y):n},y.y=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),s=null,y):e},y.y0=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),y):e},y.y1=function(t){return arguments.length?(s=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),y):s},y.lineX0=y.lineY0=function(){return p().x(t).y(e)},y.lineY1=function(){return p().x(t).y(s)},y.lineX1=function(){return p().x(n).y(e)},y.defined=function(t){return arguments.length?(a="function"===typeof t?t:(0,r.Z)(!!t),y):a},y.curve=function(t){return arguments.length?(f=t,null!=l&&(h=f(l)),y):f},y.context=function(t){return arguments.length?(null==t?l=h=null:h=f(l=t),y):l},y}},97745:function(t,n,e){"use strict";function i(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function r(t){this._context=t}function o(t){return new r(t)}e.d(n,{ZP:function(){return o},fE:function(){return r},xm:function(){return i}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}}},23622:function(t,n,e){"use strict";function i(t){this._context=t}function r(t){return new i(t)}e.d(n,{Z:function(){return r}}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}}},92201:function(t,n,e){"use strict";e.d(n,{Z:function(){return c}});var i=e(35681),r=e(90875),o=e(23622),u=e(98930);function c(){var t=u.x,n=u.y,e=(0,r.Z)(!0),c=null,s=o.Z,a=null;function l(r){var o,u,l,f=r.length,h=!1;for(null==c&&(a=s(l=(0,i.Z)())),o=0;o<=f;++o)!(o<f&&e(u=r[o],o,r))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,o,r),+n(u,o,r));if(l)return a=null,l+""||null}return l.x=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),l):t},l.y=function(t){return arguments.length?(n="function"===typeof t?t:(0,r.Z)(+t),l):n},l.defined=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(!!t),l):e},l.curve=function(t){return arguments.length?(s=t,null!=c&&(a=s(c)),l):s},l.context=function(t){return arguments.length?(null==t?c=a=null:a=s(c=t),l):c},l}},98930:function(t,n,e){"use strict";function i(t){return t[0]}function r(t){return t[1]}e.d(n,{x:function(){return i},y:function(){return r}})},59739:function(t,n,e){"use strict";var i=e(56669);function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function t(t,n,e,r,o,u){if(u!==i){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:r};return e.PropTypes=e,e}},47329:function(t,n,e){t.exports=e(59739)()},56669:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},80022:function(t,n,e){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}e.d(n,{Z:function(){return i}})},15544:function(t,n,e){"use strict";function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}e.d(n,{Z:function(){return i}})},13692:function(t,n,e){"use strict";e.d(n,{Z:function(){return r}});var i=e(61049);function r(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&(0,i.Z)(t,n)}},93189:function(t,n,e){"use strict";e.d(n,{Z:function(){return o}});var i=e(12539),r=e(80022);function o(t,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(t)}},61049:function(t,n,e){"use strict";function i(t,n){return i=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},i(t,n)}e.d(n,{Z:function(){return i}})}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6285],{52136:function(t,n,e){"use strict";e.d(n,{Z:function(){return _}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),s=e(5237),a=e(29989),l=e(81352),f=e(46119),h=e(38469),y=e(12765),p=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function d(){return d=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d.apply(this,arguments)}function _(t){var n=t.top,e=void 0===n?0:n,i=t.left,r=void 0===i?0:i,u=t.scale,_=t.height,v=t.stroke,x=void 0===v?"#eaf0f6":v,m=t.strokeWidth,b=void 0===m?1:m,g=t.strokeDasharray,Z=t.className,O=t.numTicks,E=void 0===O?10:O,T=t.lineStyle,w=t.offset,k=t.tickValues,j=t.children,P=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,p),N=null!=k?k:(0,f.Z)(u,E),R=(null!=w?w:0)+(0,y.Z)(u)/2,S=N.map((function(t,n){var e,i=(null!=(e=(0,h.Z)(u(t)))?e:0)+R;return{index:n,from:new l.Z({x:i,y:0}),to:new l.Z({x:i,y:_})}}));return o.createElement(a.Z,{className:c()("visx-columns",Z),top:e,left:r},j?j({lines:S}):S.map((function(t){var n=t.from,e=t.to,i=t.index;return o.createElement(s.Z,d({key:"column-line-"+i,from:n,to:e,stroke:x,strokeWidth:b,strokeDasharray:g,style:T},P))})))}_.propTypes={tickValues:r().array,height:r().number.isRequired}},85587:function(t,n,e){"use strict";e.d(n,{Z:function(){return a}});var i=e(82684),r=e(63588),o=e.n(r),u=e(39309),c=["children","data","x","y","fill","className","curve","innerRef","defined"];function s(){return s=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},s.apply(this,arguments)}function a(t){var n=t.children,e=t.data,r=void 0===e?[]:e,a=t.x,l=t.y,f=t.fill,h=void 0===f?"transparent":f,y=t.className,p=t.curve,d=t.innerRef,_=t.defined,v=void 0===_?function(){return!0}:_,x=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,c),m=(0,u.jv)({x:a,y:l,defined:v,curve:p});return n?i.createElement(i.Fragment,null,n({path:m})):i.createElement("path",s({ref:d,className:o()("visx-linepath",y),d:m(r)||"",fill:h,strokeLinecap:"round"},x))}},39309:function(t,n,e){"use strict";e.d(n,{SO:function(){return u},jv:function(){return c}});var i=e(48167),r=e(92201),o=e(49894);function u(t){var n=void 0===t?{}:t,e=n.x,r=n.x0,u=n.x1,c=n.y,s=n.y0,a=n.y1,l=n.defined,f=n.curve,h=(0,i.Z)();return e&&(0,o.Z)(h.x,e),r&&(0,o.Z)(h.x0,r),u&&(0,o.Z)(h.x1,u),c&&(0,o.Z)(h.y,c),s&&(0,o.Z)(h.y0,s),a&&(0,o.Z)(h.y1,a),l&&h.defined(l),f&&h.curve(f),h}function c(t){var n=void 0===t?{}:t,e=n.x,i=n.y,u=n.defined,c=n.curve,s=(0,r.Z)();return e&&(0,o.Z)(s.x,e),i&&(0,o.Z)(s.y,i),u&&s.defined(u),c&&s.curve(c),s}},98889:function(t,n,e){"use strict";e.d(n,{Z:function(){return _}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),s=e(39309),a=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function l(){return l=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},l.apply(this,arguments)}function f(t){var n=t.children,e=t.x,i=t.x0,r=t.x1,u=t.y,f=t.y0,h=t.y1,y=t.data,p=void 0===y?[]:y,d=t.defined,_=void 0===d?function(){return!0}:d,v=t.className,x=t.curve,m=t.innerRef,b=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,a),g=(0,s.SO)({x:e,x0:i,x1:r,y:u,y0:f,y1:h,defined:_,curve:x});return n?o.createElement(o.Fragment,null,n({path:g})):o.createElement("path",l({ref:m,className:c()("visx-area",v),d:g(p)||""},b))}var h=["id","children"];function y(){return y=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},y.apply(this,arguments)}function p(t){var n=t.id,e=t.children,i=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,h);return o.createElement("defs",null,o.createElement("clipPath",y({id:n},i),e))}function d(){return d=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d.apply(this,arguments)}function _(t){var n=t.className,e=t.curve,i=t.clipAboveTo,r=t.clipBelowTo,u=t.data,s=t.defined,a=t.x,l=t.y0,h=t.y1,y=t.aboveAreaProps,_=t.belowAreaProps,v=t.id,x=void 0===v?"":v;return o.createElement("g",{className:c()("visx-threshold",n)},o.createElement(f,{curve:e,data:u,x:a,y1:h,defined:s},(function(t){var n=t.path,e=null,c=null;return e=n.y0(r)(u),c=n.y0(i)(u),o.createElement("g",null,o.createElement(p,{id:"threshold-clip-below-"+x},o.createElement("path",{d:e||""})),o.createElement(p,{id:"threshold-clip-above-"+x},o.createElement("path",{d:c||""})))})),o.createElement(f,d({curve:e,data:u,defined:s,x:a,y0:l,y1:h,strokeWidth:0,clipPath:"url(#threshold-clip-below-"+x+")"},_)),o.createElement(f,d({curve:e,data:u,defined:s,x:a,y0:l,y1:h,strokeWidth:0,clipPath:"url(#threshold-clip-above-"+x+")"},y)))}p.propTypes={id:r().string.isRequired,children:r().node},_.propTypes={className:r().string,clipAboveTo:r().oneOfType([r().func,r().number]).isRequired,clipBelowTo:r().oneOfType([r().func,r().number]).isRequired,id:r().string.isRequired,data:r().array.isRequired,defined:r().func,x:r().oneOfType([r().func,r().number]).isRequired,y0:r().oneOfType([r().func,r().number]).isRequired,y1:r().oneOfType([r().func,r().number]).isRequired}},61655:function(t,n,e){"use strict";e.d(n,{Z:function(){return u}});var i=e(82684),r=e(29179);function o(){return o=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},o.apply(this,arguments)}function u(t,n,e){void 0===n&&(n={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===e&&(e=function(t,n){return i.createElement("div",n,t)});return function(u){var c=(0,r.Z)();return e(i.createElement(t,o({},c,u)),n)}}},35681:function(t,n){"use strict";var e=Math.PI,i=2*e,r=1e-6,o=i-r;function u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c(){return new u}u.prototype=c.prototype={constructor:u,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,n,i,o,u){t=+t,n=+n,i=+i,o=+o,u=+u;var c=this._x1,s=this._y1,a=i-t,l=o-n,f=c-t,h=s-n,y=f*f+h*h;if(u<0)throw new Error("negative radius: "+u);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(y>r)if(Math.abs(h*a-l*f)>r&&u){var p=i-c,d=o-s,_=a*a+l*l,v=p*p+d*d,x=Math.sqrt(_),m=Math.sqrt(y),b=u*Math.tan((e-Math.acos((_+y-v)/(2*x*m)))/2),g=b/m,Z=b/x;Math.abs(g-1)>r&&(this._+="L"+(t+g*f)+","+(n+g*h)),this._+="A"+u+","+u+",0,0,"+ +(h*p>f*d)+","+(this._x1=t+Z*a)+","+(this._y1=n+Z*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,u,c,s,a){t=+t,n=+n,a=!!a;var l=(u=+u)*Math.cos(c),f=u*Math.sin(c),h=t+l,y=n+f,p=1^a,d=a?c-s:s-c;if(u<0)throw new Error("negative radius: "+u);null===this._x1?this._+="M"+h+","+y:(Math.abs(this._x1-h)>r||Math.abs(this._y1-y)>r)&&(this._+="L"+h+","+y),u&&(d<0&&(d=d%i+i),d>o?this._+="A"+u+","+u+",0,1,"+p+","+(t-l)+","+(n-f)+"A"+u+","+u+",0,1,"+p+","+(this._x1=h)+","+(this._y1=y):d>r&&(this._+="A"+u+","+u+",0,"+ +(d>=e)+","+p+","+(this._x1=t+u*Math.cos(s))+","+(this._y1=n+u*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},n.Z=c},48167:function(t,n,e){"use strict";e.d(n,{Z:function(){return s}});var i=e(35681),r=e(90875),o=e(23622),u=e(92201),c=e(98930);function s(){var t=c.x,n=null,e=(0,r.Z)(0),s=c.y,a=(0,r.Z)(!0),l=null,f=o.Z,h=null;function y(r){var o,u,c,y,p,d=r.length,_=!1,v=new Array(d),x=new Array(d);for(null==l&&(h=f(p=(0,i.Z)())),o=0;o<=d;++o){if(!(o<d&&a(y=r[o],o,r))===_)if(_=!_)u=o,h.areaStart(),h.lineStart();else{for(h.lineEnd(),h.lineStart(),c=o-1;c>=u;--c)h.point(v[c],x[c]);h.lineEnd(),h.areaEnd()}_&&(v[o]=+t(y,o,r),x[o]=+e(y,o,r),h.point(n?+n(y,o,r):v[o],s?+s(y,o,r):x[o]))}if(p)return h=null,p+""||null}function p(){return(0,u.Z)().defined(a).curve(f).context(l)}return y.x=function(e){return arguments.length?(t="function"===typeof e?e:(0,r.Z)(+e),n=null,y):t},y.x0=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),y):t},y.x1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),y):n},y.y=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),s=null,y):e},y.y0=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),y):e},y.y1=function(t){return arguments.length?(s=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),y):s},y.lineX0=y.lineY0=function(){return p().x(t).y(e)},y.lineY1=function(){return p().x(t).y(s)},y.lineX1=function(){return p().x(n).y(e)},y.defined=function(t){return arguments.length?(a="function"===typeof t?t:(0,r.Z)(!!t),y):a},y.curve=function(t){return arguments.length?(f=t,null!=l&&(h=f(l)),y):f},y.context=function(t){return arguments.length?(null==t?l=h=null:h=f(l=t),y):l},y}},97745:function(t,n,e){"use strict";function i(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function r(t){this._context=t}function o(t){return new r(t)}e.d(n,{ZP:function(){return o},fE:function(){return r},xm:function(){return i}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}}},23622:function(t,n,e){"use strict";function i(t){this._context=t}function r(t){return new i(t)}e.d(n,{Z:function(){return r}}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}}},92201:function(t,n,e){"use strict";e.d(n,{Z:function(){return c}});var i=e(35681),r=e(90875),o=e(23622),u=e(98930);function c(){var t=u.x,n=u.y,e=(0,r.Z)(!0),c=null,s=o.Z,a=null;function l(r){var o,u,l,f=r.length,h=!1;for(null==c&&(a=s(l=(0,i.Z)())),o=0;o<=f;++o)!(o<f&&e(u=r[o],o,r))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,o,r),+n(u,o,r));if(l)return a=null,l+""||null}return l.x=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),l):t},l.y=function(t){return arguments.length?(n="function"===typeof t?t:(0,r.Z)(+t),l):n},l.defined=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(!!t),l):e},l.curve=function(t){return arguments.length?(s=t,null!=c&&(a=s(c)),l):s},l.context=function(t){return arguments.length?(null==t?c=a=null:a=s(c=t),l):c},l}},98930:function(t,n,e){"use strict";function i(t){return t[0]}function r(t){return t[1]}e.d(n,{x:function(){return i},y:function(){return r}})},59739:function(t,n,e){"use strict";var i=e(56669);function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function t(t,n,e,r,o,u){if(u!==i){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:r};return e.PropTypes=e,e}},47329:function(t,n,e){t.exports=e(59739)()},56669:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},80022:function(t,n,e){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}e.d(n,{Z:function(){return i}})},15544:function(t,n,e){"use strict";function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}e.d(n,{Z:function(){return i}})},13692:function(t,n,e){"use strict";e.d(n,{Z:function(){return r}});var i=e(61049);function r(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&(0,i.Z)(t,n)}},93189:function(t,n,e){"use strict";e.d(n,{Z:function(){return o}});var i=e(12539),r=e(80022);function o(t,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(t)}},61049:function(t,n,e){"use strict";function i(t,n){return i=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},i(t,n)}e.d(n,{Z:function(){return i}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6798],{27277:function(e,n,t){var r=t(82394),o=t(21831),i=t(82684),u=t(39643),c=t(44688),l=t(28598);function a(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?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.highlightedItemIndexInitial,t=void 0===n?null:n,r=e.itemGroups,a=e.noResultGroups,s=e.onHighlightItemIndexChange,f=e.onMouseEnterItem,p=e.onMouseLeaveItem,v=e.onSelectItem,h=e.renderEmptyState,g=e.searchQuery,m=e.selectedItem,j=e.setItemRefs,y=e.uuid,b=(0,i.useState)(!0),O=b[0],x=b[1],w=(0,i.useMemo)((function(){var e=[],n=r.reduce((function(n,t){var r=t.items.filter((function(e){return!g||function(e,n){return e.searchQueries.filter((function(e){return String(e).toLowerCase().includes(n.toLowerCase())})).length>=1}(e,g)}));return 0===r.length?n:(e.push.apply(e,(0,o.Z)(r)),n.concat(d(d({},t),{},{items:r})))}),[]);return{itemGroups:n,itemsFlattened:e}}),[r,g]),Z=w.itemGroups,k=w.itemsFlattened;a&&0===k.length&&(Z.push.apply(Z,(0,o.Z)(a)),k.push.apply(k,(0,o.Z)(a.reduce((function(e,n){var t=n.items;return e.concat(t)}),[]))));var P=(0,i.useRef)(null);P.current=k.map((function(){return(0,i.createRef)()}));var I=(0,i.useState)(t),C=I[0],D=I[1],S=(0,i.useCallback)((function(e){null===s||void 0===s||s(e),D(e)}),[s,D]),E=k[C],M=(0,c.y)(),_=M.registerOnKeyDown,R=M.unregisterOnKeyDown;(0,i.useEffect)((function(){return function(){return R(y)}}),[R,y]),null===_||void 0===_||_(y,(function(e,n,t){var r,o=!0,i=k.length,c=k.findIndex((function(e,r){var o=e.keyboardShortcutValidation;return null===o||void 0===o?void 0:o({keyHistory:t,keyMapping:n},r)})),l=n[u.Gs]&&!n[u.XR]&&!m;return-1!==c?(e.preventDefault(),v(k[c]),x(o),S(c)):(n[u.Uq]||l)&&k[C]?(l&&e.preventDefault(),v(k[C]),x(o),S(C)):(n[u.Bu]?(o=!1,r=null===C?i-1:C-1):n[u.kD]?(o=!1,r=null===C?0:C+1):n[u.vP]&&S(null),"undefined"!==typeof r&&(r>=i?r=0:r<=-1&&(r=i-1),r>=0&&r<=i-1?(S(r),e.preventDefault()):S(null)),void x(o))}),[C,k,m,S,x]),(0,i.useEffect)((function(){null===j||void 0===j||j(P)}),[P,k,j]),(0,i.useEffect)((function(){var e=null===C||"undefined"===typeof C||C>=k.length;(null===g||void 0===g?void 0:g.length)>=1&&e&&S(0)}),[C,k,g,S]);var B=(0,i.useCallback)((function(){return x(!0)}),[x]);return(0,i.useEffect)((function(){return window.addEventListener("mousemove",B),function(){window.removeEventListener("mousemove",B)}}),[B]),0===Z.length&&h?h():(0,l.jsx)(l.Fragment,{children:Z.map((function(e,n){var t=e.items,r=e.renderItem,o=e.renderGroupHeader,i=e.uuid,u=n>=1?Z.slice(0,n).reduce((function(e,n){return e+n.items.length}),0):0,c=t.map((function(e,n){var t=e.itemObject,o=e.value,i=o===(null===E||void 0===E?void 0:E.value),c=n+u,a=(null===t||void 0===t?void 0:t.id)||(null===t||void 0===t?void 0:t.uuid);return(0,l.jsx)("div",{id:"item-".concat(o,"-").concat(a),onMouseMove:function(){return O&&S(c)},ref:P.current[c],children:r(e,{highlighted:i,onClick:function(){return v(e)},onMouseEnter:function(){return null===f||void 0===f?void 0:f(e)},onMouseLeave:function(){return null===p||void 0===p?void 0:p(e)}},n,c)},"item-".concat(o,"-").concat(a))}));return c.length>=1&&(0,l.jsxs)("div",{children:[null===o||void 0===o?void 0:o(),c]},i||"group-uuid-".concat(n))}))})}},81334:function(e,n,t){t.d(n,{Z:function(){return k}});var r=t(82394),o=t(82684),i=t(27277),u=t(31882),c=t(38276),l=t(48381),a=t(30160),d=t(17488),s=t(38626),f=t(44897),p=t(42631),v=t(47041),h=t(70515),g=s.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;"," ",""],v.w5,p.BG,40*h.iI,(function(e){return"\n background-color: ".concat((e.theme.background||f.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||f.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*h.iI,"px;\n ")})),m=s.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*h.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||f.Z.interactive).hoverBackground,";\n ")})),j=t(39643),y=t(3314),b=t(86735),O=t(44688),x=t(28598);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=function(e){var n,t=e.removeTag,r=e.selectTag,s=e.selectedTags,f=void 0===s?[]:s,p=e.tags,v=void 0===p?[]:p,h=e.uuid,w=(0,o.useRef)(null),k=(0,o.useState)(!1),P=k[0],I=k[1],C=(0,o.useState)(null),D=C[0],S=C[1],E=(0,o.useMemo)((function(){return(0,b.YC)(v||[],"uuid")}),[v]),M=(0,o.useMemo)((function(){return null===E||void 0===E?void 0:E.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[E]),_=(0,o.useMemo)((function(){return(null===D||void 0===D?void 0:D.length)>=1?M.concat({itemObject:{uuid:D},searchQueries:[D],value:"Add tag: ".concat(D)}):M}),[M,D]),R=(0,O.y)(),B=R.registerOnKeyDown,G=R.unregisterOnKeyDown;return(0,o.useEffect)((function(){return function(){return G(h)}}),[G,h]),null===B||void 0===B||B(h,(function(e,n){var t;P&&n[j.vP]&&(I(!1),null===w||void 0===w||null===(t=w.current)||void 0===t||t.blur())}),[P,w]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l.Z,{onClickTag:t,tags:f}),(0,x.jsxs)(c.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(d.Z,{onBlur:function(){return setTimeout((function(){return I(!1)}),150)},onChange:function(e){return S(e.target.value)},onFocus:function(){return I(!0)},ref:w,value:D||""}),(0,x.jsx)(g,{topOffset:null===w||void 0===w||null===(n=w.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(i.Z,{itemGroups:[{items:P?_:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,y.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(a.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===r||void 0===r||r(n),S(null)},searchQuery:D,uuid:h})})]})]})}},88543:function(e,n,t){t.d(n,{S:function(){return O},Z:function(){return x}});var r=t(82684),o=t(15338),i=t(97618),u=t(55485),c=t(85854),l=t(65956),a=t(82394),d=t(44085),s=t(38276),f=t(30160),p=t(17488),v=t(69650),h=t(72473),g=t(8193),m=t(70515),j=t(28598);function y(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 b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,a.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=function(e){var n,t=e.children,r=e.description,o=e.invalid,c=e.large,l=void 0===c||c,a=e.selectInput,y=e.textInput,O=e.title,x=e.toggleSwitch,w=e.warning;return(0,j.jsx)(s.Z,{p:m.cd,children:(0,j.jsxs)(u.ZP,{alignItems:"center",children:[(0,j.jsxs)(u.ZP,{flexDirection:"column",children:[(0,j.jsxs)(f.ZP,{danger:o,default:!0,large:l,warning:w,children:[O," ",o&&(0,j.jsx)(f.ZP,{danger:!0,inline:!0,large:l,children:"is required"})]}),r&&"string"===typeof r&&(0,j.jsx)(f.ZP,{muted:!0,small:!0,children:r}),r&&"string"!==typeof r&&r]}),(0,j.jsx)(s.Z,{mr:m.cd}),(0,j.jsxs)(i.Z,{flex:1,justifyContent:"flex-end",children:[t,y&&(0,j.jsx)(p.Z,b({afterIcon:(0,j.jsx)(h.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:g.Z,alignRight:!0,autoComplete:"off",large:l,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},y)),a&&(0,j.jsx)(d.Z,b(b({},a),{},{afterIcon:(0,j.jsx)(h._M,{}),afterIconSize:g.Z,alignRight:!0,autoComplete:"off",large:l,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===a||void 0===a||null===(n=a.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,j.jsx)("option",{value:t,children:n||t},t)}))})),x&&(0,j.jsx)(v.Z,{checked:!(null===x||void 0===x||!x.checked),compact:!0,onCheck:null===x||void 0===x?void 0:x.onCheck})]})]})})},x=function(e){var n=e.children,t=e.description,a=e.headerChildren,d=e.title;return(0,j.jsxs)(l.Z,{noPadding:!0,children:[(0,j.jsx)(s.Z,{p:m.cd,children:(0,j.jsxs)(u.ZP,{alignItems:"center",children:[(0,j.jsxs)(i.Z,{flex:1,flexDirection:"column",children:[(0,j.jsx)(c.Z,{level:4,children:d}),t&&"string"===typeof t&&(0,j.jsx)(s.Z,{mt:1,children:(0,j.jsx)(f.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),a]})}),r.Children.map(n,(function(e,n){return(0,j.jsxs)("div",{children:[(0,j.jsx)(o.Z,{light:!0}),e]},"".concat(d,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return l},Z:function(){return c}});var r=t(38626),o=t(44897),i=t(42631),u=t(70515),c=2*u.iI,l=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],i.n_,u.cd*u.iI,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).codeArea,";\n ")}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7022],{17022:function(e,n,i){var t=i(75582),r=i(82394),o=i(21764),s=i(82684),l=i(69864),c=i(34376),d=i(71180),u=i(70652),a=i(15338),E=i(97618),f=i(55485),m=i(85854),h=i(65956),I=i(28274),p=i(38276),x=i(75499),A=i(30160),v=i(17488),L=i(35686),g=i(8193),Z=i(72473),_=i(70515),j=i(24755),D=i(3917),b=i(76417),S=i(36717),P=i(86735),T=i(42122),R=i(72619),O=i(3314),k=i(28598);function C(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function y(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?C(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var N,B=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(N||(N={})),n.Z=function(e){var n,i=e.contained,r=e.onCancel,C=e.slug,w=(0,c.useRouter)(),W=(0,s.useState)(!0),M=W[0],U=W[1],H=(0,s.useState)(null),Y=H[0],Q=H[1],V=(0,s.useState)({}),F=V[0],K=V[1],G=(0,s.useState)(null),q=G[0],z=G[1],$=(0,s.useCallback)((function(e,n,i){z(y(y({},e),{},{permissionsMapping:(0,P.HK)(n||[],(function(e){return e.id})),usersMapping:(0,P.HK)(i||[],(function(e){return e.id}))}))}),[z]),J=(0,s.useCallback)((function(e){K((function(n){return y(y({},n),e)})),z((function(n){return y(y({},n),e)}))}),[K,z]),X=L.ZP.roles.detail(C,{},{revalidateOnFocus:!1}).data,ee=(0,s.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,s.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,l.Db)(ee?L.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):L.ZP.roles.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.role;K({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||w.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),o.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ie=(0,t.Z)(ne,2),te=ie[0],re=ie[1].isLoading,oe=(0,l.Db)(L.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){w.push("/settings/workspace/roles"),o.Am.success("Role successfully delete.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),se=(0,t.Z)(oe,2),le=se[0],ce=se[1].isLoading,de=L.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,ue=(0,s.useMemo)((function(){return(0,P.YC)((null===de||void 0===de?void 0:de.permissions)||[],"entity_name")}),[de]),ae=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.permissionsMapping)||{}}),[q]),Ee=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(ae),"entity_name")}),[ae]),fe=L.ZP.users.list({},{},{pauseFetch:!ee}).data,me=(0,s.useMemo)((function(){return(0,P.YC)((null===fe||void 0===fe?void 0:fe.users)||[],(function(e){return(0,b.s)(e)}))}),[fe]),he=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.usersMapping)||{}}),[q]),Ie=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(he),(function(e){return(0,b.s)(e)}))}),[he]),pe=(0,s.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),xe=(0,s.useMemo)((function(){return(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.PERMISSIONS),U(!1)},primary:!pe,secondary:pe,small:!0,children:"Add permission"})}),[pe,Q,U]),Ae=(0,s.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),ve=(0,s.useMemo)((function(){return(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.USERS),U(!1)},primary:!Ae,secondary:Ae,small:!0,children:"Add user"})}),[Ae]),Le=(0,s.useCallback)((function(e,n){return(0,k.jsx)(x.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,k.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/permissions/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,i=e.entity,t=e.entity_id,r=e.entity_name,o=e.entity_type,s=e.id,l=n?(0,S.q)(n):[],c=(null===l||void 0===l?void 0:l.length)||0,d=!(null===ae||void 0===ae||!ae[s]);return[(0,k.jsx)(u.Z,{checked:d,onClick:function(n){(0,O.j)(n);var i=y({},ae);d?null===i||void 0===i||delete i[s]:i[s]=e,J({permissionsMapping:i})}},"checkbox"),(0,k.jsx)(A.ZP,{default:!0,monospace:!0,children:s},"id"),(0,k.jsx)(A.ZP,{monospace:!0,children:r||i},"entityName"),(0,k.jsx)(A.ZP,{default:!0,monospace:!!o,children:o||"-"},"entityType"),(0,k.jsx)(A.ZP,{default:!0,monospace:!!t,children:t||"-"},"entityID"),(0,k.jsx)("div",{children:c>=1&&(0,k.jsx)(f.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,k.jsx)("div",{children:(0,k.jsxs)(A.ZP,{default:!0,monospace:!0,small:!0,children:[e,c>=2&&n<c-1&&(0,k.jsx)(A.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),ge=(0,s.useCallback)((function(e,n){return(0,k.jsx)(x.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===he||void 0===he?void 0:he[n]}));return(0,k.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{usersMapping:{}}:{usersMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.id,t=e.last_name,r=e.username,o=!(null===he||void 0===he||!he[i]);return[(0,k.jsx)(u.Z,{checked:o,onClick:function(n){(0,O.j)(n);var t=y({},he);o?null===t||void 0===t||delete t[i]:t[i]=e,J({usersMapping:t})}},"checkbox"),(0,k.jsx)(A.ZP,{children:r},"username"),(0,k.jsx)(A.ZP,{default:!0,children:n},"firstName"),(0,k.jsx)(A.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[he,J]),Ze=(0,s.useMemo)((function(){return Le(ue)}),[Le,ue]),_e=(0,s.useMemo)((function(){return ge(me)}),[ge,me]),je=(0,s.useMemo)((function(){return Le(Ee,!0)}),[Le,Ee]),De=(0,s.useMemo)((function(){return ge(Ie,!0)}),[ge,Ie]),be=(0,k.jsxs)(g.N,{children:[(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsx)(m.Z,{level:4,children:"Role"})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsxs)(A.ZP,{danger:"name"in F&&!(null!==q&&void 0!==q&&q.name),default:!0,large:!0,children:["Name ","name"in F&&!(null!==q&&void 0!==q&&q.name)&&(0,k.jsx)(A.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(E.Z,{flex:1,children:(0,k.jsx)(v.Z,{afterIcon:(0,k.jsx)(Z.I8,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:B,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===q||void 0===q?void 0:q.name)||""})})]})})]}),(0,k.jsx)(p.Z,{mb:_.HN}),ee&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)(m.Z,{level:4,children:"Permissions"}),(0,k.jsx)(p.Z,{mr:_.cd}),pe&&(0,k.jsx)(f.ZP,{alignItems:"center",children:xe})]})}),(0,k.jsx)(a.Z,{light:!0}),!pe&&(0,k.jsxs)(p.Z,{p:_.cd,children:[(0,k.jsx)(p.Z,{mb:_.cd,children:(0,k.jsx)(A.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,k.jsx)(f.ZP,{alignItems:"center",children:xe})]}),pe&&(0,k.jsx)(p.Z,{pb:_.Mq,children:je})]}),(0,k.jsx)(p.Z,{mb:_.HN}),(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)(m.Z,{level:4,children:"Users"}),(0,k.jsx)(p.Z,{mr:_.cd}),Ae&&(0,k.jsx)(f.ZP,{alignItems:"center",children:ve})]})}),(0,k.jsx)(a.Z,{light:!0}),!Ae&&(0,k.jsxs)(p.Z,{p:_.cd,children:[(0,k.jsx)(p.Z,{mb:_.cd,children:(0,k.jsx)(A.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,k.jsx)(f.ZP,{alignItems:"center",children:ve})]}),Ae&&(0,k.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,k.jsx)(p.Z,{mb:_.HN}),(0,k.jsxs)(h.Z,{noPadding:!0,children:[(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsx)(m.Z,{level:4,children:"Metadata"})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Last updated"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.updated_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.updated_at,{includeSeconds:!0})}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.Pf,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Created at"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.created_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.created_at,{includeSeconds:!0})}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.Pf,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})}),(0,k.jsx)(a.Z,{light:!0}),(0,k.jsx)(p.Z,{p:_.cd,children:(0,k.jsxs)(f.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,large:!0,children:"Created by"}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(0,b.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(Z.SC,{muted:!0,size:B}),(0,k.jsx)(p.Z,{mr:1})]})]})})]}),(0,k.jsx)(p.Z,{mb:_.HN})]}),(0,k.jsxs)(f.ZP,{children:[(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.vc,{}),disabled:!F||!(null!==(n=Object.keys(F))&&void 0!==n&&n.length),loading:re,onClick:function(){return te({role:y(y({},(0,T.GL)(q,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===q||void 0===q?void 0:q.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===q||void 0===q?void 0:q.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),r&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(d.ZP,{onClick:function(){return null===r||void 0===r?void 0:r()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.Z,{mr:_.cd}),(0,k.jsx)(d.ZP,{beforeIcon:(0,k.jsx)(Z.rF,{}),danger:!0,loading:ce,onClick:function(){return le()},children:"Delete role"})]})]})]});return i?be:(0,k.jsx)(I.Z,{after:N.PERMISSIONS===Y?Ze:N.USERS===Y?_e:null,afterHeader:(0,k.jsx)(p.Z,{px:_.cd,children:(0,k.jsx)(A.ZP,{bold:!0,children:Y})}),afterHidden:M,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:U,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:j.B2.ROLES,uuidWorkspaceSelected:j.Pl.USER_MANAGEMENT,children:ee&&be})}},8193:function(e,n,i){i.d(n,{N:function(){return c},Z:function(){return l}});var t=i(38626),r=i(44897),o=i(42631),s=i(70515),l=2*s.iI,c=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,i){i.d(n,{Fy:function(){return m},G9:function(){return u},H1:function(){return h},K4:function(){return c},ND:function(){return d},Pt:function(){return a},WG:function(){return o},hl:function(){return f},m_:function(){return s},oO:function(){return E}});var t,r,o,s,l=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(o||(o={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(s||(s={}));var c=(t={},(0,l.Z)(t,o.OWNER,"Owner"),(0,l.Z)(t,o.ADMIN,"Admin"),(0,l.Z)(t,o.EDITOR,"Editor"),(0,l.Z)(t,o.VIEWER,"Viewer"),(0,l.Z)(t,o.LIST,"List"),(0,l.Z)(t,o.DETAIL,"Detail"),(0,l.Z)(t,o.CREATE,"Create"),(0,l.Z)(t,o.UPDATE,"Update"),(0,l.Z)(t,o.DELETE,"Delete"),(0,l.Z)(t,o.OPERATION_ALL,"All operations"),(0,l.Z)(t,o.QUERY,"Query"),(0,l.Z)(t,o.QUERY_ALL,"Query all attributes"),(0,l.Z)(t,o.READ,"Read"),(0,l.Z)(t,o.READ_ALL,"Read all attributes"),(0,l.Z)(t,o.WRITE,"Write"),(0,l.Z)(t,o.WRITE_ALL,"Write all attributes"),(0,l.Z)(t,o.ALL,"All"),(0,l.Z)(t,o.DISABLE_LIST,"Disable list"),(0,l.Z)(t,o.DISABLE_DETAIL,"Disable detail"),(0,l.Z)(t,o.DISABLE_CREATE,"Disable create"),(0,l.Z)(t,o.DISABLE_UPDATE,"Disable update"),(0,l.Z)(t,o.DISABLE_DELETE,"Disable delete"),(0,l.Z)(t,o.DISABLE_OPERATION_ALL,"Disable all operations"),(0,l.Z)(t,o.DISABLE_QUERY,"Disable query"),(0,l.Z)(t,o.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,l.Z)(t,o.DISABLE_READ,"Disable read"),(0,l.Z)(t,o.DISABLE_READ_ALL,"Disable all read attributes"),(0,l.Z)(t,o.DISABLE_WRITE,"Disable write"),(0,l.Z)(t,o.DISABLE_WRITE_ALL,"Disable all write attributes"),t),d=(r={},(0,l.Z)(r,s.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,l.Z)(r,s.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,l.Z)(r,s.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),u=[o.OWNER,o.ADMIN,o.EDITOR,o.VIEWER,o.ALL],a=[o.LIST,o.DETAIL,o.CREATE,o.UPDATE,o.DELETE,o.OPERATION_ALL],E=[o.DISABLE_LIST,o.DISABLE_DETAIL,o.DISABLE_CREATE,o.DISABLE_UPDATE,o.DISABLE_DELETE,o.DISABLE_OPERATION_ALL],f=[o.QUERY,o.QUERY_ALL,o.DISABLE_QUERY,o.DISABLE_QUERY_ALL],m=[o.READ,o.READ_ALL,o.DISABLE_READ,o.DISABLE_READ_ALL],h=[o.WRITE,o.WRITE_ALL,o.DISABLE_WRITE,o.DISABLE_WRITE_ALL]},65956:function(e,n,i){var t=i(38626),r=i(55485),o=i(38276),s=i(30160),l=i(44897),c=i(42631),d=i(47041),u=i(70515),a=i(28598),E=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],c.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],c.n_,c.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),E,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),h=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),I=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,i=e.children,t=e.containerRef,l=e.contentContainerRef,c=e.dark,d=e.footer,u=e.fullHeight,E=void 0===u||u,p=e.fullWidth,x=void 0===p||p,A=e.header,v=e.headerHeight,L=e.headerIcon,g=e.headerPaddingVertical,Z=e.headerTitle,_=e.maxHeight,j=e.maxWidth,D=e.minWidth,b=e.noPadding,S=e.overflowVisible,P=e.subtitle,T=e.success;return(0,a.jsxs)(f,{borderless:n,dark:c,fullHeight:E,fullWidth:x,maxHeight:_,maxWidth:j,minWidth:D,overflowVisible:S,ref:t,success:T,children:[(A||Z)&&(0,a.jsxs)(m,{headerPaddingVertical:g,height:v,children:[A&&A,Z&&(0,a.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,a.jsxs)(r.ZP,{alignItems:"center",children:[L&&L,(0,a.jsx)(o.Z,{ml:L?1:0,children:(0,a.jsx)(s.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,a.jsxs)(h,{maxHeight:_,noPadding:b,overflowVisible:S,ref:l,children:[P&&(0,a.jsx)(o.Z,{mb:2,children:(0,a.jsx)(s.ZP,{default:!0,children:P})}),i]}),d&&(0,a.jsx)(I,{children:d})]})}},36717:function(e,n,i){i.d(n,{q:function(){return o}});var t=i(75582),r=i(36288);function o(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),o=r[0],s=r[1];return e&Number(o)?n.concat(s):n}),[])}},76417:function(e,n,i){function t(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return t}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7022],{17022:function(e,n,i){var t=i(75582),r=i(82394),o=i(21764),s=i(82684),l=i(69864),c=i(34376),d=i(71180),u=i(70652),a=i(15338),E=i(97618),f=i(55485),m=i(85854),h=i(65956),I=i(28274),p=i(38276),x=i(75499),A=i(30160),v=i(17488),L=i(35686),g=i(8193),Z=i(72473),_=i(70515),j=i(24755),D=i(3917),b=i(76417),S=i(36717),P=i(86735),T=i(42122),R=i(72619),O=i(3314),y=i(28598);function k(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function C(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var N,B=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(N||(N={})),n.Z=function(e){var n,i=e.contained,r=e.onCancel,k=e.slug,w=(0,c.useRouter)(),W=(0,s.useState)(!0),M=W[0],U=W[1],H=(0,s.useState)(null),Y=H[0],Q=H[1],V=(0,s.useState)({}),F=V[0],K=V[1],G=(0,s.useState)(null),q=G[0],z=G[1],$=(0,s.useCallback)((function(e,n,i){z(C(C({},e),{},{permissionsMapping:(0,P.HK)(n||[],(function(e){return e.id})),usersMapping:(0,P.HK)(i||[],(function(e){return e.id}))}))}),[z]),J=(0,s.useCallback)((function(e){K((function(n){return C(C({},n),e)})),z((function(n){return C(C({},n),e)}))}),[K,z]),X=L.ZP.roles.detail(k,{},{revalidateOnFocus:!1}).data,ee=(0,s.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,s.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,l.Db)(ee?L.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):L.ZP.roles.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(e){var n=e.role;K({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||w.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),o.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ie=(0,t.Z)(ne,2),te=ie[0],re=ie[1].isLoading,oe=(0,l.Db)(L.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){w.push("/settings/workspace/roles"),o.Am.success("Role successfully delete.",{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;o.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:o.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),se=(0,t.Z)(oe,2),le=se[0],ce=se[1].isLoading,de=L.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,ue=(0,s.useMemo)((function(){return(0,P.YC)((null===de||void 0===de?void 0:de.permissions)||[],"entity_name")}),[de]),ae=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.permissionsMapping)||{}}),[q]),Ee=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(ae),"entity_name")}),[ae]),fe=L.ZP.users.list({},{},{pauseFetch:!ee}).data,me=(0,s.useMemo)((function(){return(0,P.YC)((null===fe||void 0===fe?void 0:fe.users)||[],(function(e){return(0,b.s)(e)}))}),[fe]),he=(0,s.useMemo)((function(){return(null===q||void 0===q?void 0:q.usersMapping)||{}}),[q]),Ie=(0,s.useMemo)((function(){return(0,P.YC)(Object.values(he),(function(e){return(0,b.s)(e)}))}),[he]),pe=(0,s.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),xe=(0,s.useMemo)((function(){return(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.PERMISSIONS),U(!1)},primary:!pe,secondary:pe,small:!0,children:"Add permission"})}),[pe,Q,U]),Ae=(0,s.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),ve=(0,s.useMemo)((function(){return(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.mm,{}),compact:!0,onClick:function(){Q(N.USERS),U(!1)},primary:!Ae,secondary:Ae,small:!0,children:"Add user"})}),[Ae]),Le=(0,s.useCallback)((function(e,n){return(0,y.jsx)(x.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,y.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/permissions/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,i=e.entity,t=e.entity_id,r=e.entity_name,o=e.entity_type,s=e.id,l=n?(0,S.q)(n):[],c=(null===l||void 0===l?void 0:l.length)||0,d=!(null===ae||void 0===ae||!ae[s]);return[(0,y.jsx)(u.Z,{checked:d,onClick:function(n){(0,O.j)(n);var i=C({},ae);d?null===i||void 0===i||delete i[s]:i[s]=e,J({permissionsMapping:i})}},"checkbox"),(0,y.jsx)(A.ZP,{default:!0,monospace:!0,children:s},"id"),(0,y.jsx)(A.ZP,{monospace:!0,children:r||i},"entityName"),(0,y.jsx)(A.ZP,{default:!0,monospace:!!o,children:o||"-"},"entityType"),(0,y.jsx)(A.ZP,{default:!0,monospace:!!t,children:t||"-"},"entityID"),(0,y.jsx)("div",{children:c>=1&&(0,y.jsx)(f.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===l||void 0===l?void 0:l.map((function(e,n){return(0,y.jsx)("div",{children:(0,y.jsxs)(A.ZP,{default:!0,monospace:!0,small:!0,children:[e,c>=2&&n<c-1&&(0,y.jsx)(A.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),ge=(0,s.useCallback)((function(e,n){return(0,y.jsx)(x.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===he||void 0===he?void 0:he[n]}));return(0,y.jsx)(u.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{usersMapping:{}}:{usersMapping:(0,P.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.id,t=e.last_name,r=e.username,o=!(null===he||void 0===he||!he[i]);return[(0,y.jsx)(u.Z,{checked:o,onClick:function(n){(0,O.j)(n);var t=C({},he);o?null===t||void 0===t||delete t[i]:t[i]=e,J({usersMapping:t})}},"checkbox"),(0,y.jsx)(A.ZP,{children:r},"username"),(0,y.jsx)(A.ZP,{default:!0,children:n},"firstName"),(0,y.jsx)(A.ZP,{default:!0,children:t},"lastName")]})),uuid:"users"})}),[he,J]),Ze=(0,s.useMemo)((function(){return Le(ue)}),[Le,ue]),_e=(0,s.useMemo)((function(){return ge(me)}),[ge,me]),je=(0,s.useMemo)((function(){return Le(Ee,!0)}),[Le,Ee]),De=(0,s.useMemo)((function(){return ge(Ie,!0)}),[ge,Ie]),be=(0,y.jsxs)(g.N,{children:[(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsx)(m.Z,{level:4,children:"Role"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsxs)(A.ZP,{danger:"name"in F&&!(null!==q&&void 0!==q&&q.name),default:!0,large:!0,children:["Name ","name"in F&&!(null!==q&&void 0!==q&&q.name)&&(0,y.jsx)(A.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(E.Z,{flex:1,children:(0,y.jsx)(v.Z,{afterIcon:(0,y.jsx)(Z.I8,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:B,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===q||void 0===q?void 0:q.name)||""})})]})})]}),(0,y.jsx)(p.Z,{mb:_.HN}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(m.Z,{level:4,children:"Permissions"}),(0,y.jsx)(p.Z,{mr:_.cd}),pe&&(0,y.jsx)(f.ZP,{alignItems:"center",children:xe})]})}),(0,y.jsx)(a.Z,{light:!0}),!pe&&(0,y.jsxs)(p.Z,{p:_.cd,children:[(0,y.jsx)(p.Z,{mb:_.cd,children:(0,y.jsx)(A.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:xe})]}),pe&&(0,y.jsx)(p.Z,{pb:_.Mq,children:je})]}),(0,y.jsx)(p.Z,{mb:_.HN}),(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,y.jsx)(m.Z,{level:4,children:"Users"}),(0,y.jsx)(p.Z,{mr:_.cd}),Ae&&(0,y.jsx)(f.ZP,{alignItems:"center",children:ve})]})}),(0,y.jsx)(a.Z,{light:!0}),!Ae&&(0,y.jsxs)(p.Z,{p:_.cd,children:[(0,y.jsx)(p.Z,{mb:_.cd,children:(0,y.jsx)(A.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,y.jsx)(f.ZP,{alignItems:"center",children:ve})]}),Ae&&(0,y.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,y.jsx)(p.Z,{mb:_.HN}),(0,y.jsxs)(h.Z,{noPadding:!0,children:[(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsx)(m.Z,{level:4,children:"Metadata"})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Last updated"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.updated_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.updated_at,{includeSeconds:!0})}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.Pf,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Created at"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(null===q||void 0===q?void 0:q.created_at)&&(0,D.d$)(null===q||void 0===q?void 0:q.created_at,{includeSeconds:!0})}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.Pf,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})}),(0,y.jsx)(a.Z,{light:!0}),(0,y.jsx)(p.Z,{p:_.cd,children:(0,y.jsxs)(f.ZP,{alignItems:"center",children:[(0,y.jsx)(A.ZP,{default:!0,large:!0,children:"Created by"}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,y.jsx)(A.ZP,{large:!0,monospace:!0,muted:!0,children:(0,b.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(Z.SC,{muted:!0,size:B}),(0,y.jsx)(p.Z,{mr:1})]})]})})]}),(0,y.jsx)(p.Z,{mb:_.HN})]}),(0,y.jsxs)(f.ZP,{children:[(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.vc,{}),disabled:!F||!(null!==(n=Object.keys(F))&&void 0!==n&&n.length),loading:re,onClick:function(){return te({role:C(C({},(0,T.GL)(q,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===q||void 0===q?void 0:q.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===q||void 0===q?void 0:q.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),r&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(d.ZP,{onClick:function(){return null===r||void 0===r?void 0:r()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(p.Z,{mr:_.cd}),(0,y.jsx)(d.ZP,{beforeIcon:(0,y.jsx)(Z.rF,{}),danger:!0,loading:ce,onClick:function(){return le()},children:"Delete role"})]})]})]});return i?be:(0,y.jsx)(I.Z,{after:N.PERMISSIONS===Y?Ze:N.USERS===Y?_e:null,afterHeader:(0,y.jsx)(p.Z,{px:_.cd,children:(0,y.jsx)(A.ZP,{bold:!0,children:Y})}),afterHidden:M,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:U,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:j.B2.ROLES,uuidWorkspaceSelected:j.Pl.USER_MANAGEMENT,children:ee&&be})}},8193:function(e,n,i){i.d(n,{N:function(){return c},Z:function(){return l}});var t=i(38626),r=i(44897),o=i(42631),s=i(70515),l=2*s.iI,c=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},36288:function(e,n,i){i.d(n,{Fy:function(){return m},G9:function(){return u},H1:function(){return h},K4:function(){return c},ND:function(){return d},Pt:function(){return a},WG:function(){return o},hl:function(){return f},m_:function(){return s},oO:function(){return E}});var t,r,o,s,l=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(o||(o={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(s||(s={}));var c=(t={},(0,l.Z)(t,o.OWNER,"Owner"),(0,l.Z)(t,o.ADMIN,"Admin"),(0,l.Z)(t,o.EDITOR,"Editor"),(0,l.Z)(t,o.VIEWER,"Viewer"),(0,l.Z)(t,o.LIST,"List"),(0,l.Z)(t,o.DETAIL,"Detail"),(0,l.Z)(t,o.CREATE,"Create"),(0,l.Z)(t,o.UPDATE,"Update"),(0,l.Z)(t,o.DELETE,"Delete"),(0,l.Z)(t,o.OPERATION_ALL,"All operations"),(0,l.Z)(t,o.QUERY,"Query"),(0,l.Z)(t,o.QUERY_ALL,"Query all attributes"),(0,l.Z)(t,o.READ,"Read"),(0,l.Z)(t,o.READ_ALL,"Read all attributes"),(0,l.Z)(t,o.WRITE,"Write"),(0,l.Z)(t,o.WRITE_ALL,"Write all attributes"),(0,l.Z)(t,o.ALL,"All"),(0,l.Z)(t,o.DISABLE_LIST,"Disable list"),(0,l.Z)(t,o.DISABLE_DETAIL,"Disable detail"),(0,l.Z)(t,o.DISABLE_CREATE,"Disable create"),(0,l.Z)(t,o.DISABLE_UPDATE,"Disable update"),(0,l.Z)(t,o.DISABLE_DELETE,"Disable delete"),(0,l.Z)(t,o.DISABLE_OPERATION_ALL,"Disable all operations"),(0,l.Z)(t,o.DISABLE_QUERY,"Disable query"),(0,l.Z)(t,o.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,l.Z)(t,o.DISABLE_READ,"Disable read"),(0,l.Z)(t,o.DISABLE_READ_ALL,"Disable all read attributes"),(0,l.Z)(t,o.DISABLE_WRITE,"Disable write"),(0,l.Z)(t,o.DISABLE_WRITE_ALL,"Disable all write attributes"),t),d=(r={},(0,l.Z)(r,s.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,l.Z)(r,s.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,l.Z)(r,s.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),u=[o.OWNER,o.ADMIN,o.EDITOR,o.VIEWER,o.ALL],a=[o.LIST,o.DETAIL,o.CREATE,o.UPDATE,o.DELETE,o.OPERATION_ALL],E=[o.DISABLE_LIST,o.DISABLE_DETAIL,o.DISABLE_CREATE,o.DISABLE_UPDATE,o.DISABLE_DELETE,o.DISABLE_OPERATION_ALL],f=[o.QUERY,o.QUERY_ALL,o.DISABLE_QUERY,o.DISABLE_QUERY_ALL],m=[o.READ,o.READ_ALL,o.DISABLE_READ,o.DISABLE_READ_ALL],h=[o.WRITE,o.WRITE_ALL,o.DISABLE_WRITE,o.DISABLE_WRITE_ALL]},65956:function(e,n,i){var t=i(38626),r=i(55485),o=i(38276),s=i(30160),l=i(44897),c=i(42631),d=i(47041),u=i(70515),a=i(28598),E=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],c.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],c.n_,c.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),E,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),h=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),I=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],c.M8,c.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,i=e.children,t=e.containerRef,l=e.contentContainerRef,c=e.dark,d=e.footer,u=e.fullHeight,E=void 0===u||u,p=e.fullWidth,x=void 0===p||p,A=e.header,v=e.headerHeight,L=e.headerIcon,g=e.headerPaddingVertical,Z=e.headerTitle,_=e.maxHeight,j=e.maxWidth,D=e.minWidth,b=e.noPadding,S=e.overflowVisible,P=e.subtitle,T=e.success;return(0,a.jsxs)(f,{borderless:n,dark:c,fullHeight:E,fullWidth:x,maxHeight:_,maxWidth:j,minWidth:D,overflowVisible:S,ref:t,success:T,children:[(A||Z)&&(0,a.jsxs)(m,{headerPaddingVertical:g,height:v,children:[A&&A,Z&&(0,a.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,a.jsxs)(r.ZP,{alignItems:"center",children:[L&&L,(0,a.jsx)(o.Z,{ml:L?1:0,children:(0,a.jsx)(s.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,a.jsxs)(h,{maxHeight:_,noPadding:b,overflowVisible:S,ref:l,children:[P&&"string"===typeof P&&(0,a.jsx)(o.Z,{mb:2,children:(0,a.jsx)(s.ZP,{default:!0,children:P})}),P&&"string"!==typeof P&&P,i]}),d&&(0,a.jsx)(I,{children:d})]})}},36717:function(e,n,i){i.d(n,{q:function(){return o}});var t=i(75582),r=i(36288);function o(e){return Object.entries(r.K4).reduce((function(n,i){var r=(0,t.Z)(i,2),o=r[0],s=r[1];return e&Number(o)?n.concat(s):n}),[])}},76417:function(e,n,i){function t(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return t}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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,P=r||{},A=P.addNewBlock,R=P.blocksMapping,N=P.fetchFileTree,L=P.fetchPipeline,M=P.savePipelineContent,H=P.updatePipeline,U=[];if(null===h||void 0===h||h.forEach((function(n){var o=null===R||void 0===R?void 0:R[n];o&&o.upstream_blocks.forEach((function(n){var o,e;null!==R&&void 0!==R&&null!==(o=R[n])&&void 0!==o&&null!==(e=o.configuration)&&void 0!==e&&e.dynamic&&U.push(R[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(){H({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||!M||!O&&0!==U.length||B.push({label:function(){return O?"Disable block as dynamic":"Set block as dynamic"},onClick:function(){return M({block:f(f({},n),{},{configuration:f(f({},p),{},{dynamic:!O})})})},uuid:"dynamic"}),R||null!==n&&void 0!==n&&n.tags)((null===y||void 0===y?void 0:y.find((function(n){var o,e;return null===R||void 0===R||null===(o=R[n])||void 0===o||null===(e=o.configuration)||void 0===e?void 0:e.dynamic})))||null!==n&&void 0!==n&&null!==(D=n.tags)&&void 0!==D&&D.includes(t.L8.DYNAMIC_CHILD))&&B.push({label:function(){return S?"Don\u2019t reduce output":"Reduce output"},onClick:function(){return M({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 M({block:f(f({},n),{},{has_callback:!b})}).then((function(){N(),L()}));(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 A({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&&"string"===typeof I&&(0,s.jsx)(l.Z,{mb:2,children:(0,s.jsx)(r.ZP,{default:!0,children:I})}),I&&"string"!==typeof I&&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}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{8193:function(e,n,r){r.d(n,{N:function(){return d},Z:function(){return s}});var i=r(38626),t=r(44897),l=r(42631),o=r(70515),s=2*o.iI,d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],l.n_,o.cd*o.iI,(function(e){return"\n background-color: ".concat((e.theme.background||t.Z.background).codeArea,";\n ")}))},37361:function(e,n,r){var i=r(75582),t=r(82394),l=r(21764),o=r(82684),s=r(69864),d=r(34376),a=r(71180),c=r(70652),u=r(15338),f=r(97618),h=r(55485),g=r(85854),m=r(65956),x=r(28274),p=r(38276),E=r(75499),I=r(30160),v=r(17488),j=r(35686),Z=r(8193),A=r(72473),_=r(70515),L=r(24755),D=r(3917),S=r(76417),b=r(36717),P=r(50178),R=r(86735),T=r(42122),w=r(72619),C=r(3314),O=r(28598);function k(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?k(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var y,N=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(y||(y={})),n.Z=function(e){var n,r=e.contained,t=e.onCancel,k=e.slug,W=(0,P.PR)()||{},H=W.id,M=W.owner,U=(0,d.useRouter)(),Y=(0,o.useState)(!0),V=Y[0],z=Y[1],Q=(0,o.useState)(null),F=Q[0],q=Q[1],K=(0,o.useState)({}),G=K[0],J=K[1],$=(0,o.useState)(null),X=$[0],ee=$[1],ne=(0,o.useCallback)((function(e,n,r){ee(B(B({},e),{},{rolesMapping:(0,R.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,R.HK)(r||[],(function(e){return e.id}))}))}),[ee]),re=(0,o.useCallback)((function(e){J((function(n){return B(B({},n),e)})),ee((function(n){return B(B({},n),e)}))}),[J,ee]),ie=j.ZP.users.detail(k,{},{revalidateOnFocus:!1}).data,te=(0,o.useMemo)((function(){return null===ie||void 0===ie?void 0:ie.user}),[ie]);(0,o.useEffect)((function(){te&&ne(te,null===te||void 0===te?void 0:te.roles_new,null===te||void 0===te?void 0:te.permissions)}),[ne,te]);var le=(0,s.Db)(te?j.ZP.users.useUpdate(k):j.ZP.users.useCreate(),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.user;J({}),ne(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),te||U.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(te?"User profile successfully updated.":"New user created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),oe=(0,i.Z)(le,2),se=oe[0],de=oe[1].isLoading,ae=(0,s.Db)(j.ZP.users.useDelete(null===te||void 0===te?void 0:te.id),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){U.push("/settings/workspace/users"),l.Am.success("User successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===te||void 0===te?void 0:te.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),ce=(0,i.Z)(ae,2),ue=ce[0],fe=ce[1].isLoading,he=j.ZP.roles.list().data,ge=(0,o.useMemo)((function(){return(0,R.YC)((null===he||void 0===he?void 0:he.roles)||[],"name")}),[he]),me=(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.rolesMapping)||{}}),[X]),xe=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(me),"name")}),[me]),pe=j.ZP.permissions.list({_limit:1e3}).data,Ee=((0,o.useMemo)((function(){return(0,R.YC)((null===pe||void 0===pe?void 0:pe.permissions)||[],"entity_name")}),[pe]),(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.permissionsMapping)||{}}),[X])),Ie=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(Ee),"entity_name")}),[Ee]),ve=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),je=(0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.ROLES),z(!1)},primary:!ve,secondary:ve,small:!0,children:"Add roles"})}),[ve,q,z]),Ze=(0,o.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),Ae=((0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.PERMISSIONS),z(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add permission"})}),[Ze,q,z]),(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===me||void 0===me?void 0:me[n]}));return(0,O.jsx)(c.Z,{checked:n,onClick:function(r){(0,C.j)(r),re(n?{rolesMapping:{}}:{rolesMapping:(0,R.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,r=e.id,i=!(null===me||void 0===me||!me[r]);return[(0,O.jsx)(c.Z,{checked:i,onClick:function(n){(0,C.j)(n);var t=B({},me);i?null===t||void 0===t||delete t[r]:t[r]=e,re({rolesMapping:t})}},"checkbox"),(0,O.jsx)(I.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[me,re])),_e=(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,t=e.entity_name,l=e.entity_type,o=e.id,s=n?(0,b.q)(n):[],d=(null===s||void 0===s?void 0:s.length)||0;return[(0,O.jsx)(I.ZP,{default:!0,monospace:!0,children:o},"id"),(0,O.jsx)(I.ZP,{monospace:!0,children:t||r},"entityName"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!l,children:l||"-"},"entityType"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,O.jsx)("div",{children:d>=1&&(0,O.jsx)(h.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===s||void 0===s?void 0:s.map((function(e,n){return(0,O.jsx)("div",{children:(0,O.jsxs)(I.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,O.jsx)(I.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Le=(0,o.useMemo)((function(){return Ae(ge)}),[Ae,ge]),De=(0,o.useMemo)((function(){return Ae(xe,!0)}),[Ae,xe]),Se=(0,o.useMemo)((function(){return _e(Ie,!0)}),[_e,Ie]),be=(0,O.jsxs)(Z.N,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Profile"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Avatar"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===X||void 0===X?void 0:X.avatar)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"username"in G&&!(null!==X&&void 0!==X&&X.username),default:!0,large:!0,children:["Username ","username"in G&&!(null!==X&&void 0!==X&&X.username)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===X||void 0===X?void 0:X.username)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"First name"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===X||void 0===X?void 0:X.first_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last name"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===X||void 0===X?void 0:X.last_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[te&&(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Email"}),!te&&(0,O.jsxs)(I.ZP,{danger:"email"in G&&!(null!==X&&void 0!==X&&X.email),default:!0,large:!0,children:["Email ","email"in G&&!(null!==X&&void 0!==X&&X.email)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),te&&(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,muted:!0,children:null===X||void 0===X?void 0:X.email}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.KJ,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]}),!te&&(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.KJ,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===X||void 0===X?void 0:X.email)||""})})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Authentication"})}),(0,O.jsx)(u.Z,{light:!0}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_current"in G&&!(null!==X&&void 0!==X&&X.password_current),default:!0,large:!0,children:["Current password ","password_current"in G&&!(null!==X&&void 0!==X&&X.password_current)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_current)||""})})]})}),(0,O.jsx)(u.Z,{light:!0})]}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password"in G&&!(null!==X&&void 0!==X&&X.password),default:!0,large:!0,children:[te?"New password":"Password"," ","password"in G&&!(null!==X&&void 0!==X&&X.password)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation),default:!0,large:!0,children:["Confirm ",te?"new password":"password"," ","password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_confirmation)||""})})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(g.Z,{level:4,children:"Roles"}),(0,O.jsx)(p.Z,{mr:_.cd}),ve&&(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]})}),(0,O.jsx)(u.Z,{light:!0}),!ve&&(0,O.jsxs)(p.Z,{p:_.cd,children:[(0,O.jsx)(p.Z,{mb:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]}),ve&&(0,O.jsx)(p.Z,{pb:_.Mq,children:De})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,O.jsx)(g.Z,{level:4,children:"Permissions"})})}),(0,O.jsx)(u.Z,{light:!0}),!Ze&&(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no permissions."})}),Ze&&(0,O.jsx)(p.Z,{pb:_.Mq,children:Se})]}),(0,O.jsx)(p.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Metadata"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last updated"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.updated_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.updated_at,{includeSeconds:!0})}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(p.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Created at"}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.created_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.created_at,{includeSeconds:!0})}),(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(p.Z,{mr:1})]})]})})]}),(0,O.jsx)(p.Z,{mb:_.HN})]}),(0,O.jsxs)(h.ZP,{children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.vc,{}),disabled:!G||!(null!==(n=Object.keys(G))&&void 0!==n&&n.length),loading:de,onClick:function(){return se({user:B(B({},(0,T.GL)(X,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(te?[]:"email"),{include_blanks:!0})),{},{role_ids:Object.keys((null===X||void 0===X?void 0:X.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:te?"Save changes":"Create new user"}),t&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{onClick:function(){return null===t||void 0===t?void 0:t()},secondary:!0,children:"Cancel and go back"})]}),te&&String(H)!==String(k)&&M&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(p.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.rF,{}),danger:!0,loading:fe,onClick:function(){return ue()},children:"Delete user"})]})]})]});return r?be:(0,O.jsx)(x.Z,{after:Le,afterHeader:(0,O.jsx)(p.Z,{px:_.cd,children:(0,O.jsx)(I.ZP,{bold:!0,children:F})}),afterHidden:V,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,S.s)(X)}}],setAfterHidden:z,title:te?(0,S.s)(te):"New user",uuidItemSelected:L.B2.USERS,uuidWorkspaceSelected:L.Pl.USER_MANAGEMENT,children:te&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return g},G9:function(){return c},H1:function(){return m},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return l},hl:function(){return h},m_:function(){return o},oO:function(){return f}});var i,t,l,o,s=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(l||(l={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(o||(o={}));var d=(i={},(0,s.Z)(i,l.OWNER,"Owner"),(0,s.Z)(i,l.ADMIN,"Admin"),(0,s.Z)(i,l.EDITOR,"Editor"),(0,s.Z)(i,l.VIEWER,"Viewer"),(0,s.Z)(i,l.LIST,"List"),(0,s.Z)(i,l.DETAIL,"Detail"),(0,s.Z)(i,l.CREATE,"Create"),(0,s.Z)(i,l.UPDATE,"Update"),(0,s.Z)(i,l.DELETE,"Delete"),(0,s.Z)(i,l.OPERATION_ALL,"All operations"),(0,s.Z)(i,l.QUERY,"Query"),(0,s.Z)(i,l.QUERY_ALL,"Query all attributes"),(0,s.Z)(i,l.READ,"Read"),(0,s.Z)(i,l.READ_ALL,"Read all attributes"),(0,s.Z)(i,l.WRITE,"Write"),(0,s.Z)(i,l.WRITE_ALL,"Write all attributes"),(0,s.Z)(i,l.ALL,"All"),(0,s.Z)(i,l.DISABLE_LIST,"Disable list"),(0,s.Z)(i,l.DISABLE_DETAIL,"Disable detail"),(0,s.Z)(i,l.DISABLE_CREATE,"Disable create"),(0,s.Z)(i,l.DISABLE_UPDATE,"Disable update"),(0,s.Z)(i,l.DISABLE_DELETE,"Disable delete"),(0,s.Z)(i,l.DISABLE_OPERATION_ALL,"Disable all operations"),(0,s.Z)(i,l.DISABLE_QUERY,"Disable query"),(0,s.Z)(i,l.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,s.Z)(i,l.DISABLE_READ,"Disable read"),(0,s.Z)(i,l.DISABLE_READ_ALL,"Disable all read attributes"),(0,s.Z)(i,l.DISABLE_WRITE,"Disable write"),(0,s.Z)(i,l.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(t={},(0,s.Z)(t,o.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,s.Z)(t,o.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,s.Z)(t,o.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),t),c=[l.OWNER,l.ADMIN,l.EDITOR,l.VIEWER,l.ALL],u=[l.LIST,l.DETAIL,l.CREATE,l.UPDATE,l.DELETE,l.OPERATION_ALL],f=[l.DISABLE_LIST,l.DISABLE_DETAIL,l.DISABLE_CREATE,l.DISABLE_UPDATE,l.DISABLE_DELETE,l.DISABLE_OPERATION_ALL],h=[l.QUERY,l.QUERY_ALL,l.DISABLE_QUERY,l.DISABLE_QUERY_ALL],g=[l.READ,l.READ_ALL,l.DISABLE_READ,l.DISABLE_READ_ALL],m=[l.WRITE,l.WRITE_ALL,l.DISABLE_WRITE,l.DISABLE_WRITE_ALL]},65956:function(e,n,r){var i=r(38626),t=r(55485),l=r(38276),o=r(30160),s=r(44897),d=r(42631),a=r(47041),c=r(70515),u=r(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*c.iI,1.5*c.iI,1.5*c.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||s.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||s.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=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(e){return"\n background-color: ".concat((e.theme.background||s.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*c.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*c.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),x=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*c.iI);n.Z=function(e){var n=e.borderless,r=e.children,i=e.containerRef,s=e.contentContainerRef,d=e.dark,a=e.footer,c=e.fullHeight,f=void 0===c||c,p=e.fullWidth,E=void 0===p||p,I=e.header,v=e.headerHeight,j=e.headerIcon,Z=e.headerPaddingVertical,A=e.headerTitle,_=e.maxHeight,L=e.maxWidth,D=e.minWidth,S=e.noPadding,b=e.overflowVisible,P=e.subtitle,R=e.success;return(0,u.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:E,maxHeight:_,maxWidth:L,minWidth:D,overflowVisible:b,ref:i,success:R,children:[(I||A)&&(0,u.jsxs)(g,{headerPaddingVertical:Z,height:v,children:[I&&I,A&&(0,u.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(t.ZP,{alignItems:"center",children:[j&&j,(0,u.jsx)(l.Z,{ml:j?1:0,children:(0,u.jsx)(o.ZP,{bold:!0,default:!0,children:A})})]})})]}),(0,u.jsxs)(m,{maxHeight:_,noPadding:S,overflowVisible:b,ref:s,children:[P&&(0,u.jsx)(l.Z,{mb:2,children:(0,u.jsx)(o.ZP,{default:!0,children:P})}),r]}),a&&(0,u.jsx)(x,{children:a})]})}},36717:function(e,n,r){r.d(n,{q:function(){return l}});var i=r(75582),t=r(36288);function l(e){return Object.entries(t.K4).reduce((function(n,r){var t=(0,i.Z)(r,2),l=t[0],o=t[1];return e&Number(l)?n.concat(o):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{8193:function(e,n,r){r.d(n,{N:function(){return d},Z:function(){return s}});var i=r(38626),t=r(44897),l=r(42631),o=r(70515),s=2*o.iI,d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],l.n_,o.cd*o.iI,(function(e){return"\n background-color: ".concat((e.theme.background||t.Z.background).codeArea,";\n ")}))},37361:function(e,n,r){var i=r(75582),t=r(82394),l=r(21764),o=r(82684),s=r(69864),d=r(34376),a=r(71180),c=r(70652),u=r(15338),f=r(97618),h=r(55485),g=r(85854),m=r(65956),p=r(28274),x=r(38276),E=r(75499),I=r(30160),v=r(17488),j=r(35686),Z=r(8193),A=r(72473),_=r(70515),L=r(24755),D=r(3917),S=r(76417),b=r(36717),P=r(50178),R=r(86735),T=r(42122),w=r(72619),C=r(3314),O=r(28598);function k(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?k(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var y,N=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(y||(y={})),n.Z=function(e){var n,r=e.contained,t=e.onCancel,k=e.slug,W=(0,P.PR)()||{},H=W.id,M=W.owner,U=(0,d.useRouter)(),Y=(0,o.useState)(!0),V=Y[0],z=Y[1],Q=(0,o.useState)(null),F=Q[0],q=Q[1],K=(0,o.useState)({}),G=K[0],J=K[1],$=(0,o.useState)(null),X=$[0],ee=$[1],ne=(0,o.useCallback)((function(e,n,r){ee(B(B({},e),{},{rolesMapping:(0,R.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,R.HK)(r||[],(function(e){return e.id}))}))}),[ee]),re=(0,o.useCallback)((function(e){J((function(n){return B(B({},n),e)})),ee((function(n){return B(B({},n),e)}))}),[J,ee]),ie=j.ZP.users.detail(k,{},{revalidateOnFocus:!1}).data,te=(0,o.useMemo)((function(){return null===ie||void 0===ie?void 0:ie.user}),[ie]);(0,o.useEffect)((function(){te&&ne(te,null===te||void 0===te?void 0:te.roles_new,null===te||void 0===te?void 0:te.permissions)}),[ne,te]);var le=(0,s.Db)(te?j.ZP.users.useUpdate(k):j.ZP.users.useCreate(),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(e){var n=e.user;J({}),ne(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),te||U.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(te?"User profile successfully updated.":"New user created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),oe=(0,i.Z)(le,2),se=oe[0],de=oe[1].isLoading,ae=(0,s.Db)(j.ZP.users.useDelete(null===te||void 0===te?void 0:te.id),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){U.push("/settings/workspace/users"),l.Am.success("User successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===te||void 0===te?void 0:te.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,t=n.message,o=n.type;l.Am.error((null===r||void 0===r?void 0:r.error)||i||t,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),ce=(0,i.Z)(ae,2),ue=ce[0],fe=ce[1].isLoading,he=j.ZP.roles.list().data,ge=(0,o.useMemo)((function(){return(0,R.YC)((null===he||void 0===he?void 0:he.roles)||[],"name")}),[he]),me=(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.rolesMapping)||{}}),[X]),pe=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(me),"name")}),[me]),xe=j.ZP.permissions.list({_limit:1e3}).data,Ee=((0,o.useMemo)((function(){return(0,R.YC)((null===xe||void 0===xe?void 0:xe.permissions)||[],"entity_name")}),[xe]),(0,o.useMemo)((function(){return(null===X||void 0===X?void 0:X.permissionsMapping)||{}}),[X])),Ie=(0,o.useMemo)((function(){return(0,R.YC)(Object.values(Ee),"entity_name")}),[Ee]),ve=(0,o.useMemo)((function(){return(null===pe||void 0===pe?void 0:pe.length)>=1}),[pe]),je=(0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.ROLES),z(!1)},primary:!ve,secondary:ve,small:!0,children:"Add roles"})}),[ve,q,z]),Ze=(0,o.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>=1}),[Ie]),Ae=((0,o.useMemo)((function(){return(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.mm,{}),compact:!0,onClick:function(){q(y.PERMISSIONS),z(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add permission"})}),[Ze,q,z]),(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===me||void 0===me?void 0:me[n]}));return(0,O.jsx)(c.Z,{checked:n,onClick:function(r){(0,C.j)(r),re(n?{rolesMapping:{}}:{rolesMapping:(0,R.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,r=e.id,i=!(null===me||void 0===me||!me[r]);return[(0,O.jsx)(c.Z,{checked:i,onClick:function(n){(0,C.j)(n);var t=B({},me);i?null===t||void 0===t||delete t[r]:t[r]=e,re({rolesMapping:t})}},"checkbox"),(0,O.jsx)(I.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[me,re])),_e=(0,o.useCallback)((function(e,n){return(0,O.jsx)(E.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,t=e.entity_name,l=e.entity_type,o=e.id,s=n?(0,b.q)(n):[],d=(null===s||void 0===s?void 0:s.length)||0;return[(0,O.jsx)(I.ZP,{default:!0,monospace:!0,children:o},"id"),(0,O.jsx)(I.ZP,{monospace:!0,children:t||r},"entityName"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!l,children:l||"-"},"entityType"),(0,O.jsx)(I.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,O.jsx)("div",{children:d>=1&&(0,O.jsx)(h.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===s||void 0===s?void 0:s.map((function(e,n){return(0,O.jsx)("div",{children:(0,O.jsxs)(I.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,O.jsx)(I.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Le=(0,o.useMemo)((function(){return Ae(ge)}),[Ae,ge]),De=(0,o.useMemo)((function(){return Ae(pe,!0)}),[Ae,pe]),Se=(0,o.useMemo)((function(){return _e(Ie,!0)}),[_e,Ie]),be=(0,O.jsxs)(Z.N,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Profile"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Avatar"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===X||void 0===X?void 0:X.avatar)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"username"in G&&!(null!==X&&void 0!==X&&X.username),default:!0,large:!0,children:["Username ","username"in G&&!(null!==X&&void 0!==X&&X.username)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===X||void 0===X?void 0:X.username)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"First name"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===X||void 0===X?void 0:X.first_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last name"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===X||void 0===X?void 0:X.last_name)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[te&&(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Email"}),!te&&(0,O.jsxs)(I.ZP,{danger:"email"in G&&!(null!==X&&void 0!==X&&X.email),default:!0,large:!0,children:["Email ","email"in G&&!(null!==X&&void 0!==X&&X.email)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),te&&(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,muted:!0,children:null===X||void 0===X?void 0:X.email}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.KJ,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]}),!te&&(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.KJ,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===X||void 0===X?void 0:X.email)||""})})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Authentication"})}),(0,O.jsx)(u.Z,{light:!0}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_current"in G&&!(null!==X&&void 0!==X&&X.password_current),default:!0,large:!0,children:["Current password ","password_current"in G&&!(null!==X&&void 0!==X&&X.password_current)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_current)||""})})]})}),(0,O.jsx)(u.Z,{light:!0})]}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password"in G&&!(null!==X&&void 0!==X&&X.password),default:!0,large:!0,children:[te?"New password":"Password"," ","password"in G&&!(null!==X&&void 0!==X&&X.password)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password)||""})})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsxs)(I.ZP,{danger:"password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation),default:!0,large:!0,children:["Confirm ",te?"new password":"password"," ","password_confirmation"in G&&!(null!==X&&void 0!==X&&X.password_confirmation)&&(0,O.jsx)(I.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(f.Z,{flex:1,children:(0,O.jsx)(v.Z,{afterIcon:(0,O.jsx)(A.I8,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:N,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===X||void 0===X?void 0:X.password_confirmation)||""})})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN}),te&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(g.Z,{level:4,children:"Roles"}),(0,O.jsx)(x.Z,{mr:_.cd}),ve&&(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]})}),(0,O.jsx)(u.Z,{light:!0}),!ve&&(0,O.jsxs)(x.Z,{p:_.cd,children:[(0,O.jsx)(x.Z,{mb:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,O.jsx)(h.ZP,{alignItems:"center",children:je})]}),ve&&(0,O.jsx)(x.Z,{pb:_.Mq,children:De})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,O.jsx)(g.Z,{level:4,children:"Permissions"})})}),(0,O.jsx)(u.Z,{light:!0}),!Ze&&(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(I.ZP,{default:!0,children:"This user currently has no permissions."})}),Ze&&(0,O.jsx)(x.Z,{pb:_.Mq,children:Se})]}),(0,O.jsx)(x.Z,{mb:_.HN}),(0,O.jsxs)(m.Z,{noPadding:!0,children:[(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsx)(g.Z,{level:4,children:"Metadata"})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Last updated"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.updated_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.updated_at,{includeSeconds:!0})}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]})]})}),(0,O.jsx)(u.Z,{light:!0}),(0,O.jsx)(x.Z,{p:_.cd,children:(0,O.jsxs)(h.ZP,{alignItems:"center",children:[(0,O.jsx)(I.ZP,{default:!0,large:!0,children:"Created at"}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,O.jsx)(I.ZP,{large:!0,monospace:!0,muted:!0,children:(null===X||void 0===X?void 0:X.created_at)&&(0,D.d$)(null===X||void 0===X?void 0:X.created_at,{includeSeconds:!0})}),(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(A.Pf,{muted:!0,size:N}),(0,O.jsx)(x.Z,{mr:1})]})]})})]}),(0,O.jsx)(x.Z,{mb:_.HN})]}),(0,O.jsxs)(h.ZP,{children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.vc,{}),disabled:!G||!(null!==(n=Object.keys(G))&&void 0!==n&&n.length),loading:de,onClick:function(){return se({user:B(B({},(0,T.GL)(X,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(te?[]:"email"),{include_blanks:!0})),{},{role_ids:Object.keys((null===X||void 0===X?void 0:X.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:te?"Save changes":"Create new user"}),t&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{onClick:function(){return null===t||void 0===t?void 0:t()},secondary:!0,children:"Cancel and go back"})]}),te&&String(H)!==String(k)&&M&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{mr:_.cd}),(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(A.rF,{}),danger:!0,loading:fe,onClick:function(){return ue()},children:"Delete user"})]})]})]});return r?be:(0,O.jsx)(p.Z,{after:Le,afterHeader:(0,O.jsx)(x.Z,{px:_.cd,children:(0,O.jsx)(I.ZP,{bold:!0,children:F})}),afterHidden:V,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,S.s)(X)}}],setAfterHidden:z,title:te?(0,S.s)(te):"New user",uuidItemSelected:L.B2.USERS,uuidWorkspaceSelected:L.Pl.USER_MANAGEMENT,children:te&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return g},G9:function(){return c},H1:function(){return m},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return l},hl:function(){return h},m_:function(){return o},oO:function(){return f}});var i,t,l,o,s=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(l||(l={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(o||(o={}));var d=(i={},(0,s.Z)(i,l.OWNER,"Owner"),(0,s.Z)(i,l.ADMIN,"Admin"),(0,s.Z)(i,l.EDITOR,"Editor"),(0,s.Z)(i,l.VIEWER,"Viewer"),(0,s.Z)(i,l.LIST,"List"),(0,s.Z)(i,l.DETAIL,"Detail"),(0,s.Z)(i,l.CREATE,"Create"),(0,s.Z)(i,l.UPDATE,"Update"),(0,s.Z)(i,l.DELETE,"Delete"),(0,s.Z)(i,l.OPERATION_ALL,"All operations"),(0,s.Z)(i,l.QUERY,"Query"),(0,s.Z)(i,l.QUERY_ALL,"Query all attributes"),(0,s.Z)(i,l.READ,"Read"),(0,s.Z)(i,l.READ_ALL,"Read all attributes"),(0,s.Z)(i,l.WRITE,"Write"),(0,s.Z)(i,l.WRITE_ALL,"Write all attributes"),(0,s.Z)(i,l.ALL,"All"),(0,s.Z)(i,l.DISABLE_LIST,"Disable list"),(0,s.Z)(i,l.DISABLE_DETAIL,"Disable detail"),(0,s.Z)(i,l.DISABLE_CREATE,"Disable create"),(0,s.Z)(i,l.DISABLE_UPDATE,"Disable update"),(0,s.Z)(i,l.DISABLE_DELETE,"Disable delete"),(0,s.Z)(i,l.DISABLE_OPERATION_ALL,"Disable all operations"),(0,s.Z)(i,l.DISABLE_QUERY,"Disable query"),(0,s.Z)(i,l.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,s.Z)(i,l.DISABLE_READ,"Disable read"),(0,s.Z)(i,l.DISABLE_READ_ALL,"Disable all read attributes"),(0,s.Z)(i,l.DISABLE_WRITE,"Disable write"),(0,s.Z)(i,l.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(t={},(0,s.Z)(t,o.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,s.Z)(t,o.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,s.Z)(t,o.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),t),c=[l.OWNER,l.ADMIN,l.EDITOR,l.VIEWER,l.ALL],u=[l.LIST,l.DETAIL,l.CREATE,l.UPDATE,l.DELETE,l.OPERATION_ALL],f=[l.DISABLE_LIST,l.DISABLE_DETAIL,l.DISABLE_CREATE,l.DISABLE_UPDATE,l.DISABLE_DELETE,l.DISABLE_OPERATION_ALL],h=[l.QUERY,l.QUERY_ALL,l.DISABLE_QUERY,l.DISABLE_QUERY_ALL],g=[l.READ,l.READ_ALL,l.DISABLE_READ,l.DISABLE_READ_ALL],m=[l.WRITE,l.WRITE_ALL,l.DISABLE_WRITE,l.DISABLE_WRITE_ALL]},65956:function(e,n,r){var i=r(38626),t=r(55485),l=r(38276),o=r(30160),s=r(44897),d=r(42631),a=r(47041),c=r(70515),u=r(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*c.iI,1.5*c.iI,1.5*c.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||s.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||s.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||s.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=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(e){return"\n background-color: ".concat((e.theme.background||s.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*c.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*c.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),p=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*c.iI);n.Z=function(e){var n=e.borderless,r=e.children,i=e.containerRef,s=e.contentContainerRef,d=e.dark,a=e.footer,c=e.fullHeight,f=void 0===c||c,x=e.fullWidth,E=void 0===x||x,I=e.header,v=e.headerHeight,j=e.headerIcon,Z=e.headerPaddingVertical,A=e.headerTitle,_=e.maxHeight,L=e.maxWidth,D=e.minWidth,S=e.noPadding,b=e.overflowVisible,P=e.subtitle,R=e.success;return(0,u.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:E,maxHeight:_,maxWidth:L,minWidth:D,overflowVisible:b,ref:i,success:R,children:[(I||A)&&(0,u.jsxs)(g,{headerPaddingVertical:Z,height:v,children:[I&&I,A&&(0,u.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(t.ZP,{alignItems:"center",children:[j&&j,(0,u.jsx)(l.Z,{ml:j?1:0,children:(0,u.jsx)(o.ZP,{bold:!0,default:!0,children:A})})]})})]}),(0,u.jsxs)(m,{maxHeight:_,noPadding:S,overflowVisible:b,ref:s,children:[P&&"string"===typeof P&&(0,u.jsx)(l.Z,{mb:2,children:(0,u.jsx)(o.ZP,{default:!0,children:P})}),P&&"string"!==typeof P&&P,r]}),a&&(0,u.jsx)(p,{children:a})]})}},36717:function(e,n,r){r.d(n,{q:function(){return l}});var i=r(75582),t=r(36288);function l(e){return Object.entries(t.K4).reduce((function(n,r){var t=(0,i.Z)(r,2),l=t[0],o=t[1];return e&Number(l)?n.concat(o):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
|