ethyca-fides 2.60.1b2__py2.py3-none-any.whl → 2.60.1rc0__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.
Files changed (202) hide show
  1. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/METADATA +1 -1
  2. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/RECORD +188 -189
  3. fides/_version.py +3 -3
  4. fides/api/api/deps.py +2 -18
  5. fides/api/api/v1/endpoints/admin.py +3 -4
  6. fides/api/app_setup.py +5 -13
  7. fides/api/db/database.py +14 -11
  8. fides/api/db/seed.py +85 -88
  9. fides/api/util/data_category.py +0 -1
  10. fides/api/util/logger.py +0 -6
  11. fides/ui-build/static/admin/404.html +1 -1
  12. fides/ui-build/static/admin/_next/static/chunks/{1100-574adc8f50f9ef3a.js → 1100-c3d52c9d7d6d0a39.js} +1 -1
  13. fides/ui-build/static/admin/_next/static/chunks/{1817-ee8d8da2ea918cb2.js → 1817-64ec6ac3d4a06930.js} +1 -1
  14. fides/ui-build/static/admin/_next/static/chunks/{1904-3aa43570520790fc.js → 1904-00404c45e69d3225.js} +1 -1
  15. fides/ui-build/static/admin/_next/static/chunks/{2479-b91631f5e7ad58fe.js → 2479-064aefb3d187d6a2.js} +1 -1
  16. fides/ui-build/static/admin/_next/static/chunks/{3503-f8b68879ea28e6ee.js → 3503-296468f82b067ec4.js} +1 -1
  17. fides/ui-build/static/admin/_next/static/chunks/3513-d03549cb201e7938.js +1 -0
  18. fides/ui-build/static/admin/_next/static/chunks/{3702-95692cf4ec13e698.js → 3702-929a386a64d55f19.js} +1 -1
  19. fides/ui-build/static/admin/_next/static/chunks/{3855-cf98ef0345aa9cca.js → 3855-3345160a78baa978.js} +1 -1
  20. fides/ui-build/static/admin/_next/static/chunks/{3872-7382a9d55bb94d53.js → 3872-d7045d15aafffa12.js} +1 -1
  21. fides/ui-build/static/admin/_next/static/chunks/{401-f18cd4739b98ce74.js → 401-1ba7e037992ac460.js} +1 -1
  22. fides/ui-build/static/admin/_next/static/chunks/{4060-891319185929d1ae.js → 4060-dd7b6e0472703a2e.js} +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/{4121-6d5719d695f696ca.js → 4121-01c43bbbfc6b8fd1.js} +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/{4481-c587763cfbc603c7.js → 4481-cd91353711218b86.js} +1 -1
  25. fides/ui-build/static/admin/_next/static/chunks/{5487-1035279f9f4aaa81.js → 5487-fd9b930f4246520a.js} +1 -1
  26. fides/ui-build/static/admin/_next/static/chunks/{5826-dbb96ab3cc360ed4.js → 5826-5f6e7a91e9ff71d1.js} +1 -1
  27. fides/ui-build/static/admin/_next/static/chunks/5835-057c2dec5117817c.js +1 -0
  28. fides/ui-build/static/admin/_next/static/chunks/{5973-6bb609a5771dfe2a.js → 5973-9199898696748d0c.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/{6277-70d615c50ac54e1d.js → 6277-6c465012cef1bd3d.js} +1 -1
  30. fides/ui-build/static/admin/_next/static/chunks/{6372-a91f7f83fd6d2fd2.js → 6372-e35fc0a8874fdecf.js} +1 -1
  31. fides/ui-build/static/admin/_next/static/chunks/{6853-38e3fd5a7b1bde87.js → 6853-df71f47693b139d3.js} +1 -1
  32. fides/ui-build/static/admin/_next/static/chunks/{6954-92f362ffea739388.js → 6954-00d6683243cc75d8.js} +1 -1
  33. fides/ui-build/static/admin/_next/static/chunks/{7751-b61c0979c4f5ba79.js → 7751-b3af4819eac0bc9c.js} +1 -1
  34. fides/ui-build/static/admin/_next/static/chunks/{79-82c500f39db614d1.js → 79-110e5199495a81c7.js} +1 -1
  35. fides/ui-build/static/admin/_next/static/chunks/{8433-8d6487450daa5dcf.js → 8433-2c6947927b1e74f5.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/{8934-5e141988ad7c1000.js → 8934-41284e609c329cdd.js} +1 -1
  37. fides/ui-build/static/admin/_next/static/chunks/9282-6b14898de61ba6f0.js +1 -0
  38. fides/ui-build/static/admin/_next/static/chunks/{9327-1b672d64969cfafb.js → 9327-2be9f27fbce039b0.js} +1 -1
  39. fides/ui-build/static/admin/_next/static/chunks/{9392.bfca299d4f39a9e0.js → 9392.9178313b7a01d889.js} +1 -1
  40. fides/ui-build/static/admin/_next/static/chunks/{9572-235d37e0b7db0257.js → 9572-c3e70eb702e9d879.js} +1 -1
  41. fides/ui-build/static/admin/_next/static/chunks/{9676.97fdbec9c2a48c68.js → 9676.d1e42fd1d03c4a76.js} +1 -1
  42. fides/ui-build/static/admin/_next/static/chunks/{9719-f411ae7eaf9ca1e8.js → 9719-8ce33427015f12ae.js} +1 -1
  43. fides/ui-build/static/admin/_next/static/chunks/{9767-8d96e7f8fd72eadc.js → 9767-e8b0b48d602451d8.js} +1 -1
  44. fides/ui-build/static/admin/_next/static/chunks/{9951-d8d18047e05b1df4.js → 9951-d8d1174b00f9dac1.js} +1 -1
  45. fides/ui-build/static/admin/_next/static/chunks/{9965-4149f5bb9ccf2c54.js → 9965-023779db7a1b4aa2.js} +1 -1
  46. fides/ui-build/static/admin/_next/static/chunks/pages/{404-599d88e7bb11c133.js → 404-73e79d3760ef2658.js} +1 -1
  47. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-e2f86c400e5d4c5d.js → _app-79807dd0b151eaa4.js} +9 -9
  48. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-2b39e3d90b16c88d.js → manual-2edda5eb5412ffb2.js} +1 -1
  49. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-aed3ff8f334381ad.js → multiple-27c3bdcc05a1f18e.js} +1 -1
  50. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-2c64d0a87784019b.js +1 -0
  51. fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-4cad8b20c7fa422c.js → ant-poc-3c256e928748177a.js} +1 -1
  52. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-c3f11050818ddba3.js → add-vendors-b3d62016149e5aa4.js} +1 -1
  53. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-7d3f39e6207c0d4d.js → configure-790c7c61ff9500f1.js} +1 -1
  54. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-df8bbe621a78f0ff.js → [id]-6641f24adf72b00c.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-7f38473ce267348a.js → new-300fd2800c417d0b.js} +1 -1
  56. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-08bcc477fa5544b6.js → privacy-experience-f0ba90152c43c742.js} +1 -1
  57. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-77f44ebc908dfbbc.js → [id]-669b1039a5f0dcb6.js} +1 -1
  58. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-79c27e52c8c8f621.js → new-e24975eaeedc7c51.js} +1 -1
  59. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-22693568fd342608.js → privacy-notices-90b331a666216e38.js} +1 -1
  60. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-4bce89ef8e17866f.js → properties-b9919fa183e9308a.js} +1 -1
  61. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-c71f7e3ef8a3bdd4.js → reporting-1762ed46d98cebad.js} +1 -1
  62. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-49cec8727ba462e1.js → consent-07bc6a18cbad414a.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-810bd0acfa7ae444.js → [projectUrn]-864af917f60d8f35.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-a637d57347ad4bd7.js → projects-45ac2c54f21a57d5.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-f416c61699380589.js → data-catalog-8e0bc6d01176081a.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-d59f6f49d91c4166.js → [systemId]-a1259aa44bf99194.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-fc99be4f494946cf.js → [monitorId]-a8b44307dfd5c23e.js} +1 -1
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-36e75ed0154c9d07.js → action-center-333964fc8ce20616.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-aec2dd0d89d11c1f.js → activity-438ab93c6cd5c2a6.js} +1 -1
  70. fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-359ab1b6513a5329.js → datamap-05144da6383ba6a4.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-4ae24f9f954ea59f.js → [...subfieldNames]-a3311bdf11e5bb1b.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-294442f48f0b1d80.js → [collectionName]-b584029b66084b2a.js} +1 -1
  73. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-c73892f2cc94bf64.js → [datasetId]-2ababde59fc9efb4.js} +1 -1
  74. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-60a80195eafe9839.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-9b3ab8de38e343b9.js → dataset-5190a42b4bddac7d.js} +1 -1
  76. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-2b2d8474ff4a7ec3.js → [id]-63af795429688cac.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-32ff2757c1fb5a00.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-3a196ef552fb5352.js → datastore-connection-92dce084869b6a94.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/{index-e5fa3ad65420815b.js → index-7220a947bb52c5a8.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-900e1581de2811c1.js → [id]-5a600a16f2ad5fa0.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-750f32b5bd24542a.js → integrations-372906eb228e73b7.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-d4b136d56734e0b2.js → [id]-34e5d096311c5aab.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-bd5d5c3a62e2e6bc.js → add-template-722590a322ea866b.js} +1 -1
  84. fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-226fdc9ccf65bf88.js → messaging-77726c8d9ad39a64.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-f208ea9573f5d16f.js → [id]-12037a323158a7be.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-9103ff5824f10280.js → messaging-df490b611f1360fa.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-ccc8829fb8e6d889.js → storage-8575fd1d25457b4d.js} +1 -1
  88. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-f0fcddade8258445.js → configure-66c6d3725fc1861f.js} +1 -1
  89. fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-0cd0024113f958da.js → privacy-requests-ff5856fc531097b2.js} +1 -1
  90. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-dd197054dacf6c99.js → [id]-7f8cc582fc11b46d.js} +1 -1
  91. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-2b204911aadeef3b.js → add-property-b739361d2b5714db.js} +1 -1
  92. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-1cdb0094c4caf07e.js → properties-febd16a18011fd1e.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-4aafe0b82fe05626.js → datamap-6d046c2bf03ce067.js} +1 -1
  94. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-1b1273e9eb69ac45.js → about-95e9953afaad9260.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-e4bee84add8a913b.js → [purpose_id]-0d593a93ef57dbd7.js} +1 -1
  96. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-41e6213e69789c1b.js +1 -0
  97. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-298fa77e090bf7cb.js → custom-fields-d6e18187d6412a34.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-3b59fd523eee38fc.js → domain-records-0392d1bc2b8ec616.js} +1 -1
  99. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-db42cce5ec0ca55b.js +1 -0
  100. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-297f558258a46f74.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-84f0c04250972998.js → locations-38ce7883fd27b61f.js} +1 -1
  102. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-3dc30591cc0a8881.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-259d0c058065e14d.js → regulations-22d97471513e835d.js} +1 -1
  104. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-f408ebdc01892ff0.js +1 -0
  105. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-3a2a18084f89dc04.js → [id]-69e582763772aec9.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-c921992c82514912.js → systems-d7a63f851cc99583.js} +1 -1
  107. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-244453d6d5413d6c.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-7546e00c78835823.js → [id]-f29f0fbd62e10b6d.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-a207e8f745c7e26b.js → user-management-f2dc8220e4aab9d7.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/{webpack-ebb8d3b45b871241.js → webpack-32c43a8d709ca5c6.js} +1 -1
  111. fides/ui-build/static/admin/_next/static/pNwRIyc_W4mC7MPm4ebOC/_buildManifest.js +1 -0
  112. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  113. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  114. fides/ui-build/static/admin/add-systems.html +1 -1
  115. fides/ui-build/static/admin/ant-poc.html +1 -1
  116. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  117. fides/ui-build/static/admin/consent/configure.html +1 -1
  118. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  119. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  120. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  121. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  122. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  123. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  124. fides/ui-build/static/admin/consent/properties.html +1 -1
  125. fides/ui-build/static/admin/consent/reporting.html +1 -1
  126. fides/ui-build/static/admin/consent.html +1 -1
  127. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  128. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  129. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  130. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  131. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  132. fides/ui-build/static/admin/data-catalog.html +1 -1
  133. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  134. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  135. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  136. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  137. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  138. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  139. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  140. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  141. fides/ui-build/static/admin/datamap.html +1 -1
  142. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  143. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  144. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  145. fides/ui-build/static/admin/dataset/new.html +1 -1
  146. fides/ui-build/static/admin/dataset.html +1 -1
  147. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  148. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  149. fides/ui-build/static/admin/datastore-connection.html +1 -1
  150. fides/ui-build/static/admin/index.html +1 -1
  151. fides/ui-build/static/admin/integrations/[id].html +1 -1
  152. fides/ui-build/static/admin/integrations.html +1 -1
  153. fides/ui-build/static/admin/login/[provider].html +1 -1
  154. fides/ui-build/static/admin/login.html +1 -1
  155. fides/ui-build/static/admin/messaging/[id].html +1 -1
  156. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  157. fides/ui-build/static/admin/messaging.html +1 -1
  158. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  159. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  160. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  161. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  162. fides/ui-build/static/admin/privacy-requests.html +1 -1
  163. fides/ui-build/static/admin/properties/[id].html +1 -1
  164. fides/ui-build/static/admin/properties/add-property.html +1 -1
  165. fides/ui-build/static/admin/properties.html +1 -1
  166. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  167. fides/ui-build/static/admin/settings/about.html +1 -1
  168. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  169. fides/ui-build/static/admin/settings/consent.html +1 -1
  170. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  171. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  172. fides/ui-build/static/admin/settings/domains.html +1 -1
  173. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  174. fides/ui-build/static/admin/settings/locations.html +1 -1
  175. fides/ui-build/static/admin/settings/organization.html +1 -1
  176. fides/ui-build/static/admin/settings/regulations.html +1 -1
  177. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  178. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  179. fides/ui-build/static/admin/systems.html +1 -1
  180. fides/ui-build/static/admin/taxonomy.html +1 -1
  181. fides/ui-build/static/admin/user-management/new.html +1 -1
  182. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  183. fides/ui-build/static/admin/user-management.html +1 -1
  184. fides/api/util/sqlalchemy_filter.py +0 -30
  185. fides/ui-build/static/admin/_next/static/HyMhUkISr3pFS0ViVCWuo/_buildManifest.js +0 -1
  186. fides/ui-build/static/admin/_next/static/chunks/3505-a94b641168547225.js +0 -1
  187. fides/ui-build/static/admin/_next/static/chunks/3513-bcef489f2c8e30e1.js +0 -1
  188. fides/ui-build/static/admin/_next/static/chunks/69-5f2103ace46481d6.js +0 -1
  189. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-72768fa90f31d936.js +0 -1
  190. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-274b8cf0932e2741.js +0 -1
  191. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-fc637b767513d3fb.js +0 -1
  192. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-60f6d15fa6c6b1af.js +0 -1
  193. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-1c1f4f775561e528.js +0 -1
  194. fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-ebb37a1ae630931a.js +0 -1
  195. fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-2fcbf2b113dce00c.js +0 -1
  196. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-7bf0c1ff8d1d09cf.js +0 -1
  197. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-07d26364d187c7c3.js +0 -1
  198. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/WHEEL +0 -0
  199. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/entry_points.txt +0 -0
  200. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/licenses/LICENSE +0 -0
  201. {ethyca_fides-2.60.1b2.dist-info → ethyca_fides-2.60.1rc0.dist-info}/top_level.txt +0 -0
  202. /fides/ui-build/static/admin/_next/static/{HyMhUkISr3pFS0ViVCWuo → pNwRIyc_W4mC7MPm4ebOC}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5023],{74245:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/add-systems",function(){return n(5923)}])},69e3:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(91507),a=n.n(r);t.Z=e=>{let{color:t,description:n,title:r,icon:l}=e;return(0,s.jsx)(i.xuv,{borderLeft:"9px solid ".concat(t),borderRadius:"6px",className:a().container,children:(0,s.jsxs)(i.V4A,{className:a().card,"data-testid":"tile-".concat(r),children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[l,(0,s.jsx)(i.AntTypography.Title,{level:3,children:r})]}),(0,s.jsx)(i.AntTypography.Text,{children:n})]})})}},77867:function(e,t,n){"use strict";var s=n(24246),i=n(91942);t.Z=e=>{let{connected:t,...n}=e,r="red.500";return null==t?r="gray.300":t&&(r="green.500"),(0,s.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:r,...n})}},59301:function(e,t,n){"use strict";var s=n(24246);let{Link:i}=n(91942).AntTypography;t.Z=e=>(0,s.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var s=n(24246),i=n(91942),r=n(88038),a=n.n(r),l=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,l.useRouter)();return(0,s.jsx)(i.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(i.xuv,{children:[(0,s.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(i.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,s.jsxs)(i.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:n,padded:r=!0,mainProps:d}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,p=!(m.flags.privacyRequestsConfiguration&&x),{data:y}=(0,c.JE)(void 0,{skip:p}),{data:g}=(0,c.PW)(void 0,{skip:p}),j=m.flags.privacyRequestsConfiguration&&(!y||!g)&&x;return(0,s.jsxs)(i.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,s.jsxs)(a(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(i.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[j?(0,s.jsx)(u,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:c,...d}=e;return(0,s.jsxs)("div",{...d,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",...c}:{paddingBottom:"24px",...c},children:[(0,s.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(i.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,s.jsx)(r.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var s=n(24246),i=n(91942),r=n(34090),a=n(27378),l=n(46238),o=n(40324);let c=e=>{let{name:t,label:n,labelProps:c,tooltip:d,isRequired:u,layout:m="inline",helperText:h,...x}=e,[p,y,{setValue:g}]=(0,r.U$)(t),j=!!(y.touched&&y.error),[f,v]=(0,a.useState)("");p.value||"tags"!==x.mode&&"multiple"!==x.mode||(p.value=[]),"tags"===x.mode&&"string"==typeof p.value&&(p.value=[p.value]);let b="tags"===x.mode?(e,t)=>e?e.value!==f||p.value.includes(f)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(f,'"'):void 0:x.optionRender||void 0,C=e=>{v(e),x.onSearch&&x.onSearch(e)},w=(e,t)=>{g(e),x.onChange&&x.onChange(e,t)};return"inline"===m?(0,s.jsx)(i.NIc,{isInvalid:j,isRequired:u,children:(0,s.jsxs)(i.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,s.jsx)(o.__,{htmlFor:x.id||t,...c,children:n}):null,(0,s.jsxs)(i.jqI,{align:"center",children:[(0,s.jsxs)(i.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(i.WPr,{...p,id:x.id||t,"data-testid":"controlled-select-".concat(p.name),...x,optionRender:b,onSearch:"tags"===x.mode?C:void 0,onChange:w,value:p.value||void 0,status:j?"error":void 0}),h&&(0,s.jsx)(i.Q6r,{children:h}),(0,s.jsx)(o.Bc,{isInvalid:j,message:y.error,fieldName:p.name})]}),(0,s.jsx)(l.b,{label:d})]})]})}):(0,s.jsx)(i.NIc,{isInvalid:j,isRequired:u,children:(0,s.jsxs)(i.gCW,{alignItems:"start",children:[(0,s.jsxs)(i.jqI,{align:"center",children:[n?(0,s.jsx)(o.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...c,children:n}):null,(0,s.jsx)(l.b,{label:d})]}),(0,s.jsx)(i.WPr,{...p,id:x.id||t,"data-testid":"controlled-select-".concat(p.name),...x,optionRender:b,onSearch:"tags"===x.mode?C:void 0,onChange:w,value:p.value||void 0,status:j?"error":void 0}),h&&(0,s.jsx)(i.Q6r,{style:{marginTop:0},children:h}),(0,s.jsx)(o.Bc,{isInvalid:j,message:y.error,fieldName:p.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return i},cj:function(){return x},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return d}});var s,i,r=n(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(s=i||(i={})).GVL="gvl",s.AC="gacp",s.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return r},V:function(){return s.V}});var s=n(84306),i=n(812);let r=()=>{let{errorAlert:e}=(0,s.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,i.Ot)(t)?n=t.data.detail:(0,i.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(24246),i=n(91942);let r=()=>{let e=(0,i.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,s.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(i.zMQ,{}),(0,s.jsxs)(i.xuv,{children:[n&&(0,s.jsx)(i.CdC,{children:n}),(0,s.jsx)(i.XaZ,{children:t})]}),(0,s.jsx)(i.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},16220:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var s=n(25980),i=n(77830);let r=()=>({systemOrDatamapRoute:(0,s.hz)().plus?i.oG:i.So})},58452:function(e,t,n){"use strict";var s=n(24246),i=n(91942);t.Z=e=>{let{isOpen:t,onClose:n,onConfirm:r,onCancel:a,title:l,message:o,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:m,isCentered:h,testId:x="confirmation-modal",icon:p}=e;return(0,s.jsxs)(i.u_l,{isOpen:t,onClose:n,size:"lg",returnFocusOnClose:null==m||m,isCentered:h,children:[(0,s.jsx)(i.ZAr,{}),(0,s.jsxs)(i.hzk,{textAlign:"center",p:6,"data-testid":x,children:[p?(0,s.jsx)(i.M5Y,{mb:2,children:p}):null,l?(0,s.jsx)(i.xBx,{fontWeight:"medium",pb:0,children:l}):null,o?(0,s.jsx)(i.fef,{children:o}):null,(0,s.jsx)(i.mzw,{children:(0,s.jsxs)(i.MIq,{columns:2,width:"100%",children:[(0,s.jsx)(i.wpx,{onClick:()=>{a&&a(),n()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,s.jsx)(i.wpx,{type:"primary",size:"large",onClick:r,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},57899:function(e,t,n){"use strict";var s=n(24246),i=n(91942),r=n(27378);t.Z=e=>{let{handleConfirm:t,isOpen:n,onClose:a,title:l,message:o,confirmButtonText:c="Continue",cancelButtonText:d="Cancel"}=e,u=(0,r.useRef)(null);return(0,s.jsx)(i.aRR,{isOpen:n,leastDestructiveRef:u,onClose:a,children:(0,s.jsx)(i.dhV,{children:(0,s.jsxs)(i._Tf,{alignItems:"center",textAlign:"center",children:[(0,s.jsx)(i.aNP,{marginTop:3}),(0,s.jsx)(i.fYl,{fontSize:"lg",fontWeight:"bold",children:l}),(0,s.jsx)(i.iPF,{pt:0,children:o}),(0,s.jsxs)(i.xoY,{children:[(0,s.jsx)(i.wpx,{ref:u,onClick:a,size:"large",children:d}),(0,s.jsx)(i.wpx,{onClick:()=>t(),type:"primary",size:"large",className:"ml-3","data-testid":"warning-modal-confirm-btn",children:c})]})]})})})}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return c}});var s=n(24246),i=n(91942),r=n(79894),a=n.n(r),l=n(27378);let{Text:o}=i.AntTypography,c=e=>{let{items:t,...n}=e,r=(0,l.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,l={...e},c=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:l.title})),c)?l.title=(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(i.zrq,{items:r,...n})}},5923:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eu}});var s=n(24246),i=n(27378),r=n(16134),a=n(77213),l=n(58754),o=n(15677),c=n(91942),d=n(3124),u=n.n(d),m=n(86677),h=n(25980),x=n(14048),p=n(58452);let y=e=>{let{onCancel:t,onConfirm:n,isOpen:i,onClose:r}=e;return(0,s.jsx)(p.Z,{isOpen:i,onClose:r,onCancel:t,isCentered:!0,title:"Upgrade to choose vendors",message:"To choose vendors and have system information auto-populated using Fides Compass, you will need to upgrade Fides. Meanwhile, you can manually add individual systems using the button below.",cancelButtonText:"Add vendors manually",continueButtonText:"Upgrade",onConfirm:n})};var g=n(77830),j=n(16643),f=n(69e3),v=n(77867),b=n(32885),C=e=>{var t;let{onClick:n}=e,{plus:i,dataFlowScanning:a}=(0,h.hz)(),l=(0,r.C)(b.bw),o=null!==(t=null==l?void 0:l.cluster_health)&&void 0!==t?t:"unknown",d=o===j.wW.HEALTHY;if(!i)return null;let m=null;return a?d||(m="Your cluster appears not to be healthy. Its status is ".concat(o,".")):m="The data flow scanner is not enabled, please check your configuration.",(0,s.jsxs)(c.xuv,{position:"relative",children:[(0,s.jsx)(c.esZ,{title:m,popupVisible:!!m,children:(0,s.jsx)("button",{disabled:!a||!d,type:"button","aria-label":"Data flow scan",className:"text-left",onClick:n,children:(0,s.jsx)(f.Z,{title:"Data flow scan",color:u().FIDESUI_NECTAR,description:"Automatically discover new systems in your Kubernetes infrastructure",icon:(0,s.jsx)(x.pt,{boxSize:6}),"data-testid":"data-flow-scan-btn"})})}),a?(0,s.jsx)(v.Z,{connected:d,title:d?"Cluster is connected and healthy":"Cluster is ".concat(o),position:"absolute",right:-1,top:-1,"data-testid":"cluster-health-indicator"}):null]})},w=n(38764);let k=e=>{let{children:t}=e;return(0,s.jsx)(c.X6q,{as:"h4",size:"xs",fontWeight:"semibold",color:"gray.600",textTransform:"uppercase",mb:4,children:t})};var _=()=>{let e=(0,r.T)(),t=(0,m.useRouter)(),{isOpen:n,onClose:i,onOpen:a}=(0,c.qY0)(),{dictionaryService:l}=(0,h.hz)();return(0,s.jsxs)(c.Kqy,{spacing:9,"data-testid":"add-systems",children:[(0,s.jsxs)(c.Kqy,{spacing:6,maxWidth:"600px",children:[(0,s.jsx)(c.X6q,{as:"h3",size:"md",fontWeight:"semibold",children:"Fides helps you map your systems to manage your privacy"}),(0,s.jsx)(c.xvT,{children:"In Fides, systems describe any services that store or process data for your organization, including third-party APIs, web applications, databases, and data warehouses."}),(0,s.jsx)(c.xvT,{children:"Fides can automatically discover new systems in your AWS infrastructure or Okta accounts. For services not covered by the automated scanners or analog processes, you may also manually add new systems to your map."})]}),(0,s.jsx)(y,{isOpen:n,onConfirm:()=>{window.open("https://fid.es/upgrade-compass")},onCancel:()=>{t.push(g.N5)},onClose:i}),(0,s.jsxs)(c.xuv,{"data-testid":"manual-options",children:[(0,s.jsx)(k,{children:"Manually add systems"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add a system",onClick:()=>{e((0,o.CQ)(w.D.MANUAL)),t.push(g.N5)},"data-testid":"manual-btn",children:(0,s.jsx)(f.Z,{title:"Add a system",color:u().FIDESUI_SANDSTONE,icon:(0,s.jsx)(x.P$,{boxSize:6}),description:"Manually add a system for services not covered by automated scanners"})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Add multiple systems",onClick:()=>{l?(e((0,o.CQ)(w.D.MANUAL)),t.push(g.bJ)):a()},"data-testid":"multiple-btn",children:(0,s.jsx)(f.Z,{title:"Add multiple systems",color:u().FIDESUI_OLIVE,icon:(0,s.jsx)(x.P$,{boxSize:6}),description:"Choose vendors and automatically populate system details"})})]})]}),(0,s.jsxs)(c.xuv,{"data-testid":"automated-options",children:[(0,s.jsx)(k,{children:"Automated infrastructure scanning"}),(0,s.jsxs)(c.MIq,{columns:{base:1,md:2,xl:3},spacing:"4",children:[(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your infrastructure (AWS)",onClick:()=>{e((0,o.CQ)(j.GC.AWS)),e((0,o.sz)())},"data-testid":"aws-btn",children:(0,s.jsx)(f.Z,{title:"Scan your infrastructure (AWS)",color:u().FIDESUI_TERRACOTTA,description:"Automatically discover new systems in your AWS infrastructure",icon:(0,s.jsx)(x.bj,{boxSize:6})})}),(0,s.jsx)("button",{className:"flex flex-col text-left",type:"button","aria-label":"Scan your Sign On Provider (Okta)",onClick:()=>{e((0,o.CQ)(j.GC.OKTA)),e((0,o.sz)())},"data-testid":"okta-btn",children:(0,s.jsx)(f.Z,{title:"Scan your Sign On Provider (Okta)",color:u().FIDESUI_MINOS,description:"Automatically discover new systems in your Okta infrastructure",icon:(0,s.jsx)(x.tb,{boxSize:6})})}),(0,s.jsx)(C,{onClick:()=>{e((0,o.sz)()),e((0,o.CQ)(w.D.DATA_FLOW))}})]})]})]})},S=n(34090),A=n(55484),T=n(40324),z=n(812),I=n(14047),O=n(97181),q=n(70788),N=n(28416);let D=e=>"system_type"in e,{useGenerateMutation:F}=n(78780).u.injectEndpoints({endpoints:e=>({generate:e.mutation({query:e=>({url:"generate",method:"POST",body:e})})})});var R=n(59301);let Z=e=>{let{message:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.izJ,{}),(0,s.jsx)(c.W20,{maxH:"50vh",overflow:"auto",children:(0,s.jsx)(c.xvT,{as:"pre","data-testid":"error-log",children:t})}),(0,s.jsx)(c.izJ,{})]})};var W=e=>{let{error:t,scanType:n=""}=e;return(0,s.jsxs)(c.Kqy,{"data-testid":"scanner-error",spacing:"4",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.j8w,{color:"error",children:"Error"}),(0,s.jsx)(c.X6q,{color:"red.500",size:"lg",children:"Failed to Scan"})]}),403===t.status&&n===j.GC.AWS?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"permission-msg",children:"Fides was unable to scan AWS. It appears that the credentials were valid to login but they did not have adequate permission to complete the scan."}),(0,s.jsxs)(c.xvT,{children:["To fix this issue, double check that you have granted"," ",(0,s.jsx)(R.Z,{href:N.zu,children:"the required permissions"})," ","to these credentials as part of your IAM policy. If you need more help in configuring IAM policies, you can read about them"," ",(0,s.jsx)(R.Z,{href:"https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_access-management.html",children:"here"}),"."]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"generic-msg",children:"Fides was unable to scan your infrastructure. Please ensure your credentials are accurate and inspect the error log below for more details."}),(0,s.jsx)(Z,{message:t.message}),(0,s.jsxs)(c.xvT,{children:["If this error does not clarify why scanning failed, please"," ",(0,s.jsx)(R.Z,{href:N.we,children:"create a new issue"}),"."]})]})]})},E=n(57899);let B=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Warning, you are about to cancel the scan!"}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"If you cancel scanning, the scanner will stop and no systems will be returned."}),(0,s.jsx)(c.xvT,{color:"gray.500",mb:3,children:"Are you sure you want to cancel?"})]});var K=e=>{let{title:t,onClose:n}=e,{isOpen:i,onOpen:r,onClose:a}=(0,c.qY0)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Kqy,{spacing:8,"data-testid":"scanner-loading",children:[(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.xvT,{alignItems:"center",as:"b",color:"gray.900",display:"flex",fontSize:"xl",children:t}),(0,s.jsx)(c.PZ7,{"data-testid":"close-scan-in-progress",display:"inline-block",onClick:r})]}),(0,s.jsx)(c.Kqy,{alignItems:"center",children:(0,s.jsx)(c.$jN,{thickness:"4px",speed:"0.65s",emptyColor:"gray.200",color:"green.300",size:"xl"})})]}),(0,s.jsx)(E.Z,{isOpen:i,onClose:a,handleConfirm:n,title:"Cancel Scan!",message:B,confirmButtonText:"Yes, Cancel",cancelButtonText:"No, Continue Scanning"})]})};let U={aws_access_key_id:"",aws_secret_access_key:"",aws_session_token:"",region_name:""},L=A.Ry().shape({aws_access_key_id:A.Z_().required().trim().matches(/^\w+$/,"Cannot contain spaces or special characters").label("Access Key ID"),aws_secret_access_key:A.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Secret"),aws_session_token:A.Z_().optional().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Session Token (for temporary credentials)"),region_name:A.Z_().required().label("Default Region")});var P=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,I.V)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(D);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to AWS."}))},m=()=>{t((0,o.sz)(2))},[h,{isLoading:x}]=F(),p=async t=>{l(void 0);let n=await h({organization_key:e,generate:{config:t,target:j.GC.AWS,type:j.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(S.J9,{initialValues:U,validationSchema:L,onSubmit:p,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(S.l0,{"data-testid":"authenticate-aws-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(K,{title:"System scanning in progress",onClose:m}):null,a?(0,s.jsx)(W,{error:a,scanType:"aws"}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(q.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),m()}},{title:"Authenticate AWS Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in AWS, you must first authenticate to your AWS cloud by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(T.j0,{name:"aws_access_key_id",label:"Access Key ID",tooltip:"The Access Key ID created by the cloud hosting provider.",isRequired:!0}),(0,s.jsx)(T.j0,{type:"password",name:"aws_secret_access_key",label:"Secret",tooltip:"The secret associated with the Access Key ID used for authentication.",isRequired:!0}),(0,s.jsx)(T.j0,{type:"password",name:"aws_session_token",label:"Session Token",tooltip:"The session token when using temporary credentials."}),(0,s.jsx)(O.d,{name:"region_name",label:"AWS Region",tooltip:"The geographic region of the cloud hosting provider you would like to scan.",options:N.xO,isRequired:!0,placeholder:"Select a region"})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:m,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:x,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})};let M={orgUrl:"",token:""},V=A.Ry().shape({orgUrl:A.Z_().required().trim().url().label("URL"),token:A.Z_().required().trim().matches(/^[^\s]+$/,"Cannot contain spaces").label("Token")});var X=()=>{let e=(0,r.C)(o.De),t=(0,r.T)(),{successAlert:n}=(0,I.V)(),[a,l]=(0,i.useState)(),d=e=>{let s=(null!=e?e:[]).filter(D);t((0,o.un)(s)),t((0,o.sz)()),n("Your scan was successfully completed, with ".concat(s.length," new systems detected!"),"Scan Successfully Completed",{isClosable:!0})},u=e=>{l((0,z.nU)(e,{status:500,message:"Our system encountered a problem while connecting to Okta."}))},m=()=>{t((0,o.sz)(2))},[h,{isLoading:x}]=F(),p=async t=>{l(void 0);let n=await h({organization_key:e,generate:{config:t,target:j.GC.OKTA,type:j.j.SYSTEMS}});(0,z.D4)(n)?u(n.error):d(n.data.generate_results)};return(0,s.jsx)(S.J9,{initialValues:M,validationSchema:V,onSubmit:p,children:e=>{let{isValid:t,isSubmitting:n,dirty:i}=e;return(0,s.jsx)(S.l0,{"data-testid":"authenticate-okta-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[n?(0,s.jsx)(K,{title:"System scanning in progress",onClose:m}):null,a?(0,s.jsx)(W,{error:a}):null,n||a?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(q.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),m()}},{title:"Authenticate Okta Scanner"}]}),(0,s.jsx)(c.xvT,{children:"To use the scanner to inventory systems in Okta, you must first authenticate to your Okta account by providing the following information:"})]}),(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(T.j0,{name:"orgUrl",label:"Domain",tooltip:"The URL for your organization's account on Okta"}),(0,s.jsx)(T.j0,{name:"token",label:"Okta token",type:"password",tooltip:"The token generated by Okta for your account."})]})]}),n?null:(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:m,children:"Cancel"}),(0,s.jsx)(c.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,loading:x,"data-testid":"submit-btn",children:"Save and continue"})]})]})})}})},G=n(46628),Y=n(31883),$=()=>{let e=(0,r.T)(),t=(0,c.pmc)(),[n]=(0,b.J9)(),[a,{data:l}]=(0,b.KW)(),[d,u]=(0,i.useState)(),[m,h]=(0,i.useState)(!1),x=e=>{u((0,z.nU)(e,{status:500,message:"Our system encountered a problem while scanning your infrastructure."}))};(0,i.useEffect)(()=>{(async()=>{let{error:e}=await n();h(!(e&&(0,Y.Bw)(e)&&404===e.status));let t=await a({classify:!0});(0,z.D4)(t)&&x(t.error)})()},[a,n]),(0,i.useEffect)(()=>{(async()=>{if(l){let{data:s}=await n(),i=m?(null==s?void 0:s.added_systems)||[]:l.systems;t((0,G.t5)("Your scan was successfully completed, with ".concat(i.length," new systems detected!"))),e((0,o.un)(i)),e((0,o.sz)())}})()},[l,t,e,m,n]);let p=()=>{e((0,o.sz)(2))};return d?(0,s.jsxs)(c.Kqy,{children:[(0,s.jsx)(W,{error:d}),(0,s.jsx)(c.xuv,{children:(0,s.jsx)(c.wpx,{onClick:p,"data-testid":"cancel-btn",children:"Cancel"})})]}):(0,s.jsx)(K,{title:"Infrastructure scanning in progress",onClose:p})},J=()=>{let e=(0,r.C)(o.Ll);return(0,s.jsxs)(c.xuv,{w:"40%",children:[e===j.GC.AWS?(0,s.jsx)(P,{}):null,e===j.GC.OKTA?(0,s.jsx)(X,{}):null,e===w.D.DATA_FLOW?(0,s.jsx)($,{}):null]})},Q=n(83265),H=n(46238);let ee=()=>{var e,t;let n=(0,r.T)(),s=e=>{n((0,o.nD)(e)),n((0,o.sz)())},[a]=(0,Q.vz)(),[l]=(0,Q.$f)(),{data:d,isLoading:u}=(0,Q.GQ)(Q.Av),[m,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{!u&&!m&&(null==d?void 0:d.name)&&(null==d?void 0:d.description)&&n((0,o.sz)())},[u,d,n,m]);let x=(0,c.pmc)();return(0,S.TA)({initialValues:{name:null!==(e=null==d?void 0:d.name)&&void 0!==e?e:"",description:null!==(t=null==d?void 0:d.description)&&void 0!==t?t:""},onSubmit:async e=>{var t,n,i;h(!0);let r={name:null!==(t=e.name)&&void 0!==t?t:null==d?void 0:d.name,description:null!==(n=e.description)&&void 0!==n?n:null==d?void 0:d.description,fides_key:null!==(i=null==d?void 0:d.fides_key)&&void 0!==i?i:Q.Av,organization_fides_key:Q.Av};if(d){let e=await l(r);if((0,z.D4)(e)){x({status:"error",description:(0,z.e$)(e.error)});return}x.closeAll(),s(r)}else{let e=await a(r);if((0,z.D4)(e)){x({status:"error",description:(0,z.e$)(e.error)});return}x.closeAll(),s(r)}},enableReinitialize:!0,validate:e=>{let t={};return e.name||(t.name="Organization name is required"),e.description||(t.description="Organization description is required"),t}})};var et=()=>{let{errors:e,handleBlur:t,handleChange:n,handleSubmit:i,touched:r,values:a,isSubmitting:l}=ee();return(0,s.jsx)(c.m$N.form,{onSubmit:i,w:"40%","data-testid":"organization-info-form",children:(0,s.jsxs)(c.Kqy,{spacing:10,children:[(0,s.jsx)(c.X6q,{as:"h3",size:"lg",children:"Create your Organization"}),(0,s.jsx)("div",{children:"Provide your organization information. This information is used to configure your organization in Fides for data map reporting purposes."}),(0,s.jsx)(c.Kqy,{children:(0,s.jsxs)(c.NIc,{children:[(0,s.jsxs)(c.Kqy,{direction:"row",mb:5,justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Organization name"}),(0,s.jsx)(c.IIB,{type:"text",id:"name",name:"name",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.name,isInvalid:r.name&&!!e.name,minW:"65%",w:"65%","data-testid":"input-name"}),(0,s.jsx)(H.b,{label:"The legal name of your organization"})]}),(0,s.jsxs)(c.Kqy,{direction:"row",justifyContent:"flex-end",children:[(0,s.jsx)(c.lXp,{w:"100%",children:"Description"}),(0,s.jsx)(c.IIB,{type:"text",id:"description",name:"description",focusBorderColor:"gray.700",onChange:n,onBlur:t,value:a.description,isInvalid:r.description&&!!e.description,minW:"65%",w:"65%","data-testid":"input-description"}),(0,s.jsx)(H.b,{label:'An explanation of the type of organization and primary activity. For example "Acme Inc. is an e-commerce company that sells scarves."'})]})]})}),(0,s.jsx)(c.wpx,{type:"primary",htmlType:"submit",disabled:!a.name||!a.description,loading:l,"data-testid":"submit-btn",children:"Save and continue"})]})})},en=e=>{let{allColumns:t,selectedColumns:n,onChange:r}=e,a=(0,i.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.name,!!n.find(e=>e.name===t.name))),e},[t,n]),l=()=>{a.forEach((e,t)=>a.set(t,!1)),r([])},o=e=>{var n;let s=null!==(n=a.get(e.name))&&void 0!==n&&n;a.set(e.name,!s),r(t.filter(e=>a.get(e.name)))};return(0,s.jsx)(c.v2r,{children:e=>{let{onClose:i}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.j2t,{as:c.wpx,icon:(0,s.jsx)(c.mCO,{}),fontWeight:"normal","data-testid":"column-dropdown",children:"Columns"}),(0,s.jsx)(c.qyq,{children:(0,s.jsxs)(c.xuv,{px:2,children:[(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"space-between",mb:2,children:[(0,s.jsx)(c.wpx,{size:"small",onClick:l,"data-testid":"column-clear-btn",children:"Clear"}),(0,s.jsx)(c.wpx,{type:"primary",size:"small",onClick:i,"data-testid":"column-done-btn",children:"Done"})]}),(0,s.jsx)(c.cOn,{colorScheme:"complimentary",children:(0,s.jsx)(c.Kqy,{children:t.map(e=>{let t=n.filter(t=>t.name===e.name).length>0;return(0,s.jsx)(c.XZJ,{id:e.name,_hover:{bg:"gray.100"},isChecked:t,onChange:()=>o(e),"data-testid":"checkbox-".concat(e.name),children:e.name},e.name)})})})]})})]})}})},es=n(16220);let ei=(e,t)=>t.split(".").reduce((e,t)=>e?e[t]:void 0,e),er=e=>{let{system:t,attribute:n}=e;if("name"===n)return(0,s.jsx)("label",{htmlFor:"checkbox-".concat(t.fides_key),children:t.name});if("fidesctl_meta.resource_id"===n){var i,r;return(0,s.jsx)(c.xuv,{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",title:(null===(i=t.fidesctl_meta)||void 0===i?void 0:i.resource_id)||"",children:null===(r=t.fidesctl_meta)||void 0===r?void 0:r.resource_id})}return(0,s.jsx)(s.Fragment,{children:ei(t,n)})},ea=e=>{let{allSystems:t,checked:n,onChange:i,columns:r,tableHeadProps:a}=e,l=e=>{n.indexOf(e)>=0?i(n.filter(t=>t.fides_key!==e.fides_key)):i([...n,e])},o=t.length===n.length;return 0===r.length?(0,s.jsx)(c.xvT,{children:"No columns selected to display"}):(0,s.jsxs)(c.iA_,{size:"sm",sx:{tableLayout:"fixed"},children:[(0,s.jsx)(c.hrZ,{...a,children:(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Th,{width:"15px",children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",title:"Select All",isChecked:o,onChange:e=>{e.target.checked?i(t):i([])},"data-testid":"select-all"})}),r.map(e=>(0,s.jsx)(c.Th,{children:e.name},e.attribute))]})}),(0,s.jsx)(c.p3B,{children:t.map(e=>(0,s.jsxs)(c.Tr,{children:[(0,s.jsx)(c.Td,{children:(0,s.jsx)(c.XZJ,{colorScheme:"complimentary",value:e.fides_key,isChecked:n.indexOf(e)>=0,onChange:()=>l(e),"data-testid":"checkbox-".concat(e.fides_key)})}),r.map(t=>(0,s.jsx)(c.Td,{children:(0,s.jsx)(er,{system:e,attribute:t.attribute})},t.attribute))]},e.fides_key))})]})};var el=n(1315);let eo=[{name:"Name",attribute:"name"},{name:"System type",attribute:"system_type"},{name:"Resource ID",attribute:"fidesctl_meta.resource_id"}];var ec=()=>{let e=(0,r.C)(o.j4),t=(0,r.T)(),n=(0,m.useRouter)(),{systemOrDatamapRoute:a}=(0,es.V)(),{isOpen:l,onOpen:d,onClose:u}=(0,c.qY0)(),[h]=(0,el.dB)(),[x,p]=(0,i.useState)(e),[y,g]=(0,i.useState)(eo),{handleError:j}=(0,I.H)(),f=e=>{n.push(e).then(()=>{t((0,o.mc)())})},v=async()=>{let e=await h(x);return(0,z.D4)(e)?j(e.error):f(a)},b=()=>{t((0,o.sz)(2))},C=(0,s.jsxs)(c.xvT,{color:"gray.500",mb:3,children:["You’re registering ",x.length," of ",e.length," systems available. Do you want to continue with registration or cancel and register all systems now?"]});return(0,s.jsxs)(c.xuv,{maxW:"full",children:[(0,s.jsxs)(c.Kqy,{spacing:10,"data-testid":"scan-results",children:[(0,s.jsx)(q.m,{className:"mb-4",items:[{title:"Add systems",href:"",onClick:e=>{e.preventDefault(),b()}},{title:"Authenticate"},{title:"Scan results"}]}),0===e.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.xvT,{"data-testid":"no-results",children:"No results were found for your infrastructure scan."}),(0,s.jsx)(c.Ugi,{children:(0,s.jsx)(c.wpx,{onClick:b,"data-testid":"back-btn",children:"Back"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.xuv,{children:[(0,s.jsx)(c.xvT,{children:"Below are the results of your infrastructure scan. To continue, select the systems you would like registered in your data map and reports."}),(0,s.jsx)(c.xuv,{display:"flex",justifyContent:"end",children:(0,s.jsx)(en,{allColumns:eo,selectedColumns:y,onChange:g})})]}),(0,s.jsx)(ea,{allSystems:e,checked:x,onChange:p,columns:y}),(0,s.jsxs)(c.Ugi,{children:[(0,s.jsx)(c.wpx,{onClick:b,children:"Back"}),(0,s.jsx)(c.wpx,{onClick:()=>{e.length>x.length?d():v()},type:"primary",disabled:0===x.length,"data-testid":"register-btn",children:"Register selected systems"})]})]})]}),(0,s.jsx)(E.Z,{title:"Warning",message:C,handleConfirm:v,isOpen:l,onClose:u})]})},ed=()=>{let e=(0,r.C)(o.xx);return(0,s.jsx)(c.Kqy,{direction:["column","row"],bg:"white",children:(0,s.jsxs)(c.xuv,{display:"flex",justifyContent:"flex-start",w:"100%",children:[1===e?(0,s.jsx)(et,{}):null,2===e?(0,s.jsx)(_,{}):null,3===e?(0,s.jsx)(J,{}):null,4===e?(0,s.jsx)(c.xuv,{pr:10,children:(0,s.jsx)(ec,{})}):null]})})},eu=()=>{let e=(0,r.T)();return(0,i.useEffect)(()=>{e((0,o.sz)(2))},[e]),(0,s.jsxs)(a.Z,{title:"Add systems",children:[(0,s.jsx)(l.Z,{heading:"Add systems"}),(0,s.jsx)(ed,{})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return i},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return l},oK:function(){return r}});var s=n(76649);let i=e=>"error"in e,r=e=>(0,s.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,s.Ln)({status:"number",data:{}},e),l=e=>(0,s.Ln)({detail:"string"},e),o=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,s.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=n(19043)},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return s}});let s=(e,t)=>r(e,t),i=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>r(n,t[e]));class a{static narrow(e){return new a(t=>s(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=>s(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=74245)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8538],{73846:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset/new",function(){return r(17294)}])},812:function(e,t,r){"use strict";r.d(t,{D4:function(){return a.D4},MM:function(){return f},Ot:function(){return c},c6:function(){return s},cj:function(){return g},e$:function(){return l},fn:function(){return o},iC:function(){return h},nU:function(){return u},tB:function(){return d}});var n,s,a=r(19043);let i="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var r;let t=null===(r=e.data.detail)||void 0===r?void 0:r[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:i};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:r}=e;return{status:r,message:l(e,t.message)}}return t},f=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,r){"use strict";r.d(t,{H:function(){return a},V:function(){return n.V}});var n=r(84306),s=r(812);let a=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let r="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?r=t.data.detail:(0,s.tB)(t)&&(r=t.data.detail[0].msg),e(r)}}}},84306:function(e,t,r){"use strict";r.d(t,{V:function(){return a}});var n=r(24246),s=r(91942);let a=()=>{let e=(0,s.pmc)();return{errorAlert:(t,r,a)=>{let i={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[r&&(0,n.jsx)(s.CdC,{children:r}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,i):e(i)},successAlert:(t,r,a)=>{let i={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[r&&(0,n.jsx)(s.CdC,{children:r}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,i):e(i)}}}},58452:function(e,t,r){"use strict";var n=r(24246),s=r(91942);t.Z=e=>{let{isOpen:t,onClose:r,onConfirm:a,onCancel:i,title:l,message:o,cancelButtonText:c,continueButtonText:d,isLoading:u,returnFocusOnClose:f,isCentered:h,testId:g="confirmation-modal",icon:m}=e;return(0,n.jsxs)(s.u_l,{isOpen:t,onClose:r,size:"lg",returnFocusOnClose:null==f||f,isCentered:h,children:[(0,n.jsx)(s.ZAr,{}),(0,n.jsxs)(s.hzk,{textAlign:"center",p:6,"data-testid":g,children:[m?(0,n.jsx)(s.M5Y,{mb:2,children:m}):null,l?(0,n.jsx)(s.xBx,{fontWeight:"medium",pb:0,children:l}):null,o?(0,n.jsx)(s.fef,{children:o}):null,(0,n.jsx)(s.mzw,{children:(0,n.jsxs)(s.MIq,{columns:2,width:"100%",children:[(0,n.jsx)(s.wpx,{onClick:()=>{i&&i(),r()},size:"large",className:"mr-3","data-testid":"cancel-btn",disabled:u,children:c||"Cancel"}),(0,n.jsx)(s.wpx,{type:"primary",size:"large",onClick:a,"data-testid":"continue-btn",loading:u,children:d||"Continue"})]})})]})]})}},39715:function(e,t,r){"use strict";var n=r(24246),s=r(91942);r(27378),t.Z=e=>{let{isEmptyState:t,yamlError:r}=e;return(0,n.jsx)(s.Rg9,{in:!0,children:(0,n.jsxs)(s.xuv,{w:"fit-content",bg:"white",p:3,borderRadius:3,children:[(0,n.jsxs)(s.Ugi,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"gray.700",size:"xs",children:"YAML"}),(0,n.jsx)(s.Vp9,{colorScheme:"red",size:"sm",variant:"solid",children:"Error"})]}),(0,n.jsx)(s.xuv,{bg:"red.50",border:"1px solid",borderColor:"red.300",color:"red.300",mt:"16px",borderRadius:"6px",children:(0,n.jsxs)(s.Ugi,{alignItems:"flex-start",margin:["14px","17px","14px","17px"],children:[(0,n.jsx)(s.f9v,{}),t&&(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:"Yaml system is required"})]}),r&&(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{as:"h5",color:"red.500",fontWeight:"semibold",size:"xs",children:"Error message:"}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:r.message}),(0,n.jsx)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:r.reason}),(0,n.jsxs)(s.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"400",children:["Ln ",(0,n.jsx)("b",{children:r.mark.line}),", Col"," ",(0,n.jsx)("b",{children:r.mark.column}),", Pos"," ",(0,n.jsx)("b",{children:r.mark.position})]})]})]})})]})})}},17294:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return E}});var n=r(24246),s=r(91942),a=r(27378),i=r(77213),l=r(77830),o=r(58754),c=r(34090),d=r(86677),u=r(16125),f=r(55484),h=r(25980),g=r(40324),m=r(812),x=r(58452),y=r(46628),p=r(83265),j=r(32885),v=r(16643),b=r(20386);let C=e=>!("system_type"in e),w={url:"",classify:!1,classifyConfirmed:!1},A=f.Ry().shape({url:f.Z_().required().label("Database URL"),classify:f.O7(),classifyConfirmed:f.O7().when(["url","classify"],{is:(e,t)=>e&&t,then:()=>f.O7().equals([!0])})});var _=()=>{let[e,{isLoading:t}]=(0,b.pR)(),[r,{isLoading:a}]=(0,b.IR)(),[i,{isLoading:o}]=(0,j.Du)(),f=t||a||o,_=(0,s.pmc)(),z=(0,d.useRouter)(),k=(0,h.hz)(),S=(0,u.I0)(),L=async t=>{var r;let n=await e({organization_key:p.Av,generate:{config:{connection_string:t.url},target:v.GC.DB,type:v.j.DATASETS}});if((0,m.D4)(n))return{error:(0,m.e$)(n.error)};let s=(null!==(r=n.data.generate_results)&&void 0!==r?r:[]).filter(C);return s&&s.length>0?{datasets:s}:{error:"Unable to generate a dataset with this connection."}},D=async e=>{let t=await r(e);return(0,m.D4)(t)?{error:(0,m.e$)(t.error)}:{dataset:t.data}},E=async e=>{let{values:t,datasets:r}=e,n=await i({dataset_schemas:r.map(e=>{let{name:t,fides_key:r}=e;return{fides_key:r,name:t}}),schema_config:{organization_key:p.Av,generate:{config:{connection_string:t.url},target:v.GC.DB,type:v.j.DATASETS}}});return(0,m.D4)(n)?{error:(0,m.e$)(n.error)}:{classifyInstances:n.data.classify_instances}},N=async e=>{var t;let r=await L(e);if("error"in r){_((0,y.Vo)(r.error));return}let n=await Promise.all(r.datasets.map(e=>D(e))),s=null!==(t=n.find(e=>"error"in e))&&void 0!==t?t:n[0];if("error"in s){_((0,y.Vo)(s.error));return}if(!e.classify){_((0,y.t5)("Generated ".concat(s.dataset.name," dataset"))),z.push({pathname:l.o5,query:{datasetId:s.dataset.fides_key}});return}let a=await E({values:e,datasets:r.datasets});if("error"in a){_((0,y.Vo)(a.error));return}_((0,y.t5)("Generate and classify are now in progress")),S((0,b.Zl)(s.dataset.fides_key)),z.push("/dataset")};return(0,n.jsx)(c.J9,{initialValues:{...w,classify:k.plus},validationSchema:A,onSubmit:N,validateOnChange:!1,validateOnBlur:!1,children:e=>{let{isSubmitting:t,errors:r,values:a,submitForm:i,resetForm:l,setFieldValue:o}=e;return(0,n.jsxs)(c.l0,{children:[(0,n.jsxs)(s.gCW,{spacing:8,align:"left",children:[(0,n.jsx)(s.xvT,{size:"sm",color:"gray.700",children:"Connect to a database using the connection URL. You may have received this URL from a colleague or your Ethyca developer support engineer."}),(0,n.jsx)(s.xuv,{children:(0,n.jsx)(g.j0,{name:"url",label:"Database URL"})}),k.plus?(0,n.jsx)(g.w8,{name:"classify",label:"Classify dataset",tooltip:"Use Fides Classify to suggest labels based on your data."}):null,(0,n.jsx)(s.xuv,{children:(0,n.jsx)(s.wpx,{type:"primary",htmlType:"submit",loading:t||f,disabled:t||f,"data-testid":"create-dataset-btn",children:"Generate dataset"})})]}),(0,n.jsx)(x.Z,{title:"Generate and classify this dataset",message:"You have chosen to generate and classify this dataset. This process may take several minutes. In the meantime you can continue using Fides. You will receive a notification when the process is complete.",isOpen:void 0!==r.classifyConfirmed,onClose:()=>{l({values:{...a,classifyConfirmed:!1}})},onConfirm:()=>{o("classifyConfirmed",!0),setTimeout(()=>{i()},0)}})]})}})},z=r(66527),k=r(14047),S=r(41207),L=r(39715),D=()=>{let[e]=(0,b.IR)(),[t,r]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),f=(0,a.useRef)(null),h=(0,d.useRouter)(),g=(0,s.pmc)(),{errorAlert:x}=(0,k.V)(),[p,j]=(0,a.useState)(void 0),v=e=>{z.ZP.load(e,{json:!0}),j(void 0)},C=async t=>{let r;return"object"==typeof t&&null!=t&&"dataset"in t&&Array.isArray(t.dataset)?[r]=t.dataset:Array.isArray(t)?[r]=t:r=t,e(r)},w=e=>{g((0,y.t5)("Successfully loaded new dataset YAML")),(0,b.Zl)(e.fides_key),h.push({pathname:l.o5,query:{datasetId:e.fides_key}})},A=async()=>{o(!0);let e=f.current.getValue(),t=z.ZP.load(e,{json:!0}),r=await C(t);(0,m.D4)(r)?g((0,y.Vo)((0,m.e$)(r.error))):"data"in r&&w(r.data),o(!1)};return(0,n.jsxs)(s.kCb,{gap:"97px",children:[(0,n.jsxs)(s.xuv,{w:"75%",children:[(0,n.jsx)(s.xuv,{color:"gray.700",fontSize:"14px",mb:4,children:"Get started creating your first dataset by pasting your dataset yaml below! You may have received this yaml from a colleague or your Ethyca developer support engineer."}),(0,n.jsxs)(s.gCW,{align:"stretch",children:[(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsx)(S.M,{defaultLanguage:"yaml",height:"calc(100vh - 515px)",onChange:e=>{try{u(!0),v(e),r(!!(!e||""===e.trim()))}catch(e){(0,S.F)(e)?j(e):x("Could not parse the supplied YAML")}},onMount:e=>{f.current=e,f.current.focus()},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!0}},theme:"light"}),(0,n.jsx)(s.izJ,{color:"gray.100"}),(0,n.jsx)(s.wpx,{type:"primary",disabled:t||!!p||i,loading:i,onClick:A,htmlType:"submit",className:"mt-6 w-fit",children:"Create dataset"})]})]}),(0,n.jsx)(s.xuv,{children:c&&(t||p)&&(0,n.jsx)(L.Z,{isEmptyState:t,yamlError:p})})]})},E=()=>{let[e,t]=(0,a.useState)(null);return(0,n.jsxs)(i.Z,{title:"Create New Dataset",children:[(0,n.jsx)(o.Z,{heading:"Datasets",breadcrumbItems:[{title:"All datasets",href:l.$m},{title:"Create new"}]}),(0,n.jsxs)(s.Kqy,{spacing:8,children:[(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.wpx,{onClick:()=>t("yaml"),"data-testid":"upload-yaml-btn",className:"mr-2",children:"Upload a Dataset YAML"}),(0,n.jsx)(s.wpx,{onClick:()=>t("database"),ghost:"database"===e,className:"mr-2","data-testid":"connect-db-btn",children:"Connect to a database"})]}),"database"===e&&(0,n.jsx)(s.xuv,{w:{base:"100%",lg:"50%"},children:(0,n.jsx)(_,{})}),"yaml"===e&&(0,n.jsx)(s.xuv,{w:{base:"100%"},children:(0,n.jsx)(D,{})})]})]})}},19043:function(e,t,r){"use strict";r.d(t,{Bw:function(){return i},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return l},oK:function(){return a}});var n=r(76649);let s=e=>"error"in e,a=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,i=e=>(0,n.Ln)({status:"number",data:{}},e),l=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,r){"use strict";r.d(t,{Ln:function(){return n}});let n=(e,t)=>a(e,t),s=Symbol("SOME"),a=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>a(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>a(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,r])=>a(r,t[e]));class i{static narrow(e){return new i(t=>n(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,r=e instanceof i?e.NF:e instanceof Function?e:t=>n(e,t);return new i(e=>t(e)&&r(e))}}new i(e=>!0)}},function(e){e.O(0,[6527,9327,2888,9774,179],function(){return e(e.s=73846)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6050],{91747:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datastore-connection/new",function(){return n(7936)}])},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var i=n(24246),l=n(16134),r=n(31793);let a=e=>(0,l.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,i.jsx)(i.Fragment,{children:n}):null}},96718:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});var i=n(24246),l=n(91942);let r=e=>{let{...t}=e,n="multiple"===t.mode;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,dropdownStyle:n?void 0:{width:"auto",minWidth:"200px"},className:"w-auto","data-testid":"filter-select",...t})}},44553:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(24246),l=n(91942),r=n(27378),a=n(45277),s=n(16125),o=n(812),c=n(46628),d=n(20682),u=n(54427),p=n(52253),x=n(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:f}=x.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let t=new FormData;return t.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:t}},invalidatesTags:()=>["Connection Type"]})})});var m=e=>{let{isOpen:t,onClose:n,testId:u="connector-template-modal"}=e,p=(0,s.I0)(),[x,h]=(0,r.useState)(null),m=(0,l.pmc)(),{getRootProps:y,getInputProps:j,isDragActive:g}=(0,a.uI)({onDrop:e=>{var t;if("zip"!==(null===(t=e[0].name.split(".").pop())||void 0===t?void 0:t.toLowerCase())){m((0,c.Vo)("Only zip files are allowed."));return}h(e[0])}}),[v,{isLoading:C}]=f(),{refetch:b}=(0,d.$I)({search:""},{skip:!1}),w=async()=>{if(x)try{var e;await v(x).unwrap(),m((0,c.t5)("Integration template uploaded successfully."));let{data:t}=await b();p((0,d.fP)(null!==(e=null==t?void 0:t.items)&&void 0!==e?e:[])),n()}catch(e){m((0,c.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,i.jsxs)(l.u_l,{isOpen:t,onClose:n,size:"2xl",children:[(0,i.jsx)(l.ZAr,{}),(0,i.jsxs)(l.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,i.jsx)(l.xBx,{children:"Upload integration template"}),(0,i.jsxs)(l.fef,{children:[(0,i.jsx)(l.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,i.jsxs)(l.xuv,{...y(),bg:g?"gray.100":"gray.50",border:"2px dashed",borderColor:g?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,i.jsx)("input",{...j()}),x?(0,i.jsx)(l.xvT,{children:x.name}):g?(0,i.jsx)(l.xvT,{children:"Drop the file here..."}):(0,i.jsx)(l.xvT,{children:"Click or drag and drop your file here."})]}),(0,i.jsx)(l.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,i.jsxs)(l.mzw,{className:"flex w-full justify-end gap-2",children:[(0,i.jsx)(l.wpx,{onClick:n,"data-testid":"cancel-btn",disabled:C,children:"Cancel"}),(0,i.jsx)(l.wpx,{type:"primary",htmlType:"submit",disabled:!x||C,onClick:w,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},7936:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var i=n(24246),l=n(96356),r=n(41337),a=n(91942),s=n(86677),o=n(27378),c=n(16125),d=n(16134),u=n(77830),p=n(58754),x=n(16394),h=n(19904),f=n(44553),m=n(16643),y=n(96718),j=n(26788),g=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1);(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.zq)(j.gA)),t.current=!1}),[e]);let n=(0,o.useRef)([...j.yI].map(e=>{let[t,n]=e;return{value:null==n?void 0:n.value,label:t}}));return(0,i.jsx)(y.z,{allowClear:!1,options:n.current,onChange:t=>{e((0,l.zq)(t||j.gA))},defaultValue:"","data-testid":"connection-type-filter"})},v=n(79894),C=n.n(v),b=e=>{let{items:t}=e;return(0,i.jsx)(a.MIq,{columns:4,spacingX:"16px",spacingY:"16px",children:t.map(e=>(0,i.jsx)(C(),{href:{pathname:window.location.pathname,query:{step:2,connectorType:JSON.stringify(e)}},children:(0,i.jsx)(a.xuv,{boxShadow:"base",borderRadius:"5px",maxWidth:"331px",overflow:"hidden",_hover:{boxShadow:"lg",cursor:"pointer"},"data-testid":"".concat(e.identifier,"-item"),children:(0,i.jsxs)(a.kCb,{alignItems:"center",justifyContent:"start",pl:"24px",pr:"24px",color:"gray.700",fontSize:"14px",fontStyle:"normal",fontWeight:"600",lineHeight:"20px",h:"80px",children:[(0,i.jsx)(r.Z,{data:e}),(0,i.jsx)(a.xvT,{ml:"12px",children:e.human_readable})]})})},e.identifier))})},w=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),{step:n}=(0,d.C)(l.ZZ),r=(0,d.C)(l.pw),{data:s,isFetching:u,isLoading:p,isSuccess:y}=(0,l.$I)(r),[j,v]=(0,o.useState)(!1),C=(0,o.useCallback)(t=>{(0===t.target.value.length||t.target.value.length>1)&&e((0,l.qP)(t.target.value))},[e]),w=(0,o.useMemo)(()=>(0,x.Ds)(C,250),[C]),T=(0,o.useMemo)(()=>(null==s?void 0:s.items)&&[...s.items].sort((e,t)=>e.human_readable>t.human_readable?1:-1),[s]);return(0,o.useEffect)(()=>(t.current=!0,()=>{e((0,l.qP)("")),t.current=!1}),[e]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.kCb,{minWidth:"fit-content",children:(0,i.jsx)(a.xuv,{color:"gray.700",fontSize:"14px",maxHeight:"80px",maxWidth:"474px",mb:"24px",children:n.description})}),(0,i.jsxs)(a.kCb,{alignItems:"center",gap:"4",mb:"24px",minWidth:"fit-content",children:[(0,i.jsx)(g,{}),(0,i.jsxs)(a.BZy,{size:"sm",children:[(0,i.jsx)(a.Z8_,{pointerEvents:"none",children:(0,i.jsx)(a.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,i.jsx)(a.IIB,{autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:w,placeholder:"Search integrations",size:"sm",type:"search"})]}),(0,i.jsx)(h.ZP,{scopes:[m.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,i.jsx)(a.wpx,{onClick:()=>{v(!0)},type:"primary",htmlType:"submit","data-testid":"upload-btn",children:"Upload connector"})})]}),(0,i.jsx)(f.Z,{isOpen:j,onClose:()=>v(!1)}),(u||p)&&(0,i.jsx)(a.M5Y,{children:(0,i.jsx)(a.$jN,{})}),y&&T?(0,i.jsx)(b,{items:T}):null]})},T=n(7617),S=n(11274),I=n(38212),k=n(50881),N=()=>{let e=(0,c.I0)(),t=(0,o.useRef)(!1),[n,r]=(0,o.useState)(!1),{connection:s,connectionOption:u}=(0,d.C)(l.ZZ),p=j.IM.find(e=>e.type===(null==u?void 0:u.type)),[x,h]=(0,o.useState)(null==p?void 0:p.options[0]),f=()=>{r(!0)},y=(0,o.useMemo)(()=>()=>{let e=[];return(null==p?void 0:p.options)&&p.options.forEach(t=>{let n;switch(t){case j.H5.CONNECTOR_PARAMETERS:n={label:t,content:(0,i.jsx)(S.s,{onConnectionCreated:f})};break;case j.H5.DATASET_CONFIGURATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(I.Z,{})}:void 0;break;case j.H5.DSR_CUSTOMIZATION:n=(null==s?void 0:s.key)?{label:t,content:(0,i.jsx)(k.Z,{})}:void 0}n&&e.push(n)}),e},[null==s?void 0:s.key,null==p?void 0:p.options]),g=(0,o.useCallback)(t=>{switch(t){case j.H5.DATASET_CONFIGURATION:case j.H5.DSR_CUSTOMIZATION:e((0,l.nj)(j.Ss[3]));break;case j.H5.CONNECTOR_PARAMETERS:default:e((0,l.nj)(j.Ss[2]))}h(t)},[e]);return(0,o.useEffect)(()=>(t.current=!0,()=>{t.current=!1,e((0,l.mc)())}),[e]),(0,o.useEffect)(()=>{(null==s?void 0:s.key)&&(g((null==u?void 0:u.type)!==m.Zi.MANUAL?j.H5.DATASET_CONFIGURATION:j.H5.DSR_CUSTOMIZATION),n&&r(!1))},[n,null==s?void 0:s.key,null==u?void 0:u.type,null==p?void 0:p.options,g]),(0,i.jsx)(a.gCW,{alignItems:"stretch",gap:"18px",children:(0,i.jsx)(T.Z,{data:y(),flexGrow:1,index:null==p?void 0:p.options.findIndex(e=>e===x),isLazy:!0})})};let _=(e,t)=>{let n="".concat(window.location.origin+t,"&key=").concat(e);window.location.href.toLowerCase()!==n.toLowerCase()&&window.history.replaceState(null,"",n)},{Title:A}=a.AntTypography;var E=()=>{let e=(0,c.I0)(),t=(0,s.useRouter)(),{connectorType:n,step:x}=t.query,{connection:h,connectionOption:f,step:m}=(0,d.C)(l.ZZ);(0,o.useEffect)(()=>{if(n&&e((0,l.yA)(JSON.parse(n))),t.query.step){let t=j.Ss.find(e=>e.stepId===Number(x));e((0,l.nj)(t||j.Ss[1]))}return!t.query.id&&(null==h?void 0:h.key)&&_(h.key,m.href),()=>{}},[null==h?void 0:h.key,n,x,e,t.query.id,t.query.step,m.href]);let y=(0,o.useCallback)(e=>{let t="";switch(e.stepId){case 2:case 3:t=e.label.replace("{identifier}",f.human_readable);break;default:t=e.label}return t},[f]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{heading:"Connections",breadcrumbItems:[{title:"Unlinked connections",href:u.JR},{title:"New connection"}],children:(0,i.jsx)(A,{level:3,style:{marginBottom:0},className:"mt-4",children:f?(0,i.jsxs)(a.vyj,{children:[(0,i.jsx)(r.Z,{data:f}),y(m)]}):y(m)})}),(()=>{switch(m.stepId){case 1:default:return(0,i.jsx)(w,{});case 2:case 3:return(0,i.jsx)(N,{})}})()]})},O=n(1226),R=()=>(0,i.jsx)(O.Z,{children:(0,i.jsx)(E,{})})}},function(e){e.O(0,[6527,5277,9327,9767,2888,9774,179],function(){return e(e.s=91747)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[210],{53748:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/consent",function(){return i(96236)}])},59301:function(e,t,i){"use strict";var n=i(24246);let{Link:r}=i(91942).AntTypography;t.Z=e=>(0,n.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...e})},56358:function(e,t,i){"use strict";i.d(t,{q:function(){return r}});var n=i(24246);let r=(0,i(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,n.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(24246),r=i(91942),s=i(88038),l=i.n(s),o=i(86677);i(27378);var a=i(25980),d=i(90867),c=i(77830),u=()=>{let e=(0,o.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:s=!0,mainProps:c}=e,p=(0,a.hz)(),h=(0,o.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,f=!(p.flags.privacyRequestsConfiguration&&g),{data:x}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),b=p.flags.privacyRequestsConfiguration&&(!x||!v)&&g;return(0,n.jsxs)(r.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[b?(0,n.jsx)(u,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),r=i(91942),s=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:o,rightContent:a,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(r.lQT,{className:i||o?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,a&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:a})]}),!!i&&(0,n.jsx)(s.m,{className:o?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),o]})}},19904:function(e,t,i){"use strict";i.d(t,{Tg:function(){return l}});var n=i(24246),r=i(16134),s=i(31793);let l=e=>(0,r.C)(s.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:i}=e;return l(t)?(0,n.jsx)(n.Fragment,{children:i}):null}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return g},e$:function(){return o},fn:function(){return a},iC:function(){return h},nU:function(){return u},tB:function(){return c}});var n,r,s=i(19043);let l="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function a(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:i}=e;return{status:i,message:o(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let h={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},71795:function(e,t,i){"use strict";i.d(t,{_:function(){return r}});var n=i(27378);function r(e,t){let[i,r]=(0,n.useState)(()=>{if(!e)return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(e){return console.error(e),t}});return[i,t=>{try{let n=t instanceof Function?t(i):t;r(n),e&&window.localStorage.setItem(e,JSON.stringify(n))}catch(e){console.error(e)}}]}},8133:function(e,t,i){"use strict";var n=i(24246),r=i(91942);t.Z=e=>{let{title:t,children:i,isOpen:s,onClose:l,...o}=e;return(0,n.jsxs)(r.u_l,{isOpen:s,onClose:l,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...o,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:t})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:i})]})]})}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),r=i(91942),s=i(79894),l=i.n(s),o=i(27378);let{Text:a}=r.AntTypography,d=e=>{let{items:t,...i}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let s=i===t.length-1,o={...e},d=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,n.jsx)(a,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),d)?o.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,n.jsx)(l(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,n.jsx)(r.zrq,{items:s,...i})}},6675:function(e,t,i){"use strict";i.d(t,{ZS:function(){return o},a4:function(){return s}});var n=i(3228);let r=i(78780).u.injectEndpoints({endpoints:e=>({getPurposes:e.query({query:()=>"purposes"})})}),{useGetPurposesQuery:s}=r,l={purposes:{},special_purposes:{}},o=(0,n.P1)(r.endpoints.getPurposes.select(),e=>{let{data:t}=e;return t||l})},7426:function(e,t,i){"use strict";i.d(t,{D2:function(){return p},L:function(){return o},U7:function(){return d},Yh:function(){return g},ak:function(){return a},iR:function(){return x},km:function(){return l},tB:function(){return s}});var n=i(3228);let r=i(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:l,usePatchConfigurationSettingsMutation:o}=r,a=(0,n.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{var n,r,s;let{data:l}=t,{data:o}=i;return{configSet:{cors_origins:(null==o?void 0:null===(n=o.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==l?void 0:null===(s=l.security)||void 0===s?void 0:s.cors_origins)||[]}}}),d=()=>(0,n.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:i}=t;return i}),c={enabled:!1,cmp_api_required:!1},u=(e,t,i,n)=>{let r=i&&i[e],s=n&&n[e];return r&&s?{...n[e],...i[e]}:s?n[e]:r?{...i[e]}:t},p=(0,n.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:r}=i;return u("gpp",c,n,r)}),h={tcf_publisher_country_code:null},g=(0,n.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:r}=i;return u("plus_consent_settings",h,n,r)}),f={allow_username_password_login:!1},x=(0,n.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:r}=i;return u("plus_security_settings",f,n,r)})},51263:function(e,t,i){"use strict";var n=i(24246),r=i(91942);t.Z=e=>{let{title:t,children:i,...s}=e;return(0,n.jsxs)(r.xuv,{backgroundColor:"var(--fidesui-bg-corinth)",borderRadius:"4px",padding:"3","data-testid":"setting-".concat(t),...s,children:[(0,n.jsx)(r.xvT,{as:"h3",fontSize:"md",fontWeight:"bold",lineHeight:5,color:"gray.700",mb:3,children:t}),i]})}},59512:function(e,t,i){"use strict";i.d(t,{Cu:function(){return o},Py:function(){return r},fj:function(){return l},uh:function(){return s}});var n=i(16643);let r=[1,3,4,5,6],s="https://ethyca.com/docs/tutorials/consent-management/consent-management-configuration/configure-tcf#vendor-overrides",l={[n.FF.PURPOSE_RESTRICTION]:"Purpose restriction",[n.FF.REQUIRE_CONSENT]:"Require consent",[n.FF.REQUIRE_LEGITIMATE_INTEREST]:"Require legitimate interest"},o={[n.PY.RESTRICT_ALL_VENDORS]:"Restrict all vendors",[n.PY.RESTRICT_SPECIFIC_VENDORS]:"Restrict specific vendors",[n.PY.ALLOW_SPECIFIC_VENDORS]:"Allow specific vendors"}},60325:function(e,t,i){"use strict";i.d(t,{DD:function(){return o},Go:function(){return a},TK:function(){return r},Uv:function(){return c},k1:function(){return s},y3:function(){return u}});var n=i(16643);let r=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==t?t:[]},s=e=>{var t;return null!==(t=null==e?void 0:e.filter(e=>e.selected))&&void 0!==t?t:[]},l=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],o={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:l,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},a=(e,t)=>{let i=t.find(t=>t.id===e.language);return i?i.name:e.language},d=e=>{var t,i,n,r,s,l,o,a,d;let{language:c,is_default:u,accept_button_label:p,reject_button_label:h}=e;return{language:c,is_default:u,accept_button_label:p,reject_button_label:h,title:e.title,description:e.description,acknowledge_button_label:null!==(t=e.acknowledge_button_label)&&void 0!==t?t:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(r=e.purpose_header)&&void 0!==r?r:void 0,privacy_policy_link_label:null!==(s=e.privacy_policy_link_label)&&void 0!==s?s:void 0,privacy_policy_url:null!==(l=e.privacy_policy_url)&&void 0!==l?l:void 0,privacy_preferences_link_label:null!==(o=e.privacy_preferences_link_label)&&void 0!==o?o:void 0,save_button_label:null!==(a=e.save_button_label)&&void 0!==a?a:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:t,updated_at:i,privacy_notices:n,origin:r,id:s,...l}=e;return{...l,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},96236:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Q}});var n=i(24246),r=i(91942),s=i(34090),l=i(27378),o=i(16134),a=i(25980),d=i(812),c=i(77213),u=i(58754),p=i(6675),h=i(46628),g=i(7426),f=i(40324);let x=e=>{let{children:t,purpose:i,endCol:s}=e;return(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderRight:s?"solid 1px":"unset",borderColor:"gray.200",height:"100%",minWidth:"36px",children:[1,3,4,5,6].includes(i)?null:(0,n.jsx)(r.xuv,{children:t})})};var v=()=>{let{values:e,setFieldValue:t}=(0,s.u6)(),{purposes:i}=(0,o.C)(p.ZS);return(0,n.jsx)(s.F2,{name:"purposeOverrides",render:()=>(0,n.jsxs)(r.kCb,{flexDirection:"column",minWidth:"944px",children:[(0,n.jsxs)(r.kCb,{width:"100%",border:"solid 1px",borderColor:"gray.200",backgroundColor:"gray.50",height:"36px",children:[(0,n.jsx)(r.kCb,{width:"600px",pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:"TCF purpose"}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",minWidth:"36px",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Allowed"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",borderRight:"solid 1px",borderColor:"gray.200",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Consent"})}),(0,n.jsx)(r.kCb,{flex:"1",alignItems:"center",children:(0,n.jsx)(r.xvT,{pl:"4",fontSize:"xs",fontWeight:"medium",lineHeight:"4",children:"Legitimate interest"})})]}),e.purposeOverrides.map((s,l)=>(0,n.jsxs)(r.kCb,{width:"100%",height:"36px",alignItems:"center",borderBottom:"solid 1px",borderColor:"gray.200",backgroundColor:"#fff",children:[(0,n.jsxs)(r.kCb,{width:"600px",borderLeft:"solid 1px",borderColor:"gray.200",p:0,alignItems:"center",height:"100%",pl:"4",fontSize:"xs",fontWeight:"normal",lineHeight:"4",children:["Purpose ",s.purpose,": ",i[s.purpose].name]}),(0,n.jsx)(r.kCb,{flex:"1",justifyContent:"center",alignItems:"center",borderLeft:"solid 1px",borderColor:"gray.200",height:"100%",children:(0,n.jsx)(r.xuv,{children:(0,n.jsx)(f.w8,{name:"purposeOverrides[".concat(l,"].is_included"),onChange:e=>{e||(t("purposeOverrides[".concat(l,"].is_consent"),!1),t("purposeOverrides[".concat(l,"].is_legitimate_interest"),!1))}})})}),(0,n.jsx)(x,{purpose:s.purpose,children:(0,n.jsx)(f.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_legitimate_interest,name:"purposeOverrides[".concat(l,"].is_consent")})}),(0,n.jsx)(x,{purpose:s.purpose,endCol:!0,children:(0,n.jsx)(f.w8,{isDisabled:!e.purposeOverrides[l].is_included||e.purposeOverrides[l].is_consent,name:"purposeOverrides[".concat(l,"].is_legitimate_interest")})})]},s.purpose))]})})},b=i(59301),m=e=>{let{name:t,enabled:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:2,fontSize:"sm",lineHeight:"5",fontWeight:"medium",color:"gray.700",children:[(0,n.jsxs)(r.xvT,{children:[t," status"," ",i?(0,n.jsx)(r.j8w,{color:"success",children:"Enabled"}):(0,n.jsx)(r.j8w,{color:"error",children:"Disabled"})]}),(0,n.jsxs)(r.xvT,{children:["To ",i?"disable":"enable"," ",t,", please contact your Fides administrator or"," ",(0,n.jsx)(b.Z,{href:"mailto:support@ethyca.com",children:"Ethyca support"}),"."]})]})},_=i(46238),j=e=>{var t,i;let{label:l,options:o,layout:a,defaultFirstSelected:d=!0,...c}=e,[u,p]=(0,s.U$)(c),h={...u,value:null!==(t=u.value)&&void 0!==t?t:""},g=!!(p.touched&&p.error),x=d?o[0]:void 0,v=null!==(i=o.find(e=>e.value===h.value))&&void 0!==i?i:x,b=e=>{h.onChange(c.name)(e.target.value)};return"stacked"===a?(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.jqI,{className:"w-fit",children:[l?(0,n.jsx)(f.__,{children:l}):null,(0,n.jsx)(r.y02.Group,{onChange:b,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{className:"flex-col gap-3",children:o.map(e=>{let{value:t,label:i,tooltip:s}=e;return(0,n.jsx)(r.y02,{value:t,"data-testid":"option-".concat(t),children:(0,n.jsxs)(r.jqI,{className:"items-center gap-2",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:i}),s?(0,n.jsx)(_.b,{label:s}):null]})},t)})})})]}),(0,n.jsx)(f.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]}):(0,n.jsxs)(r.NIc,{isInvalid:g,children:[(0,n.jsxs)(r.rjZ,{templateColumns:"1fr 3fr",children:[(0,n.jsx)(f.__,{children:l}),(0,n.jsx)(r.y02.Group,{onChange:b,value:null==v?void 0:v.value,"data-testid":"input-".concat(h.name),children:(0,n.jsx)(r.jqI,{children:o.map(e=>(0,n.jsx)(r.y02,{value:e.value,"data-testid":"option-".concat(e.value),children:e.label},e.value))})})]}),(0,n.jsx)(f.Bc,{isInvalid:g,message:p.error,fieldName:h.name})]})},y=i(16643),C=i(51263);let w=e=>{let{title:t,children:i}=e;return(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,"data-testid":"section-".concat(t),children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"bold",lineHeight:5,color:"gray.700",children:t}),i]})};var T=()=>{let{tcf:e}=(0,a.hz)(),t=!!(0,o.C)(g.D2).enabled,{values:i,setFieldValue:l}=(0,s.u6)(),d=!!i.gpp.us_approach;return(0,n.jsx)(C.Z,{title:"Global Privacy Platform",children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[(0,n.jsx)(m,{name:"GPP",enabled:t}),t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{title:"GPP U.S.",children:(0,n.jsx)(j,{name:"gpp.us_approach",layout:"stacked",defaultFirstSelected:!1,options:[{label:"Enable U.S. National",value:y.en.NATIONAL,tooltip:"When US National is selected, Fides will present the same privacy notices to all consumers located anywhere in the United States."},{label:"Enable U.S. State-by-State",value:y.en.STATE,tooltip:"When state-by-state is selected, Fides will only present consent to consumers and save their preferences if they are located in a state that is supported by the GPP. The consent options presented to consumers will vary depending on the regulations in each state."},{label:"Enable US National and State-by-State notices",value:y.en.ALL,tooltip:"When enabled, Fides can be configured to serve the National and U.S. state notices. This mode is intended to provide consent coverage to U.S. states with new privacy laws where GPP support lags behind the effective date of state laws."}]})}),d?(0,n.jsxs)(w,{title:"MSPA",children:[(0,n.jsx)(f.Xl,{name:"gpp.mspa_covered_transactions",label:"All transactions covered by MSPA",tooltip:"When selected, the Fides CMP will communicate to downstream vendors that all preferences are covered under the MSPA.",onChange:e=>{e||(l("gpp.mspa_service_provider_mode",!1),l("gpp.mspa_opt_out_option_mode",!1))}}),(0,n.jsx)(f.w8,{label:"Enable MSPA service provider mode",name:"gpp.mspa_service_provider_mode",variant:"switchFirst",tooltip:"Enable service provider mode if you do not engage in any sales or sharing of personal information.",isDisabled:!!i.gpp.mspa_opt_out_option_mode||!i.gpp.mspa_covered_transactions}),(0,n.jsx)(f.w8,{label:"Enable MSPA opt-out option mode",name:"gpp.mspa_opt_out_option_mode",variant:"switchFirst",tooltip:"Enable opt-out option mode if you engage or may engage in the sales or sharing of personal information, or process any information for the purpose of targeted advertising.",isDisabled:!!i.gpp.mspa_service_provider_mode||!i.gpp.mspa_covered_transactions})]}):null]}):null,e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.izJ,{color:"gray.200"}),(0,n.jsxs)(w,{title:"GPP Europe",children:[(0,n.jsx)(r.xvT,{fontSize:"sm",fontWeight:"medium",children:"Configure TCF string for Global Privacy Platform"}),(0,n.jsx)(f.w8,{label:"Enable TC string",name:"gpp.enable_tcfeu_string",variant:"switchFirst",tooltip:"When enabled, the GPP API will include a TCF EU consent string for users who are in regions where TCF applies."})]})]}):null]})})},S=i(64781),k=i(60325),N=()=>{var e,t;let{tcf:i}=(0,a.hz)(),{values:l,setFieldValue:o}=(0,s.u6)(),{data:d,isLoading:c}=(0,S.gT)(),u=[...(0,k.k1)(null!==(e=null==d?void 0:d.locations)&&void 0!==e?e:[]),...(0,k.k1)(null!==(t=null==d?void 0:d.location_groups)&&void 0!==t?t:[])].sort((e,t)=>e.name<t.name?-1:1);return i?(0,n.jsxs)(C.Z,{title:"Publisher settings",children:[(0,n.jsx)(r.AntTypography.Paragraph,{className:"mb-3",children:"Specify the country in which your organization operates for TCF compliance. This setting will determine the 'Publisher Country Code ' transmitted in the Transparency and Consent (TC) Data."}),(0,n.jsx)("label",{htmlFor:"publisher_country_code",className:"mb-1 block",children:(0,n.jsx)(r.AntTypography.Text,{className:"font-semibold",children:"Publisher country"})}),(0,n.jsx)(r.WPr,{"data-testid":"input-publisher_settings.publisher_country_code",id:"publisher_country_code",loading:c,allowClear:!0,options:null==u?void 0:u.map(e=>({value:e.id,label:e.name})),showSearch:!0,optionFilterProp:"label",placeholder:"Select a country",value:l.tcfPublisherSettings.publisher_country_code,onChange:e=>o("tcfPublisherSettings.publisher_country_code",e),className:"w-80"})]}):null},P=i(52955),q=i(71795),E=i(59512),I=i(55484),L=i(8133),O=i(31883);let F=I.Ry().shape({name:I.Z_().required().label("Name")}),R=e=>{let{isOpen:t,onClose:i,onSuccess:l}=e,o=(0,r.pmc)(),[a]=(0,P.LK)(),c=async e=>{let t=await a({name:e.name});(0,O.D4)(t)?o((0,h.Vo)((0,d.e$)(t.error))):(o((0,h.t5)("Successfully created TCF configuration")),null==l||l(t.data.id),i())};return(0,n.jsx)(L.Z,{title:"Create a new TCF configuration",isOpen:t,onClose:i,children:(0,n.jsx)(s.J9,{initialValues:{name:""},onSubmit:c,validationSchema:F,children:e=>{let{isValid:t,dirty:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",className:"w-full",children:[(0,n.jsx)(r.xvT,{children:"TCF configurations allow you to define unique sets of publisher restrictions. These configurations can be added to privacy experiences."}),(0,n.jsx)(f.j0,{id:"name",name:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsxs)(r.vyj,{className:"w-full justify-end pt-6",children:[(0,n.jsx)(r.wpx,{onClick:i,children:"Cancel"}),(0,n.jsx)(r.wpx,{type:"primary",htmlType:"submit",disabled:!t||!l,"data-testid":"save-config-button",children:"Save"})]})]})})}})})};var A=i(79894),z=i.n(A);let D=e=>{let{width:t,style:i,borderLeft:s=!1,borderRight:l=!1,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",className:"h-full px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderRight:l?"solid 1px":"none",borderColor:"var(--ant-color-border)",width:t,...i},role:"cell"})},W=e=>{let{width:t,style:i,borderLeft:s=!1,children:l,...o}=e;return(0,n.jsx)(r.jqI,{align:"center",role:"columnheader",className:"px-4",...o,style:{borderLeft:s?"solid 1px":"none",borderColor:"var(--ant-color-border)",fontWeight:500,whiteSpace:"nowrap",width:t,...i},children:l})},M=e=>{let{isHeader:t=!1,isLastRow:i=!1,style:s,...l}=e;return(0,n.jsx)(r.jqI,{role:t?"rowheader":"row",className:"h-9 w-full",...l,style:{backgroundColor:t?"var(--fidesui-bg-default)":void 0,borderBottom:i?"none":"solid 1px",borderColor:"var(--ant-color-border)",...s}})},Z=e=>{let{config:t,isLoading:i,style:s,...l}=e,{purposes:a}=(0,o.C)(p.ZS);return(0,n.jsxs)(r.jqI,{vertical:!0,...l,style:{maxWidth:"1200px",border:"solid 1px",borderColor:"var(--ant-color-border)",backgroundColor:"var(--ant-color-bg-base)",fontSize:"12px",...s},"aria-label":"Publisher restrictions table",role:"table","data-testid":"publisher-restrictions-table",children:[(0,n.jsxs)(M,{isHeader:!0,style:{width:"100%"},children:[(0,n.jsx)(W,{width:"600px",children:"TCF purpose"}),(0,n.jsxs)(W,{flex:1,gap:3,borderLeft:!0,children:["Restrictions",(0,n.jsx)(_.b,{label:"Restrictions control how vendors are permitted to process data for specific purposes. Fides supports three restriction types: Purpose Restriction to completely disallow data processing for a purpose, Require Consent to allow processing only with explicit user consent, and Require Legitimate Interest to allow processing based on legitimate business interest unless the user objects."})]}),(0,n.jsxs)(W,{width:"100px",gap:3,borderLeft:!0,children:["Flexible",(0,n.jsx)(_.b,{label:'Indicates whether the legal basis for this purpose can be overridden by publisher restrictions. If marked "No," the purpose has a fixed legal basis defined by the TCF and cannot be changed.'})]}),(0,n.jsx)(W,{width:"100px",borderLeft:!0,children:"Actions"})]}),Object.values(a).map((e,s)=>(0,n.jsxs)(M,{isLastRow:s===Object.values(a).length-1,children:[(0,n.jsxs)(D,{width:"600px",children:["Purpose ",e.id,": ",e.name]}),(0,n.jsx)(D,{flex:1,borderLeft:!0,"data-testid":"restriction-type-cell-".concat(e.id),children:i?(0,n.jsx)(r.OdW,{height:"16px",width:"100%"}):(()=>{var i;let s=(null==t?void 0:null===(i=t.restriction_types_per_purpose)||void 0===i?void 0:i[e.id])||[];return 0===s.length?"none":1===s.length?(0,n.jsx)(r.xvT,{size:"sm",whiteSpace:"nowrap",children:E.fj[s[0]]}):(0,n.jsxs)(r.xvT,{children:[s.length," restrictions"]})})()}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:E.Py.includes(e.id)?(0,n.jsx)(r.j8w,{color:"error","data-testid":"flexibility-tag-".concat(e.id),children:"No"}):(0,n.jsx)(r.j8w,{color:"success","data-testid":"flexibility-tag-".concat(e.id),children:"Yes"})}),(0,n.jsx)(D,{width:"100px",borderLeft:!0,children:(0,n.jsx)(z(),{href:"/settings/consent/".concat(null==t?void 0:t.id,"/").concat(e.id),passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(r.wpx,{size:"small","data-testid":"edit-restriction-btn-".concat(e.id),children:"Edit"})})})]},e.id))]})};var V=i(56358),H=i(19904);let B=()=>(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"}),(0,n.jsx)(r.OdW,{width:"100%",className:"h-4"})]}),G=e=>{let{searchResults:t,selectedConfigId:i,handleSelection:s,userCanDeleteConfigs:l,onDeleteOpen:o,setConfigToDelete:a}=e;return(0,n.jsx)(r.y02.Group,{onChange:e=>s(e.target.value),value:i,className:"flex flex-col gap-2",children:t.map(e=>(0,n.jsxs)(r.jqI,{className:l?"justify-between":"justify-start","data-testid":"tcf-config-item-".concat(e.id),children:[(0,n.jsx)(r.y02,{value:e.id,name:"tcf-config-id","data-testid":"tcf-config-item",children:(0,n.jsx)(r.xvT,{className:"text-sm",children:e.name})}),l&&(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(V.q,{fontSize:16}),onClick:t=>{t.stopPropagation(),a(e),o()},"data-testid":"delete-config-button"})]},e.id))})},U=e=>{let t,{searchTerm:i,setSearchTerm:s,searchResults:o,selectedConfigId:a,handleSelection:d,userCanCreateConfigs:c,userCanDeleteConfigs:u,modalOnOpen:p,onDeleteOpen:h,setConfigToDelete:g,isLoading:f,setDropdownOpen:x,configurations:v}=e,[b,m]=(0,l.useState)(a);return(0,l.useEffect)(()=>{m(a)},[a]),t=f?(0,n.jsx)(B,{}):0===o.length?(0,n.jsx)(r.xvT,{className:"text-center",children:"No configurations found."}):(0,n.jsx)(G,{searchResults:o,selectedConfigId:b,handleSelection:e=>{m(e)},userCanDeleteConfigs:u,onDeleteOpen:h,setConfigToDelete:g}),(0,n.jsxs)(r.V4A,{title:"TCF configurations",className:"min-w-[300px]",extra:(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:(0,n.jsx)(r.Two,{}),onClick:()=>x(!1),"data-testid":"close-config-dropdown"}),style:{boxShadow:"var(--ant-box-shadow)"},children:[v.length>10&&(0,n.jsx)(r.BZy,{size:"sm",children:(0,n.jsx)(r.uFc,{className:"mb-4",placeholder:"Search...",onChange:e=>s(e.target.value),value:i})}),t,(0,n.jsxs)(r.jqI,{gap:"small",className:"mt-4",children:[c&&(0,n.jsx)(r.wpx,{size:"small",onClick:()=>{p(),x(!1)},className:"flex-1","data-testid":"create-config-button",children:"+ Create"}),(0,n.jsx)(r.wpx,{size:"small",onClick:()=>d(b),className:"flex-1","data-testid":"apply-config-button",disabled:b===a,children:"Apply"})]})]})},$=e=>(0,n.jsx)(U,{...e}),K=e=>{var t;let{selectedConfigId:i,configurations:s,isLoading:o=!1,onConfigurationSelect:a,onConfigurationDelete:c}=e,u=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),p=(0,H.Tg)([y.Sh.PRIVACY_EXPERIENCE_CREATE]),h=(0,r.pmc)({id:"tcf-config-toast"}),[g]=(0,P.Cm)(),{isOpen:f,onOpen:x,onClose:v}=(0,r.qY0)(),{isOpen:b,onOpen:m,onClose:_}=(0,r.qY0)(),[j,C]=(0,l.useState)(""),[w,T]=(0,l.useState)(),[S,k]=(0,l.useState)(!1),N=(0,l.useMemo)(()=>j?s.filter(e=>e.name.toLowerCase().includes(j.toLowerCase())):s,[s,j]),q=(0,l.useMemo)(()=>s.find(e=>e.id===i),[s,i]),E=null!==(t=null==q?void 0:q.name)&&void 0!==t?t:"Select Configuration",I=e=>{a(e),k(!1)},L=async e=>{try{await g(e).unwrap(),null==c||c(e),T(void 0),_(),h({status:"success",description:'Configuration "'.concat(null==w?void 0:w.name,'" was successfully deleted.')})}catch(e){h({status:"error",description:(0,d.e$)(e,"A problem occurred while deleting the configuration.")})}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.S0p,{open:S,onOpenChange:k,trigger:["click"],overlayStyle:{zIndex:999},dropdownRender:()=>$({searchTerm:j,setSearchTerm:C,searchResults:N,selectedConfigId:i,handleSelection:I,userCanCreateConfigs:u,userCanDeleteConfigs:p,modalOnOpen:x,onDeleteOpen:m,setConfigToDelete:T,isLoading:o,setDropdownOpen:k,configurations:s}),children:(0,n.jsx)(r.wpx,{icon:(0,n.jsx)(r.v4q,{}),iconPosition:"end","data-testid":"tcf-config-dropdown-trigger",children:E})}),(0,n.jsx)(R,{isOpen:f,onClose:v,onSuccess:e=>{a(e)}}),(0,n.jsx)(r.cVQ,{isOpen:b,onClose:()=>{T(void 0),_()},onConfirm:()=>{w&&L(w.id)},title:"Delete configuration",message:"Are you sure you want to delete this configuration? This action cannot be undone."})]})};var Y=i(32885);let X=e=>{let{defaultChecked:t,onChange:i,...s}=e,o=(0,r.pmc)(),[a,c]=(0,l.useState)(t),[u,p]=(0,l.useState)(!1),{isLoading:f}=(0,Y.x8)(),[x,{isLoading:v}]=(0,g.L)(),[b]=(0,Y.M7)(),{data:m}=(0,Y.n3)(void 0,{skip:f}),j=async e=>{let t=await x({consent:{override_vendor_purposes:e}});e&&m&&await b(m.map(e=>({...e,is_included:!0,required_legal_basis:void 0}))),(t=>{if(o.closeAll(),null==i||i(e),(0,O.D4)(t)){let e=(0,d.e$)(t.error,"An unexpected error occurred while saving vendor override settings. Please try again.");null==i||i(!1),o((0,h.Vo)(e))}})(t)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",children:[(0,n.jsx)(r.xvT,{children:"Configure overrides for TCF related purposes."}),(0,n.jsxs)(r.vyj,{size:"small",children:[(0,n.jsx)(r.rAg,{size:"small",disabled:v,loading:v,...s,checked:a,defaultChecked:t,onClick:e=>{e?(c(e),j(e)):p(!0)},"data-testid":"tcf-override-toggle"}),(0,n.jsx)(r.xvT,{children:"Override vendor purposes"}),(0,n.jsx)(_.b,{label:"Toggle on if you want to globally change any flexible legal bases or remove TCF purposes from your CMP"})]})]}),(0,n.jsx)(r.cVQ,{isOpen:u,onClose:()=>p(!1),onConfirm:()=>{c(!1),j(!1),p(!1)},title:"Disable Vendor Overrides",message:"Are you sure you want to disable vendor overrides? Clicking 'Continue' will immediately remove any custom configurations you have set for TCF purposes for all experiences."})]})},J=e=>{var t;let{isTCFOverrideEnabled:i}=e,[s,o]=(0,l.useState)(i),[a,d]=(0,l.useState)(!1),[c,u]=(0,q._)("selectedTCFConfigId",null),{data:p,isLoading:h}=(0,P.LS)({page:1,size:50},{skip:!i}),{data:g,isFetching:f}=(0,P.NZ)(c||"",{skip:!c});return(0,l.useEffect)(()=>{var e,t;!h&&(null==p?void 0:null===(e=p.items)||void 0===e?void 0:e.length)&&!c&&u(p.items[0].id),h||!c||(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)||u(null)},[h,null==p?void 0:p.items,c,u]),(0,n.jsxs)(C.Z,{title:"Publisher restrictions",fontSize:"sm",children:[(0,n.jsxs)(r.vyj,{direction:"vertical",size:"small",style:{width:"100%"},children:[(0,n.jsx)(X,{defaultChecked:s,onChange:e=>o(e)}),s&&(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"20px"}),(0,n.jsx)(r.OdW,{height:"32px",width:"200px"})]}),!h&&(null==p?void 0:null===(t=p.items)||void 0===t?void 0:t.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activities."}),(0,n.jsxs)(r.xvT,{children:["To configure this section, select a TCF purpose to edit the restriction type and vendors."," ",(0,n.jsx)(b.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(K,{selectedConfigId:c||"",configurations:(null==p?void 0:p.items)||[],onConfigurationSelect:u})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.xvT,{children:['To define custom publisher restrictions select "create configuration" below.'," ",(0,n.jsx)(b.Z,{href:E.uh,children:"Learn more about publisher restrictions"})," ","in our docs."]}),(0,n.jsx)(r.wpx,{onClick:()=>d(!0),"data-testid":"create-config-button",children:"Create configuration +"})]})]})]}),(0,n.jsx)(R,{isOpen:a,onClose:()=>d(!1),onSuccess:e=>{u(e)}}),s&&c&&(0,n.jsx)(Z,{className:"mt-3",config:g,isLoading:f})]})};var Q=()=>{var e,t;let{isLoading:i}=(0,Y.x8)(),{tcf:f}=(0,a.hz)(),{data:x,isLoading:b}=(0,Y.n3)(void 0,{skip:i||!f}),[_,{isLoading:j}]=(0,Y.M7)(),{data:w,isLoading:S}=(0,g.tB)({api_set:!0}),{data:k,isLoading:P}=(0,g.tB)({api_set:!1}),[q]=(0,g.L)(),E=(0,o.C)(g.D2),I=(0,o.C)(g.Yh),L=(0,l.useMemo)(()=>w&&(null==w?void 0:w.consent)&&"override_vendor_purposes"in w.consent?w.consent.override_vendor_purposes:!!k&&null!=k&&!!k.consent&&"override_vendor_purposes"in k.consent&&k.consent.override_vendor_purposes,[w,k]),{isLoading:O}=(0,p.a4)(),F=(0,r.pmc)(),R=async e=>{var t;let i=e=>{if(F.closeAll(),(0,d.D4)(e)){let t=(0,d.e$)(e.error,"An unexpected error occurred while saving. Please try again.");F((0,h.Vo)(t))}else F((0,h.t5)("Settings saved successfully"))},n=[...e.purposeOverrides.map(e=>{let t;return e.is_consent&&(t=y.I$.CONSENT),e.is_legitimate_interest&&(t=y.I$.LEGITIMATE_INTERESTS),{purpose:e.purpose,is_included:e.is_included,required_legal_basis:t}})];if(L){let e=await _(n);if((0,d.D4)(e)){i(e);return}}let{enabled:r,...s}=e.gpp;i(await q({gpp:s,plus_consent_settings:{tcf_publisher_country_code:null!==(t=e.tcfPublisherSettings.publisher_country_code)&&void 0!==t?t:null}}))},A=(0,l.useMemo)(()=>({purposeOverrides:x?x.map(e=>({purpose:e.purpose,is_included:e.is_included,is_consent:e.required_legal_basis===y.I$.CONSENT,is_legitimate_interest:e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS})):[],gpp:E,tcfPublisherSettings:{publisher_country_code:I.tcf_publisher_country_code}}),[x,E,I]),z=(0,l.useMemo)(()=>(null==x?void 0:x.some(e=>!e.is_included||e.required_legal_basis===y.I$.CONSENT||e.required_legal_basis===y.I$.LEGITIMATE_INTERESTS))||!1,[x]),D=null===(t=(0,a.hz)())||void 0===t?void 0:null===(e=t.flags)||void 0===e?void 0:e.publisherRestrictions;return(0,n.jsx)(c.Z,{title:"Consent Configuration",children:i||O||b||S||P?(0,n.jsx)(r.kCb,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,n.jsx)(r.$jN,{})}):(0,n.jsxs)(r.xuv,{"data-testid":"consent-configuration",children:[(0,n.jsx)(u.Z,{heading:"Consent settings"}),(0,n.jsxs)(r.Kqy,{spacing:3,mb:3,children:[(0,n.jsx)(C.Z,{title:"Transparency & Consent Framework settings",children:(0,n.jsx)(m,{name:"TCF",enabled:f})}),f&&!z&&D&&(0,n.jsx)(J,{isTCFOverrideEnabled:L})]}),(0,n.jsx)(s.J9,{initialValues:A,enableReinitialize:!0,onSubmit:R,children:e=>{let{dirty:t,isValid:i,isSubmitting:l}=e;return(0,n.jsx)(s.l0,{children:(0,n.jsxs)(r.Kqy,{spacing:6,children:[f&&(z||!D)&&(0,n.jsxs)(C.Z,{title:"Vendor overrides",fontSize:"sm",children:[(0,n.jsx)(X,{defaultChecked:L,disabled:j}),L&&(0,n.jsxs)(r.Kqy,{mt:2,spacing:2,children:[(0,n.jsx)(r.xvT,{children:"The table below allows you to adjust which TCF purposes you allow as part of your user facing notices and business activites."}),(0,n.jsx)(r.xvT,{children:"To configure this section, select the purposes you allow and where available, the appropriate legal bases (either Consent or Legitimate Interest)."}),(0,n.jsx)(v,{})]})]}),(0,n.jsx)(N,{}),(0,n.jsx)(T,{}),(0,n.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,loading:l,"data-testid":"save-btn",className:"self-start",children:"Save"})]})})}})]})})}},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return r},Dy:function(){return a},XD:function(){return d},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var n=i(76649);let r=e=>"error"in e,s=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),o=e=>(0,n.Ln)({detail:"string"},e),a=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,i){"use strict";i.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=i(19043)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r 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,i])=>s(i,t[e]));class l{static narrow(e){return new l(t=>n(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,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=53748)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9252],{98648:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/domains",function(){return n(76974)}])},59301:function(t,e,n){"use strict";var i=n(24246);let{Link:r}=n(91942).AntTypography;e.Z=t=>(0,i.jsx)(r,{target:"_blank",rel:"noopener noreferrer",...t})},77213:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var i=n(24246),r=n(91942),s=n(88038),o=n.n(s),a=n(86677);n(27378);var l=n(25980),c=n(90867),d=n(77830),u=()=>{let t=(0,a.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{t.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=t=>{let{children:e,title:n,padded:s=!0,mainProps:d}=t,g=(0,l.hz)(),p=(0,a.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,c.JE)(void 0,{skip:m}),{data:x}=(0,c.PW)(void 0,{skip:m}),v=g.flags.privacyRequestsConfiguration&&(!h||!x)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(o(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[v?(0,i.jsx)(u,{}):null,e]})]})}},58754:function(t,e,n){"use strict";var i=n(24246),r=n(91942),s=n(70788);e.Z=t=>{let{heading:e,breadcrumbItems:n,isSticky:o=!0,children:a,rightContent:l,style:c,...d}=t;return(0,i.jsxs)("div",{...d,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof e?(0,i.jsx)(r.lQT,{className:n||a?"pb-4":void 0,level:1,"data-testid":"page-heading",children:e}):e,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:a?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),a]})}},10342:function(t,e,n){"use strict";var i=n(24246),r=n(91942),s=n(46238);e.Z=t=>{let{title:e,tooltip:n,children:o,...a}=t;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...a,children:[(0,i.jsxs)(r.X6q,{as:"h3",fontSize:"sm",fontWeight:"semibold",color:"gray.700",py:4,px:6,backgroundColor:"gray.50",borderRadius:"md",textAlign:"left",children:[e,n?(0,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.b,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:o})]})}},812:function(t,e,n){"use strict";n.d(e,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return c},c6:function(){return r},cj:function(){return f},e$:function(){return a},fn:function(){return l},iC:function(){return p},nU:function(){return u},tB:function(){return d}});var i,r,s=n(19043);let o="An unexpected error occurred. Please try again.",a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,s.Bw)(t)){if((0,s.hE)(t.data))return t.data.detail;if((0,s.cz)(t.data)){var n;let e=null===(n=t.data.detail)||void 0===n?void 0:n[0];return"".concat(null==e?void 0:e.msg,": ").concat(null==e?void 0:e.loc)}if(409===t.status&&(0,s.Dy)(t.data)||404===t.status&&(0,s.XD)(t.data))return"".concat(t.data.detail.error," (").concat(t.data.detail.fides_key,")")}return e};function l(t){return"object"==typeof t&&null!=t&&"status"in t}function c(t){return"object"==typeof t&&null!=t&&"data"in t&&"string"==typeof t.data.detail}function d(t){return"object"==typeof t&&null!=t&&"data"in t&&Array.isArray(t.data.detail)}let u=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,s.oK)(t))return{status:t.originalStatus,message:t.data};if((0,s.Bw)(t)){let{status:n}=t;return{status:n,message:a(t,e.message)}}return e},g=t=>Object.entries(t).map(t=>({value:t[1],label:t[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=t=>{let e=t.split(".")[0];return"gacp"===e?"gacp":"gvl"===e?"gvl":"compass"}},70788:function(t,e,n){"use strict";n.d(e,{m:function(){return c}});var i=n(24246),r=n(91942),s=n(79894),o=n.n(s),a=n(27378);let{Text:l}=r.AntTypography,c=t=>{let{items:e,...n}=t,s=(0,a.useMemo)(()=>null==e?void 0:e.map((t,n)=>{let s=n===e.length-1,a={...t},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:a.title})),c)?a.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,i.jsx)(o(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[e]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(t,e,n){"use strict";n.d(e,{D2:function(){return g},L:function(){return a},U7:function(){return c},Yh:function(){return f},ak:function(){return l},iR:function(){return h},km:function(){return o},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:t=>({getConfigurationSettings:t.query({query:t=>{let{api_set:e}=t;return{url:"/config",method:"GET",params:{api_set:e}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PUT",body:t}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:t.mutation({query:t=>({url:"/config",method:"PATCH",body:t}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:o,usePatchConfigurationSettingsMutation:a}=r,l=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{var i,r,s;let{data:o}=e,{data:a}=n;return{configSet:{cors_origins:(null==a?void 0:null===(i=a.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(r=a.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==o?void 0:null===(s=o.security)||void 0===s?void 0:s.cors_origins)||[]}}}),c=()=>(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0})],(t,e)=>{let{data:n}=e;return n}),d={enabled:!1,cmp_api_required:!1},u=(t,e,n,i)=>{let r=n&&n[t],s=i&&i[t];return r&&s?{...i[t],...n[t]}:s?i[t]:r?{...n[t]}:e},g=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("gpp",d,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("plus_consent_settings",p,i,r)}),m={allow_username_password_login:!1},h=(0,i.P1)([t=>t,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(t,e,n)=>{let{data:i}=e,{data:r}=n;return u("plus_security_settings",m,i,r)})},76974:function(t,e,n){"use strict";n.r(e);var i=n(24246),r=n(91942),s=n(34090),o=n(55484),a=n(16134),l=n(59301),c=n(10342),d=n(40324),u=n(812),g=n(77213),p=n(58754),f=n(46628),m=n(7426);e.default=()=>{var t;let{isLoading:e}=(0,m.tB)({api_set:!0}),{isLoading:n}=(0,m.tB)({api_set:!1}),h=(0,a.C)(m.ak),x=h.apiSet,v=h.configSet,y=!!((null===(t=v.cors_origins)||void 0===t?void 0:t.length)||v.cors_origin_regex),b=(0,a.C)((0,m.U7)()),[j,{isLoading:_}]=(0,m.km)(),C=(0,r.pmc)(),w=t=>{if(!t||!(t.startsWith("https://")||t.startsWith("http://")))return!1;try{new URL(t)}catch(t){return!1}return!0},k=t=>!!t&&!t.includes("*"),S=t=>{if(!t)return!1;try{let e=new URL(t);return"/"===e.pathname&&!t.endsWith("/")}catch(t){return!1}},N=o.Ry().shape({cors_origins:o.IX().nullable().of(o.Z_().required().trim().test("is-valid-url",t=>{let{label:e}=t;return"".concat(e," must be a valid URL (e.g. https://example.com)")},t=>w(t)).test("has-no-wildcard",t=>{let{label:e}=t;return"".concat(e," cannot contain a wildcard (e.g. https://*.example.com)")},t=>k(t)).test("has-no-path",t=>{let{label:e}=t;return"".concat(e," cannot contain a path (e.g. https://example.com/path)")},t=>S(t)).label("Domain"))}),A=async(t,e)=>{let n=t.cors_origins&&t.cors_origins.length>0?t.cors_origins:void 0,i={...b,security:{cors_origins:n}};(n=>{if(C.closeAll(),(0,u.D4)(n)){let t=(0,u.e$)(n.error,"An unexpected error occurred while saving domains. Please try again.");C((0,f.Vo)(t))}else C((0,f.t5)("Domains saved successfully")),e.resetForm({values:t})})(await j(i))};return(0,i.jsx)(g.Z,{title:"Domains",children:(0,i.jsxs)(r.xuv,{"data-testid":"management-domains",children:[(0,i.jsx)(p.Z,{heading:"Domains"}),(0,i.jsxs)(r.xuv,{maxW:"600px",children:[(0,i.jsxs)(r.xvT,{fontSize:"sm",pb:6,children:["For Fides to work on your website(s), each of your domains must be listed below. You can add and remove domains at any time up to the quantity included in your license. For more information on managing domains"," ",(0,i.jsx)(l.Z,{href:"https://fid.es/domain-configuration",children:"read here"}),"."]}),(0,i.jsx)(c.Z,{"data-testid":"api-set-domains-form",title:"Organization domains",tooltip:"Fides uses these domains to enforce cross-origin resource sharing (CORS), a browser-based security standard. Each domain must be a valid URL (e.g. https://example.com) without any wildcards '*' or paths '/blog'",children:e||_?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsx)(s.J9,{initialValues:x,enableReinitialize:!0,onSubmit:A,validationSchema:N,validateOnChange:!0,children:t=>{let{dirty:e,values:n,isValid:o}=t;return(0,i.jsxs)(s.l0,{children:[(0,i.jsx)(s.F2,{name:"cors_origins",render:t=>(0,i.jsxs)(r.kCb,{flexDir:"column",children:[n.cors_origins.map((e,n)=>(0,i.jsxs)(r.kCb,{flexDir:"row",my:3,children:[(0,i.jsx)(d.j0,{variant:"stacked",name:"cors_origins[".concat(n,"]"),placeholder:"https://subdomain.example.com:9090"}),(0,i.jsx)(r.wpx,{"aria-label":"delete-domain",className:"z-[2] ml-4",icon:(0,i.jsx)(r.pJl,{}),onClick:()=>{t.remove(n)}})]},n)),(0,i.jsx)(r.kCb,{justifyContent:"center",mt:3,children:(0,i.jsx)(r.wpx,{"aria-label":"add-domain",className:"w-full",onClick:()=>{t.push("")},children:"Add domain"})})]})}),(0,i.jsx)(r.xuv,{mt:6,children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",disabled:_||!e||!o,loading:_,"data-testid":"save-btn",children:"Save"})})]})}})})]}),(0,i.jsx)(r.xuv,{maxW:"600px",marginY:3,children:(0,i.jsx)(c.Z,{"data-testid":"config-set-domains-form",title:"Advanced settings",tooltip:"These domains are configured by an administrator with access to Fides security settings and can support more advanced options such as wildcards and regex.",children:n?(0,i.jsx)(r.kCb,{justifyContent:"center",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsxs)(r.kCb,{flexDir:"column",children:[v.cors_origins.map((t,e)=>(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origins[".concat(e,"]"),marginY:3,value:t,isDisabled:!0,isPassword:!1},e)),v.cors_origin_regex?(0,i.jsx)(d.oi,{"data-testid":"input-config_cors_origin_regex",marginY:3,value:v.cors_origin_regex,isDisabled:!0,isPassword:!1},"cors_origin_regex"):void 0,y?void 0:(0,i.jsx)(r.xvT,{fontSize:"xs",color:"gray.500",children:"No advanced domain settings configured."})]})})})]})})}},19043:function(t,e,n){"use strict";n.d(e,{Bw:function(){return o},D4:function(){return r},Dy:function(){return l},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return s}});var i=n(76649);let r=t=>"error"in t,s=t=>(0,i.Ln)({status:"string"},t)&&"PARSING_ERROR"===t.status,o=t=>(0,i.Ln)({status:"number",data:{}},t),a=t=>(0,i.Ln)({detail:"string"},t),l=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),c=t=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},t),d=t=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},t)},76649:function(t,e,n){"use strict";n.d(e,{Ln:function(){return i}});let i=(t,e)=>s(t,e),r=Symbol("SOME"),s=(t,e)=>"string"==typeof t?t===typeof e:Array.isArray(t)?r in t?t.some(t=>s(t,e)):!!Array.isArray(e)&&(0===t.length||e.every(e=>t.some(t=>s(t,e)))):"object"==typeof e&&null!==e&&Object.entries(t).every(([t,n])=>s(n,e[t]));class o{static narrow(t){return new o(e=>i(t,e))}constructor(t){this.NF=void 0,this.NF=t}satisfied(t){return this.NF(t)}build(t){return t}and(t){let e=this.NF,n=t instanceof o?t.NF:t instanceof Function?t:e=>i(t,e);return new o(t=>e(t)&&n(t))}}new o(t=>!0)}},function(t){t.O(0,[2888,9774,179],function(){return t(t.s=98648)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4966],{18193:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/email-templates",function(){return n(43104)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(24246),r=n(91942),s=n(88038),a=n.n(s),l=n(86677);n(27378);var o=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,l.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,p=(0,o.hz)(),g=(0,l.useRouter)(),m="/privacy-requests"===g.pathname||"/datastore-connection"===g.pathname,f=!(p.flags.privacyRequestsConfiguration&&m),{data:h}=(0,u.JE)(void 0,{skip:f}),{data:x}=(0,u.PW)(void 0,{skip:f}),y=p.flags.privacyRequestsConfiguration&&(!h||!x)&&m;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[y?(0,i.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(91942),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:l,rightContent:o,style:u,...c}=e;return(0,i.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,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.lQT,{className:n||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,i.jsx)(s.m,{className:l?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),l]})}},10342:function(e,t,n){"use strict";var i=n(24246),r=n(91942),s=n(46238);t.Z=e=>{let{title:t,tooltip:n,children:a,...l}=e;return(0,i.jsxs)(r.xuv,{borderRadius:"md",border:"1px solid",borderColor:"gray.200",...l,children:[(0,i.jsxs)(r.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,i.jsx)(r.xvT,{as:"span",mx:1,children:(0,i.jsx)(s.b,{label:n})}):void 0]}),(0,i.jsx)(r.Kqy,{p:6,spacing:6,children:a})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return p},Ot:function(){return u},c6:function(){return r},cj:function(){return m},e$:function(){return l},fn:function(){return o},iC:function(){return g},nU:function(){return d},tB:function(){return c}});var i,r,s=n(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let g={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},m=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var i=n(24246),r=n(91942),s=n(79894),a=n.n(s),l=n(27378);let{Text:o}=r.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,i.jsx)(o,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:l.title})),u)?l.title=(0,i.jsx)(r.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,i.jsx)(a(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},47466:function(e,t,n){"use strict";n.d(t,{KC:function(){return a},ew:function(){return l},gQ:function(){return s},jM:function(){return i},lE:function(){return r}});let{useGetMessagingTemplatesQuery:i,useUpdateMessagingTemplatesMutation:r,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"]})})})},43104:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var i=n(24246),r=n(91942),s=n(77213),a=n(58754),l=n(34090),o=n(10342),u=n(40324),c=n(812),d=n(46628),p=n(47466),g=e=>{let{emailTemplates:t}=e,[n,{isLoading:s}]=(0,p.lE)(),a=(0,r.pmc)(),g=async(e,t)=>{let i=Object.entries(e).map(e=>{let[t,{content:n}]=e;return{type:t,content:n}});(n=>{if((0,c.D4)(n)){let e=(0,c.e$)(n.error,"An unexpected error occurred while editing the email templates. Please try again.");a((0,d.Vo)(e))}else a((0,d.t5)("Email templates saved.")),t.resetForm({values:e})})(await n(i))},m=t.reduce((e,t)=>({...e,[t.type]:{label:t.label,content:t.content}}),{});return(0,i.jsx)(l.J9,{enableReinitialize:!0,initialValues:m,onSubmit:g,children:()=>(0,i.jsxs)(l.l0,{style:{paddingTop:"12px",paddingBottom:"12px"},children:[Object.entries(m).map(e=>{let[t,n]=e;return(0,i.jsx)(r.xuv,{py:3,children:(0,i.jsxs)(o.Z,{title:n.label,children:[(0,i.jsx)(u.j0,{label:"Message subject",name:"".concat(t,".content.subject"),variant:"stacked"}),(0,i.jsx)(u.Ks,{label:"Message body",name:"".concat(t,".content.body"),variant:"stacked",resize:!0})]})},t)}),(0,i.jsx)(r.kCb,{justifyContent:"right",width:"100%",paddingTop:2,children:(0,i.jsx)(r.wpx,{htmlType:"submit",type:"primary",loading:s,children:"Save"})})]})})},m=()=>{let{data:e,isLoading:t}=(0,p.jM)();return t?(0,i.jsx)(s.Z,{title:"Email templates",children:(0,i.jsx)(r.$jN,{})}):(0,i.jsx)(s.Z,{title:"Email templates",children:(0,i.jsxs)(r.xuv,{"data-testid":"email-templates",children:[(0,i.jsx)(a.Z,{heading:"Email Templates"}),(0,i.jsxs)(r.xuv,{maxWidth:"720px",children:[(0,i.jsx)(r.xvT,{fontSize:"sm",children:"When privacy requests are submitted, Fides emails the data subject to confirm their identity and keep them updated on the status of the request. The templates below allow you to configure the subject and body of the email to suit your business needs. To change the appearance of the email, you may use the editors within your messaging provider (e.g. Mailgun, SendGrid, Twilio)."}),(0,i.jsx)(r.xuv,{padding:2,children:(0,i.jsx)(g,{emailTemplates:e})})]})]})})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return o},XD:function(){return u},cz:function(){return c},hE:function(){return l},oK:function(){return s}});var i=n(76649);let r=e=>"error"in e,s=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),l=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r 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=>i(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=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=18193)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2828],{85082:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/organization",function(){return t(5417)}])},77213:function(e,i,t){"use strict";t.d(i,{Z:function(){return p}});var n=t(24246),r=t(91942),a=t(88038),o=t.n(a),s=t(86677);t(27378);var l=t(25980),d=t(90867),c=t(77830),u=()=>{let e=(0,s.useRouter)();return(0,n.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(r.xuv,{children:[(0,n.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,n.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:i,title:t,padded:a=!0,mainProps:c}=e,p=(0,l.hz)(),m=(0,s.useRouter)(),x="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,f=!(p.flags.privacyRequestsConfiguration&&x),{data:h}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),g=p.flags.privacyRequestsConfiguration&&(!h||!v)&&x;return(0,n.jsxs)(r.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(r.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[g?(0,n.jsx)(u,{}):null,i]})]})}},58754:function(e,i,t){"use strict";var n=t(24246),r=t(91942),a=t(70788);i.Z=e=>{let{heading:i,breadcrumbItems:t,isSticky:o=!0,children:s,rightContent:l,style:d,...c}=e;return(0,n.jsxs)("div",{...c,style:o?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,n.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof i?(0,n.jsx)(r.lQT,{className:t||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:i}):i,l&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!t&&(0,n.jsx)(a.m,{className:s?"pb-4":void 0,items:t,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,i,t){"use strict";t.d(i,{Tg:function(){return o}});var n=t(24246),r=t(16134),a=t(31793);let o=e=>(0,r.C)(a.uu).filter(i=>e.includes(i)).length>0;i.ZP=e=>{let{scopes:i,children:t}=e;return o(i)?(0,n.jsx)(n.Fragment,{children:t}):null}},97181:function(e,i,t){"use strict";t.d(i,{d:function(){return d}});var n=t(24246),r=t(91942),a=t(34090),o=t(27378),s=t(46238),l=t(40324);let d=e=>{let{name:i,label:t,labelProps:d,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[f,h,{setValue:v}]=(0,a.U$)(i),g=!!(h.touched&&h.error),[j,y]=(0,o.useState)("");f.value||"tags"!==x.mode&&"multiple"!==x.mode||(f.value=[]),"tags"===x.mode&&"string"==typeof f.value&&(f.value=[f.value]);let b="tags"===x.mode?(e,i)=>e?e.value!==j||f.value.includes(j)?x.optionRender?x.optionRender(e,i):e.label:'Create "'.concat(j,'"'):void 0:x.optionRender||void 0,k=e=>{y(e),x.onSearch&&x.onSearch(e)},C=(e,i)=>{v(e),x.onChange&&x.onChange(e,i)};return"inline"===p?(0,n.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,n.jsxs)(r.rjZ,{templateColumns:t?"1fr 3fr":"1fr",children:[t?(0,n.jsx)(l.__,{htmlFor:x.id||i,...d,children:t}):null,(0,n.jsxs)(r.jqI,{align:"center",children:[(0,n.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,n.jsx)(r.WPr,{...f,id:x.id||i,"data-testid":"controlled-select-".concat(f.name),...x,optionRender:b,onSearch:"tags"===x.mode?k:void 0,onChange:C,value:f.value||void 0,status:g?"error":void 0}),m&&(0,n.jsx)(r.Q6r,{children:m}),(0,n.jsx)(l.Bc,{isInvalid:g,message:h.error,fieldName:f.name})]}),(0,n.jsx)(s.b,{label:c})]})]})}):(0,n.jsx)(r.NIc,{isInvalid:g,isRequired:u,children:(0,n.jsxs)(r.gCW,{alignItems:"start",children:[(0,n.jsxs)(r.jqI,{align:"center",children:[t?(0,n.jsx)(l.__,{htmlFor:x.id||i,fontSize:"xs",my:0,mr:1,...d,children:t}):null,(0,n.jsx)(s.b,{label:c})]}),(0,n.jsx)(r.WPr,{...f,id:x.id||i,"data-testid":"controlled-select-".concat(f.name),...x,optionRender:b,onSearch:"tags"===x.mode?k:void 0,onChange:C,value:f.value||void 0,status:g?"error":void 0}),m&&(0,n.jsx)(r.Q6r,{style:{marginTop:0},children:m}),(0,n.jsx)(l.Bc,{isInvalid:g,message:h.error,fieldName:f.name})]})})}},812:function(e,i,t){"use strict";t.d(i,{D4:function(){return a.D4},MM:function(){return p},Ot:function(){return d},c6:function(){return r},cj:function(){return x},e$:function(){return s},fn:function(){return l},iC:function(){return m},nU:function(){return u},tB:function(){return c}});var n,r,a=t(19043);let o="An unexpected error occurred. Please try again.",s=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if((0,a.Bw)(e)){if((0,a.hE)(e.data))return e.data.detail;if((0,a.cz)(e.data)){var t;let i=null===(t=e.data.detail)||void 0===t?void 0:t[0];return"".concat(null==i?void 0:i.msg,": ").concat(null==i?void 0:i.loc)}if(409===e.status&&(0,a.Dy)(e.data)||404===e.status&&(0,a.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return i};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:o};if((0,a.oK)(e))return{status:e.originalStatus,message:e.data};if((0,a.Bw)(e)){let{status:t}=e;return{status:t,message:s(e,i.message)}}return i},p=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=r||(r={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let m={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},x=e=>{let i=e.split(".")[0];return"gacp"===i?"gacp":"gvl"===i?"gvl":"compass"}},8133:function(e,i,t){"use strict";var n=t(24246),r=t(91942);i.Z=e=>{let{title:i,children:t,isOpen:a,onClose:o,...s}=e;return(0,n.jsxs)(r.u_l,{isOpen:a,onClose:o,isCentered:!0,scrollBehavior:"inside",size:"xl",id:"add-modal",...s,children:[(0,n.jsx)(r.ZAr,{}),(0,n.jsxs)(r.hzk,{textAlign:"left",p:0,"data-testid":"add-modal-content",children:[(0,n.jsx)(r.xBx,{p:0,children:(0,n.jsx)(r.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(r.X6q,{as:"h3",size:"sm",children:i})})}),(0,n.jsx)(r.fef,{pb:4,overflow:"auto",children:t})]})]})}},70788:function(e,i,t){"use strict";t.d(i,{m:function(){return d}});var n=t(24246),r=t(91942),a=t(79894),o=t.n(a),s=t(27378);let{Text:l}=r.AntTypography,d=e=>{let{items:i,...t}=e,a=(0,s.useMemo)(()=>null==i?void 0:i.map((e,t)=>{let a=t===i.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,n.jsx)(l,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,children:s.title})),d)?s.title=(0,n.jsx)(r.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,n.jsx)(o(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[i]);return(0,n.jsx)(r.zrq,{items:a,...t})}},5417:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return I}});var n=t(24246),r=t(19904),a=t(91942),o=t(25980),s=t(77213),l=t(58754),d=t(8133),c=t(34090),u=t(27378),p=t(55484),m=t(40324),x=t(812),f=t(46628),h=t(76174),v=t(97181);let g={identifier:"",name:"",client_id:"",client_secret:""},j=e=>({...e}),y=p.Ry().shape({provider:p.Z_().required().label("Provider"),name:p.Z_().required().label("Name"),client_id:p.Z_().required().label("Client ID"),client_secret:p.Z_().required().label("Client Secret")});var b=e=>{let{openIDProvider:i,onSuccess:t,onClose:r}=e,[o]=(0,h.Qc)(),[s]=(0,h.oP)(),l=(0,u.useMemo)(()=>i?j(i):g,[i]),d=(0,a.pmc)(),p=async(e,i)=>{(e=>{if((0,x.D4)(e)){let i=(0,x.e$)(e.error,"An unexpected error occurred while editing the SSO provider. Please try again.");d((0,f.Vo)(i))}else d((0,f.t5)("SSO provider configuration saved.")),r(),i.resetForm({}),t&&t(e.data)})(l.id?await s(e):await o(e))},b=[{label:"Azure",value:"azure"},{label:"Google",value:"google"},{label:"Okta",value:"okta"},{label:"Custom",value:"custom"}],k=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0})]}),C=()=>(0,n.jsx)(m.j0,{id:"domain",name:"domain",label:"Domain",tooltip:"Domain for your Okta provider",variant:"stacked",isRequired:!0}),_=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.j0,{id:"authorization_url",name:"authorization_url",label:"Authorization URL",tooltip:"Authorization URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"token_url",name:"token_url",label:"Token URL",tooltip:"Token URL for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"userinfo_url",name:"user_info_url",label:"User Info URL",tooltip:"User Info URL for your provider",variant:"stacked",isRequired:!0})]});return(0,n.jsx)(c.J9,{initialValues:l,enableReinitialize:!0,onSubmit:p,validationSchema:y,children:e=>{let{dirty:i,isValid:t,values:o}=e;return(0,n.jsx)(c.l0,{"data-testid":"openIDProvider-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(v.d,{name:"provider",label:"Provider",options:b,layout:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"identifier",name:"identifier",label:"Identifier",tooltip:"Unique identifier for your provider",variant:"stacked",isRequired:!0,disabled:!!l.id}),(0,n.jsx)(m.j0,{id:"name",name:"name",label:"Name",tooltip:"Display name for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"client_id",name:"client_id",label:"Client ID",type:"password",tooltip:"Client ID for your provider",variant:"stacked",isRequired:!0}),(0,n.jsx)(m.j0,{id:"client_secret",name:"client_secret",label:"Client secret",type:"password",tooltip:"Client secret for your provider",variant:"stacked",isRequired:!0}),"azure"===o.provider&&k(),"okta"===o.provider&&C(),"custom"===o.provider&&_(),(0,n.jsxs)(a.xuv,{textAlign:"right",children:[(0,n.jsx)(a.wpx,{htmlType:"button","data-testid":"cancel-btn",className:"mr-3",onClick:r,children:"Cancel"}),(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!i||!t,"data-testid":"save-btn",children:"Save"})]})]})})}})},k=e=>{let{isOpen:i,onClose:t}=e;return(0,n.jsx)(d.Z,{isOpen:i,onClose:t,title:"Add SSO Provider",children:(0,n.jsx)(b,{onClose:t})})},C=e=>{let{isOpen:i,onClose:t,openIDProvider:r}=e;return(0,n.jsx)(d.Z,{isOpen:i,onClose:t,title:"Edit SSO Provider",children:(0,n.jsx)(b,{openIDProvider:r,onClose:t})})},_=e=>{let{openIDProvider:i}=e,{onOpen:t,isOpen:r,onClose:o}=(0,a.qY0)(),{onOpen:s,isOpen:l,onClose:d}=(0,a.qY0)(),c=(0,a.pmc)(),[u]=(0,h.rB)(),p=async()=>{let e=await u(i.identifier);if((0,x.D4)(e)){c((0,f.Vo)((0,x.e$)(e.error))),d();return}c((0,f.t5)("SSO provider deleted successfully")),d()};return(0,n.jsxs)(a.xuv,{alignItems:"center",borderRadius:"lg",borderWidth:"1px",display:"flex",height:"74px",marginBottom:"24px",padding:2,children:[(0,n.jsxs)(a.xuv,{display:"flex",alignItems:"center",children:[(0,n.jsx)(a.Eep,{src:"/images/oauth-login/".concat(i.provider,".svg"),alt:"".concat(i.provider," icon"),width:"40px",height:"40px"}),(0,n.jsxs)(a.xuv,{display:"flex",flexDirection:"column",children:[(0,n.jsx)(a.xvT,{fontSize:"medium",fontWeight:"bold",marginLeft:"16px",children:i.name}),(0,n.jsx)(a.xvT,{fontSize:"medium",marginLeft:"16px",children:i.identifier})]})]}),(0,n.jsxs)(a.xuv,{flexGrow:1,display:"flex",justifyContent:"flex-end",children:[(0,n.jsx)(a.wpx,{className:"mr-3",onClick:s,"data-testid":"remove-sso-provider-btn",children:"Remove"}),(0,n.jsx)(a.wpx,{className:"mr-3",onClick:t,"data-testid":"edit-sso-provider-btn",children:"Edit"})]}),(0,n.jsx)(C,{isOpen:r,onClose:o,openIDProvider:i}),(0,n.jsx)(a.cVQ,{isOpen:l,onClose:d,onConfirm:p,title:"Remove SSO provider",message:(0,n.jsx)(a.xvT,{children:"You are about to permanently remove this SSO provider. Are you sure you would like to continue?"})})]})},R=()=>{let{onOpen:e,isOpen:i,onClose:t}=(0,a.qY0)(),{data:r}=(0,h.qv)();return(0,n.jsxs)(a.xuv,{maxWidth:"600px",marginTop:"40px",children:[(0,n.jsxs)(a.X6q,{marginBottom:4,fontSize:"lg",display:"flex",justifyContent:"space-between",children:["SSO Providers",r&&r.length<5&&(0,n.jsx)(a.wpx,{onClick:e,"data-testid":"add-sso-provider-btn",children:"Add SSO Provider"})]}),(0,n.jsx)(a.xvT,{marginBottom:"30px",fontSize:"sm",children:"Use this area to add and manage SSO providers for you organization. Select “Add SSO provider” to add a new provider."}),null==r?void 0:r.map(e=>(0,n.jsx)(_,{openIDProvider:e},e.identifier)),(0,n.jsx)(k,{isOpen:i,onClose:t})]})},S=t(83265);let w={description:"",fides_key:S.Av,name:""},z=e=>({...e}),q=e=>({description:e.description,fides_key:e.fides_key,name:e.name}),O=p.Ry().shape({description:p.Z_().required().label("Description"),fides_key:p.Z_().required().label("Organization Fides Key"),name:p.Z_().required().label("Name")}),A=e=>{let{organization:i,onSuccess:t}=e,[r,o]=(0,S.$f)(),s=(0,u.useMemo)(()=>i?z(i):w,[i]),l=(0,a.pmc)(),d=async(e,i)=>{let n=q(e);(r=>{if((0,x.D4)(r)){let e=(0,x.e$)(r.error,"An unexpected error occurred while editing the organization. Please try again.");l((0,f.Vo)(e))}else l((0,f.t5)("Organization configuration saved.")),i.resetForm({values:e}),t&&t(n)})(await r(n))},p=!i||o.isLoading;return(0,n.jsx)(c.J9,{initialValues:s,enableReinitialize:!0,onSubmit:d,validationSchema:O,children:e=>{let{dirty:i,isValid:t}=e;return(0,n.jsx)(c.l0,{"data-testid":"organization-form",children:(0,n.jsxs)(a.Kqy,{spacing:4,children:[(0,n.jsx)(m.j0,{id:"fides_key",name:"fides_key",label:"Fides Key",disabled:!0,tooltip:"A unique key that identifies your organization. Not editable via UI.",variant:"stacked"}),(0,n.jsx)(m.j0,{id:"name",name:"name",label:"Name",disabled:p,tooltip:"User-friendly name for your organization, used in messaging to end-users and other public locations.",variant:"stacked"}),(0,n.jsx)(m.j0,{id:"description",name:"description",label:"Description",disabled:p,tooltip:"Short description of your organization, your services, etc.",variant:"stacked"}),(0,n.jsx)(a.xuv,{textAlign:"right",children:(0,n.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:p||!i||!t,loading:p,"data-testid":"save-btn",children:"Save"})})]})})}})};var N=t(16643),I=()=>{let{data:e}=(0,S.GQ)(S.Av),{plus:i,flags:{ssoAuthentication:t}}=(0,o.hz)();return(0,n.jsx)(s.Z,{title:"Organization",children:(0,n.jsxs)(a.xuv,{"data-testid":"organization-management",children:[(0,n.jsx)(l.Z,{heading:"Organization Management"}),(0,n.jsxs)(a.xuv,{maxWidth:"600px",children:[(0,n.jsx)(a.xvT,{pb:6,fontSize:"sm",children:"Please use this section to manage your organization‘s details, including key information that will be recorded in the RoPA (Record of Processing Activities)."}),(0,n.jsx)(a.xuv,{background:"gray.50",padding:2,children:(0,n.jsx)(A,{organization:e})}),t&&i&&(0,n.jsx)(r.ZP,{scopes:[N.Sh.OPENID_PROVIDER_CREATE],children:(0,n.jsx)(R,{})})]})]})})}},19043:function(e,i,t){"use strict";t.d(i,{Bw:function(){return o},D4:function(){return r},Dy:function(){return l},XD:function(){return d},cz:function(){return c},hE:function(){return s},oK:function(){return a}});var n=t(76649);let r=e=>"error"in e,a=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,o=e=>(0,n.Ln)({status:"number",data:{}},e),s=e=>(0,n.Ln)({detail:"string"},e),l=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,i,t){"use strict";t.d(i,{Ln:function(){return n}});let n=(e,i)=>a(e,i),r=Symbol("SOME"),a=(e,i)=>"string"==typeof e?e===typeof i:Array.isArray(e)?r in e?e.some(e=>a(e,i)):!!Array.isArray(i)&&(0===e.length||i.every(i=>e.some(e=>a(e,i)))):"object"==typeof i&&null!==i&&Object.entries(e).every(([e,t])=>a(t,i[e]));class o{static narrow(e){return new o(i=>n(e,i))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let i=this.NF,t=e instanceof o?e.NF:e instanceof Function?e:i=>n(e,i);return new o(e=>i(e)&&t(e))}}new o(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=85082)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1617],{54543:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems/configure/[id]/test-datasets",function(){return n(94010)}])},18225:function(e,t,n){"use strict";var s=n(24246),i=n(91942);t.Z=e=>{let{...t}=e;return(0,s.jsx)(i.kCb,{boxSize:"full",align:"center",justify:"center",children:(0,s.jsx)(i.$jN,{color:"primary",...t})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return r.D4},MM:function(){return f},Ot:function(){return c},c6:function(){return i},cj:function(){return h},e$:function(){return l},fn:function(){return o},iC:function(){return y},nU:function(){return u},tB:function(){return d}});var s,i,r=n(19043);let a="An unexpected error occurred. Please try again.",l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:n}=e;return{status:n,message:l(e,t.message)}}return t},f=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(s=i||(i={})).GVL="gvl",s.AC="gacp",s.COMPASS="compass";let y={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},h=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},94010:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var s=n(24246),i=n(91942),r=n(86677),a=n(27378),l=n(16134),o=n(18225),c=n(77213),d=n(77830),u=n(58754),f=n(1315),y=n(66527),h=n(88340),p=n(812),m=n(46628),v=n(41207),g=n(41966),x=n(94725),j=n(88124);let b=e=>Array.isArray(e)?e.map(e=>b(e)).filter(e=>null!==e):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[t,n]=e;return[t,b(n)]}).filter(e=>{let[,t]=e;return null!==t})):e,_=e=>{if(Array.isArray(e)){let t=e[0];if(!t)return"";let n=t.msg||"",s=t.loc?" (".concat(t.loc,")"):"";return"".concat(n).concat(s)}return e};var k=e=>{let{connectionKey:t}=e,n=(0,i.pmc)(),r=(0,l.T)(),[o]=(0,g.TG)(),[c,d]=(0,a.useState)(""),u=(0,l.C)(j.fD),f=(0,l.C)(j.lR),{data:k,isLoading:w,refetch:T}=(0,x.Eg)(t,{skip:!t}),{data:S,refetch:C}=(0,x.tW)({connectionKey:t,datasetKey:(null==u?void 0:u.fides_key)||"",policyKey:f},{skip:!t||!(null==u?void 0:u.fides_key)||!f});(0,a.useEffect)(()=>{S&&r((0,j.x0)(S.reachable))},[S,r]);let E=(0,a.useMemo)(()=>((null==k?void 0:k.items)||[]).map(e=>({value:e.fides_key,label:e.fides_key})),[null==k?void 0:k.items]);(0,a.useEffect)(()=>{if((null==k?void 0:k.items.length)&&(!u||!k.items.find(e=>e.fides_key===u.fides_key))){let e=k.items[0];r((0,j.w7)(e))}},[k,u,r]),(0,a.useEffect)(()=>{(null==u?void 0:u.ctl_dataset)&&d(y.ZP.dump(b(null==u?void 0:u.ctl_dataset)))},[u]),(0,a.useEffect)(()=>{f&&(null==u?void 0:u.fides_key)&&t&&C()},[f,null==u?void 0:u.fides_key,t,C]),(0,a.useEffect)(()=>{S&&r((0,j.x0)(S.reachable))},[S,r]);let N=async e=>{let t=null==k?void 0:k.items.find(t=>t.fides_key===e);t&&r((0,j.w7)(t))},R=async()=>{let e;if(!u)return;try{e=y.ZP.load(c)}catch(e){n((0,m.Vo)("YAML Parsing Error: ".concat(e instanceof y._L?"".concat(e.reason," ").concat(e.mark?"at line ".concat(e.mark.line):""):"Invalid YAML format")));return}let t=await o(e);if((0,p.D4)(t)){n((0,m.Vo)((0,p.e$)(t.error)));return}r((0,j.w7)({fides_key:u.fides_key,ctl_dataset:t.data})),n((0,m.t5)("Successfully modified dataset")),await T(),await C()},O=async()=>{try{let{data:e}=await T(),t=null==e?void 0:e.items.find(e=>e.fides_key===(null==u?void 0:u.fides_key));(null==t?void 0:t.ctl_dataset)&&d(y.ZP.dump(b(t.ctl_dataset))),n((0,m.t5)("Successfully refreshed datasets"))}catch(e){n((0,m.Vo)((0,p.e$)(e)))}};return(0,s.jsxs)(i.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",maxHeight:"100vh",children:[(0,s.jsxs)(i.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(i.Ugi,{children:[(0,s.jsx)(i.xvT,{children:"Edit dataset: "}),(0,s.jsx)(i.WPr,{id:"format","data-testid":"export-format-select",value:(null==u?void 0:u.fides_key)||"",options:E,onChange:N,className:"w-64"}),(0,s.jsx)(h.Z,{copyText:c})]}),(0,s.jsxs)(i.Ugi,{spacing:2,children:[(0,s.jsx)(i.esZ,{title:"Refresh to load the latest data from the database. This will overwrite any unsaved local changes.",placement:"top",children:(0,s.jsx)(i.wpx,{htmlType:"submit",size:"small","data-testid":"refresh-btn",onClick:O,loading:w,children:"Refresh"})}),(0,s.jsx)(i.esZ,{title:"Save your changes to update the dataset in the database.",placement:"top",children:(0,s.jsx)(i.wpx,{htmlType:"submit",size:"small",onClick:R,children:"Save"})})]})]}),(0,s.jsx)(i.Kqy,{border:"1px solid",borderColor:"gray.200",borderRadius:"md",justifyContent:"space-between",py:4,pr:4,"data-testid":"empty-state",flex:"1 1 auto",minHeight:"200px",children:(0,s.jsx)(v.M,{defaultLanguage:"yaml",value:c,height:"100%",onChange:e=>d(e||""),onMount:()=>{},options:{fontFamily:"Menlo",fontSize:13,minimap:{enabled:!1},readOnly:!1,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,scrollBeyondLastLine:!1},theme:"light"})}),S&&(0,s.jsx)(i.Kqy,{backgroundColor:(null==S?void 0:S.reachable)?"green.50":"red.50",border:"1px solid",borderColor:(null==S?void 0:S.reachable)?"green.500":"red.500",borderRadius:"md",p:2,flexShrink:0,mt:2,children:(0,s.jsx)(i.Ugi,{alignItems:"center",children:(0,s.jsxs)(i.Ugi,{flex:"1",children:[(null==S?void 0:S.reachable)?(0,s.jsx)(i.StI,{}):(0,s.jsx)(i.f9v,{}),(0,s.jsx)(i.xvT,{fontSize:"sm",whiteSpace:"pre-wrap",children:(null==S?void 0:S.reachable)?"Dataset is reachable":"Dataset is not reachable. ".concat(_(null==S?void 0:S.details))})]})})})]})},w=n(54458),T=n(16125),S=n(99716);let C=e=>{let t=new Date(e);return(0,w.WU)(t,"yyyy-MM-dd HH:mm:ss.SSS")},E=e=>{switch(e){case"ERROR":return"red.500";case"WARNING":return"orange.500";case"INFO":return"blue.500";default:return"gray.500"}},N=(0,a.memo)(e=>{let{log:t}=e;return(0,s.jsxs)(i.xuv,{as:"pre",margin:0,fontSize:"xs",fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",children:[(0,s.jsx)(i.xvT,{as:"span",color:"green.500",children:C(t.timestamp)}),(0,s.jsx)(i.xvT,{as:"span",children:" | "}),(0,s.jsx)(i.xvT,{as:"span",color:E(t.level),children:t.level.padEnd(8)}),(0,s.jsx)(i.xvT,{as:"span",children:" | "}),(0,s.jsx)(i.xvT,{as:"span",color:"cyan.500",children:t.module_info}),(0,s.jsx)(i.xvT,{as:"span",children:" - "}),(0,s.jsx)(i.xvT,{as:"span",color:"ERROR"===t.level||"WARNING"===t.level?E(t.level):"gray.800",children:t.message})]})});N.displayName="LogLine";var R=(0,a.memo)(()=>{let e=(0,l.T)(),t=(0,a.useRef)(null),n=(0,T.v9)(j.HN),r=(0,T.v9)(j.pz),{data:o}=(0,S.fV)({privacy_request_id:n},{skip:!n,pollingInterval:1e3});(0,a.useEffect)(()=>{o&&e((0,j.Hy)(o))},[o,e]);let c=(0,a.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[]);(0,a.useEffect)(()=>{c()},[r,c]);let d=(0,a.useMemo)(()=>(null==r?void 0:r.map(e=>"".concat(C(e.timestamp)," | ").concat(e.level," | ").concat(e.module_info," - ").concat(e.message)).join("\n"))||"",[r]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Ugi,{children:[(0,s.jsx)(i.xvT,{children:"Test logs"}),(0,s.jsx)(h.Z,{copyText:d})]})}),(0,s.jsx)(i.xuv,{ref:t,height:"200px",overflowY:"auto",borderWidth:1,borderColor:"gray.200",borderRadius:"md",p:2,children:null==r?void 0:r.map(e=>(0,s.jsx)(N,{log:e},"".concat(e.timestamp,"-").concat(e.module_info,"-").concat(e.message)))})]})}),O=n(46238);let{useGetPoliciesQuery:A}=n(78780).u.injectEndpoints({endpoints:e=>({getPolicies:e.query({query:()=>({url:"/dsr/policy"}),providesTags:()=>["Policies"]})})});var D=n(16643),q=n(31883),I=e=>{let{connectionKey:t}=e,n=(0,i.pmc)(),r=(0,l.T)(),[o]=(0,x.s7)(),c=(0,T.v9)(j.fD),d=(0,T.v9)(j.YS),u=(0,T.v9)(j.Af),f=(0,T.v9)(j.zn),y=(0,T.v9)(j.lR),v=(0,T.v9)(j.M_),g=(0,T.v9)(j.HN),[b,_]=(0,a.useState)("{}");(0,a.useEffect)(()=>{c&&_(JSON.stringify(f,null,2))},[c,f]);let{data:k,error:w}=(0,S.Z2)({privacy_request_id:g},{skip:!g||!(null==c?void 0:c.fides_key),pollingInterval:2e3}),{refetch:C}=(0,S.fV)({privacy_request_id:g},{skip:!g}),{refetch:E}=(0,x.I1)({connectionKey:t,datasetKey:(null==c?void 0:c.fides_key)||""},{skip:!t||!(null==c?void 0:c.fides_key),refetchOnMountOrArgChange:!0}),{data:N}=A(),R=(0,a.useMemo)(()=>((null==N?void 0:N.items)||[]).filter(e=>{var t;return null===(t=e.rules)||void 0===t?void 0:t.some(e=>"access"===e.action_type)}).map(e=>({value:e.key,label:e.name})),[null==N?void 0:N.items]);(0,a.useEffect)(()=>{let e=null==c?void 0:c.fides_key;t&&e&&E().then(t=>{t.data&&(null==c?void 0:c.fides_key)===e&&r((0,j.qD)({datasetKey:e,values:t.data}))})},[c,t,r,E]),(0,a.useEffect)(()=>{let e=null==c?void 0:c.fides_key;if(w&&"status"in w&&404===w.status){r((0,j.hT)()),n((0,m.Vo)("Test run failed"));return}if(!k||k.privacy_request_id!==g||!e)return;let t={datasetKey:e,values:JSON.stringify(k,null,2)};k.status===D.q2.COMPLETE?v&&C().then(()=>{r((0,j.EO)(t)),r((0,j.hT)()),n((0,m.t5)("Test run completed successfully"))}):k.status===D.q2.ERROR&&C().then(()=>{r((0,j.EO)(t)),r((0,j.hT)()),n((0,m.Vo)("Test run failed"))})},[k,w,g,c,v,r,n,C]);let I=(0,a.useMemo)(()=>y&&(null==N?void 0:N.items)?y:null,[y,null==N?void 0:N.items]),L=async()=>{if((null==c?void 0:c.fides_key)&&y)try{let e;try{e=JSON.parse(b)}catch(e){n((0,m.Vo)("Invalid JSON in test input"));return}r((0,j.Vh)(c.fides_key)),n((0,m.t5)("Test run started"));let s=await o({connection_key:t,dataset_key:c.fides_key,identities:e,policy_key:y});(0,q.D4)(s)?(n((0,m.Vo)((0,p.e$)(s.error))),r((0,j.hT)())):"data"in s?r((0,j.eY)(s.data.privacy_request_id)):(r((0,j.hT)()),n((0,m.Vo)("No privacy request ID in response")))}catch(e){r((0,j.hT)()),n((0,m.Vo)("Failed to start test run"))}};return(0,s.jsxs)(i.gCW,{alignItems:"stretch",flex:"1",maxWidth:"70vw",minHeight:"0",children:[(0,s.jsxs)(i.X6q,{as:"h3",size:"sm",display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,s.jsxs)(i.Ugi,{children:[(0,s.jsx)(i.xvT,{children:"Test inputs"}),(0,s.jsx)(h.Z,{copyText:b})]}),(0,s.jsxs)(i.Ugi,{children:[(0,s.jsx)(i.WPr,{id:"policy","aria-label":"Policy selector","data-testid":"policy-select",placeholder:"Select policy",value:I,options:R,onChange:e=>{r((0,j.kF)(e))},className:"w-64"}),(0,s.jsx)(i.wpx,{htmlType:"submit",size:"small",type:"primary","data-testid":"run-btn",onClick:v?()=>{r((0,j.qU)()),n((0,m.t5)("Test manually stopped by user"))}:L,disabled:!y||!d,children:v?"Stop":"Run"}),(0,s.jsx)(O.b,{label:v?"Stop the currently running test":"Run a test access request using the provided test input data and the selected access policy"})]})]}),(0,s.jsx)(i.gxH,{size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:v,height:"100%",value:b,onChange:e=>{let t=e.target.value;_(t);try{let e=JSON.parse(t);c&&r((0,j.qD)({datasetKey:c.fides_key,values:e}))}catch(e){}}}),(0,s.jsxs)(i.X6q,{as:"h3",size:"sm",children:["Test results ",(0,s.jsx)(h.Z,{copyText:u})]}),(0,s.jsx)(i.gxH,{isReadOnly:!0,size:"sm",focusBorderColor:"primary.600",color:"gray.800",isDisabled:!1,height:"100%",value:u})]})};let L=e=>e.id?Array.isArray(e.id)?e.id[0]:e.id:"";var M=()=>{var e;let t=(0,r.useRouter)(),n=(0,l.T)(),y=L(t.query),{data:h,isLoading:p}=(0,f.rn)(y,{skip:!y}),m=(null==h?void 0:null===(e=h.connection_configs)||void 0===e?void 0:e.key)||"";return((0,a.useEffect)(()=>{n((0,f.db)(h))},[h,n]),p)?(0,s.jsx)(c.Z,{title:"Systems",children:(0,s.jsx)(o.Z,{})}):(0,s.jsxs)(c.Z,{title:"System inventory",mainProps:{height:"100vh",display:"flex",flexDirection:"column"},children:[(0,s.jsx)(u.Z,{heading:"System inventory",breadcrumbItems:[{title:"System inventory",href:d.So},{title:(null==h?void 0:h.name)||"",href:"/systems/configure/".concat(y,"#integrations")},{title:"Test datasets"}]}),(0,s.jsxs)(i.gCW,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",padding:"0",children:[(0,s.jsxs)(i.Ugi,{alignItems:"stretch",flex:"1",minHeight:"0",spacing:"4",maxHeight:"60vh",children:[(0,s.jsx)(k,{connectionKey:m}),(0,s.jsx)(I,{connectionKey:m})]}),(0,s.jsx)(i.xuv,{flex:"0 0 auto",children:(0,s.jsx)(R,{})})]})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return i},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return l},oK:function(){return r}});var s=n(76649);let i=e=>"error"in e,r=e=>(0,s.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,s.Ln)({status:"number",data:{}},e),l=e=>(0,s.Ln)({detail:"string"},e),o=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,s.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,s.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=n(19043)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return s}});let s=(e,t)=>r(e,t),i=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?i in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>r(n,t[e]));class a{static narrow(e){return new a(t=>s(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=>s(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[6527,9327,2888,9774,179],function(){return e(e.s=54543)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4202],{71180:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy",function(){return n(31537)}])},79806:function(e,t,n){"use strict";n.d(t,{Gn:function(){return s},zR:function(){return a}});var i=n(24246),l=n(91942),r=n(56358);let a=e=>{let{title:t}=e;return(0,i.jsx)(l.OXI,{py:0,display:"flex",alignItems:"flex-start",children:(0,i.jsx)(l.xvT,{mr:"2",color:"gray.700",fontSize:"lg",lineHeight:1.8,children:t})})},s=e=>{let{onDelete:t,onEditYaml:n,formId:a,isSaving:s}=e;return(0,i.jsxs)(l.zeN,{justifyContent:"space-between",children:[t?(0,i.jsx)(l.wpx,{"aria-label":"delete",icon:(0,i.jsx)(r.q,{fontSize:"small"}),onClick:t,"data-testid":"delete-btn"}):null,(0,i.jsxs)("div",{className:"flex gap-2",children:[n&&(0,i.jsx)(l.wpx,{onClick:n,"data-testid":"edit-yaml-btn",children:"Edit YAML"}),(0,i.jsx)(l.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:a,loading:s,children:"Save"})]})]})};t.ZP=e=>{let{header:t,description:n,isOpen:r,onClose:a,children:s,footer:o}=e;return(0,i.jsxs)(l.dys,{placement:"right",isOpen:r,onClose:a,size:"md",children:[(0,i.jsx)(l.P1B,{}),(0,i.jsxs)(l.scA,{"data-testid":"edit-drawer-content",py:2,children:[(0,i.jsxs)(l.xuv,{display:"flex",justifyContent:"space-between",alignItems:"top",mr:2,py:2,gap:2,children:[(0,i.jsx)(l.xuv,{flex:1,minH:8,children:t}),(0,i.jsx)(l.xuv,{display:"flex",justifyContent:"flex-end",mr:2,children:(0,i.jsx)(l.wpx,{"aria-label":"Close editor",onClick:a,"data-testid":"close-drawer-btn",icon:(0,i.jsx)(l.Two,{fontSize:"smaller"})})})]}),(0,i.jsxs)(l.Ng0,{pt:1,children:[n?(0,i.jsx)(l.xvT,{fontSize:"sm",mb:4,color:"gray.600",children:n}):null,s]}),o]})]})}},18225:function(e,t,n){"use strict";var i=n(24246),l=n(91942);t.Z=e=>{let{...t}=e;return(0,i.jsx)(l.kCb,{boxSize:"full",align:"center",justify:"center",children:(0,i.jsx)(l.$jN,{color:"primary",...t})})}},56358:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var i=n(24246);let l=(0,n(91942).IUT)({displayName:"TrashCanOutlineIcon",viewBox:"0 0 11 12",path:(0,i.jsx)("path",{d:"M4.5166 1.60859L4.1084 2.21875H7.22363L6.81543 1.60859C6.7832 1.56133 6.72949 1.53125 6.67148 1.53125H4.6584C4.60039 1.53125 4.54668 1.55918 4.51445 1.60859H4.5166ZM7.6748 1.03711L8.46328 2.21875H8.75977H9.79102H9.96289C10.2486 2.21875 10.4785 2.44863 10.4785 2.73438C10.4785 3.02012 10.2486 3.25 9.96289 3.25H9.79102V9.78125C9.79102 10.7309 9.02188 11.5 8.07227 11.5H3.25977C2.31016 11.5 1.54102 10.7309 1.54102 9.78125V3.25H1.36914C1.0834 3.25 0.853516 3.02012 0.853516 2.73438C0.853516 2.44863 1.0834 2.21875 1.36914 2.21875H1.54102H2.57227H2.86875L3.65723 1.03496C3.88066 0.701953 4.25664 0.5 4.6584 0.5H6.67148C7.07324 0.5 7.44922 0.701953 7.67266 1.03496L7.6748 1.03711ZM2.57227 3.25V9.78125C2.57227 10.1615 2.87949 10.4688 3.25977 10.4688H8.07227C8.45254 10.4688 8.75977 10.1615 8.75977 9.78125V3.25H2.57227ZM4.29102 4.625V9.09375C4.29102 9.28281 4.13633 9.4375 3.94727 9.4375C3.7582 9.4375 3.60352 9.28281 3.60352 9.09375V4.625C3.60352 4.43594 3.7582 4.28125 3.94727 4.28125C4.13633 4.28125 4.29102 4.43594 4.29102 4.625ZM6.00977 4.625V9.09375C6.00977 9.28281 5.85508 9.4375 5.66602 9.4375C5.47695 9.4375 5.32227 9.28281 5.32227 9.09375V4.625C5.32227 4.43594 5.47695 4.28125 5.66602 4.28125C5.85508 4.28125 6.00977 4.43594 6.00977 4.625ZM7.72852 4.625V9.09375C7.72852 9.28281 7.57383 9.4375 7.38477 9.4375C7.1957 9.4375 7.04102 9.28281 7.04102 9.09375V4.625C7.04102 4.43594 7.1957 4.28125 7.38477 4.28125C7.57383 4.28125 7.72852 4.43594 7.72852 4.625Z",fill:"currentColor"})})},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var i=n(24246),l=n(91942),r=n(88038),a=n.n(r),s=n(86677);n(27378);var o=n(25980),d=n(90867),u=n(77830),c=()=>{let e=(0,s.useRouter)();return(0,i.jsx)(l.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(l.xuv,{children:[(0,i.jsxs)(l.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(l.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(l.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,i.jsxs)(l.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:n,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),x=(0,s.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,f=!(m.flags.privacyRequestsConfiguration&&p),{data:h}=(0,d.JE)(void 0,{skip:f}),{data:v}=(0,d.PW)(void 0,{skip:f}),y=m.flags.privacyRequestsConfiguration&&(!h||!v)&&p;return(0,i.jsxs)(l.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(l.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,i.jsx)(c,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),l=n(91942),r=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:s,rightContent:o,style:d,...u}=e;return(0,i.jsxs)("div",{...u,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",...d}:{paddingBottom:"24px",...d},children:[(0,i.jsxs)(l.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(l.lQT,{className:n||s?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!n&&(0,i.jsx)(r.m,{className:s?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),s]})}},19904:function(e,t,n){"use strict";n.d(t,{Tg:function(){return a}});var i=n(24246),l=n(16134),r=n(31793);let a=e=>(0,l.C)(r.uu).filter(t=>e.includes(t)).length>0;t.ZP=e=>{let{scopes:t,children:n}=e;return a(t)?(0,i.jsx)(i.Fragment,{children:n}):null}},94799:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var i=n(76649);let l=e=>(0,i.Ln)({id:"string"},e),r=e=>(null!=e?e:[]).filter(l)},30320:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var i=n(27378),l=n(25980),r=n(14047),a=n(32885),s=n(94799);let o=e=>{let{resourceFidesKey:t,resourceType:n}=e,{errorAlert:o}=(0,r.V)(),{plus:d}=(0,l.hz)(),u=(0,i.useMemo)(()=>null!=t?t:"",[]),c=(0,a.YU)(!0,{skip:!d}),m=(0,a.VN)(n,{skip:!d}),{data:x,isLoading:p,error:f,isError:h}=(0,a.PV)(null!=t?t:"",{skip:""!==u&&!(d&&u)}),[v]=(0,a._D)(),y=c.isLoading||m.isLoading||p,_=(0,i.useMemo)(()=>new Map((0,s.k)(c.data).map(e=>{var t;return[e.id,{...e,options:(null!==(t=e.allowed_values)&&void 0!==t?t:[]).map(e=>({value:e,label:e}))}]})),[c.data]),g=(0,i.useMemo)(()=>{var e;return null===(e=m.data)||void 0===e?void 0:e.filter(e=>e.active)},[m.data]),j=(0,i.useMemo)(()=>new Map((0,s.k)(g).map(e=>[e.id,e])),[g]),T=(0,i.useMemo)(()=>h&&(null==f?void 0:f.status)===404?new Map:new Map((0,s.k)(x).map(e=>[e.custom_field_definition_id,e])),[x,h,f]),C=(0,i.useMemo)(()=>{let e=[...j.keys()];return e.sort(),e},[j]),E=(0,i.useMemo)(()=>{let e={};return g&&T&&g.forEach(t=>{let n=T.get(t.id||"");n&&(t.allow_list_id&&"string[]"===t.field_type?e[n.custom_field_definition_id]=n.value:e[n.custom_field_definition_id]=n.value.toString())}),e},[g,T]),A=(0,i.useCallback)(async e=>{if(!d)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:l}=e;if(!l||0===Object.keys(l).length)return;let r=[],a=[];C.forEach(e=>{let t=T.get(e),n=l[e];void 0===n||""===n||Array.isArray(n)&&0===n.length?(null==t?void 0:t.id)&&a.push(t.id):r.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:n})});try{await v({resource_type:n,resource_id:i,upsert:r,delete:a})}catch(e){o("One or more custom fields have failed to save, please try again."),console.error(e)}},[d,T,o,t,C,v,n]);return{customFieldValues:E,definitionIdToCustomField:T,idToAllowListWithOptions:_,idToCustomFieldDefinition:j,isEnabled:d,isLoading:y,sortedCustomFieldDefinitionIds:C,upsertCustomFields:A}}},95346:function(e,t,n){"use strict";n.d(t,{uc:function(){return v},Hn:function(){return o},Uv:function(){return a},C7:function(){return d},mZ:function(){return h.m}});var i,l,r,a,s=n(16643);(i=r||(r={}))[i.CREATE_CUSTOM_FIELDS=0]="CREATE_CUSTOM_FIELDS",i[i.CREATE_CUSTOM_LISTS=1]="CREATE_CUSTOM_LISTS",i[i.CHOOSE_FROM_LIBRARY=2]="CHOOSE_FROM_LIBRARY",s.AL.STRING,s.AL.STRING_,(l=a||(a={})).SINGLE_SELECT="singleSelect",l.MULTIPLE_SELECT="multipleSelect",l.OPEN_TEXT="openText";let o=[{label:"Single select",value:"singleSelect"},{label:"Multiple select",value:"multipleSelect"},{label:"Open Text",value:"openText"}],d=[{label:"taxonomy:".concat(s.P6.DATA_CATEGORY),value:s.P6.DATA_CATEGORY},{label:"taxonomy:".concat(s.P6.DATA_SUBJECT),value:s.P6.DATA_SUBJECT},{label:"taxonomy:".concat(s.P6.DATA_USE),value:s.P6.DATA_USE},{label:"".concat(s.P6.SYSTEM,":information"),value:s.P6.SYSTEM},{label:"system:data use",value:s.P6.PRIVACY_DECLARATION}];var u=n(24246),c=n(91942),m=n(34090),x=n(30234),p=n(97181),f=n(40324),h=n(30320);let v=e=>{let{resourceFidesKey:t,resourceType:n}=e,{idToAllowListWithOptions:i,idToCustomFieldDefinition:l,isEnabled:r,isLoading:a,sortedCustomFieldDefinitionIds:o}=(0,h.m)({resourceFidesKey:t,resourceType:n});return r&&0!==o.length?(0,u.jsx)(x.Z,{heading:"Custom fields",children:(0,u.jsx)(c.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,u.jsx)(c.kCb,{flexDir:"column",gap:"24px",children:a?(0,u.jsx)(c.M5Y,{children:(0,u.jsx)(c.$jN,{})}):o.length>0&&(0,u.jsx)(c.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:o.map(e=>{let t=l.get(e);if(!t)return null;let n="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===s.AL.STRING)return(0,u.jsx)(m.gN,{name:n,children:e=>{let{field:n}=e;return(0,u.jsx)(f.j0,{...n,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let r=i.get(t.allow_list_id);if(!r)return null;let{options:a}=r;return(0,u.jsx)(p.d,{name:n,allowClear:!0,mode:t.field_type!==s.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};n(94799)},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return d}});var i=n(24246),l=n(91942),r=n(34090),a=n(27378),s=n(46238),o=n(40324);let d=e=>{let{name:t,label:n,labelProps:d,tooltip:u,isRequired:c,layout:m="inline",helperText:x,...p}=e,[f,h,{setValue:v}]=(0,r.U$)(t),y=!!(h.touched&&h.error),[_,g]=(0,a.useState)("");f.value||"tags"!==p.mode&&"multiple"!==p.mode||(f.value=[]),"tags"===p.mode&&"string"==typeof f.value&&(f.value=[f.value]);let j="tags"===p.mode?(e,t)=>e?e.value!==_||f.value.includes(_)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(_,'"'):void 0:p.optionRender||void 0,T=e=>{g(e),p.onSearch&&p.onSearch(e)},C=(e,t)=>{v(e),p.onChange&&p.onChange(e,t)};return"inline"===m?(0,i.jsx)(l.NIc,{isInvalid:y,isRequired:c,children:(0,i.jsxs)(l.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(o.__,{htmlFor:p.id||t,...d,children:n}):null,(0,i.jsxs)(l.jqI,{align:"center",children:[(0,i.jsxs)(l.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(l.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?T:void 0,onChange:C,value:f.value||void 0,status:y?"error":void 0}),x&&(0,i.jsx)(l.Q6r,{children:x}),(0,i.jsx)(o.Bc,{isInvalid:y,message:h.error,fieldName:f.name})]}),(0,i.jsx)(s.b,{label:u})]})]})}):(0,i.jsx)(l.NIc,{isInvalid:y,isRequired:c,children:(0,i.jsxs)(l.gCW,{alignItems:"start",children:[(0,i.jsxs)(l.jqI,{align:"center",children:[n?(0,i.jsx)(o.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...d,children:n}):null,(0,i.jsx)(s.b,{label:u})]}),(0,i.jsx)(l.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?T:void 0,onChange:C,value:f.value||void 0,status:y?"error":void 0}),x&&(0,i.jsx)(l.Q6r,{style:{marginTop:0},children:x}),(0,i.jsx)(o.Bc,{isInvalid:y,message:h.error,fieldName:f.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return d},c6:function(){return l},cj:function(){return p},e$:function(){return s},fn:function(){return o},iC:function(){return x},nU:function(){return c},tB:function(){return u}});var i,l,r=n(19043);let a="An unexpected error occurred. Please try again.",s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:n}=e;return{status:n,message:s(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=l||(l={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return r},V:function(){return i.V}});var i=n(84306),l=n(812);let r=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,l.Ot)(t)?n=t.data.detail:(0,l.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var i=n(24246),l=n(91942);let r=()=>{let e=(0,l.pmc)();return{errorAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,i.jsxs)(l.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(l.zMQ,{}),(0,i.jsxs)(l.xuv,{children:[n&&(0,i.jsx)(l.CdC,{children:n}),(0,i.jsx)(l.XaZ,{children:t})]}),(0,i.jsx)(l.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)},successAlert:(t,n,r)=>{let a={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,i.jsxs)(l.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(l.zMQ,{}),(0,i.jsxs)(l.xuv,{children:[n&&(0,i.jsx)(l.CdC,{children:n}),(0,i.jsx)(l.XaZ,{children:t})]}),(0,i.jsx)(l.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return d}});var i=n(24246),l=n(91942),r=n(79894),a=n.n(r),s=n(27378);let{Text:o}=l.AntTypography,d=e=>{let{items:t,...n}=e,r=(0,s.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let r=n===t.length-1,s={...e},d=s.onClick&&!s.href;return("string"==typeof s.title&&(s.title=(0,i.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:s.title})),d)?s.title=(0,i.jsx)(l.wpx,{type:"text",size:"small",icon:s.icon,onClick:s.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:s.title}):(s.icon&&(s.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:s.icon}),s.title]})),s.href&&s.title&&(s.title=(0,i.jsx)(a(),{href:s.href,className:"ant-breadcrumb-link",children:s.title}),delete s.href)),s}),[t]);return(0,i.jsx)(l.zrq,{items:r,...n})}},30234:function(e,t,n){"use strict";var i=n(24246),l=n(91942);t.Z=e=>{let{heading:t,HeadingButton:n,children:r}=e;return(0,i.jsx)(l.Kqy,{spacing:4,children:(0,i.jsxs)(l.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(l.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,i.jsx)(l.X6q,{as:"h3",size:"xs",children:t}),n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.LZC,{}),(0,i.jsx)(n,{})]}):null]}),(0,i.jsx)(l.Kqy,{spacing:4,px:6,py:6,children:r})]})})}},59001:function(e,t,n){"use strict";n.d(t,{Ch:function(){return a},Hy:function(){return s},Lo:function(){return l}});var i,l,r=n(16643);let a="root";(i=l||(l={})).DATA_CATEGORIES="Data categories",i.DATA_USES="Data uses",i.DATA_SUBJECTS="Data subjects";let s=e=>{switch(e){case"Data categories":return{UPDATE:r.Sh.DATA_CATEGORY_UPDATE,CREATE:r.Sh.DATA_CATEGORY_CREATE,DELETE:r.Sh.DATA_CATEGORY_DELETE,READ:r.Sh.DATA_CATEGORY_READ};case"Data uses":return{UPDATE:r.Sh.DATA_USE_UPDATE,CREATE:r.Sh.DATA_USE_CREATE,DELETE:r.Sh.DATA_USE_DELETE,READ:r.Sh.DATA_USE_READ};case"Data subjects":return{UPDATE:r.Sh.DATA_SUBJECT_UPDATE,CREATE:r.Sh.DATA_SUBJECT_CREATE,DELETE:r.Sh.DATA_SUBJECT_DELETE,READ:r.Sh.DATA_SUBJECT_READ};default:throw Error("Unknown taxonomy type: ".concat(e))}}},90673:function(e,t,n){"use strict";n.d(t,{Cd:function(){return r},Xl:function(){return a}});var i=n(16643),l=n(59001);let r=(e,t)=>{let n;if(null==t&&e.every(e=>void 0===e.parent_key))n=e;else{let i=null!=t?t:null;n=e.filter(e=>e.parent_key===i)}return n.map(t=>{var n,i;let l=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:r(e,l),is_default:null!==(n=t.is_default)&&void 0!==n&&n,active:null!==(i=t.active)&&void 0!==i&&i}})},a=e=>{switch(e){case l.Lo.DATA_CATEGORIES:return i.P6.DATA_CATEGORY;case l.Lo.DATA_SUBJECTS:return i.P6.DATA_SUBJECT;case l.Lo.DATA_USES:return i.P6.DATA_USE;default:return}}},31537:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ei}});var i,l,r=n(24246),a=n(91942),s=n(69238),o=n.n(s),d=n(63662),u=n(27378),c=n(812),m=n(77213),x=n(58754),p=n(19904),f=n(46628),h=n(95346),v=n(56358),y=n(31883),_=n(79806),g=n(59001),j=n(90673),T=n(30002),C=n(28079),E=n(39864),A=e=>{let{taxonomyType:t}=e,[n,i]=(0,E.Vj)(),[l,r]=(0,T.nC)(),[a,s]=(0,C.dk)(),[o]=(0,E.Ti)(),[d]=(0,C.Ql)(),[u]=(0,T.wG)(),[c]=(0,E.jU)(),[m]=(0,C.LG)(),[x]=(0,T.h8)(),[p]=(0,E.K9)(),[f]=(0,C.gu)(),[h]=(0,T.Kv)();return t===g.Lo.DATA_SUBJECTS?{getAllTrigger:l,taxonomyItems:r.data||[],updateTrigger:x,deleteTrigger:h,createTrigger:u}:t===g.Lo.DATA_USES?{getAllTrigger:a,taxonomyItems:s.data||[],updateTrigger:m,deleteTrigger:f,createTrigger:d}:{getAllTrigger:n,taxonomyItems:i.data||[],updateTrigger:c,deleteTrigger:p,createTrigger:o}},b=n(90104),S=n.n(b),I=n(18225),k=n(16643),N=e=>{let{customFields:t,formId:n,form:i}=e,{idToAllowListWithOptions:l,idToCustomFieldDefinition:s,isEnabled:o,isLoading:d,sortedCustomFieldDefinitionIds:u}=t;return o&&0!==u.length?(0,r.jsxs)(a.PPS,{form:i,name:n,initialValues:t.customFieldValues,layout:"vertical","data-testid":"custom-fields-form",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(a.AntTypography.Title,{level:3,children:"Custom fields"})}),d?(0,r.jsx)(I.Z,{}):(0,r.jsx)("div",{children:!S()(u)&&(0,r.jsx)("div",{children:u.map(e=>{let t=s.get(e);if(!t)return null;let{id:n,name:i,description:o,allow_list_id:d,field_type:u}=t;if(!d&&u===k.AL.STRING)return(0,r.jsx)(a.PPS.Item,{name:n,label:i,tooltip:o,children:(0,r.jsx)(a.uFc,{})},e);let c=l.get(t.allow_list_id);if(!c)return null;let{options:m}=c;return(0,r.jsx)(a.PPS.Item,{name:n,label:i,tooltip:o,children:(0,r.jsx)(a.WPr,{mode:"string"!==u?"multiple":void 0,allowClear:!0,options:m})},e)})})})]}):null},D=n(43551),R=n.n(D),L=()=>{let e=a.PPS.useFormInstance(),t=a.PPS.useWatch(["rights","values"],e);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.PPS.Item,{label:"Automated Decisions or Profiling",name:"automated_decisions_or_profiling",layout:"horizontal",valuePropName:"checked",children:(0,r.jsx)(a.E_O,{"data-testid":"edit-taxonomy-form_automated-decisions"})}),(0,r.jsx)(a.PPS.Item,{name:["rights","values"],label:"Rights",children:(0,r.jsx)(a.WPr,{mode:"multiple",options:(0,c.MM)(k.ts),"data-testid":"edit-taxonomy-form_rights"})}),t&&!S()(t)&&(0,r.jsx)(a.PPS.Item,{name:["rights","strategy"],label:"Strategy",required:!0,rules:[{required:!0,message:"Please select a strategy"}],children:(0,r.jsx)(a.WPr,{options:(0,c.MM)(k.jX),"data-testid":"edit-taxonomy-form_strategy"})})]})},P=e=>{let{initialValues:t,onSubmit:n,form:i,formId:l,taxonomyType:s,isDisabled:o}=e,d=s===g.Lo.DATA_SUBJECTS;return(0,r.jsxs)(a.PPS,{name:l,initialValues:t,onFinish:e=>{var i,l;let r={...t,...e};(!(null==r?void 0:null===(i=r.rights)||void 0===i?void 0:i.values)||S()(null==r?void 0:null===(l=r.rights)||void 0===l?void 0:l.values))&&R()(r,"rights"),n(r)},layout:"vertical",form:i,children:[(0,r.jsx)(a.PPS.Item,{label:"Name",name:"name",children:(0,r.jsx)(a.uFc,{"data-testid":"edit-taxonomy-form_name",disabled:o})}),(0,r.jsx)(a.PPS.Item,{label:"Description",name:"description",children:(0,r.jsx)(a.uFc.TextArea,{rows:4,"data-testid":"edit-taxonomy-form_description",disabled:o})}),d&&(0,r.jsx)(L,{})]})},w=e=>{let{taxonomyItem:t,taxonomyType:n,onClose:i}=e,l="edit-taxonomy-form",[s]=a.PPS.useForm(),[o]=a.PPS.useForm(),d=(0,a.pmc)(),{isOpen:u,onOpen:m,onClose:x}=(0,a.qY0)(),{updateTrigger:T}=A({taxonomyType:n}),C=(0,h.mZ)({resourceFidesKey:null==t?void 0:t.fides_key,resourceType:(0,j.Xl)(n)}),E=(0,p.Tg)([(0,g.Hy)(n).UPDATE]),b=(0,p.Tg)([(0,g.Hy)(n).DELETE]),S=async e=>{let n=await T(e);if((0,y.D4)(n)){d((0,f.Vo)((0,c.e$)(n.error)));return}if(C.isEnabled){let e=o.getFieldsValue();await C.upsertCustomFields({fides_key:null==t?void 0:t.fides_key,customFieldValues:e})}d((0,f.t5)("Taxonomy successfully updated")),i()},I=async()=>{await T({...t,active:!1}),x(),i()},k=async()=>{await T({...t,active:!0}),x(),i()};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(_.ZP,{isOpen:!!t,onClose:i,header:(0,r.jsx)(_.zR,{title:(null==t?void 0:t.name)||""}),footer:(0,r.jsxs)(a.zeN,{justifyContent:"space-between",children:[(null==t?void 0:t.active)&&b&&(0,r.jsx)(a.esZ,{title:"Delete label",children:(0,r.jsx)(a.wpx,{"aria-label":"delete",icon:(0,r.jsx)(v.q,{fontSize:"small"}),onClick:m,"data-testid":"delete-btn"})}),!(null==t?void 0:t.active)&&E&&(0,r.jsx)(a.esZ,{title:"Enable label",children:(0,r.jsx)(a.wpx,{"aria-label":"enable",onClick:k,"data-testid":"enable-btn",icon:(0,r.jsx)(a.tEF,{fontSize:"small"})})}),(0,r.jsx)("div",{className:"flex gap-2",children:E&&(0,r.jsx)(a.wpx,{htmlType:"submit",type:"primary","data-testid":"save-btn",form:l,children:"Save"})})]}),children:[(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(a.AntTypography.Title,{level:3,children:"Details"})}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"w-1/3 shrink-0 text-sm text-gray-500",children:"Fides key:"}),(0,r.jsx)(a.esZ,{title:null==t?void 0:t.fides_key,trigger:"click",children:(0,r.jsx)("span",{className:"flex-1 truncate","data-testid":"edit-drawer-fides-key",children:null==t?void 0:t.fides_key})})]})]}),!!t&&(0,r.jsx)(P,{initialValues:t,onSubmit:S,form:s,formId:l,taxonomyType:n,isDisabled:!E}),C.isEnabled&&!C.isLoading&&(0,r.jsx)(N,{form:o,formId:"custom-fields-form",customFields:C})]}),(0,r.jsx)(a.cVQ,{isOpen:u,onClose:x,onConfirm:I,title:"Delete ".concat(n),message:(0,r.jsx)(a.Kqy,{children:(0,r.jsxs)(a.xvT,{children:["You are about to permanently delete the ",n," ",(0,r.jsx)(a.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:null==t?void 0:t.name})," ","from your taxonomy. Are you sure you would like to continue?"]})})})]})};n(51901);var O=n(86298),V=n(3124),F=n.n(V);(i=l||(l={})).DEFAULT="DEFAULT",i.ACTIVE_HOVER="ACTIVE_HOVER",i.PARENT_OF_HOVER="PARENT_OF_HOVER",i.CHILD_OF_HOVER="CHILD_OF_HOVER",i.SIBLING_OF_HOVER="SIBLING_OF_HOVER",i.INACTIVE="INACTIVE";let U=(0,u.createContext)({activeNodeKey:null,setActiveNodeKey:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},getNodeHoverStatus:()=>"DEFAULT"}),H=e=>{let{children:t}=e,[n,i]=(0,u.useState)(null),l=(0,u.useCallback)(e=>{e!==n&&i(e)},[n]),a=(0,u.useCallback)(()=>{i(null)},[]),s=(0,u.useCallback)(e=>n?e===n?"ACTIVE_HOVER":n.startsWith("".concat(e,"."))||e===g.Ch?"PARENT_OF_HOVER":e.startsWith("".concat(n,"."))||n===g.Ch?"CHILD_OF_HOVER":n.split(".").slice(0,-1).join(".")===e.split(".").slice(0,-1).join(".")?"SIBLING_OF_HOVER":"INACTIVE":"DEFAULT",[n]),o=(0,u.useMemo)(()=>({activeNodeKey:n,setActiveNodeKey:i,onMouseEnter:l,onMouseLeave:a,getNodeHoverStatus:s}),[n,i,l,a,s]);return(0,r.jsx)(U.Provider,{value:o,children:t})};var M=n(62266),B=n(79658);let z=(0,M.Z)();var Z=e=>{let{nodes:t,edges:n,options:i}=e;return(0,u.useMemo)(()=>{if(0===t.length)return{nodes:t,edges:n};let e=(0,B.Z)().id(e=>e.id).parentId(e=>{var t;return null===(t=n.find(t=>t.target===e.id))||void 0===t?void 0:t.source})(t),l="LR"===i.direction?[35,320]:[320,35];return{nodes:z.nodeSize(l).separation((e,t)=>e.parent===t.parent?1:1.5)(e).descendants().map(e=>{let t;return t="LR"===i.direction?{x:e.y,y:e.x}:{x:e.x,y:e.y},{...e.data,position:t}}),edges:n}},[t,n,i])},G=e=>{let{positionAbsoluteX:t,positionAbsoluteY:n,nodeWidth:i}=e,{setCenter:l,getZoom:r}=(0,O._K)();return{centerScreenOnNode:(0,u.useCallback)(()=>l(t+i/2,n,{duration:500,zoom:r()}),[r,t,n,i,l])}},q=n(1945),W=n.n(q),K=n(8335),Y=e=>{let{type:t,inactive:n=!1}=e;return(0,r.jsx)(O.HH,{type:t,position:"source"===t?K.Ly.Right:K.Ly.Left,style:{width:8,height:8,backgroundColor:n?F().FIDESUI_NEUTRAL_400:F().FIDESUI_MINOS},className:"transition-colors duration-300 ease-in"})},J=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:i}=e,{onCancel:l,onSubmit:s,parentKey:o}=t,d=(0,u.useRef)(null),[c,m]=(0,u.useState)(""),{centerScreenOnNode:x}=G({positionAbsoluteX:n,positionAbsoluteY:i,nodeWidth:200});return(0,u.useEffect)(()=>{m("");let e=()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.focus({cursor:"start",preventScroll:!0})};(async()=>{await x(),e()})()},[o,x,n,i]),(0,r.jsxs)("div",{style:{width:200},"data-testid":"taxonomy-text-input-node",children:[(0,r.jsx)(a.uFc,{placeholder:"Type label name...",ref:d,onBlur:l,onSubmit:()=>s(c),value:c,onChange:e=>m(e.target.value),onKeyUp:e=>{"Escape"===e.key&&l()},onPressEnter:()=>s(c),className:W().input}),(0,r.jsx)(Y,{type:"target"})]})},X=e=>{let{getNodeHoverStatus:t}=(0,u.useContext)(U),{target:n}=e,i=t(n),a=(0,u.useCallback)(()=>{switch(i){case l.ACTIVE_HOVER:case l.PARENT_OF_HOVER:return F().FIDESUI_MINOS;case l.INACTIVE:return F().NEUTRAL_400;default:return F().FIDESUI_SANDSTONE}},[i]),s=(0,u.useCallback)(()=>{switch(i){case l.ACTIVE_HOVER:case l.PARENT_OF_HOVER:return 2;default:return 1}},[i]);return(0,r.jsx)(O.Jd,{...e,style:{stroke:a(),strokeWidth:s(),transition:"stroke 0.3s ease 0s"}})},Q=n(34770),$=n.n(Q),ee=e=>{let{data:t,positionAbsoluteX:n,positionAbsoluteY:i}=e,{onMouseEnter:s,onMouseLeave:o,getNodeHoverStatus:d}=(0,u.useContext)(U),{taxonomyType:c,taxonomyItem:m,onAddButtonClick:x,onTaxonomyItemClick:p,label:f,hasChildren:h,isLastCreatedItem:v,resetLastCreatedItemKey:y,userCanAddLabels:_}=t,{centerScreenOnNode:j}=G({positionAbsoluteX:n,positionAbsoluteY:i,nodeWidth:200});(0,u.useEffect)(()=>{let e=async()=>{await j(),s(null==m?void 0:m.fides_key)};v&&(e(),y())},[v,s,null==m?void 0:m.fides_key,y,j]);let T=d(null==m?void 0:m.fides_key),C=(0,u.useCallback)(()=>{switch(T){case l.ACTIVE_HOVER:return $()["button--hover"];case l.PARENT_OF_HOVER:return $()["button--parent-hover"];case l.INACTIVE:return $()["button--inactive"];case l.DEFAULT:case l.CHILD_OF_HOVER:case l.SIBLING_OF_HOVER:default:return""}},[T]),E=(null==m?void 0:m.fides_key)===g.Ch,A=c===g.Lo.DATA_SUBJECTS;return(0,r.jsxs)("div",{className:$().container,onMouseEnter:()=>s(null==m?void 0:m.fides_key),onMouseLeave:()=>o(null==m?void 0:m.fides_key),"data-testid":"taxonomy-node-".concat(null==m?void 0:m.fides_key),children:[(0,r.jsx)(a.wpx,{className:"".concat($().button," ").concat(C()),onClick:()=>null==p?void 0:p(m),disabled:!p,type:"text",children:(0,r.jsxs)(a.AntTypography.Text,{ellipsis:!0,style:{color:"inherit"},children:[(null==m?void 0:m.active)===!1?"(disabled) ":"",f]})}),!E&&(0,r.jsx)(Y,{type:"target",inactive:T===l.INACTIVE}),h&&(0,r.jsx)(Y,{type:"source",inactive:T===l.INACTIVE}),_&&(!A||E)&&(0,r.jsx)("div",{className:$()["add-button-container"],children:(0,r.jsx)(a.wpx,{type:"default",className:"".concat($()["add-button"]," ").concat(T===l.ACTIVE_HOVER?$()["add-button--visible"]:""),icon:(0,r.jsx)(a.PJP.mm_,{size:20}),onClick:()=>null==x?void 0:x(m),size:"middle","data-testid":"taxonomy-add-child-label-button","aria-label":"Add child label to ".concat(f)})})]})};let et=e=>{let{taxonomyType:t,taxonomyItems:n,draftNewItem:i,lastCreatedItemKey:l,resetLastCreatedItemKey:a,onTaxonomyItemClick:s,onAddButtonClick:o,onCancelDraftItem:d,onSubmitDraftItem:c,userCanAddLabels:m}=e,{fitView:x}=(0,O._K)();(0,u.useEffect)(()=>{setTimeout(()=>x(),150)},[x,t]);let p=[(0,u.useMemo)(()=>({id:g.Ch,position:{x:0,y:0},data:{label:t,taxonomyItem:{fides_key:g.Ch},taxonomyType:t,onTaxonomyItemClick:null,onAddButtonClick:o,hasChildren:0!==n.length,userCanAddLabels:m},type:"taxonomyTreeNode"}),[t,n.length,o,m])],f=[];if(n.forEach(e=>{let n=e.name||e.fides_key.split(".").pop()||"",i={id:e.fides_key,position:{x:0,y:0},data:{label:n,taxonomyType:t,taxonomyItem:e,onTaxonomyItemClick:s,onAddButtonClick:o,hasChildren:!1,isLastCreatedItem:l===e.fides_key,resetLastCreatedItemKey:a,userCanAddLabels:m},type:"taxonomyTreeNode"};p.push(i);let r=e.parent_key?p.find(t=>t.id===e.parent_key):null,d=r?r.id:g.Ch,u=e.fides_key,c={id:"".concat(d,"-").concat(u),source:d,target:u,type:"taxonomyTreeEdge"};f.push(c),r&&(r.data.hasChildren=!0)}),i){let e=i.parent_key||g.Ch;p.push({id:"draft-node",position:{x:0,y:0},type:"textInputNode",data:{parentKey:e,onCancel:d,onSubmit:c},hidden:!i}),f.push({id:"draft-line",source:e,target:"draft-node",animated:!0});let t=p.find(t=>t.id===e);t&&(t.data.hasChildren=!0)}let{nodes:h,edges:v}=Z({nodes:p,edges:f,options:{direction:"LR"}}),y=(0,u.useMemo)(()=>({taxonomyTreeNode:ee,textInputNode:J}),[]),_=(0,u.useMemo)(()=>({taxonomyTreeEdge:X}),[]);return(0,r.jsx)("div",{className:"size-full",style:{backgroundColor:F().FIDESUI_BG_CORINTH},"data-testid":"taxonomy-interactive-tree",children:(0,r.jsx)(H,{children:(0,r.jsxs)(O.x$,{nodes:h,edges:v,nodeTypes:y,edgeTypes:_,maxZoom:2,minZoom:.3,nodesConnectable:!1,edgesFocusable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},children:[(0,r.jsx)(O.Aq,{color:F().FIDESUI_NEUTRAL_100,variant:O.T7.Dots,size:3}),(0,r.jsx)(O.a9,{nodeStrokeWidth:3,pannable:!0}),(0,r.jsx)(O.ZX,{showInteractive:!1})]})})})};var en=e=>(0,r.jsx)(O.tV,{children:(0,r.jsx)(et,{...e})}),ei=()=>{let[e,t]=(0,u.useState)(g.Lo.DATA_CATEGORIES),{createTrigger:n,getAllTrigger:i,taxonomyItems:l=[]}=A({taxonomyType:e}),s=(0,d.useSearchParams)(),h=(null==s?void 0:s.get("showDisabledItems"))==="true";(0,u.useEffect)(()=>{i()},[i,e]);let[v,y]=(0,u.useState)(null),[_,j]=(0,u.useState)(null),[T,C]=(0,u.useState)(null);(0,u.useEffect)(()=>{j(null),C(null),y(null)},[e]);let E=(0,a.pmc)(),b=(0,u.useCallback)(async e=>{if(!_)return;let t=(null==_?void 0:_.parent_key)===g.Ch,i={..._,name:e,parent_key:t?null:_.parent_key},l=await n(i);if((0,c.D4)(l)){E((0,f.Vo)((0,c.e$)(l.error)));return}C(l.data.fides_key),E((0,f.t5)("New label successfully created")),j(null)},[n,_,E]),S=o()(l,"active"),I=(0,p.Tg)([(0,g.Hy)(e).CREATE]);return(0,r.jsxs)(m.Z,{title:"Taxonomy",children:[(0,r.jsxs)(a.jqI,{vertical:!0,className:"h-full",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(x.Z,{heading:"Taxonomy"}),(0,r.jsx)("div",{className:"hidden",children:(0,r.jsx)("div",{className:"mb-5 flex justify-between",children:(0,r.jsxs)(a.vyj.Compact,{children:[(0,r.jsx)(a.uFc,{className:"min-w-[350px]",placeholder:"Search",allowClear:!0}),(0,r.jsx)(a.wpx,{type:"default",children:"Clear"})]})})})]}),(0,r.jsxs)("div",{className:"relative grow",children:[(0,r.jsx)("div",{className:"absolute left-2 top-2 z-[1]",children:(0,r.jsx)(a.AHg,{selectedKeys:[e],onSelect:e=>{let{key:n}=e;return t(n)},items:(0,c.MM)(g.Lo).map(e=>({label:e.label,key:e.value})),"data-testid":"taxonomy-type-selector"})}),!!l.length&&(0,r.jsx)(en,{userCanAddLabels:I,taxonomyItems:h?l:S,draftNewItem:_,lastCreatedItemKey:T,resetLastCreatedItemKey:()=>C(null),onTaxonomyItemClick:e=>{y(e)},onAddButtonClick:e=>{var t;j({parent_key:null!==(t=null==e?void 0:e.fides_key)&&void 0!==t?t:null,is_default:!1,description:""})},taxonomyType:e,onCancelDraftItem:()=>j(null),onSubmitDraftItem:b})]})]}),v&&(0,r.jsx)(w,{taxonomyItem:v,taxonomyType:e,onClose:()=>y(null)})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return l},Dy:function(){return o},XD:function(){return d},cz:function(){return u},hE:function(){return s},oK:function(){return r}});var i=n(76649);let l=e=>"error"in e,r=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),s=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},31883:function(e,t,n){"use strict";n.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=n(19043)},1945:function(e){e.exports={input:"TaxonomyTextInputNode_input__P9czz"}},34770:function(e){e.exports={container:"TaxonomyTreeNode_container__T4KpF",button:"TaxonomyTreeNode_button__mcbOd","button--hover":"TaxonomyTreeNode_button--hover__oycXY","button--parent-hover":"TaxonomyTreeNode_button--parent-hover__pwAPl","button--inactive":"TaxonomyTreeNode_button--inactive__Fjdpe","add-button-container":"TaxonomyTreeNode_add-button-container__eEoRN","add-button":"TaxonomyTreeNode_add-button__oM2vI","add-button--visible":"TaxonomyTreeNode_add-button--visible__Ojqqf"}}},function(e){e.O(0,[1096,2858,2866,9278,4294,570,2888,9774,179],function(){return e(e.s=71180)}),_N_E=e.O()}]);