mage-ai 0.9.74__py3-none-any.whl → 0.9.75__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/llm_pipeline_wizard.py +6 -4
- mage_ai/ai/openai_client.py +7 -5
- mage_ai/data_integrations/destinations/constants.py +1 -0
- mage_ai/data_preparation/models/block/__init__.py +4 -4
- mage_ai/data_preparation/models/constants.py +1 -1
- mage_ai/data_preparation/models/pipeline.py +5 -0
- mage_ai/data_preparation/templates/data_exporters/streaming/elasticsearch.yaml +3 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +6 -3
- mage_ai/io/base.py +29 -1
- mage_ai/io/oracledb.py +2 -4
- mage_ai/io/postgres.py +38 -19
- mage_ai/io/utils.py +18 -0
- mage_ai/orchestration/db/__init__.py +3 -3
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +3 -3
- mage_ai/server/frontend_dist/_next/static/38-PtskJFUTYUpRhT1qF_/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/449-f689774546860ca4.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js → _app-13bf3b7dcef50c29.js} +2 -2
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-b9a067f3bd0a3a05.js → webpack-0bc44da590c7cf85.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/overview.html +6 -6
- mage_ai/server/frontend_dist/manage/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +7 -7
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist/v2.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-39a5174f6a3924db.js → 3763-aabe2703076636b0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-f689774546860ca4.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist_base_path_template/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js → _app-0392ef723ea2c6f8.js} +2 -2
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist_base_path_template/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist_base_path_template/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{overview-1aad7093c6d39257.js → overview-aae747f487e08d51.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist_base_path_template/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist_base_path_template/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/dxnSzgIvSG4Ke5LM-tPQX/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +7 -7
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/v2/canvas.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/server.py +9 -0
- mage_ai/services/teams/config.py +13 -2
- mage_ai/services/teams/teams.py +13 -11
- mage_ai/shared/constants.py +3 -1
- mage_ai/shared/enum.py +2 -5
- mage_ai/shared/environments.py +27 -3
- mage_ai/streaming/sinks/elasticsearch.py +15 -5
- mage_ai/tests/api/endpoints/test_blocks.py +1 -101
- mage_ai/tests/api/endpoints/test_configuration_options.py +1 -48
- mage_ai/tests/api/endpoints/test_configuration_options_project_platform.py +68 -0
- mage_ai/tests/api/endpoints/test_custom_designs.py +1 -106
- mage_ai/tests/api/endpoints/test_custom_designs_project_platform.py +132 -0
- mage_ai/tests/api/endpoints/test_dbt_blocks.py +111 -0
- mage_ai/tests/api/endpoints/test_file_contents.py +0 -48
- mage_ai/tests/api/endpoints/test_file_contents_with_project_platform.py +66 -0
- mage_ai/tests/api/endpoints/test_pipelines.py +0 -134
- mage_ai/tests/api/endpoints/test_pipelines_with_project_platform.py +143 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +3 -3
- mage_ai/tests/data_preparation/models/test_block.py +7 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +0 -63
- mage_ai/tests/data_preparation/test_repo_manager_project_platform.py +67 -0
- mage_ai/tests/data_preparation/test_variable_manager.py +0 -51
- mage_ai/tests/data_preparation/test_variable_manager_project_platform.py +41 -0
- mage_ai/tests/io/create_table/test_postgresql.py +27 -0
- mage_ai/tests/orchestration/notification/test_config.py +3 -3
- mage_ai-0.9.75.dist-info/METADATA +377 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/RECORD +296 -289
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/pLWT6Sqd09xYpufCVIqnz/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/JQewSAObpbhO0wrdAM6Ng/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
- mage_ai-0.9.74.dist-info/METADATA +0 -544
- /mage_ai/server/frontend_dist/_next/static/{pLWT6Sqd09xYpufCVIqnz → 38-PtskJFUTYUpRhT1qF_}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-5bdff745074fb350.js.LICENSE.txt → _app-13bf3b7dcef50c29.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-90de19bc03f1484b.js.LICENSE.txt → _app-0392ef723ea2c6f8.js.LICENSE.txt} +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{JQewSAObpbhO0wrdAM6Ng → dxnSzgIvSG4Ke5LM-tPQX}/_ssgManifest.js +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.74.dist-info → mage_ai-0.9.75.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1187],{94629:function(e,t,n){n.d(t,{Z:function(){return _}});var o=n(82394),r=n(21831),l=n(82684),i=n(50724),s=n(82555),u=n(97618),c=n(70613),a=n(31557),d=n(68899),p=n(28598);function h(e,t){var n=e.children,o=e.noPadding;return(0,p.jsx)(d.HS,{noPadding:o,ref:t,children:n})}var f=l.forwardRef(h),v=n(62547),m=n(82571),j=n(77417),x=n(46684),g=n(75375);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var n=e.after,o=e.afterHeader,l=e.afterHidden,h=e.afterWidth,b=e.afterWidthOverride,Z=e.appendBreadcrumbs,_=e.before,O=e.beforeHeader,P=e.beforeWidth,k=e.breadcrumbs,S=e.children,E=e.contained,w=e.errors,A=e.headerMenuItems,R=e.headerOffset,C=e.hideAfterCompletely,I=e.mainContainerHeader,T=e.navigationItems,N=e.setAfterHidden,D=e.setAfterWidth,L=e.setBeforeWidth,U=e.setErrors,B=e.subheaderChildren,M=e.subheaderNoPadding,H=e.title,F=e.uuid,G=(0,g.Z)(F,{beforeResizeOffset:g.H,setWidthAfter:D,setWidthBefore:L,widthAfter:h,widthBefore:P,widthOverrideAfter:b}),W=G.mainContainerRef,Y=G.mousedownActiveAfter,Q=G.mousedownActiveBefore,V=G.setMousedownActiveAfter,K=G.setMousedownActiveBefore,q=G.setWidthAfter,z=G.setWidthBefore,X=G.widthAfter,$=G.widthBefore,J=(0,j.Z)().project,ee=[];return k&&ee.push.apply(ee,(0,r.Z)(k)),null!=k&&k.length&&!Z||!J||null!=k&&k.length||ee.unshift({bold:!Z,label:function(){return H}}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Z,{title:H}),(0,p.jsx)(a.Z,{breadcrumbs:ee,menuItems:A}),(0,p.jsxs)(d.Nk,{ref:t,children:[0!==(null==T?void 0:T.length)&&(0,p.jsx)(d.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:T,showMore:!0})}),(0,p.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:n,afterHeader:o,afterHeightOffset:x.Mz,afterHidden:l,afterMousedownActive:Y,afterWidth:X,before:_,beforeHeader:O,beforeHeightOffset:x.Mz,beforeMousedownActive:Q,beforeWidth:_?$:d.k1,contained:E,headerOffset:R,hideAfterCompletely:!n||C,leftOffset:_?d.k1:null,mainContainerHeader:I,mainContainerRef:W,setAfterHidden:N,setAfterMousedownActive:V,setAfterWidth:q,setBeforeMousedownActive:K,setBeforeWidth:z,children:[B&&(0,p.jsx)(f,{noPadding:M,children:B}),S]})})]}),w&&(0,p.jsx)(i.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==U?void 0:U(null)},children:(0,p.jsx)(s.Z,y(y({},w),{},{onClose:function(){return null==U?void 0:U(null)}}))})]})}var _=l.forwardRef(Z)},46866:function(e,t,n){n.d(t,{Z:function(){return he}});var o=n(30018),r=n(21831),l=n(82394),i=n(75582),s=n(12691),u=n.n(s),c=n(9518),a=n(21764),d=n(82684),p=n(83455),h=n(34376),f=n(32013),v=n(98777),m=n(71180),j=n(31882),x=n(97618),g=n(55485),b=n(14466),y=n(48670),Z=n(88543),_=n(38276),O=n(30160),P=n(35686),k=n(72473),S=n(8193),E=n(70515),w=n(81728),A=n(3917),R=n(55283),C=n(50178),I=n(86735),T=n(72619),N=n(44085),D=n(17488),L=n(28598);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M="CUSTOM_VALUE_TYPE",H={compact:!0,monospace:!0,small:!0};var F=function(e){var t=e.leftKey,n=e.leftObjectKeys,o=e.leftObjectType,r=e.leftObjectTypeState,i=e.leftValue,s=e.leftValueType,u=e.rightAligned,c=e.setLeftKey,a=e.setLeftObjectTypeState,p=e.updatePredicate,h=(0,d.useRef)(null),f=(0,d.useState)(),v=f[0],j=f[1];(0,d.useEffect)((function(){var e,t;j(null==h||null===(e=h.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)}),[]),(0,d.useEffect)((function(){var e,t;j(null==h||null===(e=h.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)}),[o,r]);var x=(0,d.useMemo)((function(){return{alignItems:"center",justifyContent:u?"flex-start":"flex-end"}}),[u]),y=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Value data type"}),t=(0,L.jsx)(N.Z,{compact:!0,onChange:function(e){return p((0,l.Z)({},u?"right_value_type":"left_value_type",B(B({},s),{},{value_data_type:e.target.value})))},placeholder:"required",small:!0,value:null==s?void 0:s.value_data_type,children:Object.values(b.t4).map((function(e){return(0,L.jsx)("option",{value:e,children:e.toLowerCase()},e)}))});return(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[u?t:e,(0,L.jsx)(_.Z,{mr:1}),u?e:t]}))}),[s,u,x,p]),Z=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Get value from"}),t=M===String(r)||!o&&i,n=(0,L.jsxs)(N.Z,B(B({},H),{},{onChange:function(e){var t,n,o=e.target.value;(a(o),M===o)?p((t={},(0,l.Z)(t,u?"right_object_keys":"left_object_keys",null),(0,l.Z)(t,u?"right_object_type":"left_object_type",null),t)):p((n={},(0,l.Z)(n,u?"right_object_type":"left_object_type",o),(0,l.Z)(n,u?"right_value":"left_value",null),n))},placeholder:"required",value:t?M:o,children:[(0,L.jsx)("option",{value:M,children:"Custom value"}),Object.values(b.XG).map((function(e){return(0,L.jsx)("option",{value:e,children:e.toLowerCase()},e)}))]})),s=t&&(0,L.jsxs)(L.Fragment,{children:[!u&&(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(D.Z,B(B({},H),{},{onChange:function(e){return p((0,l.Z)({},u?"right_value":"left_value",e.target.value))},value:i||""})),u&&(0,L.jsx)(_.Z,{mr:1})]});return(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[!u&&e,u&&s,u&&n,(0,L.jsx)(_.Z,{mr:1}),!u&&n,!u&&s,u&&e]}))}),[o,r,i,a,x,p]),P=(0,d.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[u&&(0,L.jsx)("div",{style:{paddingRight:4}}),(0,L.jsx)(m.ZP,{compact:!0,disabled:!t,onClick:function(){p((0,l.Z)({},u?"right_object_keys":"left_object_keys",(n||[]).concat(t))),c(null)},padding:"2px 6px",ref:h,small:!0,children:"Add key"}),!u&&(0,L.jsx)("div",{style:{paddingRight:4}})]})}),[t,n,u,c,p]),S=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Value extraction keys"}),r=(0,L.jsx)(D.Z,B(B({},H),{},{buttonAfter:!u&&P,buttonAfterWidth:u||void 0===v?null:v+10,buttonBefore:u&&P,buttonBeforeWidth:u&&void 0!==v?v+10:null,onChange:function(e){c(e.target.value)},placeholder:"Enter key...",value:t||""}));L.Fragment,L.Fragment;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[u?r:e,(0,L.jsx)(_.Z,{mr:1}),u?e:r]})),(null==n?void 0:n.length)>=1&&(0,L.jsx)(_.Z,{mt:1,children:(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,xsmall:!0,children:o}),!(null!=n&&n.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:"..."}),"']"]}),null==n?void 0:n.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:e}),"']"]})})),(0,L.jsx)("div",{style:{marginRight:4}}),(0,L.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){p((0,l.Z)({},u?"right_object_keys":"left_object_keys",(n||[]).slice(0,Math.max(0,(null==n?void 0:n.length)-1))))},children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Close,{danger:!0,size:1.25*E.iI}),(0,L.jsx)("div",{style:{marginRight:2}}),(0,L.jsx)(O.ZP,{default:!0,xsmall:!0,children:"Delete key"})]})})]}))})]})}),[v,P,t,n,o,u,x]);return(0,L.jsxs)(L.Fragment,{children:[y,(0,L.jsx)(_.Z,{mt:1}),Z,(0,L.jsx)(_.Z,{mt:1}),o&&M!==String(r)&&S]})},G=n(65956),W=n(44897),Y=n(61896),Q=1.25*E.iI,V=1.5*E.iI,K=E.iI/4,q=.75*E.iI,z=E.iI/2,X=(0,c.css)([""," ",""],(function(e){return!e.default&&"\n background-color: ".concat((e.theme.accent||W.Z.accent).purple,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.content||W.Z.content).muted,";\n ")})),$=c.default.div.withConfig({displayName:"indexstyle__LabelStyle",componentId:"sc-1v7t9a0-0"})(["border-radius:100px;padding:","px ","px;",""],K,V,(function(e){return"\n background-color: ".concat((e.theme.background||W.Z.background).chartBlock,";\n border: ").concat(1,"px solid ").concat((e.theme.interactive||W.Z.interactive).defaultBorder,";\n ")})),J=c.default.div.withConfig({displayName:"indexstyle__CircleStyle",componentId:"sc-1v7t9a0-1"})(["",";border-radius:","px;height:","px;width:","px;",""],X,1.25*E.iI,Q,Q,(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||W.Z.interactive).hoverBorder,";\n ")})),ee=c.default.div.withConfig({displayName:"indexstyle__OperatorStyle",componentId:"sc-1v7t9a0-2"})(["",";min-width:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],X,Q+2*(1+V),E.iI/4,z,z,E.iI/4+1),te=c.default.div.withConfig({displayName:"indexstyle__VerticalLineStyle",componentId:"sc-1v7t9a0-3"})(["",";width:","px;margin-right:","px;"," ",""],X,q,V+1+Q/2-q/2,(function(e){return e.last&&"\n height: calc(50% - ".concat(K+1+Y.dN/2,"px);\n ")}),(function(e){return!e.last&&"\n height: 100%;\n "}));var ne=function(e){var t=e.andOrOperator,n=e.children,o=e.first,r=e.last,l=e.level,i=e.predicate,s=e.removePredicate,u=e.title,c=e.updatePredicate,a=(0,d.useRef)(null),p=(0,d.useState)(null),h=p[0],f=p[1],v=(0,d.useState)(null),j=v[0],y=v[1],Z=(0,d.useState)(null),P=Z[0],S=Z[1],w=(0,d.useState)(null),A=w[0],R=w[1],C=(0,d.useState)(null),I=(C[0],C[1]),T=(i.and_or_operator,i.left_object_keys),D=i.left_object_type,U=i.left_value,B=i.left_value_type,M=i.operator,H=i.right_object_keys,W=i.right_object_type,Y=i.right_value,Q=i.right_value_type;(0,d.useEffect)((function(){var e,t;I(null==a||null===(e=a.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)}),[]),(0,d.useEffect)((function(){var e,t;I(null==a||null===(e=a.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)}),[D,W]);var V=(0,d.useMemo)((function(){if(!t)return null;var e=(0,L.jsx)(O.ZP,{bold:!0,center:!0,monospace:!0,uppercase:!0,children:t});return(0,L.jsx)(ee,{default:b.YB.OR===t,children:e})}),[t,l]);return(0,L.jsxs)(g.ZP,{children:[(0,L.jsxs)(g.ZP,{alignItems:"flex-end",flexDirection:"column",children:[!o&&r&&(0,L.jsx)(te,{default:b.YB.OR===t,last:!0}),(0,L.jsx)($,{children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(O.ZP,{monospace:!0,children:u}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(J,{default:b.YB.OR===t})]})}),!r&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(te,{default:b.YB.OR===t}),V,(0,L.jsx)(te,{default:b.YB.OR===t})]})]}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(x.Z,{flex:1,children:(0,L.jsxs)(g.ZP,{flexDirection:"column",fullWidth:!0,ref:a,children:[(0,L.jsxs)(G.Z,{dark:!!(l%2),children:[(0,L.jsxs)(g.ZP,{children:[(0,L.jsxs)(x.Z,{flex:1,flexDirection:"column",children:[(0,L.jsxs)(g.ZP,{justifyContent:"center",children:[(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"flex-end",children:[!D&&void 0===U&&(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Left expression"}),!D&&U&&(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:b.t4.STRING===(null==B?void 0:B.value_data_type)?"'".concat(U,"'"):U}),D&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:D}),!(null!=T&&T.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null==T?void 0:T.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:M?b.N_[M]:"operator"}),(!M||!b.i9.includes(M))&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{mr:1}),(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"flex-start",children:[!W&&void 0===Y&&(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Right expression"}),!W&&Y&&(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:b.t4.STRING===(null==Q?void 0:Q.value_data_type)?"'".concat(Y,"'"):Y}),W&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:W}),!(null!=H&&H.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null==H?void 0:H.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]})]})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(x.Z,{flex:1,flexDirection:"column",children:(0,L.jsx)(F,{leftKey:j,leftObjectKeys:T,leftObjectType:D,leftObjectTypeState:h,leftValue:U,leftValueType:B,setLeftKey:y,setLeftObjectTypeState:f,updatePredicate:c})}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)("div",{children:(0,L.jsx)(N.Z,{alignCenter:!0,compact:!0,onChange:function(e){return c({operator:e.target.value})},placeholder:"required",small:!0,value:M,children:Object.values(b.W6).map((function(e){return(0,L.jsx)("option",{value:e,children:b.N_[e]},e)}))})}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(x.Z,{flex:1,flexDirection:"column",children:(0,L.jsx)(F,{leftKey:A,leftObjectKeys:H,leftObjectType:W,leftObjectTypeState:P,leftValue:Y,leftValueType:Q,rightAligned:!0,setLeftKey:R,setLeftObjectTypeState:S,updatePredicate:c})})]})]}),(0,L.jsx)("div",{children:(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Trash,{muted:!0,size:1.25*E.iI}),compact:!0,onClick:function(){return s()},small:!0,children:(0,L.jsxs)(O.ZP,{default:!0,monospace:!0,small:!0,children:["Delete ",u]})})})]}),n]}),!r&&(0,L.jsx)(_.Z,{mb:E.cd})]})})]})};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var le={and_or_operator:b.YB.AND,left_value_type:{value_data_type:b.t4.STRING},operator:b.W6.EQUALS,right_value_type:{value_data_type:b.t4.STRING}};var ie=function(e){var t=e.index,n=e.level,o=e.predicate,l=e.renderPredicate,i=e.setPredicate,s=(0,d.useMemo)((function(){return(null==o?void 0:o.predicates)||[]}),[o]),u=((0,d.useCallback)((function(e){i({predicates:e})}),[i]),(0,d.useCallback)((function(){i({predicates:(s||[]).concat(le)})}),[s,i])),c=(0,d.useCallback)((function(e,t){var n=(0,r.Z)(s);n[t]=e,i({predicates:n})}),[s,i]),a=(0,d.useMemo)((function(){return(null==s?void 0:s.length)||0}),[s]),p=(0,d.useCallback)((function(e,t){if(!(e<0)){var n=(0,w.bH)()[t];return 0===e||(n=n.toLowerCase(),e>=2&&(n="".concat(n).concat(e-1))),n}}),[]),h=(0,d.useMemo)((function(){return p(n,t)}),[p,t,n]);return(0,L.jsxs)(L.Fragment,{children:[null==s?void 0:s.map((function(e,t){var r,u=function(n){return c(re(re({},e),n),t)};return(0,L.jsx)(ne,{andOrOperator:null==o?void 0:o.and_or_operator,first:0===t,last:t===a-1,level:n+1,predicate:e,removePredicate:function(){i(re(re({},e),{},{predicates:(0,I.oM)(s,t)}))},title:p(n+1,t),updatePredicate:u,children:(0,L.jsx)(_.Z,{mt:(null==e||null===(r=e.predicates)||void 0===r?void 0:r.length)>=1?E.cd:0,children:l({index:t,level:n+1,predicate:e,renderPredicate:l,setPredicate:u})})},"predicate-".concat(t))})),(0,L.jsx)(_.Z,{mt:E.cd,children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[n>=0&&(null==s?void 0:s.length)>=2&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(N.Z,{compact:!0,monospace:!0,onChange:function(e){return i(re(re({},o),{},{and_or_operator:e.target.value}))},small:!0,paddingVertical:3,value:null==o?void 0:o.and_or_operator,children:Object.values(b.YB).map((function(e){return(0,L.jsx)("option",{value:e,children:(b.YB.OR===e?"".concat(e," "):e).toUpperCase()},e)}))}),(0,L.jsx)(_.Z,{mr:1})]}),(0,L.jsxs)(m.ZP,{compact:n>=0,beforeIcon:(0,L.jsx)(k.Add,{}),onClick:function(){return u()},secondary:!0,small:n>=0,children:["Add predicate",h&&" in ".concat(h)]})]})})]})};function se(e){var t=e.index,n=e.level,o=e.predicate,r=e.renderPredicate,l=e.setPredicate;return(0,L.jsx)(ie,{index:t,level:n,predicate:o,renderPredicate:r,setPredicate:l})}var ue=n(42122),ce=n(70320),ae=n(23780);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he=function(e){var t,n,l,s,N,D,U,B,M,H,F,G,W,Y,Q,V,K,q,z,X,$,J,ee,te,ne,oe=e.isNew,re=e.operationType,le=e.resourceType,ie=e.rootProject,de=e.uuid,he=(0,ce.qB)(),fe=(0,h.useRouter)(),ve=(0,C.PR)(null==fe?void 0:fe.basePath),me="GlobalHookDetail/".concat(de),je=(0,d.useContext)(c.ThemeContext),xe=(0,d.useState)(null),ge=xe[0],be=xe[1],ye=(0,d.useState)(!1),Ze=ye[0],_e=ye[1],Oe=(0,d.useState)(re),Pe=Oe[0],ke=(Oe[1],(0,d.useState)(le)),Se=ke[0],Ee=(ke[1],(0,ae.VI)(null,{},[],{uuid:me})),we=(0,i.Z)(Ee,1)[0],Ae=(0,d.useMemo)((function(){return(0,ue.hB)(pe({include_operation_types:1,include_resource_types:1,include_snapshot_validation:1,operation_type:void 0===Pe?null:Pe,resource_type:void 0===Se?null:Se},ie?{root_project:ie}:{}))}),[Pe,Se]),Re=P.ZP.global_hooks.detail(oe?"__new__":de,Ae).data,Ce=(0,d.useMemo)((function(){return null==Re?void 0:Re.global_hook}),[Re]),Ie=(0,d.useMemo)((function(){return{onErrorCallback:function(e){var t=e.error,n=t.errors,o=t.exception,r=t.message,l=t.type,i=e.response;return a.Am.error((null==n?void 0:n.error)||o||r,{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:l}),we({errors:n,response:i})}}}),[]),Te=(0,p.Db)(P.ZP.global_hooks.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;fe.replace("/".concat(ie?"platform/":"","global-hooks/").concat(t.uuid,"?operation_type=").concat(t.operation_type,"&resource_type=").concat(t.resource_type))}},Ie))}}),Ne=(0,i.Z)(Te,2),De=Ne[0],Le=Ne[1].isLoading,Ue=(0,p.Db)(P.ZP.global_hooks.useUpdate(null==Ce?void 0:Ce.uuid,Ae),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;Je((function(e){return pe(pe({},e),t)})),a.Am.success("Global hook changes successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(t.uuid)})}},Ie))}}),Be=(0,i.Z)(Ue,2),Me=Be[0],He=Be[1].isLoading,Fe=(0,p.Db)((function(e){var t=e.pipeline;return P.ZP.global_hooks.useUpdate(null==Ce?void 0:Ce.uuid,Ae)({global_hook:{pipeline:t,snapshot:1}})}),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;Je((function(e){return pe(pe({},e),{},{metadata:pe(pe({},null==e?void 0:e.metadata),null==t?void 0:t.metadata),pipeline:pe(pe({},null==e?void 0:e.pipeline),null==t?void 0:t.pipeline)})})),a.Am.success("Snapshot successfully created.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-snapshot-success-".concat(t.uuid)})}},Ie))}}),Ge=(0,i.Z)(Fe,2),We=Ge[0],Ye=Ge[1].isLoading,Qe=(0,p.Db)(P.ZP.global_hooks.useDelete(null==Ce?void 0:Ce.uuid,Ae),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;a.Am.success("Global hook changes successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(t.uuid)}),fe.replace("/".concat(ie?"platform/":"","global-hooks"))}},Ie))}}),Ve=(0,i.Z)(Qe,2),Ke=Ve[0],qe=Ve[1].isLoading,ze=P.ZP.pipelines.list().data,Xe=(0,d.useMemo)((function(){return(0,I.YC)((null==ze?void 0:ze.pipelines)||[],(function(e){return e.name}))}),[ze]),$e=(0,d.useMemo)((function(){return(0,I.HK)(Xe||[],(function(e){return e.uuid}))}),[Xe]),Je=(0,d.useCallback)((function(e){be(e),_e(!0)}),[be,_e]);(0,d.useEffect)((function(){Ce&&!ge&&be(Ce)}),[ge,Ce,be]);var et=(0,d.useMemo)((function(){return null!=ge&&ge.operation_type&&null!=ge&&ge.resource_type?"".concat((0,w.vg)(null==ge?void 0:ge.operation_type)," ").concat(null==ge?void 0:ge.resource_type," operation"):null!=ge&&ge.resource_type?"".concat(null==ge?void 0:ge.resource_type," operation"):null!=ge&&ge.operation_type?"".concat(null==ge?void 0:ge.operation_type," operation"):"operation"}),[ge]),tt=(0,d.useMemo)((function(){var e;return null==$e?void 0:$e[null==ge||null===(e=ge.pipeline)||void 0===e?void 0:e.uuid]}),[ge,$e]),nt=(0,d.useMemo)((function(){return(null==tt?void 0:tt.blocks)||[]}),[tt]),ot=(0,d.useMemo)((function(){return(0,I.HK)(nt||[],(function(e){return e.uuid}))}),[nt]),rt=(0,d.useMemo)((function(){return(null==ge?void 0:ge.outputs)||[]}),[ge]),lt=(0,d.useCallback)((function(e,t){var n=(0,r.Z)(rt||[]);n[t]=e,Je((function(e){return pe(pe({},e),{},{outputs:n})}))}),[rt,Je]),it=(0,d.useMemo)((function(){return(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Add,{}),compact:(null==rt?void 0:rt.length)>=1,small:(null==rt?void 0:rt.length)>=1,onClick:function(){return Je((function(e){return pe(pe({},e),{},{outputs:((null==e?void 0:e.outputs)||[]).concat({block:{uuid:null},key:b.TT.PAYLOAD})})}))},secondary:!0,children:"Add block output"})}),[rt,Je]),st=(0,d.useMemo)((function(){return null==rt?void 0:rt.map((function(e,t){var n,o,r=e.block,l=e.key,i=e.keyMore,s=e.keys,c=null==ot?void 0:ot[null==r?void 0:r.uuid];return o=c?(0,L.jsx)(u(),{as:"/pipelines/".concat(null==tt?void 0:tt.uuid,"/edit?block_uuid=").concat(null==c?void 0:c.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(y.Z,{block:!0,openNewWindow:!0,children:(0,L.jsx)(O.ZP,{color:(0,R.qn)(null==c?void 0:c.type,{blockColor:null==c?void 0:c.color,theme:je}).accent,monospace:!0,children:(null==c?void 0:c.uuid)||"[select a block]"})})}):(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:(null==c?void 0:c.uuid)||(null==r?void 0:r.uuid)||"[select a block]"}),(0,L.jsxs)(v.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[o,(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(k.PaginateArrowRight,{muted:!0}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsxs)(O.ZP,{default:!0,monospace:!0,children:[l||"{object}",(null==s?void 0:s.length)>=1&&(null==s?void 0:s.map((function(e){return(0,L.jsxs)(O.ZP,{default:!0,inline:!0,monospace:!0,children:["['",e,"']"]})})))]})]}),titleXPadding:E.cd*E.iI,titleYPadding:E.cd*E.iI,children:[(0,L.jsx)(Z.S,{title:"Block to extract data from",description:"The output data from this block will be merged into the ".concat(et,"’s data."),selectInput:{monospace:!0,onChange:function(n){return lt(pe(pe({},e),{},{block:pe(pe({},c),{},{uuid:n.target.value})}),t)},options:null==nt?void 0:nt.map((function(e){return{label:e.name,value:e.uuid}})),placeholder:"Select a block",value:null==c?void 0:c.uuid}},"block-uuid-".concat(t)),(0,L.jsx)(Z.S,{title:"Object to merge block output data into",description:"Select the ".concat(et," object to merge the block output data into."),selectInput:{monospace:!0,onChange:function(n){return lt(pe(pe({},e),{},{key:n.target.value}),t)},options:null===(n=Object.values(b.TT))||void 0===n?void 0:n.map((function(e){return{label:e,value:e}})),placeholder:"Select an object",value:l}},"key-".concat(t)),(0,L.jsxs)(Z.S,{title:"Additional dictionary keys",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If there is a nested object or value in the $",et," data that you want to merge the block output data into,",(0,L.jsx)("br",{}),"use these additional keys to instruct the hook on how nested you want to merge the block output data."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:"optional",onChange:function(n){return lt(pe(pe({},e),{},{keyMore:n.target.value}),t)},value:i},children:[null==s?void 0:s.map((function(n){return(0,L.jsx)(_.Z,{ml:1,children:(0,L.jsx)(j.Z,{border:!0,label:n,monospace:!0,onClick:function(){lt(pe(pe({},e),{},{keys:(s||[]).filter((function(e){return e!==n}))}),t)}})},"keys-".concat(t,"-").concat(n))})),(null==s?void 0:s.length)>=1&&(0,L.jsx)(_.Z,{mr:E.cd}),i&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(m.ZP,{compact:!0,onClick:function(){lt(pe(pe({},e),{},{keyMore:"",keys:(s||[]).concat(i)}),t)},small:!0,children:["Add key ",i]}),(0,L.jsx)(_.Z,{mr:E.cd})]})]},"keys-".concat(t)),(0,L.jsx)(Z.S,{title:"Remove block output",children:(0,L.jsx)(m.ZP,{compact:!0,onClick:function(){return Je((function(e){return pe(pe({},e),{},{outputs:(0,I.oM)((null==e?void 0:e.outputs)||[],t)})}))},small:!0,children:"Remove"})})]})}))}),[nt,ot,rt,tt,lt]),ut=(0,d.useMemo)((function(){return(0,ue.GL)(ge||{},["conditions","operation_type","outputs","pipeline","predicate","resource_type","run_settings","stages","strategies"])}),[ge]),ct=(0,d.useMemo)((function(){return(null==ge?void 0:ge.metadata)||{created_at:null,snapshot_hash:null,snapshot_valid:!1,snapshotted_at:null,updated_at:null,user:{id:null}}}),[ge]),at=(0,d.useMemo)((function(){return null==ge?void 0:ge.predicate}),[ge]),dt=(0,d.useMemo)((function(){return(0,L.jsx)(_.Z,{p:E.cd,children:se({level:-1,predicate:at,renderPredicate:se,setPredicate:function(e){return Je((function(t){return pe(pe({},t),{},{predicate:pe(pe({},e),{},{and_or_operator:b.YB.OR})})}))}})})}),[at,Je]);return(0,L.jsxs)(_.Z,{mb:8,p:E.cd,children:[(0,L.jsxs)(Z.Z,{title:"What to run hook for",children:[(0,L.jsx)(Z.S,{description:"This hook’s UUID must be unique across all hooks for the same resource type and operation type.",invalid:Ze&&!(null!=ge&&ge.uuid),textInput:oe?{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{uuid:e.target.value})}))},placeholder:"e.g. bootstrap pipeline blocks",value:null==ge?void 0:ge.uuid}:null,title:"Hook UUID",children:!oe&&(0,L.jsx)(_.Z,{px:E.cd,children:(0,L.jsx)(O.ZP,{large:!0,monospace:!0,children:de})})}),(0,L.jsx)(Z.S,{description:"Select the resource this hook should be attached to.",invalid:Ze&&!(null!=ge&&ge.resource_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{resource_type:e.target.value})}))},options:null==ge||null===(t=ge.resource_types)||void 0===t?void 0:t.map((function(e){return{label:(0,w.j3)(e),value:e}})),placeholder:"e.g. Pipeline",value:null==ge?void 0:ge.resource_type},title:"Resource type"}),(0,L.jsx)(Z.S,{description:"When a specific operation occurs for a given resource, this hook will be invoked for that specific operation on the configured resource.",invalid:Ze&&!(null!=ge&&ge.operation_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{operation_type:e.target.value})}))},options:null==ge||null===(n=ge.operation_types)||void 0===n?void 0:n.map((function(e){return{label:(0,w.vg)(e),value:e}})),placeholder:"e.g. Update",value:null==ge?void 0:ge.operation_type},title:"Operation type"}),!oe&&(0,L.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:{0:!0},children:(0,L.jsxs)(v.Z,{noBorderRadius:!0,noPaddingContent:!0,title:"Targeting",titleXPadding:E.cd*E.iI,titleYPadding:E.cd*E.iI,children:[(0,L.jsx)(_.Z,{p:E.cd,children:(0,L.jsxs)(O.ZP,{default:!0,children:["Add targeting conditions to determine what subset of ",null!=ge&&ge.resource_type?(0,w._6)((0,w.j3)(null==ge?void 0:ge.resource_type),2,null,!0):"resources"," this hook should run for."]})}),dt]})})]}),!oe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"When to run hook",children:[(0,L.jsx)(Z.S,{title:"Before operation starts",description:"If enabled, this hook will be invoked before the ".concat(et," starts."),toggleSwitch:{checked:null==ge||null===(l=ge.stages)||void 0===l?void 0:l.includes(b.SQ.BEFORE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{stages:e(null==t||null===(n=t.stages)||void 0===n?void 0:n.includes(b.SQ.BEFORE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.stages)||[]).concat(b.SQ.BEFORE)])):(null==t||null===(r=t.stages)||void 0===r?void 0:r.filter((function(e){return e!==b.SQ.BEFORE})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"After operation completes",description:"If enabled, this hook will be invoked after the ".concat(et," ends."),toggleSwitch:{checked:null==ge||null===(s=ge.stages)||void 0===s?void 0:s.includes(b.SQ.AFTER),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{stages:e(null==t||null===(n=t.stages)||void 0===n?void 0:n.includes(b.SQ.AFTER))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.stages)||[]).concat(b.SQ.AFTER)])):(null==t||null===(r=t.stages)||void 0===r?void 0:r.filter((function(e){return e!==b.SQ.AFTER})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Run if ".concat(et," succeeds"),description:"If enabled, this hook will be invoked if the ".concat(et," is successful and doesn’t error."),toggleSwitch:{checked:null==ge||null===(N=ge.conditions)||void 0===N?void 0:N.includes(b.sw.SUCCESS),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{conditions:e(null==t||null===(n=t.conditions)||void 0===n?void 0:n.includes(b.sw.SUCCESS))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.conditions)||[]).concat(b.sw.SUCCESS)])):(null==t||null===(r=t.conditions)||void 0===r?void 0:r.filter((function(e){return e!==b.sw.SUCCESS})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Run if ".concat(et," fails"),description:"If enabled, this hook will be invoked if the ".concat(et," fails with an error."),toggleSwitch:{checked:null==ge||null===(D=ge.conditions)||void 0===D?void 0:D.includes(b.sw.FAILURE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{conditions:e(null==t||null===(n=t.conditions)||void 0===n?void 0:n.includes(b.sw.FAILURE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.conditions)||[]).concat(b.sw.FAILURE)])):(null==t||null===(r=t.conditions)||void 0===r?void 0:r.filter((function(e){return e!==b.sw.FAILURE})))||[]})}))}}})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Code to run",description:"When the current hook gets triggered, it will execute the associated pipeline.",children:[(0,L.jsx)(Z.S,{title:"Pipeline to execute",description:"Select a pipeline that will be executed every time this hook is triggered.",invalid:Ze&&!(null!=ge&&null!==(U=ge.pipeline)&&void 0!==U&&U.uuid),selectInput:{fullWidth:!1,monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{pipeline:pe(pe({},null==t?void 0:t.pipeline),{},{uuid:e.target.value})})}))},options:null==Xe?void 0:Xe.map((function(e){var t=e.name,n=e.uuid;return{label:t||n,value:n}})),placeholder:"Select a pipeline",value:null==ge||null===(B=ge.pipeline)||void 0===B?void 0:B.uuid},children:(null==ge||null===(M=ge.pipeline)||void 0===M?void 0:M.uuid)&&(0,L.jsx)(_.Z,{mr:2,children:(0,L.jsx)(u(),{as:"/pipelines/".concat(null==ge||null===(H=ge.pipeline)||void 0===H?void 0:H.uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(y.Z,{block:!0,openNewWindow:!0,children:"View pipeline"})})})}),(0,L.jsxs)(Z.S,{title:null==ge||null===(F=ge.pipeline)||void 0===F||!F.uuid||null!=ct&&ct.snapshot_hash||null!=ct&&ct.snapshot_valid?"Valid code snapshot":"Code snapshot hasn’t been created yet",description:(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["Take a snapshot of ",null!=ge&&null!==(G=ge.pipeline)&&void 0!==G&&G.uuid?(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null==ge||null===(W=ge.pipeline)||void 0===W?void 0:W.uuid}):"the associated pipeline","’s code. The snapshot is used to validate the hook before it runs.",(0,L.jsx)("br",{}),"A hook cannot run if ",null!=ge&&null!==(Y=ge.pipeline)&&void 0!==Y&&Y.uuid?(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null==ge||null===(Q=ge.pipeline)||void 0===Q?void 0:Q.uuid}):"the associated pipeline","’s code has changed after the most recent snapshot has been made.",(0,L.jsx)("br",{}),"If the code changes, a new snapshot must be created."]})}),invalid:(null==ge||null===(V=ge.pipeline)||void 0===V?void 0:V.uuid)&&(null==ct?void 0:ct.snapshot_hash)&&!(null!=ct&&ct.snapshot_valid),warning:(null==ge||null===(K=ge.pipeline)||void 0===K?void 0:K.uuid)&&!(null!=ct&&ct.snapshot_hash)&&!(null!=ct&&ct.snapshot_valid),children:[!(null!=ct&&ct.snapshot_hash)&&(0,L.jsx)(O.ZP,{default:!0,large:!0,children:null!=ge&&null!==(q=ge.pipeline)&&void 0!==q&&q.uuid?"No snapshot has been created":"Select a pipeline before taking a snapshot"}),(null==ct?void 0:ct.snapshot_hash)&&(0,L.jsx)(g.ZP,{flexDirection:"column",children:(0,L.jsx)(O.ZP,{danger:!(null!=ct&&ct.snapshot_valid),large:!0,rightAligned:!0,success:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_valid?"Snapshot valid":"Snapshot outdated"})})]}),(0,L.jsx)(_.Z,{p:E.cd,children:(0,L.jsx)(g.ZP,{alignItems:"center",justifyContent:"flex-end",children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(null==ct?void 0:ct.snapshotted_at)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(O.ZP,{muted:!0,rightAligned:!0,small:!0,children:["Last snapshot at ",(0,L.jsx)(O.ZP,{inline:!0,muted:!0,small:!0,monospace:!0,children:null==ct?void 0:ct.snapshotted_at})]}),(0,L.jsx)(_.Z,{mr:E.cd})]}),(0,L.jsx)(m.ZP,{disabled:!(null!=ge&&null!==(z=ge.pipeline)&&void 0!==z&&z.uuid),loading:Ye,onClick:function(){return We({pipeline:null==ge?void 0:ge.pipeline})},primary:!(null!=ct&&ct.snapshot_valid),secondary:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_hash?null!=ct&&ct.snapshot_valid?"Update snapshot even though it’s valid":"Update snapshot to make it valid":"Create snapshot of code"})]})})})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"How to run hook",children:[(0,L.jsx)(Z.S,{title:"Stop operation if hook fails",description:"If enabled, the ".concat(et," will be cancelled and an error will be raised."),toggleSwitch:{checked:null==ge||null===(X=ge.strategies)||void 0===X?void 0:X.includes(b.Ij.RAISE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{strategies:e(null==t||null===(n=t.strategies)||void 0===n?void 0:n.includes(b.Ij.RAISE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.strategies)||[]).concat(b.Ij.RAISE)])):(null==t||null===(r=t.strategies)||void 0===r?void 0:r.filter((function(e){return e!==b.Ij.RAISE})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Execute hook with history and logging",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If enabled, anytime this hook is executed an associated pipeline run and block runs will be created.",(0,L.jsx)("br",{}),"This will provide a history of the hook execution as well as logging for observability.",(0,L.jsx)("br",{}),"However, this will have a significant impact on the ",et," resolution time.",(0,L.jsx)("br",{}),"This may cause very delayed API responsed and a degraded devloper experience."]}),toggleSwitch:{checked:!(null==ge||null===($=ge.run_settings)||void 0===$||!$.with_trigger),onCheck:function(e){return Je((function(t){var n;return pe(pe({},t),{},{run_settings:pe(pe({},null==t?void 0:t.run_settings),{},{with_trigger:e(null==t||null===(n=t.run_settings)||void 0===n?void 0:n.with_trigger)})})}))}}}),(0,L.jsx)(Z.S,{title:"Run hook asynchronously",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["Hooks will execute the associated pipeline synchronously and prevent the current resource operation (e.g. API request) from resolving until all associated hooks for that resource operation are completed.",(0,L.jsx)("br",{}),"Hooks running synchronously can mutate the input data and output data. However, it can slow down the user experience in the application.",(0,L.jsx)("br",{}),"Enable this setting to run hooks asynchronously and not block the current resource operation from resolving.",(0,L.jsx)("br",{}),"However, asynchronous hooks cannot mutate the input data or output data. Use this asynchronous setting when hooks don’t need to mutate data."]}),toggleSwitch:{checked:!(null==ge||null===(J=ge.run_settings)||void 0===J||!J.asynchronous),onCheck:function(e){return Je((function(t){var n;return pe(pe({},t),{},{run_settings:pe(pe({},null==t?void 0:t.run_settings),{},{asynchronous:e(null==t||null===(n=t.run_settings)||void 0===n?void 0:n.asynchronous)})})}))}}})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Block outputs ".concat((null==rt?void 0:rt.length)>=1?"(".concat((null==rt?void 0:rt.length)||0,")"):""),description:(0,L.jsx)(_.Z,{mt:1,children:(0,L.jsxs)(O.ZP,{muted:!0,children:["When a hook runs and executes a pipeline, the output from the pipeline’s blocks",(0,L.jsx)("br",{}),"can optionally be used to mutate the ",et," input and output data."]})}),headerChildren:(null==rt?void 0:rt.length)>=1&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{ml:E.cd}),it]}),children:[!(null!=rt&&rt.length)&&(0,L.jsx)(_.Z,{p:E.cd,children:it}),(null==rt?void 0:rt.length)>=1&&(0,L.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,children:st})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Metadata",children:[(0,L.jsx)(Z.S,{title:"Last updated",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.updated_at?(0,A.XG)(null==ct?void 0:ct.updated_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Created at",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.created_at?(0,A.XG)(null==ct?void 0:ct.created_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Snapshotted at",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.snapshotted_at?(0,A.XG)(null==ct?void 0:ct.snapshotted_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Snapshot valid",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,danger:!(null!=ct&&ct.snapshot_valid),muted:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_valid?"Valid":"Hook won’t run until snapshot is valid"}),(0,L.jsx)(_.Z,{mr:E.cd}),null!=ct&&ct.snapshot_valid?(0,L.jsx)(k.Check,{size:S.Z,success:!0}):(0,L.jsx)(k.AlertTriangle,{danger:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Created by",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&null!==(ee=ct.user)&&void 0!==ee&&ee.id?String(null==ct||null===(te=ct.user)||void 0===te?void 0:te.id)===String(null==ve?void 0:ve.id)?"You created this hook":"User ID ".concat(null==ct||null===(ne=ct.user)||void 0===ne?void 0:ne.id):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.UserSmileyFace,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})})]})]}),(0,L.jsx)(_.Z,{mt:E.HN,children:(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[!oe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m.ZP,{compact:!0,danger:!0,loading:qe,onClick:function(){window.confirm("Are you sure you wantt to delete this hook?")&&Ke()},small:!0,children:"Delete global hook"}),(0,L.jsx)(_.Z,{mr:E.cd})]}),(0,L.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.PaginateArrowLeft,{}),disabled:Le||He||qe,onClick:function(){return fe.push("/".concat(ie?"platform/":"","global-hooks"))},secondary:!0,children:Ze?"Cancel changes & go back":"Go back to all hooks"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Save,{}),disabled:qe,loading:Le||He,onClick:function(){return(oe?De:Me)({global_hook:pe(pe(pe({},ut),oe?{uuid:null==ge?void 0:ge.uuid}:{}),{},{root_project:ie})})},primary:!0,children:oe?"Create new global hook":"Save changes"})]})]})})]})}},93808:function(e,t,n){n.d(t,{Z:function(){return S}});var o=n(77837),r=n(26304),l=n(62243),i=n(29385),s=n(80022),u=n(13692),c=n(93189),a=n(15544),d=n(82394),p=n(38860),h=n.n(p),f=n(82684),v=n(56663),m=n.n(v),j=n(40761),x=n(34661),g=n(36105),b=n(50178),y=n(69419),Z=n(28598),_=["auth"];function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,d.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,a.Z)(e);if(t){var r=(0,a.Z)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,c.Z)(this,n)}}function S(e){return function(t){(0,u.Z)(a,t);var n,c=k(a);function a(){var e;(0,l.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=c.call.apply(c,[this].concat(n)),(0,d.Z)((0,s.Z)(e),"state",{auth:new j.Z(e.props.token)}),e}return(0,i.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new j.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,n=(t.auth,(0,r.Z)(t,_));return(0,Z.jsx)(e,P({auth:this.state.auth},n))}}],[{key:"getInitialProps",value:(n=(0,o.Z)(h().mark((function t(n){var o,r,l,i,s,u,c,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=m()(n),r=(0,b.ex)(n),l=r.id,i=o[x.Mv],s=o[g.qt],u=new j.Z(i),c=P(P({},n),{},{auth:u,currentGroupId:l,theme:s}),(0,b.YB)(n)&&u.isExpired&&(console.log("OAuth token has expired."),a=P(P({},n.query),{},{redirect_url:n.asPath}),(0,y.nL)("/sign-in?".concat((0,y.uM)(a)),n.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(c);case 10:return d=t.sent,t.abrupt("return",P(P({},d),{},{auth:u,currentGroupId:l,theme:s}));case 12:return t.abrupt("return",c);case 13:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}]),a}(f.Component)}},14466:function(e,t,n){n.d(t,{Ij:function(){return l},N_:function(){return v},SQ:function(){return i},TT:function(){return s},W6:function(){return p},XG:function(){return a},YB:function(){return c},i9:function(){return f},sw:function(){return u},t4:function(){return d}});var o,r,l,i,s,u,c,a,d,p,h=n(82394);!function(e){e.CREATE="create",e.DELETE="delete",e.DETAIL="detail",e.EXECUTE="execute",e.LIST="list",e.UPDATE="update",e.UPDATE_ANYWHERE="update_anywhere"}(r||(r={})),function(e){e.BREAK="break",e.CONTINUE="continue",e.RAISE="raise"}(l||(l={})),function(e){e.AFTER="after",e.BEFORE="before"}(i||(i={})),function(e){e.ERROR="error",e.META="meta",e.METADATA="metadata",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources"}(s||(s={})),function(e){e.FAILURE="failure",e.SUCCESS="success"}(u||(u={})),function(e){e.AND="and",e.OR="or"}(c||(c={})),function(e){e.ERROR="error",e.HOOK="hook",e.META="meta",e.METADATA="metadata",e.OPERATION_RESOURCE="operation_resource",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources",e.RESOURCE_ID="resource_id",e.RESOURCE_PARENT="resource_parent",e.RESOURCE_PARENT_ID="resource_parent_id",e.RESOURCE_PARENT_TYPE="resource_parent_type",e.USER="user"}(a||(a={})),function(e){e.BOOLEAN="BOOLEAN",e.DICTIONARY="DICTIONARY",e.FLOAT="FLOAT",e.INTEGER="INTEGER",e.LIST="LIST",e.STRING="STRING"}(d||(d={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",e.INCLUDES="INCLUDES",e.LESS_THAN="LESS_THAN",e.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.NOT_INCLUDES="NOT_INCLUDES",e.NOT_PRESENT="NOT_PRESENT",e.PRESENT="PRESENT"}(p||(p={}));var f=[p.NOT_PRESENT,p.PRESENT],v=(o={},(0,h.Z)(o,p.EQUALS,"=="),(0,h.Z)(o,p.GREATER_THAN,">"),(0,h.Z)(o,p.GREATER_THAN_OR_EQUALS,">="),(0,h.Z)(o,p.INCLUDES,"includes"),(0,h.Z)(o,p.LESS_THAN,"<"),(0,h.Z)(o,p.LESS_THAN_OR_EQUALS,"<="),(0,h.Z)(o,p.NOT_EQUALS,"!="),(0,h.Z)(o,p.NOT_INCLUDES,"not includes"),(0,h.Z)(o,p.NOT_PRESENT,"is not present"),(0,h.Z)(o,p.PRESENT,"is present"),o)},80022:function(e,t,n){function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return o}})},15544:function(e,t,n){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{Z:function(){return o}})},13692:function(e,t,n){n.d(t,{Z:function(){return r}});var o=n(61049);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,o.Z)(e,t)}},93189:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(12539),r=n(80022);function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1187],{94629:function(e,t,n){n.d(t,{Z:function(){return _}});var o=n(82394),r=n(21831),l=n(82684),i=n(50724),s=n(82555),u=n(97618),c=n(70613),a=n(92272),d=n(68899),p=n(28598);function h(e,t){var n=e.children,o=e.noPadding;return(0,p.jsx)(d.HS,{noPadding:o,ref:t,children:n})}var f=l.forwardRef(h),v=n(62547),m=n(82571),j=n(77417),x=n(46684),g=n(75375);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var n=e.after,o=e.afterHeader,l=e.afterHidden,h=e.afterWidth,b=e.afterWidthOverride,Z=e.appendBreadcrumbs,_=e.before,O=e.beforeHeader,P=e.beforeWidth,k=e.breadcrumbs,S=e.children,E=e.contained,w=e.errors,A=e.headerMenuItems,R=e.headerOffset,C=e.hideAfterCompletely,I=e.mainContainerHeader,T=e.navigationItems,N=e.setAfterHidden,D=e.setAfterWidth,L=e.setBeforeWidth,U=e.setErrors,B=e.subheaderChildren,M=e.subheaderNoPadding,H=e.title,F=e.uuid,G=(0,g.Z)(F,{beforeResizeOffset:g.H,setWidthAfter:D,setWidthBefore:L,widthAfter:h,widthBefore:P,widthOverrideAfter:b}),W=G.mainContainerRef,Y=G.mousedownActiveAfter,Q=G.mousedownActiveBefore,V=G.setMousedownActiveAfter,K=G.setMousedownActiveBefore,q=G.setWidthAfter,z=G.setWidthBefore,X=G.widthAfter,$=G.widthBefore,J=(0,j.Z)().project,ee=[];return k&&ee.push.apply(ee,(0,r.Z)(k)),null!=k&&k.length&&!Z||!J||null!=k&&k.length||ee.unshift({bold:!Z,label:function(){return H}}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Z,{title:H}),(0,p.jsx)(a.Z,{breadcrumbs:ee,menuItems:A}),(0,p.jsxs)(d.Nk,{ref:t,children:[0!==(null==T?void 0:T.length)&&(0,p.jsx)(d.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:T,showMore:!0})}),(0,p.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:n,afterHeader:o,afterHeightOffset:x.Mz,afterHidden:l,afterMousedownActive:Y,afterWidth:X,before:_,beforeHeader:O,beforeHeightOffset:x.Mz,beforeMousedownActive:Q,beforeWidth:_?$:d.k1,contained:E,headerOffset:R,hideAfterCompletely:!n||C,leftOffset:_?d.k1:null,mainContainerHeader:I,mainContainerRef:W,setAfterHidden:N,setAfterMousedownActive:V,setAfterWidth:q,setBeforeMousedownActive:K,setBeforeWidth:z,children:[B&&(0,p.jsx)(f,{noPadding:M,children:B}),S]})})]}),w&&(0,p.jsx)(i.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==U?void 0:U(null)},children:(0,p.jsx)(s.Z,y(y({},w),{},{onClose:function(){return null==U?void 0:U(null)}}))})]})}var _=l.forwardRef(Z)},46866:function(e,t,n){n.d(t,{Z:function(){return he}});var o=n(30018),r=n(21831),l=n(82394),i=n(75582),s=n(12691),u=n.n(s),c=n(9518),a=n(21764),d=n(82684),p=n(83455),h=n(34376),f=n(32013),v=n(98777),m=n(71180),j=n(31882),x=n(97618),g=n(55485),b=n(14466),y=n(48670),Z=n(88543),_=n(38276),O=n(30160),P=n(35686),k=n(72473),S=n(8193),E=n(70515),w=n(81728),A=n(3917),R=n(55283),C=n(50178),I=n(86735),T=n(72619),N=n(44085),D=n(17488),L=n(28598);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M="CUSTOM_VALUE_TYPE",H={compact:!0,monospace:!0,small:!0};var F=function(e){var t=e.leftKey,n=e.leftObjectKeys,o=e.leftObjectType,r=e.leftObjectTypeState,i=e.leftValue,s=e.leftValueType,u=e.rightAligned,c=e.setLeftKey,a=e.setLeftObjectTypeState,p=e.updatePredicate,h=(0,d.useRef)(null),f=(0,d.useState)(),v=f[0],j=f[1];(0,d.useEffect)((function(){var e,t;j(null==h||null===(e=h.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)}),[]),(0,d.useEffect)((function(){var e,t;j(null==h||null===(e=h.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.width)}),[o,r]);var x=(0,d.useMemo)((function(){return{alignItems:"center",justifyContent:u?"flex-start":"flex-end"}}),[u]),y=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Value data type"}),t=(0,L.jsx)(N.Z,{compact:!0,onChange:function(e){return p((0,l.Z)({},u?"right_value_type":"left_value_type",B(B({},s),{},{value_data_type:e.target.value})))},placeholder:"required",small:!0,value:null==s?void 0:s.value_data_type,children:Object.values(b.t4).map((function(e){return(0,L.jsx)("option",{value:e,children:e.toLowerCase()},e)}))});return(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[u?t:e,(0,L.jsx)(_.Z,{mr:1}),u?e:t]}))}),[s,u,x,p]),Z=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Get value from"}),t=M===String(r)||!o&&i,n=(0,L.jsxs)(N.Z,B(B({},H),{},{onChange:function(e){var t,n,o=e.target.value;(a(o),M===o)?p((t={},(0,l.Z)(t,u?"right_object_keys":"left_object_keys",null),(0,l.Z)(t,u?"right_object_type":"left_object_type",null),t)):p((n={},(0,l.Z)(n,u?"right_object_type":"left_object_type",o),(0,l.Z)(n,u?"right_value":"left_value",null),n))},placeholder:"required",value:t?M:o,children:[(0,L.jsx)("option",{value:M,children:"Custom value"}),Object.values(b.XG).map((function(e){return(0,L.jsx)("option",{value:e,children:e.toLowerCase()},e)}))]})),s=t&&(0,L.jsxs)(L.Fragment,{children:[!u&&(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(D.Z,B(B({},H),{},{onChange:function(e){return p((0,l.Z)({},u?"right_value":"left_value",e.target.value))},value:i||""})),u&&(0,L.jsx)(_.Z,{mr:1})]});return(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[!u&&e,u&&s,u&&n,(0,L.jsx)(_.Z,{mr:1}),!u&&n,!u&&s,u&&e]}))}),[o,r,i,a,x,p]),P=(0,d.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[u&&(0,L.jsx)("div",{style:{paddingRight:4}}),(0,L.jsx)(m.ZP,{compact:!0,disabled:!t,onClick:function(){p((0,l.Z)({},u?"right_object_keys":"left_object_keys",(n||[]).concat(t))),c(null)},padding:"2px 6px",ref:h,small:!0,children:"Add key"}),!u&&(0,L.jsx)("div",{style:{paddingRight:4}})]})}),[t,n,u,c,p]),S=(0,d.useMemo)((function(){var e=(0,L.jsx)(O.ZP,{default:!0,small:!0,children:"Value extraction keys"}),r=(0,L.jsx)(D.Z,B(B({},H),{},{buttonAfter:!u&&P,buttonAfterWidth:u||void 0===v?null:v+10,buttonBefore:u&&P,buttonBeforeWidth:u&&void 0!==v?v+10:null,onChange:function(e){c(e.target.value)},placeholder:"Enter key...",value:t||""}));L.Fragment,L.Fragment;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[u?r:e,(0,L.jsx)(_.Z,{mr:1}),u?e:r]})),(null==n?void 0:n.length)>=1&&(0,L.jsx)(_.Z,{mt:1,children:(0,L.jsxs)(g.ZP,B(B({},x),{},{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,xsmall:!0,children:o}),!(null!=n&&n.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:"..."}),"']"]}),null==n?void 0:n.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:e}),"']"]})})),(0,L.jsx)("div",{style:{marginRight:4}}),(0,L.jsx)(m.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){p((0,l.Z)({},u?"right_object_keys":"left_object_keys",(n||[]).slice(0,Math.max(0,(null==n?void 0:n.length)-1))))},children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(k.Close,{danger:!0,size:1.25*E.iI}),(0,L.jsx)("div",{style:{marginRight:2}}),(0,L.jsx)(O.ZP,{default:!0,xsmall:!0,children:"Delete key"})]})})]}))})]})}),[v,P,t,n,o,u,x]);return(0,L.jsxs)(L.Fragment,{children:[y,(0,L.jsx)(_.Z,{mt:1}),Z,(0,L.jsx)(_.Z,{mt:1}),o&&M!==String(r)&&S]})},G=n(65956),W=n(44897),Y=n(61896),Q=1.25*E.iI,V=1.5*E.iI,K=E.iI/4,q=.75*E.iI,z=E.iI/2,X=(0,c.css)([""," ",""],(function(e){return!e.default&&"\n background-color: ".concat((e.theme.accent||W.Z.accent).purple,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.content||W.Z.content).muted,";\n ")})),$=c.default.div.withConfig({displayName:"indexstyle__LabelStyle",componentId:"sc-1v7t9a0-0"})(["border-radius:100px;padding:","px ","px;",""],K,V,(function(e){return"\n background-color: ".concat((e.theme.background||W.Z.background).chartBlock,";\n border: ").concat(1,"px solid ").concat((e.theme.interactive||W.Z.interactive).defaultBorder,";\n ")})),J=c.default.div.withConfig({displayName:"indexstyle__CircleStyle",componentId:"sc-1v7t9a0-1"})(["",";border-radius:","px;height:","px;width:","px;",""],X,1.25*E.iI,Q,Q,(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||W.Z.interactive).hoverBorder,";\n ")})),ee=c.default.div.withConfig({displayName:"indexstyle__OperatorStyle",componentId:"sc-1v7t9a0-2"})(["",";min-width:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],X,Q+2*(1+V),E.iI/4,z,z,E.iI/4+1),te=c.default.div.withConfig({displayName:"indexstyle__VerticalLineStyle",componentId:"sc-1v7t9a0-3"})(["",";width:","px;margin-right:","px;"," ",""],X,q,V+1+Q/2-q/2,(function(e){return e.last&&"\n height: calc(50% - ".concat(K+1+Y.dN/2,"px);\n ")}),(function(e){return!e.last&&"\n height: 100%;\n "}));var ne=function(e){var t=e.andOrOperator,n=e.children,o=e.first,r=e.last,l=e.level,i=e.predicate,s=e.removePredicate,u=e.title,c=e.updatePredicate,a=(0,d.useRef)(null),p=(0,d.useState)(null),h=p[0],f=p[1],v=(0,d.useState)(null),j=v[0],y=v[1],Z=(0,d.useState)(null),P=Z[0],S=Z[1],w=(0,d.useState)(null),A=w[0],R=w[1],C=(0,d.useState)(null),I=(C[0],C[1]),T=(i.and_or_operator,i.left_object_keys),D=i.left_object_type,U=i.left_value,B=i.left_value_type,M=i.operator,H=i.right_object_keys,W=i.right_object_type,Y=i.right_value,Q=i.right_value_type;(0,d.useEffect)((function(){var e,t;I(null==a||null===(e=a.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)}),[]),(0,d.useEffect)((function(){var e,t;I(null==a||null===(e=a.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)}),[D,W]);var V=(0,d.useMemo)((function(){if(!t)return null;var e=(0,L.jsx)(O.ZP,{bold:!0,center:!0,monospace:!0,uppercase:!0,children:t});return(0,L.jsx)(ee,{default:b.YB.OR===t,children:e})}),[t,l]);return(0,L.jsxs)(g.ZP,{children:[(0,L.jsxs)(g.ZP,{alignItems:"flex-end",flexDirection:"column",children:[!o&&r&&(0,L.jsx)(te,{default:b.YB.OR===t,last:!0}),(0,L.jsx)($,{children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(O.ZP,{monospace:!0,children:u}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(J,{default:b.YB.OR===t})]})}),!r&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(te,{default:b.YB.OR===t}),V,(0,L.jsx)(te,{default:b.YB.OR===t})]})]}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(x.Z,{flex:1,children:(0,L.jsxs)(g.ZP,{flexDirection:"column",fullWidth:!0,ref:a,children:[(0,L.jsxs)(G.Z,{dark:!!(l%2),children:[(0,L.jsxs)(g.ZP,{children:[(0,L.jsxs)(x.Z,{flex:1,flexDirection:"column",children:[(0,L.jsxs)(g.ZP,{justifyContent:"center",children:[(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"flex-end",children:[!D&&void 0===U&&(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Left expression"}),!D&&U&&(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:b.t4.STRING===(null==B?void 0:B.value_data_type)?"'".concat(U,"'"):U}),D&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:D}),!(null!=T&&T.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null==T?void 0:T.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:M?b.N_[M]:"operator"}),(!M||!b.i9.includes(M))&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{mr:1}),(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"flex-start",children:[!W&&void 0===Y&&(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Right expression"}),!W&&Y&&(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:b.t4.STRING===(null==Q?void 0:Q.value_data_type)?"'".concat(Y,"'"):Y}),W&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:W}),!(null!=H&&H.length)&&(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null==H?void 0:H.map((function(e){return(0,L.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]})]})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(0,L.jsx)(x.Z,{flex:1,flexDirection:"column",children:(0,L.jsx)(F,{leftKey:j,leftObjectKeys:T,leftObjectType:D,leftObjectTypeState:h,leftValue:U,leftValueType:B,setLeftKey:y,setLeftObjectTypeState:f,updatePredicate:c})}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)("div",{children:(0,L.jsx)(N.Z,{alignCenter:!0,compact:!0,onChange:function(e){return c({operator:e.target.value})},placeholder:"required",small:!0,value:M,children:Object.values(b.W6).map((function(e){return(0,L.jsx)("option",{value:e,children:b.N_[e]},e)}))})}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(x.Z,{flex:1,flexDirection:"column",children:(0,L.jsx)(F,{leftKey:A,leftObjectKeys:H,leftObjectType:W,leftObjectTypeState:P,leftValue:Y,leftValueType:Q,rightAligned:!0,setLeftKey:R,setLeftObjectTypeState:S,updatePredicate:c})})]})]}),(0,L.jsx)("div",{children:(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Trash,{muted:!0,size:1.25*E.iI}),compact:!0,onClick:function(){return s()},small:!0,children:(0,L.jsxs)(O.ZP,{default:!0,monospace:!0,small:!0,children:["Delete ",u]})})})]}),n]}),!r&&(0,L.jsx)(_.Z,{mb:E.cd})]})})]})};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var le={and_or_operator:b.YB.AND,left_value_type:{value_data_type:b.t4.STRING},operator:b.W6.EQUALS,right_value_type:{value_data_type:b.t4.STRING}};var ie=function(e){var t=e.index,n=e.level,o=e.predicate,l=e.renderPredicate,i=e.setPredicate,s=(0,d.useMemo)((function(){return(null==o?void 0:o.predicates)||[]}),[o]),u=((0,d.useCallback)((function(e){i({predicates:e})}),[i]),(0,d.useCallback)((function(){i({predicates:(s||[]).concat(le)})}),[s,i])),c=(0,d.useCallback)((function(e,t){var n=(0,r.Z)(s);n[t]=e,i({predicates:n})}),[s,i]),a=(0,d.useMemo)((function(){return(null==s?void 0:s.length)||0}),[s]),p=(0,d.useCallback)((function(e,t){if(!(e<0)){var n=(0,w.bH)()[t];return 0===e||(n=n.toLowerCase(),e>=2&&(n="".concat(n).concat(e-1))),n}}),[]),h=(0,d.useMemo)((function(){return p(n,t)}),[p,t,n]);return(0,L.jsxs)(L.Fragment,{children:[null==s?void 0:s.map((function(e,t){var r,u=function(n){return c(re(re({},e),n),t)};return(0,L.jsx)(ne,{andOrOperator:null==o?void 0:o.and_or_operator,first:0===t,last:t===a-1,level:n+1,predicate:e,removePredicate:function(){i(re(re({},e),{},{predicates:(0,I.oM)(s,t)}))},title:p(n+1,t),updatePredicate:u,children:(0,L.jsx)(_.Z,{mt:(null==e||null===(r=e.predicates)||void 0===r?void 0:r.length)>=1?E.cd:0,children:l({index:t,level:n+1,predicate:e,renderPredicate:l,setPredicate:u})})},"predicate-".concat(t))})),(0,L.jsx)(_.Z,{mt:E.cd,children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[n>=0&&(null==s?void 0:s.length)>=2&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(N.Z,{compact:!0,monospace:!0,onChange:function(e){return i(re(re({},o),{},{and_or_operator:e.target.value}))},small:!0,paddingVertical:3,value:null==o?void 0:o.and_or_operator,children:Object.values(b.YB).map((function(e){return(0,L.jsx)("option",{value:e,children:(b.YB.OR===e?"".concat(e," "):e).toUpperCase()},e)}))}),(0,L.jsx)(_.Z,{mr:1})]}),(0,L.jsxs)(m.ZP,{compact:n>=0,beforeIcon:(0,L.jsx)(k.Add,{}),onClick:function(){return u()},secondary:!0,small:n>=0,children:["Add predicate",h&&" in ".concat(h)]})]})})]})};function se(e){var t=e.index,n=e.level,o=e.predicate,r=e.renderPredicate,l=e.setPredicate;return(0,L.jsx)(ie,{index:t,level:n,predicate:o,renderPredicate:r,setPredicate:l})}var ue=n(42122),ce=n(70320),ae=n(23780);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he=function(e){var t,n,l,s,N,D,U,B,M,H,F,G,W,Y,Q,V,K,q,z,X,$,J,ee,te,ne,oe=e.isNew,re=e.operationType,le=e.resourceType,ie=e.rootProject,de=e.uuid,he=(0,ce.qB)(),fe=(0,h.useRouter)(),ve=(0,C.PR)(null==fe?void 0:fe.basePath),me="GlobalHookDetail/".concat(de),je=(0,d.useContext)(c.ThemeContext),xe=(0,d.useState)(null),ge=xe[0],be=xe[1],ye=(0,d.useState)(!1),Ze=ye[0],_e=ye[1],Oe=(0,d.useState)(re),Pe=Oe[0],ke=(Oe[1],(0,d.useState)(le)),Se=ke[0],Ee=(ke[1],(0,ae.VI)(null,{},[],{uuid:me})),we=(0,i.Z)(Ee,1)[0],Ae=(0,d.useMemo)((function(){return(0,ue.hB)(pe({include_operation_types:1,include_resource_types:1,include_snapshot_validation:1,operation_type:void 0===Pe?null:Pe,resource_type:void 0===Se?null:Se},ie?{root_project:ie}:{}))}),[Pe,Se]),Re=P.ZP.global_hooks.detail(oe?"__new__":de,Ae).data,Ce=(0,d.useMemo)((function(){return null==Re?void 0:Re.global_hook}),[Re]),Ie=(0,d.useMemo)((function(){return{onErrorCallback:function(e){var t=e.error,n=t.errors,o=t.exception,r=t.message,l=t.type,i=e.response;return a.Am.error((null==n?void 0:n.error)||o||r,{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:l}),we({errors:n,response:i})}}}),[]),Te=(0,p.Db)(P.ZP.global_hooks.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;fe.replace("/".concat(ie?"platform/":"","global-hooks/").concat(t.uuid,"?operation_type=").concat(t.operation_type,"&resource_type=").concat(t.resource_type))}},Ie))}}),Ne=(0,i.Z)(Te,2),De=Ne[0],Le=Ne[1].isLoading,Ue=(0,p.Db)(P.ZP.global_hooks.useUpdate(null==Ce?void 0:Ce.uuid,Ae),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;Je((function(e){return pe(pe({},e),t)})),a.Am.success("Global hook changes successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(t.uuid)})}},Ie))}}),Be=(0,i.Z)(Ue,2),Me=Be[0],He=Be[1].isLoading,Fe=(0,p.Db)((function(e){var t=e.pipeline;return P.ZP.global_hooks.useUpdate(null==Ce?void 0:Ce.uuid,Ae)({global_hook:{pipeline:t,snapshot:1}})}),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;Je((function(e){return pe(pe({},e),{},{metadata:pe(pe({},null==e?void 0:e.metadata),null==t?void 0:t.metadata),pipeline:pe(pe({},null==e?void 0:e.pipeline),null==t?void 0:t.pipeline)})})),a.Am.success("Snapshot successfully created.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-snapshot-success-".concat(t.uuid)})}},Ie))}}),Ge=(0,i.Z)(Fe,2),We=Ge[0],Ye=Ge[1].isLoading,Qe=(0,p.Db)(P.ZP.global_hooks.useDelete(null==Ce?void 0:Ce.uuid,Ae),{onSuccess:function(e){return(0,T.wD)(e,pe({callback:function(e){var t=e.global_hook;a.Am.success("Global hook changes successfully saved.",{position:a.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(t.uuid)}),fe.replace("/".concat(ie?"platform/":"","global-hooks"))}},Ie))}}),Ve=(0,i.Z)(Qe,2),Ke=Ve[0],qe=Ve[1].isLoading,ze=P.ZP.pipelines.list().data,Xe=(0,d.useMemo)((function(){return(0,I.YC)((null==ze?void 0:ze.pipelines)||[],(function(e){return e.name}))}),[ze]),$e=(0,d.useMemo)((function(){return(0,I.HK)(Xe||[],(function(e){return e.uuid}))}),[Xe]),Je=(0,d.useCallback)((function(e){be(e),_e(!0)}),[be,_e]);(0,d.useEffect)((function(){Ce&&!ge&&be(Ce)}),[ge,Ce,be]);var et=(0,d.useMemo)((function(){return null!=ge&&ge.operation_type&&null!=ge&&ge.resource_type?"".concat((0,w.vg)(null==ge?void 0:ge.operation_type)," ").concat(null==ge?void 0:ge.resource_type," operation"):null!=ge&&ge.resource_type?"".concat(null==ge?void 0:ge.resource_type," operation"):null!=ge&&ge.operation_type?"".concat(null==ge?void 0:ge.operation_type," operation"):"operation"}),[ge]),tt=(0,d.useMemo)((function(){var e;return null==$e?void 0:$e[null==ge||null===(e=ge.pipeline)||void 0===e?void 0:e.uuid]}),[ge,$e]),nt=(0,d.useMemo)((function(){return(null==tt?void 0:tt.blocks)||[]}),[tt]),ot=(0,d.useMemo)((function(){return(0,I.HK)(nt||[],(function(e){return e.uuid}))}),[nt]),rt=(0,d.useMemo)((function(){return(null==ge?void 0:ge.outputs)||[]}),[ge]),lt=(0,d.useCallback)((function(e,t){var n=(0,r.Z)(rt||[]);n[t]=e,Je((function(e){return pe(pe({},e),{},{outputs:n})}))}),[rt,Je]),it=(0,d.useMemo)((function(){return(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Add,{}),compact:(null==rt?void 0:rt.length)>=1,small:(null==rt?void 0:rt.length)>=1,onClick:function(){return Je((function(e){return pe(pe({},e),{},{outputs:((null==e?void 0:e.outputs)||[]).concat({block:{uuid:null},key:b.TT.PAYLOAD})})}))},secondary:!0,children:"Add block output"})}),[rt,Je]),st=(0,d.useMemo)((function(){return null==rt?void 0:rt.map((function(e,t){var n,o,r=e.block,l=e.key,i=e.keyMore,s=e.keys,c=null==ot?void 0:ot[null==r?void 0:r.uuid];return o=c?(0,L.jsx)(u(),{as:"/pipelines/".concat(null==tt?void 0:tt.uuid,"/edit?block_uuid=").concat(null==c?void 0:c.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(y.Z,{block:!0,openNewWindow:!0,children:(0,L.jsx)(O.ZP,{color:(0,R.qn)(null==c?void 0:c.type,{blockColor:null==c?void 0:c.color,theme:je}).accent,monospace:!0,children:(null==c?void 0:c.uuid)||"[select a block]"})})}):(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:(null==c?void 0:c.uuid)||(null==r?void 0:r.uuid)||"[select a block]"}),(0,L.jsxs)(v.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[o,(0,L.jsx)(_.Z,{mr:1}),(0,L.jsx)(k.PaginateArrowRight,{muted:!0}),(0,L.jsx)(_.Z,{mr:1}),(0,L.jsxs)(O.ZP,{default:!0,monospace:!0,children:[l||"{object}",(null==s?void 0:s.length)>=1&&(null==s?void 0:s.map((function(e){return(0,L.jsxs)(O.ZP,{default:!0,inline:!0,monospace:!0,children:["['",e,"']"]})})))]})]}),titleXPadding:E.cd*E.iI,titleYPadding:E.cd*E.iI,children:[(0,L.jsx)(Z.S,{title:"Block to extract data from",description:"The output data from this block will be merged into the ".concat(et,"’s data."),selectInput:{monospace:!0,onChange:function(n){return lt(pe(pe({},e),{},{block:pe(pe({},c),{},{uuid:n.target.value})}),t)},options:null==nt?void 0:nt.map((function(e){return{label:e.name,value:e.uuid}})),placeholder:"Select a block",value:null==c?void 0:c.uuid}},"block-uuid-".concat(t)),(0,L.jsx)(Z.S,{title:"Object to merge block output data into",description:"Select the ".concat(et," object to merge the block output data into."),selectInput:{monospace:!0,onChange:function(n){return lt(pe(pe({},e),{},{key:n.target.value}),t)},options:null===(n=Object.values(b.TT))||void 0===n?void 0:n.map((function(e){return{label:e,value:e}})),placeholder:"Select an object",value:l}},"key-".concat(t)),(0,L.jsxs)(Z.S,{title:"Additional dictionary keys",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If there is a nested object or value in the $",et," data that you want to merge the block output data into,",(0,L.jsx)("br",{}),"use these additional keys to instruct the hook on how nested you want to merge the block output data."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:"optional",onChange:function(n){return lt(pe(pe({},e),{},{keyMore:n.target.value}),t)},value:i},children:[null==s?void 0:s.map((function(n){return(0,L.jsx)(_.Z,{ml:1,children:(0,L.jsx)(j.Z,{border:!0,label:n,monospace:!0,onClick:function(){lt(pe(pe({},e),{},{keys:(s||[]).filter((function(e){return e!==n}))}),t)}})},"keys-".concat(t,"-").concat(n))})),(null==s?void 0:s.length)>=1&&(0,L.jsx)(_.Z,{mr:E.cd}),i&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(m.ZP,{compact:!0,onClick:function(){lt(pe(pe({},e),{},{keyMore:"",keys:(s||[]).concat(i)}),t)},small:!0,children:["Add key ",i]}),(0,L.jsx)(_.Z,{mr:E.cd})]})]},"keys-".concat(t)),(0,L.jsx)(Z.S,{title:"Remove block output",children:(0,L.jsx)(m.ZP,{compact:!0,onClick:function(){return Je((function(e){return pe(pe({},e),{},{outputs:(0,I.oM)((null==e?void 0:e.outputs)||[],t)})}))},small:!0,children:"Remove"})})]})}))}),[nt,ot,rt,tt,lt]),ut=(0,d.useMemo)((function(){return(0,ue.GL)(ge||{},["conditions","operation_type","outputs","pipeline","predicate","resource_type","run_settings","stages","strategies"])}),[ge]),ct=(0,d.useMemo)((function(){return(null==ge?void 0:ge.metadata)||{created_at:null,snapshot_hash:null,snapshot_valid:!1,snapshotted_at:null,updated_at:null,user:{id:null}}}),[ge]),at=(0,d.useMemo)((function(){return null==ge?void 0:ge.predicate}),[ge]),dt=(0,d.useMemo)((function(){return(0,L.jsx)(_.Z,{p:E.cd,children:se({level:-1,predicate:at,renderPredicate:se,setPredicate:function(e){return Je((function(t){return pe(pe({},t),{},{predicate:pe(pe({},e),{},{and_or_operator:b.YB.OR})})}))}})})}),[at,Je]);return(0,L.jsxs)(_.Z,{mb:8,p:E.cd,children:[(0,L.jsxs)(Z.Z,{title:"What to run hook for",children:[(0,L.jsx)(Z.S,{description:"This hook’s UUID must be unique across all hooks for the same resource type and operation type.",invalid:Ze&&!(null!=ge&&ge.uuid),textInput:oe?{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{uuid:e.target.value})}))},placeholder:"e.g. bootstrap pipeline blocks",value:null==ge?void 0:ge.uuid}:null,title:"Hook UUID",children:!oe&&(0,L.jsx)(_.Z,{px:E.cd,children:(0,L.jsx)(O.ZP,{large:!0,monospace:!0,children:de})})}),(0,L.jsx)(Z.S,{description:"Select the resource this hook should be attached to.",invalid:Ze&&!(null!=ge&&ge.resource_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{resource_type:e.target.value})}))},options:null==ge||null===(t=ge.resource_types)||void 0===t?void 0:t.map((function(e){return{label:(0,w.j3)(e),value:e}})),placeholder:"e.g. Pipeline",value:null==ge?void 0:ge.resource_type},title:"Resource type"}),(0,L.jsx)(Z.S,{description:"When a specific operation occurs for a given resource, this hook will be invoked for that specific operation on the configured resource.",invalid:Ze&&!(null!=ge&&ge.operation_type),selectInput:{monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{operation_type:e.target.value})}))},options:null==ge||null===(n=ge.operation_types)||void 0===n?void 0:n.map((function(e){return{label:(0,w.vg)(e),value:e}})),placeholder:"e.g. Update",value:null==ge?void 0:ge.operation_type},title:"Operation type"}),!oe&&(0,L.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:{0:!0},children:(0,L.jsxs)(v.Z,{noBorderRadius:!0,noPaddingContent:!0,title:"Targeting",titleXPadding:E.cd*E.iI,titleYPadding:E.cd*E.iI,children:[(0,L.jsx)(_.Z,{p:E.cd,children:(0,L.jsxs)(O.ZP,{default:!0,children:["Add targeting conditions to determine what subset of ",null!=ge&&ge.resource_type?(0,w._6)((0,w.j3)(null==ge?void 0:ge.resource_type),2,null,!0):"resources"," this hook should run for."]})}),dt]})})]}),!oe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"When to run hook",children:[(0,L.jsx)(Z.S,{title:"Before operation starts",description:"If enabled, this hook will be invoked before the ".concat(et," starts."),toggleSwitch:{checked:null==ge||null===(l=ge.stages)||void 0===l?void 0:l.includes(b.SQ.BEFORE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{stages:e(null==t||null===(n=t.stages)||void 0===n?void 0:n.includes(b.SQ.BEFORE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.stages)||[]).concat(b.SQ.BEFORE)])):(null==t||null===(r=t.stages)||void 0===r?void 0:r.filter((function(e){return e!==b.SQ.BEFORE})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"After operation completes",description:"If enabled, this hook will be invoked after the ".concat(et," ends."),toggleSwitch:{checked:null==ge||null===(s=ge.stages)||void 0===s?void 0:s.includes(b.SQ.AFTER),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{stages:e(null==t||null===(n=t.stages)||void 0===n?void 0:n.includes(b.SQ.AFTER))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.stages)||[]).concat(b.SQ.AFTER)])):(null==t||null===(r=t.stages)||void 0===r?void 0:r.filter((function(e){return e!==b.SQ.AFTER})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Run if ".concat(et," succeeds"),description:"If enabled, this hook will be invoked if the ".concat(et," is successful and doesn’t error."),toggleSwitch:{checked:null==ge||null===(N=ge.conditions)||void 0===N?void 0:N.includes(b.sw.SUCCESS),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{conditions:e(null==t||null===(n=t.conditions)||void 0===n?void 0:n.includes(b.sw.SUCCESS))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.conditions)||[]).concat(b.sw.SUCCESS)])):(null==t||null===(r=t.conditions)||void 0===r?void 0:r.filter((function(e){return e!==b.sw.SUCCESS})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Run if ".concat(et," fails"),description:"If enabled, this hook will be invoked if the ".concat(et," fails with an error."),toggleSwitch:{checked:null==ge||null===(D=ge.conditions)||void 0===D?void 0:D.includes(b.sw.FAILURE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{conditions:e(null==t||null===(n=t.conditions)||void 0===n?void 0:n.includes(b.sw.FAILURE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.conditions)||[]).concat(b.sw.FAILURE)])):(null==t||null===(r=t.conditions)||void 0===r?void 0:r.filter((function(e){return e!==b.sw.FAILURE})))||[]})}))}}})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Code to run",description:"When the current hook gets triggered, it will execute the associated pipeline.",children:[(0,L.jsx)(Z.S,{title:"Pipeline to execute",description:"Select a pipeline that will be executed every time this hook is triggered.",invalid:Ze&&!(null!=ge&&null!==(U=ge.pipeline)&&void 0!==U&&U.uuid),selectInput:{fullWidth:!1,monospace:!0,onChange:function(e){return Je((function(t){return pe(pe({},t),{},{pipeline:pe(pe({},null==t?void 0:t.pipeline),{},{uuid:e.target.value})})}))},options:null==Xe?void 0:Xe.map((function(e){var t=e.name,n=e.uuid;return{label:t||n,value:n}})),placeholder:"Select a pipeline",value:null==ge||null===(B=ge.pipeline)||void 0===B?void 0:B.uuid},children:(null==ge||null===(M=ge.pipeline)||void 0===M?void 0:M.uuid)&&(0,L.jsx)(_.Z,{mr:2,children:(0,L.jsx)(u(),{as:"/pipelines/".concat(null==ge||null===(H=ge.pipeline)||void 0===H?void 0:H.uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(y.Z,{block:!0,openNewWindow:!0,children:"View pipeline"})})})}),(0,L.jsxs)(Z.S,{title:null==ge||null===(F=ge.pipeline)||void 0===F||!F.uuid||null!=ct&&ct.snapshot_hash||null!=ct&&ct.snapshot_valid?"Valid code snapshot":"Code snapshot hasn’t been created yet",description:(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["Take a snapshot of ",null!=ge&&null!==(G=ge.pipeline)&&void 0!==G&&G.uuid?(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null==ge||null===(W=ge.pipeline)||void 0===W?void 0:W.uuid}):"the associated pipeline","’s code. The snapshot is used to validate the hook before it runs.",(0,L.jsx)("br",{}),"A hook cannot run if ",null!=ge&&null!==(Y=ge.pipeline)&&void 0!==Y&&Y.uuid?(0,L.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null==ge||null===(Q=ge.pipeline)||void 0===Q?void 0:Q.uuid}):"the associated pipeline","’s code has changed after the most recent snapshot has been made.",(0,L.jsx)("br",{}),"If the code changes, a new snapshot must be created."]})}),invalid:(null==ge||null===(V=ge.pipeline)||void 0===V?void 0:V.uuid)&&(null==ct?void 0:ct.snapshot_hash)&&!(null!=ct&&ct.snapshot_valid),warning:(null==ge||null===(K=ge.pipeline)||void 0===K?void 0:K.uuid)&&!(null!=ct&&ct.snapshot_hash)&&!(null!=ct&&ct.snapshot_valid),children:[!(null!=ct&&ct.snapshot_hash)&&(0,L.jsx)(O.ZP,{default:!0,large:!0,children:null!=ge&&null!==(q=ge.pipeline)&&void 0!==q&&q.uuid?"No snapshot has been created":"Select a pipeline before taking a snapshot"}),(null==ct?void 0:ct.snapshot_hash)&&(0,L.jsx)(g.ZP,{flexDirection:"column",children:(0,L.jsx)(O.ZP,{danger:!(null!=ct&&ct.snapshot_valid),large:!0,rightAligned:!0,success:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_valid?"Snapshot valid":"Snapshot outdated"})})]}),(0,L.jsx)(_.Z,{p:E.cd,children:(0,L.jsx)(g.ZP,{alignItems:"center",justifyContent:"flex-end",children:(0,L.jsxs)(g.ZP,{alignItems:"center",children:[(null==ct?void 0:ct.snapshotted_at)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(O.ZP,{muted:!0,rightAligned:!0,small:!0,children:["Last snapshot at ",(0,L.jsx)(O.ZP,{inline:!0,muted:!0,small:!0,monospace:!0,children:null==ct?void 0:ct.snapshotted_at})]}),(0,L.jsx)(_.Z,{mr:E.cd})]}),(0,L.jsx)(m.ZP,{disabled:!(null!=ge&&null!==(z=ge.pipeline)&&void 0!==z&&z.uuid),loading:Ye,onClick:function(){return We({pipeline:null==ge?void 0:ge.pipeline})},primary:!(null!=ct&&ct.snapshot_valid),secondary:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_hash?null!=ct&&ct.snapshot_valid?"Update snapshot even though it’s valid":"Update snapshot to make it valid":"Create snapshot of code"})]})})})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"How to run hook",children:[(0,L.jsx)(Z.S,{title:"Stop operation if hook fails",description:"If enabled, the ".concat(et," will be cancelled and an error will be raised."),toggleSwitch:{checked:null==ge||null===(X=ge.strategies)||void 0===X?void 0:X.includes(b.Ij.RAISE),onCheck:function(e){return Je((function(t){var n,r;return pe(pe({},t),{},{strategies:e(null==t||null===(n=t.strategies)||void 0===n?void 0:n.includes(b.Ij.RAISE))?Array.from((0,o.Z)(Set,[((null==t?void 0:t.strategies)||[]).concat(b.Ij.RAISE)])):(null==t||null===(r=t.strategies)||void 0===r?void 0:r.filter((function(e){return e!==b.Ij.RAISE})))||[]})}))}}}),(0,L.jsx)(Z.S,{title:"Execute hook with history and logging",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If enabled, anytime this hook is executed an associated pipeline run and block runs will be created.",(0,L.jsx)("br",{}),"This will provide a history of the hook execution as well as logging for observability.",(0,L.jsx)("br",{}),"However, this will have a significant impact on the ",et," resolution time.",(0,L.jsx)("br",{}),"This may cause very delayed API responsed and a degraded devloper experience."]}),toggleSwitch:{checked:!(null==ge||null===($=ge.run_settings)||void 0===$||!$.with_trigger),onCheck:function(e){return Je((function(t){var n;return pe(pe({},t),{},{run_settings:pe(pe({},null==t?void 0:t.run_settings),{},{with_trigger:e(null==t||null===(n=t.run_settings)||void 0===n?void 0:n.with_trigger)})})}))}}}),(0,L.jsx)(Z.S,{title:"Run hook asynchronously",description:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["Hooks will execute the associated pipeline synchronously and prevent the current resource operation (e.g. API request) from resolving until all associated hooks for that resource operation are completed.",(0,L.jsx)("br",{}),"Hooks running synchronously can mutate the input data and output data. However, it can slow down the user experience in the application.",(0,L.jsx)("br",{}),"Enable this setting to run hooks asynchronously and not block the current resource operation from resolving.",(0,L.jsx)("br",{}),"However, asynchronous hooks cannot mutate the input data or output data. Use this asynchronous setting when hooks don’t need to mutate data."]}),toggleSwitch:{checked:!(null==ge||null===(J=ge.run_settings)||void 0===J||!J.asynchronous),onCheck:function(e){return Je((function(t){var n;return pe(pe({},t),{},{run_settings:pe(pe({},null==t?void 0:t.run_settings),{},{asynchronous:e(null==t||null===(n=t.run_settings)||void 0===n?void 0:n.asynchronous)})})}))}}})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Block outputs ".concat((null==rt?void 0:rt.length)>=1?"(".concat((null==rt?void 0:rt.length)||0,")"):""),description:(0,L.jsx)(_.Z,{mt:1,children:(0,L.jsxs)(O.ZP,{muted:!0,children:["When a hook runs and executes a pipeline, the output from the pipeline’s blocks",(0,L.jsx)("br",{}),"can optionally be used to mutate the ",et," input and output data."]})}),headerChildren:(null==rt?void 0:rt.length)>=1&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(_.Z,{ml:E.cd}),it]}),children:[!(null!=rt&&rt.length)&&(0,L.jsx)(_.Z,{p:E.cd,children:it}),(null==rt?void 0:rt.length)>=1&&(0,L.jsx)(f.Z,{noBorder:!0,noBoxShadow:!0,children:st})]}),(0,L.jsx)(_.Z,{mb:E.cd}),(0,L.jsxs)(Z.Z,{title:"Metadata",children:[(0,L.jsx)(Z.S,{title:"Last updated",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.updated_at?(0,A.XG)(null==ct?void 0:ct.updated_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Created at",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.created_at?(0,A.XG)(null==ct?void 0:ct.created_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Snapshotted at",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&ct.snapshotted_at?(0,A.XG)(null==ct?void 0:ct.snapshotted_at,he):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.Schedule,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Snapshot valid",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,danger:!(null!=ct&&ct.snapshot_valid),muted:null==ct?void 0:ct.snapshot_valid,children:null!=ct&&ct.snapshot_valid?"Valid":"Hook won’t run until snapshot is valid"}),(0,L.jsx)(_.Z,{mr:E.cd}),null!=ct&&ct.snapshot_valid?(0,L.jsx)(k.Check,{size:S.Z,success:!0}):(0,L.jsx)(k.AlertTriangle,{danger:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})}),(0,L.jsx)(Z.S,{title:"Created by",children:(0,L.jsxs)(x.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!=ct&&null!==(ee=ct.user)&&void 0!==ee&&ee.id?String(null==ct||null===(te=ct.user)||void 0===te?void 0:te.id)===String(null==ve?void 0:ve.id)?"You created this hook":"User ID ".concat(null==ct||null===(ne=ct.user)||void 0===ne?void 0:ne.id):"-"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(k.UserSmileyFace,{muted:!0,size:S.Z}),(0,L.jsx)(_.Z,{mr:1})]})})]})]}),(0,L.jsx)(_.Z,{mt:E.HN,children:(0,L.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[!oe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(m.ZP,{compact:!0,danger:!0,loading:qe,onClick:function(){window.confirm("Are you sure you wantt to delete this hook?")&&Ke()},small:!0,children:"Delete global hook"}),(0,L.jsx)(_.Z,{mr:E.cd})]}),(0,L.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.PaginateArrowLeft,{}),disabled:Le||He||qe,onClick:function(){return fe.push("/".concat(ie?"platform/":"","global-hooks"))},secondary:!0,children:Ze?"Cancel changes & go back":"Go back to all hooks"}),(0,L.jsx)(_.Z,{mr:E.cd}),(0,L.jsx)(m.ZP,{beforeIcon:(0,L.jsx)(k.Save,{}),disabled:qe,loading:Le||He,onClick:function(){return(oe?De:Me)({global_hook:pe(pe(pe({},ut),oe?{uuid:null==ge?void 0:ge.uuid}:{}),{},{root_project:ie})})},primary:!0,children:oe?"Create new global hook":"Save changes"})]})]})})]})}},93808:function(e,t,n){n.d(t,{Z:function(){return S}});var o=n(77837),r=n(26304),l=n(62243),i=n(29385),s=n(80022),u=n(13692),c=n(93189),a=n(15544),d=n(82394),p=n(38860),h=n.n(p),f=n(82684),v=n(56663),m=n.n(v),j=n(40761),x=n(34661),g=n(36105),b=n(50178),y=n(69419),Z=n(28598),_=["auth"];function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,d.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,a.Z)(e);if(t){var r=(0,a.Z)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,c.Z)(this,n)}}function S(e){return function(t){(0,u.Z)(a,t);var n,c=k(a);function a(){var e;(0,l.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=c.call.apply(c,[this].concat(n)),(0,d.Z)((0,s.Z)(e),"state",{auth:new j.Z(e.props.token)}),e}return(0,i.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new j.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,n=(t.auth,(0,r.Z)(t,_));return(0,Z.jsx)(e,P({auth:this.state.auth},n))}}],[{key:"getInitialProps",value:(n=(0,o.Z)(h().mark((function t(n){var o,r,l,i,s,u,c,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=m()(n),r=(0,b.ex)(n),l=r.id,i=o[x.Mv],s=o[g.qt],u=new j.Z(i),c=P(P({},n),{},{auth:u,currentGroupId:l,theme:s}),(0,b.YB)(n)&&u.isExpired&&(console.log("OAuth token has expired."),a=P(P({},n.query),{},{redirect_url:n.asPath}),(0,y.nL)("/sign-in?".concat((0,y.uM)(a)),n.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(c);case 10:return d=t.sent,t.abrupt("return",P(P({},d),{},{auth:u,currentGroupId:l,theme:s}));case 12:return t.abrupt("return",c);case 13:case"end":return t.stop()}}),t)}))),function(e){return n.apply(this,arguments)})}]),a}(f.Component)}},14466:function(e,t,n){n.d(t,{Ij:function(){return l},N_:function(){return v},SQ:function(){return i},TT:function(){return s},W6:function(){return p},XG:function(){return a},YB:function(){return c},i9:function(){return f},sw:function(){return u},t4:function(){return d}});var o,r,l,i,s,u,c,a,d,p,h=n(82394);!function(e){e.CREATE="create",e.DELETE="delete",e.DETAIL="detail",e.EXECUTE="execute",e.LIST="list",e.UPDATE="update",e.UPDATE_ANYWHERE="update_anywhere"}(r||(r={})),function(e){e.BREAK="break",e.CONTINUE="continue",e.RAISE="raise"}(l||(l={})),function(e){e.AFTER="after",e.BEFORE="before"}(i||(i={})),function(e){e.ERROR="error",e.META="meta",e.METADATA="metadata",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources"}(s||(s={})),function(e){e.FAILURE="failure",e.SUCCESS="success"}(u||(u={})),function(e){e.AND="and",e.OR="or"}(c||(c={})),function(e){e.ERROR="error",e.HOOK="hook",e.META="meta",e.METADATA="metadata",e.OPERATION_RESOURCE="operation_resource",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources",e.RESOURCE_ID="resource_id",e.RESOURCE_PARENT="resource_parent",e.RESOURCE_PARENT_ID="resource_parent_id",e.RESOURCE_PARENT_TYPE="resource_parent_type",e.USER="user"}(a||(a={})),function(e){e.BOOLEAN="BOOLEAN",e.DICTIONARY="DICTIONARY",e.FLOAT="FLOAT",e.INTEGER="INTEGER",e.LIST="LIST",e.STRING="STRING"}(d||(d={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",e.INCLUDES="INCLUDES",e.LESS_THAN="LESS_THAN",e.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.NOT_INCLUDES="NOT_INCLUDES",e.NOT_PRESENT="NOT_PRESENT",e.PRESENT="PRESENT"}(p||(p={}));var f=[p.NOT_PRESENT,p.PRESENT],v=(o={},(0,h.Z)(o,p.EQUALS,"=="),(0,h.Z)(o,p.GREATER_THAN,">"),(0,h.Z)(o,p.GREATER_THAN_OR_EQUALS,">="),(0,h.Z)(o,p.INCLUDES,"includes"),(0,h.Z)(o,p.LESS_THAN,"<"),(0,h.Z)(o,p.LESS_THAN_OR_EQUALS,"<="),(0,h.Z)(o,p.NOT_EQUALS,"!="),(0,h.Z)(o,p.NOT_INCLUDES,"not includes"),(0,h.Z)(o,p.NOT_PRESENT,"is not present"),(0,h.Z)(o,p.PRESENT,"is present"),o)},80022:function(e,t,n){function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return o}})},15544:function(e,t,n){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{Z:function(){return o}})},13692:function(e,t,n){n.d(t,{Z:function(){return r}});var o=n(61049);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,o.Z)(e,t)}},93189:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(12539),r=n(80022);function l(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1598],{94629:function(e,r,t){t.d(r,{Z:function(){return j}});var n=t(82394),i=t(21831),o=t(82684),s=t(50724),u=t(82555),a=t(97618),c=t(70613),f=t(
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1598],{94629:function(e,r,t){t.d(r,{Z:function(){return j}});var n=t(82394),i=t(21831),o=t(82684),s=t(50724),u=t(82555),a=t(97618),c=t(70613),f=t(92272),d=t(68899),l=t(28598);function h(e,r){var t=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:r,children:t})}var p=o.forwardRef(h),b=t(62547),v=t(82571),O=t(77417),m=t(46684),w=t(75375);function g(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?g(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function y(e,r){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,n=e.afterHeader,o=e.afterHidden,h=e.afterWidth,g=e.afterWidthOverride,y=e.appendBreadcrumbs,j=e.before,S=e.beforeHeader,E=e.beforeWidth,I=e.breadcrumbs,k=e.children,Z=e.contained,R=e.errors,A=e.headerMenuItems,W=e.headerOffset,x=e.hideAfterCompletely,C=e.mainContainerHeader,B=e.navigationItems,H=e.setAfterHidden,M=e.setAfterWidth,N=e.setBeforeWidth,_=e.setErrors,D=e.subheaderChildren,F=e.subheaderNoPadding,L=e.title,U=e.uuid,T=(0,w.Z)(U,{beforeResizeOffset:w.H,setWidthAfter:M,setWidthBefore:N,widthAfter:h,widthBefore:E,widthOverrideAfter:g}),V=T.mainContainerRef,G=T.mousedownActiveAfter,z=T.mousedownActiveBefore,K=T.setMousedownActiveAfter,q=T.setMousedownActiveBefore,Y=T.setWidthAfter,J=T.setWidthBefore,Q=T.widthAfter,X=T.widthBefore,$=(0,O.Z)().project,ee=[];return I&&ee.push.apply(ee,(0,i.Z)(I)),null!=I&&I.length&&!y||!$||null!=I&&I.length||ee.unshift({bold:!y,label:function(){return L}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{title:L}),(0,l.jsx)(f.Z,{breadcrumbs:ee,menuItems:A}),(0,l.jsxs)(d.Nk,{ref:r,children:[0!==(null==B?void 0:B.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:B,showMore:!0})}),(0,l.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:t,afterHeader:n,afterHeightOffset:m.Mz,afterHidden:o,afterMousedownActive:G,afterWidth:Q,before:j,beforeHeader:S,beforeHeightOffset:m.Mz,beforeMousedownActive:z,beforeWidth:j?X:d.k1,contained:Z,headerOffset:W,hideAfterCompletely:!t||x,leftOffset:j?d.k1:null,mainContainerHeader:C,mainContainerRef:V,setAfterHidden:H,setAfterMousedownActive:K,setAfterWidth:Y,setBeforeMousedownActive:q,setBeforeWidth:J,children:[D&&(0,l.jsx)(p,{noPadding:F,children:D}),k]})})]}),R&&(0,l.jsx)(s.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==_?void 0:_(null)},children:(0,l.jsx)(u.Z,P(P({},R),{},{onClose:function(){return null==_?void 0:_(null)}}))})]})}var j=o.forwardRef(y)},93808:function(e,r,t){t.d(r,{Z:function(){return k}});var n=t(77837),i=t(26304),o=t(62243),s=t(29385),u=t(80022),a=t(13692),c=t(93189),f=t(15544),d=t(82394),l=t(38860),h=t.n(l),p=t(82684),b=t(56663),v=t.n(b),O=t(40761),m=t(34661),w=t(36105),g=t(50178),P=t(69419),y=t(28598),j=["auth"];function S(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function E(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?S(Object(t),!0).forEach((function(r){(0,d.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function I(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=(0,f.Z)(e);if(r){var i=(0,f.Z)(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return(0,c.Z)(this,t)}}function k(e){return function(r){(0,a.Z)(f,r);var t,c=I(f);function f(){var e;(0,o.Z)(this,f);for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return e=c.call.apply(c,[this].concat(t)),(0,d.Z)((0,u.Z)(e),"state",{auth:new O.Z(e.props.token)}),e}return(0,s.Z)(f,[{key:"componentDidMount",value:function(){this.setState({auth:new O.Z(this.props.token)})}},{key:"render",value:function(){var r=this.props,t=(r.auth,(0,i.Z)(r,j));return(0,y.jsx)(e,E({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:(t=(0,n.Z)(h().mark((function r(t){var n,i,o,s,u,a,c,f,d;return h().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=v()(t),i=(0,g.ex)(t),o=i.id,s=n[m.Mv],u=n[w.qt],a=new O.Z(s),c=E(E({},t),{},{auth:a,currentGroupId:o,theme:u}),(0,g.YB)(t)&&a.isExpired&&(console.log("OAuth token has expired."),f=E(E({},t.query),{},{redirect_url:t.asPath}),(0,P.nL)("/sign-in?".concat((0,P.uM)(f)),t.res)),!e.getInitialProps){r.next=12;break}return r.next=10,e.getInitialProps(c);case 10:return d=r.sent,r.abrupt("return",E(E({},d),{},{auth:a,currentGroupId:o,theme:u}));case 12:return r.abrupt("return",c);case 13:case"end":return r.stop()}}),r)}))),function(e){return t.apply(this,arguments)})}]),f}(p.Component)}},75083:function(e,r,t){t.d(r,{HF:function(){return o},L6:function(){return n}});var n,i=t(72473);function o(e,r,t){var o=e.owner,s=(e.roles,[{Icon:i.WorkspacesIcon,id:n.WORKSPACES,isSelected:function(){return n.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}},{Icon:i.NavDashboard,id:n.OVERVIEW,isSelected:function(){return n.OVERVIEW===t},label:function(){return"Overview"},linkProps:{href:"/manage/overview"}},{Icon:i.Schedule,id:n.PIPELINE_RUNS,isSelected:function(){return n.PIPELINE_RUNS===t},label:function(){return"Pipeline runs"},linkProps:{href:"/manage/pipeline-runs"}}]);return o&&s.push({Icon:i.WorkspacesUsersIcon,id:n.USERS,isSelected:function(){return n.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),s.push.apply(s,[{Icon:i.File,id:n.FILE_BROWSER,isSelected:function(){return n.FILE_BROWSER===t},label:function(){return"File browser"},linkProps:{href:"/manage/files"}},{Icon:i.Settings,id:n.SETTINGS,isSelected:function(){return n.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}]),s}!function(e){e.OVERVIEW="overview",e.PIPELINE_RUNS="pipeline_runs",e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings",e.FILE_BROWSER="file_browser"}(n||(n={}))},59533:function(e,r,t){var n=t(82684),i=t(94629),o=t(35686),s=t(50018),u=t(70515),a=t(75083),c=t(28598);r.Z=function(e){var r=e.before,t=e.breadcrumbs,f=void 0===t?[]:t,d=e.children,l=e.errors,h=e.headerOffset,p=e.mainContainerHeader,b=e.pageName,v=e.setErrors,O=e.subheaderChildren,m=o.ZP.statuses.list().data,w=(0,n.useMemo)((function(){var e,r;return null==m||null===(e=m.statuses)||void 0===e||null===(r=e[0])||void 0===r?void 0:r.project_type}),[m]),g=(0,s.Z)()||{};return(0,c.jsx)(i.Z,{before:r,beforeWidth:r?50*u.iI:0,breadcrumbs:f,errors:l,headerOffset:h,mainContainerHeader:p,navigationItems:(0,a.HF)(g,w,b),setErrors:v,subheaderChildren:O,title:"Workspaces",uuid:"workspaces/index",children:d})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2717],{8916:function(e,n,t){t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return h},wx:function(){return a}});var r=t(75582),i=t(82394),l=t(83784),o=t(30229);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"==typeof e?e:JSON.stringify(e)}function a(e,n){var t,r;return null==e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return c(c({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=a(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,r=n.value;return c(c({},e),{},(0,i.Z)({},t,r))}),{})}function p(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function h(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],o=t[1],u=o;try{u=JSON.parse(o)}catch(e){}return c(c({},e),{},(0,i.Z)({},l,u))}),{}):e}},81334:function(e,n,t){t.d(n,{Z:function(){return _}});var r=t(82394),i=t(82684),l=t(27277),o=t(31882),u=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(9518),p=t(44897),h=t(42631),f=t(47041),m=t(70515),v=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],f.w5,h.BG,40*m.iI,(function(e){return"\n background-color: ".concat((e.theme.background||p.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||p.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*m.iI,"px;\n ")})),j=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*m.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||p.Z.interactive).hoverBackground,";\n ")})),g=t(39643),x=t(95924),b=t(86735),Z=t(44688),y=t(28598);function P(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 O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=function(e){var n,t=e.removeTag,r=e.selectTag,d=e.selectedTags,p=void 0===d?[]:d,h=e.tags,f=void 0===h?[]:h,m=e.uuid,P=(0,i.useRef)(null),_=(0,i.useState)(!1),k=_[0],w=_[1],S=(0,i.useState)(null),C=S[0],I=S[1],T=(0,i.useMemo)((function(){return(0,b.YC)(f||[],"uuid")}),[f]),E=(0,i.useMemo)((function(){return null==T?void 0:T.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[T]),M=(0,i.useMemo)((function(){return(null==C?void 0:C.length)>=1?E.concat({itemObject:{uuid:C},searchQueries:[C],value:"Add tag: ".concat(C)}):E}),[E,C]),D=(0,Z.y)(),N=D.registerOnKeyDown,A=D.unregisterOnKeyDown;return(0,i.useEffect)((function(){return function(){return A(m)}}),[A,m]),null==N||N(m,(function(e,n){var t;k&&n[g.vP]&&(w(!1),null==P||null===(t=P.current)||void 0===t||t.blur())}),[k,P]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.Z,{onClickTag:t,tags:p}),(0,y.jsxs)(u.Z,{mt:1,style:{position:"relative"},children:[(0,y.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return w(!1)}),150)},onChange:function(e){return I(e.target.value)},onFocus:function(){return w(!0)},ref:P,value:C||""}),(0,y.jsx)(v,{topOffset:null==P||null===(n=P.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,y.jsx)(l.Z,{eventProperties:{eventParameters:{item_type:"tag"}},itemGroups:[{items:k?M:[],renderItem:function(e,n){var t=e.value;return(0,y.jsx)(j,O(O({},n),{},{onClick:function(e){var t;(0,x.j)(e),null==n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,y.jsx)(o.Z,{small:!0,children:(0,y.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null==r||r(n),I(null)},searchQuery:C,uuid:m})})]})]})}},71610:function(e,n,t){var r=t(82394),i=t(75582),l=t(12691),o=t.n(l),u=t(9518),c=t(82684),s=t(32013),a=t(98777),d=t(15338),p=t(48670),h=t(88543),f=t(38276),m=t(4190),v=t(75499),j=t(30160),g=t(35686),x=t(70515),b=t(30229),Z=t(32080),y=t(81728),P=t(3917),O=t(55283),_=t(70320),k=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 S(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 C={large:!1};n.Z=function(e){var n=e.bookmarkValues,t=e.originalBookmarkValues,l=e.setBookmarkValues,w=e.pipeline,I=(0,c.useContext)(u.ThemeContext),T=(0,_.qB)(),E=(0,c.useState)(null),M=E[0],D=E[1],N=(0,c.useMemo)((function(){return null!=w&&w.blocks?(0,Z.nG)(w):null}),[w]),A=(0,c.useMemo)((function(){return Object.keys(N||{})||[]}),[N]),L=g.ZP.integration_sources.pipelines.list(null==w?void 0:w.uuid,{block_uuid:A},{},{pauseFetch:!(null!=A&&A.length)}).data,H=(0,c.useMemo)((function(){return null==L?void 0:L.integration_sources}),[L]);return(0,c.useEffect)((function(){if((null==H?void 0:H.length)>=1&&(!n||!M)){var e={};null==H||H.map((function(n){var t,r=n.block,l=n.streams,o=null==r?void 0:r.uuid;e[o]={},null===(t=Object.entries(l||{}))||void 0===t||t.forEach((function(n){var t,r,l=(0,i.Z)(n,2),u=l[0],c=l[1];e[o][u]=null==c||null===(t=c.state)||void 0===t||null===(r=t.bookmarks)||void 0===r?void 0:r[u]}))})),n||l(e),M||D(e)}}),[n,M,l,D,H]),(0,k.jsxs)(f.Z,{p:x.cd,children:[!L&&(0,k.jsx)(m.Z,{inverted:!0,small:!0}),null==H?void 0:H.map((function(e){var u=e.block,m=e.pipeline_run,g=e.pipeline_schedule,Z=e.streams,_=null==u?void 0:u.uuid;return(0,k.jsx)(h.Z,{title:(0,k.jsx)(j.ZP,{color:(0,O.qn)(null==u?void 0:u.type,{blockColor:null==u?void 0:u.color,theme:I}).accent,monospace:!0,children:_}),children:(0,k.jsx)(s.Z,{noBorder:!0,noBoxShadow:!0,children:Object.entries(Z||{}).map((function(e){var u,s,Z,O,I=(0,i.Z)(e,2),E=I[0],D=I[1],N=D.record,A=D.state,L=(null==A||null===(u=A.bookmarks)||void 0===u?void 0:u[E])||{};return(0,k.jsxs)(a.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:E}),titleXPadding:x.cd*x.iI,titleYPadding:x.cd*x.iI,children:[(0,k.jsx)(h.S,S(S({},C),{},{title:"Last pipeline run started at",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(null==m?void 0:m.started_at)&&(0,P.XG)(null==m?void 0:m.started_at,T)})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,S(S({},C),{},{title:"Last pipeline run completed at",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(null==m?void 0:m.completed_at)&&(0,P.XG)(null==m?void 0:m.completed_at,T)})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,S(S({},C),{},{title:"Trigger",children:(0,k.jsx)(o(),{as:"/pipelines/".concat(null==w?void 0:w.uuid,"/triggers/").concat(null==g?void 0:g.id),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,k.jsx)(p.Z,{block:!0,default:!0,openNewWindow:!0,children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:null==g?void 0:g.name})})})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,S(S({},C),{},{title:"Type",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:(0,y.kC)((null===(s=b.Z4[null==g?void 0:g.schedule_type])||void 0===s?void 0:s.call(b.Z4))||"")})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsx)(h.S,S(S({},C),{},{title:"Frequency",children:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:null==g?void 0:g.schedule_interval})})),(0,k.jsx)(d.Z,{light:!0}),(0,k.jsxs)(f.Z,{p:x.cd,children:[(0,k.jsx)(j.ZP,{bold:!0,large:!0,children:"Bookmark values"}),(0,k.jsx)(f.Z,{mt:1,children:(0,k.jsxs)(j.ZP,{muted:!0,small:!0,children:["Overriding the bookmark values will be applied to all pipeline runs",(0,k.jsx)("br",{}),"for this trigger until there is at least 1 successful pipeline run in this trigger."]})})]}),(0,k.jsx)(d.Z,{light:!0,short:!0}),!(null!==(Z=Object.values(L||{}))&&void 0!==Z&&Z.length)&&(0,k.jsx)(f.Z,{p:x.cd,children:(0,k.jsx)(j.ZP,{muted:!0,children:"There are currently no bookmark values for this stream."})}),Object.entries(L||{}).map((function(e){var o,u,s,a,d,p,f=(0,i.Z)(e,2),m=f[0],v=(f[1],null==n||null===(o=n[_])||void 0===o||null===(u=o[E])||void 0===u?void 0:u[m]),g=(null==t||null===(s=t[_])||void 0===s||null===(a=s[E])||void 0===a||a[m],null==M||null===(d=M[_])||void 0===d||null===(p=d[E])||void 0===p?void 0:p[m]);return(0,c.createElement)(h.S,S(S({},C),{},{title:(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:m}),description:g&&g!==v&&(0,k.jsxs)(j.ZP,{muted:!0,small:!0,children:["Original bookmark value from the last pipeline run: ",(0,k.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:g})]}),key:"".concat(_,"-bookmark-values-").concat(m),textInput:{monospace:!0,onChange:function(e){return l((function(t){var i;return S(S({},t),{},(0,r.Z)({},_,S(S({},null==n?void 0:n[_]),{},(0,r.Z)({},E,S(S({},null==n||null===(i=n[_])||void 0===i?void 0:i[E]),{},(0,r.Z)({},m,e.target.value))))))}))},value:String(v||"")}}))})),(0,k.jsx)(d.Z,{light:!0}),(0,c.createElement)(h.S,S(S({},C),{},{title:"Record",description:"The most recently synced record.",key:"block-uuid-".concat(_,"-").concat(E)}),(0,k.jsx)(v.Z,{columnFlex:[1,null],columns:[{uuid:"Column"},{uuid:"Value"}],rows:null===(O=Object.entries(N||{}))||void 0===O?void 0:O.map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:t},t),(0,k.jsx)(j.ZP,{default:!0,monospace:!0,children:String(r)},"".concat(t,"-").concat(r))]}))}))]})}))})})}))]})}},88785:function(e,n,t){t.d(n,{J:function(){return c},U:function(){return u}});var r=t(9518),i=t(44897),l=t(42631),o=t(70515),u=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*o.iI,o.cd*o.iI,o.cd*o.iI,40*o.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),c=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,o.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*o.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*o.iI,"px;\n ")}))},12717:function(e,n,t){t.d(n,{Z:function(){return qe}});var r=t(21831),i=t(82394),l=t(75582),o=t(12691),u=t.n(o),c=t(82684),s=t(20026),a=t.n(s),d=t(92083),p=t.n(d),h=t(21764),f=t(83455),m=t(34376),v=t(71610),j=t(71180),g=t(90299),x=t(14805),b=t(70652),Z=t(50724),y=t(9134),P=t(39457),O=t(9518),_=t(39867),k=t(55485),w=t(85854),S=t(38276),C=t(75499),I=t(30160),T=t(17488),E=t(12468),M=t(44375),D=t(70515),N=t(55283),A=t(86735),L=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var q=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,l=(0,c.useContext)(O.ThemeContext),o=(0,c.useCallback)((function(e,n){return t((function(){var t=(null==r?void 0:r.__mage_variables)||{},l=(null==t?void 0:t.blocks)||{},o=l[e]||{},u=(null==o?void 0:o.configuration)||{};return B(B({},r),{},{__mage_variables:B(B({},t),{},{blocks:B(B({},l),{},(0,i.Z)({},e,B(B({},o),{},{configuration:B(B({},u),n)})))})})}))}),[t,r]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w.Z,{children:"dbt runtime settings"}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(C.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null==n?void 0:n.map((function(e){var n,t,i,u=e.type,c=e.uuid,s=(0,M.IU)(e).name,a=(0,N.qn)(u,{blockColor:e.color,theme:l}).accent,d=null==r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(i=t[c])||void 0===i?void 0:i.configuration,p=d||{},h=p.prefix,f=p.suffix,m=(null==d?void 0:d.flags)||[],v=!(null==m||!m.includes(M.Dy));return[(0,L.jsx)(E.Z,{block:!0,label:(0,L.jsx)(I.ZP,{monospace:!0,small:!0,children:c}),size:null,widthFitContent:!0,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(_.Z,{color:a,size:1.5*D.iI,square:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsxs)(I.ZP,{monospace:!0,small:!0,children:[h&&(0,L.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:h}),s,f&&(0,L.jsx)(I.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f})]})]})},"uuid-".concat(c)),(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(b.Z,{checked:v,label:M.Dy,monospace:!0,onClick:function(){return o(c,{flags:v?(0,A.Od)(m,(function(e){return M.Dy===e})):m.concat(M.Dy)})},small:!0})},"flags-".concat(c)),(0,L.jsx)(T.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:h,width:10*D.iI},"prefix-".concat(c)),(0,L.jsx)(T.Z,{compact:!0,monospace:!0,onChange:function(e){return o(c,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:f,width:10*D.iI},"suffix-".concat(c))]}))})})]})},z=t(97196),F=t(15338),V=t(97618),R=t(48670),U=t(26304),W=t(44897),X=t(95363),Y=t(61896),G=["children","large","lineHeight","ordered"];function J(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 K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?J(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Q=(0,O.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||W.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||W.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(X.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(X.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(Y.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(Y.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(Y.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),$=O.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],Q),ee=O.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],Q),ne=O.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*D.iI,"px;\n ")}));var te,re=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,l=(0,U.Z)(e,G),o=i?ee:$;return(0,L.jsx)(o,K(K({large:t,lineHeight:r},l),{},{children:c.Children.map(n,(function(e,n){var r;return(0,L.jsx)(ne,K(K({large:t,marginTop:n>=1},l),{},{children:c.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},ie=t(37899),le=t(75457),oe=t(30229),ue=t(57653),ce=t(83784),se=t(44085),ae=t(81334),de=t(69650),pe=t(81769),he=t(54193),fe=t(72473),me=t(81728),ve=t(16488),je=t(70320),ge=(te={},(0,i.Z)(te,he.zj.DATE,fe.CalendarDate),(0,i.Z)(te,he.zj.DATETIME,fe.Schedule),(0,i.Z)(te,he.zj.DICTIONARY,fe.DocumentIcon),(0,i.Z)(te,he.zj.FLOAT,fe.NumberWithDecimalHash),(0,i.Z)(te,he.zj.INTEGER,fe.NumberHash),(0,i.Z)(te,he.zj.LIST,fe.TodoList),(0,i.Z)(te,he.zj.STRING,fe.Alphabet),te);var xe=function(e){var n,t,r,i,o=e.containerRef,u=e.date,s=e.interactions,a=e.pipeline,d=e.pipelineInteraction,p=e.pipelineSchedule,h=e.setVariables,f=e.showSummary,m=e.time,v=e.triggerTypes,j=e.variables,g=(0,c.useMemo)((function(){return(0,A.HK)(s||[],(function(e){return e.uuid}))}),[s]),x=(0,c.useMemo)((function(){return(null==a?void 0:a.blocks)||[]}),[a]),b=(0,c.useMemo)((function(){return(null==d?void 0:d.blocks)||{}}),[d]),Z=(0,c.useMemo)((function(){var e=[];null==x||x.length;return null==x||x.map((function(n,t){var r=(n||{uuid:null}).uuid,i=(null==b?void 0:b[r])||[];null==i||i.length;e.push((0,L.jsx)(S.Z,{p:D.cd,children:null==i?void 0:i.map((function(e,n){return(0,L.jsx)(S.Z,{mt:n>=1?2*D.cd:0,children:(0,L.jsx)(pe.Z,{blockInteraction:e,containerRef:o,interaction:null==g?void 0:g[null==e?void 0:e.uuid],setVariables:h,variables:j})},"".concat(null==e?void 0:e.uuid,"-").concat(n))}))}))})),e}),[x,o,g,h,j]),y=(0,je.qB)(),P=(0,c.useMemo)((function(){return u&&null!=m&&m.hour&&null!=m&&m.minute?(0,ve.XM)(u,m,{convertToUtc:y,includeSeconds:!0,localTimezone:y}):null}),[u,y,m]),O=(0,c.useMemo)((function(){var e=[];null==x||x.length;return null==x||x.map((function(n,t){var r=(n||{uuid:null}).uuid,i=(null==b?void 0:b[r])||[];null==i||i.forEach((function(n,i){var o=null==g?void 0:g[null==n?void 0:n.uuid];Object.entries((null==o?void 0:o.variables)||{}).forEach((function(n,o){var u,c=(0,l.Z)(n,2),s=c[0],a=c[1],d=a.name,p=a.required,h=a.types,f=null==j?void 0:j[s],m=void 0===f,v=p&&m,g=(null==ge?void 0:ge[h[0]])||fe.Alphabet,x=[];void 0!==f?f&&Array.isArray(f||[])?null==f||f.forEach((function(e){x.push(e&&"object"==typeof e?x.push(JSON.stringify(e)):x.push(String(e)))})):f&&"object"==typeof f?Object.entries(f||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0];n[1]&&x.push(String(t))})):x.push(String(f)):x.push(f||""),e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(g,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,monospace:!0,children:s})]},"".concat(r,"-").concat(s,"-label-").concat(d,"-").concat(t,"-").concat(i,"-").concat(o)),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsxs)(I.ZP,{danger:v,monospace:!v,muted:m,children:[m&&!v&&"-",v&&"This is required",!m&&!v&&(null==x||null===(u=x.map((function(e){return String(e)})))||void 0===u?void 0:u.join(", "))]})},"".concat(r,"-").concat(s,"-value-").concat(d,"-").concat(f,"-").concat(t,"-").concat(i,"-").concat(o))])}))}))})),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:e})}),[x,g,j]);return(0,L.jsxs)(L.Fragment,{children:[!f&&Z,f&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{p:D.cd,children:(0,L.jsx)(w.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Lightning,{default:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger type"})]},"trigger_type"),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!(null!=p&&p.schedule_type),monospace:!0,children:null!=p&&p.schedule_type?null==v||null===(n=v.find((function(e){return e.uuid===(null==p?void 0:p.schedule_type)})))||void 0===n||null===(t=n.label)||void 0===t?void 0:t.call(n):"This is required"})},"trigger_type_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Alphabet,{default:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!(null!=p&&p.name),monospace:!0,children:(null==p?void 0:p.name)||"This is required"})},"trigger_name_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Alphabet,{default:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{monospace:!0,muted:!(null!=p&&p.description),children:(null==p?void 0:p.description)||"-"})},"trigger_description_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsxs)(I.ZP,{danger:!(null!=p&&p.schedule_interval),monospace:!0,muted:!(null!=p&&p.schedule_interval),children:[(null==p?void 0:p.schedule_interval)&&(0,me.vg)("@"===(null==p||null===(r=p.schedule_interval)||void 0===r?void 0:r[0])?(null==p||null===(i=p.schedule_interval)||void 0===i?void 0:i.substring(1))||"":(null==p?void 0:p.schedule_interval)||""),!(null!=p&&p.schedule_interval)&&"This is required"]})},"frequency_input")],[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsx)(S.Z,{py:D.cd,children:(0,L.jsx)(I.ZP,{danger:!P,monospace:!!P,muted:!P,children:P||"This is required"})},"start_time_input")]]}),(0,L.jsx)(S.Z,{p:D.cd,children:(0,L.jsx)(w.Z,{children:"Customize"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),O]})]})},be=t(35686),Ze=t(77417),ye=t(44425),Pe=t(88785),Oe=t(3917),_e=t(82359),ke=t(28795),we=t(41143),Se={label:function(){return"CUSTOMIZE"},uuid:"customize"},Ce={label:function(){return"SETTINGS"},uuid:"settings"},Ie={label:function(){return"REVIEW"},uuid:"review"},Te=[Ce,Se,Ie],Ee=t(32080),Me=t(22286),De=t(79500),Ne=t(8916),Ae=t(42122),Le=t(72619);function He(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 Be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?He(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var qe=function(e){var n=e.creatingWithLimitation,t=e.errors,o=e.fetchPipelineSchedule,s=e.onCancel,d=e.pipeline,O=e.pipelineSchedule,_=e.setErrors,E=e.variables,M=e.useCreateScheduleMutation,H=(0,Ze.Z)().project,B=(0,c.useRef)(null),U=(0,m.useRouter)(),W=(0,je.qB)(),X=null==d?void 0:d.uuid,Y=(0,c.useMemo)((function(){return null==O?void 0:O.id}),[O]),G=(null==d?void 0:d.type)===ue.qL.STREAMING,J=(0,c.useMemo)((function(){var e;return null==O||null===(e=O.variables)||void 0===e?void 0:e[oe.PN]}),[O]),K=(0,c.useState)(J?"string"==typeof J&&(0,me.Pb)(J)?JSON.stringify(J):J:null),Q=K[0],$=K[1],ee=(0,c.useState)([]),ne=ee[0],te=ee[1],pe=(0,c.useState)(!0),he=pe[0],ge=pe[1],He=(0,c.useState)(!1),qe=He[0],ze=He[1],Fe=(0,c.useState)(!1),Ve=Fe[0],Re=Fe[1],Ue=(0,c.useState)(null),We=Ue[0],Xe=Ue[1],Ye=(0,c.useState)({}),Ge=Ye[0],Je=Ye[1],Ke=(0,c.useState)(null),Qe=Ke[0],$e=Ke[1],en=(0,c.useState)(null),nn=en[0],tn=en[1],rn=(0,c.useState)(!1),ln=rn[0],on=rn[1],un=(0,c.useState)(null),cn=un[0],sn=un[1],an=(0,c.useState)(Te[0].uuid),dn=an[0],pn=an[1],hn=(0,c.useMemo)((function(){var e;return!(null==H||null===(e=H.features)||void 0===e||!e[_e.d.INTERACTIONS])}),[null==H?void 0:H.features]),fn=(0,c.useMemo)((function(){return!Y&&n}),[n,Y]),mn=be.ZP.pipeline_interactions.detail(hn&&X,{filter_for_permissions:1}).data,vn=be.ZP.interactions.pipeline_interactions.list(hn&&X).data,jn=(0,c.useMemo)((function(){return(null==mn?void 0:mn.pipeline_interaction)||{}}),[mn]),gn=(0,c.useMemo)((function(){return(null==vn?void 0:vn.interactions)||[]}),[vn]),xn=(0,c.useMemo)((function(){var e;return hn&&(null===(e=Object.keys((null==jn?void 0:jn.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[hn,jn]),bn=(0,c.useMemo)((function(){return!!Y&&xn}),[xn,Y]),Zn=(0,c.useMemo)((function(){var e,n={};return null==jn||null===(e=jn.permissions)||void 0===e||e.forEach((function(e){var t=e.triggers;null==t||t.forEach((function(e){var t=e.schedule_interval,r=e.schedule_type;null!=n&&n[r]||(n[r]={}),t&&(n[r][t]=!0)}))})),n}),[jn]),yn=(0,c.useMemo)((function(){return(0,Ne.wx)(E,(function(e){return e.uuid===ce.C}))}),[E]),Pn=(0,c.useMemo)((function(){return Qe||{}}),[Qe]),On=Pn.description,_n=Pn.name,kn=Pn.schedule_interval,wn=Pn.schedule_type,Sn=Pn.settings,Cn=Pn.start_time,In=Pn.tags,Tn=Pn.variables,En=void 0===Tn?{}:Tn;(0,c.useEffect)((function(){!We&&Sn&&Xe(Sn)}),[We,Sn]);var Mn=(0,c.useState)(null),Dn=Mn[0],Nn=Mn[1],An=(0,c.useState)({hour:"00",minute:"00"}),Ln=An[0],Hn=An[1],Bn=(0,c.useState)({dayOfMonth:null,dayOfWeek:null,hour:null,minute:null,second:null}),qn=Bn[0],zn=Bn[1],Fn=be.ZP.event_rules.detail(oe.Xm.EVENT===wn?"aws":null).data,Vn=(0,c.useMemo)((function(){var e;return(null==Fn||null===(e=Fn.event_rule)||void 0===e?void 0:e.rules)||[]}),[Fn]),Rn=(0,c.useMemo)((function(){return(0,A.HK)(Vn,(function(e){return e.name}))}),[Vn]),Un=(0,f.Db)(be.ZP.pipeline_schedules.useUpdate(Y),{onSuccess:function(e){return(0,Le.wD)(e,{callback:function(){null==o||o(),U.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(X,"/triggers/").concat(Y))},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}}),Wn=(0,l.Z)(Un,2),Xn=Wn[0],Yn=Wn[1].isLoading,Gn=(0,c.useMemo)((function(){return En||{}}),[En]);(0,c.useEffect)((function(){var e=p().utc().format(Oe.TD),n=(0,De.a)(Cn||e,{localTimezone:W});if(Nn(null==n?void 0:n.date),Hn(null==n?void 0:n.time),Cn){var t=p()(Cn).utc();zn({dayOfMonth:t.date(),dayOfWeek:t.day(),hour:t.hours(),minute:t.minutes(),second:t.seconds()})}}),[W,Cn]),(0,c.useEffect)((function(){Gn&&Object.keys(Gn).length>0&&ge(!0)}),[Gn]),(0,c.useEffect)((function(){Je(he?null==yn?void 0:yn.reduce((function(e,n){var t=n.uuid,r=n.value;return Be(Be({},e),{},(0,i.Z)({},t,Gn[t]||r))}),{}):null)}),[yn,he,Gn]);var Jn=(0,c.useMemo)((function(){return(0,ve._U)(kn)}),[kn]),Kn=(0,c.useMemo)((function(){return Jn&&cn?a().toString(cn,{throwExceptionOnParseError:!1}):""}),[cn,Jn]),Qn=(0,c.useMemo)((function(){return null==Kn?void 0:Kn.toLowerCase().includes("error")}),[Kn]);(0,c.useEffect)((function(){if(O&&!Qe){if(te(O.event_matchers),(0,ve._U)(null==O?void 0:O.schedule_interval)){var e=W?(0,ve.lO)(null==O?void 0:O.schedule_interval):null==O?void 0:O.schedule_interval;sn(e),$e(Be(Be({},O),{},{schedule_interval:"custom"}))}else $e(G?Be(Be({},O),{},{schedule_interval:oe.U5.ONCE}):O);var n=O.sla;if(n){ze(!0);var t=(0,ve.gU)(n),r=t.time,i=t.unit;$e((function(e){return Be(Be({},e),{},{slaAmount:r,slaUnit:i})}))}}}),[W,G,O,Qe,kn]);var $n=(0,c.useMemo)((function(){return!(null==We||!We.landing_time_enabled)}),[We]),et=(0,c.useMemo)((function(){return oe.Xm.TIME!==wn||![oe.U5.DAILY,oe.U5.HOURLY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(kn)}),[kn,wn]),nt=(0,c.useMemo)((function(){return $n&&!et}),[et,$n]),tt=(0,c.useCallback)((function(){var e=Be(Be({},(0,Ae.GL)(Qe,["name","description","schedule_type","tags"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,Ne.e7)(Be(Be({},Ge),Q?(0,i.Z)({},oe.PN,Q):{}))});if(nt){var n=qn.dayOfMonth,t=qn.dayOfWeek,r=qn.hour,l=qn.minute,o=qn.second,u=p()("2023-07-01").utc();(0,me.HW)(n)&&(u=u.date(n)),(0,me.HW)(t)&&(u=u.day(t)),(0,me.HW)(r)&&(u=u.hours(r)),(0,me.HW)(l)&&(u=u.minutes(l)),(0,me.HW)(o)&&(u=u.seconds(o)),e.schedule_interval=Jn?cn:Qe.schedule_interval,e.start_time=u.toISOString()}else oe.Xm.EVENT===Qe.schedule_type?e.event_matchers=ne:(e.schedule_interval=Jn?W&&!Qn&&cn?(0,ve.lO)(cn,!0):cn:Qe.schedule_interval,e.start_time=Dn&&null!=Ln&&Ln.hour&&null!=Ln&&Ln.minute?(0,ve.XM)(Dn,Ln,{convertToUtc:W,includeSeconds:!0,localTimezone:W}):null);if(qe){var c=null==Qe?void 0:Qe.slaAmount,s=null==Qe?void 0:Qe.slaUnit;if(!c||isNaN(c)||!s)return void h.Am.error("Please enter a valid SLA",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,ve.vJ)(c,s)}else null!=O&&O.sla&&(e.sla=0);e.settings=We,Xn({pipeline_schedule:Be(Be({},e),{},{variables:nn||(null==e?void 0:e.variables)})})}),[Q,Qn,cn,Dn,W,qe,ne,Jn,qn,O,Ge,Qe,We,nt,Ln,Xn,nn]),rt=(0,c.useMemo)((function(){if(null==O||!O.runtime_average)return"Trigger doesn’t have enough history to estimate runtime.";var e=Number(null==O?void 0:O.runtime_average),n=Math.max(Math.floor(e/3600),0),t=Math.max(Math.floor((e-60*n*60)/60),0),r=Math.max(Math.floor(e-(60*n*60+60*t)),0),i=[];return n>=1&&i.push((0,me._6)("hour",n,!0)),t>=1&&i.push((0,me._6)("minute",t,!0)),r>=1&&i.push((0,me._6)("second",r,!0)),i.join(" ")}),[O]),it=(0,c.useMemo)((function(){if(!nt)return null;var e=[(0,L.jsxs)(S.Z,{mr:1,children:[(0,L.jsx)(S.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Minute"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){zn((function(n){return Be(Be({},n),{},{minute:e.target.value})}))},value:(null==qn?void 0:qn.minute)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Minute"),(0,L.jsxs)(S.Z,{mr:1,children:[(0,L.jsx)(S.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Second"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){zn((function(n){return Be(Be({},n),{},{second:e.target.value})}))},value:(null==qn?void 0:qn.second)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(60).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Second")];return[oe.U5.DAILY,oe.U5.MONTHLY,oe.U5.WEEKLY].includes(kn)&&e.unshift((0,L.jsxs)(S.Z,{mr:1,children:[(0,L.jsx)(S.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Hour"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){zn((function(n){return Be(Be({},n),{},{hour:e.target.value})}))},value:(null==qn?void 0:qn.hour)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(24).map((function(e,n){return(0,L.jsx)("option",{value:n,children:n>=10?String(n):"0".concat(n)},n)}))]})]},"Hour")),oe.U5.WEEKLY===kn?e.unshift((0,L.jsxs)(S.Z,{mr:1,children:[(0,L.jsx)(S.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the week"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){zn((function(n){return Be(Be({},n),{},{dayOfWeek:e.target.value})}))},value:(null==qn?void 0:qn.dayOfWeek)||"",children:[(0,L.jsx)("option",{value:""}),(0,L.jsx)("option",{value:6,children:"Sunday"}),(0,L.jsx)("option",{value:0,children:"Monday"}),(0,L.jsx)("option",{value:1,children:"Tuesday"}),(0,L.jsx)("option",{value:2,children:"Wednesday"}),(0,L.jsx)("option",{value:3,children:"Thursday"}),(0,L.jsx)("option",{value:4,children:"Friday"}),(0,L.jsx)("option",{value:5,children:"Saturday"})]})]},"Day of the week")):oe.U5.MONTHLY===kn&&e.unshift((0,L.jsxs)(S.Z,{mr:1,children:[(0,L.jsx)(S.Z,{mb:1,children:(0,L.jsx)(I.ZP,{bold:!0,default:!0,small:!0,children:"Day of the month"})}),(0,L.jsxs)(se.Z,{compact:!0,monospace:!0,onChange:function(e){zn((function(n){return Be(Be({},n),{},{dayOfMonth:e.target.value})}))},value:(null==qn?void 0:qn.dayOfMonth)||"",children:[(0,L.jsx)("option",{value:""}),(0,A.w6)(31).map((function(e,n){return(0,L.jsx)("option",{value:n+1,children:n+1>=10?String(n+1):"0".concat(n+1)},n+1)}))]})]},"Day of the month")),(0,L.jsx)(k.ZP,{children:e})}),[qn,kn,nt]),lt=(0,c.useMemo)((function(){return[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Alphabet,{default:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger name"})]},"trigger_name"),(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),$e((function(n){return Be(Be({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:_n},"trigger_name_input")]}),[_n]),ot=(0,c.useMemo)((function(){return[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Alphabet,{default:!0}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Trigger description"})]},"trigger_description"),(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),$e((function(n){return Be(Be({},n),{},{description:e.target.value})}))},placeholder:"Description",value:On},"trigger_description_input")]}),[On]),ut=(0,c.useMemo)((function(){var e=[lt,ot,[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(se.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;$e((function(e){return Be(Be({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:kn,children:[Object.values(oe.U5).reduce((function(e,n){var t;return!fn||null!=Zn&&null!==(t=Zn[oe.Xm.TIME])&&void 0!==t&&t[n]?e.concat((0,L.jsx)("option",{value:n,children:n.substring(1)},n)):e}),[]),!fn&&(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),!fn&&(0,L.jsx)(S.Z,{mt:1,p:1,children:(0,L.jsxs)(I.ZP,{muted:!0,small:!0,children:["If you don't see the frequency option you need, select ",(0,L.jsx)(I.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")]];return nt&&e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Schedule,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Average runtime"})]},"runtime_average"),(0,L.jsx)(k.ZP,{alignItems:"center",style:{minHeight:"".concat(5.75*D.iI,"px")},children:(0,L.jsx)(I.ZP,{monospace:!0,children:rt})},"runtime_average_value")]),e.push([(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsxs)(I.ZP,{default:!0,children:[nt&&"Pipeline complete by",!nt&&"Start date and time"]})]},"start_time"),nt?it:(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ln&&(0,L.jsx)(T.Z,{monospace:!0,onClick:function(){return on((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Dn?(0,ve.XM)(Dn,Ln,{localTimezone:W}):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(Z.Z,{disableEscape:!0,onClickOutside:function(){return on(!1)},open:ln,style:{position:"relative"},children:(0,L.jsx)(x.Z,{localTime:W,selectedDate:Dn,selectedTime:Ln,setSelectedDate:Nn,setSelectedTime:Hn,topPosition:!0})})})]},"start_time_input")]),G&&e.splice(2,2),Jn&&e.splice(2,0,[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.Code,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(T.Z,{monospace:!0,onChange:function(e){e.preventDefault(),sn(e.target.value)},placeholder:"* * * * *",value:cn}),(0,L.jsxs)(S.Z,{mt:1,p:1,children:[(0,L.jsx)(I.ZP,{monospace:!0,xsmall:!0,children:"[minute] [hour] [day(month)] [month] [day(week)]"}),(0,L.jsx)(S.Z,{mb:"2px"}),cn?(0,L.jsx)(I.ZP,{danger:Qn,muted:!0,small:!0,children:Qn?"Invalid cron expression. Please check the cron syntax.":(0,L.jsxs)(L.Fragment,{children:['"',Kn,'"']})}):null,W&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(I.ZP,{bold:!0,inline:!0,small:!0,warning:!0,children:"Note: "}),(0,L.jsxs)(I.ZP,{inline:!0,small:!0,children:["If you have the display_local_timezone setting enabled, the local cron expression above will match your local timezone only",(0,L.jsx)("br",{}),"if the minute and hour values are single values without any special characters, such as the comma, hyphen, or slash.",(0,L.jsx)("br",{}),"You can still use cron expressions with special characters for the minute/hour values, but it will be based in UTC time."]})]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mb:2,px:D.cd,children:(0,L.jsx)(w.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:e})]})}),[Qn,cn,Dn,W,fn,Jn,G,et,$n,it,Zn,Kn,rt,kn,ln,nt,Ln,lt,ot]),ct=(0,c.useCallback)((function(e,n){te((function(t){return Object.entries(n).forEach((function(n){var r=(0,l.Z)(n,2),i=r[0],o=r[1];t[e][i]=o})),(0,r.Z)(t)}))}),[te]),st=(0,c.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mb:D.cd,px:D.cd,children:(0,L.jsx)(w.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[lt,ot]}),(0,L.jsxs)(S.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Events"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(S.Z,{mt:D.Mq,children:[(0,L.jsx)(I.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you’ll need to set 3 environment variables (",(0,L.jsx)(R.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(S.Z,{mt:1,children:(0,L.jsxs)(re,{monospace:!0,ordered:!0,children:[(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(I.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(null==ne?void 0:ne.length)>=1&&(0,L.jsx)(C.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null==ne?void 0:ne.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,l=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),o=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){o.push(" ".concat(e))})),[(0,L.jsx)(se.Z,{monospace:!0,onChange:function(e){return ct(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:z.S5.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(l)),(0,L.jsx)(se.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Rn[r])||void 0===t?void 0:t.event_pattern;ct(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:Vn.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(l)),i&&(0,L.jsx)(y.Z,{language:"json",small:!0,source:o.join("\n")}),(0,L.jsx)(j.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return te((function(e){return(0,A.oM)(e,n)}))},children:(0,L.jsx)(fe.Trash,{default:!0,size:2*D.iI})},"remove_event")]}))}),(0,L.jsx)(S.Z,{p:D.cd,children:(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Add,{size:2*D.iI}),onClick:function(){return te((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[ne,Vn,Rn,lt,ot,ct]),at=(0,c.useMemo)((function(){var e=(0,ve.M8)(O,Ve);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mb:D.cd,px:D.cd,children:(0,L.jsx)(w.Z,{children:"Settings"})}),(0,L.jsx)(F.Z,{light:!0,short:!0}),(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[lt,ot]}),(0,L.jsxs)(S.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Endpoint"}),(0,L.jsxs)(I.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(I.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:e,linkText:e,monospace:!0,withCopyIcon:!0})}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(S.Z,{mr:1,children:(0,L.jsx)(de.Z,{checked:Ve,onCheck:function(){return Re(!Ve)}})}),(0,L.jsx)(I.ZP,{muted:!0,children:"Show alternative endpoint to pass token in headers"})]})})]}),Ve&&(0,L.jsxs)(S.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Headers"}),(0,L.jsx)(I.ZP,{muted:!0,children:"You will need to include the following headers in your request to authenticate with the server."}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:"Content-Type: application/json\n Authorization: Bearer ".concat(null==O?void 0:O.token,"\n "),withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:"\n Content-Type: application/json\n Authorization: Bearer ".concat(null==O?void 0:O.token,"\n ")})})})]}),(0,L.jsxs)(S.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Payload"}),(0,L.jsx)(I.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(P.Z,{copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',withCopyIcon:!0,children:(0,L.jsx)(y.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(S.Z,{mb:2,mt:5,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Sample cURL command"}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(y.Z,{language:"bash",small:!0,source:Ve?"\n curl -X POST ".concat(e," \\\n --header 'Content-Type: application/json' \\\n --header 'Authorization: Bearer ").concat(null==O?void 0:O.token,'\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n '):"\n curl -X POST ".concat(e,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[O,Re,ot,lt,Ve]),dt=!(wn&&(oe.Xm.TIME!==wn||G&&Dn||!G&&Dn&&kn)&&(oe.Xm.EVENT!==wn||null!=ne&&ne.length&&ne.every((function(e){var n=e.event_type,t=e.name;return n&&t})))),pt=(0,c.useMemo)((function(){var e;return(null==d||null===(e=d.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return ye.tf.DBT===n})))||[]}),[d]),ht=(0,c.useMemo)((function(){return null!=d&&d.blocks?(0,Ee.nG)(d):null}),[d]),ft=(0,c.useMemo)((function(){var e,n;return(0,L.jsxs)(S.Z,{py:D.cd,children:[(0,L.jsxs)(S.Z,{mb:D.HN,px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Run settings"}),(0,L.jsxs)(S.Z,{mt:D.Mq,children:[!G&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(S.Z,{mb:D.Mq,children:[(0,L.jsx)(I.ZP,{children:"Set a timeout for each run of this trigger (optional)"}),(0,L.jsx)(S.Z,{mb:1}),(0,L.jsx)(T.Z,{label:"Timeout (in seconds)",onChange:function(e){return Xe((function(n){return Be(Be({},n),{},{timeout:e.target.value})}))},primary:!0,setContentOnMount:!0,type:"number",value:null==We?void 0:We.timeout})]}),(0,L.jsxs)(S.Z,{mb:D.Mq,children:[(0,L.jsx)(I.ZP,{children:"Status for runs that exceed the timeout (default: failed)"}),(0,L.jsx)(S.Z,{mb:1}),(0,L.jsxs)(se.Z,{fullWidth:!0,monospace:!0,onChange:function(e){e.preventDefault(),Xe((function(n){return Be(Be({},n),{},{timeout_status:e.target.value})}))},placeholder:"Timeout status",value:null==We?void 0:We.timeout_status,children:[(0,L.jsx)("option",{value:we.V.FAILED,children:"Failed"}),(0,L.jsx)("option",{value:we.V.CANCELLED,children:"Cancelled"})]})]})]}),(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(S.Z,{mr:2,children:(0,L.jsx)(de.Z,{checked:qe,onCheck:function(e){ze(e),e||$e((function(e){return Be(Be({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(I.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),qe&&(0,L.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(fe.CalendarDate,{default:!0,size:1.5*D.iI}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(k.ZP,{children:[(0,L.jsx)(V.Z,{flex:1,children:(0,L.jsx)(T.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),$e((function(n){return Be(Be({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null==Qe?void 0:Qe.slaAmount})}),(0,L.jsx)(V.Z,{flex:1,children:(0,L.jsx)(se.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),$e((function(n){return Be(Be({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null==Qe?void 0:Qe.slaUnit,children:Object.keys(ve.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(b.Z,{checked:null==We?void 0:We.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return Xe((function(e){return Be(Be({},e),{},{allow_blocks_to_fail:!(null!=We&&We.allow_blocks_to_fail)})}))}})})}),oe.Xm.TIME===wn&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mt:D.cd,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(b.Z,{checked:null==We?void 0:We.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return Xe((function(e){return Be(Be({},e),{},{skip_if_previous_running:!(null!=We&&We.skip_if_previous_running)})}))}})})}),(0,L.jsx)(S.Z,{mt:D.cd,children:(0,L.jsx)(k.ZP,{alignItems:"center",children:(0,L.jsx)(b.Z,{checked:null==We?void 0:We.create_initial_pipeline_run,label:"Create initial pipeline run if start date is before current execution period",onClick:function(){return Xe((function(e){return Be(Be({},e),{},{create_initial_pipeline_run:!(null!=We&&We.create_initial_pipeline_run)})}))}})})})]})]}),(0,L.jsxs)(S.Z,{mb:D.HN,children:[(0,L.jsxs)(S.Z,{px:D.cd,children:[(0,L.jsx)(w.Z,{children:"Runtime variables"}),(0,Ae.Qr)(yn)&&(0,L.jsxs)(S.Z,{mt:1,children:[(0,L.jsx)(I.ZP,{default:!0,children:"This pipeline has no runtime variables."}),(0,L.jsx)(u(),{as:"/pipelines/".concat(X,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,L.jsx)(R.Z,{primary:!0,children:"Click here"})})," ",(0,L.jsx)(I.ZP,{default:!0,inline:!0,children:"to add variables to this pipeline."})]})]}),(0,L.jsx)(S.Z,{mt:D.Mq,children:(0,L.jsx)(ie.Z,{enableVariablesOverwrite:!0,originalVariables:null==O?void 0:O.variables,runtimeVariables:Ge,setRuntimeVariables:Je})})]}),ht&&(null===(e=Object.keys(ht||{}))||void 0===e?void 0:e.length)>=1&&(0,L.jsxs)(S.Z,{mb:D.HN,children:[(0,L.jsx)(S.Z,{px:D.cd,children:(0,L.jsx)(w.Z,{children:"Override bookmark values"})}),(0,L.jsx)(v.Z,{bookmarkValues:Q,originalBookmarkValues:null==O||null===(n=O.variables)||void 0===n?void 0:n[oe.PN],pipeline:d,setBookmarkValues:$})]}),(null==pt?void 0:pt.length)>=1&&(0,L.jsx)(S.Z,{mb:D.HN,children:(0,L.jsx)(q,{blocks:pt,updateVariables:Je,variables:Be(Be({},Gn),Ge)})})]})}),[ht,Q,pt,qe,yn,G,d,null==O?void 0:O.variables,X,Ge,Qe,wn,Gn,$,ze,Je,We]),mt=be.ZP.tags.list().data,vt=(0,c.useMemo)((function(){return((null==mt?void 0:mt.tags)||[]).filter((function(e){var n=e.uuid;return!(null!=In&&In.includes(n))}))}),[mt,In]),jt=(0,c.useMemo)((function(){return(0,ve.ri)(G)}),[G]),gt=(0,c.useMemo)((function(){return(0,L.jsx)(xe,{containerRef:B,date:Dn,interactions:gn,pipeline:d,pipelineInteraction:jn,pipelineSchedule:Qe,setVariables:function(e){$e((function(n){var t=Be({},e((null==n?void 0:n.variables)||{})),r=Be({},t);return null==gn||gn.forEach((function(e){Object.entries((null==e?void 0:e.variables)||{}).forEach((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1].types;r&&t in r&&(r[t]=(0,Me.M)(r[t],i))}))})),tn(r),Be(Be({},n),{},{variables:t})}))},showSummary:Ie.uuid===dn,time:Ln,triggerTypes:jt,variables:null==Qe?void 0:Qe.variables})}),[B,Dn,gn,d,jn,Qe,dn,$e,tn,Ln,jt]),xt=(0,c.useMemo)((function(){return oe.fq.ACTIVE===(null==Qe?void 0:Qe.status)}),[Qe]),bt=M?null==M?void 0:M((function(e){return U.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null==d?void 0:d.uuid,"/triggers/").concat(e))})):[null,{isLoading:!1}],Zt=(0,l.Z)(bt,2),yt=Zt[0],Pt=Zt[1].isLoading,Ot=(0,c.useCallback)((function(){null==yt||yt({pipeline_schedule:Be(Be({},Qe),{},{variables:nn||(null==Qe?void 0:Qe.variables)})})}),[yt,nn,Qe]),_t=(0,c.useMemo)((function(){var e,n;return Y?(e=(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(X,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{onClick:tt,primary:!0,children:"Save trigger"})):Ce.uuid===dn?(e=(0,L.jsx)(j.ZP,{onClick:function(){return null==s?void 0:s()},secondary:!0,children:"Cancel and go back"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.PaginateArrowRight,{}),onClick:function(){return pn(Se.uuid)},primary:!0,children:"Next: Customize"})):Se.uuid===dn?(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.PaginateArrowLeft,{}),onClick:function(){return pn(Ce.uuid)},secondary:!0,children:"Back: Settings"}),n=(0,L.jsx)(j.ZP,{afterIcon:(0,L.jsx)(fe.PaginateArrowRight,{}),onClick:function(){return pn(Ie.uuid)},primary:!0,children:"Next: Review"})):Ie.uuid===dn&&(e=(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.PaginateArrowLeft,{}),onClick:function(){return pn(Se.uuid)},secondary:!0,children:"Back: Customize"}),n=(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{beforeIcon:(0,L.jsx)(fe.Lightning,{}),loading:Pt,onClick:function(){return Ot()},primary:!0,children:Y?"Save trigger":"Create trigger"}),!Y&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mr:D.cd}),(0,L.jsx)(de.Z,{checked:xt,compact:!0,onCheck:function(e){return $e((function(n){return Be(Be({},n),{},{status:e(xt)?oe.fq.ACTIVE:oe.fq.INACTIVE})}))}}),(0,L.jsx)(S.Z,{mr:1}),(0,L.jsx)(I.ZP,{default:xt,muted:!xt,small:!0,children:"Set trigger to be active immediately after creating"})]})]})),(0,L.jsx)(S.Z,{p:D.cd,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[e,e&&n&&(0,L.jsx)(S.Z,{mr:D.cd}),n]})})}),[Ot,Pt,xt,s,tt,Y,X,dn,pn]),kt=(0,c.useMemo)((function(){var e,n,t,r,i,l,o;return void 0===(null==d||null===(e=d.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null==H||null===(t=H.pipelines)||void 0===t||null===(r=t.settings)||void 0===r||null===(i=r.triggers)||void 0===i?void 0:i.save_in_code_automatically:null==d||null===(l=d.settings)||void 0===l||null===(o=l.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[d,H]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(le.Z,{after:!fn&&ft,afterHidden:fn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(X,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null==O?void 0:O.name},linkProps:{as:"/pipelines/".concat(X,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:t,pageName:ke.M.TRIGGERS,pipeline:d,setErrors:_,subheader:fn||bn?(0,L.jsx)(S.Z,{px:D.cd,children:(0,L.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return pn(n)},regularSizeText:!0,selectedTabUUID:dn,tabs:Te,underlineColor:(0,N.qn)(ye.tf.DATA_LOADER).accent,underlineStyle:!0})}):(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(j.ZP,{disabled:dt,loading:Yn,onClick:tt,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(S.Z,{mr:D.cd}),(0,L.jsx)(j.ZP,{linkProps:{as:"/pipelines/".concat(X,"/triggers/").concat(Y),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"}),kt&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(S.Z,{mr:D.cd}),(0,L.jsxs)(I.ZP,{default:!0,xsmall:!0,children:["This trigger will automatically be persisted in code.",(0,L.jsx)("br",{}),"To change this behavior, update the ",(0,L.jsx)(u(),{as:"/pipelines/".concat(X,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,L.jsx)(R.Z,{openNewWindow:!0,xsmall:!0,children:"pipeline’s settings"})})," or ",(0,L.jsx)(u(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,L.jsx)(R.Z,{openNewWindow:!0,xsmall:!0,children:"project settings"})}),"."]})]})]}),subheaderNoPadding:fn||bn,title:function(){return null!=O&&O.name?"Edit ".concat(null==O?void 0:O.name):"New trigger"},uuid:"triggers/edit",children:(0,L.jsxs)("div",{ref:B,children:[(fn||bn)&&(0,L.jsx)(F.Z,{light:!0}),(fn||bn)&&(Se.uuid===dn||Ie.uuid===dn)&>,(!fn||Ce.uuid===dn)&&(!bn||Ce.uuid===dn)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(S.Z,{p:D.cd,children:[(0,L.jsxs)(S.Z,{mb:2,children:[(0,L.jsx)(w.Z,{children:"Trigger type"}),(0,L.jsx)(I.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(k.ZP,{children:jt.reduce((function(e,n){var t=n.label,r=n.description,i=n.uuid,l=wn===i,o=wn&&!l;return!fn||null!=Zn&&Zn[i]?e.concat((0,L.jsx)(j.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){oe.Xm.EVENT!==i||null!=ne&&ne.length||te([{}]),$e((function(e){return Be(Be({},e),{},{schedule_type:i})}))},children:(0,L.jsx)(Pe.U,{selected:l,children:(0,L.jsxs)(k.ZP,{alignItems:"center",children:[(0,L.jsx)(V.Z,{children:(0,L.jsx)("input",{checked:l,type:"radio"})}),(0,L.jsx)(S.Z,{mr:D.cd}),(0,L.jsxs)(V.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(w.Z,{bold:!0,default:!l&&!o,level:5,muted:!l&&o,children:t()}),(0,L.jsx)(I.ZP,{default:!l&&!o,leftAligned:!0,muted:o,children:r()})]})]})})},i)):e}),[])})]}),(0,L.jsxs)(S.Z,{mt:D.HN,children:[oe.Xm.TIME===wn&&ut,oe.Xm.EVENT===wn&&st,oe.Xm.API===wn&&at]}),!fn&&(0,L.jsxs)(S.Z,{mt:D.HN,px:D.cd,children:[(0,L.jsxs)(S.Z,{mb:2,children:[(0,L.jsx)(w.Z,{children:"Tags"}),(0,L.jsx)(I.ZP,{muted:!0,children:"Add or remove tags from this trigger."})]}),(0,L.jsx)(ae.Z,{removeTag:function(e){$e((function(n){return Be(Be({},n),{},{tags:null==In?void 0:In.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){$e((function(n){return Be(Be({},n),{},{tags:(0,A.$C)(e.uuid,In,(function(n){return n===e.uuid}))})}))},selectedTags:null==In?void 0:In.map((function(e){return{uuid:e}})),tags:vt,uuid:"TagsAutocompleteInputField-trigger-".concat(Y)})]})]}),(fn||bn)&&_t]})})})}},37899:function(e,n,t){var r=t(82394),i=t(75582),l=t(82684),o=t(71180),u=t(15338),c=t(97618),s=t(55485),a=t(38276),d=t(75499),p=t(30160),h=t(35576),f=t(17488),m=t(72473),v=t(70515),j=t(42122),g=t(81728),x=t(28598);function b(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?b(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,b=e.runtimeVariables,y=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),P=(0,l.useState)({}),O=P[0],_=P[1],k=(0,l.useState)(null),w=k[0],S=k[1],C=(0,l.useState)(null),I=C[0],T=C[1];(0,l.useEffect)((function(){var e=Object.entries(b||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],o=t[1],u=(0,g.Pb)(o)&&"object"==typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return Z(Z({},e),{},(0,r.Z)({},l,u))}),{});_(e)}),[]);var E=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),y((function(t){return Z(Z({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return O[e]?(0,x.jsx)(h.Z,Z(Z({},t),{},{rows:1,value:n})):(0,x.jsx)(f.Z,Z({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&b&&Object.entries(b).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(b).map((function(e){var n=(0,i.Z)(e,2),r=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),E(r,l),!(null!=t&&t[r])&&(0,x.jsx)(o.ZP,{iconOnly:!0,onClick:function(){y((function(e){return(0,j.gR)(e,[r])}))},children:(0,x.jsx)(m.Trash,{default:!0})})]}))}),(0,x.jsx)(a.Z,{p:v.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(f.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return S(e.target.value)},placeholder:"New variable UUID",value:w||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(c.Z,{flex:1,children:(0,x.jsx)(f.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return T(e.target.value)},placeholder:"Variable value",value:I||""})}),(0,x.jsx)(a.Z,{mr:1}),(0,x.jsx)(o.ZP,{beforeIcon:(0,x.jsx)(m.Add,{}),disabled:!w||!I,onClick:function(){y((function(e){return Z(Z({},e),{},(0,r.Z)({},w,I))})),S(null),T(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(u.Z,{light:!0})]})}},97196:function(e,n,t){t.d(n,{S5:function(){return l},_P:function(){return o}});var r,i=t(86735);!function(e){e.AWS="aws_event"}(r||(r={}));var l=[{label:function(){return"AWS"},uuid:r.AWS}],o=(0,i.HK)(l,(function(e){return e.uuid}))},83784:function(e,n,t){t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){var r=t(82394),i=t(52396),l=t(55485),o=t(44085),u=t(38276),c=t(30160),s=t(88785),a=t(70515),d=t(86735),p=t(28598);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,h=e.setSelectedDate,m=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(i.ZP,{onChange:h,value:t}),(0,p.jsx)(u.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(c.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(u.Z,{pr:2}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),m((function(n){return f(f({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null==r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(u.Z,{px:1,children:(0,p.jsx)(c.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(o.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),m((function(n){return f(f({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null==r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!=n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var o=e.split(" ")[1];t=(0,r.eI)(e),l={hour:o.substring(0,2),minute:o.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){var r=t(82684),i=t(20433),l=t(31811),o=t(9518),u=t(65292),c=t(44897),s=t(95363),a=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,h=e.small,f=e.source,m=e.wrapLines,v=(0,r.useContext)(o.ThemeContext);function j(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(v.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:h?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||c.Z.content).muted},showLineNumbers:p,style:u._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(j,{value:n})}},children:f})}},32080:function(e,n,t){t.d(n,{nG:function(){return a},sV:function(){return d}});var r=t(75582),i=t(21831),l=t(82394),o=t(44425),u=t(61599);function c(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e){var n,t={};return null==e||null===(n=e.blocks)||void 0===n||n.forEach((function(e){var n=e.catalog,r=e.type,i=e.uuid;if(o.tf.DATA_LOADER===r&&null!=n&&n.streams){var l,c=null==n||null===(l=n.streams)||void 0===l?void 0:l.filter((function(e){var n=e.replication_method;return u._B.INCREMENTAL===n}));(null==c?void 0:c.length)>=1&&(i in t||(t[i]={block:e,streams:[]}),t[i].streams.push(c))}})),t}function d(e,n,t,l){var u,c=t||{},a=c.addBlockDependenciesToNestedPipelineBlocks,p=void 0!==a&&a,h=c.addPipelineGroupsToBlocks,f=void 0!==h&&h,m=c.addPipelineToBlocks,v=void 0!==m&&m,j=l||{},g=j.downstreamBlocks,x=j.upstreamBlocks,b={};return null==e||null===(u=e.blocks)||void 0===u||u.forEach((function(l){var u,c,a=s({},l);(!g||null!=a&&a.downstream_blocks?!x||null!=a&&a.upstream_blocks||(a.upstream_blocks=x):a.downstream_blocks=g,v&&(a.pipeline=e),f)&&(a.groups=[].concat((0,i.Z)(null!==(u=e.groups)&&void 0!==u?u:[]),(0,i.Z)(null!==(c=a.groups)&&void 0!==c?c:[])));if(o.tf.PIPELINE===a.type){var h,m=n[a.uuid],j={};if(p)null===(h=[["downstreamBlocks",a.downstream_blocks],["upstreamBlocks",a.upstream_blocks]])||void 0===h||h.forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];null==l||l.forEach((function(e){if(e in n){var t,r=n[e];j[i]||(j[i]=[]),null==r||null===(t=r.blocks)||void 0===t||t.forEach((function(e){var n,t;("downstreamBlocks"!==i||null!=e&&null!==(n=e.upstream_blocks)&&void 0!==n&&n.length)&&("upstreamBlocks"!==i||null!=e&&null!==(t=e.downstream_blocks)&&void 0!==t&&t.length)||j[i].push(null==e?void 0:e.uuid)}))}else j[i]||(j[i]=[]),j[i].push(e)}))}));b=s(s({},b),d(m,n,t,j))}b[a.uuid]=a})),b}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3548],{4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return l},Nk:function(){return d},gI:function(){return a}});var i=t(9518),r=t(44897),o=t(42631),c=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),l=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;"," ",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;"," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null==e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null==e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null==e?void 0:e.paddingVerticalAddition)||0),"px;\n ")}),(function(e){return e.columnFlex&&"\n display: flex;\n flex-direction: column;\n "}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;"," ",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.topBorder&&"\n border-top: 1px solid ".concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},55729:function(e,n,t){t.d(n,{Z:function(){return T}});var i=t(82394),r=t(75582),o=t(82684),c=t(83455),d=t(71180),l=t(15338),a=t(97618),s=t(55485),u=t(85854),p=t(48670),h=t(65956),m=t(82359),g=t(88543),f=t(38276),v=t(30160),x=t(17488),j=t(69650),b=t(12468),Z=t(35686),_=t(77417),y=t(9518),k=t(44897),P=t(42631),O=t(70515),w=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,O.cd*O.iI,(function(e){return"\n background-color: ".concat((e.theme.background||k.Z.background).codeArea,";\n ")})),C=t(72473),I=t(72191),E=t(70320),N=t(81728),S=t(42122),B=t(72619),A=t(23780),D=t(28598);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n,t,y,k=e.cancelButtonText,P=e.contained,L=e.header,T=e.onCancel,H=e.onSaveSuccess,U=e.rootProject,V=(0,A.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),F=(0,r.Z)(V,1)[0],G=(0,o.useState)(null),K=G[0],R=G[1],W=(0,o.useState)(!1),q=W[0],z=W[1],Y=(0,_.Z)(),$=Y.fetchProjects,J=Y.project,Q=Y.projectPlatformActivated,X=Y.rootProject,ee=(0,o.useMemo)((function(){return U?X:J}),[J,X,U]),ne=ee||{},te=ne.name,ie=ne.openai_api_key,re=ne.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){K||R(ee)}),[ee,K]);var ce=(0,c.Db)(Z.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){var n,t=e.project;$(),R(t),z(!1),(0,E.hY)(null==t||null===(n=t.features)||void 0===n?void 0:n[m.d.LOCAL_TIMEZONE]),H&&(null==H||H(t))},onErrorCallback:function(e,n){return F({errors:n,response:e})}})}}),de=(0,r.Z)(ce,2),le=de[0],ae=de[1].isLoading,se=(0,o.useCallback)((function(e){return le({project:M(M({},e),{},{root_project:U})})}),[U,le]),ue=(0,D.jsxs)(D.Fragment,{children:[L,(0,D.jsxs)(h.Z,{noPadding:!0,children:[(0,D.jsxs)(f.Z,{p:O.cd,children:[(0,D.jsx)(f.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project name"})}),(0,D.jsx)(v.ZP,{default:!0,monospace:!0,children:te})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsxs)(f.Z,{p:O.cd,children:[(0,D.jsx)(f.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,D.jsx)(v.ZP,{default:!!re,monospace:!0,muted:!re,children:re||"Not required"})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsx)(f.Z,{p:O.cd,children:(0,D.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(a.Z,{flexDirection:"column",children:[(0,D.jsx)(f.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,D.jsxs)(v.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,D.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,D.jsx)(f.Z,{mr:O.cd}),(0,D.jsx)(j.Z,{checked:null==K?void 0:K.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return R((function(e){return M(M({},e),{},{help_improve_mage:!(null!=K&&K.help_improve_mage)})}))}})]})})]}),(0,D.jsx)(f.Z,{mt:O.HN}),(0,D.jsx)(g.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,D.jsx)(g.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null==K||null===(n=K.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return R((function(n){var t,i,r,o,c,d;return M(M({},n),{},{pipelines:M(M({},null==n?void 0:n.pipelines),{},{settings:M(M({},null==n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:M(M({},null==n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null==n||null===(o=n.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(d=c.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,D.jsx)(f.Z,{mt:O.HN}),(0,D.jsx)(h.Z,{noPadding:!0,overflowVisible:!0,children:(0,D.jsxs)(f.Z,{p:O.cd,children:[(0,D.jsx)(f.Z,{mb:1,children:(0,D.jsxs)(u.Z,{level:5,children:["Features ",(0,D.jsx)(p.Z,{bold:!0,href:"https://docs.mage.ai/development/project/features",largeSm:!0,openNewWindow:!0,children:"(docs)"})]})}),Object.entries((0,S.gR)(null==K?void 0:K.features,[m.d.CODE_BLOCK_V2,m.d.COMMAND_CENTER,m.d.COMPUTE_MANAGEMENT,m.d.CUSTOM_DESIGN,m.d.DBT_V2,m.d.GLOBAL_HOOKS,m.d.NOTEBOOK_BLOCK_OUTPUT_SPLIT_VIEW])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1],d=Q&&!U&&(null==ee?void 0:ee.features_override)&&o in(null==ee?void 0:ee.features_override);return(0,D.jsx)(f.Z,{mt:0===n?0:1,children:(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsxs)(a.Z,{flex:1,children:[(0,D.jsx)(j.Z,{disabled:d,checked:!!c,compact:!0,onCheck:function(){return R((function(e){return M(M({},e),{},{features:M(M({},null==K?void 0:K.features),{},(0,i.Z)({},o,!c))})}))}}),(0,D.jsx)(f.Z,{mr:O.cd}),(0,D.jsxs)(a.Z,{children:[(0,D.jsx)(v.ZP,{default:!c,monospace:!0,children:(0,N.vg)(o)}),o===m.d.LOCAL_TIMEZONE&&(0,D.jsx)(f.Z,{ml:1,children:(0,D.jsx)(b.Z,M({},E.EB))})]})]}),d&&(0,D.jsx)(v.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,D.jsx)(f.Z,{mt:O.HN}),(0,D.jsx)(h.Z,{noPadding:!0,children:(0,D.jsxs)(f.Z,{p:O.cd,children:[(0,D.jsx)(f.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"OpenAI"})}),ie&&!q?(0,D.jsxs)(s.ZP,M(M({},s.A0),{},{children:[(0,D.jsx)(v.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,D.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return z(!0)},secondary:!0,title:"Edit",children:(0,D.jsx)(C.Edit,{size:I.bL})})]})):(0,D.jsx)(x.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return R((function(n){return M(M({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null==K?void 0:K.openai_api_key)||""})]})}),(0,D.jsx)(f.Z,{mt:O.HN}),(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(d.ZP,{id:"save-project-settings",loading:ae,onClick:function(){var e={features:null==K?void 0:K.features,help_improve_mage:null==K?void 0:K.help_improve_mage,openai_api_key:null==K?void 0:K.openai_api_key,pipelines:null==K?void 0:K.pipelines};!0===(null==ee?void 0:ee.help_improve_mage)&&!1===(null==K?void 0:K.help_improve_mage)&&(e.deny_improve_mage=!0),se(e)},primary:!0,children:"Save project settings"}),T&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(f.Z,{mr:O.cd}),(0,D.jsx)(d.ZP,{onClick:T,secondary:!0,children:k||"Cancel"})]})]})]});return P?(0,D.jsx)(w,{children:ue}):ue}}}]);
|