ethyca-fides 2.73.2b0__py2.py3-none-any.whl → 2.74.0rc1__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.

Potentially problematic release.


This version of ethyca-fides might be problematic. Click here for more details.

Files changed (336) hide show
  1. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/METADATA +2 -1
  2. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/RECORD +273 -276
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/xx_2025_10_29_1659_80d28dea3b6b_added_duplicate_group_table.py +79 -0
  5. fides/api/alembic/migrations/versions/xx_2025_11_05_0200_f1a2b3c4d5e6_create_staged_resource_error_table.py +82 -0
  6. fides/api/api/v1/endpoints/privacy_request_endpoints.py +33 -6
  7. fides/api/db/database.py +225 -0
  8. fides/api/models/detection_discovery/__init__.py +2 -0
  9. fides/api/models/detection_discovery/core.py +10 -0
  10. fides/api/models/detection_discovery/staged_resource_error.py +25 -0
  11. fides/api/models/privacy_preference.py +1 -0
  12. fides/api/models/privacy_request/duplicate_group.py +84 -0
  13. fides/api/models/privacy_request/privacy_request.py +53 -8
  14. fides/api/schemas/privacy_request.py +16 -4
  15. fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py +13 -6
  16. fides/api/service/privacy_request/duplication_detection.py +424 -0
  17. fides/api/service/privacy_request/request_runner_service.py +5 -0
  18. fides/api/service/saas_request/saas_request_override_factory.py +7 -2
  19. fides/api/util/logger_context_utils.py +3 -1
  20. fides/api/util/memory_watchdog.py +118 -0
  21. fides/common/api/v1/urn_registry.py +1 -0
  22. fides/config/__init__.py +7 -1
  23. fides/config/celery_settings.py +42 -0
  24. fides/service/privacy_request/privacy_request_service.py +66 -5
  25. fides/ui-build/static/admin/404.html +1 -1
  26. fides/ui-build/static/admin/_next/static/FZTEUgamBvOhgPWce135w/_buildManifest.js +1 -0
  27. fides/ui-build/static/admin/_next/static/chunks/{1115-26393b586775ea29.js → 1115-0da062111df309bf.js} +1 -1
  28. fides/ui-build/static/admin/_next/static/chunks/{6148-59a59d5c5925344f.js → 1533-84e250d1f26e6d7d.js} +1 -1
  29. fides/ui-build/static/admin/_next/static/chunks/1817-508b16628e8eb225.js +1 -0
  30. fides/ui-build/static/admin/_next/static/chunks/1840-5bbe6d878ed73fb4.js +1 -0
  31. fides/ui-build/static/admin/_next/static/chunks/3214-90ce0a366b0f461a.js +1 -0
  32. fides/ui-build/static/admin/_next/static/chunks/3377-eb5cd82b3ee6ab0c.js +1 -0
  33. fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
  34. fides/ui-build/static/admin/_next/static/chunks/3655-93ecd09f1cb9dbef.js +1 -0
  35. fides/ui-build/static/admin/_next/static/chunks/{4259.d1507e0db19cbed7.js → 4259.05038c9b78467244.js} +1 -1
  36. fides/ui-build/static/admin/_next/static/chunks/4277-13bcf4516326d474.js +1 -0
  37. fides/ui-build/static/admin/_next/static/chunks/454-d5c2c84f1a14e4f1.js +1 -0
  38. fides/ui-build/static/admin/_next/static/chunks/5487-8dedd1ca94fbba54.js +1 -0
  39. fides/ui-build/static/admin/_next/static/chunks/549-6e2442db533a711e.js +1 -0
  40. fides/ui-build/static/admin/_next/static/chunks/5643-55d758444a8d7162.js +1 -0
  41. fides/ui-build/static/admin/_next/static/chunks/5724-1e40975cefa405f0.js +1 -0
  42. fides/ui-build/static/admin/_next/static/chunks/6084-82e2df433fe5ba85.js +1 -0
  43. fides/ui-build/static/admin/_next/static/chunks/6344-3e21444374f8059f.js +1 -0
  44. fides/ui-build/static/admin/_next/static/chunks/6362-12e3fd23130ccf15.js +1 -0
  45. fides/ui-build/static/admin/_next/static/chunks/6372-a8d0f08dac1ebd0e.js +1 -0
  46. fides/ui-build/static/admin/_next/static/chunks/6780-3db5133c1f4c6f1e.js +1 -0
  47. fides/ui-build/static/admin/_next/static/chunks/6954-aa0c60ee1092be8e.js +1 -0
  48. fides/ui-build/static/admin/_next/static/chunks/7079-6e6efc3396ff1ebb.js +1 -0
  49. fides/ui-build/static/admin/_next/static/chunks/7218-d297a4a06f924b09.js +1 -0
  50. fides/ui-build/static/admin/_next/static/chunks/{7245-c9bc628d078c2170.js → 7245-686665c197b58e68.js} +1 -1
  51. fides/ui-build/static/admin/_next/static/chunks/7654-716cf37a020b3d11.js +1 -0
  52. fides/ui-build/static/admin/_next/static/chunks/8939-4925751c57c51f87.js +1 -0
  53. fides/ui-build/static/admin/_next/static/chunks/9014-eeae6f581158e645.js +1 -0
  54. fides/ui-build/static/admin/_next/static/chunks/{9046-d9c6498368b993d1.js → 9046-e4daf28840a69fd6.js} +1 -1
  55. fides/ui-build/static/admin/_next/static/chunks/{5596-29a7c8322530b7cf.js → 9195-550bd50d538c5f79.js} +3 -3
  56. fides/ui-build/static/admin/_next/static/chunks/9341-bfc0e59bcc56c604.js +1 -0
  57. fides/ui-build/static/admin/_next/static/chunks/9450-b7b7bb1d755ecf57.js +1 -0
  58. fides/ui-build/static/admin/_next/static/chunks/9682-da69ac5d06f281da.js +1 -0
  59. fides/ui-build/static/admin/_next/static/chunks/9911-ece086f2230e34f0.js +1 -0
  60. fides/ui-build/static/admin/_next/static/chunks/9965-56c5e4fc9cd3b3a5.js +1 -0
  61. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-ee588a308812715d.js → _app-e64fd8510033a27c.js} +63 -63
  62. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-7081e0e49f67716c.js → manual-ddd9d7d40847fc28.js} +1 -1
  63. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-1b02a4991201b7e4.js → [id]-9b1f2b1c06968166.js} +1 -1
  64. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-a5e738a234dadc7e.js → new-115a085e5d42de45.js} +1 -1
  65. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-8c164c4b8310214e.js → [id]-3de34624829cbce8.js} +1 -1
  66. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-db789002d84c8829.js → new-dc95e7ed278d1a29.js} +1 -1
  67. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-e3ad3a55624e302a.js +1 -0
  68. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-32bd7a7c990e5bf6.js → [resourceUrn]-dd82729296dee5c5.js} +1 -1
  69. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-49e5477eb1a11b92.js +1 -0
  70. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-07e7d38ce34e1e6c.js → projects-dfc1ead4a12c9ffa.js} +1 -1
  71. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-b07a0707f8c2ec0d.js → [resourceUrn]-8442eb219958ac7e.js} +1 -1
  72. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-feda358d1801c18d.js +1 -0
  73. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d16acb6fc07aad46.js +1 -0
  74. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-c51a1e98c45d231a.js +1 -0
  75. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-bcfe38eebca30f8c.js +1 -0
  76. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/{[monitorId]-73085f50abb775c0.js → [monitorId]-f66d0655897c4400.js} +1 -1
  77. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-6f1e012cd641da19.js +1 -0
  78. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-24a82e07a0008516.js → activity-581d6248fcf98d17.js} +1 -1
  79. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-b072cf25aefc98f6.js → [resourceUrn]-ddc1c1641e1e9430.js} +1 -1
  80. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-fd3e8817d8e6dee4.js → detection-2b48f7e524743b2b.js} +1 -1
  81. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-146624cf59792bf7.js → [resourceUrn]-862b67418600251e.js} +1 -1
  82. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-9695cc9c85592ec5.js → discovery-0ffec855f5df262c.js} +1 -1
  83. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-6a030ab8c2e2b0db.js +1 -0
  84. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-5f88280db168083e.js → [...subfieldNames]-6cb66f649b8ca4bf.js} +1 -1
  85. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-bfbcf19c28c794ae.js → [collectionName]-0b008dad90b00aaa.js} +1 -1
  86. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-6fbe2b584a509226.js → [datasetId]-5566edf9a9d1be2d.js} +1 -1
  87. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d4ca1f485b6e9e02.js +1 -0
  88. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-85dee7e81dc4bafb.js +1 -0
  89. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-e905e018a2cab35d.js +1 -0
  90. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-912723bc86299b1a.js +1 -0
  91. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-f1f0affc18327033.js +1 -0
  92. fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-1f4335dca5c09860.js → fides-js-docs-5235760b3e508d7d.js} +1 -1
  93. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-1b94e2d769a182b2.js +1 -0
  94. fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-a733e5d7c3ce9bb8.js → integrations-adfe6c5ac5b703d0.js} +1 -1
  95. fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-f9be7080ebbb7445.js +1 -0
  96. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/{[key]-720cde29f81db47f.js → [key]-f94e3accf9507ebf.js} +1 -1
  97. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/{new-3668866076b53016.js → new-5e83220ff1f2a250.js} +1 -1
  98. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-1621a4b87c432117.js +1 -0
  99. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-9cfb469de7b4aeab.js → ant-components-e02516d9fd314528.js} +1 -1
  100. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-1fe486f3af832c80.js +1 -0
  101. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-2c0ec8fed16c20ae.js +1 -0
  102. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-baf77d34a3b3bece.js +1 -0
  103. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ee8820fe0fa14c77.js +1 -0
  104. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{[id]-8634aae3259def37.js → [id]-8eb862182f19a6c2.js} +1 -1
  105. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{new-2d9dcca17965dc57.js → new-37c29ef618e9fe3c.js} +1 -1
  106. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-1db425150dcb1b6b.js +1 -0
  107. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-f108bf5015144d2f.js +1 -0
  108. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-59c89489fa32a4cb.js → [id]-0e7c7228d01290ea.js} +1 -1
  109. fides/ui-build/static/admin/_next/static/chunks/pages/{systems-cfaa37a0df83674b.js → systems-adc13b542e10a37d.js} +1 -1
  110. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-23dd250da26511c5.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/webpack-6f97ebe373e7ef6b.js +1 -0
  112. fides/ui-build/static/admin/_next/static/css/65ae906f224cd8ae.css +1 -0
  113. fides/ui-build/static/admin/_next/static/css/d5701118537cbdd2.css +1 -0
  114. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  115. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  116. fides/ui-build/static/admin/add-systems.html +1 -1
  117. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  118. fides/ui-build/static/admin/consent/configure.html +1 -1
  119. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  120. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  121. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  122. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  123. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  124. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  125. fides/ui-build/static/admin/consent/properties.html +1 -1
  126. fides/ui-build/static/admin/consent/reporting.html +1 -1
  127. fides/ui-build/static/admin/consent.html +1 -1
  128. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  129. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  130. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  131. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  132. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  133. fides/ui-build/static/admin/data-catalog.html +1 -1
  134. fides/ui-build/static/admin/data-discovery/action-center/datastore/[monitorId].html +1 -1
  135. fides/ui-build/static/admin/data-discovery/action-center/datastore.html +1 -1
  136. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId]/[systemId].html +1 -1
  137. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId].html +1 -1
  138. fides/ui-build/static/admin/data-discovery/action-center/website.html +1 -1
  139. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  140. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  141. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  142. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  143. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  144. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  145. fides/ui-build/static/admin/datamap.html +1 -1
  146. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  147. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  148. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  149. fides/ui-build/static/admin/dataset/new.html +1 -1
  150. fides/ui-build/static/admin/dataset.html +1 -1
  151. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  152. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  153. fides/ui-build/static/admin/datastore-connection.html +1 -1
  154. fides/ui-build/static/admin/index.html +1 -1
  155. fides/ui-build/static/admin/integrations/[id].html +1 -1
  156. fides/ui-build/static/admin/integrations.html +1 -1
  157. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  158. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  159. fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
  160. fides/ui-build/static/admin/login/[provider].html +1 -1
  161. fides/ui-build/static/admin/login.html +1 -1
  162. fides/ui-build/static/admin/new-privacy-requests.html +1 -1
  163. fides/ui-build/static/admin/notifications/digests/[id].html +1 -1
  164. fides/ui-build/static/admin/notifications/digests/new.html +1 -1
  165. fides/ui-build/static/admin/notifications/digests.html +1 -1
  166. fides/ui-build/static/admin/notifications/providers/[key].html +1 -1
  167. fides/ui-build/static/admin/notifications/providers/new.html +1 -1
  168. fides/ui-build/static/admin/notifications/providers.html +1 -1
  169. fides/ui-build/static/admin/notifications/templates/[id].html +1 -1
  170. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -1
  171. fides/ui-build/static/admin/notifications/templates.html +1 -1
  172. fides/ui-build/static/admin/notifications.html +1 -1
  173. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  174. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  175. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  176. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  177. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  178. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  179. fides/ui-build/static/admin/poc/forms.html +1 -1
  180. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  181. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  182. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  183. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  184. fides/ui-build/static/admin/privacy-requests.html +1 -1
  185. fides/ui-build/static/admin/properties/[id].html +1 -1
  186. fides/ui-build/static/admin/properties/add-property.html +1 -1
  187. fides/ui-build/static/admin/properties.html +1 -1
  188. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  189. fides/ui-build/static/admin/sandbox/privacy-notices.html +1 -1
  190. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  191. fides/ui-build/static/admin/settings/about.html +1 -1
  192. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  193. fides/ui-build/static/admin/settings/consent.html +1 -1
  194. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  195. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  196. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  197. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  198. fides/ui-build/static/admin/settings/domains.html +1 -1
  199. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  200. fides/ui-build/static/admin/settings/locations.html +1 -1
  201. fides/ui-build/static/admin/settings/organization.html +1 -1
  202. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  203. fides/ui-build/static/admin/settings/regulations.html +1 -1
  204. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  205. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  206. fides/ui-build/static/admin/systems.html +1 -1
  207. fides/ui-build/static/admin/taxonomy.html +1 -1
  208. fides/ui-build/static/admin/user-management/new.html +1 -1
  209. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  210. fides/ui-build/static/admin/user-management.html +1 -1
  211. fides/ui-build/static/admin/_next/static/chunks/1099-31f9d973bc287df8.js +0 -1
  212. fides/ui-build/static/admin/_next/static/chunks/1316-2606e19807c08aa5.js +0 -1
  213. fides/ui-build/static/admin/_next/static/chunks/1437-8b1f6c8797c68bfd.js +0 -1
  214. fides/ui-build/static/admin/_next/static/chunks/1467-8808ec8836e033f9.js +0 -1
  215. fides/ui-build/static/admin/_next/static/chunks/155-f6302d32cba4cab6.js +0 -1
  216. fides/ui-build/static/admin/_next/static/chunks/1817-2d5cf537a2992c79.js +0 -1
  217. fides/ui-build/static/admin/_next/static/chunks/2962-342ad1b4ab402ded.js +0 -1
  218. fides/ui-build/static/admin/_next/static/chunks/3377-988ac2f3a2e8d5d4.js +0 -1
  219. fides/ui-build/static/admin/_next/static/chunks/3446-f40c352c43ac950c.js +0 -1
  220. fides/ui-build/static/admin/_next/static/chunks/346-aa3b88efb85f2e28.js +0 -1
  221. fides/ui-build/static/admin/_next/static/chunks/3700-f695f2f6b8251971.js +0 -1
  222. fides/ui-build/static/admin/_next/static/chunks/3772-9f1713f9d5f97a10.js +0 -1
  223. fides/ui-build/static/admin/_next/static/chunks/3873-d18e47b327445db5.js +0 -1
  224. fides/ui-build/static/admin/_next/static/chunks/5163-e682273cd76a7d07.js +0 -1
  225. fides/ui-build/static/admin/_next/static/chunks/5279-bd6cccabdd6ca447.js +0 -1
  226. fides/ui-build/static/admin/_next/static/chunks/549-28537a6de666944b.js +0 -1
  227. fides/ui-build/static/admin/_next/static/chunks/5619-9b50cec521203989.js +0 -1
  228. fides/ui-build/static/admin/_next/static/chunks/5643-3459282d296a3c59.js +0 -1
  229. fides/ui-build/static/admin/_next/static/chunks/6277-3759894435cb8569.js +0 -1
  230. fides/ui-build/static/admin/_next/static/chunks/6315-e2fb5ea77179a871.js +0 -1
  231. fides/ui-build/static/admin/_next/static/chunks/6344-ca66a6e10d128179.js +0 -1
  232. fides/ui-build/static/admin/_next/static/chunks/6419-11d67f7fd4e2f247.js +0 -1
  233. fides/ui-build/static/admin/_next/static/chunks/6954-84789a4e4fb04eb9.js +0 -1
  234. fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +0 -1
  235. fides/ui-build/static/admin/_next/static/chunks/7488-cf92601852e3c509.js +0 -1
  236. fides/ui-build/static/admin/_next/static/chunks/7773-9ae233109bc64ec2.js +0 -1
  237. fides/ui-build/static/admin/_next/static/chunks/8011-75af8b480fa114e6.js +0 -1
  238. fides/ui-build/static/admin/_next/static/chunks/8373-22b4d20e8cc06b3a.js +0 -1
  239. fides/ui-build/static/admin/_next/static/chunks/8765-f622a35b40a7ec63.js +0 -1
  240. fides/ui-build/static/admin/_next/static/chunks/9037-453224ba3ee65b13.js +0 -1
  241. fides/ui-build/static/admin/_next/static/chunks/9187-7438242f0d380bb0.js +0 -1
  242. fides/ui-build/static/admin/_next/static/chunks/9278-08cc704317fe535e.js +0 -1
  243. fides/ui-build/static/admin/_next/static/chunks/9682-d1a3afa1394f8304.js +0 -1
  244. fides/ui-build/static/admin/_next/static/chunks/9729-fcf6ff4e3534e4a8.js +0 -1
  245. fides/ui-build/static/admin/_next/static/chunks/9899-d6437facac926264.js +0 -1
  246. fides/ui-build/static/admin/_next/static/chunks/9965-25621dd507e0cfd6.js +0 -1
  247. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-11f1683aa15e1a62.js +0 -1
  248. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-d60761c20382b259.js +0 -1
  249. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-aed94957009eb3fd.js +0 -1
  250. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-127c114dd8f102ed.js +0 -1
  251. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-5aa7a9fa96160de8.js +0 -1
  252. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-899bf30dde8b3292.js +0 -1
  253. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-823d0dd77e66585b.js +0 -1
  254. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-3b100c44ea9e3988.js +0 -1
  255. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-3d1e48f4b95d7f6b.js +0 -1
  256. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-d3c6ecf7f29bea6e.js +0 -1
  257. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-0a4aa42be2da0255.js +0 -1
  258. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-14313e441a13192c.js +0 -1
  259. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-f139d1ce26404f30.js +0 -1
  260. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-b2d3d28b10a758e6.js +0 -1
  261. fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-df0c95e408c54c7e.js +0 -1
  262. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-a14c876b49422597.js +0 -1
  263. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-cdd3754289a28317.js +0 -1
  264. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-6e4c535b6d614596.js +0 -1
  265. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-632b3ee563d070f2.js +0 -1
  266. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-5b6807dced8d03c5.js +0 -1
  267. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-7dce52bfc1b2652c.js +0 -1
  268. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-b72d36243a0a545c.js +0 -1
  269. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-56a5434969cbe9ba.js +0 -1
  270. fides/ui-build/static/admin/_next/static/chunks/webpack-c2c11809187b9f84.js +0 -1
  271. fides/ui-build/static/admin/_next/static/css/d41a048a166d50e4.css +0 -1
  272. fides/ui-build/static/admin/_next/static/css/d78390d6134d8328.css +0 -1
  273. fides/ui-build/static/admin/_next/static/wCNFtmYQhEDMaMPeBB4BM/_buildManifest.js +0 -1
  274. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/WHEEL +0 -0
  275. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/entry_points.txt +0 -0
  276. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/licenses/LICENSE +0 -0
  277. {ethyca_fides-2.73.2b0.dist-info → ethyca_fides-2.74.0rc1.dist-info}/top_level.txt +0 -0
  278. /fides/ui-build/static/admin/_next/static/{wCNFtmYQhEDMaMPeBB4BM → FZTEUgamBvOhgPWce135w}/_ssgManifest.js +0 -0
  279. /fides/ui-build/static/admin/_next/static/chunks/{2040-7eed8491ca7276ed.js → 2040-fe1a06d82c0413f1.js} +0 -0
  280. /fides/ui-build/static/admin/_next/static/chunks/{2397-083fc511acb6105d.js → 2397-40b8db1cb2f23e2a.js} +0 -0
  281. /fides/ui-build/static/admin/_next/static/chunks/{2921-34a43f2f8f5e5e69.js → 2921-b10bbc3a9104933b.js} +0 -0
  282. /fides/ui-build/static/admin/_next/static/chunks/{3696-6f90e41a53d22920.js → 3696-6db05a35ae806825.js} +0 -0
  283. /fides/ui-build/static/admin/_next/static/chunks/{3923-f0a85dc5c3684fa0.js → 3923-44255a63d6d80ff5.js} +0 -0
  284. /fides/ui-build/static/admin/_next/static/chunks/{401-7c345d019bb9bcbd.js → 401-fe8db8b5d8f600de.js} +0 -0
  285. /fides/ui-build/static/admin/_next/static/chunks/{4496-4ff19366c597ec16.js → 4496-bed72bd5639075be.js} +0 -0
  286. /fides/ui-build/static/admin/_next/static/chunks/{4817-1f3e6ea38625d8d5.js → 4817-d29f40d4ce729f37.js} +0 -0
  287. /fides/ui-build/static/admin/_next/static/chunks/{5185-e7f8b81dd3dfbe0b.js → 5185-b2ac9fecc00b67e7.js} +0 -0
  288. /fides/ui-build/static/admin/_next/static/chunks/{5258-62d6bc19add60aa6.js → 5258-4672eae0656430f9.js} +0 -0
  289. /fides/ui-build/static/admin/_next/static/chunks/{5783-21775c232dce7af7.js → 5783-6055edba275155ca.js} +0 -0
  290. /fides/ui-build/static/admin/_next/static/chunks/{6853-de9905d28e5b19b3.js → 6853-1adbdf6418ec3d62.js} +0 -0
  291. /fides/ui-build/static/admin/_next/static/chunks/{7059-2bb7c38578549703.js → 7059-12be23a345a94c1e.js} +0 -0
  292. /fides/ui-build/static/admin/_next/static/chunks/{7476-a02d970ea4d3f7d0.js → 7476-a43c046c24de37cc.js} +0 -0
  293. /fides/ui-build/static/admin/_next/static/chunks/{7630-a11610c2b31ab2ca.js → 7630-c654c61ba98d8c74.js} +0 -0
  294. /fides/ui-build/static/admin/_next/static/chunks/{796-e36d610066135f8c.js → 796-e83ace3c6ab99ac7.js} +0 -0
  295. /fides/ui-build/static/admin/_next/static/chunks/{8212-393420e5a9751791.js → 8212-b9e8295ca883c9f8.js} +0 -0
  296. /fides/ui-build/static/admin/_next/static/chunks/{9330-f753636a31c4ea04.js → 9330-e519adec48222d45.js} +0 -0
  297. /fides/ui-build/static/admin/_next/static/chunks/{9826-a737a9956c1d0905.js → 9826-657652d55936a8c6.js} +0 -0
  298. /fides/ui-build/static/admin/_next/static/chunks/pages/{404-eb019192ce498f32.js → 404-d079b8bf35250874.js} +0 -0
  299. /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-a188f84239f4b2a8.js → multiple-b4d18c1f4d414f5f.js} +0 -0
  300. /fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-ee9df33ebd471099.js → add-systems-d451bc8932330141.js} +0 -0
  301. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-4f9cf087fcee87e6.js → add-vendors-c24663cd5dec57db.js} +0 -0
  302. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-9af75caefc74eaca.js → configure-d93418688bd258eb.js} +0 -0
  303. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-b08abefec298ccf1.js → privacy-experience-d9b7b311195df29e.js} +0 -0
  304. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-6528eb24165aceb6.js → privacy-notices-cdfc9bb19f47c709.js} +0 -0
  305. /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-5cba30eba1e97e56.js → properties-0b995b01dc4dbd1f.js} +0 -0
  306. /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-614af0a2c2ba966c.js → consent-b37ed76849330edd.js} +0 -0
  307. /fides/ui-build/static/admin/_next/static/chunks/pages/{index-1343fa525a206571.js → index-692d27dbe9392c9f.js} +0 -0
  308. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/{[id]-63b3be660fb12c0f.js → [id]-caaa8602a1d449b1.js} +0 -0
  309. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/{new-d3b577962dd33266.js → new-9b106b1d2d93985b.js} +0 -0
  310. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/{digests-aed9afd988a48acf.js → digests-6a1ded8cdde836c4.js} +0 -0
  311. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/{providers-36a0ac36062abd02.js → providers-a03cbd698a23e5b3.js} +0 -0
  312. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/{[id]-8063dceb32310c85.js → [id]-3cde574b3c8447c0.js} +0 -0
  313. /fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/{add-template-4931c70bee62232f.js → add-template-0448bb4ae8536c58.js} +0 -0
  314. /fides/ui-build/static/admin/_next/static/chunks/pages/{notifications-93af719dab3bd053.js → notifications-4ea28f6b1dd63642.js} +0 -0
  315. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-e715cc654fb6a5cd.js → AntForm-fec08bea801b4918.js} +0 -0
  316. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-72ae299bcb6adae6.js → FormikAntFormItem-d911e5fbf5a4a888.js} +0 -0
  317. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-2337f8c81a766eb0.js → FormikControlled-91b1adcac6a57b2d.js} +0 -0
  318. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-0af454f55494f6fa.js → FormikField-de309d8813b1ebfb.js} +0 -0
  319. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-d1b90ffa996fbd89.js → forms-f2943c1309062284.js} +0 -0
  320. /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-19724b9e0581b96d.js → table-migration-03eda417711ae909.js} +0 -0
  321. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-cc41ae605f2b55ae.js → storage-ea6f78fa8b2d3f6c.js} +0 -0
  322. /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-fa82cffba448ccd8.js → configure-bda7b474493e7128.js} +0 -0
  323. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-bc1c289647e52c48.js → [id]-30d298a47e85709f.js} +0 -0
  324. /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-cbfaa23d96f5ed0b.js → add-property-438084cca0d0f10d.js} +0 -0
  325. /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-a15a3fd0ed88f39c.js → properties-17fd44d98f5bd5b6.js} +0 -0
  326. /fides/ui-build/static/admin/_next/static/chunks/pages/sandbox/{privacy-notices-afe921f6e2a526fb.js → privacy-notices-8c80391025ca7339.js} +0 -0
  327. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-19de0024418a4924.js → [purpose_id]-7c19810858b708cc.js} +0 -0
  328. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-3b87002753b23ca5.js → domain-records-e334b43fa5c5b1e6.js} +0 -0
  329. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-aacd9d0ad47082d4.js → domains-9d18eb5c38d85522.js} +0 -0
  330. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-3cdd0b39901190ba.js → email-templates-cb937ed7c4b1e5a8.js} +0 -0
  331. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-61076eedbfd137b9.js → locations-835281251f0785cd.js} +0 -0
  332. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-b07b11d6002f8c8c.js → organization-7fd050c92866938c.js} +0 -0
  333. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-084a2b4431d35322.js → privacy-requests-59ea66130fca0d05.js} +0 -0
  334. /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-b7c0d3b1b754e70f.js → regulations-b0fe1051d908f366.js} +0 -0
  335. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-5d5a68e555d18693.js → [id]-aed30fb22ae7c9ec.js} +0 -0
  336. /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-e6a211d8a0401086.js → user-management-6b88ca3e02ee67c9.js} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7079],{77867:function(e,s,t){var a=t(24246),i=t(98227);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){var a=t(24246);let{Link:i}=t(98227).AntTypography;s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...t,children:s})}},77213:function(e,s,t){t.d(s,{Z:function(){return m}});var a=t(24246),i=t(98227),n=t(88038),r=t.n(n),l=t(86677);t(27378);var o=t(25980),d=t(90867),c=t(42478),u=t(77830),p=()=>{let e=(0,l.useRouter)();return(0,a.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,a.jsxs)(i.xuv,{children:[(0,a.jsxs)(i.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,a.jsx)(i.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,a.jsx)(i.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,a.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:s,title:t,padded:n=!0,mainProps:u}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),g="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,x=!(m.flags.messagingConfiguration&&g),{data:y}=(0,c.JE)(void 0,{skip:x}),{data:f}=(0,d.PW)(void 0,{skip:x}),_=m.flags.messagingConfiguration&&(!y||!f)&&g;return(0,a.jsxs)(i.kCb,{"data-testid":t,direction:"column",h:"100vh",children:[(0,a.jsxs)(r(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",t]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)(i.kCb,{as:"main",direction:"column",py:n?6:0,px:n?10:0,h:n?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[_?(0,a.jsx)(p,{}):null,s]})]})}},19904:function(e,s,t){t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!(null==s?void 0:s.includes(e.fides_key))).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},16220:function(e,s,t){t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){var a=t(24246),i=t(98227);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){t.d(s,{Z:function(){return x}});var a=t(24246),i=t(98227),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:g}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var x=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),x=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){x((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[b,{isLoading:v}]=g(),{refetch:j}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await b(m).unwrap(),x((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await j();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){x((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:v,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||v,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},26183:function(e,s,t){var a=t(24246);t(27378),s.Z=e=>{let{children:s,className:t,...i}=e;return(0,a.jsx)("div",{className:"relative flex w-full flex-wrap items-center gap-2 overflow-x-auto py-2 ".concat(t||""),...i,children:s})}},3765:function(e,s,t){var a=t(98227),i=t(812),n=t(46628),r=t(32885),l=t(1315),o=t(65735),d=t(31883);let c=(e,s)=>{let t=[],a=[];return Object.entries(e).forEach(e=>{let[i,n]=e;n?t.push({id:i,value:n,resource_id:s,custom_field_definition_id:i}):a.push(i)}),{upsert:t,delete:a,resource_type:o.P6.PRIVACY_DECLARATION,resource_id:s}};s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,l.qQ)(),[o]=(0,r._D)(),u=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),p=e=>{let{systemResult:t,customFieldsResult:a,isDelete:r}=e;if((0,d.D4)(t)){let e=(0,i.e$)(t.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(e));return}if(a&&(0,d.D4)(a)){let e=(0,i.e$)(a.error,"Data use was updated, but an error occurred while updating custom fields. Please try again.");s((0,n.Vo)(e));return}return s((0,n.t5)(r?"Data use deleted":"Data use saved")),t.data.privacy_declarations},m=async(s,a,i,n)=>{let r;let l=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),d={...e,privacy_declarations:l},u=await t(d);if(i&&n){var m,h;let e=null==u?void 0:null===(h=u.data)||void 0===h?void 0:null===(m=h.privacy_declarations)||void 0===m?void 0:m.find(e=>e.data_use===n);if(e){let s=c(i,e.id);r=await o(s)}}return p({systemResult:u,customFieldsResult:r,isDelete:a})};return{createDataUse:async t=>{if(u(t))return;let{customFieldValues:a,...i}=t;return s.closeAll(),m([...e.privacy_declarations,i],!1,a,i.data_use)},updateDataUse:async(s,t)=>{if(t.id!==s.id&&u(t))return;let{customFieldValues:a,...i}=t;return m(e.privacy_declarations.map(e=>e.id===s.id?i:e),!1,a,i.data_use)},deleteDataUse:async s=>m(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>m(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},73183:function(e,s,t){var a=t(24246),i=t(98227);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),g=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},x=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:x,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:x,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:g,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){t.d(s,{s:function(){return l}});var a=t(24246),i=t(98227),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){var a=t(24246),i=t(98227),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},42478:function(e,s,t){t.d(s,{FU:function(){return d},JE:function(){return i},Ki:function(){return u},SU:function(){return p},W:function(){return m},h9:function(){return n},jc:function(){return a},qt:function(){return o},sn:function(){return c}});let{useGetEmailInviteStatusQuery:a,useGetActiveMessagingProviderQuery:i,useCreateMessagingConfigurationMutation:n,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:c,useUpdateMessagingConfigurationSecretsByKeyMutation:u,useCreateTestConnectionMessageMutation:p,useDeleteMessagingConfigurationByKeyMutation:m}=t(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,s,t,a)=>{let i=await a({url:"messaging/default/active"});return i.error&&404===i.error.status?{data:null}:i},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},72774:function(e,s,t){t.d(s,{Z:function(){return r}});var a=t(24246),i=t(98227),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},21103:function(e,s,t){t.d(s,{Z:function(){return sJ}});var a,i,n,r,l=t(24246),o=t(98227),d=t(79894),c=t.n(d),u=t(86677),p=t.n(u),m=t(27378),h=t(16134),g=t(25980),x=t(45938),y=t(16220),f=t(77830),_=t(84720),b=t(14908),v=t(46628),j=t(26089),k=t(19904),w=t(16394),C=t(20682),S=t(41337);let T=e=>{let{connectionConfig:s,hiddenTypes:t=[]}=e,a=(0,h.C)(C.pw),{data:i}=(0,C.$I)(a),n=(0,m.useMemo)(()=>(null==i?void 0:i.items)||[],[i]),[r,l]=(0,m.useState)(),o=(0,m.useMemo)(()=>[...n].filter(e=>!t.includes(e.identifier)).sort((e,s)=>e.human_readable>s.human_readable?1:-1),[n,t]),d=(0,m.useMemo)(()=>{let e=new Map;return null==o||o.map(s=>e.set(s.human_readable,{value:s})),e},[o]),c=(0,m.useMemo)(()=>{var e;return(null===(e=n.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,n]);return(0,m.useMemo)(()=>{let e=n.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&l(e)},[s,n]),{dropDownOptions:d,selectedValue:r,setSelectedValue:l,systemType:c}};var D=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:n,onChange:r,selectedValue:d}=e,c=(0,m.useRef)(null),[u,p]=(0,m.useState)(!1),[h,g]=(0,m.useState)(""),x=()=>{p(!1)},y=null===(s=[...n].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,m.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(g(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,m.useMemo)(()=>(0,w.Ds)(f,100),[f]),b=(0,m.useMemo)(()=>[...n].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[n,h]);return(0,l.jsxs)(o.v2r,{isLazy:!0,onClose:x,onOpen:()=>{p(!0)},strategy:"fixed",matchWidth:!0,children:[(0,l.jsx)(o.j2t,{"aria-label":null!=y?y:i,as:o.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,l.jsx)(o.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,l.jsx)(o.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,l.jsxs)(o.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,l.jsx)(o.xuv,{px:"8px",mt:2,children:(0,l.jsxs)(o.BZy,{size:"sm",children:[(0,l.jsx)(o.Z8_,{pointerEvents:"none",children:(0,l.jsx)(o.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,l.jsx)(o.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,l.jsx)(o.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,l.jsx)(o.wpx,{onClick:()=>{r(void 0),g(""),x()},size:"small",children:"Clear"})}),(0,l.jsx)(o.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,l.jsx)(o.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,l.jsxs)(o.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>r(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,l.jsx)(S.ZP,{data:(0,S.PT)(t.value)}),(0,l.jsx)(o.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},A=t(17245),q=t(1315),E=t(65735),I=t(84306),R=t(14207),z=t(59301),F=(0,o.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),L=t(19812),P=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,l.jsx)(o.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},O=t(8627),Z=t(32885),W=t(65450),N=t(40324),M=t(34090),U=t(55484),V=t(97181),B=t(57072),K=t(5785),H=t(27259);let Y=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,l.jsxs)(o.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,l.jsx)(o.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,l.jsx)(o.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var G=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:n}=(0,B.MO)(),r=(0,h.C)(K.qb),{errorAlert:d}=(0,A.VY)();return n?null:(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:U.Ry({fields:U.IX().of(U.Ry().shape({pii_field:U.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:U.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:U.IX(U.Z_()).label("Data Categories")}))}),children:e=>(0,l.jsx)(M.l0,{style:{marginTop:0},noValidate:!0,children:(0,l.jsx)(o.gCW,{align:"stretch",children:(0,l.jsx)(M.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,l.jsx)(o.xuv,{w:"416px",children:"PII Field"}),(0,l.jsx)(o.xuv,{w:"416px",children:"DSR Package Label"}),(0,l.jsx)(o.xuv,{w:"416px",children:"Data Categories"}),(0,l.jsx)(o.xuv,{visibility:"hidden",children:(0,l.jsx)(o.lr0,{})})]}),(0,l.jsx)(o.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,l.jsxs)(o.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(V.d,{name:"fields.".concat(t,".data_categories"),options:r.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,l.jsx)(o.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,l.jsx)(o.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,l.jsx)(o.wpx,{className:"my-6",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},children:"Add new PII field"}),(0,l.jsx)(Y,{isSubmitting:t,onCancelClick:i})]})}})})})})},Q=e=>{let{connectionConfig:s}=e,t=(0,m.useRef)(!1),{successAlert:a}=(0,A.VY)(),{handleError:i}=(0,A.HK)(),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)([]),{isOpen:u,onOpen:p,onClose:h}=(0,o.qY0)(),{data:g,isFetching:x,isLoading:y,isSuccess:f}=(0,R.QV)(s?s.key:"",{skip:!s}),[_]=(0,R.jF)(),[b]=(0,R._d)(),v=async(e,t)=>{try{r(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{r(!1)}};(0,m.useEffect)(()=>(t.current=!0,f&&g&&c(g.fields),()=>{t.current=!1}),[g,f]);let j=(0,l.jsx)(o.wpx,{disabled:!s||n,loading:n,onClick:p,children:"Customize DSR"});return(0,l.jsxs)(l.Fragment,{children:[s?j:(0,l.jsx)(o.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:j}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{minWidth:"775px",children:[(0,l.jsx)(o.xBx,{children:"Customize DSR"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(o.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(x||y)&&(0,l.jsx)(o.M5Y,{children:(0,l.jsx)(o.$jN,{})}),t.current&&!y?(0,l.jsx)(G,{data:d,isSubmitting:n,onSaveClick:v,onCancel:h}):null]})})]})]})]})},$=t(98784),J=t.n($),X=t(71248),ee=t(46782),es=t(73183),et=t(95492),ea=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),r=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&n()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Delete integration"}),(0,l.jsx)(o.wpx,{"aria-label":"Delete integration",icon:(0,l.jsx)(et.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,onClose:r,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Delete integration"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsx)(o.Kqy,{direction:"column",spacing:"15px",children:(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,l.jsxs)(o.mzw,{children:[(0,l.jsx)(o.wpx,{onClick:r,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ei=t(99792);let en=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},er=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ei.Z.SAAS&&(t+="_api"),t},el=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:n,onTestConnectionClick:r,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:h,datasetDropdownOptions:x,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:v,isFetching:j}]=(0,R.h2)(),{plus:k}=(0,g.hz)(),{getFieldValidation:w,preprocessValues:C}=(0,ee.l)(s),S=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(C(e))},T=async e=>{Object.keys(await e.validateForm()).length>0||r(await b(m.key))},D=(null==m?void 0:m.disabled)||!1;return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===E.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?J().cloneDeep(m.secrets):{},e.dataset=h,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(t=>{var a,i;let[n,r]=t;if((null===(a=r.allOf)||void 0===a?void 0:a[0].$ref)===ee.j){let s=e.secrets[n];s&&(e.secrets[n]="".concat(s.dataset,".").concat(s.field))}if((null===(i=s.properties[n])||void 0===i?void 0:i.type)==="boolean"){let s=e.secrets[n];"boolean"==typeof s&&(e.secrets[n]=s.toString())}}),e}return J().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),en(e,s)})(),onSubmit:(e,s)=>{n(C(e),s)},validateOnBlur:!0,children:e=>{var t;let n=!e.dirty&&(null==m?void 0:m.authorized);return(0,l.jsx)(M.l0,{children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsxs)("div",{className:"flex flex-row",children:[m?(0,l.jsx)(es.Z,{connection_key:null==m?void 0:m.key,disabled:D,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,l.jsx)(ea,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,l.jsx)(N.j0,{name:"instance_key",id:"instance_key",label:"Integration identifier",isRequired:!0,disabled:!!(null==m?void 0:m.key),tooltip:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."},"instance_key"),s?Object.entries(s.properties).map(e=>{var t;let[a,i]=e;return"advanced_settings"===a?null:(0,l.jsx)(X.A,{name:"secrets.".concat(a),fieldSchema:i,isRequired:null===(t=s.required)||void 0===t?void 0:t.includes(a),secretsSchema:s,validate:w(a,i),layout:"inline"},"secrets.".concat(a))}):null,k&&(0,l.jsx)(V.d,{name:"enabled_actions",id:"enabled_actions",label:"Request types",isRequired:!0,layout:"inline",mode:"multiple",tooltip:"The request types that are supported for this integration",options:p.supported_actions.map(e=>({label:J().upperFirst(e),value:e}))},"enabled_actions"),E.Zi.DATABASE===p.type&&!y&&(0,l.jsx)(V.d,{name:"dataset",id:"dataset",tooltip:"Select datasets to associate with this integration",label:"Datasets",options:x,layout:"inline",mode:"multiple"}),(0,l.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||n?(0,l.jsx)(o.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:v||j,onClick:()=>T(e),"data-testid":"test-connection-button",children:u}):null,k&&E.Zi.DATABASE===p.type&&!J().isEmpty(h)&&(0,l.jsx)(o.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!n?(0,l.jsx)(o.wpx,{loading:i,onClick:()=>S(e.values,e),children:"Authorize integration"}):null,p.type===E.Zi.MANUAL?(0,l.jsx)(Q,{connectionConfig:m}):null,(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit","data-testid":"save-integration-btn",children:"Save"})]})]})})}})},eo=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:er(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ed=async(e,s,t,a,i)=>{var n;let r=a?a.key:er(t,s),l={access:E.uv.WRITE,connection_type:s.type===E.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},ec=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eu=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,I.V)(),{handleError:l}=(0,A.HK)(),[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(!1),{dropdownOptions:p,patchConnectionDatasetConfig:h,initialDatasets:x}=(0,L.t)({connectionConfig:i}),[y]=(0,R.NG)(),[f]=(0,Z.IB)(),[_]=(0,R.rO)(),[b]=(0,W.Zh)(),[v]=(0,W.qd)(),[j]=(0,Z.kg)(),[k,w]=(0,W._w)(),{plus:C}=(0,g.hz)(),S=(0,m.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]);return{isSubmitting:o,isAuthorizing:c,handleSubmit:async e=>{let n=!i;try{if(d(!0),a.type===E.Zi.SAAS&&n)i=(await eo(e,s,a,t,C?f:y)).connection;else{let n=await ed(e,a,t,i,C?j:v);i||a.type!==E.Zi.DATABASE||(i=n.succeeded[0]),a.type!==E.Zi.MANUAL&&await ec(e,s,t,S,b)}i&&e.dataset&&a.type===E.Zi.DATABASE&&await h(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{d(!1)}},handleAuthorization:async e=>{let n=!i;try{u(!0),n?i=(await eo(e,s,a,t,y)).connection:await ec(e,s,t,S,b);let r=await _(i.key).unwrap();u(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{u(!1)}},datasetDropdownOptions:p,initialDatasets:x,handleDelete:async()=>{try{await k(t),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:w}},ep=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[n,r]=(0,m.useState)(),d=(0,o.pmc)(),c=t.type===E.Zi.MANUAL,{data:u}=(0,C.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:g,handleSubmit:x,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:_,handleDelete:b,deleteDatastoreConnectionResult:j}=eu({secretsSchema:u,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return u||t.type===E.Zi.MANUAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,l.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,l.jsx)("div",{style:{marginTop:"12px"},children:(0,l.jsxs)(z.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,l.jsx)(F,{})]})})]}),(0,l.jsx)(el,{secretsSchema:u,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:g,onSaveClick:x,onTestConnectionClick:e=>{var s,t;r(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...v.MA,status:a,description:(0,l.jsx)(P,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{p().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:f,initialDatasets:_,isCreatingConnectionConfig:!a,onDelete:b,deleteResult:j}),a?(0,l.jsxs)(o.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[n&&n.data&&void 0!==n.fulfilledTimeStamp?(0,l.jsx)(O.s,{succeeded:"succeeded"===n.data.test_status,timestamp:n.fulfilledTimeStamp}):(0,l.jsx)(O.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,l.jsx)(o.LZC,{})]}):null]}):null};var em=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),[r,d]=(0,m.useState)(null),{successAlert:c}=(0,A.VY)(),[u,{isLoading:p}]=(0,q.qd)(),g=(0,h.C)(C.pw),{data:x}=(0,C.$I)(g),y=(0,m.useMemo)(()=>(null==x?void 0:x.items)||[],[x]),{handleError:f}=(0,A.HK)(),_=()=>{p||(r&&d(null),n())},b=async()=>{try{if(r){var e;let s={...r,instance_key:r.connection_type===E.Rj.SAAS?null===(e=r.saas_config)||void 0===e?void 0:e.fides_key:r.key},a=y.find(e=>(null==r?void 0:r.saas_config)&&e.identifier===(null==r?void 0:r.saas_config.type)||e.identifier===(null==r?void 0:r.connection_type));(await ed(s,a,t,r,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),n()}}catch(e){f(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{onClick:i,children:"Link integration"}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Unlinked Integrations"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.Kqy,{direction:"column",spacing:"15px",children:[(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,l.jsx)(o.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,l.jsxs)(o.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==r?void 0:r.key)===e.key?"gray.100":"unset",color:(null==r?void 0:r.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},className:"mb-2",children:[(0,l.jsx)(S.ZP,{data:(0,S.El)(e),className:"mr-2"}),(0,l.jsx)(o.xvT,{children:e.name})]},e.key))})]})}),(0,l.jsxs)(o.mzw,{className:"flex gap-4",children:[(0,l.jsx)(o.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:b,loading:p,disabled:!r||p,className:"w-1/2",children:"Link integration"})]})]})]})]})},eh=t(44553);let eg=[E.Rj.WEBSITE,E.Rj.TEST_WEBSITE];var ex=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:n}=T({connectionConfig:s,hiddenTypes:eg}),r=(0,h.C)(R.dR),{data:d}=(0,R.AZ)({...r,orphaned_from_system:!0}),[c,u]=(0,m.useState)([]);(0,m.useEffect)(()=>{d&&u(d.items.filter(e=>!eg.includes(e.connection_type)))},[d]);let p=(0,o.qY0)();return(0,l.jsxs)(o.xuv,{id:"con-wrapper",px:6,children:[(0,l.jsxs)(o.kCb,{py:5,children:[(0,l.jsxs)(o.Kqy,{direction:{base:"column",lg:"row"},children:[(0,l.jsx)(D,{list:a,label:"Integration type",selectedValue:i,onChange:n,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,l.jsx)(em,{connectionConfigs:c,systemFidesKey:t}):null,(0,l.jsx)(k.ZP,{scopes:[E.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,l.jsx)(o.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:p.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,l.jsx)(eh.Z,{isOpen:p.isOpen,onClose:p.onClose})]}),(null==i?void 0:i.type)&&[E.Zi.DATABASE,E.Zi.DATA_CATALOG,E.Zi.SAAS,E.Zi.MANUAL,E.Zi.EMAIL].includes(i.type)?(0,l.jsx)(ep,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:n,systemFidesKey:t}):null]})},ey=t(71922),ef=t(31883);let e_=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:n,name:r}=s,d="".concat(n,"-notice_id"),[c,,u]=(0,M.U$)(d),{setValue:p}=u;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{flexGrow:1,children:[i&&(0,l.jsx)(o.LqM,{}),(0,l.jsx)(o.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:r})]}),(0,l.jsx)(o.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eb=e=>{let{connectionKey:s,...t}=e,a=(0,o.pmc)(),{data:i,isLoading:n}=(0,Z.EQ)(s),[r,{isLoading:d}]=(0,Z.Am)(),c=(0,h.C)(ey.Zp),u=(0,h.C)(ey.G1),{data:p,isLoading:g}=(0,ey.J6)({page:c,size:u}),[x,y]=(0,m.useState)(),[f,_]=(0,m.useState)([]),b=(0,m.useMemo)(()=>null==x?void 0:x.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[x]),j=e=>{let s=e.notice_id;if(s){let e=null==p?void 0:p.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return f.filter(e=>s.includes(e.value))}}return f},k=async()=>{let e=await r({connectionKey:s,consentableItems:x});(0,ef.D4)(e)?a((0,v.Vo)("Failed to save bidirectional consent")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Your bidirectional consent settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,m.useEffect)(()=>{i&&y(i)},[i]),(0,m.useEffect)(()=>{p&&_(p.items.map(e=>({label:e.name,value:e.id})))},[p]),n||g)return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.OdW,{height:"35px"})});if(!x||!x.length||!p)return null;let w=(e,s)=>{y(x.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,l.jsxs)(o.Qdk,{border:"none",children:[(0,l.jsxs)(o.KFZ,{children:[(0,l.jsx)(o.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,l.jsx)(o.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Bidirectional consent"})}),(0,l.jsx)(o.XEm,{})]}),(0,l.jsxs)(o.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,l.jsx)(o.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,l.jsx)(M.J9,{initialValues:b||{},onSubmit:k,children:(0,l.jsxs)(M.l0,{children:[(0,l.jsx)(o.MIq,{columns:2,spacing:3,children:x.map(e=>{var s;return(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(e_,{item:e,options:f,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,l.jsx)(e_,{item:s,options:j(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,l.jsx)(o.Ugi,{justifyContent:"flex-end",mt:3,children:(0,l.jsx)(o.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ev=t(57865),ej=t(3124),ek=t.n(ej),ew=(0,o.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),eC=(0,o.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eS=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},eT=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,eD=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=eT(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((J().isNil(l)||J().isEmpty(l))&&(J().isNil(o)||J().isEmpty(o)))&&(J().isEqual(l,o)||(J().isNil(l)||J().isEmpty(l)?a.push(r):J().isNil(o)||J().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eA=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,n=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:n,removedFields:r,changedFields:o}=eD(t.custom_fields,a.custom_fields):{addedFields:n,removedFields:r,changedFields:o}=eD(t,a);let d=[];if(n.length>0&&d.push(["added ",(0,l.jsx)("b",{children:n.join(", ")})]),r.length>0&&d.push(["removed ",(0,l.jsx)("b",{children:r.join(", ")})]),o.length>0&&d.push(["changed ",(0,l.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,l.jsxs)(l.Fragment,{children:[d.map((e,s)=>(0,l.jsxs)(m.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:p,formattedDate:h}=eS(i);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:s})," ",u," on ",h," at ",p]})},eq=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eE=(e,s)=>{if(J().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eI=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eR=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},ez=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eF=(0,m.createContext)(null),eL=()=>(0,m.useContext)(eF);var eP=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,m.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,l.jsx)(eF.Provider,{value:i,children:s})},eO=t(62165),eZ=t(30320),eW=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eL(),i=m.Children.toArray(t).filter(e=>{if(m.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=J().get(null==a?void 0:a.before,s),i=J().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&J().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&J().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,l.jsx)(o.Kqy,{marginTop:"0px !important",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s})}),(0,l.jsx)(o.Kqy,{children:i})]})})},eN=t(46238),eM=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,M.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[g,x]=(0,m.useState)([]),[y,f]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||[],s=J().get(null==n?void 0:n.after,i.name)||[];f(!J().isEqual(e,s)),x(e.length>s.length?e:s)},[n,i.name]),(0,m.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[g]);let _={};return y&&(_="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(p,"px")},children:(p?c.value:g).map((e,s)=>(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===r&&y&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eU=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,M.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[g,x]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||"",s=J().get(null==n?void 0:n.after,i.name)||"";x(!J().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[n,i.name,c.value]);let y={};return g&&(y="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(p,"px")},children:c.value}),"before"===r&&g&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eZ.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),n=t===E.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,l.jsx)(eW,{heading:"Custom fields",children:r.map(e=>i(e)?(0,l.jsx)(eM,{label:e,name:"".concat(n,".").concat(e)},e):(0,l.jsx)(eU,{label:e,name:"".concat(n,".").concat(e)},e))})},eB=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:n}=eL(),[r]=(0,M.U$)(a),d={...r,value:r.value},[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{u(J().get(null==i?void 0:i.before,a.name)!==J().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let p={};return c&&(p="before"===n?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:p,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",minHeight:"46px",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,l.jsx)(eN.b,{label:t})]}),void 0!==d.value&&(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===n&&c&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eK=e=>{let{initialValues:s}=e,t=(0,eO.hz)();return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,l.jsx)(M.l0,{children:(0,l.jsxs)(o.Kqy,{children:[(0,l.jsxs)(eW,{heading:"System details",children:[t.dictionaryService?(0,l.jsx)(eU,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,l.jsx)(eU,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eU,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(eU,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eM,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eM,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,l.jsxs)(eW,{heading:"Data processing properties",children:[(0,l.jsx)(eB,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,l.jsx)(eB,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,l.jsx)(eU,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,l.jsx)(eB,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,l.jsx)(eM,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,l.jsx)(eB,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,l.jsx)(eM,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,l.jsx)(eB,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,l.jsx)(eU,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,l.jsxs)(eW,{heading:"Administrative properties",children:[(0,l.jsx)(eU,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,l.jsx)(eU,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,l.jsx)(eU,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(eU,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(eU,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,l.jsx)(eM,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,l.jsx)(eU,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,l.jsx)(eU,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,l.jsx)(eU,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,l.jsx)(eV,{customFields:s.custom_fields,resourceType:E.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)(eW,{heading:"Data use",children:[(0,l.jsx)(eU,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,l.jsx)(eW,{heading:"Features",children:(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,l.jsxs)(eW,{heading:"Special category data",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,l.jsxs)(eW,{heading:"Third parties",children:[(0,l.jsx)(eB,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,l.jsx)(eV,{customFields:s.privacy_declarations[0].custom_fields,resourceType:E.P6.PRIVACY_DECLARATION})]},t)),(0,l.jsxs)(eW,{heading:"Data flow",children:[(0,l.jsx)(eM,{name:"ingress",label:"Sources"}),(0,l.jsx)(eM,{name:"egress",label:"Destinations"})]})]})})})};let eH=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eY=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsxs)(o.xBx,{backgroundColor:ek().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,l.jsxs)(o.X6q,{size:"xs",children:[(0,l.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,l.jsx)(l.Fragment,{children:eH(s.before,s.after).map((e,s)=>(0,l.jsx)(o.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.olH,{})]})]}),(0,l.jsx)(o.fef,{paddingTop:0,paddingBottom:6,children:(0,l.jsxs)(o.kCb,{justifyContent:"space-between",children:[(0,l.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,l.jsx)(eP,{selectedHistory:s,formType:"before",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.before})})}),(0,l.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,l.jsx)(eP,{selectedHistory:s,formType:"after",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eG=e=>{let{system:s}=e,[t,a]=(0,m.useState)(1),{data:i}=(0,Z.Xc)({system_key:s.fides_key,page:t,size:10}),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(null),u=(0,h.C)(Z.o),{data:p=[]}=(0,W.K3)(),g=(null==i?void 0:i.items)||[],x=e=>{c(e=ez(e=eR(e=eq(e=eE(e=eI(e),u),p)))),r(!0)},{formattedTime:y,formattedDate:f}=eS(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.iA_,{ml:"24px",children:[(0,l.jsx)(o.hrZ,{children:(0,l.jsx)(o.Tr,{children:(0,l.jsxs)(o.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ek().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,l.jsx)(o.p3B,{children:g.map((e,s)=>{let t=eA(e);return t?(0,l.jsx)(o.Tr,{onClick:()=>x(e),style:{cursor:"pointer"},children:(0,l.jsx)(o.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,l.jsxs)(o.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,l.jsx)(o.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,l.jsx)(eC,{}),"aria-label":"Previous page"}),(0,l.jsx)(o.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,l.jsx)(ew,{}),"aria-label":"Next page"})]}),(0,l.jsx)(eY,{selectedHistory:d,isOpen:n,onClose:()=>{r(!1),c(null)}})]})},eQ=t(52368),e$=t(3765),eJ=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,l.jsx)(o.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,l.jsx)(o.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,l.jsx)(o.Ugi,{mt:4,children:(0,l.jsx)(o.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eX=t(58452);let e0=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:n,onOpen:r,onClose:d}=(0,o.qY0)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,l.jsx)(o.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,l.jsx)(o.xvT,{children:t||s.data_use})}),(0,l.jsx)(o.LZC,{}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:r,"data-testid":"delete-btn",children:(0,l.jsx)(o.pJl,{})}),(0,l.jsx)(eX.Z,{isOpen:n,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,l.jsxs)(o.xvT,{children:["You are about to delete the data use declaration"," ",(0,l.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,l.jsx)(o.izJ,{})]})},e1=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,l.jsx)(o.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,l.jsxs)(o.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s}),(0,l.jsx)(o.LZC,{}),a||null]}),(0,l.jsx)(o.Kqy,{spacing:0,children:t}),(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},e2=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:n,allDataUses:r}=e,d=e=>{let s=r.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(ev.gU);return(0,l.jsx)(e1,{heading:s,footerButton:!c&&(0,l.jsx)(o.wpx,{onClick:a,size:"small",icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,l.jsx)(e0,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:n},e.id))})};var e4=t(33162),e5=t(54748),e3=t(28325),e8=t(30234);let e6=U.Ry().shape({data_categories:U.IX(U.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:U.Z_().required().label("Data use")}),e7={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e9=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},se=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:n,includeCustomFields:r,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:p}=(0,e5.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e3.Z)(),g=(0,m.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsxs)(e8.Z,{heading:"Data use declaration",children:[(0,l.jsx)(N.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u,variant:"stacked"}),(0,l.jsx)(V.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u}),(0,l.jsx)(V.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,l.jsx)(V.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",layout:"stacked"}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(V.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:p,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,l.jsx)(o.UO1,{in:"Legitimate interests"===n.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})})]}),(0,l.jsx)(o.xuv,{mt:5,pl:4,children:(0,l.jsx)(N.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,l.jsx)(N.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,l.jsx)(e8.Z,{heading:"Features",children:(0,l.jsx)(V.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,l.jsx)(e8.Z,{heading:"Dataset reference",children:(0,l.jsx)(V.d,{name:"dataset_references",label:"Dataset references",options:g,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e8.Z,{heading:"Special category data",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:n.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})}),(0,l.jsx)(e8.Z,{heading:"Third parties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsxs)(o.Kqy,{mt:4,spacing:4,children:[(0,l.jsx)(N.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked"}),(0,l.jsx)(V.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple"})]})})]})}),r?(0,l.jsx)(e4.uc,{resourceType:E.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},ss=(e,s)=>e?{...e,customFieldValues:s||{}}:e7,st=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e4.mZ)({resourceType:E.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e9(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,m.useMemo)(()=>ss(t,i),[t,i])}},sa=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,n=null==a?void 0:a.id,{handleSubmit:r,initialValues:d}=st({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:n}),c=(0,h.C)(ev.gU);return(0,l.jsx)(M.J9,{enableReinitialize:!0,initialValues:d,onSubmit:r,validationSchema:e6,children:e=>{let{dirty:s,values:a}=e;return(0,l.jsxs)(M.l0,{"data-testid":"declaration-form",children:[(0,l.jsx)(x.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsx)(se,{values:a,lockedForGVL:c,privacyDeclarationId:n,...i}),(0,l.jsxs)(o.kCb,{w:"100%",children:[(0,l.jsx)(o.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})}})},si=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:n="privacy-declaration-modal",children:r}=e;return(0,l.jsxs)(o.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"left",p:0,"data-testid":n,children:[(0,l.jsx)(o.xBx,{p:0,children:(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(o.fef,{pb:4,children:r})]})]})};var sn=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:n,onOpen:r}=(0,o.qY0)(),[d,c]=(0,m.useState)(void 0),{createDataUse:u,updateDataUse:p,deleteDataUse:h}=(0,e$.Z)(s),g=()=>{n(),c(void 0)},x=()=>{r(),c(void 0)},y=async e=>(g(),d)?p(d,e):u(e);return(0,m.useEffect)(()=>{n()},[n,s.fides_key]),(0,l.jsxs)(o.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,l.jsx)(eJ,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:x}):(0,l.jsx)(e2,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:x,handleEdit:e=>{r(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,l.jsx)(si,{isOpen:i,onClose:g,heading:"Configure data use",children:(0,l.jsx)(sa,{initialValues:d,onSubmit:y,onCancel:g,includeCustomFields:t,...a})})]})},sr=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eQ.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),n=a.allDataUses.filter(e=>e.active),r=a.allDataSubjects.filter(e=>e.active),d={...a,allDataCategories:i,allDataUses:n,allDataSubject:r};return(0,l.jsxs)(o.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,l.jsxs)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,l.jsx)(o.rUS,{as:c(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,l.jsx)(o.$jN,{}):(0,l.jsx)(sn,{system:s,includeCustomFields:!0,...d})]})},sl=t(812),so=t(93237),sd=t(69525),sc=t(33335);let su={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:"",system_groups:[]},sp=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a||"",system_groups:e.system_groups||[]}},sm=e=>{let s=e.fides_key?e.fides_key:(0,sc.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,system_groups:e.system_groups};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sh,useAddSystemAssetMutation:sg,useUpdateSystemAssetsMutation:sx,useDeleteSystemAssetsMutation:sy,usePopulateSystemAssetsMutation:sf}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,w.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var s_=t(69353),sb=t(36345);let sv=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sj=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sk=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sw=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,l.jsxs)(o.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sC=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:n=[]}=(0,W.K3)(),{plus:r}=(0,eO.hz)(),d=(0,h.T)(),c=(0,e4.mZ)({resourceType:E.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...u}=(0,eQ.f)({includeDatasets:!0,includeDisabled:!1}),p=(0,m.useMemo)(()=>t?sp(t,c.customFieldValues):su,[t,c.customFieldValues]),[g]=(0,W.in)(),y=(0,m.useMemo)(()=>U.Ry().shape({name:U.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await g({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==p.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:U.Z_().min(1).url().nullable()}),[g,p.name]),f=(0,eO.hz)(),[_,b]=(0,W.f7)(),[j,k]=(0,W.qQ)(),[w]=sf();(0,Z.Rd)(void 0,{skip:!f.dictionaryService});let[C]=(0,Z.qz)(),{data:S}=(0,s_.QD)(void 0,{skip:!r}),T=(0,m.useMemo)(()=>(null==S?void 0:S.map(e=>({value:e.fides_key,label:e.name})))||[],[S]),D=(0,h.C)(Z.o),A=(0,h.C)(ev.gU),q=(0,m.useMemo)(()=>!!(t&&(null==n?void 0:n.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,n]),I=(0,m.useMemo)(()=>u.allDatasets?u.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[u.allDatasets]),R=(0,o.pmc)(),z=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await C({vendor_id:e.vendor_id});if(s.isError){if(!((0,sl.fn)(s.error)&&404===s.error.status)){let e=(0,sl.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");R((0,v.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,sd.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let r=sm({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=q?await j(r):await _(r),await c.upsertCustomFields(e),!q&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await w({systemKey:n.data.fides_key});(0,sl.D4)(e)&&R((0,v.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sl.D4)(n)?R({status:"error",description:(0,sl.e$)(n.error,"An unexpected error occurred while ".concat(q?"editing":"creating"," the system. Please try again."))}):(R.closeAll(),t.resetForm({values:e}),s(n.data),d((0,ev.b3)("initial")))},F=e=>{if(f.dictionaryService){if(!e){d((0,ev.b3)("hiding")),d((0,ev.gQ)(!1));return}d((0,ev.b3)("showing")),f.tcf&&(0,sl.cj)(e)===sl.c6.GVL?d((0,ev.gQ)(!0)):d((0,ev.gQ)(!1))}},L=k.isLoading||b.isLoading||c.isLoading;return(0,l.jsx)(M.J9,{initialValues:p,enableReinitialize:!0,onSubmit:z,validationSchema:y,children:e=>{let{dirty:s,values:n,isValid:d}=e;return(0,l.jsxs)(M.l0,{children:[(0,l.jsx)(x.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,l.jsxs)(o.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsx)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsxs)(e8.Z,{heading:"System details",children:[f.dictionaryService?(0,l.jsx)(sb.Z,{label:"System name",options:D,onVendorSelected:F,isCreate:!t,lockedForGVL:A}):(0,l.jsx)(N.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,l.jsx)(N.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(so.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?"}),(0,l.jsx)(V.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:p.tags?p.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?"}),r&&(0,l.jsx)(V.d,{name:"system_groups",label:"System groups",options:T,tooltip:"Which system groups are associated with this system?",mode:"multiple",layout:"stacked"})]}),(0,l.jsx)(e8.Z,{heading:"Dataset reference",children:(0,l.jsx)(V.d,{name:"dataset_references",label:"Dataset references",options:I,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e8.Z,{heading:"Data processing properties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(o.xuv,{mb:4,children:(0,l.jsx)(so.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:A})}),(0,l.jsx)(o.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!n.processes_personal_data||A}),(0,l.jsx)(o.UO1,{in:n.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:n.exempt_from_privacy_regulations,disabled:A})})})]})}),(0,l.jsx)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,l.jsxs)(o.Kqy,{spacing:4,mt:4,children:[(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sv,tooltip:"What is the legal basis under which profiling is performed?",disabled:A,isRequired:n.uses_profiling})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sj,tooltip:"What is the legal basis under which the data is transferred?",isRequired:n.does_international_transfers,disabled:A})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:A}),(0,l.jsx)(o.UO1,{in:n.requires_data_protection_assessments,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:A,isRequired:n.requires_data_protection_assessments})})})]})]})})]})}),(0,l.jsxs)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,l.jsxs)(e8.Z,{heading:"Cookie properties",children:[(0,l.jsx)(so.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:A}),(0,l.jsx)(so.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:A})]}),(0,l.jsxs)(e8.Z,{heading:"Administrative properties",children:[(0,l.jsx)(N.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,l.jsx)(so.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:A}),(0,l.jsx)(so.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(so.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(N.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(V.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sk,tooltip:"What is the role of the business with regard to data processing?",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:A}),(0,l.jsx)(N.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"}),(0,l.jsx)(so.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:A}),(0,l.jsx)(so.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),n.fides_key?(0,l.jsx)(e4.uc,{resourceType:E.P6.SYSTEM,resourceFidesKey:n.fides_key}):null]})]}),(0,l.jsx)(o.xuv,{mt:6,children:(0,l.jsx)(o.wpx,{htmlType:"submit",type:"primary",disabled:L||!s||!d,loading:L,"data-testid":"save-btn",children:"Save"})}),i]})}})},sS=t(59003),sT=t(92222),sD=t(30952),sA=t(47935),sq=t(90111),sE=t(8133),sI=t(83099),sR=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[n,r,{setValue:d,setTouched:c}]=(0,M.U$)(s),u=!!(r.touched&&r.error);return(0,l.jsx)(o.NIc,{isInvalid:u,isRequired:!0,children:(0,l.jsxs)(o.jqI,{vertical:!0,children:[(0,l.jsxs)(o.jqI,{align:"center",children:[t&&(0,l.jsx)(N.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,l.jsx)(eN.b,{label:i})]}),(0,l.jsx)(sI.Z,{...n,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,l.jsx)(N.Bc,{isInvalid:u,message:r.error,fieldName:s})]})})};(a=n||(n={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sz=U.Ry().shape({name:U.Z_().required("Enter a name for this asset"),domain:U.Z_().required("Enter a valid domain for this asset"),asset_type:U.Z_().required("Select an asset type"),data_uses:U.IX().min(1,"Select at least one data use"),base_url:U.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sF={name:"",description:"",duration:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sL=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:i,...r}=e,d=!i,[c,{isLoading:u}]=sg(),[p,{isLoading:m}]=sx(),h=(0,o.pmc)(),g=async e=>{let s=await c({systemKey:a,asset:e});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,v.Vo)(e))}else h((0,v.t5)("Asset added successfully")),t()},x=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,v.Vo)(e))}else h((0,v.t5)("Asset updated successfully")),t()};return(0,l.jsx)(sE.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...r,children:(0,l.jsx)(M.J9,{initialValues:null!=i?i:sF,onSubmit:e=>{d?g(e):x(e)},validationSchema:sz,children:e=>{let{values:s,isValid:a,dirty:i}=e,r=!!s.asset_type&&"Cookie"===s.asset_type,c=!!s.asset_type&&"Cookie"!==s.asset_type;return(0,l.jsxs)(M.l0,{children:[(0,l.jsxs)(o.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,l.jsx)(sq.Z,{children:(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,l.jsxs)(o.jqI,{vertical:!0,gap:20,children:[(0,l.jsx)(N.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(V.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sl.MM)(n),layout:"stacked",disabled:!d}),(0,l.jsx)(sR,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,l.jsx)(N.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(N.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:r,children:(0,l.jsx)(N.j0,{id:"duration",name:"duration",label:"Duration",variant:"stacked",placeholder:"e.g. '1 day', '30 minutes', '1 year'",tooltip:"Cookie duration is how long a cookie stays stored in the user's browser before automatically expiring and being deleted.",isRequired:r})}),(0,l.jsx)(o.UO1,{in:c,children:(0,l.jsx)(N.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:c})})]})]}),(0,l.jsxs)(o.jqI,{justify:"space-between",children:[(0,l.jsx)(o.wpx,{onClick:t,children:"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!i,"data-testid":"save-btn",children:"Save"})]})]})}})})},sP=t(8411),sO=t(72625),sZ=t(26092),sW=t.n(sZ),sN=t(29850),sM=t(77685),sU=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(),[u,p]=(0,m.useState)(!1),[h,{isLoading:g}]=sx(),{successAlert:x,errorAlert:y}=(0,A.VY)(),f=(0,o.qY0)(),{asset_type:_,name:b}=a,v=sW()(b||"",{length:50}),j=(0,m.useCallback)(e=>{e.preventDefault(),p(!0)},[]),k=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=sW()(i,{length:50}),o=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,ef.D4)(o)?y((0,sl.e$)(o.error)):x(n?"".concat(l," has been added to your system inventory and the ").concat(_,' "').concat(v,'" has been assigned to that system.'):"".concat(_,' "').concat(v,'" has been assigned to ').concat(l)),r(!1),c(void 0)},w=e=>{c(e),f.onOpen()};return i?(0,l.jsx)(o.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,l.jsxs)(l.Fragment,{children:[!n&&(0,l.jsxs)(o.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,l.jsx)(o.PJP.I8b,{})]}),!!n&&(0,l.jsx)(sN.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:j,onSelect:(e,s)=>w({newSystemKey:e,newSystemName:s.label}),loading:g}),u&&(0,l.jsx)(sM.i,{isOpen:!0,onClose:()=>p(!1),onSuccessfulSubmit:(e,s)=>w({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,l.jsx)(o.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{k(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sV=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:n}]=sy(),r=(0,o.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,o.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,ef.D4)(e)?r((0,v.Vo)((0,sl.e$)(e.error,"A problem occurred removing this asset. Please try again"))):r((0,v.t5)("Asset removed successfully"))};return(0,l.jsxs)(o.jqI,{className:"gap-1",children:[(0,l.jsx)(o.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,l.jsx)(o.wpx,{size:"small",onClick:u,loading:n,"data-testid":"remove-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})},sB=t(34929),sK=t(26183),sH=e=>{var s,t;let{asset:a,systemId:i,readonly:n}=e,{getDataUseDisplayName:r}=(0,sB.Z)(),[d]=sx(),{errorAlert:c,successAlert:u}=(0,I.V)(),[p,h]=(0,m.useState)(!1),g=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,ef.D4)(t)?c((0,sl.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},x=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,ef.D4)(n)?c((0,sl.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return n?(0,l.jsx)(sK.Z,{children:y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,l.jsxs)(sK.Z,{children:[!p&&(0,l.jsxs)(l.Fragment,{children:[y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>x(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,l.jsx)(o.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),p&&(0,l.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,l.jsx)(sI.Z,{selectedTaxonomies:a.data_uses||[],onSelect:g,onBlur:()=>h(!1),open:!0})})]})},sY=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,r=(0,sT.Cl)(),d=r.display({id:"select",cell:e=>{let{row:s}=e;return(0,l.jsx)(sO.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(sO.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),c=r.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Asset"}),u=r.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Type"}),p=r.display({id:"system",cell:e=>(0,l.jsx)(sU,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),m=r.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,l.jsx)(sH,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),h=r.accessor(e=>e.locations,{id:"locations",cell:e=>(0,l.jsx)(sO.mb,{values:e.getValue().map(e=>{let s=(0,o.QCN)(e);return{label:s?(0,o.c1K)({isoEntry:s,showFlag:!0}):sP.Z8[e],key:e}})}),header:"Locations",size:300}),g=r.accessor(e=>e.domain,{id:"domain",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Domain"}),x=r.accessor(e=>e.duration,{id:"duration",cell:e=>e.row.original.asset_type===n.COOKIE?(0,l.jsx)(sA.G3,{value:e.getValue()}):null,header:"Duration"}),y=r.accessor(e=>e.page,{id:"page",cell:e=>(0,l.jsx)(sO.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,l.jsx)(sO.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),f=r.display({id:"actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(sV,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),_=[c,u,p,m,h,g,x,y];return a?_:[d,..._,f]},sG=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:p,endRange:g,pageIndex:x,setTotalPages:y,resetPageIndexToDefault:f}=(0,sA.oi)(),[_,b]=(0,m.useState)(""),[j,k]=(0,m.useState)(void 0),[w,C]=(0,m.useState)({}),[S]=sy(),T=(0,h.C)(ev.gU),D=(0,o.pmc)(),{data:A,isLoading:q,isFetching:E}=sh({fides_key:t.fides_key,search:_,page:x,size:i}),{isOpen:I,onClose:R,onOpen:z}=(0,o.qY0)(),{isOpen:F,onClose:L,onOpen:P}=(0,o.qY0)();(0,m.useEffect)(()=>{f()},[_,f]),(0,m.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let O=sY({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{k(e),z()},lockedForGVL:T}),Z=(0,sS.b7)({getCoreRowModel:(0,sT.sC)(),columns:O,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),W=Z.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:W});(0,ef.D4)(e)?D((0,v.Vo)((0,sl.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(Z.resetRowSelection(),D((0,v.t5)("Assets removed successfully"))),L()};return t?q?(0,l.jsx)(sA.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.xvT,{fontSize:"sm",mb:4,children:T?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,l.jsxs)(sA.Q$,{children:[(0,l.jsx)(sD.f,{value:_,onChange:b}),!T&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,l.jsx)(sL,{isOpen:I,onClose:()=>{k(void 0),R()},systemKey:t.fides_key,asset:j}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.ZNm,{}),iconPosition:"end",onClick:P,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})]}),(0,l.jsx)(sA.ZK,{tableInstance:Z,emptyTableNotice:(0,l.jsx)(o.oj8,{image:o.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,l.jsx)(sA.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d||E,onNextPageClick:c,isNextPageDisabled:u||E,startRange:p,endRange:g})]}):null},sQ=e=>{let{setActiveTab:s}=e,t=(0,u.useRouter)(),a=(0,o.pmc)();(0,m.useEffect)(()=>{let{status:e}=t.query;if(e&&t.isReady){s("integrations"),"succeeded"===e?a((0,v.t5)("Integration successfully authorized.")):a((0,v.Vo)("Failed to authorize integration."));let i={...t.query};delete i.status,t.replace({pathname:t.pathname,query:i,hash:"integrations"},void 0,{shallow:!0})}},[t.query,s,t,a])};(i=r||(r={})).INFORMATION="information",i.DATA_USES="data-uses",i.DATA_FLOW="data-flow",i.INTEGRATIONS="integrations",i.ASSETS="assets",i.HISTORY="history";let s$=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,l.jsxs)(o.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,l.jsx)(j.Z,{onClick:s,children:"view it now"})," or"," ",(0,l.jsx)(j.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var sJ=e=>{var s,t;let{isCreate:a}=e,i=(0,u.useRouter)(),{activeTab:n,onTabChange:d,setActiveTab:p}=(0,b.Z)({tabKeys:Object.values(r)}),[j,k]=(0,m.useState)(!1),{systemOrDatamapRoute:w}=(0,y.V)(),C=(0,o.pmc)(),S=(0,h.T)(),[T,D]=(0,m.useState)(void 0),{plus:A}=(0,g.hz)(),q=i.query.id,{data:E}=(0,W.rn)(q,{skip:!q||a});(0,m.useEffect)(()=>{E&&D(E.processes_personal_data)},[E]);let I=(0,m.useCallback)(e=>{void 0===E&&k(!0),i.push({pathname:f.Dv,query:{id:e.fides_key}});let s={...v.MA,description:(0,l.jsx)(s$,{onViewDatamap:()=>{i.push(w).then(()=>{C.closeAll()})},onAddPrivacyDeclaration:()=>{d("data-uses"),C.closeAll()}})};C({...s})},[E,i,w,C,d]);(0,m.useEffect)(()=>{a&&(S((0,ev.b3)("initial")),S((0,ev.gQ)(!1)))},[S,a]);let{attemptAction:R}=(0,x.oI)(),z=(0,m.useCallback)(e=>{R().then(async s=>{s&&d(e)})},[R,d]);sQ({setActiveTab:p});let F=[{label:"Information",key:"information",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{px:6,mb:9,children:[(0,l.jsx)(x.eB,{}),(0,l.jsx)(sC,{onSuccess:I,system:E})]}),j?(0,l.jsx)(o.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,l.jsxs)(o.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,l.jsx)(o.rUS,{as:c(),href:w,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",key:"data-uses",children:E?(0,l.jsx)(o.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,l.jsx)(sr,{system:E})}):null,disabled:!E||!T},{label:"Data flow",key:"data-flow",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsxs)(o.xuv,{px:6,paddingBottom:2,children:[(0,l.jsx)(o.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,l.jsx)(_.q,{system:E,isSystemTab:!0})]}):null,disabled:!E},{label:"Integrations",key:"integrations",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:2,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,children:A?(0,l.jsxs)(l.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,l.jsx)(o.rUS,{href:f.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,l.jsx)(ex,{connectionConfig:E.connection_configs,systemFidesKey:E.fides_key}),(null===(s=E.connection_configs)||void 0===s?void 0:s.key)&&(0,l.jsx)(eb,{m:6,connectionKey:null===(t=E.connection_configs)||void 0===t?void 0:t.key})]}):null,disabled:!E}];return A&&F.push({label:"Assets",key:"assets",children:E?(0,l.jsx)(sG,{system:E}):null,disabled:!E}),A&&F.push({label:"History",key:"history",children:E?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:6,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,l.jsx)(eG,{system:E})]}):null,disabled:!E}),{tabData:F,activeKey:n,onTabChange:z}}},54748:function(e,s,t){var a=t(27378),i=t(65735);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){var a=t(27378),i=t(65735);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7218],{95492:function(e,t,s){s.d(t,{l:function(){return n}});var i=s(24246);let n=(0,s(98227).IUT)({displayName:"TrashCanSolidIcon",viewBox:"0 0 12 15",path:(0,i.jsx)("path",{d:"M8.37857 1.18083C8.23393 0.892838 7.93661 0.710938 7.6125 0.710938H4.3875C4.06339 0.710938 3.76607 0.892838 3.62143 1.18083L3.42857 1.56094H0.857143C0.383036 1.56094 -1.19209e-07 1.94158 -1.19209e-07 2.41094C-1.19209e-07 2.8803 0.383036 3.26094 0.857143 3.26094H11.1429C11.6162 3.26094 12 2.8803 12 2.41094C12 1.94158 11.6162 1.56094 11.1429 1.56094H8.57143L8.37857 1.18083ZM11.167 4.11094H0.857143V12.6109C0.857143 13.5486 1.62589 14.3109 2.57143 14.3109H9.45268C10.3754 14.3109 11.167 13.5486 11.167 12.6109V4.11094ZM9.02411 6.23594V12.1859C9.02411 12.4197 8.80714 12.6109 8.59554 12.6109C8.33571 12.6109 8.16696 12.4197 8.16696 12.1859V6.23594C8.16696 6.00219 8.33571 5.81094 8.59554 5.81094C8.80714 5.81094 9.02411 6.00219 9.02411 6.23594ZM6.45268 6.23594V12.1859C6.45268 12.4197 6.23571 12.6109 6.02411 12.6109C5.76429 12.6109 5.57143 12.4197 5.57143 12.1859V6.23594C5.57143 6.00219 5.76429 5.81094 6.02411 5.81094C6.23571 5.81094 6.45268 6.00219 6.45268 6.23594ZM3.85714 6.23594V12.1859C3.85714 12.4197 3.66429 12.6109 3.42857 12.6109C3.19286 12.6109 3 12.4197 3 12.1859V6.23594C3 6.00219 3.19286 5.81094 3.42857 5.81094C3.66429 5.81094 3.85714 6.00219 3.85714 6.23594Z",fill:"currentColor"})})},94799:function(e,t,s){s.d(t,{k:function(){return l}});var i=s(76649);let n=e=>(0,i.Ln)({id:"string"},e),l=e=>(null!=e?e:[]).filter(n)},30320:function(e,t,s){s.d(t,{m:function(){return d}});var i=s(27378),n=s(25980),l=s(17245),a=s(32885),r=s(94799);let d=e=>{let{resourceFidesKey:t,resourceType:s}=e,{errorAlert:d}=(0,l.VY)(),{plus:o}=(0,n.hz)(),c=(0,i.useMemo)(()=>null!=t?t:"",[]),u=(0,a.YU)(!0,{skip:!o||!s}),f=(0,a.VN)(s,{skip:!o||!s}),{data:m,isLoading:x,error:h,isError:y}=(0,a.PV)(null!=t?t:"",{skip:!s||""!==c&&!(o&&c)}),[g]=(0,a._D)(),p=u.isLoading||f.isLoading||x,j=(0,i.useMemo)(()=>new Map((0,r.k)(u.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}))}]})),[u.data]),C=(0,i.useMemo)(()=>{var e;return null===(e=f.data)||void 0===e?void 0:e.filter(e=>e.active)},[f.data]),k=(0,i.useMemo)(()=>new Map((0,r.k)(C).map(e=>[e.id,e])),[C]),v=(0,i.useMemo)(()=>y&&(null==h?void 0:h.status)===404?new Map:new Map((0,r.k)(m).map(e=>[e.custom_field_definition_id,e])),[m,y,h]),w=(0,i.useMemo)(()=>{let e=[...k.keys()];return e.sort(),e},[k]),_=(0,i.useMemo)(()=>{let e={};return C&&v&&C.forEach(t=>{let s=v.get(t.id||"");s&&(t.allow_list_id&&"string[]"===t.field_type?e[s.custom_field_definition_id]=s.value:e[s.custom_field_definition_id]=s.value.toString())}),e},[C,v]),b=(0,i.useCallback)(async e=>{if(!o||!s)return;let i="fides_key"in e&&""!==e.fides_key?e.fides_key:t;if(!i)return;let{customFieldValues:n}=e;if(!n||0===Object.keys(n).length)return;let l=[],a=[];w.forEach(e=>{let t=v.get(e),s=n[e];void 0===s||""===s||Array.isArray(s)&&0===s.length?(null==t?void 0:t.id)&&a.push(t.id):l.push({custom_field_definition_id:e,resource_id:i,id:null==t?void 0:t.id,value:s})});try{await g({resource_type:s,resource_id:i,upsert:l,delete:a})}catch(e){d("One or more custom fields have failed to save, please try again."),console.error(e)}},[o,v,d,t,w,g,s]);return{customFieldValues:_,definitionIdToCustomField:v,idToAllowListWithOptions:j,idToCustomFieldDefinition:k,isEnabled:o,isLoading:p,sortedCustomFieldDefinitionIds:w,upsertCustomFields:b}}},33162:function(e,t,s){s.d(t,{uc:function(){return u},mZ:function(){return c.m}});var i=s(24246),n=s(98227),l=s(34090),a=s(30234),r=s(65735),d=s(97181),o=s(40324),c=s(30320);let u=e=>{let{resourceFidesKey:t,resourceType:s}=e,{idToAllowListWithOptions:u,idToCustomFieldDefinition:f,isEnabled:m,isLoading:x,sortedCustomFieldDefinitionIds:h}=(0,c.m)({resourceFidesKey:t,resourceType:s});return m&&0!==h.length?(0,i.jsx)(a.Z,{heading:"Custom fields",children:(0,i.jsx)(n.kCb,{flexDir:"column","data-testid":"custom-fields-list",children:(0,i.jsx)(n.kCb,{flexDir:"column",gap:"24px",children:x?(0,i.jsx)(n.M5Y,{children:(0,i.jsx)(n.$jN,{})}):h.length>0&&(0,i.jsx)(n.kCb,{flexDirection:"column",gap:"12px",paddingBottom:"24px",children:h.map(e=>{let t=f.get(e);if(!t)return null;let s="customFieldValues.".concat(t.id);if(!t.allow_list_id&&t.field_type===r.AL.STRING)return(0,i.jsx)(l.gN,{name:s,children:e=>{let{field:s}=e;return(0,i.jsx)(o.j0,{...s,label:t.name,tooltip:t.description,variant:"stacked"})}},e);let n=u.get(t.allow_list_id);if(!n)return null;let{options:a}=n;return(0,i.jsx)(d.d,{name:s,allowClear:!0,mode:t.field_type!==r.AL.STRING?"multiple":void 0,label:t.name,options:a,tooltip:t.description,layout:"stacked",className:"w-full"},e)})})})})}):null};s(94799)},45938:function(e,t,s){s.d(t,{Gt:function(){return f},eB:function(){return m},oI:function(){return u}});var i=s(24246),n=s(34090),l=s(27378),a=s(16134),r=s(38602),d=s(58452);let o=(0,l.createRef)(),c=(0,l.createRef)(),u=()=>{let e=(0,a.T)(),t=(0,a.C)(r.DB),s=(0,l.useCallback)(()=>{c.current=void 0,o.current=void 0},[]),i=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),n=(0,l.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,l.useCallback)(()=>t?(e((0,r.h7)()),o.current||(o.current=new Promise(e=>{c.current=e})),o.current):Promise.resolve(!0),[t,e]),onConfirm:i,onClose:n}},f=e=>{let{id:t,name:s}=e,{dirty:i}=(0,n.u6)(),d=(0,a.T)();return(0,l.useEffect)(()=>(d((0,r.Zu)({id:t,name:s})),()=>{d((0,r.dz)({id:t}))}),[d,t,s]),(0,l.useEffect)(()=>{d((0,r.$p)({id:t,isDirty:i}))},[i,d,t]),null},m=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,a.C)(r.uv);return(0,i.jsx)(d.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},84720:function(e,t,s){s.d(t,{q:function(){return C}});var i=s(24246),n=s(98227),l=s(27378),a=s(34090),r=s(812),d=s(45938),o=s(14048),c=s(95492);let u=e=>{let{systems:t,dataFlows:s,onDataFlowSystemChange:l}=e,{setFieldValue:r}=(0,a.u6)(),d=s.map(e=>e.fides_key),o=e=>{let t=s.filter(t=>t.fides_key!==e.fides_key);r("dataFlowSystems",t),l(t)};return(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-delete-table",children:[(0,i.jsx)(n.hrZ,{children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsx)(n.Th,{})]})}),(0,i.jsx)(n.p3B,{children:t.filter(e=>d.includes(e.fides_key)).map(e=>(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"end",children:(0,i.jsx)(n.wpx,{"aria-label":"Unassign data flow from system",icon:(0,i.jsx)(c.l,{}),onClick:()=>o(e),"data-testid":"unassign-btn"})})]},e.fides_key))})]})};var f=s(26917),m=e=>{let{allSystems:t,dataFlowSystems:s,onChange:l,flowType:r}=e,{setFieldValue:d}=(0,a.u6)(),o=e=>{if(s.find(t=>t.fides_key===e.fides_key)){let t=s.filter(t=>t.fides_key!==e.fides_key);d("dataFlowSystems",t),l(t)}else{let t=[...s,{fides_key:e.fides_key,type:"system"}];d("dataFlowSystems",t),l(t)}};return(0,i.jsx)(n.xuv,{overflowY:"auto",maxHeight:"300px",children:(0,i.jsxs)(n.iA_,{size:"sm","data-testid":"assign-systems-table",maxHeight:"50vh",overflowY:"scroll",children:[(0,i.jsx)(n.hrZ,{position:"sticky",top:0,background:"white",zIndex:1,children:(0,i.jsxs)(n.Tr,{children:[(0,i.jsx)(n.Th,{children:"System"}),(0,i.jsxs)(n.Th,{textAlign:"right",children:["Set as ",r]})]})}),(0,i.jsx)(n.p3B,{children:t.map(e=>{let t=!!s.find(t=>t.fides_key===e.fides_key);return(0,i.jsxs)(n.Tr,{_hover:{bg:"gray.50"},"data-testid":"row-".concat(e.fides_key),children:[(0,i.jsx)(n.Td,{children:(0,i.jsx)(n.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"medium",children:e.name})}),(0,i.jsx)(n.Td,{textAlign:"right",children:(0,i.jsx)(n.rAg,{checked:t,onChange:()=>o(e),"data-testid":"assign-switch"})})]},e.fides_key)})})]})})};let x=(e,t)=>{var s,i;return(null===(s=e.name)||void 0===s?void 0:s.toLocaleLowerCase().includes(t.toLocaleLowerCase()))||(null===(i=e.description)||void 0===i?void 0:i.toLocaleLowerCase().includes(t.toLocaleLowerCase()))};var h=e=>{let{currentSystem:t,systems:s,isOpen:r,onClose:d,dataFlowSystems:o,onDataFlowSystemChange:c,flowType:u}=e,{setFieldValue:h}=(0,a.u6)(),[y,g]=(0,l.useState)(""),[p,j]=(0,l.useState)(o),C=async()=>{c(p),d()},k=0===s.length,v=(0,l.useMemo)(()=>s?s.filter(e=>e.fides_key!==t.fides_key).filter(e=>x(e,y)):[],[s,t.fides_key,y]),w=(0,l.useMemo)(()=>{let e=new Set(p.map(e=>e.fides_key));return v.every(t=>e.has(t.fides_key))},[v,p]);return(0,i.jsxs)(n.u_l,{isOpen:r,onClose:d,size:"2xl",isCentered:!0,children:[(0,i.jsx)(n.ZAr,{}),(0,i.jsxs)(n.hzk,{p:8,"data-testid":"confirmation-modal",children:[(0,i.jsxs)(n.xBx,{fontWeight:"medium",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsxs)(n.xvT,{fontSize:"2xl",lineHeight:8,fontWeight:"semibold",children:["Configure ",u.toLocaleLowerCase()," systems"]}),(0,i.jsxs)(n.j8w,{color:"success",children:["Assigned to ",p.length," systems"]})]}),(0,i.jsx)(n.fef,{"data-testid":"assign-systems-modal-body",children:k?(0,i.jsx)(n.xvT,{children:"No systems found"}):(0,i.jsxs)(n.Kqy,{spacing:4,children:[(0,i.jsxs)(n.kCb,{justifyContent:"space-between",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",flexGrow:1,fontWeight:"medium",children:"Add or remove destination systems from your data map"}),(0,i.jsx)(n.xuv,{children:(0,i.jsxs)(n.NIc,{display:"flex",alignItems:"center",children:[(0,i.jsx)(n.lXp,{fontSize:"sm",htmlFor:"assign-all-systems",mb:"0",children:"Assign all systems"}),(0,i.jsx)(n.rAg,{size:"small",id:"assign-all-systems",checked:w,onChange:e=>{if(e&&s){let e=v.map(e=>({fides_key:e.fides_key,type:"system"}));h("dataFlowSystems",e),j(e)}else j([])},"data-testid":"assign-all-systems-toggle"})]})})]}),(0,i.jsx)(f.Z,{value:y,onChange:g,placeholder:"Search for systems","data-testid":"system-search",withIcon:!0}),(0,i.jsx)(m,{flowType:u,allSystems:v,dataFlowSystems:p,onChange:j})]})}),(0,i.jsxs)(n.mzw,{justifyContent:"flex-start",children:[(0,i.jsx)(n.wpx,{onClick:d,className:"mr-2","data-testid":"cancel-btn",children:"Cancel"}),!k&&(0,i.jsx)(n.wpx,{type:"primary",onClick:C,"data-testid":"confirm-btn",children:"Confirm"})]})]})]})},y=s(46628),g=s(1315);let p={dataFlowSystems:[]},j=e=>{let{system:t,isIngress:s,isSystemTab:c}=e,f=(0,n.pmc)(),m=s?"Source":"Destination",x="".concat(m,"s"),j=(0,n.qY0)(),[C]=(0,g.qQ)(),{data:k=[]}=(0,g.K3)(),v=(0,l.useMemo)(()=>{let e=s?t.ingress:t.egress;e||(e=[]);let i=k?k.map(e=>e.fides_key):[];return e.filter(e=>i.includes(e.fides_key))},[s,t,k]),[w,_]=(0,l.useState)(v);(0,l.useEffect)(()=>{_(v)},[v]);let b=async(e,i)=>{let{dataFlowSystems:n}=e,{resetForm:l}=i,a={...t,ingress:s?n:t.ingress,egress:s?t.egress:n},d=await C(a);(0,r.D4)(d)?f((0,y.Vo)("Failed to update data flows")):f((0,y.t5)("".concat(x," updated"))),l({values:{dataFlowSystems:n}})};return(0,i.jsxs)(n.Qdk,{children:[(0,i.jsx)(n.KFZ,{height:"68px",paddingLeft:c?6:2,"data-testid":"data-flow-button-".concat(m),children:(0,i.jsxs)(n.kCb,{alignItems:"center",justifyContent:"start",flex:1,textAlign:"left",children:[(0,i.jsx)(n.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"semibold",mr:2,children:x}),(0,i.jsx)(n.Vp9,{ml:2,backgroundColor:"primary.400",borderRadius:"6px",color:"white",children:w.length}),(0,i.jsx)(n.LZC,{}),(0,i.jsx)(n.XEm,{})]})}),(0,i.jsx)(n.Hk3,{backgroundColor:"gray.50",padding:6,"data-testid":"data-flow-panel-".concat(m),children:(0,i.jsx)(n.Kqy,{borderRadius:"md",backgroundColor:"gray.50","aria-selected":"true",spacing:4,"data-testid":"selected",children:(0,i.jsx)(a.J9,{initialValues:p,onSubmit:b,children:e=>{let{isSubmitting:s,dirty:l,resetForm:r}=e;return(0,i.jsxs)(a.l0,{children:[(0,i.jsx)(d.Gt,{id:"".concat(t.fides_key,":").concat(m),name:"".concat(m," Data Flow")}),(0,i.jsx)(n.wpx,{onClick:j.onOpen,type:"primary",size:"small",icon:(0,i.jsx)(o.A5,{}),iconPosition:"end",className:"mb-4","data-testid":"assign-systems-btn",children:"Configure ".concat(x.toLocaleLowerCase())}),(0,i.jsx)(u,{systems:k,dataFlows:w,onDataFlowSystemChange:_}),(0,i.jsxs)("div",{className:"mt-6 flex gap-2",children:[(0,i.jsx)(n.wpx,{disabled:!l&&w===v,onClick:()=>{_(v),r({values:{dataFlowSystems:v}})},"data-testid":"cancel-btn",children:"Cancel"}),(0,i.jsx)(n.wpx,{type:"primary",htmlType:"submit",loading:s,disabled:!l&&w===v,"data-testid":"save-btn",children:"Save"})]}),j.isOpen?(0,i.jsx)(h,{currentSystem:t,systems:k,isOpen:j.isOpen,onClose:j.onClose,dataFlowSystems:w,onDataFlowSystemChange:_,flowType:m}):null]})}})})})]})},C=e=>{let{system:t,isSystemTab:s}=e;return(0,i.jsxs)(n.UQy,{allowToggle:!0,"data-testid":"data-flow-accordion",children:[(0,i.jsx)(j,{system:t,isIngress:!0,isSystemTab:s}),(0,i.jsx)(j,{system:t,isSystemTab:s})]})}},30234:function(e,t,s){var i=s(24246),n=s(98227);t.Z=e=>{let{heading:t,HeadingButton:s,children:l}=e;return(0,i.jsx)(n.Kqy,{spacing:4,children:(0,i.jsxs)(n.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,i.jsxs)(n.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)(n.X6q,{as:"h3",size:"xs",children:t}),s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.LZC,{}),(0,i.jsx)(s,{})]}):null]}),(0,i.jsx)(n.Kqy,{spacing:4,px:6,py:6,children:l})]})})}},52368:function(e,t,s){s.d(t,{f:function(){return d}});var i=s(16134),n=s(30002),l=s(28079),a=s(41966),r=s(57072);let d=e=>{let{includeDatasets:t,includeDisabled:s}=e,{isLoading:d}=(0,r.MO)(),{isLoading:o}=(0,n.te)(),{isLoading:c}=(0,l.fd)(),{isLoading:u}=(0,a.LH)({onlyUnlinkedDatasets:!1,minimal:!0},{skip:!t}),f=(0,i.C)(r.qb),m=(0,i.C)(r.Bd),x=(0,i.C)(n.ZL),h=(0,i.C)(n.H7),y=(0,i.C)(l.U3),g=(0,i.C)(l.jp),p=(0,i.C)(a.Q4);return{allDataCategories:s?f:m,allDataSubjects:s?x:h,allDataUses:s?y:g,allDatasets:t?p:void 0,isLoading:d||o||c||u}}},57072:function(e,t,s){s.d(t,{Bd:function(){return i.Bd},L5:function(){return i.L5},MO:function(){return i.MO},qb:function(){return i.qb}});var i=s(5785)},31883:function(e,t,s){s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7245],{17245:function(e,n,t){"use strict";t.d(n,{HK:function(){return s},VY:function(){return i.V},pI:function(){return d},h0:function(){return r.h},Rx:function(){return f},rK:function(){return h}});var r=t(36866),i=t(84306),o=t(812);let s=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:n=>{let t="An unexpected error occurred. Please try again.";(0,o.Ot)(n)?t=n.data.detail:(0,o.tB)(n)&&(t=n.data.detail[0].msg),e(t)}}};var l=t(27378),u=t(20682),a=t(41337),c=t(65735);let d=e=>{let{data:n}=(0,u.$I)({}),t=(0,l.useMemo)(()=>(null==n?void 0:n.items)||[],[n]);return(0,l.useMemo)(()=>{var n;if(!e)return(0,a.Br)("");if(e.connection_type===c.Rj.SAAS&&(null===(n=e.saas_config)||void 0===n?void 0:n.type)){let n=t.find(n=>{var t;return n.identifier===(null===(t=e.saas_config)||void 0===t?void 0:t.type)});if(n)return(0,a.PT)(n)}return(0,a.El)(e)},[e,t])};var p=t(40431);let v=()=>({search:p.Oi.withDefault("")}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:n,onSearchChange:t,disableUrlState:r=!1}=e,[i,o]=(0,l.useState)({searchQuery:n||void 0}),s=(0,l.useMemo)(()=>r?null:v(),[r]),[u,a]=(0,p.XI)(null!=s?s:{},{history:"push"}),c=(0,l.useMemo)(()=>r?i:{searchQuery:u.search||n||void 0},[r,i,u,n]),d=(0,l.useCallback)(e=>{r?o({searchQuery:e||void 0}):a({search:e||null})},[r,a]),f=(0,l.useCallback)(()=>{r?o({searchQuery:n||void 0}):a({search:null})},[r,n,a]);return(0,l.useEffect)(()=>{t&&t(c)},[c,t]),{...c,updateSearch:d,resetSearch:f,searchProps:{value:c.searchQuery||"",onChange:d,onClear:()=>d("")}}},g=e=>({sortKey:e?(0,p.jx)([...e]):p.Oi.withDefault(""),sortOrder:(0,p.km)(["ascend","descend"])}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:n,defaultSortOrder:t,onSortingChange:r,validColumns:i,disableUrlState:o=!1}=e,[s,u]=(0,l.useState)({sortKey:n,sortOrder:t}),a=(0,l.useMemo)(()=>o?null:g(i),[o,i]),[c,d]=(0,p.XI)(null!=a?a:{},{history:"push"}),v=(0,l.useMemo)(()=>{var e;return o?s:{sortKey:c.sortKey||n,sortOrder:null!==(e=c.sortOrder)&&void 0!==e?e:t}},[o,s,c,n,t]),f=(0,l.useCallback)((e,n)=>{o?u({sortKey:e,sortOrder:n}):d({sortKey:e?String(e):null,sortOrder:null!=n?n:null})},[o,d]),h=(0,l.useCallback)(()=>{o?u({sortKey:n,sortOrder:t}):d({sortKey:null,sortOrder:null})},[o,n,t,d]);return(0,l.useEffect)(()=>{r&&r(v)},[v,r]),{...v,updateSorting:f,resetSorting:h,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:v.sortOrder,sortedInfo:v.sortKey?{field:v.sortKey,order:v.sortOrder}:void 0}}}},84306:function(e,n,t){"use strict";t.d(n,{V:function(){return o}});var r=t(24246),i=t(98227);let o=()=>{let e=(0,i.pmc)();return{errorAlert:(n,t,o)=>{let s={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[t&&(0,r.jsx)(i.CdC,{children:t}),(0,r.jsx)(i.XaZ,{children:n})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,s):e(s)},successAlert:(n,t,o)=>{let s={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[t&&(0,r.jsx)(i.CdC,{children:t}),(0,r.jsx)(i.XaZ,{children:n})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,s):e(s)}}}},36866:function(e,n,t){"use strict";t.d(n,{h:function(){return a}});var r=t(40431),i=t(27378),o=t(55484);let s=(0,r.jo)({parse(e){let n=parseInt(e,10);try{return o.Rx().integer().positive().validateSync(n),n}catch(e){return null}},serialize:e=>e.toString()});var l=t(32735);let u=function(){var e,n;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.pageQueryKey||"page",o=t.sizeQueryKey||"size";return{[i]:s.withDefault(l.Ej),[o]:t.pageSizeOptions?(0,r.bJ)(t.pageSizeOptions).withDefault(null!==(e=t.pageSize)&&void 0!==e?e:l.L8):s.withDefault(null!==(n=t.pageSize)&&void 0!==n?n:l.L8)}},a=function(){var e,n;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:o=l.L8,pageSizeOptions:s,showSizeChanger:a=!0,pageQueryKey:c="page",sizeQueryKey:d="size",disableUrlState:p=!1}=t,v=null!=s?s:l.VZ,[f,g]=(0,i.useState)({pageIndex:l.Ej,pageSize:o}),h=(0,i.useMemo)(()=>p?null:u({pageSize:o,pageSizeOptions:s,pageQueryKey:c,sizeQueryKey:d}),[o,s,c,d,p]),[y,m]=(0,r.XI)(null!=h?h:{},{history:"push"}),x=p?f:{pageIndex:null!==(e=y[c])&&void 0!==e?e:l.Ej,pageSize:null!==(n=y[d])&&void 0!==n?n:o};return{...x,updatePageIndex:e=>{p?g(n=>({...n,pageIndex:e})):m({[c]:e})},updatePageSize:e=>{p?g({pageIndex:e!==x.pageSize?l.Ej:x.pageIndex,pageSize:e}):m({[c]:e!==x.pageSize?l.Ej:x.pageIndex,[d]:e})},resetPagination:()=>{p?g({pageIndex:l.Ej,pageSize:o}):m({[c]:l.Ej,[d]:o})},nextPage:()=>{p?g(e=>({...e,pageIndex:e.pageIndex+1})):m(e=>({[c]:e[c]+1,[d]:e[d]}))},previousPage:()=>{p?g(e=>({...e,pageIndex:e.pageIndex-1})):m(e=>({[c]:e[c]-1,[d]:e[d]}))},pageSizeOptions:v,showSizeChanger:a}}},41337:function(e,n,t){"use strict";t.d(n,{AZ:function(){return g},Br:function(){return y},El:function(){return f},PT:function(){return h},hY:function(){return i}});var r,i,o=t(24246),s=t(98227),l=t(27378),u=t(88337),a=t(16394),c=t(9934),d=t.n(c),p=t(14746);(r=i||(i={})).CONNECTION="connection",r.SYSTEM="system",r.STATIC="static";let v=e=>{var n,t,r,i,o,s;return{kind:"connection",connectionType:e.connection_type,name:null!==(r=e.name)&&void 0!==r?r:null,key:null!==(i=e.key)&&void 0!==i?i:null,saasType:null!==(o=null===(n=e.saas_config)||void 0===n?void 0:n.type)&&void 0!==o?o:null,websiteUrl:null!==(s=null===(t=e.secrets)||void 0===t?void 0:t.url)&&void 0!==s?s:null}},f=e=>v(e),g=e=>v(e),h=e=>{var n;return{kind:"system",identifier:e.identifier,humanReadable:e.human_readable,encodedIcon:null!==(n=e.encoded_icon)&&void 0!==n?n:null}},y=e=>({kind:"static",key:e}),m=e=>e===u.R.WEBSITE||e===u.R.TEST_WEBSITE,x=e=>{if(e)return p.LN.get(e)},S=e=>{if(!e)return;if(e.startsWith("data:")||e.startsWith("http"))return e;let n=e.endsWith(".svg")?e:"".concat(e,".svg");return p.Ny+n},j=(e,n)=>{if("system"===e.kind){if(e.encodedIcon)return"data:image/svg+xml;base64,".concat(e.encodedIcon);let n=[...p.iW].find(n=>{let[t]=n;return t.toLowerCase()===e.identifier.toLowerCase()});return n?p.Ny+n[1]:void 0}if("connection"===e.kind){if(m(e.connectionType)){if(!e.websiteUrl)return;let t=(0,a.ge)(e.websiteUrl);return(0,a.Ms)(t,(null!=n?n:32)*2)}if(e.connectionType===u.R.SAAS){let n=x(e.saasType);if(n)return p.Ny+n}let t=p.iW.get(e.connectionType);return t?p.Ny+t:void 0}if(e.key)return S(e.key)},I=e=>{if("connection"===e.kind){var n,t;return null!==(t=null!==(n=e.name)&&void 0!==n?n:e.key)&&void 0!==t?t:"connection"}return"system"===e.kind?e.humanReadable:e.key||"connection"},k=(e,n)=>"connection"===e.kind&&m(e.connectionType)?(0,o.jsx)(s.PJP.huD,{size:n}):(0,o.jsx)(s.PJP.ehp,{size:n});n.ZP=e=>{let{data:n,size:t,...r}=e,i=(0,l.useMemo)(()=>j(n,t),[n,t]),u=(0,l.useMemo)(()=>k(n,null!=t?t:32),[n,t]),a=(0,l.useMemo)(()=>I(n),[n]);return n?(0,o.jsx)(s.t3Z,{shape:"square",src:i,size:null!=t?t:32,icon:u,alt:a,...r,className:r.className?"".concat(r.className," ").concat(d().connectionTypeLogo):d().connectionTypeLogo}):null}},9934:function(e){e.exports={connectionTypeLogo:"ConnectionTypeLogo_connectionTypeLogo__dOKpm"}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7245],{17245:function(e,n,t){"use strict";t.d(n,{HK:function(){return s},VY:function(){return i.V},pI:function(){return d},h0:function(){return r.h},Rx:function(){return f},rK:function(){return h}});var r=t(36866),i=t(84306),o=t(812);let s=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:n=>{let t="An unexpected error occurred. Please try again.";(0,o.Ot)(n)?t=n.data.detail:(0,o.tB)(n)&&(t=n.data.detail[0].msg),e(t)}}};var l=t(27378),u=t(20682),a=t(41337),c=t(65735);let d=e=>{let{data:n}=(0,u.$I)({}),t=(0,l.useMemo)(()=>(null==n?void 0:n.items)||[],[n]);return(0,l.useMemo)(()=>{var n;if(!e)return(0,a.Br)("");if(e.connection_type===c.Rj.SAAS&&(null===(n=e.saas_config)||void 0===n?void 0:n.type)){let n=t.find(n=>{var t;return n.identifier===(null===(t=e.saas_config)||void 0===t?void 0:t.type)});if(n)return(0,a.PT)(n)}return(0,a.El)(e)},[e,t])};var p=t(40431);let v=()=>({search:p.Oi.withDefault("")}),f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:n,onSearchChange:t,disableUrlState:r=!1}=e,[i,o]=(0,l.useState)({searchQuery:n||void 0}),s=(0,l.useMemo)(()=>r?null:v(),[r]),[u,a]=(0,p.XI)(null!=s?s:{},{history:"push"}),c=(0,l.useMemo)(()=>r?i:{searchQuery:u.search||n||void 0},[r,i,u,n]),d=(0,l.useCallback)(e=>{r?o({searchQuery:e||void 0}):a({search:e||null})},[r,a]),f=(0,l.useCallback)(()=>{r?o({searchQuery:n||void 0}):a({search:null})},[r,n,a]);return(0,l.useEffect)(()=>{t&&t(c)},[c,t]),{...c,updateSearch:d,resetSearch:f,searchProps:{value:c.searchQuery||"",onChange:d,onClear:()=>d("")}}},g=e=>({sortKey:e?(0,p.jx)([...e]):p.Oi.withDefault(""),sortOrder:(0,p.km)(["ascend","descend"])}),h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:n,defaultSortOrder:t,onSortingChange:r,validColumns:i,disableUrlState:o=!1}=e,[s,u]=(0,l.useState)({sortKey:n,sortOrder:t}),a=(0,l.useMemo)(()=>o?null:g(i),[o,i]),[c,d]=(0,p.XI)(null!=a?a:{},{history:"push"}),v=(0,l.useMemo)(()=>{var e;return o?s:{sortKey:c.sortKey||n,sortOrder:null!==(e=c.sortOrder)&&void 0!==e?e:t}},[o,s,c,n,t]),f=(0,l.useCallback)((e,n)=>{o?u({sortKey:e,sortOrder:n}):d({sortKey:e?String(e):null,sortOrder:null!=n?n:null})},[o,d]),h=(0,l.useCallback)(()=>{o?u({sortKey:n,sortOrder:t}):d({sortKey:null,sortOrder:null})},[o,n,t,d]);return(0,l.useEffect)(()=>{r&&r(v)},[v,r]),{...v,updateSorting:f,resetSorting:h,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:v.sortOrder,sortedInfo:v.sortKey?{field:v.sortKey,order:v.sortOrder}:void 0}}}},84306:function(e,n,t){"use strict";t.d(n,{V:function(){return o}});var r=t(24246),i=t(98227);let o=()=>{let e=(0,i.pmc)();return{errorAlert:(n,t,o)=>{let s={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[t&&(0,r.jsx)(i.CdC,{children:t}),(0,r.jsx)(i.XaZ,{children:n})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,s):e(s)},successAlert:(n,t,o)=>{let s={...o,position:(null==o?void 0:o.position)||"top",render:e=>{let{onClose:o}=e;return(0,r.jsxs)(i.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,r.jsx)(i.zMQ,{}),(0,r.jsxs)(i.xuv,{children:[t&&(0,r.jsx)(i.CdC,{children:t}),(0,r.jsx)(i.XaZ,{children:n})]}),(0,r.jsx)(i.PZ7,{onClick:o,position:"relative",right:0,size:"sm",top:-1})]})}};(null==o?void 0:o.id)&&e.isActive(o.id)?e.update(o.id,s):e(s)}}}},36866:function(e,n,t){"use strict";t.d(n,{h:function(){return a}});var r=t(40431),i=t(27378),o=t(55484);let s=(0,r.jo)({parse(e){let n=parseInt(e,10);try{return o.Rx().integer().positive().validateSync(n),n}catch(e){return null}},serialize:e=>e.toString()});var l=t(32735);let u=function(){var e,n;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.pageQueryKey||"page",o=t.sizeQueryKey||"size";return{[i]:s.withDefault(l.Ej),[o]:t.pageSizeOptions?(0,r.bJ)(t.pageSizeOptions).withDefault(null!==(e=t.pageSize)&&void 0!==e?e:l.L8):s.withDefault(null!==(n=t.pageSize)&&void 0!==n?n:l.L8)}},a=function(){var e,n;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:o=l.L8,pageSizeOptions:s,showSizeChanger:a=!0,pageQueryKey:c="page",sizeQueryKey:d="size",disableUrlState:p=!1}=t,v=null!=s?s:l.VZ,[f,g]=(0,i.useState)({pageIndex:l.Ej,pageSize:o}),h=(0,i.useMemo)(()=>p?null:u({pageSize:o,pageSizeOptions:s,pageQueryKey:c,sizeQueryKey:d}),[o,s,c,d,p]),[y,m]=(0,r.XI)(null!=h?h:{},{history:"push"}),x=p?f:{pageIndex:null!==(e=y[c])&&void 0!==e?e:l.Ej,pageSize:null!==(n=y[d])&&void 0!==n?n:o},S=(0,i.useCallback)(()=>{p?g({pageIndex:l.Ej,pageSize:o}):m({[c]:l.Ej,[d]:o})},[p,o,c,d,m,g]);return{...x,updatePageIndex:e=>{p?g(n=>({...n,pageIndex:e})):m({[c]:e})},updatePageSize:e=>{p?g({pageIndex:e!==x.pageSize?l.Ej:x.pageIndex,pageSize:e}):m({[c]:e!==x.pageSize?l.Ej:x.pageIndex,[d]:e})},resetPagination:S,nextPage:()=>{p?g(e=>({...e,pageIndex:e.pageIndex+1})):m(e=>({[c]:e[c]+1,[d]:e[d]}))},previousPage:()=>{p?g(e=>({...e,pageIndex:e.pageIndex-1})):m(e=>({[c]:e[c]-1,[d]:e[d]}))},pageSizeOptions:v,showSizeChanger:a}}},41337:function(e,n,t){"use strict";t.d(n,{AZ:function(){return g},Br:function(){return y},El:function(){return f},PT:function(){return h},hY:function(){return i}});var r,i,o=t(24246),s=t(98227),l=t(27378),u=t(88337),a=t(16394),c=t(9934),d=t.n(c),p=t(14746);(r=i||(i={})).CONNECTION="connection",r.SYSTEM="system",r.STATIC="static";let v=e=>{var n,t,r,i,o,s;return{kind:"connection",connectionType:e.connection_type,name:null!==(r=e.name)&&void 0!==r?r:null,key:null!==(i=e.key)&&void 0!==i?i:null,saasType:null!==(o=null===(n=e.saas_config)||void 0===n?void 0:n.type)&&void 0!==o?o:null,websiteUrl:null!==(s=null===(t=e.secrets)||void 0===t?void 0:t.url)&&void 0!==s?s:null}},f=e=>v(e),g=e=>v(e),h=e=>{var n;return{kind:"system",identifier:e.identifier,humanReadable:e.human_readable,encodedIcon:null!==(n=e.encoded_icon)&&void 0!==n?n:null}},y=e=>({kind:"static",key:e}),m=e=>e===u.R.WEBSITE||e===u.R.TEST_WEBSITE,x=e=>{if(e)return p.LN.get(e)},S=e=>{if(!e)return;if(e.startsWith("data:")||e.startsWith("http"))return e;let n=e.endsWith(".svg")?e:"".concat(e,".svg");return p.Ny+n},j=(e,n)=>{if("system"===e.kind){if(e.encodedIcon)return"data:image/svg+xml;base64,".concat(e.encodedIcon);let n=[...p.iW].find(n=>{let[t]=n;return t.toLowerCase()===e.identifier.toLowerCase()});return n?p.Ny+n[1]:void 0}if("connection"===e.kind){if(m(e.connectionType)){if(!e.websiteUrl)return;let t=(0,a.ge)(e.websiteUrl);return(0,a.Ms)(t,(null!=n?n:32)*2)}if(e.connectionType===u.R.SAAS){let n=x(e.saasType);if(n)return p.Ny+n}let t=p.iW.get(e.connectionType);return t?p.Ny+t:void 0}if(e.key)return S(e.key)},I=e=>{if("connection"===e.kind){var n,t;return null!==(t=null!==(n=e.name)&&void 0!==n?n:e.key)&&void 0!==t?t:"connection"}return"system"===e.kind?e.humanReadable:e.key||"connection"},k=(e,n)=>"connection"===e.kind&&m(e.connectionType)?(0,o.jsx)(s.PJP.huD,{size:n}):(0,o.jsx)(s.PJP.ehp,{size:n});n.ZP=e=>{let{data:n,size:t,...r}=e,i=(0,l.useMemo)(()=>j(n,t),[n,t]),u=(0,l.useMemo)(()=>k(n,null!=t?t:32),[n,t]),a=(0,l.useMemo)(()=>I(n),[n]);return n?(0,o.jsx)(s.t3Z,{shape:"square",src:i,size:null!=t?t:32,icon:u,alt:a,...r,className:r.className?"".concat(r.className," ").concat(d().connectionTypeLogo):d().connectionTypeLogo}):null}},9934:function(e){e.exports={connectionTypeLogo:"ConnectionTypeLogo_connectionTypeLogo__dOKpm"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7654],{56141:function(e,t,s){var i=s(32866);e.exports=function(e,t){return i(e,t)}},35287:function(e,t,s){"use strict";var i=s(24246),a=s(98227),l=s(88038),n=s.n(l);s(27378),t.Z=e=>{let{children:t,title:s,fullHeight:l,fullWidth:r,mainProps:d}=e;return(0,i.jsxs)(a.kCb,{"data-testid":s,direction:"column",height:l?"100vh":"calc(100vh - 48px)",width:r?"100vw":"calc(100vw - 240px)",children:[(0,i.jsxs)(n(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(a.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...d,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),a=s(98227);t.Z=e=>{let{title:t,text:s,onClose:l}=e;return(0,i.jsxs)(a.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[l&&(0,i.jsx)(a.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:l}),(0,i.jsx)(a.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(a.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(a.X6q,{fontSize:"md",children:t}),(0,i.jsx)(a.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return o}});var i=s(24246),a=s(98227),l=s(34090),n=s(27378),r=s(46238),d=s(40324);let o=e=>{let{name:t,label:s,labelProps:o,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[h,y,{setValue:v}]=(0,l.U$)(t),j=!!(y.touched&&y.error),[f,_]=(0,n.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let g="tags"===x.mode?(e,t)=>e?e.value!==f||h.value.includes(f)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(f,'"'):void 0:x.optionRender||void 0,b=e=>{_(e),x.onSearch&&x.onSearch(e)},q=(e,t)=>{v(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,i.jsx)(a.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(a.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:s}):null,(0,i.jsxs)(a.jqI,{align:"center",children:[(0,i.jsxs)(a.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(a.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:g,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(a.Q6r,{children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(r.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(a.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(a.gCW,{alignItems:"start",children:[(0,i.jsxs)(a.jqI,{align:"center",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:s}):null,(0,i.jsx)(r.b,{label:c})]}),(0,i.jsx)(a.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:g,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(a.Q6r,{style:{marginTop:0},children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},9270:function(e,t,s){"use strict";s.d(t,{S:function(){return l}});var i=s(27378),a=s(36866);let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,a.h)(e),{pageIndex:s,pageSize:l,updatePageIndex:n,updatePageSize:r,pageSizeOptions:d,showSizeChanger:o}=t,c=(0,i.useMemo)(()=>({current:s,pageSize:l,showSizeChanger:o,pageSizeOptions:d.map(String),onChange:n,onShowSizeChange:(e,t)=>{r(t)}}),[s,l,o,d,n,r]);return{...t,paginationProps:c}}},28686:function(e,t,s){"use strict";s.d(t,{m:function(){return I}});var i=s(24246),a=s(98227),l=s(56141),n=s.n(l),r=s(86677),d=s(27378),o=s(16134),c=s(91317),u=s(18225),p=s(77830),m=s(19904),x=s(28407),h=s(16394),y=s(65735),v=s(32735),j=s(59969),f=s(71784),_=s(45116);let g=e=>{let{label:t,children:s}=e;return(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("div",{className:"shrink-0 grow-0 basis-1/3 pr-2",children:(0,i.jsxs)(a.AntTypography.Text,{className:"text-gray-700",children:[t,":"]})}),(0,i.jsx)("div",{className:"min-w-0 shrink grow text-gray-600",children:s})]})},b=e=>{let{task:t}=e,s=t.request_type===y.k6.ACCESS?y.Us.ACCESS:y.Us.ERASURE,l=f.rE.get(s)||t.request_type;return(0,i.jsxs)("div",{className:"flex flex-col space-y-3","data-testid":"task-details-container",children:[(0,i.jsx)(g,{label:"Name",children:(0,i.jsx)(a.AntTypography.Text,{children:t.name})}),(0,i.jsx)(g,{label:"Description",children:(0,i.jsx)(a.AntTypography.Text,{children:t.description||"-"})}),(0,i.jsx)(g,{label:"Request Type",children:(0,i.jsx)(a.AntTypography.Text,{children:l})}),(0,i.jsx)(g,{label:"Assigned To",children:t.assigned_users&&t.assigned_users.length>0?(0,i.jsx)("div",{className:"flex flex-wrap gap-1","data-testid":"assigned-users-tags",children:t.assigned_users.map(e=>(0,i.jsx)(a.j8w,{"data-testid":"assigned-user-tag-".concat(e.id),children:"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email_address||"Unknown User"},e.id))}):(0,i.jsx)(a.AntTypography.Text,{children:"No one assigned"})}),t.privacy_request.subject_identities&&Object.keys(t.privacy_request.subject_identities).length>0?(0,i.jsx)(g,{label:"Subject identities",children:(0,i.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.subject_identities).map(e=>{let[t,s]=e;return(0,i.jsxs)(a.j8w,{children:[t,": ",String(s)]},t)})})}):null,t.privacy_request.custom_fields&&Object.keys(t.privacy_request.custom_fields).length>0?(0,i.jsx)(g,{label:"Custom fields",children:(0,i.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.custom_fields).filter(e=>{let[,t]=e;return t}).map(e=>{let[t,s]=e;return(0,i.jsxs)(a.j8w,{children:[t,": ",String(s)]},t)})})}):null]})},q=e=>{let{isOpen:t,onClose:s,task:l}=e,[n,{isLoading:r}]=(0,_.HP)(),[o,c]=(0,d.useState)(""),[u,p]=(0,d.useState)(!1),[m,x]=(0,d.useState)(""),[h,v]=(0,d.useState)([]),j=async()=>{try{await n({privacy_request_id:l.privacy_request.id,manual_field_id:l.manual_field_id,field_value:l.input_type===y.PF.TEXT?o:l.input_type===y.PF.CHECKBOX?u.toString():void 0,comment_text:m||void 0,attachments:h.length>0?h.map(e=>e.originFileObj).filter(Boolean):void 0}).unwrap(),c(""),p(!1),x(""),v([]),s()}catch(e){a.Pg3.error("Failed to complete task. Please try again.")}};return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{maxWidth:"700px","data-testid":"complete-task-modal",children:[(0,i.jsx)(a.xBx,{children:(0,i.jsx)(a.AntTypography.Title,{level:4,children:"Complete Task"})}),(0,i.jsx)(a.fef,{children:(0,i.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,i.jsx)("div",{children:(0,i.jsx)(b,{task:l})}),(0,i.jsx)(a.htM,{}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"flex flex-col space-y-4",children:[(()=>{switch(l.input_type){case y.PF.TEXT:return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Subject data"}),(0,i.jsx)(a.AntInput.TextArea,{value:o,onChange:e=>c(e.target.value),placeholder:"Enter your response...",rows:4,"data-testid":"complete-modal-text-input"})]});case y.PF.CHECKBOX:return(0,i.jsx)("div",{className:"space-y-2",children:(0,i.jsx)(a.E_O,{checked:u,onChange:e=>p(e.target.checked),"data-testid":"complete-modal-checkbox",children:"The task has been completed"})});default:return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Upload Files"}),(0,i.jsx)("div",{children:(0,i.jsx)(a.pMK,{fileList:h,onChange:e=>{let{fileList:t}=e;return v(t)},beforeUpload:()=>!1,"data-testid":"complete-modal-file-upload",multiple:!0,children:(0,i.jsx)(a.wpx,{"data-testid":"complete-modal-upload-button",children:"Click to Upload"})})})]})}})(),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Internal comment"}),(0,i.jsx)(a.AntInput.TextArea,{value:m,onChange:e=>x(e.target.value),placeholder:"Add any additional comments...",rows:3,"data-testid":"complete-modal-comment-input"})]})]})})]})}),(0,i.jsx)(a.mzw,{children:(0,i.jsxs)(a.vyj,{children:[(0,i.jsx)(a.wpx,{onClick:()=>{c(""),p(!1),x(""),v([]),s()},disabled:r,"data-testid":"complete-modal-cancel-button",children:"Cancel"}),(0,i.jsx)(a.wpx,{type:"primary",onClick:j,loading:r,disabled:!(()=>{switch(l.input_type){case y.PF.TEXT:return o.trim().length>0;case y.PF.CHECKBOX:return u;default:return h.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},C=e=>{let{isOpen:t,onClose:s,task:l}=e,[n,{isLoading:r}]=(0,_.DA)(),[o,c]=(0,d.useState)(""),u=async()=>{try{await n({privacy_request_id:l.privacy_request.id,manual_field_id:l.manual_field_id,skip_reason:o}).unwrap(),c(""),s()}catch(e){a.Pg3.error("Failed to skip task. Please try again.")}};return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{maxWidth:"700px","data-testid":"skip-task-modal",children:[(0,i.jsx)(a.xBx,{children:(0,i.jsx)(a.AntTypography.Title,{level:4,children:"Skip Task"})}),(0,i.jsx)(a.fef,{children:(0,i.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,i.jsx)("div",{children:(0,i.jsx)(b,{task:l})}),(0,i.jsx)(a.htM,{}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"flex flex-col space-y-4",children:(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Reason for skipping (Required)"}),(0,i.jsx)(a.AntInput.TextArea,{value:o,onChange:e=>c(e.target.value),placeholder:"Please provide a reason for skipping this task...",rows:4,"data-testid":"skip-modal-comment-input"})]})})})]})}),(0,i.jsx)(a.mzw,{children:(0,i.jsxs)(a.vyj,{children:[(0,i.jsx)(a.wpx,{onClick:()=>{c(""),s()},disabled:r,"data-testid":"skip-modal-cancel-button",children:"Cancel"}),(0,i.jsx)(a.wpx,{type:"primary",onClick:u,loading:r,disabled:!o.trim(),danger:!0,"data-testid":"skip-modal-skip-button",children:"Skip Task"})]})})]})]})},k=e=>{let{task:t}=e,s=(0,r.useRouter)(),{isOpen:l,onOpen:n,onClose:d}=(0,a.qY0)(),{isOpen:o,onOpen:c,onClose:u}=(0,a.qY0)(),x=(0,m.Tg)([y.Sh.PRIVACY_REQUEST_READ]);if(t.status!==y.OS.NEW)return null;let h=[{key:"skip",label:"Skip task",onClick:c}];return x&&h.push({key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:p.ld,query:{id:t.privacy_request.id}})}}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.vyj,{size:"small",children:[(0,i.jsx)(a.wpx,{type:"default",onClick:n,size:"small",children:"Complete"}),(0,i.jsx)(a.S0p,{menu:{items:h},trigger:["click"],placement:"bottomRight",overlayStyle:{minWidth:120},children:(0,i.jsx)(a.wpx,{size:"small",icon:(0,i.jsx)(a.PJP.r43,{}),"aria-label":"More actions"})})]}),(0,i.jsx)(q,{isOpen:l,onClose:d,task:t}),(0,i.jsx)(C,{isOpen:o,onClose:u,task:t})]})},S={[y.OS.NEW]:{color:a.tAb.INFO,label:"New"},[y.OS.COMPLETED]:{color:a.tAb.SUCCESS,label:"Completed"},[y.OS.SKIPPED]:{color:a.tAb.MARBLE,label:"Skipped"}},E=[{text:"New",value:y.OS.NEW},{text:"Completed",value:y.OS.COMPLETED},{text:"Skipped",value:y.OS.SKIPPED}],w=[{text:"Access",value:y.k6.ACCESS},{text:"Erasure",value:y.k6.ERASURE}],R=e=>{let{systemFilters:t,userFilters:s,onUserClick:l,currentFilters:n,hasAccessToAllTasks:r}=e,d=[{title:"Task name",dataIndex:"name",key:"name",minWidth:100,render:e=>(0,i.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:e},children:e})},{title:"Status",dataIndex:"status",key:"status",width:110,render:e=>(0,i.jsx)(a.j8w,{color:S[e].color,"data-testid":"manual-task-status-tag",children:S[e].label}),filters:E,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",minWidth:100,render:e=>(0,i.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:e},children:e}),filters:t,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:80,render:e=>{let t=e===y.k6.ACCESS?y.Us.ACCESS:y.Us.ERASURE,s=f.rE.get(t)||e;return(0,i.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:s},children:s})},filters:w,filterMultiple:!1},{title:"Assigned to",dataIndex:"assigned_users",key:"assigned_users",minWidth:100,render:e=>{if(!e||0===e.length)return(0,i.jsx)(a.AntTypography.Text,{children:"-"});let t=e.map(e=>({label:(0,h.gJ)(e),value:e.id})),s=e.map(e=>e.id);return(0,i.jsx)(a.d3V,{value:s,options:t,readonly:!0,onTagClick:e=>l(String(e))})},filters:s,filterMultiple:!1,defaultFilteredValue:n.assignedUsers?[n.assignedUsers]:void 0},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:90,render:e=>(0,i.jsx)(j.Z,{daysLeft:e||0,includeText:!1,status:y.q2.PENDING})},{title:"Subject identity",dataIndex:["privacy_request","subject_identities"],key:"subject_identities",minWidth:120,render:e=>{if(!e)return(0,i.jsx)(a.AntTypography.Text,{children:"-"});let t=e.email||e.phone_number||"";return(0,i.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:t},children:t})}},{title:"Actions",key:"actions",width:145,render:(e,t)=>(0,i.jsx)(k,{task:t})}];return r?d:d.filter(e=>"assigned_users"!==e.key)};var A=s(812),T=()=>{let e=(0,a.pmc)(),[t,{isFetching:s}]=(0,_.zp)();return{downloadReport:async s=>{let i=await t(s);if(i.isError)e({status:"error",description:(0,A.e$)(i.error,"A problem occurred while generating your manual tasks report. Please try again.")});else{let t=document.createElement("a"),s=new Blob([i.data],{type:"text/csv"}),a=window.URL.createObjectURL(s);t.href=a,t.download="manual-tasks-report.csv",t.click(),t.remove(),window.URL.revokeObjectURL(a),e({status:"success",description:"Successfully downloaded Manual Tasks report."})}},isDownloadingReport:s}};let I=()=>{let e=(0,r.useRouter)(),t=(0,o.C)(c.dy),[s,l]=(0,d.useState)(1),[j,f]=(0,d.useState)(25),g=(0,m.Tg)([y.Sh.MANUAL_FIELD_READ_ALL]),b=e.query.privacy_request_id||void 0,q=(0,d.useMemo)(()=>{let e={};return(null==t?void 0:t.id)&&!b&&(e.assignedUsers=t.id),b&&"string"==typeof b&&(e.privacyRequestId=b),e},[null==t?void 0:t.id,b]),[C,k]=(0,d.useState)(q),{data:S,isLoading:E,isFetching:w}=(0,_.Ym)({page:s,size:j,status:C.status,system_name:C.systemName,request_type:C.requestType,assigned_user_id:C.assignedUsers,privacy_request_id:C.privacyRequestId}),{downloadReport:A,isDownloadingReport:I}=T(),N=async()=>{await A({status:C.status,system_name:C.systemName,request_type:C.requestType,assigned_user_id:C.assignedUsers,privacy_request_id:C.privacyRequestId})},{data:P}=(0,_.Ym)({page:1,size:1}),{items:O,total:U}=(0,d.useMemo)(()=>S||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[S]),D=(0,d.useMemo)(()=>(null==P?void 0:P.filter_options)||{assigned_users:[],systems:[]},[P]),z=R({systemFilters:(0,d.useMemo)(()=>{var e;return(null==D?void 0:null===(e=D.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==D?void 0:D.systems]),userFilters:(0,d.useMemo)(()=>{var e;let s=(null==D?void 0:null===(e=D.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,h.gJ)(e),value:e.id})))||[];return(null==t?void 0:t.id)&&!s.some(e=>e.value===t.id)&&s.push({text:(0,h.gJ)(t,{fallbackToId:!0}),value:t.id}),s},[null==D?void 0:D.assigned_users,t]),onUserClick:t=>{e.push({pathname:p.fw,query:{id:t}})},currentFilters:C,hasAccessToAllTasks:g}),F=(0,d.useMemo)(()=>n()(C,q),[C,q]);return E?(0,i.jsx)(u.Z,{}):(0,i.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,i.jsxs)(a.kCb,{gap:3,align:"center",justify:"space-between",className:"mb-4",children:[(0,i.jsx)(x.H,{globalFilter:C.privacyRequestId||"",setGlobalFilter:e=>{let t={...C};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,k(t),l(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"}),(0,i.jsx)(a.wpx,{"aria-label":"Export manual tasks as CSV","data-testid":"export-manual-tasks-btn",icon:(0,i.jsx)(a.PJP.UWx,{}),loading:I,onClick:N})]}),(0,i.jsx)(a.V5H,{columns:z,dataSource:O,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:s,pageSize:j,pageSizeOptions:v.VZ,total:U||0,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{l(e),t!==j&&(f(t),l(1))}},onChange:(e,t)=>{let s={privacyRequestId:C.privacyRequestId};t.status&&([s.status]=t.status),t.system_name&&([s.systemName]=t.system_name),t.request_type&&([s.requestType]=t.request_type),t.assigned_users&&([s.assignedUsers]=t.assigned_users),k(s),l(1)},locale:{emptyText:F?(0,i.jsx)("div",{"data-testid":"empty-state-current-user",className:"my-4",children:(0,i.jsxs)(a.AntTypography.Paragraph,{children:["You have no tasks assigned."," ",g&&(0,i.jsx)("span",{children:'You can modify the "Assigned to" column filter to view tasks assigned to other users.'})]})}):(0,i.jsx)("div",{"data-testid":"empty-state",className:"my-4",children:"No results found."})},loading:E||w,scroll:{scrollToFirstRowOnChange:!0},tableLayout:"fixed",className:"[&_th]:!break-normal"})]})}},98855:function(e,t,s){"use strict";s.d(t,{q:function(){return m}});var i=s(24246),a=s(98227),l=s(58452),n=s(19904),r=s(7426),d=s(42478),o=s(66548),c=s(65735),u=s(57526),p=s(45489);let m=e=>{var t;let{subjectRequest:s,...m}=e,x=(0,a.qY0)(),h=(0,a.qY0)(),y=(0,a.qY0)(),v=(0,a.qY0)(),{handleApproveRequest:j,handleDenyRequest:f,handleDeleteRequest:_,handleFinalizeRequest:g,isLoading:b}=(0,p.Z)({subjectRequest:s}),{data:q}=(0,r.tB)({api_set:!1}),{data:C}=(0,d.JE)(),k=null==q?void 0:null===(t=q.notifications)||void 0===t?void 0:t.send_request_completion_notification;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Ugi,{...m,children:["pending"!==s.status?null:(0,i.jsx)(a.wpx,{title:"Approve","aria-label":"Approve",icon:(0,i.jsx)(a.PJP.MCw,{}),onClick:x.onOpen,loading:b,disabled:b,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==s.status?null:(0,i.jsx)(a.wpx,{title:"Deny","aria-label":"Deny",icon:(0,i.jsx)(a.PJP.x8P,{}),onClick:h.onOpen,loading:b,disabled:b,"data-testid":"privacy-request-deny-btn",size:"small"}),s.status!==c.q2.REQUIRES_MANUAL_FINALIZATION?null:(0,i.jsx)(n.ZP,{scopes:[c.Sh.PRIVACY_REQUEST_REVIEW],children:(0,i.jsx)(a.wpx,{title:"Finalize","aria-label":"Finalize",icon:(0,i.jsx)(a.PJP.Ok8,{}),onClick:v.onOpen,loading:b,disabled:b,"data-testid":"privacy-request-finalize-btn",size:"small"})}),(0,i.jsx)(n.ZP,{scopes:[c.Sh.PRIVACY_REQUEST_DELETE],children:(0,i.jsx)(a.wpx,{title:"Delete","aria-label":"Delete",icon:(0,i.jsx)(a.PJP.ZNm,{size:14}),onClick:y.onOpen,loading:b,disabled:b,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,i.jsx)(a.h_i,{children:(0,i.jsx)(u.Z,{isOpen:x.isOpen,isLoading:b,onClose:x.onClose,onApproveRequest:j,subjectRequest:s})}),(0,i.jsx)(a.h_i,{children:(0,i.jsx)(o.Z,{isOpen:h.isOpen,onClose:h.onClose,onDenyRequest:f})}),(0,i.jsx)(l.Z,{isOpen:y.isOpen,onClose:y.onClose,onConfirm:_,message:(0,i.jsx)(a.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})}),(0,i.jsx)(l.Z,{isOpen:v.isOpen,onClose:v.onClose,onConfirm:()=>{g(),v.onClose()},title:"Finalize privacy request",message:(0,i.jsxs)(a.xvT,{children:['You are about to finalize this privacy request. The status will be updated to "Complete"',k&&(null==C?void 0:C.service_type)?" and the requesting user will be notified":"",". Would you like to continue?"]})})]})}},86291:function(e,t,s){"use strict";s.d(t,{Z:function(){return S}});var i=s(24246),a=s(98227),l=s(27378),n=s(812),r=s(87361),d=s(46628),o=s(32885),c=s(90867),u=s(34090),p=s(55484),m=s(40324);let x=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),h=e=>{var t,s;if(!e)return p.Ry().shape({policy_key:p.Z_().required().label("Request type")});let i=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).filter(e=>{let[,t]=e;return"field_type"in t&&"location"!==t.field_type}).map(e=>{let[t,s]=e;return{[t]:p.Ry().shape({value:s.required&&!s.hidden?p.Z_().required().label(s.label):p.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return p.Ry().shape({policy_key:p.Z_().required().label("Request type"),identity:p.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?p.Z_().email().required().label("Email address"):p.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?p.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):p.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:p.Ry().shape(i)})};var y=s(97181);let v={is_verified:!1,policy_key:"",identity:{}},j=e=>{let{identityInputs:t}=e;return t?(0,i.jsxs)(i.Fragment,{children:[t.email?(0,i.jsx)(m.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,i.jsx)(m.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},f=e=>{var t;let{label:s,required:l,name:n}=e,[r,d,o]=(0,u.U$)(e),c=!!(d.touched&&d.error),{setValue:p}=o,{value:m}={...r,value:null!==(t=r.value)&&void 0!==t?t:""};return(0,i.jsx)(a.PPS.Item,{label:s,name:n,required:null!=l?l:void 0,layout:"vertical",validateStatus:c?"error":void 0,children:(0,i.jsx)(a.AOh,{value:m,onChange:e=>{e&&p(e)}},n)})},_=e=>{let{customFieldInputs:t}=e;if(!t)return null;let s=Object.entries(t);return(0,i.jsx)(i.Fragment,{children:s.map(e=>{let[t,s]=e;return"field_type"in s&&"location"===s.field_type?(0,i.jsx)(f,{name:t,label:s.label,required:!!s.required},t):(0,i.jsx)(m.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},g=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:l}=e,{onCopy:n}=(0,a.VPI)(""),r=(0,a.pmc)();return(0,i.jsx)(u.J9,{initialValues:{identity:{email:""}},onSubmit:e=>{n("".concat(l,"?email=").concat(encodeURIComponent(e.identity.email))),t(e),r({status:"success",description:"DSR Link Copied!"})},validationSchema:()=>p.Ry().shape({identity:p.Ry().shape({email:p.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:l}=e;return(0,i.jsx)(u.l0,{children:(0,i.jsxs)(a.Kqy,{spacing:6,mb:2,children:[(0,i.jsx)(j,{identityInputs:{email:"required"}}),(0,i.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,i.jsx)(a.wpx,{onClick:s,children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!t||!l,"data-testid":"submit-btn",icon:(0,i.jsx)(a.xPt,{}),children:"Copy"})]})]})})}})};var b=e=>{let{onSubmit:t,onCancel:s}=e,{data:l}=(0,c.xv)();return(0,i.jsx)(u.J9,{initialValues:v,onSubmit:t,validationSchema:()=>(0,p.Vo)(e=>h(x(e.policy_key,null==l?void 0:l.actions))),children:e=>{var t;let{values:n,dirty:r,isValid:d,isSubmitting:o,setFieldValue:c}=e,p=x(n.policy_key,null==l?void 0:l.actions);return(0,i.jsx)(u.l0,{children:(0,i.jsxs)(a.Kqy,{spacing:6,mb:2,children:[(0,i.jsx)(y.d,{name:"policy_key",label:"Request type",options:null!==(t=null==l?void 0:l.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=x(e,null==l?void 0:l.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){c("custom_privacy_request_fields",void 0);return}c("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:{label:s.label,value:s.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,i.jsx)(j,{identityInputs:null==p?void 0:p.identity_inputs}),(0,i.jsx)(_,{customFieldInputs:null==p?void 0:p.custom_privacy_request_fields}),(0,i.jsx)(m.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,i.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,i.jsx)(a.wpx,{onClick:s,children:"Cancel"}),(0,i.jsx)(a.wpx,{htmlType:"submit",type:"primary",disabled:!n.is_verified||!r||!d,loading:o,"data-testid":"submit-btn",children:"Create"})]})]})})}})},q=s(31883);let C=e=>{let{isOpen:t,onClose:s}=e,[l]=(0,c.M6)(),o=(0,a.pmc)(),u=async e=>{let{is_verified:t,...i}=e,a=i.custom_privacy_request_fields?Object.entries(i.custom_privacy_request_fields).map(e=>{let[t,s]=e;return s.value?{[t]:s}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,r={...i,custom_privacy_request_fields:a},c=await l([r]);(0,q.D4)(c)?o((0,d.Vo)((0,n.e$)(c.error,"An error occurred while creating this privacy request. Please try again"))):o((0,d.t5)("Privacy request created")),s()};return(0,i.jsxs)(a.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,i.jsx)(a.xBx,{children:"Create privacy request"}),(0,i.jsx)(a.fef,{children:(0,i.jsxs)(a.Kqy,{spacing:4,children:[(0,i.jsx)(r.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,i.jsx)(b,{onSubmit:u,onCancel:()=>s()})]})})]})]})},k=e=>{let{isOpen:t,onClose:s,privacyCenterUrl:l}=e;return(0,i.jsxs)(a.u_l,{size:"md",isOpen:t,onClose:s,children:[(0,i.jsx)(a.ZAr,{}),(0,i.jsxs)(a.hzk,{children:[(0,i.jsx)(a.xBx,{children:"Create a Privacy Request Link"}),(0,i.jsxs)(a.fef,{children:[(0,i.jsx)(a.Kqy,{spacing:4}),(0,i.jsx)(g,{privacyCenterUrl:l,onSubmit:s,onCancel:s})]})]})]})};var S=()=>{var e;let[t,s]=(0,l.useState)("closed"),n=()=>s("closed"),{data:r}=(0,o.Vh)(),d=(null!==(e=null==r?void 0:r.privacy_center_url)&&void 0!==e?e:"").trim(),c=d.length>0;return(0,i.jsxs)(i.Fragment,{children:[c?(0,i.jsx)(k,{isOpen:"create-link"===t,onClose:n,privacyCenterUrl:d}):null,(0,i.jsx)(C,{isOpen:"submit-request"===t,onClose:n}),(0,i.jsx)(a.S0p.Button,{type:"primary",onClick:()=>s("submit-request"),"data-testid":"submit-request-btn",menu:{items:[{label:"Create request link",key:"create-request-link",icon:(0,i.jsx)(a.xPt,{}),onClick:()=>s("create-link"),disabled:!c}]},icon:(0,i.jsx)(a.v4q,{}),children:"Create request"})]})}},71784:function(e,t,s){"use strict";s.d(t,{DE:function(){return r},I3:function(){return a},kN:function(){return n},rE:function(){return l}});var i=s(65735);let a=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"],[i.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,s]=e;return{label:s,value:t}}),l=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),n=[...l].map(e=>{let[t,s]=e;return{label:s,value:t}}),r={local:"local",s3:"s3",gcs:"gcs"}},88152:function(e,t,s){"use strict";s.d(t,{Y:function(){return o}});var i=s(24246),a=s(98227),l=s(27378),n=s(17245),r=s(65735),d=s(90867);let o=()=>{let{errorAlert:e}=(0,n.VY)(),[t,s]=(0,l.useState)(!1),[o,c]=(0,l.useState)({count:0,total:0}),[u,p]=(0,l.useState)(!0),m=r.q2.ERROR,{data:x}=(0,d.tE)(),{data:h}=(0,d.QA)({status:[m]},{pollingInterval:15e3,skip:u});return(0,l.useEffect)(()=>{p(!(x&&x.notify_after_failures>0))},[x]),(0,l.useEffect)(()=>{let e=(null==h?void 0:h.total)||0;e>=((null==x?void 0:x.notify_after_failures)||0)&&e>o.total?(c({count:e-o.total,total:e}),s(!0)):s(!1)},[null==h?void 0:h.total,null==x?void 0:x.notify_after_failures,o.total]),{processing:()=>{t&&e((0,i.jsxs)(a.xuv,{children:["DSR automation has failed for"," ",(0,i.jsx)(a.xvT,{as:"span",fontWeight:"semibold",children:o.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8939],{58754:function(e,t,i){"use strict";var n=i(24246),l=i(98227),a=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:o=!0,children:r,rightContent:s,style:d,...u}=e;return(0,n.jsxs)("div",{...u,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)(l.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(l.lQT,{className:i||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,s&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:s})]}),!!i&&(0,n.jsx)(a.m,{className:r?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),r]})}},79283:function(e,t,i){"use strict";i.d(t,{l:function(){return u}});var n=i(24246),l=i(98227),a=i(72707),o=i.n(a);let r=e=>{let{data:{formattedTitle:t,description:i,name:a,primaryName:o}}=e;return(0,n.jsxs)(l.jqI,{gap:12,title:"".concat(t," - ").concat(i),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:o||a}),o&&": ".concat(a)]}),(0,n.jsx)("em",{children:i})]})},s=e=>"options"in e&&Array.isArray(e.options),d=e=>({...e,className:o().option,formattedTitle:e.formattedTitle||[e.primaryName,e.name].filter(e=>e).join(": ")}),u=e=>{let{options:t,...i}=e,a=null==t?void 0:t.map(e=>s(e)?{...e,options:e.options.map(d)}:d(e));return(0,n.jsx)(l.WPr,{options:a,filterOption:(e,t)=>{var i,n;return(null==t?void 0:null===(i=t.formattedTitle)||void 0===i?void 0:i.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:null===(n=t.value)||void 0===n?void 0:n.toLowerCase().includes(e.toLowerCase()))||!1},optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:r,styles:{popup:{root:{minWidth:"500px"}}},className:"w-full p-0","data-testid":"taxonomy-select",...i})}},71248:function(e,t,i){"use strict";i.d(t,{A:function(){return s}});var n=i(24246),l=i(34090),a=i(46782),o=i(97181),r=i(40324);let s=e=>{var t,i;let{name:s,fieldSchema:d,isRequired:u,layout:c="stacked",secretsSchema:p,validate:v}=e,m=(null===(i=d.allOf)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.$ref)&&d.allOf[0].$ref!==a.j?null==p?void 0:p.definitions[d.allOf[0].$ref.replace("#/definitions/","")]:void 0,f=!!(null==m?void 0:m.enum)||d.options,g="boolean"===d.type,h=()=>{var e;if((null===(e=d.allOf)||void 0===e?void 0:e[0].$ref)===a.j)return"Enter dataset.collection.field"};return(0,n.jsx)(l.gN,{id:s,name:s,validate:v,children:e=>{let{field:t}=e;if(f){var i,l,a;let e=null!==(a=null==m?void 0:null===(i=m.enum)||void 0===i?void 0:i.map(e=>({label:e,value:e})))&&void 0!==a?a:null===(l=d.options)||void 0===l?void 0:l.map(e=>({label:e,value:e}));return(0,n.jsx)(o.d,{name:t.name,id:t.name,label:d.title,isRequired:u,tooltip:d.description,layout:c,options:e,mode:d.multiselect?"multiple":void 0},t.name)}return g?(0,n.jsx)(o.d,{name:t.name,id:t.name,label:d.title,isRequired:u,tooltip:d.description,layout:c,options:[{label:"False",value:"false"},{label:"True",value:"true"}]},t.name):(0,n.jsx)(r.j0,{...t,label:d.title,tooltip:d.description,isRequired:u,type:d.sensitive?"password":"text",placeholder:h(),autoComplete:"off",color:"gray.700",variant:c})}},s)}},46782:function(e,t,i){"use strict";i.d(t,{j:function(){return a},l:function(){return o}});var n=i(30454),l=i.n(n);let a="#/definitions/FidesDatasetReference",o=e=>{let t=(e,t,i)=>{let n;return(void 0===t||""===t||void 0===t)&&(n="".concat(e," is required")),i===a&&((null==t?void 0:t.includes("."))?t.split(".").length<3&&(n="Dataset reference must include at least three parts"):n="Dataset reference must be dot delimited"),n},i=t=>{var i,n;return null!==(n=null==e?void 0:null===(i=e.required)||void 0===i?void 0:i.includes(t))&&void 0!==n&&n};return{validateField:t,isRequiredField:i,getFieldValidation:(e,n)=>{if(i(e))return e=>{var i;return t(n.title,e,null===(i=n.allOf)||void 0===i?void 0:i[0].$ref)}},preprocessValues:t=>{let i=l()(t);return e&&Object.keys(e.properties).forEach(t=>{var n,l;if((null===(n=e.properties[t].allOf)||void 0===n?void 0:n[0].$ref)===a){let e=null===(l=i.secrets[t])||void 0===l?void 0:l.split(".");e&&(i.secrets[t]={dataset:e.shift(),field:e.join("."),direction:"from"})}"WebsiteSchema"!==e.title||"URL"!==e.properties[t].title||i.secrets[t].startsWith("http://")||i.secrets[t].startsWith("https://")||(i.secrets[t]="https://".concat(i.secrets[t])),"integer"===e.properties[t].type&&"string"==typeof i.secrets[t]&&""===i.secrets[t].trim()&&(i.secrets[t]=void 0)}),i}}}},34929:function(e,t,i){"use strict";var n=i(24246),l=i(64925),a=i.n(l),o=i(27378),r=i(16134),s=i(30002),d=i(28079),u=i(57072);let c=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,r.C)(d.U3),{isLoading:i}=(0,u.MO)(),n=(0,r.C)(u.qb),{isLoading:l}=(0,s.te)();return{dataUses:t,dataSubjects:(0,r.C)(s.ZL),dataCategories:n,isLoading:e||i||l}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:i,isLoading:l}=c(),r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},s=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=t(e);if(!n)return{};let l=t(r(e,i)),a=!!n.parent_key;return{name:n.name||void 0,primaryName:a&&(null==l?void 0:l.name)!==n.name&&(null==l?void 0:l.name)||void 0}},d=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:l,primaryName:a}=s(e,t,i);return l?a?(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)("strong",{children:[a,":"]})," ",l]},e):(0,n.jsx)("strong",{children:l},e):e},u=t=>a()(e,{fides_key:t}),p=e=>a()(t,{fides_key:e}),v=e=>a()(i,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:u,getDataUseDisplayName:e=>d(e,u,1),getDataUseDisplayNameProps:e=>s(e,u,1),getDataCategories:()=>t,getDataCategoryByKey:p,getDataCategoryDisplayName:e=>d(e,p,2),getDataCategoryDisplayNameProps:e=>s(e,p,2),getDataSubjects:()=>i,getDataSubjectByKey:v,getDataSubjectDisplayName:e=>{let t=v(e);return t?t.name:e},getPrimaryKey:r,isLoading:l}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var n=i(24246),l=i(98227),a=i(79894),o=i.n(a),r=i(27378);let{Text:s}=l.AntTypography,d=e=>{let{items:t,...i}=e,a=(0,r.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let a=i===t.length-1,r={...e},d=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,n.jsx)(s,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:r.title})),d)?r.title=(0,n.jsx)(l.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,n.jsx)(o(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,n.jsx)(l.zrq,{items:a,...i})}},19812:function(e,t,i){"use strict";i.d(t,{t:function(){return r}});var n=i(17245),l=i(14207),a=i(27378),o=i(41966);let r=e=>{var t,i,r;let{connectionConfig:s}=e,[d]=(0,l.S6)(),{data:u}=(0,l.Eg)(null!==(i=null==s?void 0:s.key)&&void 0!==i?i:""),c=null!==(r=null==u?void 0:null===(t=u.items)||void 0===t?void 0:t.map(e=>e.fides_key))&&void 0!==r?r:[],p=c.map(e=>({label:e,value:e})),{data:v}=(0,o.LH)({onlyUnlinkedDatasets:!0,minimal:!0}),m=(0,a.useMemo)(()=>{var e;return null!==(e=null==v?void 0:v.map(e=>({value:e.fides_key,label:"".concat(e.name," (").concat(e.fides_key,")")||0})))&&void 0!==e?e:[]},[v]),{errorAlert:f,successAlert:g}=(0,n.VY)();return{dropdownOptions:[...p,...m],initialDatasets:c,patchConnectionDatasetConfig:async function(e,t){var i,n,l;let{showSuccessAlert:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null!==(l=null===(i=e.dataset)||void 0===i?void 0:i.map(e=>({fides_key:e,ctl_dataset_fides_key:e})))&&void 0!==l?l:[],r=await d({connection_key:t,dataset_pairs:o}).unwrap();(null===(n=r.failed)||void 0===n?void 0:n.length)>0?f(r.failed[0].message):a&&g("Dataset successfully updated!")}}}},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9014],{56141:function(e,t,n){var r=n(32866);e.exports=function(e,t){return r(e,t)}},26607:function(e,t,n){"use strict";var r=n(27061);n(25123);var i=n(27378),s=i&&"object"==typeof i&&"default"in i?i:{default:i},o=void 0!==r&&r.env&&!0,u=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,i=t.optimizeForSpeed,s=void 0===i?o:i;c(u(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",c("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l=document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(c(u(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed){var n=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];c(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},t.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},t.cssRules=function(){var e=this;return this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,n){t&&c(u(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return n?i.insertBefore(r,n):i.appendChild(r),r},function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var a=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},h={};function d(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return h[r]||(h[r]="jsx-"+a(e+"-"+n)),h[r]}function f(e,t){var n=e+t;return h[n]||(h[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),h[n]}var p=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,i=t.optimizeForSpeed,s=void 0!==i&&i;this._sheet=r||new l({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),r&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,i=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var s=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=s,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return s.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var i=d(r,n);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return f(i,e)}):[f(i,t)]}}return{styleId:d(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var _=s.default.useInsertionEffect||s.default.useLayoutEffect,v=new p;function y(e){var t=v||i.useContext(m);return t&&_(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}y.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=y},13083:function(e,t,n){"use strict";e.exports=n(26607).style},25123:function(){},43218:function(e,t,n){e.exports=n(43530)},11055:function(e,t,n){"use strict";n.d(t,{M:function(){return h}});var r=n(24246),i=n(29427),s=n(27378),o=n(40976),u=n(18397),l=n(42308),c=n(25431),a=n(39556);let h=(0,s.forwardRef)(function({children:e,as:t="ul",axis:n="y",onReorder:h,values:p,...m},_){let v=(0,l.h)(()=>u.E[t]),y=[],S=(0,s.useRef)(!1);return(0,i.k)(!!p,"Reorder.Group must be provided a values prop"),(0,s.useEffect)(()=>{S.current=!1}),(0,r.jsx)(v,{...m,ref:_,ignoreStrict:!0,children:(0,r.jsx)(o.Y.Provider,{value:{axis:n,registerItem:(e,t)=>{let r=y.findIndex(t=>e===t.value);-1!==r?y[r].layout=t[n]:y.push({value:e,layout:t[n]}),y.sort(f)},updateOrder:(e,t,n)=>{if(S.current)return;let r=function(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(-1===i)return e;let s=r>0?1:-1,o=e[i+s];if(!o)return e;let u=e[i],l=o.layout,h=(0,a.t)(l.min,l.max,.5);return 1===s&&u.layout.max+n>h||-1===s&&u.layout.min+n<h?(0,c.uo)(e,i,i+s):e}(y,e,t,n);y!==r&&(S.current=!0,h(r.map(d).filter(e=>-1!==p.indexOf(e))))}},children:e})})});function d(e){return e.value}function f(e,t){return e.layout.min-t.layout.min}},7078:function(e,t,n){"use strict";n.d(t,{e:function(){return R}});var r=n(24246),i=n(29427),s=n(27378),o=n(40976),u=n(18397),l=n(42308),c=n(69222),a=n(67412);function h(e){let t=(0,l.h)(()=>(0,c.BX)(e)),{isStatic:n}=(0,s.useContext)(a._);if(n){let[,n]=(0,s.useState)(e);(0,s.useEffect)(()=>t.on("change",n),[])}return t}var d=n(13998);let f=e=>e&&"object"==typeof e&&e.mix,p=e=>f(e)?e.mix:void 0;var m=n(64306),_=n(95984);function v(e,t){let n=h(t()),r=()=>n.set(t());return r(),(0,m.L)(()=>{let t=()=>_.Wi.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,_.Pn)(r)}}),n}function y(e,t){let n=(0,l.h)(()=>[]);return v(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}var S=n(3522);function g(e,t=0){return(0,S.i)(e)?e:h(t)}let R=(0,s.forwardRef)(function({children:e,style:t={},value:n,as:a="li",onDrag:h,layout:f=!0,...m},_){let S=(0,l.h)(()=>u.E[a]),R=(0,s.useContext)(o.Y),x={x:g(t.x),y:g(t.y)},C=function(e,t,n,r){if("function"==typeof e)return function(e){c.S1.current=[],e();let t=v(c.S1.current,e);return c.S1.current=void 0,t}(e);let i="function"==typeof t?t:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],s=e[2+n],o=e[3+n],u=(0,d.s)(i,s,{mixer:p(s[0]),...o});return t?u(r):u}(t,void 0,void 0);return Array.isArray(e)?y(e,i):y([e],([e])=>i(e))}([x.x,x.y],([e,t])=>e||t?1:"unset");(0,i.k)(!!R,"Reorder.Item must be a child of Reorder.Group");let{axis:b,registerItem:F,updateOrder:j}=R;return(0,r.jsx)(S,{drag:b,...m,dragSnapToOrigin:!0,style:{...t,x:x.x,y:x.y,zIndex:C},layout:f,onDrag:(e,t)=>{let{velocity:r}=t;r[b]&&j(n,x[b].get(),r[b]),h&&h(e,t)},onLayoutMeasure:e=>F(n,e),ref:_,ignoreStrict:!0,children:e})})},40976:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});let r=(0,n(27378).createContext)(null)},47397:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(42308);class i{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}}let s=()=>new i;function o(){return(0,r.h)(s)}}}]);