ethyca-fides 2.57.1b7__py2.py3-none-any.whl → 2.57.1b9__py2.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.
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/METADATA +1 -1
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/RECORD +221 -216
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/generic_overrides.py +43 -6
- fides/api/main.py +4 -1
- fides/api/models/attachment.py +5 -5
- fides/api/models/connectionconfig.py +1 -1
- fides/api/oauth/utils.py +11 -11
- fides/api/schemas/dataset.py +22 -2
- fides/api/service/privacy_request/request_runner_service.py +8 -4
- fides/api/service/storage/s3.py +119 -59
- fides/api/tasks/__init__.py +3 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1100-053fc6b76c65a00f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1150-d4a5eef84e70de22.js → 1150-035a721a04f4451e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2397-c6d0dcb3b921555f.js → 2397-ee53235fb21b5e97.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{255-bf1797f78249d090.js → 255-7db55b0e3a0f9dea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/2fbcc6de-a6c61724c327e9fa.js +8 -0
- fides/ui-build/static/admin/_next/static/chunks/{3086-d099019708303444.js → 3086-b5054ec2c75700b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3320-317483e6c10bae51.js → 3320-5dd62a256ecfc9c3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{355-6a87b50acf54e985.js → 355-8a77c9a1cd027f2e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-4d5d936a58a0dd5f.js → 3855-b6b7865dedd7bc2a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-2b2bf5ebd4b0a70f.js → 3872-4e053c20d546f027.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3662-6a0cafa3023aa7a2.js → 4060-8d165e1236ea521a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4481-f2f57e7a75a90e79.js → 4481-142e5a922d5a5548.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4723-1a785d558dfb6441.js → 4723-0a3c5e2ce143a7d0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5258-a05dcab2f9315dab.js → 5258-0658dc2274df6832.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5277-e8a036319456127f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5480-c6c1fb87006e471a.js → 5480-f49696df5e8ae500.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-509639439bf9fb46.js → 5487-3ad50d21cdbc9209.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/570-c99f07161bd339cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5826-e3970cd9440be33b.js → 5826-e5dcb4e68cfe6289.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-9c58e4cce2f343a8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/605-e692e9cfea2e2cb8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6060-cb1ab5be7067bf7b.js +4 -0
- fides/ui-build/static/admin/_next/static/chunks/{6315-daf94fa7520fb253.js → 6315-fa1519cdf080f42d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6372-41afe1e6a9181cc7.js → 6372-ca9c12ac8902365b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6527-0eed08abe252a918.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/678d4732-50255cc09048e643.js +2 -0
- fides/ui-build/static/admin/_next/static/chunks/{6853-7f95c36e396d3fb8.js → 6853-8941824350c3c1a8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-f7daf613febc36ef.js → 6954-3b887fb444f9228c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7088.0e7c92a7cbb57562.js → 7088.eb76fca286e5f2e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7434-3d4a0beb84ec57f7.js → 7434-e6fc02c2dd852991.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7751-130668529ab1d0b6.js → 7751-a8f31c062d4cb09d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-1c326c00cf111c00.js → 79-f9b948ebb186900f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7980-91800d54c5964ba3.js → 7980-4bd08957448dea32.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7c79804f.7a7112aece470725.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{8433-b2a96b825124b596.js → 8433-b3008ecaf9834e7f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{8499-34620330ecf2ac53.js → 8499-43606100edf42fdf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/8702-d1c8296f9f6afc10.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5908-532dfbc9d930f635.js → 9014-eeae6f581158e645.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-e7b9a3fd010b01ad.js → 9046-04bd7becea207cb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/905-8ab919e7b274ed50.js +8 -0
- fides/ui-build/static/admin/_next/static/chunks/9187-851756440f79cd75.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9282-2bfbdca45e84e810.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9327-2cba327d10586683.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9392.97b2e3327dceb7c9.js → 9392.da35a8e778812d91.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.f297a1347ac09c56.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9999-8600f6f495a80b38.js → 9999-637e0e5341f15f4a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/e3251fe7-5777b5d778e6fffa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/main-24f422f93845a596.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{main-app-2650f704701c6a7b.js → main-app-94a0711202e08b15.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-8e0baa6e128803ab.js → 404-b202c0d8f6fc75c3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/_app-44256886387d7e3e.js +923 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-f8c0b05aae0bbcd1.js → manual-c2705210ce986109.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-6a7208eee5e588fb.js → multiple-ba975134a85588f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-a33f82e79cb09478.js → add-systems-d258f0c25fa020bf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-39267961e03be6c5.js → ant-poc-b9932971a479f3a7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-ba0c5fa9764cbd89.js → add-vendors-b34e5324461d0c87.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-723cc3d4f5740ea6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-c02510104f9e503a.js → [id]-cf51752eb0902233.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-e96415629f3b4223.js → new-be194737b41ccec9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-ed38f18c095141fe.js → privacy-experience-c946b33b0322b8ad.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-66827da90b8a2d1e.js → [id]-72251b48e2e03a1e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-13d48f980bf707e5.js → new-9611dd42856d6062.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-7339b3cdf5d4da32.js → privacy-notices-ea57f9d6ad17e957.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-b5b3196eba90246a.js → properties-e5748812ba055a56.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-38b8ec1a221610ff.js → reporting-ae66e1a7e146a4de.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-df2388d953c85c2a.js → consent-39d65f13cc8f1cf8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-5e851b9f27bda8a4.js → [resourceUrn]-ac033a16f043e6f9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-9f9112b22fdfb32a.js → [projectUrn]-a29850536c85d4b8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-ddca867936c89a72.js → projects-c44ce244122e96d5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-85e3d6f1b2afd3e7.js → [resourceUrn]-71e26d262afcaea5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-9831226436d884b5.js → resources-305555b74c357bf2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-1a3bb713fc7bc298.js → data-catalog-900004e402c31797.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-5892ca5d93ea6165.js → [systemId]-5182d356672a3b02.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-5c37c3ad1c3cfba5.js → [monitorId]-7c74373a4d666a3d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-02439d3aeecfb4b9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-a0749240265da17d.js → activity-11b3ce9f61d9bfe9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-68122dbf449a11b4.js → [resourceUrn]-054ca46a782e99a5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-0ceaf3c555e84714.js → detection-b75dd3e4306ac18e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-22c27fe0f898ad2a.js → [resourceUrn]-1da20aeb6fc995e4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-8f2b102e19b0b8f2.js → discovery-cad50b0cc6d1050c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-819ac99e7a56465a.js → datamap-8cb714cdd44ac40e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d79551d4c64c398c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-7e5df4a0de7540bb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-aaedf8f2a849c97f.js → [datasetId]-6ba18f92ba561114.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-803c1b577ab17ae3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-fa743ddc7f89d76b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-f68c3ee92505994f.js → [id]-bbe1ca2793798e6b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-89bc670d278e3749.js → new-abc17fef69cd951b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/fides-js-docs-80b241bf6cddb72e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-1072281d6cfe8295.js → index-bfaacdb55a5a6c9f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-3742c349e9a0020d.js → [id]-d4329043219fed9b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-577b95cb0006f387.js → integrations-adb6aced3bdb4899.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-268918d8c1dfe82a.js → [id]-ad02e019b2467958.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-cd75949bee7497b6.js → add-template-f9693cb6a0b7ded8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-d1f4178b8a7e2145.js → [id]-fe765154315782cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-37e800a20e654064.js → configure-2987edc77388e85a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-729fa8ed0f10bc8e.js → privacy-requests-d85c0d16ba09ba35.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-92145503c4d2d75e.js → [id]-94e2faa73dd6a3e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-ab94805694ebd35c.js → add-property-630a6a3dd6502ba6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-5e623dcd92418638.js → properties-20ca2f963906674b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-afedc48ef4e7f858.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-175d39bdd74f148c.js → about-a49d0f84cf0cf05e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-1262d596c0cdcd81.js → custom-fields-52d030b1db2ca1b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-f0c6e6034d37dbcf.js → domain-records-fa42d8f18df44927.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-6ee49492a7769f89.js → email-templates-6fd6071e2009b8f2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-deb754d42982562b.js → locations-66c757325cb58467.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-f45920358a405167.js → organization-a08693d0d1e10bc8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-f9e97decfe56b018.js → regulations-c6c239996cfa6ae8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-151571cff4e85894.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-c234398ee8265485.js → [id]-d3ea9034461511cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-4d6a17a7a24aca97.js → systems-abd68fc5ddde5482.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-46f47c04a01319cf.js → taxonomy-16b4d75c49276add.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-5b752ba934baee94.js → [id]-78eaf933f755bfe8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-4fbb29cf0a611aae.js → user-management-6c9ad62479a7d03e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{webpack-815e3c35038201da.js → webpack-2c7ccac5843c4d8e.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/{dd9922a434d21e22.css → 113d823fe71f6af0.css} +1 -1
- fides/ui-build/static/admin/_next/static/css/ab65b8cc3144bfc8.css +1 -0
- fides/ui-build/static/admin/_next/static/yhm3LM_VFpK2KeFRFEQyN/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/yhm3LM_VFpK2KeFRFEQyN/_ssgManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-c177d8d0c60b1166.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1995-0e4fc4f7b44ed72b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2201-0452b4135058f0fc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2780-8328de94968d05e4.js +0 -4
- fides/ui-build/static/admin/_next/static/chunks/3005-373de16453ed7eea.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/302-fb0e3cd140c4364d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3967-845c902667e47c4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3e38ba78-4487e45fd4ed2479.js +0 -2
- fides/ui-build/static/admin/_next/static/chunks/4833-a85bd5d25ebc40c4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5246-ac8b0fcb44b00af7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5960-8895f51b30c35798.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6362-0ca70f8cfd020723.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7495-b7fa6fdbd910bd72.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7c79804f.26834f883d5ad770.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8837-cf26e5ca1ae5aaf5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9282-6ee061da1eb51d65.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.f4d5977a5f148797.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/main-ce7f38a12ea8c223.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/_app-e53d13729068a001.js +0 -909
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-1af99ffa7a507e86.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-4fac7e0a54eebc32.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-259d4a94861afe2b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-25283f5bcac8fa73.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-45016545c099e183.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5ddd3cd7d29e89c0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-61adfcd5f7f69101.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-5a161e167c251519.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c3e234ad95e6e213.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-347e203faa31716f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-710839776b9995ce.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ff6edba56dfec090.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-ad368857e86fe01b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-ae133b6e8e1107f2.js +0 -1
- fides/ui-build/static/admin/_next/static/dctUooMB4AAq5YqgLKNt9/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/dctUooMB4AAq5YqgLKNt9/_ssgManifest.js +0 -1
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.57.1b7.dist-info → ethyca_fides-2.57.1b9.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-d6717378b42982d5.js → new-be690621a944bfe2.js} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[302],{77867:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},7617:function(e,s,t){t.d(s,{q:function(){return n}});var a=t(24246),i=t(56351);let n=e=>{let{label:s,isDisabled:t,...n}=e;return(0,a.jsx)(i.OK9,{"data-testid":"tab-".concat(s),_selected:{fontWeight:"600",color:"complimentary.500",borderColor:"complimentary.500"},fontSize:n.fontSize,fontWeight:"500",color:"gray.500",isDisabled:t||!1,children:s})};s.Z=e=>{let{data:s,border:t="partial",...r}=e;return(0,a.jsxs)(i.mQc,{colorScheme:"complimentary",...r,children:[(0,a.jsx)(i.tdY,{width:"partial"===t?"max-content":void 0,children:s.map(e=>(0,a.jsx)(n,{label:e.label,isDisabled:e.isDisabled,fontSize:r.fontSize},e.label))}),(0,a.jsx)(i.nPR,{children:s.map(e=>(0,a.jsx)(i.x45,{px:0,"data-testid":"tab-panel-".concat(e.label),children:e.content},e.label))})]})}},59301:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>(0,a.jsx)(i.rUS,{isExternal:!0,color:"complimentary.500",...e})},19904:function(e,s,t){t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},26089:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{onClick:s,children:t}=e;return(0,a.jsx)(i.wpx,{onClick:s,type:"link",role:"link",size:"large",className:"m-0 p-0 font-medium text-gray-700 underline",children:t})}},16220:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){var a=t(24246),i=t(56351);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){t.d(s,{Z:function(){return g}});var a=t(24246),i=t(56351),n=t(27378),r=t(44833),l=t(45007),o=t(812),d=t(46628),c=t(20682),u=t(89319),p=t(52253),h=t(78780);let{reducer:m}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=h.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[h,m]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}m(e[0])}}),[b,{isLoading:v}]=x(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(h)try{var e;await b(h).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{m(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),h?(0,a.jsx)(i.xvT,{children:h.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!h||v,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){var a=t(56351),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},41337:function(e,s,t){var a=t(24246),i=t(56351);t(27378);var n=t(21702),r=t(14746);let l=e=>void 0!==e.connection_type,o=e=>void 0!==e.encoded_icon;s.Z=e=>{let{data:s,...t}=e;return(0,a.jsx)(i.Eep,{boxSize:"32px",objectFit:"cover",src:(()=>{let e;if(o(s)&&s.encoded_icon)return"data:image/svg+xml;base64,".concat(s.encoded_icon);if(l(s))e=[...r.iW].find(e=>{var t,a;let[i]=e;return s.connection_type.toString()!==n.Rj.SAAS&&s.connection_type.toString()===i||s.connection_type.toString()===n.Rj.SAAS&&(null===(a=s.saas_config)||void 0===a?void 0:null===(t=a.type)||void 0===t?void 0:t.toString())===i.toString()});else if(o(s)){let{identifier:t}=s;e=[...r.iW].find(e=>{let[s]=e;return s.toLowerCase()===t.toLowerCase()})}return e?r.Ny+e[1]:r.VD})(),fallbackSrc:r.VD,alt:(()=>{if(l(s)){var e;return null!==(e=s.name)&&void 0!==e?e:s.key}return o(s)?s.human_readable:s})(),...t})}},73183:function(e,s,t){var a=t(24246),i=t(56351);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[h,m]=(0,n.XX)(),x=async()=>{await h({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{m.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:m.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(56351),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){var a=t(24246),i=t(56351),n=t(34090);s.Z=e=>{let{disabled:s=!1,displayHelpIcon:t=!0,helpIconVisibility:r=!1,isRequired:l=!1,label:o,placeholder:d,type:c="text",...u}=e,{id:p,autoFocus:h}=u,[m,x]=(0,n.U$)(u);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:l,isInvalid:!!(x.error&&x.touched),children:[o&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:p,minWidth:"150px",children:o}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===c&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...m,autoComplete:"off",autoFocus:h}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===c&&(0,a.jsx)(i.IIB,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",isDisabled:s,placeholder:d,size:"sm"}),"textarea"===c&&(0,a.jsx)(i.gxH,{...m,autoComplete:"off",autoFocus:h,color:"gray.700",placeholder:d,resize:"none",size:"sm",value:m.value||""}),(0,a.jsx)(i.J1D,{children:x.error})]}),t&&(0,a.jsx)(i.kCb,{alignContent:"center",h:"32px",visibility:r?"visible":"hidden",children:(0,a.jsx)(i.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})]})}},34669:function(e,s,t){t.d(s,{Z:function(){return sV}});var a,i,n=t(24246),r=t(84720),l=t(56351),o=t(79894),d=t.n(o),c=t(86677),u=t.n(c),p=t(27378),h=t(16134),m=t(25980),x=t(45938),g=t(16220),y=t(77830),f=t(46628),_=t(26089),b=t(19904),v=t(16394),j=t(20682),k=t(41337);let w=e=>{let{connectionConfig:s}=e,t=(0,h.C)(j.pw),{data:a}=(0,j.$I)(t),i=(0,p.useMemo)(()=>(null==a?void 0:a.items)||[],[a]),[n,r]=(0,p.useState)(),l=(0,p.useMemo)(()=>[...i].sort((e,s)=>e.human_readable>s.human_readable?1:-1),[i]),o=(0,p.useMemo)(()=>{let e=new Map;return null==l||l.map(s=>e.set(s.human_readable,{value:s})),e},[l]),d=(0,p.useMemo)(()=>{var e;return(null===(e=i.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,i]);return(0,p.useMemo)(()=>{let e=i.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&r(e)},[s,i]),{dropDownOptions:o,selectedValue:n,setSelectedValue:r,systemType:d}};var C=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:r,onChange:o,selectedValue:d}=e,c=(0,p.useRef)(null),[u,h]=(0,p.useState)(!1),[m,x]=(0,p.useState)(""),g=()=>{h(!1)},y=null===(s=[...r].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,p.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,p.useMemo)(()=>(0,v.Ds)(f,100),[f]),b=(0,p.useMemo)(()=>[...r].filter(e=>e[0].toLowerCase().includes(m.toLowerCase())),[r,m]);return(0,n.jsxs)(l.v2r,{isLazy:!0,onClose:g,onOpen:()=>{h(!0)},strategy:"fixed",matchWidth:!0,children:[(0,n.jsx)(l.j2t,{"aria-label":null!=y?y:i,as:l.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,n.jsx)(l.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,n.jsx)(l.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,n.jsxs)(l.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,n.jsx)(l.xuv,{px:"8px",mt:2,children:(0,n.jsxs)(l.BZy,{size:"sm",children:[(0,n.jsx)(l.Z8_,{pointerEvents:"none",children:(0,n.jsx)(l.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,n.jsx)(l.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,n.jsx)(l.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,n.jsx)(l.wpx,{onClick:()=>{o(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,n.jsx)(l.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,n.jsx)(l.ua7,{"aria-label":t.toolTip,hasArrow:!0,label:t.toolTip,placement:"auto-start",openDelay:500,shouldWrapChildren:!0,children:(0,n.jsxs)(l.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>o(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,n.jsx)(k.Z,{data:t.value}),(0,n.jsx)(l.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},S=t(14047),D=t(1315),T=t(21702),A=t(84306),I=t(14207),E=t(59301),q=(0,l.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),z=t(41966);let R=e=>{var s,t,a;let{connectionConfig:i}=e,[n]=(0,I.S6)(),{data:r}=(0,I.Eg)(null!==(t=null==i?void 0:i.key)&&void 0!==t?t:""),l=null!==(a=null==r?void 0:null===(s=r.items)||void 0===s?void 0:s.map(e=>e.fides_key))&&void 0!==a?a:[],o=l.map(e=>({label:e,value:e})),{data:d}=(0,z.LH)({onlyUnlinkedDatasets:!0}),c=(0,p.useMemo)(()=>{var e;return null!==(e=null==d?void 0:d.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[d]),{errorAlert:u,successAlert:h}=(0,S.V)();return{dropdownOptions:[...o,...c],initialDatasets:l,patchConnectionDatasetConfig:async function(e,s){var t,a,i;let{showSuccessAlert:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!==(i=null===(t=e.dataset)||void 0===t?void 0:t.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==i?i:[],o=await n({connection_key:s,dataset_pairs:l}).unwrap();(null===(a=o.failed)||void 0===a?void 0:a.length)>0?u(o.failed[0].message):r&&h("Dataset successfully updated!")}}};var F=e=>{let{status:s}=e;return(0,n.jsxs)(n.Fragment,{children:["success"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"}),"error"===s&&(0,n.jsx)(l.xvT,{"data-testid":"toast-error-msg",children:"Test failed: please check your connection info"})]})},L=t(8627),O=t(32885),W=t(65450),Z=t(34090),P=t(59389),N=t(97181),U=t(57072),V=t(39864),M=t(27259);let B=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,n.jsxs)(l.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,n.jsx)(l.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,n.jsx)(l.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var H=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:r}=(0,U.MO)(),o=(0,h.C)(V.qb),{errorAlert:d}=(0,S.V)();return r?null:(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:P.Ry({fields:P.IX().of(P.Ry().shape({pii_field:P.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:P.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:P.IX(P.Z_()).label("Data Categories")}))}),children:e=>(0,n.jsx)(Z.l0,{style:{marginTop:0},noValidate:!0,children:(0,n.jsx)(l.gCW,{align:"stretch",children:(0,n.jsx)(Z.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,n.jsx)(l.xuv,{w:"416px",children:"PII Field"}),(0,n.jsx)(l.xuv,{w:"416px",children:"DSR Package Label"}),(0,n.jsx)(l.xuv,{w:"416px",children:"Data Categories"}),(0,n.jsx)(l.xuv,{visibility:"hidden",children:(0,n.jsx)(l.lr0,{})})]}),(0,n.jsx)(l.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,n.jsxs)(l.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(M.Z,{autoFocus:0===t,displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(M.Z,{displayHelpIcon:!1,isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,n.jsx)(l.xuv,{minH:"57px",w:"416px",children:(0,n.jsx)(N.d,{name:"fields.".concat(t,".data_categories"),options:o.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,n.jsx)(l.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,n.jsx)(l.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,n.jsx)(l.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,n.jsx)(B,{isSubmitting:t,onCancelClick:i})]})}})})})})},K=e=>{let{connectionConfig:s}=e,t=(0,p.useRef)(!1),{successAlert:a}=(0,S.V)(),{handleError:i}=(0,S.H)(),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)([]),{isOpen:u,onOpen:h,onClose:m}=(0,l.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,I.QV)(s?s.key:"",{skip:!s}),[_]=(0,I.jF)(),[b]=(0,I._d)(),v=async(e,t)=>{try{o(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{o(!1)}};(0,p.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let j=(0,n.jsx)(l.wpx,{disabled:!s||r,loading:r,onClick:h,children:"Customize DSR"});return(0,n.jsxs)(n.Fragment,{children:[s?j:(0,n.jsx)(l.ua7,{label:"Save an Integration first to customize the DSR",placement:"top",shouldWrapChildren:!0,children:j}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:m,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{minWidth:"775px",children:[(0,n.jsx)(l.xBx,{children:"Customize DSR"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsx)(l.xuv,{color:"gray.700",fontSize:"14px",children:"Customize your PII fields to create a friendly label name for your privacy request packages. This “Package Label” is the label your user will see in their downloaded package."}),(g||y)&&(0,n.jsx)(l.M5Y,{children:(0,n.jsx)(l.$jN,{})}),t.current&&!y?(0,n.jsx)(H,{data:d,isSubmitting:r,onSaveClick:v,onCancel:m}):null]})})]})]})]})},Y=t(98784),G=t.n(Y),$=t(73183),Q=e=>{let{options:s}=e,[t,{error:a},i]=(0,Z.U$)("dataset"),{setValue:r}=i;return(0,n.jsxs)(l.NIc,{display:"flex",children:[(0,n.jsx)(l.lXp,{color:"gray.900",fontWeight:"semibold",fontSize:"sm",htmlFor:"dataset",minWidth:"150px",children:"Datasets"}),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"100%",children:[(0,n.jsx)(l.xuv,{w:"full",children:(0,n.jsx)(l.WPr,{...t,id:"dataset",placeholder:"Select datasets...",options:s,onChange:e=>r(e),mode:"multiple",className:"w-full"})}),(0,n.jsx)(l.J1D,{children:a})]}),(0,n.jsx)(l.ua7,{"aria-label":"Select datasets to associate with this integration",hasArrow:!0,label:"Select datasets to associate with this integration",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})},J=t(95492),X=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),o=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&r()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Delete integration"}),(0,n.jsx)(l.wpx,{"aria-label":"Delete integration",icon:(0,n.jsx)(J.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,onClose:o,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Delete integration"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsx)(l.Kqy,{direction:"column",spacing:"15px",children:(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,n.jsxs)(l.mzw,{children:[(0,n.jsx)(l.wpx,{onClick:o,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ee=t(99792);let es=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},et=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ee.Z.SAAS&&(t+="_api"),t},ea="#/definitions/FidesDatasetReference",ei=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:r,onTestConnectionClick:o,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:h,initialDatasets:x,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,I.h2)(),{plus:k}=(0,m.hz)(),w=(e,s,t)=>{let a;return(void 0===s||""===s||void 0===s)&&(a="".concat(e," is required")),t===ea&&(s.includes(".")?s.split(".").length<3&&(a="Dataset reference must include at least three parts"):a="Dataset reference must be dot delimited"),a},C=(e,s)=>(0,n.jsx)(l.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:e,minWidth:"150px",children:s}),S=e=>{var s;if((null===(s=e.allOf)||void 0===s?void 0:s[0].$ref)===ea)return"Enter dataset.collection.field"},D=e=>{var t,a;return(null==s?void 0:null===(t=s.required)||void 0===t?void 0:t.includes(e))||(null==s?void 0:null===(a=s.properties)||void 0===a?void 0:a[e])!==void 0&&"default"in s.properties[e]},A=(e,s)=>(0,n.jsx)(Z.gN,{id:"secrets.".concat(e),name:"secrets.".concat(e),validate:(!!D(e)||"integer"===s.type)&&(e=>{var t;return w(s.title,e,null===(t=s.allOf)||void 0===t?void 0:t[0].$ref)}),children:t=>{var a;let{field:i,form:r}=t,o=r.errors.secrets&&r.errors.secrets[e],d=!!r.touched.secrets&&r.touched.secrets[e],c="boolean"===s.type,u="integer"===s.type;return(0,n.jsxs)(l.NIc,{display:"flex",isRequired:D(e)&&!c,isInvalid:o&&d,children:[C(e,s.title),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[!u&&!c&&(0,n.jsx)(l.IIB,{...i,type:s.sensitive?"password":"text",placeholder:S(s),autoComplete:"off",color:"gray.700",size:"sm"}),c&&(0,n.jsx)(l.WPr,{value:!!i.value,onChange:e=>r.setFieldValue(i.name,e),options:[{label:"False",value:!1},{label:"True",value:!0}]}),u&&(0,n.jsxs)(l.Y2U,{allowMouseWheel:!0,color:"gray.700",onChange:e=>{r.setFieldValue(i.name,e)},value:null!==(a=i.value)&&void 0!==a?a:0,min:0,size:"sm",children:[(0,n.jsx)(l.zuI,{...i,autoComplete:"off"}),(0,n.jsxs)(l.FiK,{children:[(0,n.jsx)(l.WQu,{}),(0,n.jsx)(l.Y_d,{})]})]}),(0,n.jsx)(l.J1D,{children:o})]}),(0,n.jsx)(l.ua7,{"aria-label":s.description,hasArrow:!0,label:s.description,placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",visibility:s.description?"visible":"hidden",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}},"secrets.".concat(e)),E=e=>{let t=G().cloneDeep(e);return s&&Object.keys(s.properties).forEach(e=>{var a;if((null===(a=s.properties[e].allOf)||void 0===a?void 0:a[0].$ref)===ea){let s=t.secrets[e].split(".");t.secrets[e]={dataset:s.shift(),field:s.join("."),direction:"from"}}}),t},q=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(E(e))},z=async e=>{Object.keys(await e.validateForm()).length>0||o(await b(h.key))},R=(null==h?void 0:h.disabled)||!1;return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==h?void 0:h.key){var a,i;return e.name=null!==(i=h.name)&&void 0!==i?i:"",e.description=h.description,e.instance_key=h.connection_type===T.Rj.SAAS?null===(a=h.saas_config)||void 0===a?void 0:a.fides_key:h.key,e.enabled_actions=(h.enabled_actions||[]).map(e=>e.toString()),e.secrets=h.secrets?G().cloneDeep(h.secrets):{},e.dataset=x,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ea){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return G().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),es(e,s)})(),onSubmit:(e,s)=>{r(E(e),s)},validateOnBlur:!1,validateOnChange:!1,children:e=>{var t;let r=!e.dirty&&(null==h?void 0:h.authorized);return(0,n.jsx)(Z.l0,{noValidate:!0,children:(0,n.jsxs)(l.gCW,{align:"stretch",gap:"16px",children:[(0,n.jsxs)("div",{className:"flex flex-row",children:[h?(0,n.jsx)($.Z,{connection_key:null==h?void 0:h.key,disabled:R,connection_type:null==h?void 0:h.connection_type,access_type:null==h?void 0:h.access,name:null!==(t=null==h?void 0:h.name)&&void 0!==t?t:h.key,isSwitch:!0}):null,h?(0,n.jsx)(X,{onDelete:f,deleteResult:_}):null]}),!!(null==h?void 0:h.key)&&(0,n.jsx)(Z.gN,{id:"instance_key",name:"instance_key",children:s=>{let{field:t}=s;return(0,n.jsxs)(l.NIc,{display:"flex",children:[C("instance_key","Integration identifier"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.IIB,{...t,autoComplete:"off",color:"gray.700",isDisabled:!!(null==h?void 0:h.key),placeholder:"A unique identifier for your new ".concat(p.human_readable," integration"),size:"sm"}),(0,n.jsx)(l.J1D,{children:e.errors.instance_key})]}),(0,n.jsx)(l.ua7,{"aria-label":"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration.",hasArrow:!0,label:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),p.type!==T.Zi.MANUAL&&s?Object.entries(s.properties).map(e=>{let[s,t]=e;return"advanced_settings"===s?null:A(s,t)}):null,k&&(0,n.jsx)(Z.gN,{id:"enabled_actions",name:"enabled_actions",validate:e=>{let s;return e&&0!==e.length||(s="At least one request type must be selected"),s},children:s=>{let{field:t,form:a}=s;return(0,n.jsxs)(l.NIc,{"data-testid":"enabled-actions",display:"flex",isInvalid:a.touched.enabled_actions&&a.errors.enabled_actions,isRequired:!0,children:[C("enabled_actions","Request types"),(0,n.jsxs)(l.gCW,{align:"flex-start",w:"inherit",children:[(0,n.jsx)(l.WPr,{...t,placeholder:"Select...",mode:"multiple",options:p.supported_actions.map(e=>({label:G().upperFirst(e),value:e})),onChange:e=>{a.setFieldValue(t.name,e)},disabled:1===p.supported_actions.length,className:"w-full"}),(0,n.jsx)(l.J1D,{children:e.errors.enabled_actions})]}),(0,n.jsx)(l.ua7,{"aria-label":"The request types that are supported for this integration.",hasArrow:!0,label:"The request types that are supported for this integration.",placement:"right-start",openDelay:500,children:(0,n.jsx)(l.kCb,{alignItems:"center",h:"32px",children:(0,n.jsx)(l.ITP,{marginLeft:"8px",_hover:{cursor:"pointer"}})})})]})}}),T.Zi.DATABASE===p.type&&!y&&(0,n.jsx)(Q,{options:g}),(0,n.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||r?(0,n.jsx)(l.wpx,{disabled:!(null==h?void 0:h.key)||a||_.isLoading,loading:v||j,onClick:()=>z(e),"data-testid":"test-connection-button",children:u}):null,k&&T.Zi.DATABASE===p.type&&!G().isEmpty(x)&&(0,n.jsx)(l.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!r?(0,n.jsx)(l.wpx,{loading:i,onClick:()=>q(e.values,e),children:"Authorize integration"}):null,p.type===T.Zi.MANUAL?(0,n.jsx)(K,{connectionConfig:h}):null,(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit",children:"Save"})]})]})})}})},en=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:et(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},er=async(e,s,t,a,i)=>{var n;let r=a?a.key:et(t,s),l={access:T.uv.WRITE,connection_type:s.type===T.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},el=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eo=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,A.V)(),{handleError:l}=(0,S.H)(),o=(0,h.T)(),[d,c]=(0,p.useState)(!1),[u,x]=(0,p.useState)(!1),{dropdownOptions:g,patchConnectionDatasetConfig:y,initialDatasets:f}=R({connectionConfig:i}),[_]=(0,I.NG)(),[b]=(0,O.IB)(),[v]=(0,I.rO)(),[j]=(0,W.Zh)(),[k]=(0,W.qd)(),[w]=(0,O.kg)(),[C,D]=(0,W._w)(),{plus:E}=(0,m.hz)(),q=(0,p.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]),z=(0,h.C)(W.NC);return{isSubmitting:d,isAuthorizing:u,handleSubmit:async e=>{let n=!i;try{if(c(!0),a.type===T.Zi.SAAS&&n)i=(await en(e,s,a,t,E?b:_)).connection;else{let n=await er(e,a,t,i,E?w:k);i||a.type!==T.Zi.DATABASE||(i=n.succeeded[0]),a.type!==T.Zi.MANUAL&&await el(e,s,t,q,j)}i&&e.dataset&&a.type===T.Zi.DATABASE&&await y(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{c(!1)}},handleAuthorization:async e=>{let n=!i;try{x(!0),n?i=(await en(e,s,a,t,_)).connection:await el(e,s,t,q,j);let r=await v(i.key).unwrap();x(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{x(!1)}},datasetDropdownOptions:g,initialDatasets:f,handleDelete:async()=>{try{await C(t),o((0,W.db)({...z,connection_configs:null})),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:D}},ed=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[r,o]=(0,p.useState)(),d=(0,l.pmc)(),c=t.type===T.Zi.MANUAL,{data:h}=(0,j.n3)(t.identifier,{skip:c}),{isSubmitting:m,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:_,initialDatasets:b,handleDelete:v,deleteDatastoreConnectionResult:k}=eo({secretsSchema:h,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return h||t.type===T.Zi.MANUAL?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,n.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,n.jsx)("div",{style:{marginTop:"12px"},children:(0,n.jsxs)(E.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,n.jsx)(q,{})]})})]}),(0,n.jsx)(ei,{secretsSchema:h,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:m,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s;o(e);let t=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...f.MA,status:t,description:(0,n.jsx)(F,{status:t})})},onTestDatasetsClick:()=>{u().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:_,initialDatasets:b,isCreatingConnectionConfig:!a,onDelete:v,deleteResult:k}),a?(0,n.jsxs)(l.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[r&&r.data&&void 0!==r.fulfilledTimeStamp?(0,n.jsx)(L.s,{succeeded:"succeeded"===r.data.test_status,timestamp:r.fulfilledTimeStamp}):(0,n.jsx)(L.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,n.jsx)(l.LZC,{})]}):null]}):null};var ec=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:r}=(0,l.qY0)(),[o,d]=(0,p.useState)(null),{successAlert:c}=(0,S.V)(),[u,{isLoading:m}]=(0,D.qd)(),x=(0,h.C)(j.pw),{data:g}=(0,j.$I)(x),y=(0,p.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,S.H)(),_=()=>{m||(o&&d(null),r())},b=async()=>{try{if(o){var e;let s={...o,instance_key:o.connection_type===T.Rj.SAAS?null===(e=o.saas_config)||void 0===e?void 0:e.fides_key:o.key},a=y.find(e=>(null==o?void 0:o.saas_config)&&e.identifier===(null==o?void 0:o.saas_config.type)||e.identifier===(null==o?void 0:o.connection_type));(await er(s,a,t,o,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),r()}}catch(e){f(e)}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{onClick:i,children:"Link integration"}),(0,n.jsxs)(l.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsx)(l.xBx,{children:"Unlinked Integrations"}),(0,n.jsx)(l.olH,{}),(0,n.jsx)(l.fef,{pb:6,children:(0,n.jsxs)(l.Kqy,{direction:"column",spacing:"15px",children:[(0,n.jsx)(l.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,n.jsx)(l.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,n.jsxs)(l.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==o?void 0:o.key)===e.key?"gray.100":"unset",color:(null==o?void 0:o.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},children:[(0,n.jsx)(k.Z,{data:e}),(0,n.jsx)(l.xvT,{children:e.name})]},e.key))})]})}),(0,n.jsxs)(l.mzw,{className:"flex gap-4",children:[(0,n.jsx)(l.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,n.jsx)(l.wpx,{onClick:b,loading:m,disabled:!o||m,className:"w-1/2",children:"Link integration"})]})]})]})]})},eu=t(44553),ep=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:r}=w({connectionConfig:s}),o=(0,h.C)(I.dR),{data:d}=(0,I.AZ)({...o,orphaned_from_system:!0}),[c,u]=(0,p.useState)([]);(0,p.useEffect)(()=>{d&&u(d.items)},[d]);let m=(0,l.qY0)();return(0,n.jsxs)(l.xuv,{id:"con-wrapper",px:6,children:[(0,n.jsxs)(l.kCb,{py:5,children:[(0,n.jsxs)(l.Kqy,{direction:{base:"column",lg:"row"},children:[(0,n.jsx)(C,{list:a,label:"Integration type",selectedValue:i,onChange:r,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,n.jsx)(ec,{connectionConfigs:c,systemFidesKey:t}):null,(0,n.jsx)(b.ZP,{scopes:[T.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,n.jsx)(l.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:m.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,n.jsx)(eu.Z,{isOpen:m.isOpen,onClose:m.onClose})]}),(null==i?void 0:i.type)&&[T.Zi.DATABASE,T.Zi.DATA_CATALOG,T.Zi.SAAS,T.Zi.MANUAL,T.Zi.EMAIL].includes(i.type)?(0,n.jsx)(ed,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:r,systemFidesKey:t}):null]})},eh=t(71922),em=t(31883);let ex=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:r,name:o}=s,d="".concat(r,"-notice_id"),[c,,u]=(0,Z.U$)(d),{setValue:p}=u;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.Ugi,{flexGrow:1,children:[i&&(0,n.jsx)(l.LqM,{}),(0,n.jsx)(l.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:o})]}),(0,n.jsx)(l.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eg=e=>{let{connectionKey:s,...t}=e,a=(0,l.pmc)(),{data:i,isLoading:r}=(0,O.EQ)(s),[o,{isLoading:d}]=(0,O.Am)(),c=(0,h.C)(eh.Zp),u=(0,h.C)(eh.G1),{data:m,isLoading:x}=(0,eh.J6)({page:c,size:u}),[g,y]=(0,p.useState)(),[_,b]=(0,p.useState)([]),v=(0,p.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),j=e=>{let s=e.notice_id;if(s){let e=null==m?void 0:m.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return _.filter(e=>s.includes(e.value))}}return _},k=async()=>{let e=await o({connectionKey:s,consentableItems:g});(0,em.D4)(e)?a((0,f.Vo)("Failed to save consent automation")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,n.jsx)(l.xvT,{"data-testid":"toast-success-msg",children:"Your consent automation settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,p.useEffect)(()=>{i&&y(i)},[i]),(0,p.useEffect)(()=>{m&&b(m.items.map(e=>({label:e.name,value:e.id})))},[m]),r||x)return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.OdW,{height:"35px"})});if(!g||!g.length||!m)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,n.jsx)(l.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,n.jsx)(l.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,n.jsxs)(l.Qdk,{border:"none",children:[(0,n.jsxs)(l.KFZ,{children:[(0,n.jsx)(l.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,n.jsx)(l.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Consent automation"})}),(0,n.jsx)(l.XEm,{})]}),(0,n.jsxs)(l.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,n.jsx)(l.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,n.jsx)(Z.J9,{initialValues:v||{},onSubmit:k,children:(0,n.jsxs)(Z.l0,{children:[(0,n.jsx)(l.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(ex,{item:e,options:_,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,n.jsx)(ex,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,n.jsx)(l.Ugi,{justifyContent:"flex-end",mt:3,children:(0,n.jsx)(l.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ey=t(57865),ef=t(3124),e_=t.n(ef),eb=(0,l.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),ev=(0,l.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let ej=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},ek=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,ew=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=ek(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((G().isNil(l)||G().isEmpty(l))&&(G().isNil(o)||G().isEmpty(o)))&&(G().isEqual(l,o)||(G().isNil(l)||G().isEmpty(l)?a.push(r):G().isNil(o)||G().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eC=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,r=[],l=[],o=[];t.custom_fields||a.custom_fields?{addedFields:r,removedFields:l,changedFields:o}=ew(t.custom_fields,a.custom_fields):{addedFields:r,removedFields:l,changedFields:o}=ew(t,a);let d=[];if(r.length>0&&d.push(["added ",(0,n.jsx)("b",{children:r.join(", ")})]),l.length>0&&d.push(["removed ",(0,n.jsx)("b",{children:l.join(", ")})]),o.length>0&&d.push(["changed ",(0,n.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,n.jsxs)(n.Fragment,{children:[d.map((e,s)=>(0,n.jsxs)(p.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:h,formattedDate:m}=ej(i);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("b",{children:s})," ",u," on ",m," at ",h]})},eS=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eD=(e,s)=>{if(G().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eT=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eA=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},eI=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eE=(0,p.createContext)(null),eq=()=>(0,p.useContext)(eE);var ez=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,p.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,n.jsx)(eE.Provider,{value:i,children:s})},eR=t(62165),eF=t(30320),eL=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eq(),i=p.Children.toArray(t).filter(e=>{if(p.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=G().get(null==a?void 0:a.before,s),i=G().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&G().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&G().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,n.jsx)(l.Kqy,{marginTop:"0px !important",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s})}),(0,n.jsx)(l.Kqy,{children:i})]})})},eO=t(40324),eW=t(91613),eZ=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,Z.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)([]),[y,f]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=G().get(null==r?void 0:r.before,i.name)||[],s=G().get(null==r?void 0:r.after,i.name)||[];f(!G().isEqual(e,s)),g(e.length>s.length?e:s)},[r,i.name]),(0,p.useEffect)(()=>{u.current&&m(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eW.Z,{label:a}):null]}),(0,n.jsx)(l.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(h,"px")},children:(h?c.value:x).map((e,s)=>(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===o&&y&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eP=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:r,formType:o}=eq(),[d]=(0,Z.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,p.useRef)(null),[h,m]=(0,p.useState)(null),[x,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=G().get(null==r?void 0:r.before,i.name)||"",s=G().get(null==r?void 0:r.after,i.name)||"";g(!G().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,m(u.current.offsetHeight),u.current.textContent=c.value)},[r,i.name,c.value]);let y={};return x&&(y="before"===o?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),a?(0,n.jsx)(eW.Z,{label:a}):null]}),(0,n.jsx)(l.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(h,"px")},children:c.value}),"before"===o&&x&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eN=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eF.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),r=t===T.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",l=Object.keys(s).sort();return(0,n.jsx)(eL,{heading:"Custom fields",children:l.map(e=>i(e)?(0,n.jsx)(eZ,{label:e,name:"".concat(r,".").concat(e)},e):(0,n.jsx)(eP,{label:e,name:"".concat(r,".").concat(e)},e))})},eU=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:r}=eq(),[o]=(0,Z.U$)(a),d={...o,value:o.value},[c,u]=(0,p.useState)(!1);(0,p.useEffect)(()=>{u(G().get(null==i?void 0:i.before,a.name)!==G().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let h={};return c&&(h="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,n.jsx)(l.NIc,{style:h,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,n.jsxs)(l.gCW,{alignItems:"start",minHeight:"46px",children:[(0,n.jsxs)(l.kCb,{alignItems:"center",children:[(0,n.jsx)(eO.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),t?(0,n.jsx)(eW.Z,{label:t}):null]}),void 0!==d.value&&(0,n.jsx)(l.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===r&&c&&(0,n.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{initialValues:s}=e,t=(0,eR.hz)();return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,n.jsx)(Z.l0,{children:(0,n.jsxs)(l.Kqy,{children:[(0,n.jsxs)(eL,{heading:"System details",children:[t.dictionaryService?(0,n.jsx)(eP,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,n.jsx)(eP,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eP,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(eP,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,n.jsx)(eZ,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eZ,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,n.jsxs)(eL,{heading:"Data processing properties",children:[(0,n.jsx)(eU,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,n.jsx)(eU,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,n.jsx)(eP,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,n.jsx)(eU,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,n.jsx)(eZ,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,n.jsx)(eU,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,n.jsx)(eZ,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,n.jsx)(eU,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,n.jsx)(eP,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,n.jsxs)(eL,{heading:"Administrative properties",children:[(0,n.jsx)(eP,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,n.jsx)(eP,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,n.jsx)(eP,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,n.jsx)(eP,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,n.jsx)(eP,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,n.jsx)(eZ,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,n.jsx)(eP,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,n.jsx)(eP,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,n.jsx)(eP,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,n.jsx)(eN,{customFields:s.custom_fields,resourceType:T.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsxs)(eL,{heading:"Data use",children:[(0,n.jsx)(eP,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,n.jsx)(eL,{heading:"Features",children:(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,n.jsx)(eL,{heading:"Dataset reference",children:(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,n.jsxs)(eL,{heading:"Special category data",children:[(0,n.jsx)(eU,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,n.jsxs)(eL,{heading:"Third parties",children:[(0,n.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,n.jsx)(eP,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,n.jsx)(eZ,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,n.jsx)(eN,{customFields:s.privacy_declarations[0].custom_fields,resourceType:T.P6.PRIVACY_DECLARATION})]},t)),(0,n.jsxs)(eL,{heading:"Data flow",children:[(0,n.jsx)(eZ,{name:"ingress",label:"Sources"}),(0,n.jsx)(eZ,{name:"egress",label:"Destinations"})]})]})})})};let eM=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eB=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,n.jsxs)(l.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{children:[(0,n.jsxs)(l.xBx,{backgroundColor:e_().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,n.jsxs)(l.X6q,{size:"xs",children:[(0,n.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,n.jsx)(n.Fragment,{children:eM(s.before,s.after).map((e,s)=>(0,n.jsx)(l.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.olH,{})]})]}),(0,n.jsx)(l.fef,{paddingTop:0,paddingBottom:6,children:(0,n.jsxs)(l.kCb,{justifyContent:"space-between",children:[(0,n.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,n.jsx)(ez,{selectedHistory:s,formType:"before",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.before})})}),(0,n.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,n.jsx)(ez,{selectedHistory:s,formType:"after",children:(0,n.jsx)(eV,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eH=e=>{let{system:s}=e,[t,a]=(0,p.useState)(1),{data:i}=(0,O.Xc)({system_key:s.fides_key,page:t,size:10}),[r,o]=(0,p.useState)(!1),[d,c]=(0,p.useState)(null),u=(0,h.C)(O.o),{data:m=[]}=(0,W.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=eI(e=eA(e=eS(e=eD(e=eT(e),u),m)))),o(!0)},{formattedTime:y,formattedDate:f}=ej(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.iA_,{ml:"24px",children:[(0,n.jsx)(l.hrZ,{children:(0,n.jsx)(l.Tr,{children:(0,n.jsxs)(l.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:e_().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,n.jsx)(l.p3B,{children:x.map((e,s)=>{let t=eC(e);return t?(0,n.jsx)(l.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,n.jsx)(l.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,n.jsxs)(l.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,n.jsxs)(l.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,n.jsx)(l.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,n.jsx)(ev,{})}),(0,n.jsx)(l.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,n.jsx)(eb,{})})]}),(0,n.jsx)(eB,{selectedHistory:d,isOpen:r,onClose:()=>{o(!1),c(null)}})]})},eK=t(52368),eY=t(3765),eG=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,n.jsx)(l.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,n.jsx)(l.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,n.jsx)(l.Ugi,{mt:4,children:(0,n.jsx)(l.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},e$=t(58452);let eQ=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:r,onOpen:o,onClose:d}=(0,l.qY0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,n.jsx)(l.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,n.jsxs)(l.Ugi,{children:[(0,n.jsx)(l.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,n.jsx)(l.xvT,{children:t||s.data_use})}),(0,n.jsx)(l.LZC,{}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:o,"data-testid":"delete-btn",children:(0,n.jsx)(l.pJl,{})}),(0,n.jsx)(e$.Z,{isOpen:r,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,n.jsxs)(l.xvT,{children:["You are about to delete the data use declaration"," ",(0,n.jsx)(l.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,n.jsx)(l.izJ,{})]})},eJ=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,n.jsx)(l.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,n.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,n.jsxs)(l.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"xs",children:s}),(0,n.jsx)(l.LZC,{}),a||null]}),(0,n.jsx)(l.Kqy,{spacing:0,children:t}),(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},eX=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:r,allDataUses:o}=e,d=e=>{let s=o.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(ey.gU);return(0,n.jsx)(eJ,{heading:s,footerButton:c?null:(0,n.jsx)(l.wpx,{onClick:a,size:"small",icon:(0,n.jsx)(l.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,n.jsx)(eQ,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:r},e.id))})};var e0=t(95346),e1=t(54748),e2=t(28325),e4=t(30234);let e5=P.Ry().shape({data_categories:P.IX(P.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:P.Z_().required().label("Data use")}),e3={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},cookies:[],id:""},e6=e=>{var s;let t=e.cookies?e.cookies.map(e=>({name:e,path:"/"})):void 0;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0,cookies:t}},e8=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,cookies:r,values:o,includeCustomFields:d,privacyDeclarationId:c,lockedForGVL:u}=e,h=!!c,{legalBasisOptions:m}=(0,e1.Z)(),{specialCategoryLegalBasisOptions:x}=(0,e2.Z)(),g=(0,p.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsxs)(e4.Z,{heading:"Data use declaration",children:[(0,n.jsx)(eO.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:h||u,variant:"stacked"}),(0,n.jsx)(N.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:h||u}),(0,n.jsx)(N.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:u,layout:"stacked"}),(0,n.jsx)(N.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",disabled:u,layout:"stacked"}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(N.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:m,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:u}),(0,n.jsx)(l.UO1,{in:"Legitimate interests"===o.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked",disabled:u})})})]}),(0,n.jsx)(l.xuv,{mt:5,pl:4,children:(0,n.jsx)(eO.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:u})}),(0,n.jsx)(eO.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:u})]}),(0,n.jsx)(e4.Z,{heading:"Features",children:(0,n.jsx)(N.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:u,mode:"tags"})}),(0,n.jsx)(e4.Z,{heading:"Dataset reference",children:(0,n.jsx)(N.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:u})}),(0,n.jsx)(e4.Z,{heading:"Special category data",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:x,isRequired:o.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked",disabled:u})})})]})}),(0,n.jsx)(e4.Z,{heading:"Third parties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked",isDisabled:u}),(0,n.jsx)(l.UO1,{in:o.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsxs)(l.Kqy,{mt:4,spacing:4,children:[(0,n.jsx)(eO.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked",disabled:u}),(0,n.jsx)(N.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple",disabled:u})]})})]})}),(0,n.jsx)(e4.Z,{heading:"Cookies",children:(0,n.jsx)(N.d,{name:"cookies",label:"Cookies",options:r&&r.length?r.map(e=>({label:e.name,value:e.name})):[],mode:"tags",tooltip:"Which cookies are placed on consumer domains for this purpose?",layout:"stacked",disabled:u})}),d?(0,n.jsx)(e0.uc,{resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:c}):null]})},e9=(e,s)=>{if(e){let t=e.cookies&&e.cookies.length>0?e.cookies.map(e=>e.name):void 0;return{...e,customFieldValues:s||{},cookies:t}}return e3},e7=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e0.mZ)({resourceType:T.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e6(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,p.useMemo)(()=>e9(t,i),[t,i])}},se=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,r=null==a?void 0:a.id,{handleSubmit:o,initialValues:d}=e7({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:r}),c=(0,h.C)(ey.gU);return(0,n.jsx)(Z.J9,{enableReinitialize:!0,initialValues:d,onSubmit:o,validationSchema:e5,children:e=>{let{dirty:s,values:a}=e;return(0,n.jsxs)(Z.l0,{"data-testid":"declaration-form",children:[(0,n.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,n.jsxs)(l.Kqy,{spacing:4,children:[(0,n.jsx)(e8,{values:a,lockedForGVL:c,privacyDeclarationId:r,...i}),(0,n.jsxs)(l.kCb,{w:"100%",children:[(0,n.jsx)(l.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),c?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})]})}})},ss=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:r="privacy-declaration-modal",children:o}=e;return(0,n.jsxs)(l.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,n.jsx)(l.ZAr,{}),(0,n.jsxs)(l.hzk,{textAlign:"left",p:0,"data-testid":r,children:[(0,n.jsx)(l.xBx,{p:0,children:(0,n.jsx)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,n.jsx)(l.X6q,{as:"h3",size:"sm",children:a})})}),(0,n.jsx)(l.fef,{pb:4,children:o})]})]})};var st=e=>{let{system:s,addButtonProps:t,includeCustomFields:a,includeCookies:i,...r}=e,{isOpen:o,onClose:d,onOpen:c}=(0,l.qY0)(),[u,h]=(0,p.useState)(void 0),{createDataUse:m,updateDataUse:x,deleteDataUse:g}=(0,eY.Z)(s),y=[...s.privacy_declarations.filter(e=>void 0!==e.cookies).flatMap(e=>e.cookies)],f=s.cookies?s.cookies.filter(e=>0===y.filter(s=>s&&s.name===e.name).length):void 0,_=()=>{d(),h(void 0)},b=()=>{c(),h(void 0)},v=async e=>(_(),u)?x(u,e):m(e);return(0,p.useEffect)(()=>{d()},[d,s.fides_key]),(0,n.jsxs)(l.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,n.jsx)(eG,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:b}):(0,n.jsx)(eX,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:b,handleEdit:e=>{c(),h(e)},handleDelete:g,allDataUses:r.allDataUses}),f&&f.length>0?(0,n.jsx)(eJ,{heading:"Unassigned cookies",children:f.map(e=>(0,n.jsxs)(p.Fragment,{children:[(0,n.jsx)(l.xuv,{px:6,py:4,children:(0,n.jsx)(l.xvT,{children:e.name})}),(0,n.jsx)(l.izJ,{})]},e.name))}):null,(0,n.jsx)(ss,{isOpen:o,onClose:_,heading:"Configure data use",children:(0,n.jsx)(se,{initialValues:u,onSubmit:v,onCancel:_,includeCustomFields:a,...r})})]})},sa=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),r=a.allDataUses.filter(e=>e.active),o=a.allDataSubjects.filter(e=>e.active),c={...a,allDataCategories:i,allDataUses:r,allDataSubject:o,cookies:s.cookies};return(0,n.jsxs)(l.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,n.jsx)(l.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,n.jsxs)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,n.jsx)(l.rUS,{as:d(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,n.jsx)(l.$jN,{}):(0,n.jsx)(st,{system:s,includeCustomFields:!0,includeCookies:!0,...c})]})},si=t(812),sn=t(93237),sr=t(69525),sl=t(33335);let so={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:""},sd=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a}},sc=e=>{let s=e.fides_key?e.fides_key:(0,sl.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookies:e.cookies,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a};var su=t(36345);let sp=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sh=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sm=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sx=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,n.jsxs)(l.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sg=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:r=[]}=(0,W.K3)(),o=(0,h.T)(),d=(0,e0.mZ)({resourceType:T.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...c}=(0,eK.f)({includeDatasets:!0,includeDisabled:!1}),u=(0,p.useMemo)(()=>t?sd(t,d.customFieldValues):so,[t,d.customFieldValues]),[m]=(0,W.in)(),g=(0,p.useMemo)(()=>P.Ry().shape({name:P.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await m({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==u.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:P.Z_().min(1).url().nullable()}),[m,u.name]),y=(0,eR.hz)(),[f,_]=(0,W.f7)(),[b,v]=(0,W.qQ)();(0,O.Rd)(void 0,{skip:!y.dictionaryService});let[j]=(0,O.qz)(),k=(0,h.C)(O.o),w=(0,h.C)(ey.gU),C=(0,p.useMemo)(()=>!!(t&&(null==r?void 0:r.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,r]),S=(0,p.useMemo)(()=>c.allDatasets?c.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[c.allDatasets]),D=(0,l.pmc)(),A=async(e,t)=>{let a,i;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await j({vendor_id:e.vendor_id});s.isError?(0,si.fn)(s.error)&&404===s.error.status||D({status:"error",description:(0,si.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.")}):s.data&&s.data.items.length>0&&(a=s.data.items.map(e=>{var s;return{...(0,sr.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let n=sc({...e,privacy_declarations:null!=a?a:e.privacy_declarations});i=C?await b(n):await f(n),await d.upsertCustomFields(e),(0,si.D4)(i)?D({status:"error",description:(0,si.e$)(i.error,"An unexpected error occurred while ".concat(C?"editing":"creating"," the system. Please try again."))}):(D.closeAll(),t.resetForm({values:e}),s(i.data),o((0,ey.b3)("initial")))},I=e=>{if(y.dictionaryService){if(!e){o((0,ey.b3)("hiding")),o((0,ey.gQ)(!1));return}o((0,ey.b3)("showing")),y.tcf&&(0,si.cj)(e)===si.c6.GVL?o((0,ey.gQ)(!0)):o((0,ey.gQ)(!1))}},E=v.isLoading||_.isLoading||d.isLoading;return(0,n.jsx)(Z.J9,{initialValues:u,enableReinitialize:!0,onSubmit:A,validationSchema:g,children:e=>{let{dirty:s,values:r,isValid:o}=e;return(0,n.jsxs)(Z.l0,{children:[(0,n.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,n.jsxs)(l.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,n.jsx)(sx,{system:t}):null,(0,n.jsx)(l.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,n.jsx)(sx,{system:t}):null,(0,n.jsxs)(e4.Z,{heading:"System details",children:[y.dictionaryService?(0,n.jsx)(su.Z,{label:"System name",options:k,onVendorSelected:I,isCreate:!t,lockedForGVL:w}):(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,n.jsx)(eO.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,n.jsx)(sn.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?",disabled:w}),(0,n.jsx)(N.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:u.tags?u.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?",disabled:w})]}),(0,n.jsx)(e4.Z,{heading:"Dataset reference",children:(0,n.jsx)(N.d,{name:"dataset_references",label:"Dataset references",options:S,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked",disabled:w})}),(0,n.jsx)(e4.Z,{heading:"Data processing properties",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(l.xuv,{mb:4,children:(0,n.jsx)(sn.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:w})}),(0,n.jsx)(l.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!r.processes_personal_data||w}),(0,n.jsx)(l.UO1,{in:r.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:r.exempt_from_privacy_regulations,disabled:w})})})]})}),(0,n.jsx)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,n.jsxs)(l.Kqy,{spacing:4,mt:4,children:[(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sp,tooltip:"What is the legal basis under which profiling is performed?",disabled:w,isRequired:r.uses_profiling})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(sn.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:w}),(0,n.jsx)(l.UO1,{in:r.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sh,tooltip:"What is the legal basis under which the data is transferred?",isRequired:r.does_international_transfers,disabled:w})})})]}),(0,n.jsxs)(l.Kqy,{spacing:0,children:[(0,n.jsx)(eO.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:w}),(0,n.jsx)(l.UO1,{in:r.requires_data_protection_assessments,animateOpacity:!0,children:(0,n.jsx)(l.xuv,{mt:4,children:(0,n.jsx)(eO.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:w,isRequired:r.requires_data_protection_assessments})})})]})]})})]})}),(0,n.jsxs)(l.UO1,{in:r.processes_personal_data&&!r.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,n.jsxs)(e4.Z,{heading:"Cookie properties",children:[(0,n.jsx)(sn.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:w}),(0,n.jsx)(sn.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:w}),(0,n.jsx)(sn.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:w}),(0,n.jsx)(sn.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:w})]}),(0,n.jsxs)(e4.Z,{heading:"Administrative properties",children:[(0,n.jsx)(eO.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,n.jsx)(sn.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:w}),(0,n.jsx)(sn.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?",disabled:w}),(0,n.jsx)(sn.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?",disabled:w}),(0,n.jsx)(eO.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(N.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sm,tooltip:"What is the role of the business with regard to data processing?",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(sn.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:w}),(0,n.jsx)(eO.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!r.processes_personal_data||r.exempt_from_privacy_regulations||w}),(0,n.jsx)(sn.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?",disabled:w}),(0,n.jsx)(sn.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:w}),(0,n.jsx)(sn.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),r.fides_key?(0,n.jsx)(e0.uc,{resourceType:T.P6.SYSTEM,resourceFidesKey:r.fides_key}):null]})]}),(0,n.jsx)(l.xuv,{mt:6,children:(0,n.jsx)(l.wpx,{htmlType:"submit",type:"primary",disabled:E||!s||!o,loading:E,"data-testid":"save-btn",children:"Save"})}),i]})}})},sy=t(59003),sf=t(92222),s_=t(14481),sb=t(57454);let{useGetSystemAssetsQuery:sv,useAddSystemAssetMutation:sj,useUpdateSystemAssetsMutation:sk,useDeleteSystemAssetsMutation:sw}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,v.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]})})});var sC=t(90111),sS=t(8133),sD=t(70682),sT=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[r,o,{setValue:d,setTouched:c}]=(0,Z.U$)(s),u=!!(o.touched&&o.error);return(0,n.jsx)(l.NIc,{isInvalid:u,isRequired:!0,children:(0,n.jsxs)(l.jqI,{vertical:!0,children:[(0,n.jsxs)(l.jqI,{align:"center",children:[t&&(0,n.jsx)(eO.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,n.jsx)(eW.Z,{label:i})]}),(0,n.jsx)(sD.Z,{...r,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,n.jsx)(eO.Bc,{isInvalid:u,message:o.error,fieldName:s})]})})};(a=i||(i={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sA=P.Ry().shape({name:P.Z_().required("Enter a name for this asset"),domain:P.Z_().required("Enter a valid domain for this asset"),asset_type:P.Z_().required("Select an asset type"),data_uses:P.IX().min(1,"Select at least one category of consent"),base_url:P.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sI={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sE=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:r,...o}=e,d=!r,[c,{isLoading:u}]=sj(),[p,{isLoading:h}]=sk(),m=(0,l.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,si.D4)(s)){let e=(0,si.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");m((0,f.Vo)(e))}else m((0,f.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,si.D4)(s)){let e=(0,si.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");m((0,f.Vo)(e))}else m((0,f.t5)("Asset updated successfully")),t()};return(0,n.jsx)(sS.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...o,children:(0,n.jsx)(Z.J9,{initialValues:null!=r?r:sI,onSubmit:e=>{d?x(e):g(e)},validationSchema:sA,children:e=>{let{values:s,isValid:a,dirty:r}=e;return(0,n.jsxs)(Z.l0,{children:[(0,n.jsxs)(l.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,n.jsx)(sC.Z,{children:(0,n.jsx)(l.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,n.jsxs)(l.jqI,{vertical:!0,gap:20,children:[(0,n.jsx)(eO.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(N.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,si.MM)(i),layout:"stacked",disabled:!d}),(0,n.jsx)(sT,{name:"data_uses",label:"Categories of consent",layout:"stacked"}),(0,n.jsx)(eO.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,n.jsx)(eO.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,n.jsx)(l.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,n.jsx)(eO.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,n.jsxs)(l.jqI,{justify:"space-between",children:[(0,n.jsx)(l.wpx,{onClick:t,children:"Cancel"}),(0,n.jsx)(l.wpx,{type:"primary",htmlType:"submit",loading:u||h,disabled:!a||!r,"data-testid":"save-btn",children:"Save"})]})]})}})})},sq=t(8411),sz=t(72625),sR=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:r}]=sw(),o=(0,l.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,l.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,em.D4)(e)?o((0,f.Vo)((0,si.e$)(e.error,"A problem occurred removing this asset. Please try again"))):o((0,f.t5)("Asset removed successfully"))};return(0,n.jsxs)(l.jqI,{className:"gap-1",children:[(0,n.jsx)(l.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,n.jsx)(l.wpx,{size:"small",onClick:u,loading:r,"data-testid":"remove-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]})},sF=t(34929),sL=e=>{var s;let{values:t}=e,{getDataUseDisplayName:a}=(0,sF.Z)(),i=null!==(s=null==t?void 0:t.map(e=>({label:a(e),key:e})))&&void 0!==s?s:[];return(0,n.jsx)(sz.mb,{values:i})},sO=e=>{let{systemKey:s,onEditClick:t}=e,a=(0,sf.Cl)();return[a.display({id:"select",cell:e=>{let{row:s}=e;return(0,n.jsx)(sz.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,n.jsx)(sz.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),a.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Asset"}),a.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Type"}),a.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,n.jsx)(sL,{values:e.getValue()}),header:"Categories of consent"}),a.accessor(e=>e.locations,{id:"locations",cell:e=>(0,n.jsx)(sz.mb,{values:e.getValue().map(e=>({label:sq.Z8[e],key:e}))}),header:"Locations",meta:{width:"auto"}}),a.accessor(e=>e.domain,{id:"domain",cell:e=>(0,n.jsx)(s_.G3,{value:e.getValue()}),header:"Domain"}),a.accessor(e=>e.page,{id:"page",cell:e=>(0,n.jsx)(sz.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,n.jsx)(sz.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),a.display({id:"actions",cell:e=>{let{row:a}=e;return(0,n.jsx)(sR,{asset:a.original,systemKey:s,onEditClick:()=>t(a.original)})},header:"Actions"})]},sW=e=>{let{system:s}=e,{PAGE_SIZES:t,pageSize:a,setPageSize:i,onPreviousPageClick:r,isPreviousPageDisabled:o,onNextPageClick:d,isNextPageDisabled:c,startRange:u,endRange:h,pageIndex:m,setTotalPages:x,resetPageIndexToDefault:g}=(0,s_.oi)(),[y,_]=(0,p.useState)(""),[b,v]=(0,p.useState)(void 0),[j,k]=(0,p.useState)({}),[w]=sw(),C=(0,l.pmc)(),{data:S,isLoading:D,isFetching:T}=sv({fides_key:s.fides_key,search:y,page:m,size:a}),{isOpen:A,onClose:I,onOpen:E}=(0,l.qY0)(),{isOpen:q,onClose:z,onOpen:R}=(0,l.qY0)();(0,p.useEffect)(()=>{g()},[y,g]),(0,p.useEffect)(()=>{x(null==S?void 0:S.pages)},[S,x]);let F=sO({systemKey:s.fides_key,onEditClick:e=>{v(e),E()}}),L=(0,sy.b7)({getCoreRowModel:(0,sf.sC)(),columns:F,manualPagination:!0,data:(null==S?void 0:S.items)||[],columnResizeMode:"onChange",onRowSelectionChange:k,state:{rowSelection:j}}),O=L.getSelectedRowModel().rows.map(e=>e.original.id),W=async()=>{let e=await w({systemKey:s.fides_key,asset_ids:O});(0,em.D4)(e)?C((0,f.Vo)((0,si.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(L.resetRowSelection(),C((0,f.t5)("Assets removed successfully"))),z()};return s?D?(0,n.jsx)(s_.I4,{rowHeight:36,numRows:36}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s_.Q$,{children:[(0,n.jsx)(sb.M,{value:y,onChange:_}),(0,n.jsx)(l.LZC,{}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.mm_,{}),iconPosition:"end",onClick:E,"data-testid":"add-asset-btn",children:"Add asset"}),(0,n.jsx)(sE,{isOpen:A,onClose:()=>{v(void 0),I()},systemKey:s.fides_key,asset:b}),(0,n.jsx)(l.wpx,{icon:(0,n.jsx)(l.PJP.ZNm,{}),iconPosition:"end",onClick:R,disabled:!O.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,n.jsx)(l.cVQ,{isOpen:q,onClose:z,onConfirm:W,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact consent automation.",isCentered:!0})]}),(0,n.jsx)(s_.ZK,{tableInstance:L,emptyTableNotice:(0,n.jsx)(l.oj8,{image:l.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,n.jsx)(s_.s8,{totalRows:(null==S?void 0:S.total)||0,pageSizes:t,setPageSize:i,onPreviousPageClick:r,isPreviousPageDisabled:o||T,onNextPageClick:d,isNextPageDisabled:c||T,startRange:u,endRange:h})]}):null};let sZ={INFORMATION:{index:0,hash:"#information"},DATA_USES:{index:1,hash:"#data-uses"},DATA_FLOW:{index:2,hash:"#data-flow"},INTEGRATIONS:{index:3,hash:"#integrations"},ASSETS:{index:4,hash:"#assets"},HISTORY:{index:5,hash:"#history"}},sP=e=>{let s=e.startsWith("#")?e:"#".concat(e);return Object.values(sZ).find(e=>e.hash===s)},sN=e=>Object.values(sZ).find(s=>s.index===e),sU=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,n.jsxs)(l.xuv,{children:[(0,n.jsx)(l.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,n.jsxs)(l.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,n.jsx)(_.Z,{onClick:s,children:"view it now"})," and come back to finish this setup when you’re ready. Or you can progress to"," ",(0,n.jsx)(_.Z,{onClick:t,children:"adding your privacy declarations in the next tab"}),"."]})]})};var sV=e=>{var s,t;let{isCreate:a}=e,i=(0,c.useRouter)(),[o,u]=(0,p.useState)((()=>{var e,s;let t=i.asPath.split("#")[1];return t&&null!==(s=null===(e=sP(t))||void 0===e?void 0:e.index)&&void 0!==s?s:sZ.INFORMATION.index})()),[_,b]=(0,p.useState)(!1),{systemOrDatamapRoute:v}=(0,g.V)(),j=(0,l.pmc)(),k=(0,h.T)(),w=(0,h.C)(W.NC),[C,S]=(0,p.useState)(void 0),{plus:D}=(0,m.hz)(),{flags:{dataDiscoveryAndDetection:T,webMonitor:A}}=(0,m.Vb)(),{plus:I}=(0,m.hz)(),{data:E}=(0,W.rn)(null==w?void 0:w.fides_key,{skip:!w});(0,p.useEffect)(()=>{k((0,W.db)(E))},[E,k]),(0,p.useEffect)(()=>{w&&S(w.processes_personal_data)},[w]);let q=(0,p.useCallback)(e=>{void 0===w&&b(!0),k((0,W.db)(e)),i.push({pathname:y.Dv,query:{id:e.fides_key}});let s={...f.MA,description:(0,n.jsx)(sU,{onViewDatamap:()=>{i.push(v).then(()=>{j.closeAll()})},onAddPrivacyDeclaration:()=>{u(1),j.closeAll()}})};j({...s})},[w,k,i,v,j]);(0,p.useEffect)(()=>(a&&(k((0,W.db)(void 0)),k((0,ey.b3)("initial")),k((0,ey.gQ)(!1))),()=>{k((0,W.db)(void 0))}),[k,a]);let{attemptAction:z}=(0,x.oI)(),R=(0,p.useCallback)(e=>{z().then(async s=>{if(s){let{status:s}=i.query;if(s&&("succeeded"===s?j((0,f.t5)("Integration successfully authorized.")):j((0,f.Vo)("Failed to authorize integration."))),u(e),i.isReady){let s=sN(e);if(s){let e={...i.query};delete e.status,await i.replace({pathname:i.pathname,query:e,hash:s.hash},void 0,{shallow:!0})}}}})},[z,i,j]);(0,p.useEffect)(()=>{let{status:e}=i.query;e&&R(sZ.INTEGRATIONS.index)},[i.query,R]);let F=[{label:"Information",content:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.xuv,{px:6,mb:9,children:[(0,n.jsx)(x.eB,{}),(0,n.jsx)(sg,{onSuccess:q,system:w})]}),_?(0,n.jsx)(l.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,n.jsxs)(l.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,n.jsx)(l.rUS,{as:d(),href:v,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",content:w?(0,n.jsx)(l.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,n.jsx)(sa,{system:w})}):null,isDisabled:!w||!C},{label:"Data flow",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsxs)(l.xuv,{px:6,paddingBottom:2,children:[(0,n.jsx)(l.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,n.jsx)(r.q,{system:w,isSystemTab:!0})]}):null,isDisabled:!w},{label:"Integrations",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:2,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,children:I&&T?(0,n.jsxs)(n.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,n.jsx)(l.rUS,{href:y.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,n.jsx)(ep,{connectionConfig:w.connection_configs,systemFidesKey:w.fides_key}),(null===(s=w.connection_configs)||void 0===s?void 0:s.key)&&(0,n.jsx)(eg,{m:6,connectionKey:null===(t=w.connection_configs)||void 0===t?void 0:t.key})]}):null,isDisabled:!w}];return D&&A&&F.push({label:"Assets",content:w?(0,n.jsx)(sW,{system:w}):null,isDisabled:!w}),D&&F.push({label:"History",content:w?(0,n.jsxs)(l.xuv,{width:{base:"100%",lg:"70%"},children:[(0,n.jsx)(l.xuv,{px:6,paddingBottom:6,children:(0,n.jsx)(l.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,n.jsx)(eH,{system:w})]}):null,isDisabled:!w}),{tabData:F,tabIndex:o,onTabChange:R}}},54748:function(e,s,t){var a=t(27378),i=t(21702);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){var a=t(27378),i=t(21702);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3967],{6446:function(n){n.exports=function(n,t,u,r){var e=-1,f=null==n?0:n.length;for(r&&f&&(u=n[++e]);++e<f;)u=t(u,n[e],e,n);return u}},40585:function(n){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;n.exports=function(n){return n.match(t)||[]}},52033:function(n,t,u){var r=u(26194),e=u(26789)(r);n.exports=e},95372:function(n){n.exports=function(n,t,u,r){for(var e=n.length,f=u+(r?1:-1);r?f--:++f<e;)if(t(n[f],f,n))return f;return -1}},49819:function(n,t,u){var r=u(18911)();n.exports=r},26194:function(n,t,u){var r=u(49819),e=u(50098);n.exports=function(n,t){return n&&r(n,t,e)}},67375:function(n,t,u){var r=u(52033),e=u(80068);n.exports=function(n,t){var u=-1,f=e(n)?Array(n.length):[];return r(n,function(n,r,e){f[++u]=t(n,r,e)}),f}},17646:function(n){n.exports=function(n){return function(t){return null==n?void 0:n[t]}}},74833:function(n,t,u){var r=u(56127),e=/^\s+/;n.exports=function(n){return n?n.slice(0,r(n)+1).replace(e,""):n}},26789:function(n,t,u){var r=u(80068);n.exports=function(n,t){return function(u,e){if(null==u)return u;if(!r(u))return n(u,e);for(var f=u.length,o=t?f:-1,i=Object(u);(t?o--:++o<f)&&!1!==e(i[o],o,i););return u}}},18911:function(n){n.exports=function(n){return function(t,u,r){for(var e=-1,f=Object(t),o=r(t),i=o.length;i--;){var a=o[n?i:++e];if(!1===u(f[a],a,f))break}return t}}},68267:function(n,t,u){var r=u(6446),e=u(69689),f=u(93254),o=RegExp("['’]","g");n.exports=function(n){return function(t){return r(f(e(t).replace(o,"")),n,"")}}},56632:function(n,t,u){var r=u(89278),e=u(80068),f=u(50098);n.exports=function(n){return function(t,u,o){var i=Object(t);if(!e(t)){var a=r(u,3);t=f(t),u=function(n){return a(i[n],n,i)}}var c=n(t,u,o);return c>-1?i[a?t[c]:c]:void 0}}},4248:function(n,t,u){var r=u(17646)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});n.exports=r},73909:function(n){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;n.exports=function(n){return t.test(n)}},56127:function(n){var t=/\s/;n.exports=function(n){for(var u=n.length;u--&&t.test(n.charAt(u)););return u}},97025:function(n){var t="\ud800-\udfff",u="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",e="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="['’]",i="["+f+"]",a="["+r+"]",c="[^"+t+f+"\\d+"+u+r+e+"]",x="(?:\ud83c[\udde6-\uddff]){2}",v="[\ud800-\udbff][\udc00-\udfff]",s="["+e+"]",d="(?:"+a+"|"+c+")",p="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",l="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",g="[\\ufe0e\\ufe0f]?",b="(?:\\u200d(?:"+["[^"+t+"]",x,v].join("|")+")"+g+h+")*",A="(?:"+["["+u+"]",x,v].join("|")+")"+(g+h+b),E=RegExp([s+"?"+a+"+"+p+"(?="+[i,s,"$"].join("|")+")","(?:"+s+"|"+c+")+"+l+"(?="+[i,s+d,"$"].join("|")+")",s+"?"+d+"+"+p,s+"+"+l,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",A].join("|"),"g");n.exports=function(n){return n.match(E)||[]}},66726:function(n,t,u){var r=u(11611),e=u(82846),f=u(91936),o=Math.max,i=Math.min;n.exports=function(n,t,u){var a,c,x,v,s,d,p=0,l=!1,h=!1,g=!0;if("function"!=typeof n)throw TypeError("Expected a function");function b(t){var u=a,r=c;return a=c=void 0,p=t,v=n.apply(r,u)}function A(n){var u=n-d,r=n-p;return void 0===d||u>=t||u<0||h&&r>=x}function E(){var n,u,r,f=e();if(A(f))return m(f);s=setTimeout(E,(n=f-d,u=f-p,r=t-n,h?i(r,x-u):r))}function m(n){return(s=void 0,g&&a)?b(n):(a=c=void 0,v)}function O(){var n,u=e(),r=A(u);if(a=arguments,c=this,d=u,r){if(void 0===s)return p=n=d,s=setTimeout(E,t),l?b(n):v;if(h)return clearTimeout(s),s=setTimeout(E,t),b(d)}return void 0===s&&(s=setTimeout(E,t)),v}return t=f(t)||0,r(u)&&(l=!!u.leading,x=(h="maxWait"in u)?o(f(u.maxWait)||0,t):x,g="trailing"in u?!!u.trailing:g),O.cancel=function(){void 0!==s&&clearTimeout(s),p=0,a=d=c=s=void 0},O.flush=function(){return void 0===s?v:m(e())},O}},69689:function(n,t,u){var r=u(4248),e=u(65567),f=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");n.exports=function(n){return(n=e(n))&&n.replace(f,r).replace(o,"")}},64925:function(n,t,u){var r=u(56632)(u(66259));n.exports=r},66259:function(n,t,u){var r=u(95372),e=u(89278),f=u(47991),o=Math.max;n.exports=function(n,t,u){var i=null==n?0:n.length;if(!i)return -1;var a=null==u?0:f(u);return a<0&&(a=o(i+a,0)),r(n,e(t,3),a)}},55807:function(n,t,u){var r=u(66070),e=u(89278),f=u(67375),o=u(19785);n.exports=function(n,t){return(o(n)?r:f)(n,e(t,3))}},82846:function(n,t,u){var r=u(77400);n.exports=function(){return r.Date.now()}},32526:function(n,t,u){var r=u(68267)(function(n,t,u){return n+(u?"_":"")+t.toLowerCase()});n.exports=r},94919:function(n,t,u){var r=u(91936),e=1/0;n.exports=function(n){return n?(n=r(n))===e||n===-e?(n<0?-1:1)*17976931348623157e292:n==n?n:0:0===n?n:0}},47991:function(n,t,u){var r=u(94919);n.exports=function(n){var t=r(n),u=t%1;return t==t?u?t-u:t:0}},91936:function(n,t,u){var r=u(74833),e=u(11611),f=u(55193),o=0/0,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,x=parseInt;n.exports=function(n){if("number"==typeof n)return n;if(f(n))return o;if(e(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=e(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=r(n);var u=a.test(n);return u||c.test(n)?x(n.slice(2),u?2:8):i.test(n)?o:+n}},93254:function(n,t,u){var r=u(40585),e=u(73909),f=u(65567),o=u(97025);n.exports=function(n,t,u){return(n=f(n),void 0===(t=u?void 0:t))?e(n)?o(n):r(n):n.match(t)||[]}}}]);
|
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1016],{11265:function(e,t,n){n.d(t,{Aq:function(){return tR},HH:function(){return eE},Jd:function(){return e7},T7:function(){return r},ZX:function(){return tZ},_K:function(){return eo},a9:function(){return tY},tV:function(){return tC},x$:function(){return tN}});var o,r,i=n(24246),a=n(7008),l=n(46080),s=n(27378),d=n(22353),c=n(4157);n(31542);let u=(0,s.createContext)(null),g=u.Provider,f=l.Qj.error001();function p(e,t){let n=(0,s.useContext)(u);if(null===n)throw Error(f);return(0,d.s)(n,e,t)}function m(){let e=(0,s.useContext)(u);if(null===e)throw Error(f);return(0,s.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}let h={display:"none"},y={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},v="react-flow__node-desc",w="react-flow__edge-desc",x=e=>e.ariaLiveMessage;function b({rfId:e}){let t=p(x);return(0,i.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:y,children:t})}function S({rfId:e,disableKeyboardA11y:t}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{id:`${v}-${e}`,style:h,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),(0,i.jsx)("div",{id:`${w}-${e}`,style:h,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&(0,i.jsx)(b,{rfId:e})]})}let C=e=>e.userSelectionActive?"none":"all";function E({position:e="top-left",children:t,className:n,style:o,...r}){let l=p(C),s=`${e}`.split("-");return(0,i.jsx)("div",{className:(0,a.Z)(["react-flow__panel",n,...s]),style:{...o,pointerEvents:l},...r,children:t})}function k({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,i.jsx)(E,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,i.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}let N=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},M=e=>e.id;function j(e,t){return(0,c.X)(e.selectedNodes.map(M),t.selectedNodes.map(M))&&(0,c.X)(e.selectedEdges.map(M),t.selectedEdges.map(M))}function P({onSelectionChange:e}){let t=m(),{selectedNodes:n,selectedEdges:o}=p(N,j);return(0,s.useEffect)(()=>{let r={nodes:n,edges:o};e?.(r),t.getState().onSelectionChangeHandlers.forEach(e=>e(r))},[n,o,e]),null}let _=e=>!!e.onSelectionChangeHandlers;function D({onSelectionChange:e}){let t=p(_);return e||t?(0,i.jsx)(P,{onSelectionChange:e}):null}let R=[0,0],I={x:0,y:0,zoom:1},O=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","rfId"],A=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),L={translateExtent:l.k5,nodeOrigin:R,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function $(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:d,setPaneClickDistance:u}=p(A,c.X),g=m();(0,s.useEffect)(()=>(d(e.defaultNodes,e.defaultEdges),()=>{f.current=L,l()}),[]);let f=(0,s.useRef)(L);return(0,s.useEffect)(()=>{for(let l of O){let s=e[l];s!==f.current[l]&&void 0!==e[l]&&("nodes"===l?t(s):"edges"===l?n(s):"minZoom"===l?o(s):"maxZoom"===l?r(s):"translateExtent"===l?i(s):"nodeExtent"===l?a(s):"paneClickDistance"===l?u(s):"fitView"===l?g.setState({fitViewOnInit:s}):"fitViewOptions"===l?g.setState({fitViewOnInitOptions:s}):g.setState({[l]:s}))}f.current=e},O.map(t=>e[t])),null}function z(){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}let B="undefined"!=typeof document?document:null;function V(e=null,t={target:B,actInsideInputWithModifier:!0}){let[n,o]=(0,s.useState)(!1),r=(0,s.useRef)(!1),i=(0,s.useRef)(new Set([])),[a,d]=(0,s.useMemo)(()=>{if(null!==e){let t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.split("+")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,s.useEffect)(()=>{let n=t?.target||B;if(null!==e){let e=e=>{if(r.current=e.ctrlKey||e.metaKey||e.shiftKey,(!r.current||r.current&&!t.actInsideInputWithModifier)&&(0,l.s$)(e))return!1;let n=H(e.code,d);i.current.add(e[n]),Z(a,i.current,!1)&&(e.preventDefault(),o(!0))},s=e=>{if((!r.current||r.current&&!t.actInsideInputWithModifier)&&(0,l.s$)(e))return!1;let n=H(e.code,d);Z(a,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),r.current=!1},c=()=>{i.current.clear(),o(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",s),window.addEventListener("blur",c),window.addEventListener("contextmenu",c),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",s),window.removeEventListener("blur",c),window.removeEventListener("contextmenu",c)}}},[e,o]),n}function Z(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function H(e,t){return t.includes(e)?"code":"key"}let F=()=>{let e=m();return(0,s.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,r,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},fitView:t=>{let{nodeLookup:n,minZoom:o,maxZoom:r,panZoom:i,domNode:a}=e.getState();if(!i||!a)return Promise.resolve(!1);let s=(0,l.J6)(n,t),{width:d,height:c}=(0,l.t_)(a);return(0,l.Qu)({nodes:s,width:d,height:c,minZoom:o,maxZoom:r,panZoom:i},t)},setCenter:async(t,n,o)=>{let{width:r,height:i,maxZoom:a,panZoom:l}=e.getState(),s=void 0!==o?.zoom?o.zoom:a;return l?(await l.setViewport({x:r/2-t*s,y:i/2-n*s,zoom:s},{duration:o?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{let{width:o,height:r,minZoom:i,maxZoom:a,panZoom:s}=e.getState(),d=(0,l.$i)(t,o,r,i,a,n?.padding??.1);return s?(await s.setViewport(d,{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={snapToGrid:!0})=>{let{transform:o,snapGrid:r,domNode:i}=e.getState();if(!i)return t;let{x:a,y:s}=i.getBoundingClientRect(),d={x:t.x-a,y:t.y-s};return(0,l.m)(d,o,n.snapToGrid,r)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:r,y:i}=o.getBoundingClientRect(),a=(0,l.oj)(t,n);return{x:a.x+r,y:a.y+i}}}),[])};function X(e,t){let n=[],o=new Map,r=[];for(let t of e){if("add"===t.type){r.push(t);continue}if("remove"===t.type||"replace"===t.type)o.set(t.id,[t]);else{let e=o.get(t.id);e?e.push(t):o.set(t.id,[t])}}for(let e of t){let t=o.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}let r={...e};for(let e of t)!function(e,t){switch(e.type){case"select":t.selected=e.selected;break;case"position":void 0!==e.position&&(t.position=e.position),void 0!==e.dragging&&(t.dragging=e.dragging);break;case"dimensions":void 0!==e.dimensions&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),"boolean"==typeof e.resizing&&(t.resizing=e.resizing)}}(e,r);n.push(r)}return r.length&&r.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function T(e,t){return{id:e,type:"select",selected:t}}function W(e,t=new Set,n=!1){let o=[];for(let[r,i]of e){let e=t.has(r);(void 0!==i.selected||e)&&i.selected!==e&&(n&&(i.selected=e),o.push(T(i.id,e)))}return o}function K({items:e=[],lookup:t}){let n=[],o=new Map(e.map(e=>[e.id,e]));for(let[o,r]of e.entries()){let e=t.get(r.id),i=e?.internals?.userNode??e;void 0!==i&&i!==r&&n.push({id:r.id,item:r,type:"replace"}),void 0===i&&n.push({item:r,type:"add",index:o})}for(let[e]of t)void 0===o.get(e)&&n.push({id:e,type:"remove"});return n}function Q(e){return{id:e.id,type:"remove"}}let Y=e=>(0,l.Vt)(e),U=e=>(0,l.J3)(e);function G(e){return(0,s.forwardRef)(e)}let J="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function q(e){let[t,n]=(0,s.useState)(!1),[o]=(0,s.useState)(()=>{var e;let t;return e=()=>n(!0),t=[],{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}});return J(()=>{if(!t){o.reset();return}let r=o.get();r.length&&(e(r),o.reset()),n(!1)},[t]),o}let ee=(0,s.createContext)(null);function et({children:e}){let t=m(),n=q((0,s.useCallback)(e=>{let{nodes:n=[],setNodes:o,hasDefaultNodes:r,onNodesChange:i,nodeLookup:a}=t.getState(),l=n;for(let t of e)l="function"==typeof t?t(l):t;r?o(l):i&&i(K({items:l,lookup:a}))},[])),o=q((0,s.useCallback)(e=>{let{edges:n=[],setEdges:o,hasDefaultEdges:r,onEdgesChange:i,edgeLookup:a}=t.getState(),l=n;for(let t of e)l="function"==typeof t?t(l):t;r?o(l):i&&i(K({items:l,lookup:a}))},[])),r=(0,s.useMemo)(()=>({nodeQueue:n,edgeQueue:o}),[]);return(0,i.jsx)(ee.Provider,{value:r,children:e})}let en=e=>!!e.panZoom;function eo(){let e=F(),t=m(),n=function(){let e=(0,s.useContext)(ee);if(!e)throw Error("useBatchContext must be used within a BatchProvider");return e}(),o=p(en),r=(0,s.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),o=e=>{n.nodeQueue.push(e)},r=e=>{n.edgeQueue.push(e)},i=e=>{let{nodeLookup:n,nodeOrigin:o}=t.getState(),r=Y(e)?e:n.get(e.id),i=r.parentId?(0,l.ZB)(r.position,r.measured,r.parentId,n,o):r.position,a={id:r.id,position:i,width:r.measured?.width??r.width,height:r.measured?.height??r.height,data:r.data};return(0,l.PS)(a)},a=(e,t,n={replace:!1})=>{o(o=>o.map(o=>{if(o.id===e){let e="function"==typeof t?t(o):t;return n.replace&&Y(e)?e:{...o,...e}}return o}))},s=(e,t,n={replace:!1})=>{r(o=>o.map(o=>{if(o.id===e){let e="function"==typeof t?t(o):t;return n.replace&&U(e)?e:{...o,...e}}return o}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:o,setEdges:r,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:o}=t.getState(),[r,i,a]=o;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:r,y:i,zoom:a}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:o,edges:r,onNodesDelete:i,onEdgesDelete:a,triggerNodeChanges:s,triggerEdgeChanges:d,onDelete:c,onBeforeDelete:u}=t.getState(),{nodes:g,edges:f}=await (0,l.WD)({nodesToRemove:e,edgesToRemove:n,nodes:o,edges:r,onBeforeDelete:u}),p=f.length>0,m=g.length>0;if(p){let e=f.map(Q);a?.(f),d(e)}if(m){let e=g.map(Q);i?.(g),s(e)}return(m||p)&&c?.({nodes:g,edges:f}),{deletedNodes:g,deletedEdges:f}},getIntersectingNodes:(e,n=!0,o)=>{let r=(0,l.J$)(e),a=r?e:i(e),s=void 0!==o;return a?(o||t.getState().nodes).filter(o=>{let i=t.getState().nodeLookup.get(o.id);if(i&&!r&&(o.id===e.id||!i.internals.positionAbsolute))return!1;let d=(0,l.PS)(s?o:i),c=(0,l.lp)(d,a);return n&&c>0||c>=a.width*a.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let o=(0,l.J$)(e)?e:i(e);if(!o)return!1;let r=(0,l.lp)(o,t);return n&&r>0||r>=o.width*o.height},updateNode:a,updateNodeData:(e,t,n={replace:!1})=>{a(e,e=>{let o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:o}=t.getState();return(0,l.RX)(e,{nodeLookup:n,nodeOrigin:o})},getHandleConnections:({type:e,id:n,nodeId:o})=>Array.from(t.getState().connectionLookup.get(`${o}-${e}-${n??null}`)?.values()??[])}},[]);return(0,s.useMemo)(()=>({...r,...e,viewportInitialized:o}),[o])}let er=e=>e.selected,ei={actInsideInputWithModifier:!1},ea="undefined"!=typeof window?window:void 0,el={position:"absolute",width:"100%",height:"100%",top:0,left:0},es=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function ed({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:a=l.IY.Free,zoomOnDoubleClick:d=!0,panOnDrag:u=!0,defaultViewport:g,translateExtent:f,minZoom:h,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:w=!0,children:x,noWheelClassName:b,noPanClassName:S,onViewportChange:C,isControlledViewport:E,paneClickDistance:k}){let N=m(),M=(0,s.useRef)(null),{userSelectionActive:j,lib:P}=p(es,c.X),_=V(v),D=(0,s.useRef)();!function(e){let t=m();(0,s.useEffect)(()=>{let n=()=>{if(!e.current)return!1;let n=(0,l.t_)(e.current);(0===n.height||0===n.width)&&t.getState().onError?.("004",l.Qj.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener("resize",n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener("resize",n),t&&e.current&&t.unobserve(e.current)}}},[])}(M);let R=(0,s.useCallback)(e=>{C?.({x:e[0],y:e[1],zoom:e[2]}),E||N.setState({transform:e})},[C,E]);return(0,s.useEffect)(()=>{if(M.current){D.current=(0,l.X6)({domNode:M.current,minZoom:h,maxZoom:y,translateExtent:f,viewport:g,paneClickDistance:k,onDraggingChange:e=>N.setState({paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:o}=N.getState();o?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:o}=N.getState();o?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:o}=N.getState();o?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=D.current.getViewport();return N.setState({panZoom:D.current,transform:[e,t,n],domNode:M.current.closest(".react-flow")}),()=>{D.current?.destroy()}}},[]),(0,s.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:a,zoomOnDoubleClick:d,panOnDrag:u,zoomActivationKeyPressed:_,preventScrolling:w,noPanClassName:S,userSelectionActive:j,noWheelClassName:b,lib:P,onTransformChange:R})},[e,t,n,o,r,a,d,u,_,w,S,j,b,P,R]),(0,i.jsx)("div",{className:"react-flow__renderer",ref:M,style:el,children:x})}let ec=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function eu(){let{userSelectionActive:e,userSelectionRect:t}=p(ec,c.X);return e&&t?(0,i.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}let eg=(e,t)=>n=>{n.target===t.current&&e?.(n)},ef=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging});function ep({isSelecting:e,selectionKeyPressed:t,selectionMode:n=l.oW.Full,panOnDrag:o,selectionOnDrag:r,onSelectionStart:d,onSelectionEnd:u,onPaneClick:g,onPaneContextMenu:f,onPaneScroll:h,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:w,children:x}){let b=(0,s.useRef)(null),S=m(),C=(0,s.useRef)(0),E=(0,s.useRef)(0),k=(0,s.useRef)(),N=(0,s.useRef)(new Map),{userSelectionActive:M,elementsSelectable:j,dragging:P}=p(ef,c.X),_=j&&(e||M),D=(0,s.useRef)(!1),R=(0,s.useRef)(!1),I=()=>{S.setState({userSelectionActive:!1,userSelectionRect:null}),C.current=0,E.current=0},O=e=>{if(D.current){D.current=!1;return}g?.(e),S.getState().resetSelectedElements(),S.setState({nodesSelectionActive:!1})},A=!0===o||Array.isArray(o)&&o.includes(0);return(0,i.jsxs)("div",{className:(0,a.Z)(["react-flow__pane",{draggable:A,dragging:P,selection:e}]),onClick:_?void 0:eg(O,b),onContextMenu:eg(e=>{if(Array.isArray(o)&&o?.includes(2)){e.preventDefault();return}f?.(e)},b),onWheel:eg(h?e=>h(e):void 0,b),onPointerEnter:_?void 0:y,onPointerDown:_?t=>{let{resetSelectedElements:n,domNode:o,edgeLookup:r}=S.getState();if(k.current=o?.getBoundingClientRect(),!j||!e||0!==t.button||t.target!==b.current||!k.current)return;for(let[e,n]of(t.target?.setPointerCapture?.(t.pointerId),R.current=!0,D.current=!1,N.current=new Map,r))N.current.set(n.source,N.current.get(n.source)?.add(e)||new Set([e])),N.current.set(n.target,N.current.get(n.target)?.add(e)||new Set([e]));let{x:i,y:a}=(0,l.wv)(t.nativeEvent,k.current);n(),S.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),d?.(t)}:v,onPointerMove:_?e=>{let{userSelectionRect:t,edgeLookup:o,transform:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:s}=S.getState();if(!k.current||!t)return;D.current=!0;let{x:d,y:c}=(0,l.wv)(e.nativeEvent,k.current),{startX:u,startY:g}=t,f={startX:u,startY:g,x:d<u?d:u,y:c<g?c:g,width:Math.abs(d-u),height:Math.abs(c-g)},p=(0,l.f5)(i,f,r,n===l.oW.Partial,!0),m=new Set,h=new Set;for(let e of p){h.add(e.id);let t=N.current.get(e.id);if(t)for(let e of t)m.add(e)}C.current!==h.size&&(C.current=h.size,a(W(i,h,!0))),E.current!==m.size&&(E.current=m.size,s(W(o,m))),S.setState({userSelectionRect:f,userSelectionActive:!0,nodesSelectionActive:!1})}:v,onPointerUp:_?e=>{if(0!==e.button||!R.current)return;e.target?.releasePointerCapture?.(e.pointerId);let{userSelectionRect:n}=S.getState();!M&&n&&e.target===b.current&&O?.(e),C.current>0&&S.setState({nodesSelectionActive:!0}),I(),u?.(e),(t||r)&&(D.current=!1),R.current=!1}:void 0,onPointerLeave:w,ref:b,style:el,children:[x,(0,i.jsx)(eu,{})]})}function em({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:s,onError:d}=t.getState(),c=s.get(e);if(!c){d?.("012",l.Qj.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):r([e])}function eh({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:a}){let d=m(),[c,u]=(0,s.useState)(!1),g=(0,s.useRef)();return(0,s.useEffect)(()=>{g.current=(0,l.oC)({getStoreItems:()=>d.getState(),onNodeMouseDown:t=>{em({id:t,store:d,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,s.useEffect)(()=>{if(t)g.current?.destroy();else if(e.current)return g.current?.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:i,nodeId:r,nodeClickDistance:a}),()=>{g.current?.destroy()}},[n,o,t,i,e,r]),c}let ey=e=>t=>t.selected&&(t.draggable||e&&void 0===t.draggable);function ev(){let e=m();return(0,s.useCallback)(t=>{let{nodeExtent:n,snapToGrid:o,snapGrid:r,nodesDraggable:i,onError:a,updateNodePositions:s,nodeLookup:d,nodeOrigin:c}=e.getState(),u=new Map,g=ey(i),f=o?r[0]:5,p=o?r[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of d){if(!g(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};o&&(t=(0,l._2)(t,r));let{position:i,positionAbsolute:s}=(0,l.q7)({nodeId:e.id,nextPosition:t,nodeLookup:d,nodeExtent:n,nodeOrigin:c,onError:a});e.position=i,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}let ew=(0,s.createContext)(null),ex=ew.Provider;ew.Consumer;let eb=()=>(0,s.useContext)(ew),eS=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),eC=(e,t,n)=>o=>{let{connectionClickStartHandle:r,connectionMode:i,connection:a}=o,{fromHandle:s,toHandle:d,isValid:c}=a,u=d?.nodeId===e&&d?.id===t&&d?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:r?.nodeId===e&&r?.id===t&&r?.type===n,isPossibleEndHandle:i===l.jD.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,valid:u&&c}},eE=(0,s.memo)(G(function({type:e="source",position:t=l.Ly.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:s=!0,id:d,onConnect:u,children:g,className:f,onMouseDown:h,onTouchStart:y,...v},w){let x=d||null,b="target"===e,S=m(),C=eb(),{connectOnClick:E,noPanClassName:k,rfId:N}=p(eS,c.X),{connectingFrom:M,connectingTo:j,clickConnecting:P,isPossibleEndHandle:_,connectionInProcess:D,valid:R}=p(eC(C,x,e),c.X);C||S.getState().onError?.("010",l.Qj.error010());let I=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:o}=S.getState(),r={...t,...e};if(o){let{edges:e,setEdges:t}=S.getState();t((0,l.Z_)(r,e))}n?.(r),u?.(r)},O=e=>{if(!C)return;let t=(0,l.N5)(e.nativeEvent);if(r&&(t&&0===e.button||!t)){let t=S.getState();l.Ql.onPointerDown(e.nativeEvent,{autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:b,handleId:x,nodeId:C,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:t.onConnectEnd,updateConnection:t.updateConnection,onConnect:I,isValidConnection:n||t.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed})}t?h?.(e):y?.(e)};return(0,i.jsx)("div",{"data-handleid":x,"data-nodeid":C,"data-handlepos":t,"data-id":`${N}-${C}-${x}-${e}`,className:(0,a.Z)(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",k,f,{source:!b,target:b,connectable:o,connectablestart:r,connectableend:s,clickconnecting:P,connectingfrom:M,connectingto:j,valid:R,connectionindicator:o&&(!D||_)&&(D?s:r)}]),onMouseDown:O,onTouchStart:O,onClick:E?t=>{let{onClickConnectStart:o,onClickConnectEnd:i,connectionClickStartHandle:a,connectionMode:s,isValidConnection:d,lib:c,rfId:u,nodeLookup:g,connection:f}=S.getState();if(!C||!a&&!r)return;if(!a){o?.(t.nativeEvent,{nodeId:C,handleId:x,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:C,type:e,id:x}});return}let p=(0,l.S2)(t.target),m=n||d,{connection:h,isValid:y}=l.Ql.isValid(t.nativeEvent,{handle:{nodeId:C,id:x,type:e},connectionMode:s,fromNodeId:a.nodeId,fromHandleId:a.id||null,fromType:a.type,isValidConnection:m,flowId:u,doc:p,lib:c,nodeLookup:g});y&&h&&I(h);let v=structuredClone(f);delete v.inProgress,v.toPosition=v.toHandle?v.toHandle.position:null,i?.(t,v),S.setState({connectionClickStartHandle:null})}:void 0,ref:w,...v,children:g})})),ek={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},eN={input:function({data:e,isConnectable:t,sourcePosition:n=l.Ly.Bottom}){return(0,i.jsxs)(i.Fragment,{children:[e?.label,(0,i.jsx)(eE,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=l.Ly.Top,sourcePosition:o=l.Ly.Bottom}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eE,{type:"target",position:n,isConnectable:t}),e?.label,(0,i.jsx)(eE,{type:"source",position:o,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=l.Ly.Top}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eE,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},eM=e=>{let{width:t,height:n,x:o,y:r}=(0,l.W0)(e.nodeLookup,{filter:e=>!!e.selected});return{width:(0,l.kE)(t)?t:null,height:(0,l.kE)(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function ej({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=m(),{width:r,height:l,transformString:d,userSelectionActive:u}=p(eM,c.X),g=ev(),f=(0,s.useRef)(null);return((0,s.useEffect)(()=>{n||f.current?.focus({preventScroll:!0})},[n]),eh({nodeRef:f}),!u&&r&&l)?(0,i.jsx)("div",{className:(0,a.Z)(["react-flow__nodesselection","react-flow__container",t]),style:{transform:d},children:(0,i.jsx)("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:e?t=>{e(t,o.getState().nodes.filter(e=>e.selected))}:void 0,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(ek,e.key)&&g({direction:ek[e.key],factor:e.shiftKey?4:1})},style:{width:r,height:l}})}):null}let eP="undefined"!=typeof window?window:void 0,e_=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function eD({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:d,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:g,selectionMode:f,onSelectionStart:h,onSelectionEnd:y,multiSelectionKeyCode:v,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:b,zoomOnScroll:S,zoomOnPinch:C,panOnScroll:E,panOnScrollSpeed:k,panOnScrollMode:N,zoomOnDoubleClick:M,panOnDrag:j,defaultViewport:P,translateExtent:_,minZoom:D,maxZoom:R,preventScrolling:I,onSelectionContextMenu:O,noWheelClassName:A,noPanClassName:L,disableKeyboardA11y:$,onViewportChange:z,isControlledViewport:B}){let{nodesSelectionActive:Z,userSelectionActive:H}=p(e_),F=V(u,{target:eP}),X=V(w,{target:eP}),T=X||j,W=X||E,K=g&&!0!==T,Q=F||H||K;return!function({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=m(),{deleteElements:o}=eo(),r=V(e,ei),i=V(t,{target:ea});(0,s.useEffect)(()=>{if(r){let{edges:e,nodes:t}=n.getState();o({nodes:t.filter(er),edges:e.filter(er)}),n.setState({nodesSelectionActive:!1})}},[r]),(0,s.useEffect)(()=>{n.setState({multiSelectionActive:i})},[i])}({deleteKeyCode:c,multiSelectionKeyCode:v}),(0,i.jsx)(ed,{onPaneContextMenu:a,elementsSelectable:b,zoomOnScroll:S,zoomOnPinch:C,panOnScroll:W,panOnScrollSpeed:k,panOnScrollMode:N,zoomOnDoubleClick:M,panOnDrag:!F&&T,defaultViewport:P,translateExtent:_,minZoom:D,maxZoom:R,zoomActivationKeyCode:x,preventScrolling:I,noWheelClassName:A,noPanClassName:L,onViewportChange:z,isControlledViewport:B,paneClickDistance:d,children:(0,i.jsxs)(ep,{onSelectionStart:h,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:T,isSelecting:!!Q,selectionMode:f,selectionKeyPressed:F,selectionOnDrag:K,children:[e,Z&&(0,i.jsx)(ej,{onSelectionContextMenu:O,noPanClassName:L,disableKeyboardA11y:$})]})})}eD.displayName="FlowRenderer";let eR=(0,s.memo)(eD),eI=e=>t=>e?(0,l.f5)(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys()),eO=e=>e.updateNodeInternals;function eA({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:d,onDoubleClick:u,nodesDraggable:g,elementsSelectable:f,nodesConnectable:h,nodesFocusable:y,resizeObserver:w,noDragClassName:x,noPanClassName:b,disableKeyboardA11y:S,rfId:C,nodeTypes:E,nodeExtent:k,nodeClickDistance:N,onError:M}){let{node:j,internals:P,isParent:_}=p(t=>{let n=t.nodeLookup.get(e),o=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:o}},c.X),D=j.type||"default",R=E?.[D]||eN[D];void 0===R&&(M?.("003",l.Qj.error003(D)),D="default",R=eN.default);let I=!!(j.draggable||g&&void 0===j.draggable),O=!!(j.selectable||f&&void 0===j.selectable),A=!!(j.connectable||h&&void 0===j.connectable),L=!!(j.focusable||y&&void 0===j.focusable),$=m(),z=(0,l.nb)(j),B=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let r=m(),i=(0,s.useRef)(null),a=(0,s.useRef)(null),l=(0,s.useRef)(e.sourcePosition),d=(0,s.useRef)(e.targetPosition),c=(0,s.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,s.useEffect)(()=>{!i.current||e.hidden||u&&a.current===i.current||(a.current&&o?.unobserve(a.current),o?.observe(i.current),a.current=i.current)},[u,e.hidden]),(0,s.useEffect)(()=>()=>{a.current&&(o?.unobserve(a.current),a.current=null)},[]),(0,s.useEffect)(()=>{if(i.current){let n=c.current!==t,o=l.current!==e.sourcePosition,a=d.current!==e.targetPosition;(n||o||a)&&(c.current=t,l.current=e.sourcePosition,d.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}({node:j,nodeType:D,hasDimensions:z,resizeObserver:w}),V=eh({nodeRef:B,disabled:j.hidden||!I,noDragClassName:x,handleSelector:j.dragHandle,nodeId:e,isSelectable:O,nodeClickDistance:N}),Z=ev();if(j.hidden)return null;let H=(0,l.Rf)(j),F=void 0===j.internals.handleBounds?{width:j.width??j.initialWidth??j.style?.width,height:j.height??j.initialHeight??j.style?.height}:{width:j.width??j.style?.width,height:j.height??j.style?.height},X=O||I||t||n||o||r;return(0,i.jsx)("div",{className:(0,a.Z)(["react-flow__node",`react-flow__node-${D}`,{[b]:I},j.className,{selected:j.selected,selectable:O,parent:_,draggable:I,dragging:V}]),ref:B,style:{zIndex:P.z,transform:`translate(${P.positionAbsolute.x}px,${P.positionAbsolute.y}px)`,pointerEvents:X?"all":"none",visibility:z?"visible":"hidden",...j.style,...F},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:n?e=>n(e,{...P.userNode}):void 0,onMouseMove:o?e=>o(e,{...P.userNode}):void 0,onMouseLeave:r?e=>r(e,{...P.userNode}):void 0,onContextMenu:d?e=>d(e,{...P.userNode}):void 0,onClick:n=>{let{selectNodesOnDrag:o,nodeDragThreshold:r}=$.getState();O&&(!o||!I||r>0)&&em({id:e,store:$,nodeRef:B}),t&&t(n,{...P.userNode})},onDoubleClick:u?e=>u(e,{...P.userNode}):void 0,onKeyDown:L?t=>{!(0,l.s$)(t.nativeEvent)&&!S&&(l.wQ.includes(t.key)&&O?em({id:e,store:$,unselect:"Escape"===t.key,nodeRef:B}):I&&j.selected&&Object.prototype.hasOwnProperty.call(ek,t.key)&&($.setState({ariaLiveMessage:`Moved selected node ${t.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~P.positionAbsolute.x}, y: ${~~P.positionAbsolute.y}`}),Z({direction:ek[t.key],factor:t.shiftKey?4:1})))}:void 0,tabIndex:L?0:void 0,role:L?"button":void 0,"aria-describedby":S?void 0:`${v}-${C}`,"aria-label":j.ariaLabel,children:(0,i.jsx)(ex,{value:e,children:(0,i.jsx)(R,{id:e,data:j.data,type:D,positionAbsoluteX:P.positionAbsolute.x,positionAbsoluteY:P.positionAbsolute.y,selected:j.selected,selectable:O,draggable:I,deletable:j.deletable??!0,isConnectable:A,sourcePosition:j.sourcePosition,targetPosition:j.targetPosition,dragging:V,dragHandle:j.dragHandle,zIndex:P.z,parentId:j.parentId,...H})})})}let eL=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function e$(e){var t;let{nodesDraggable:n,nodesConnectable:o,nodesFocusable:r,elementsSelectable:a,onError:l}=p(eL,c.X),d=(t=e.onlyRenderVisibleElements,p((0,s.useCallback)(eI(t),[t]),c.X)),u=function(){let e=p(eO),[t]=(0,s.useState)(()=>"undefined"==typeof ResizeObserver?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,s.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,i.jsx)("div",{className:"react-flow__nodes",style:el,children:d.map(t=>(0,i.jsx)(eA,{id:t,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:n,nodesConnectable:o,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:l},t))})}e$.displayName="NodeRenderer";let ez=(0,s.memo)(e$),eB={[l.QZ.Arrow]:({color:e="none",strokeWidth:t=1})=>(0,i.jsx)("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[l.QZ.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>(0,i.jsx)("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},eV=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:a="strokeWidth",strokeWidth:d,orient:c="auto-start-reverse"})=>{let u=function(e){let t=m();return(0,s.useMemo)(()=>Object.prototype.hasOwnProperty.call(eB,e)?eB[e]:(t.getState().onError?.("009",l.Qj.error009(e)),null),[e])}(t);return u?(0,i.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:c,refX:"0",refY:"0",children:(0,i.jsx)(u,{color:n,strokeWidth:d})}):null},eZ=({defaultColor:e,rfId:t})=>{let n=p(e=>e.edges),o=p(e=>e.defaultEdgeOptions),r=(0,s.useMemo)(()=>(0,l.n3)(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return r.length?(0,i.jsx)("svg",{className:"react-flow__marker",children:(0,i.jsx)("defs",{children:r.map(e=>(0,i.jsx)(eV,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};eZ.displayName="MarkerDefinitions";var eH=(0,s.memo)(eZ);function eF({x:e,y:t,label:n,labelStyle:o={},labelShowBg:r=!0,labelBgStyle:l={},labelBgPadding:d=[2,4],labelBgBorderRadius:c=2,children:u,className:g,...f}){let[p,m]=(0,s.useState)({x:1,y:0,width:0,height:0}),h=(0,a.Z)(["react-flow__edge-textwrapper",g]),y=(0,s.useRef)(null);return((0,s.useEffect)(()=>{if(y.current){let e=y.current.getBBox();m({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),void 0!==n&&n)?(0,i.jsxs)("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:h,visibility:p.width?"visible":"hidden",...f,children:[r&&(0,i.jsx)("rect",{width:p.width+2*d[0],x:-d[0],y:-d[1],height:p.height+2*d[1],className:"react-flow__edge-textbg",style:l,rx:c,ry:c}),(0,i.jsx)("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:y,style:o,children:n}),u]}):null}eF.displayName="EdgeText";let eX=(0,s.memo)(eF);function eT({id:e,path:t,labelX:n,labelY:o,label:r,labelStyle:s,labelShowBg:d,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:g,style:f,markerEnd:p,markerStart:m,className:h,interactionWidth:y=20}){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{id:e,style:f,d:t,fill:"none",className:(0,a.Z)(["react-flow__edge-path",h]),markerEnd:p,markerStart:m}),y&&(0,i.jsx)("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:y,className:"react-flow__edge-interaction"}),r&&(0,l.kE)(n)&&(0,l.kE)(o)?(0,i.jsx)(eX,{x:n,y:o,label:r,labelStyle:s,labelShowBg:d,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:g}):null]})}function eW({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===l.Ly.Left||e===l.Ly.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function eK({sourceX:e,sourceY:t,sourcePosition:n=l.Ly.Bottom,targetX:o,targetY:r,targetPosition:i=l.Ly.Top}){let[a,s]=eW({pos:n,x1:e,y1:t,x2:o,y2:r}),[d,c]=eW({pos:i,x1:o,y1:r,x2:e,y2:t}),[u,g,f,p]=(0,l.lM)({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:a,sourceControlY:s,targetControlX:d,targetControlY:c});return[`M${e},${t} C${a},${s} ${d},${c} ${o},${r}`,u,g,f,p]}function eQ(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:s=l.Ly.Bottom,targetPosition:d=l.Ly.Top,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:v,interactionWidth:w})=>{let[x,b,S]=eK({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:a,targetPosition:d}),C=e.isInternal?void 0:t;return(0,i.jsx)(eT,{id:C,path:x,labelX:b,labelY:S,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:v,interactionWidth:w})})}let eY=eQ({isInternal:!1}),eU=eQ({isInternal:!0});function eG(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:s,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,sourcePosition:m=l.Ly.Bottom,targetPosition:h=l.Ly.Top,markerEnd:y,markerStart:v,pathOptions:w,interactionWidth:x})=>{let[b,S,C]=(0,l.OW)({sourceX:n,sourceY:o,sourcePosition:m,targetX:r,targetY:a,targetPosition:h,borderRadius:w?.borderRadius,offset:w?.offset}),E=e.isInternal?void 0:t;return(0,i.jsx)(eT,{id:E,path:b,labelX:S,labelY:C,label:s,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:y,markerStart:v,interactionWidth:x})})}eY.displayName="SimpleBezierEdge",eU.displayName="SimpleBezierEdgeInternal";let eJ=eG({isInternal:!1}),eq=eG({isInternal:!0});function e0(e){return(0,s.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,i.jsx)(eJ,{...n,id:o,pathOptions:(0,s.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}eJ.displayName="SmoothStepEdge",eq.displayName="SmoothStepEdgeInternal";let e1=e0({isInternal:!1}),e3=e0({isInternal:!0});function e2(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:s,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:y})=>{let[v,w,x]=(0,l.Hm)({sourceX:n,sourceY:o,targetX:r,targetY:a}),b=e.isInternal?void 0:t;return(0,i.jsx)(eT,{id:b,path:v,labelX:w,labelY:x,label:s,labelStyle:d,labelShowBg:c,labelBgStyle:u,labelBgPadding:g,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:y})})}e1.displayName="StepEdge",e3.displayName="StepEdgeInternal";let e5=e2({isInternal:!1}),e4=e2({isInternal:!0});function e6(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:s=l.Ly.Bottom,targetPosition:d=l.Ly.Top,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:v,pathOptions:w,interactionWidth:x})=>{let[b,S,C]=(0,l.OQ)({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:a,targetPosition:d,curvature:w?.curvature}),E=e.isInternal?void 0:t;return(0,i.jsx)(eT,{id:E,path:b,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:g,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:y,markerStart:v,interactionWidth:x})})}e5.displayName="StraightEdge",e4.displayName="StraightEdgeInternal";let e7=e6({isInternal:!1}),e8=e6({isInternal:!0});e7.displayName="BezierEdge",e8.displayName="BezierEdgeInternal";let e9={default:e8,straight:e4,step:e3,smoothstep:eq,simplebezier:eU},te={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},tt=(e,t,n)=>n===l.Ly.Left?e-t:n===l.Ly.Right?e+t:e,tn=(e,t,n)=>n===l.Ly.Top?e-t:n===l.Ly.Bottom?e+t:e,to="react-flow__edgeupdater";function tr({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:l,onMouseOut:s,type:d}){return(0,i.jsx)("circle",{onMouseDown:r,onMouseEnter:l,onMouseOut:s,className:(0,a.Z)([to,`${to}-${d}`]),cx:tt(t,o,e),cy:tn(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function ti({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:a,targetY:s,sourcePosition:d,targetPosition:c,onReconnect:u,onReconnectStart:g,onReconnectEnd:f,setReconnecting:p,setUpdateHover:h}){let y=m(),v=(e,t)=>{if(0!==e.button)return;let{autoPanOnConnect:o,domNode:r,isValidConnection:i,connectionMode:a,connectionRadius:s,lib:d,onConnectStart:c,onConnectEnd:m,cancelConnection:h,nodeLookup:v,rfId:w,panBy:x,updateConnection:b}=y.getState(),S="target"===t.type;p(!0),g?.(e,n,t.type),l.Ql.onPointerDown(e.nativeEvent,{autoPanOnConnect:o,connectionMode:a,connectionRadius:s,domNode:r,handleId:t.id,nodeId:t.nodeId,nodeLookup:v,isTarget:S,edgeUpdaterType:t.type,lib:d,flowId:w,cancelConnection:h,panBy:x,isValidConnection:i,onConnect:e=>u?.(n,e),onConnectStart:c,onConnectEnd:m,onReconnectEnd:(e,o)=>{p(!1),f?.(e,n,t.type,o)},updateConnection:b,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle})},w=()=>h(!0),x=()=>h(!1);return(0,i.jsxs)(i.Fragment,{children:[(!0===e||"source"===e)&&(0,i.jsx)(tr,{position:d,centerX:o,centerY:r,radius:t,onMouseDown:e=>v(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:w,onMouseOut:x,type:"source"}),(!0===e||"target"===e)&&(0,i.jsx)(tr,{position:c,centerX:a,centerY:s,radius:t,onMouseDown:e=>v(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:w,onMouseOut:x,type:"target"})]})}function ta({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:d,onContextMenu:u,onMouseEnter:g,onMouseMove:f,onMouseLeave:h,reconnectRadius:y,onReconnect:v,onReconnectStart:x,onReconnectEnd:b,rfId:S,edgeTypes:C,noPanClassName:E,onError:k,disableKeyboardA11y:N}){let M=p(t=>t.edgeLookup.get(e)),j=p(e=>e.defaultEdgeOptions),P=(M=j?{...j,...M}:M).type||"default",_=C?.[P]||e9[P];void 0===_&&(k?.("011",l.Qj.error011(P)),P="default",_=e9.default);let D=!!(M.focusable||t&&void 0===M.focusable),R=void 0!==v&&(M.reconnectable||n&&void 0===M.reconnectable),I=!!(M.selectable||o&&void 0===M.selectable),O=(0,s.useRef)(null),[A,L]=(0,s.useState)(!1),[$,z]=(0,s.useState)(!1),B=m(),{zIndex:V,sourceX:Z,sourceY:H,targetX:F,targetY:X,sourcePosition:T,targetPosition:W}=p((0,s.useCallback)(t=>{let n=t.nodeLookup.get(M.source),o=t.nodeLookup.get(M.target);if(!n||!o)return{zIndex:M.zIndex,...te};let r=(0,l.JU)({id:e,sourceNode:n,targetNode:o,sourceHandle:M.sourceHandle||null,targetHandle:M.targetHandle||null,connectionMode:t.connectionMode,onError:k});return{zIndex:(0,l.xx)({selected:M.selected,zIndex:M.zIndex,sourceNode:n,targetNode:o,elevateOnSelect:t.elevateEdgesOnSelect}),...r||te}},[M.source,M.target,M.sourceHandle,M.targetHandle,M.selected,M.zIndex]),c.X),K=(0,s.useMemo)(()=>M.markerStart?`url('#${(0,l.dW)(M.markerStart,S)}')`:void 0,[M.markerStart,S]),Q=(0,s.useMemo)(()=>M.markerEnd?`url('#${(0,l.dW)(M.markerEnd,S)}')`:void 0,[M.markerEnd,S]);if(M.hidden||null===Z||null===H||null===F||null===X)return null;let Y=d?e=>{d(e,{...M})}:void 0,U=u?e=>{u(e,{...M})}:void 0,G=g?e=>{g(e,{...M})}:void 0,J=f?e=>{f(e,{...M})}:void 0,q=h?e=>{h(e,{...M})}:void 0;return(0,i.jsx)("svg",{style:{zIndex:V},children:(0,i.jsxs)("g",{className:(0,a.Z)(["react-flow__edge",`react-flow__edge-${P}`,M.className,E,{selected:M.selected,animated:M.animated,inactive:!I&&!r,updating:A,selectable:I}]),onClick:t=>{let{addSelectedEdges:n,unselectNodesAndEdges:o,multiSelectionActive:i}=B.getState();I&&(B.setState({nodesSelectionActive:!1}),M.selected&&i?(o({nodes:[],edges:[M]}),O.current?.blur()):n([e])),r&&r(t,M)},onDoubleClick:Y,onContextMenu:U,onMouseEnter:G,onMouseMove:J,onMouseLeave:q,onKeyDown:D?t=>{if(!N&&l.wQ.includes(t.key)&&I){let{unselectNodesAndEdges:n,addSelectedEdges:o}=B.getState();"Escape"===t.key?(O.current?.blur(),n({edges:[M]})):o([e])}}:void 0,tabIndex:D?0:void 0,role:D?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===M.ariaLabel?void 0:M.ariaLabel||`Edge from ${M.source} to ${M.target}`,"aria-describedby":D?`${w}-${S}`:void 0,ref:O,children:[!$&&(0,i.jsx)(_,{id:e,source:M.source,target:M.target,type:M.type,selected:M.selected,animated:M.animated,selectable:I,deletable:M.deletable??!0,label:M.label,labelStyle:M.labelStyle,labelShowBg:M.labelShowBg,labelBgStyle:M.labelBgStyle,labelBgPadding:M.labelBgPadding,labelBgBorderRadius:M.labelBgBorderRadius,sourceX:Z,sourceY:H,targetX:F,targetY:X,sourcePosition:T,targetPosition:W,data:M.data,style:M.style,sourceHandleId:M.sourceHandle,targetHandleId:M.targetHandle,markerStart:K,markerEnd:Q,pathOptions:"pathOptions"in M?M.pathOptions:void 0,interactionWidth:M.interactionWidth}),R&&(0,i.jsx)(ti,{edge:M,isReconnectable:R,reconnectRadius:y,onReconnect:v,onReconnectStart:x,onReconnectEnd:b,sourceX:Z,sourceY:H,targetX:F,targetY:X,sourcePosition:T,targetPosition:W,setUpdateHover:L,setReconnecting:z})]})})}let tl=e=>({width:e.width,height:e.height,edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ts({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:a,onEdgeContextMenu:d,onEdgeMouseEnter:u,onEdgeMouseMove:g,onEdgeMouseLeave:f,onEdgeClick:m,reconnectRadius:h,onEdgeDoubleClick:y,onReconnectStart:v,onReconnectEnd:w,disableKeyboardA11y:x}){let{edgesFocusable:b,edgesReconnectable:S,elementsSelectable:C,onError:E}=p(tl,c.X),k=p((0,s.useCallback)(e=>{if(!t)return e.edges.map(e=>e.id);let n=[];if(e.width&&e.height)for(let t of e.edges){let o=e.nodeLookup.get(t.source),r=e.nodeLookup.get(t.target);o&&r&&(0,l.RY)({sourceNode:o,targetNode:r,width:e.width,height:e.height,transform:e.transform})&&n.push(t.id)}return n},[t]),c.X);return(0,i.jsxs)("div",{className:"react-flow__edges",children:[(0,i.jsx)(eH,{defaultColor:e,rfId:n}),k.map(e=>(0,i.jsx)(ta,{id:e,edgesFocusable:b,edgesReconnectable:S,elementsSelectable:C,noPanClassName:r,onReconnect:a,onContextMenu:d,onMouseEnter:u,onMouseMove:g,onMouseLeave:f,onClick:m,reconnectRadius:h,onDoubleClick:y,onReconnectStart:v,onReconnectEnd:w,rfId:n,onError:E,edgeTypes:o,disableKeyboardA11y:x},e))]})}ts.displayName="EdgeRenderer";let td=(0,s.memo)(ts),tc=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function tu({children:e}){let t=p(tc);return(0,i.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}let tg=e=>e.panZoom?.syncViewport;function tf(e){return e.connection.inProgress?{...e.connection,to:(0,l.m)(e.connection.to,e.transform)}:{...e.connection}}let tp=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function tm({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:r,width:s,height:d,isValid:u,inProgress:g}=p(tp,c.X);return s&&r&&g?(0,i.jsx)("svg",{style:e,width:s,height:d,className:"react-flow__connectionline react-flow__container",children:(0,i.jsx)("g",{className:(0,a.Z)(["react-flow__connection",(0,l.Zp)(u)]),children:(0,i.jsx)(th,{style:t,type:n,CustomComponent:o,isValid:u})})}):null}let th=({style:e,type:t=l.t8.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:r,from:a,fromNode:s,fromHandle:d,fromPosition:u,to:g,toNode:f,toHandle:m,toPosition:h}=p(tf,c.X);if(!r)return;if(n)return(0,i.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:d,fromX:a.x,fromY:a.y,toX:g.x,toY:g.y,fromPosition:u,toPosition:h,connectionStatus:(0,l.Zp)(o),toNode:f,toHandle:m});let y="",v={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:g.x,targetY:g.y,targetPosition:h};switch(t){case l.t8.Bezier:[y]=(0,l.OQ)(v);break;case l.t8.SimpleBezier:[y]=eK(v);break;case l.t8.Step:[y]=(0,l.OW)({...v,borderRadius:0});break;case l.t8.SmoothStep:[y]=(0,l.OW)(v);break;default:[y]=(0,l.Hm)(v)}return(0,i.jsx)("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};th.displayName="ConnectionLine";let ty={};function tv(e=ty){(0,s.useRef)(e),m(),(0,s.useEffect)(()=>{},[e])}function tw({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:g,onSelectionContextMenu:f,onSelectionStart:h,onSelectionEnd:y,connectionLineType:v,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:b,selectionKeyCode:S,selectionOnDrag:C,selectionMode:E,multiSelectionKeyCode:k,panActivationKeyCode:N,zoomActivationKeyCode:M,deleteKeyCode:j,onlyRenderVisibleElements:P,elementsSelectable:_,defaultViewport:D,translateExtent:R,minZoom:I,maxZoom:O,preventScrolling:A,defaultMarkerColor:L,zoomOnScroll:$,zoomOnPinch:z,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:Z,zoomOnDoubleClick:H,panOnDrag:F,onPaneClick:X,onPaneMouseEnter:T,onPaneMouseMove:W,onPaneMouseLeave:K,onPaneScroll:Q,onPaneContextMenu:Y,paneClickDistance:U,nodeClickDistance:G,onEdgeContextMenu:J,onEdgeMouseEnter:q,onEdgeMouseMove:ee,onEdgeMouseLeave:et,reconnectRadius:en,onReconnect:er,onReconnectStart:ei,onReconnectEnd:ea,noDragClassName:el,noWheelClassName:es,noPanClassName:ed,disableKeyboardA11y:ec,nodeExtent:eu,rfId:eg,viewport:ef,onViewportChange:ep}){return tv(e),tv(t),m(),(0,s.useRef)(!1),(0,s.useEffect)(()=>{},[]),!function(e){let t=eo(),n=(0,s.useRef)(!1);(0,s.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}(n),!function(e){let t=p(tg),n=m();(0,s.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t])}(ef),(0,i.jsx)(eR,{onPaneClick:X,onPaneMouseEnter:T,onPaneMouseMove:W,onPaneMouseLeave:K,onPaneContextMenu:Y,onPaneScroll:Q,paneClickDistance:U,deleteKeyCode:j,selectionKeyCode:S,selectionOnDrag:C,selectionMode:E,onSelectionStart:h,onSelectionEnd:y,multiSelectionKeyCode:k,panActivationKeyCode:N,zoomActivationKeyCode:M,elementsSelectable:_,zoomOnScroll:$,zoomOnPinch:z,zoomOnDoubleClick:H,panOnScroll:B,panOnScrollSpeed:V,panOnScrollMode:Z,panOnDrag:F,defaultViewport:D,translateExtent:R,minZoom:I,maxZoom:O,onSelectionContextMenu:f,preventScrolling:A,noDragClassName:el,noWheelClassName:es,noPanClassName:ed,disableKeyboardA11y:ec,onViewportChange:ep,isControlledViewport:!!ef,children:(0,i.jsxs)(tu,{children:[(0,i.jsx)(td,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:l,onReconnect:er,onReconnectStart:ei,onReconnectEnd:ea,onlyRenderVisibleElements:P,onEdgeContextMenu:J,onEdgeMouseEnter:q,onEdgeMouseMove:ee,onEdgeMouseLeave:et,reconnectRadius:en,defaultMarkerColor:L,noPanClassName:ed,disableKeyboardA11y:ec,rfId:eg}),(0,i.jsx)(tm,{style:w,type:v,component:x,containerStyle:b}),(0,i.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,i.jsx)(ez,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:d,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:g,nodeClickDistance:G,onlyRenderVisibleElements:P,noPanClassName:ed,noDragClassName:el,disableKeyboardA11y:ec,nodeExtent:eu,rfId:eg}),(0,i.jsx)("div",{className:"react-flow__viewport-portal"})]})})}tw.displayName="GraphView";let tx=(0,s.memo)(tw),tb=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,nodeOrigin:s,nodeExtent:d}={})=>{let c=new Map,u=new Map,g=new Map,f=new Map,p=o??t??[],m=n??e??[],h=s??[0,0],y=d??l.k5;(0,l.be)(g,f,p),(0,l.yF)(m,c,u,{nodeOrigin:h,nodeExtent:y,elevateNodesOnSelect:!1});let v=[0,0,1];if(a&&r&&i){let e=(0,l.W0)(c,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),{x:t,y:n,zoom:o}=(0,l.$i)(e,r,i,.5,2,.1);v=[t,n,o]}return{rfId:"1",width:0,height:0,transform:v,nodes:m,nodeLookup:c,parentLookup:u,edges:p,edgeLookup:f,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==o,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:l.k5,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:l.jD.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:h,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,fitViewOnInit:!1,fitViewDone:!1,fitViewOnInitOptions:void 0,selectNodesOnDrag:!0,multiSelectionActive:!1,connection:{...l.Ky},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:l.Ki,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},tS=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:a,nodeOrigin:s,nodeExtent:c})=>(0,d.F)((d,u)=>({...tb({nodes:e,edges:t,width:r,height:i,fitView:a,nodeOrigin:s,nodeExtent:c,defaultNodes:n,defaultEdges:o}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:o,elevateNodesOnSelect:r}=u();(0,l.yF)(e,t,n,{nodeOrigin:o,nodeExtent:c,elevateNodesOnSelect:r,checkEquality:!0}),d({nodes:e})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=u();(0,l.be)(t,n,e),d({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=u();t(e),d({hasDefaultNodes:!0})}if(t){let{setEdges:e}=u();e(t),d({hasDefaultEdges:!0})}},updateNodeInternals:(e,t={triggerFitView:!0})=>{let{triggerNodeChanges:n,nodeLookup:o,parentLookup:r,fitViewOnInit:i,fitViewDone:a,fitViewOnInitOptions:s,domNode:c,nodeOrigin:g,nodeExtent:f,debug:p,fitViewSync:m}=u(),{changes:h,updatedInternals:y}=(0,l.B1)(e,o,r,c,g,f);if(y){if((0,l.VV)(o,r,{nodeOrigin:g,nodeExtent:f}),t.triggerFitView){let e=a;!a&&i&&(e=m({...s,nodes:s?.nodes})),d({fitViewDone:e})}else d({});h?.length>0&&(p&&console.log("React Flow: trigger node changes",h),n?.(h))}},updateNodePositions:(e,t=!1)=>{let n=[],o=[];for(let[r,i]of e){let e={id:r,type:"position",position:i.position,dragging:t};i?.expandParent&&i?.parentId&&e.position&&(n.push({id:r,parentId:i.parentId,rect:{...i.internals.positionAbsolute,width:i.measured.width,height:i.measured.height}}),e.position.x=Math.max(0,e.position.x),e.position.y=Math.max(0,e.position.y)),o.push(e)}if(n.length>0){let{nodeLookup:e,parentLookup:t,nodeOrigin:r}=u(),i=(0,l.so)(n,e,t,r);o.push(...i)}u().triggerNodeChanges(o)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:o,hasDefaultNodes:r,debug:i}=u();e?.length&&(r&&n(X(e,o)),i&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:o,hasDefaultEdges:r,debug:i}=u();e?.length&&(r&&n(X(e,o)),i&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=u();if(t){r(e.map(e=>T(e,!0)));return}r(W(o,new Set([...e]),!0)),i(W(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=u();if(t){i(e.map(e=>T(e,!0)));return}i(W(n,new Set([...e]))),r(W(o,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:o,triggerNodeChanges:r,triggerEdgeChanges:i}=u(),a=(e||o).map(e=>(e.selected=!1,T(e.id,!1))),l=(t||n).map(e=>T(e.id,!1));r(a),i(l)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=u();t?.setScaleExtent([e,n]),d({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=u();t?.setScaleExtent([n,e]),d({maxZoom:e})},setTranslateExtent:e=>{u().panZoom?.setTranslateExtent(e),d({translateExtent:e})},setPaneClickDistance:e=>{u().panZoom?.setClickDistance(e)},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:o}=u(),r=t.reduce((e,t)=>t.selected?[...e,T(t.id,!1)]:e,[]),i=e.reduce((e,t)=>t.selected?[...e,T(t.id,!1)]:e,[]);n(r),o(i)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:o,nodeOrigin:r,elevateNodesOnSelect:i,nodeExtent:a}=u();(e[0][0]!==a[0][0]||e[0][1]!==a[0][1]||e[1][0]!==a[1][0]||e[1][1]!==a[1][1])&&((0,l.yF)(t,n,o,{nodeOrigin:r,nodeExtent:e,elevateNodesOnSelect:i,checkEquality:!1}),d({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:o,panZoom:r,translateExtent:i}=u();return(0,l.hO)({delta:e,panZoom:r,transform:t,translateExtent:i,width:n,height:o})},fitView:e=>{let{panZoom:t,width:n,height:o,minZoom:r,maxZoom:i,nodeLookup:a}=u();if(!t)return Promise.resolve(!1);let s=(0,l.J6)(a,e);return(0,l.Qu)({nodes:s,width:n,height:o,panZoom:t,minZoom:r,maxZoom:i},e)},fitViewSync:e=>{let{panZoom:t,width:n,height:o,minZoom:r,maxZoom:i,nodeLookup:a}=u();if(!t)return!1;let s=(0,l.J6)(a,e);return(0,l.Qu)({nodes:s,width:n,height:o,panZoom:t,minZoom:r,maxZoom:i},e),s.size>0},cancelConnection:()=>{d({connection:{...l.Ky}})},updateConnection:e=>{d({connection:e})},reset:()=>d({...tb()})}),Object.is);function tC({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:a,fitView:l,nodeOrigin:d,nodeExtent:c,children:u}){let[f]=(0,s.useState)(()=>tS({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:l,nodeOrigin:d,nodeExtent:c}));return(0,i.jsx)(g,{value:f,children:(0,i.jsx)(et,{children:u})})}function tE({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:a,height:l,fitView:d,nodeOrigin:c,nodeExtent:g}){return(0,s.useContext)(u)?(0,i.jsx)(i.Fragment,{children:e}):(0,i.jsx)(tC,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:a,initialHeight:l,fitView:d,nodeOrigin:c,nodeExtent:g,children:e})}let tk={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var tN=G(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:d,edgeTypes:c,onNodeClick:u,onEdgeClick:g,onInit:f,onMove:p,onMoveStart:m,onMoveEnd:h,onConnect:y,onConnectStart:v,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:b,onNodeMouseEnter:C,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:M,onNodeDoubleClick:j,onNodeDragStart:P,onNodeDrag:_,onNodeDragStop:O,onNodesDelete:A,onEdgesDelete:L,onDelete:B,onSelectionChange:V,onSelectionDragStart:Z,onSelectionDrag:H,onSelectionDragStop:F,onSelectionContextMenu:X,onSelectionStart:T,onSelectionEnd:W,onBeforeDelete:K,connectionMode:Q,connectionLineType:Y=l.t8.Bezier,connectionLineStyle:U,connectionLineComponent:G,connectionLineContainerStyle:J,deleteKeyCode:q="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:et=!1,selectionMode:en=l.oW.Full,panActivationKeyCode:eo="Space",multiSelectionKeyCode:er=(0,l.Q5)()?"Meta":"Control",zoomActivationKeyCode:ei=(0,l.Q5)()?"Meta":"Control",snapToGrid:ea,snapGrid:el,onlyRenderVisibleElements:es=!1,selectNodesOnDrag:ed,nodesDraggable:ec,nodesConnectable:eu,nodesFocusable:eg,nodeOrigin:ef=R,edgesFocusable:ep,edgesReconnectable:em,elementsSelectable:eh=!0,defaultViewport:ey=I,minZoom:ev=.5,maxZoom:ew=2,translateExtent:ex=l.k5,preventScrolling:eb=!0,nodeExtent:eS,defaultMarkerColor:eC="#b1b1b7",zoomOnScroll:eE=!0,zoomOnPinch:ek=!0,panOnScroll:eN=!1,panOnScrollSpeed:eM=.5,panOnScrollMode:ej=l.IY.Free,zoomOnDoubleClick:eP=!0,panOnDrag:e_=!0,onPaneClick:eD,onPaneMouseEnter:eR,onPaneMouseMove:eI,onPaneMouseLeave:eO,onPaneScroll:eA,onPaneContextMenu:eL,paneClickDistance:e$=0,nodeClickDistance:ez=0,children:eB,onReconnect:eV,onReconnectStart:eZ,onReconnectEnd:eH,onEdgeContextMenu:eF,onEdgeDoubleClick:eX,onEdgeMouseEnter:eT,onEdgeMouseMove:eW,onEdgeMouseLeave:eK,reconnectRadius:eQ=10,onNodesChange:eY,onEdgesChange:eU,noDragClassName:eG="nodrag",noWheelClassName:eJ="nowheel",noPanClassName:eq="nopan",fitView:e0,fitViewOptions:e1,connectOnClick:e3,attributionPosition:e2,proOptions:e5,defaultEdgeOptions:e4,elevateNodesOnSelect:e6,elevateEdgesOnSelect:e7,disableKeyboardA11y:e8=!1,autoPanOnConnect:e9,autoPanOnNodeDrag:te,autoPanSpeed:tt,connectionRadius:tn,isValidConnection:to,onError:tr,style:ti,id:ta,nodeDragThreshold:tl,viewport:ts,onViewportChange:td,width:tc,height:tu,colorMode:tg="light",debug:tf,...tp},tm){let th=ta||"1",ty=function(e){let[t,n]=(0,s.useState)("system"===e?null:e);return(0,s.useEffect)(()=>{if("system"!==e){n(e);return}let t=z(),o=()=>n(t?.matches?"dark":"light");return o(),t?.addEventListener("change",o),()=>{t?.removeEventListener("change",o)}},[e]),null!==t?t:z()?.matches?"dark":"light"}(tg);return(0,i.jsx)("div",{...tp,style:{...ti,...tk},ref:tm,className:(0,a.Z)(["react-flow",r,ty]),"data-testid":"rf__wrapper",id:ta,children:(0,i.jsxs)(tE,{nodes:e,edges:t,width:tc,height:tu,fitView:e0,nodeOrigin:ef,nodeExtent:eS,children:[(0,i.jsx)(tx,{onInit:f,onNodeClick:u,onEdgeClick:g,onNodeMouseEnter:C,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:M,onNodeDoubleClick:j,nodeTypes:d,edgeTypes:c,connectionLineType:Y,connectionLineStyle:U,connectionLineComponent:G,connectionLineContainerStyle:J,selectionKeyCode:ee,selectionOnDrag:et,selectionMode:en,deleteKeyCode:q,multiSelectionKeyCode:er,panActivationKeyCode:eo,zoomActivationKeyCode:ei,onlyRenderVisibleElements:es,defaultViewport:ey,translateExtent:ex,minZoom:ev,maxZoom:ew,preventScrolling:eb,zoomOnScroll:eE,zoomOnPinch:ek,zoomOnDoubleClick:eP,panOnScroll:eN,panOnScrollSpeed:eM,panOnScrollMode:ej,panOnDrag:e_,onPaneClick:eD,onPaneMouseEnter:eR,onPaneMouseMove:eI,onPaneMouseLeave:eO,onPaneScroll:eA,onPaneContextMenu:eL,paneClickDistance:e$,nodeClickDistance:ez,onSelectionContextMenu:X,onSelectionStart:T,onSelectionEnd:W,onReconnect:eV,onReconnectStart:eZ,onReconnectEnd:eH,onEdgeContextMenu:eF,onEdgeDoubleClick:eX,onEdgeMouseEnter:eT,onEdgeMouseMove:eW,onEdgeMouseLeave:eK,reconnectRadius:eQ,defaultMarkerColor:eC,noDragClassName:eG,noWheelClassName:eJ,noPanClassName:eq,rfId:th,disableKeyboardA11y:e8,nodeExtent:eS,viewport:ts,onViewportChange:td}),(0,i.jsx)($,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:y,onConnectStart:v,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:b,nodesDraggable:ec,nodesConnectable:eu,nodesFocusable:eg,edgesFocusable:ep,edgesReconnectable:em,elementsSelectable:eh,elevateNodesOnSelect:e6,elevateEdgesOnSelect:e7,minZoom:ev,maxZoom:ew,nodeExtent:eS,onNodesChange:eY,onEdgesChange:eU,snapToGrid:ea,snapGrid:el,connectionMode:Q,translateExtent:ex,connectOnClick:e3,defaultEdgeOptions:e4,fitView:e0,fitViewOptions:e1,onNodesDelete:A,onEdgesDelete:L,onDelete:B,onNodeDragStart:P,onNodeDrag:_,onNodeDragStop:O,onSelectionDrag:H,onSelectionDragStart:Z,onSelectionDragStop:F,onMove:p,onMoveStart:m,onMoveEnd:h,noPanClassName:eq,nodeOrigin:ef,rfId:th,autoPanOnConnect:e9,autoPanOnNodeDrag:te,autoPanSpeed:tt,onError:tr,connectionRadius:tn,isValidConnection:to,selectNodesOnDrag:ed,nodeDragThreshold:tl,onBeforeDelete:K,paneClickDistance:e$,debug:tf}),(0,i.jsx)(D,{onSelectionChange:V}),eB,(0,i.jsx)(k,{proOptions:e5,position:e2}),(0,i.jsx)(S,{rfId:th,disableKeyboardA11y:e8})]})})});function tM({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,i.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:(0,a.Z)(["react-flow__background-pattern",n,o])})}function tj({radius:e,className:t}){return(0,i.jsx)("circle",{cx:e,cy:e,r:e,className:(0,a.Z)(["react-flow__background-pattern","dots",t])})}(o=r||(r={})).Lines="lines",o.Dots="dots",o.Cross="cross";let tP={[r.Dots]:1,[r.Lines]:1,[r.Cross]:6},t_=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function tD({id:e,variant:t=r.Dots,gap:n=20,size:o,lineWidth:l=1,offset:d=0,color:u,bgColor:g,style:f,className:m,patternClassName:h}){let y=(0,s.useRef)(null),{transform:v,patternId:w}=p(t_,c.X),x=o||tP[t],b=t===r.Dots,S=t===r.Cross,C=Array.isArray(n)?n:[n,n],E=[C[0]*v[2]||1,C[1]*v[2]||1],k=x*v[2],N=Array.isArray(d)?d:[d,d],M=S?[k,k]:E,j=[N[0]*v[2]||1+M[0]/2,N[1]*v[2]||1+M[1]/2],P=`${w}${e||""}`;return(0,i.jsxs)("svg",{className:(0,a.Z)(["react-flow__background",m]),style:{...f,...el,"--xy-background-color-props":g,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[(0,i.jsx)("pattern",{id:P,x:v[0]%E[0],y:v[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:b?(0,i.jsx)(tj,{radius:k/2,className:h}):(0,i.jsx)(tM,{dimensions:M,lineWidth:l,variant:t,className:h})}),(0,i.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}tD.displayName="Background";let tR=(0,s.memo)(tD);function tI(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,i.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function tO(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,i.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function tA(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,i.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function tL(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,i.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function t$(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,i.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function tz({children:e,className:t,...n}){return(0,i.jsx)("button",{type:"button",className:(0,a.Z)(["react-flow__controls-button",t]),...n,children:e})}let tB=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function tV({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:l,onZoomOut:s,onFitView:d,onInteractiveChange:u,className:g,children:f,position:h="bottom-left",orientation:y="vertical","aria-label":v="React Flow controls"}){let w=m(),{isInteractive:x,minZoomReached:b,maxZoomReached:S}=p(tB,c.X),{zoomIn:C,zoomOut:k,fitView:N}=eo();return(0,i.jsxs)(E,{className:(0,a.Z)(["react-flow__controls","horizontal"===y?"horizontal":"vertical",g]),position:h,style:e,"data-testid":"rf__controls","aria-label":v,children:[t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tz,{onClick:()=>{C(),l?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:S,children:(0,i.jsx)(tI,{})}),(0,i.jsx)(tz,{onClick:()=>{k(),s?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b,children:(0,i.jsx)(tO,{})})]}),n&&(0,i.jsx)(tz,{className:"react-flow__controls-fitview",onClick:()=>{N(r),d?.()},title:"fit view","aria-label":"fit view",children:(0,i.jsx)(tA,{})}),o&&(0,i.jsx)(tz,{className:"react-flow__controls-interactive",onClick:()=>{w.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),u?.(!x)},title:"toggle interactivity","aria-label":"toggle interactivity",children:x?(0,i.jsx)(t$,{}):(0,i.jsx)(tL,{})}),f]})}tV.displayName="Controls";let tZ=(0,s.memo)(tV),tH=(0,s.memo)(function({id:e,x:t,y:n,width:o,height:r,style:l,color:s,strokeColor:d,strokeWidth:c,className:u,borderRadius:g,shapeRendering:f,selected:p,onClick:m}){let{background:h,backgroundColor:y}=l||{};return(0,i.jsx)("rect",{className:(0,a.Z)(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:g,ry:g,width:o,height:r,style:{fill:s||h||y,stroke:d,strokeWidth:c},shapeRendering:f,onClick:m?t=>m(t,e):void 0})}),tF=e=>e.nodes.map(e=>e.id),tX=e=>e instanceof Function?e:()=>e,tT=(0,s.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:a,shapeRendering:s,NodeComponent:d,onClick:u}){let{node:g,x:f,y:m,width:h,height:y}=p(t=>{let n=t.nodeLookup.get(e),{x:o,y:r}=n.internals.positionAbsolute,{width:i,height:a}=(0,l.Rf)(n);return{node:n,x:o,y:r,width:i,height:a}},c.X);return g&&!g.hidden&&(0,l.nb)(g)?(0,i.jsx)(d,{x:f,y:m,width:h,height:y,style:g.style,selected:!!g.selected,className:o(g),color:t(g),borderRadius:r,strokeColor:n(g),strokeWidth:a,shapeRendering:s,onClick:u,id:g.id}):null});var tW=(0,s.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:a=tH,onClick:l}){let s=p(tF,c.X),d=tX(t),u=tX(e),g=tX(n),f="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,i.jsx)(i.Fragment,{children:s.map(e=>(0,i.jsx)(tT,{id:e,nodeColorFunc:d,nodeStrokeColorFunc:u,nodeClassNameFunc:g,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:a,onClick:l,shapeRendering:f},e))})});let tK=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?(0,l.oI)((0,l.W0)(e.nodeLookup),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}};function tQ({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:d=5,nodeStrokeWidth:u,nodeComponent:g,bgColor:f,maskColor:h,maskStrokeColor:y,maskStrokeWidth:v,position:w="bottom-right",onClick:x,onNodeClick:b,pannable:S=!1,zoomable:C=!1,ariaLabel:k="React Flow mini map",inversePan:N,zoomStep:M=10,offsetScale:j=5}){let P=m(),_=(0,s.useRef)(null),{boundingRect:D,viewBB:R,rfId:I,panZoom:O,translateExtent:A,flowWidth:L,flowHeight:$}=p(tK,c.X),z=e?.width??200,B=e?.height??150,V=Math.max(D.width/z,D.height/B),Z=V*z,H=V*B,F=j*V,X=D.x-(Z-D.width)/2-F,T=D.y-(H-D.height)/2-F,W=Z+2*F,K=H+2*F,Q=`react-flow__minimap-desc-${I}`,Y=(0,s.useRef)(0),U=(0,s.useRef)();Y.current=V,(0,s.useEffect)(()=>{if(_.current&&O)return U.current=(0,l.FD)({domNode:_.current,panZoom:O,getTransform:()=>P.getState().transform,getViewScale:()=>Y.current}),()=>{U.current?.destroy()}},[O]),(0,s.useEffect)(()=>{U.current?.update({translateExtent:A,width:L,height:$,inversePan:N,pannable:S,zoomStep:M,zoomable:C})},[S,C,N,M,A,L,$]);let G=b?(0,s.useCallback)((e,t)=>{b(e,P.getState().nodeLookup.get(t))},[]):void 0;return(0,i.jsx)(E,{position:w,style:{...e,"--xy-minimap-background-color-props":"string"==typeof f?f:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof h?h:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof y?y:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof v?v*V:void 0,"--xy-minimap-node-background-color-props":"string"==typeof o?o:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"string"==typeof u?u:void 0},className:(0,a.Z)(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,i.jsxs)("svg",{width:z,height:B,viewBox:`${X} ${T} ${W} ${K}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Q,ref:_,onClick:x?e=>{let[t,n]=U.current?.pointer(e)||[0,0];x(e,{x:t,y:n})}:void 0,children:[k&&(0,i.jsx)("title",{id:Q,children:k}),(0,i.jsx)(tW,{onClick:G,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:d,nodeClassName:r,nodeStrokeWidth:u,nodeComponent:g}),(0,i.jsx)("path",{className:"react-flow__minimap-mask",d:`M${X-F},${T-F}h${W+2*F}v${K+2*F}h${-W-2*F}z
|
2
|
-
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}tQ.displayName="MiniMap";let tY=(0,s.memo)(tQ);(0,s.memo)(function({nodeId:e,position:t,variant:n=l.pB.Handle,className:o,style:r={},children:d,color:c,minWidth:u=10,minHeight:g=10,maxWidth:f=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:h=!1,shouldResize:y,onResizeStart:v,onResize:w,onResizeEnd:x}){let b=eb(),S="string"==typeof e?e:b,C=m(),E=(0,s.useRef)(null),k=n===l.pB.Line?"right":"bottom-right",N=t??k,M=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(E.current&&S)return M.current||(M.current=(0,l.Cz)({domNode:E.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:o,parentLookup:r,nodeOrigin:i}=C.getState(),a=[],s={x:e.x,y:e.y},d=o.get(S);if(d&&d.expandParent&&d.parentId){let t=d.origin??i,n=e.width??d.measured.width,c=e.height??d.measured.height,u={id:d.id,parentId:d.parentId,rect:{width:n,height:c,...(0,l.ZB)({x:e.x??d.position.x,y:e.y??d.position.y},{width:n,height:c},d.parentId,o,t)}},g=(0,l.so)([u],o,r,i);a.push(...g),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*c,e.y):void 0}if(void 0!==s.x&&void 0!==s.y){let e={id:S,type:"position",position:{...s}};a.push(e)}if(void 0!==e.width&&void 0!==e.height){let t={id:S,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:e.width,height:e.height}};a.push(t)}for(let e of t){let t={...e,type:"position"};a.push(t)}n(a)},onEnd:()=>{C.getState().triggerNodeChanges([{id:S,type:"dimensions",resizing:!1}])}})),M.current.update({controlPosition:N,boundaries:{minWidth:u,minHeight:g,maxWidth:f,maxHeight:p},keepAspectRatio:h,onResizeStart:v,onResize:w,onResizeEnd:x,shouldResize:y}),()=>{M.current?.destroy()}},[N,u,g,f,p,h,v,w,x,y]);let j=N.split("-"),P=n===l.pB.Line?"borderColor":"backgroundColor",_=c?{...r,[P]:c}:r;return(0,i.jsx)("div",{className:(0,a.Z)(["react-flow__resize-control","nodrag",...j,n,o]),ref:E,style:_,children:d})})}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4833],{17094:function(e,t){t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t})}return!0}},44833:function(e,t,n){n.d(t,{uI:function(){return V}});var r=n(27378),o=n(23615),i=n.n(o),a=n(85556),c=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function u(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=c.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var l=[".DS_Store","Thumbs.db"];function s(e){return"object"==typeof e&&null!==e}function f(e){return e.filter(function(e){return -1===l.indexOf(e.name)})}function p(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function d(e){if("function"!=typeof e.webkitGetAsEntry)return m(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?g(t):m(e)}function m(e){var t=e.getAsFile();return t?Promise.resolve(u(t)):Promise.reject("".concat(e," is not a File"))}function v(e){return(0,a.mG)(this,void 0,void 0,function(){return(0,a.Jh)(this,function(t){return[2,e.isDirectory?g(e):function(e){return(0,a.mG)(this,void 0,void 0,function(){return(0,a.Jh)(this,function(t){return[2,new Promise(function(t,n){e.file(function(n){t(u(n,e.fullPath))},function(e){n(e)})})]})})}(e)]})})}function g(e){var t=e.createReader();return new Promise(function(e,n){var r=[];!function o(){var i=this;t.readEntries(function(t){return(0,a.mG)(i,void 0,void 0,function(){var i;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(t.length)return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return e(a.sent()),[3,4];case 3:return n(a.sent()),[3,4];case 4:return[3,6];case 5:i=Promise.all(t.map(v)),r.push(i),o(),a.label=6;case 6:return[2]}})})},function(e){n(e)})}()})}var y=n(17094);function b(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,t)||x(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var A=function(e){var t=Array.isArray(e=Array.isArray(e)&&1===e.length?e[0]:e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},F=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},E=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},k={code:"too-many-files",message:"Too many files"};function P(e,t){var n="application/x-moz-file"===e.type||(0,y.Z)(e,t);return[n,n?null:A(t)]}function S(e,t,n){if(C(e.size)){if(C(t)&&C(n)){if(e.size>n)return[!1,F(n)];if(e.size<t)return[!1,E(t)]}else if(C(t)&&e.size<t)return[!1,E(t)];else if(C(n)&&e.size>n)return[!1,F(n)]}return[!0,null]}function C(e){return null!=e}function z(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function R(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return"Files"===e||"application/x-moz-file"===e}):!!e.target&&!!e.target.files}function I(e){e.preventDefault()}function T(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some(function(t){return!z(e)&&t&&t.apply(void 0,[e].concat(r)),z(e)})}}function M(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function L(e){return/^.*\.[\w]+$/.test(e)}var _=["children"],B=["open"],K=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],G=["refKey","onChange","onClick"];function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,c=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,t)||U(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Z=(0,r.forwardRef)(function(e,t){var n=e.children,o=V(q(e,_)),i=o.open,a=q(o,B);return(0,r.useImperativeHandle)(t,function(){return{open:i}},[i]),r.createElement(r.Fragment,null,n(W(W({},a),{},{open:i})))});Z.displayName="Dropzone";var Y={disabled:!1,getFilesFromEvent:function(e){return(0,a.mG)(this,void 0,void 0,function(){return(0,a.Jh)(this,function(t){return s(e)&&s(e.dataTransfer)?[2,function(e,t){return(0,a.mG)(this,void 0,void 0,function(){var n;return(0,a.Jh)(this,function(r){switch(r.label){case 0:if(!e.items)return[3,2];if(n=p(e.items).filter(function(e){return"file"===e.kind}),"drop"!==t)return[2,n];return[4,Promise.all(n.map(d))];case 1:return[2,f(function e(t){return t.reduce(function(t,n){return(0,a.ev)((0,a.ev)([],(0,a.CR)(t),!1),(0,a.CR)(Array.isArray(n)?e(n):[n]),!1)},[])}(r.sent()))];case 2:return[2,f(p(e.files).map(function(e){return u(e)}))]}})})}(e.dataTransfer,e.type)]:s(e)&&s(e.target)?[2,p(e.target.files).map(function(e){return u(e)})]:Array.isArray(e)&&e.every(function(e){return"getFile"in e&&"function"==typeof e.getFile})?[2,function(e){return(0,a.mG)(this,void 0,void 0,function(){return(0,a.Jh)(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(e){return e.getFile()}))];case 1:return[2,t.sent().map(function(e){return u(e)})]}})})}(e)]:[2,[]]})})},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Z.defaultProps=Y,Z.propTypes={children:i().func,accept:i().objectOf(i().arrayOf(i().string)),multiple:i().bool,preventDropOnDocument:i().bool,noClick:i().bool,noKeyboard:i().bool,noDrag:i().bool,noDragEventsBubbling:i().bool,minSize:i().number,maxSize:i().number,maxFiles:i().number,disabled:i().bool,getFilesFromEvent:i().func,onFileDialogCancel:i().func,onFileDialogOpen:i().func,useFsAccessApi:i().bool,autoFocus:i().bool,onDragEnter:i().func,onDragLeave:i().func,onDragOver:i().func,onDrop:i().func,onDropAccepted:i().func,onDropRejected:i().func,onError:i().func,validator:i().func};var Q={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=W(W({},Y),e),n=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,u=t.multiple,l=t.maxFiles,s=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,d=t.onDrop,m=t.onDropAccepted,v=t.onDropRejected,g=t.onFileDialogCancel,y=t.onFileDialogOpen,h=t.useFsAccessApi,x=t.autoFocus,j=t.preventDropOnDocument,A=t.noClick,F=t.noKeyboard,E=t.noDrag,_=t.noDragEventsBubbling,B=t.onError,N=t.validator,Z=(0,r.useMemo)(function(){return function(e){if(C(e))return Object.entries(e).reduce(function(e,t){var n=O(t,2),r=n[0],o=n[1];return[].concat(b(e),[r],b(o))},[]).filter(function(e){return M(e)||L(e)}).join(",")}(n)},[n]),V=(0,r.useMemo)(function(){return C(n)?[{description:"Files",accept:Object.entries(n).filter(function(e){var t=O(e,2),n=t[0],r=t[1],o=!0;return M(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(L)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(e,t){var n=O(t,2),r=n[0],o=n[1];return D(D({},e),{},w({},r,o))},{})}]:n},[n]),et=(0,r.useMemo)(function(){return"function"==typeof y?y:ee},[y]),en=(0,r.useMemo)(function(){return"function"==typeof g?g:ee},[g]),er=(0,r.useRef)(null),eo=(0,r.useRef)(null),ei=J((0,r.useReducer)(X,Q),2),ea=ei[0],ec=ei[1],eu=ea.isFocused,el=ea.isFileDialogActive,es=(0,r.useRef)("undefined"!=typeof window&&window.isSecureContext&&h&&"showOpenFilePicker"in window),ef=function(){!es.current&&el&&setTimeout(function(){eo.current&&!eo.current.files.length&&(ec({type:"closeDialog"}),en())},300)};(0,r.useEffect)(function(){return window.addEventListener("focus",ef,!1),function(){window.removeEventListener("focus",ef,!1)}},[eo,el,en,es]);var ep=(0,r.useRef)([]),ed=function(e){er.current&&er.current.contains(e.target)||(e.preventDefault(),ep.current=[])};(0,r.useEffect)(function(){return j&&(document.addEventListener("dragover",I,!1),document.addEventListener("drop",ed,!1)),function(){j&&(document.removeEventListener("dragover",I),document.removeEventListener("drop",ed))}},[er,j]),(0,r.useEffect)(function(){return!o&&x&&er.current&&er.current.focus(),function(){}},[er,x,o]);var em=(0,r.useCallback)(function(e){B?B(e):console.error(e)},[B]),ev=(0,r.useCallback)(function(e){var t;e.preventDefault(),e.persist(),ek(e),ep.current=[].concat(function(e){if(Array.isArray(e))return $(e)}(t=ep.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||U(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e.target]),R(e)&&Promise.resolve(i(e)).then(function(t){if(!z(e)||_){var n,r,o,i,f,p,d,m,v=t.length,g=v>0&&(r=(n={files:t,accept:Z,minSize:c,maxSize:a,multiple:u,maxFiles:l,validator:N}).files,o=n.accept,i=n.minSize,f=n.maxSize,p=n.multiple,d=n.maxFiles,m=n.validator,(!!p||!(r.length>1))&&(!p||!(d>=1)||!(r.length>d))&&r.every(function(e){var t=O(P(e,o),1)[0],n=O(S(e,i,f),1)[0],r=m?m(e):null;return t&&n&&!r}));ec({isDragAccept:g,isDragReject:v>0&&!g,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e)}}).catch(function(e){return em(e)})},[i,s,em,_,Z,c,a,u,l,N]),eg=(0,r.useCallback)(function(e){e.preventDefault(),e.persist(),ek(e);var t=R(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&p&&p(e),!1},[p,_]),ey=(0,r.useCallback)(function(e){e.preventDefault(),e.persist(),ek(e);var t=ep.current.filter(function(e){return er.current&&er.current.contains(e)}),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),ep.current=t,!(t.length>0)&&(ec({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),R(e)&&f&&f(e))},[er,f,_]),eb=(0,r.useCallback)(function(e,t){var n=[],r=[];e.forEach(function(e){var t=J(P(e,Z),2),o=t[0],i=t[1],u=J(S(e,c,a),2),l=u[0],s=u[1],f=N?N(e):null;if(o&&l&&!f)n.push(e);else{var p=[i,s];f&&(p=p.concat(f)),r.push({file:e,errors:p.filter(function(e){return e})})}}),(!u&&n.length>1||u&&l>=1&&n.length>l)&&(n.forEach(function(e){r.push({file:e,errors:[k]})}),n.splice(0)),ec({acceptedFiles:n,fileRejections:r,type:"setFiles"}),d&&d(n,r,t),r.length>0&&v&&v(r,t),n.length>0&&m&&m(n,t)},[ec,u,Z,c,a,l,d,m,v,N]),eh=(0,r.useCallback)(function(e){e.preventDefault(),e.persist(),ek(e),ep.current=[],R(e)&&Promise.resolve(i(e)).then(function(t){(!z(e)||_)&&eb(t,e)}).catch(function(e){return em(e)}),ec({type:"reset"})},[i,eb,em,_]),eD=(0,r.useCallback)(function(){if(es.current){ec({type:"openDialog"}),et(),window.showOpenFilePicker({multiple:u,types:V}).then(function(e){return i(e)}).then(function(e){eb(e,null),ec({type:"closeDialog"})}).catch(function(e){e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)?(en(e),ec({type:"closeDialog"})):e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)?(es.current=!1,eo.current?(eo.current.value=null,eo.current.click()):em(Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):em(e)});return}eo.current&&(ec({type:"openDialog"}),et(),eo.current.value=null,eo.current.click())},[ec,et,en,h,eb,em,V,u]),ew=(0,r.useCallback)(function(e){er.current&&er.current.isEqualNode(e.target)&&(" "===e.key||"Enter"===e.key||32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),eD())},[er,eD]),eO=(0,r.useCallback)(function(){ec({type:"focus"})},[]),ex=(0,r.useCallback)(function(){ec({type:"blur"})},[]),ej=(0,r.useCallback)(function(){A||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return -1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/")}()?setTimeout(eD,0):eD())},[A,eD]),eA=function(e){return o?null:e},eF=function(e){return F?null:eA(e)},eE=function(e){return E?null:eA(e)},ek=function(e){_&&e.stopPropagation()},eP=(0,r.useMemo)(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=e.role,r=e.onKeyDown,i=e.onFocus,a=e.onBlur,c=e.onClick,u=e.onDragEnter,l=e.onDragOver,s=e.onDragLeave,f=e.onDrop,p=q(e,K);return W(W(H({onKeyDown:eF(T(r,ew)),onFocus:eF(T(i,eO)),onBlur:eF(T(a,ex)),onClick:eA(T(c,ej)),onDragEnter:eE(T(u,ev)),onDragOver:eE(T(l,eg)),onDragLeave:eE(T(s,ey)),onDrop:eE(T(f,eh)),role:"string"==typeof n&&""!==n?n:"presentation"},void 0===t?"ref":t,er),o||F?{}:{tabIndex:0}),p)}},[er,ew,eO,ex,ej,ev,eg,ey,eh,F,E,o]),eS=(0,r.useCallback)(function(e){e.stopPropagation()},[]),eC=(0,r.useMemo)(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=e.onChange,r=e.onClick,o=q(e,G);return W(W({},H({accept:Z,multiple:u,type:"file",style:{display:"none"},onChange:eA(T(n,eh)),onClick:eA(T(r,eS)),tabIndex:-1},void 0===t?"ref":t,eo)),o)}},[eo,n,u,eh,o]);return W(W({},ea),{},{isFocused:eu&&!o,getRootProps:eP,getInputProps:eC,rootRef:er,inputRef:eo,open:eA(eD)})}function X(e,t){switch(t.type){case"focus":return W(W({},e),{},{isFocused:!0});case"blur":return W(W({},e),{},{isFocused:!1});case"openDialog":return W(W({},Q),{},{isFileDialogActive:!0});case"closeDialog":return W(W({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return W(W({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return W(W({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return W({},Q);default:return e}}function ee(){}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5246],{58754:function(e,t,n){var r=n(24246),i=n(56351),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:u,...c}=e;return(0,r.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,r.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,r.jsx)(i.X6q,{className:n||l?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,r.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,r.jsx)(s.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},10342:function(e,t,n){var r=n(24246),i=n(56351),s=n(91613);t.Z=e=>{let{title:t,tooltip:n,children:a,...l}=e;return(0,r.jsxs)(i.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...l,children:[(0,r.jsxs)(i.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[t,n?(0,r.jsx)(i.xvT,{as:"span",mx:1,children:(0,r.jsx)(s.Z,{label:n})}):void 0]}),(0,r.jsx)(i.Kqy,{p:6,spacing:6,children:a})]})}},70788:function(e,t,n){n.d(t,{m:function(){return u}});var r=n(24246),i=n(56351),s=n(79894),a=n.n(s),l=n(27378);let{Text:o}=i.AntTypography,u=e=>{let{items:t,...n}=e,s=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,l={...e},u=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,r.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),u)?l.title=(0,r.jsx)(i.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,r.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,r.jsx)(i.zrq,{items:s,...n})}},67810:function(e,t,n){n.d(t,{Z:function(){return s}}),(r=i||(i={})).PRIVACY_REQUEST_REVIEW_APPROVE="privacy_request_review_approve",r.PRIVACY_REQUEST_REVIEW_DENY="privacy_request_review_deny",r.PRIVACY_REQUEST_RECEIPT="privacy_request_receipt",r.PRIVACY_REQUEST_COMPLETE_ACCESS="privacy_request_complete_access",r.PRIVACY_REQUEST_COMPLETE_DELETION="privacy_request_complete_deletion",r.SUBJECT_IDENTITY_VERIFICATION="subject_identity_verification";var r,i,s={[i.PRIVACY_REQUEST_COMPLETE_ACCESS]:"Access request completed",[i.PRIVACY_REQUEST_COMPLETE_DELETION]:"Erasure request completed",[i.PRIVACY_REQUEST_RECEIPT]:"Privacy request received",[i.PRIVACY_REQUEST_REVIEW_APPROVE]:"Privacy request approved",[i.PRIVACY_REQUEST_REVIEW_DENY]:"Privacy request denied",[i.SUBJECT_IDENTITY_VERIFICATION]:"Subject identity verification"}},20149:function(e,t,n){var r=n(24246),i=n(77830),s=n(56351),a=n(34090),l=n(86677),o=n(16134),u=n(10342),c=n(40324),d=n(51472),p=n(67810),m=n(64826);let g=()=>{var e;let t=(0,o.C)(m.Zp),n=(0,o.C)(m.G1);(0,m.gz)({page:t,size:n});let i=(0,o.C)(m.YO),{values:s,setFieldValue:l}=(0,a.u6)();return(0,r.jsx)(d.Z,{label:"Associated properties",addButtonLabel:"Add property",idField:"id",nameField:"name",allItems:i.map(e=>({id:e.id,name:e.name})),values:null!==(e=s.properties)&&void 0!==e?e:[],setValues:e=>l("properties",e),draggable:!0,maxHeight:100,baseTestId:"property"})};t.Z=e=>{let{template:t,handleSubmit:n,handleDelete:o}=e,d=(0,l.useRouter)(),m=()=>{d.push(i.q)},f={type:t.type,content:t.content,properties:t.properties||[],is_enabled:t.is_enabled,id:t.id||""};return(0,r.jsx)(a.J9,{enableReinitialize:!0,initialValues:f,onSubmit:n,children:e=>{let{dirty:t,isValid:n,isSubmitting:i}=e;return(0,r.jsxs)(a.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[(0,r.jsx)(s.xuv,{py:3,children:(0,r.jsxs)(u.Z,{title:"".concat(p.Z[f.type]),children:[(0,r.jsx)(c.j0,{isRequired:!0,label:"Email subject",name:"content.subject",variant:"stacked"}),(0,r.jsx)(c.Ks,{isRequired:!0,label:"Message body",name:"content.body",value:"test",variant:"stacked",resize:!0}),(0,r.jsx)(s.xuv,{py:3,children:(0,r.jsx)(g,{})}),(0,r.jsx)(c.w8,{name:"is_enabled",label:"Enable message",variant:"switchFirst"})]})}),(0,r.jsxs)(s.kCb,{justifyContent:"space-between",width:"100%",paddingTop:2,children:[f.id&&o&&(0,r.jsx)(s.wpx,{"data-testid":"delete-template-button",loading:!1,className:"mr-3",onClick:o,children:"Delete"}),(0,r.jsxs)(s.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:[(0,r.jsx)(s.wpx,{loading:!1,className:"mr-3",onClick:m,children:"Cancel"}),(0,r.jsx)(s.wpx,{htmlType:"submit",type:"primary",disabled:i||!t||!n,loading:i,"data-testid":"submit-btn",children:"Save"})]})]})]})}})}},5058:function(e,t,n){n.d(t,{Vw:function(){return s},ms:function(){return r},pS:function(){return i},vm:function(){return a}});let{useGetSummaryMessagingTemplatesQuery:r,usePutMessagingTemplateByIdMutation:i,useCreateMessagingTemplateByTypeMutation:s,usePatchMessagingTemplateByIdMutation:a}=n(78780).u.injectEndpoints({endpoints:e=>({getSummaryMessagingTemplates:e.query({query:e=>({method:"GET",url:"plus/messaging/templates/summary",params:e}),providesTags:()=>["Property-Specific Messaging Templates"]}),putMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PUT",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),patchMessagingTemplateById:e.mutation({query:e=>{let{templateId:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"PATCH",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]}),createMessagingTemplateByType:e.mutation({query:e=>{let{templateType:t,template:n}=e;return{url:"plus/messaging/templates/".concat(t),method:"POST",body:n}},invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},47466:function(e,t,n){n.d(t,{KC:function(){return a},ew:function(){return l},gQ:function(){return s},jM:function(){return r},lE:function(){return i}});let{useGetMessagingTemplatesQuery:r,useUpdateMessagingTemplatesMutation:i,useGetMessagingTemplateByIdQuery:s,useGetMessagingTemplateDefaultQuery:a,useDeleteMessagingTemplateByIdMutation:l}=n(78780).u.injectEndpoints({endpoints:e=>({getMessagingTemplates:e.query({query:()=>({url:"messaging/templates"}),providesTags:()=>["Messaging Templates"]}),updateMessagingTemplates:e.mutation({query:e=>({url:"messaging/templates",method:"PUT",body:e}),invalidatesTags:()=>["Messaging Templates"]}),getMessagingTemplateById:e.query({query:e=>({url:"/messaging/templates/".concat(e)}),providesTags:()=>["Property-Specific Messaging Templates"]}),getMessagingTemplateDefault:e.query({query:e=>({url:"/messaging/templates/default/".concat(e)})}),deleteMessagingTemplateById:e.mutation({query:e=>({url:"/messaging/templates/".concat(e),method:"DELETE"}),invalidatesTags:()=>["Property-Specific Messaging Templates"]})})})},31883:function(e,t,n){n.d(t,{Bw:function(){return r.Bw},D4:function(){return r.D4}});var r=n(19043)},51959:function(e,t,n){n.d(t,{t:function(){return R}});var r=n(24246),i=n(45487),s=n(27378);let a=(0,s.createContext)(null);var l=n(38565),o=n(96681),u=n(10010),c=n(40179);let d=(0,s.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:d,values:g,...f},y){let h=(0,o.h)(()=>(0,l.E)(t)),x=[],E=(0,s.useRef)(!1);return(0,i.k)(!!g,"Reorder.Group must be provided a values prop"),(0,s.useEffect)(()=>{E.current=!1}),(0,r.jsx)(h,{...f,ref:y,ignoreStrict:!0,children:(0,r.jsx)(a.Provider,{value:{axis:n,registerItem:(e,t)=>{let r=x.findIndex(t=>e===t.value);-1!==r?x[r].layout=t[n]:x.push({value:e,layout:t[n]}),x.sort(m)},updateOrder:(e,t,n)=>{if(E.current)return;let r=function(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(-1===i)return e;let s=r>0?1:-1,a=e[i+s];if(!a)return e;let l=e[i],o=a.layout,d=(0,c.t)(o.min,o.max,.5);return 1===s&&l.layout.max+n>d||-1===s&&l.layout.min+n<d?(0,u.uo)(e,i,i+s):e}(x,e,t,n);x!==r&&(E.current=!0,d(r.map(p).filter(e=>-1!==g.indexOf(e))))}},children:e})})});function p(e){return e.value}function m(e,t){return e.layout.min-t.layout.min}var g=n(33234),f=n(16014);function y(e){let t=(0,o.h)(()=>(0,g.BX)(e)),{isStatic:n}=(0,s.useContext)(f._);if(n){let[,n]=(0,s.useState)(e);(0,s.useEffect)(()=>t.on("change",n),[])}return t}var h=n(71884);let x=e=>e&&"object"==typeof e&&e.mix,E=e=>x(e)?e.mix:void 0;var v=n(58868),T=n(26166);function b(e,t){let n=y(t()),r=()=>n.set(t());return r(),(0,v.L)(()=>{let t=()=>T.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,T.Pn)(r)}}),n}function _(e,t){let n=(0,o.h)(()=>[]);return b(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var C=n(40406);function j(e,t=0){return(0,C.i)(e)?e:y(t)}let R={Group:d,Item:(0,s.forwardRef)(function({children:e,style:t={},value:n,as:u="li",onDrag:c,layout:d=!0,...p},m){let f=(0,o.h)(()=>(0,l.E)(u)),y=(0,s.useContext)(a),x={x:j(t.x),y:j(t.y)},v=function(e,t,n,r){if("function"==typeof e)return function(e){g.S1.current=[],e();let t=b(g.S1.current,e);return g.S1.current=void 0,t}(e);let i="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],s=e[2+n],a=e[3+n],l=(0,h.s)(i,s,{mixer:E(s[0]),...a});return t?l(r):l}(t,void 0,void 0);return Array.isArray(e)?_(e,i):_([e],([e])=>i(e))}([x.x,x.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!y,"Reorder.Item must be a child of Reorder.Group");let{axis:T,registerItem:C,updateOrder:R}=y;return(0,r.jsx)(f,{drag:T,...p,dragSnapToOrigin:!0,style:{...t,x:x.x,y:x.y,zIndex:v},layout:d,onDrag:(e,t)=>{let{velocity:r}=t;r[T]&&R(n,x[T].get(),r[T]),c&&c(e,t)},onLayoutMeasure:e=>C(n,e),ref:m,ignoreStrict:!0,children:e})})}},60153:function(e,t,n){n.d(t,{o:function(){return a}});var r=n(96681);class i{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}}let s=()=>new i;function a(){return(0,r.h)(s)}},76649:function(e,t,n){n.d(t,{Ln:function(){return r}});let r=(e,t)=>s(e,t),i=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class a{static narrow(e){return new a(t=>r(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>r(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}}]);
|