ethyca-fides 2.71.1b1__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 (495) hide show
  1. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/METADATA +3 -2
  2. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/RECORD +377 -327
  3. fides/_version.py +3 -3
  4. fides/api/alembic/alembic.ini +5 -1
  5. fides/api/alembic/migrations/env.py +7 -1
  6. fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +68 -0
  7. fides/api/alembic/migrations/versions/65a1bc82ae09_adds_experience_config_for_delete_.py +53 -0
  8. fides/api/alembic/migrations/versions/7db29f9cd77b_create_new_sub_request_table.py +95 -0
  9. fides/api/alembic/migrations/versions/a55e12c2c2df_add_tagging_instructions_to_data_.py +29 -0
  10. fides/api/alembic/migrations/versions/b97e92b038d2_add_digest_execution_model.py +117 -0
  11. fides/api/alembic/migrations/versions/c09e76282dd1_add_privacy_request_duplication_cols.py +64 -0
  12. fides/api/alembic/migrations/versions/xx_2025_10_17_1603_5093e92e2a5a_add_consent_data_v3_to_the_database.py +72 -0
  13. fides/api/alembic/migrations/versions/xx_2025_10_27_1834_67f0f2f4748e_adding_identity_definition_model.py +45 -0
  14. fides/api/alembic/migrations/versions/xx_2025_10_29_1659_80d28dea3b6b_added_duplicate_group_table.py +79 -0
  15. fides/api/alembic/migrations/versions/xx_2025_11_05_0200_f1a2b3c4d5e6_create_staged_resource_error_table.py +82 -0
  16. fides/api/api/v1/endpoints/connection_endpoints.py +38 -45
  17. fides/api/api/v1/endpoints/generic_overrides.py +75 -6
  18. fides/api/api/v1/endpoints/privacy_request_endpoints.py +60 -6
  19. fides/api/api/v1/endpoints/saas_config_endpoints.py +60 -48
  20. fides/api/api/v1/endpoints/system.py +11 -43
  21. fides/api/api/v1/endpoints/user_endpoints.py +8 -1
  22. fides/api/app_setup.py +1 -3
  23. fides/api/common_exceptions.py +8 -0
  24. fides/api/db/base.py +2 -0
  25. fides/api/db/database.py +257 -2
  26. fides/api/email_templates/get_email_template.py +3 -0
  27. fides/api/email_templates/template_names.py +1 -0
  28. fides/api/email_templates/templates/manual_task_digest.html +316 -0
  29. fides/api/main.py +2 -2
  30. fides/api/models/attachment.py +1 -0
  31. fides/api/models/detection_discovery/__init__.py +2 -0
  32. fides/api/models/detection_discovery/core.py +10 -0
  33. fides/api/models/detection_discovery/monitor_task.py +1 -0
  34. fides/api/models/detection_discovery/staged_resource_error.py +25 -0
  35. fides/api/models/digest/__init__.py +2 -0
  36. fides/api/models/digest/digest_config.py +10 -1
  37. fides/api/models/digest/digest_execution.py +142 -0
  38. fides/api/models/event_audit.py +17 -0
  39. fides/api/models/identity_definition.py +65 -0
  40. fides/api/models/messaging_template.py +7 -0
  41. fides/api/models/privacy_experience.py +11 -0
  42. fides/api/models/privacy_preference.py +2 -0
  43. fides/api/models/privacy_request/duplicate_group.py +84 -0
  44. fides/api/models/privacy_request/privacy_request.py +56 -8
  45. fides/api/models/privacy_request/request_task.py +98 -1
  46. fides/api/models/sql_models.py +3 -0
  47. fides/api/models/taxonomy.py +14 -4
  48. fides/api/models/v3/__init__.py +0 -0
  49. fides/api/models/v3/privacy_preferences.py +85 -0
  50. fides/api/models/worker_task.py +8 -0
  51. fides/api/schemas/application_config.py +28 -0
  52. fides/api/schemas/connection_configuration/connection_config.py +1 -30
  53. fides/api/schemas/messaging/messaging.py +15 -0
  54. fides/api/schemas/privacy_request.py +17 -3
  55. fides/api/schemas/saas/async_polling_configuration.py +81 -0
  56. fides/api/schemas/saas/saas_config.py +10 -3
  57. fides/api/schemas/saas/strategy_configuration.py +0 -12
  58. fides/api/schemas/taxonomy_extensions.py +8 -0
  59. fides/api/service/async_dsr/handlers/__init__.py +0 -0
  60. fides/api/service/async_dsr/handlers/polling_attachment_handler.py +155 -0
  61. fides/api/service/async_dsr/handlers/polling_request_handler.py +88 -0
  62. fides/api/service/async_dsr/handlers/polling_response_handler.py +261 -0
  63. fides/api/service/async_dsr/handlers/polling_sub_request_handler.py +123 -0
  64. fides/api/service/async_dsr/strategies/__init__.py +0 -0
  65. fides/api/service/async_dsr/strategies/async_dsr_strategy.py +52 -0
  66. fides/api/service/async_dsr/strategies/async_dsr_strategy_callback.py +199 -0
  67. fides/api/service/async_dsr/strategies/async_dsr_strategy_factory.py +72 -0
  68. fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py +686 -0
  69. fides/api/service/async_dsr/utils.py +130 -0
  70. fides/api/service/connectors/bigquery_connector.py +34 -16
  71. fides/api/service/connectors/fides/fides_client.py +63 -1
  72. fides/api/service/connectors/query_configs/saas_query_config.py +160 -79
  73. fides/api/service/connectors/saas/connector_registry_service.py +1 -138
  74. fides/api/service/connectors/saas_connector.py +116 -94
  75. fides/api/service/connectors/sql_connector.py +14 -4
  76. fides/api/service/deps.py +8 -0
  77. fides/api/service/messaging/message_dispatch_service.py +38 -1
  78. fides/api/service/privacy_request/attachment_handling.py +9 -2
  79. fides/api/service/privacy_request/duplication_detection.py +424 -0
  80. fides/api/service/privacy_request/request_runner_service.py +46 -84
  81. fides/api/service/privacy_request/request_service.py +47 -74
  82. fides/api/service/saas_request/saas_request_override_factory.py +71 -1
  83. fides/api/task/execute_request_tasks.py +17 -9
  84. fides/api/task/filter_results.py +35 -2
  85. fides/api/task/graph_task.py +37 -8
  86. fides/api/tasks/__init__.py +0 -1
  87. fides/api/util/connection_util.py +99 -215
  88. fides/api/util/event_audit_util.py +230 -0
  89. fides/api/util/logger_context_utils.py +3 -1
  90. fides/api/util/masking_util.py +31 -0
  91. fides/api/util/memory_watchdog.py +118 -0
  92. fides/api/util/saas_config_updater.py +66 -0
  93. fides/api/util/saas_util.py +28 -1
  94. fides/common/api/scope_registry.py +0 -7
  95. fides/common/api/v1/urn_registry.py +2 -0
  96. fides/config/__init__.py +10 -1
  97. fides/config/celery_settings.py +42 -0
  98. fides/config/config_proxy.py +10 -0
  99. fides/config/duplicate_detection_settings.py +31 -0
  100. fides/config/execution_settings.py +7 -3
  101. fides/config/utils.py +5 -0
  102. fides/data/language/languages.yml +2 -0
  103. fides/service/connection/__init__.py +0 -0
  104. fides/service/connection/connection_service.py +651 -0
  105. fides/service/event_audit_service.py +16 -22
  106. fides/service/privacy_request/privacy_request_service.py +162 -43
  107. fides/service/taxonomy/handlers/legacy_handler.py +3 -3
  108. fides/service/taxonomy/taxonomy_service.py +15 -15
  109. fides/ui-build/static/admin/404.html +1 -1
  110. fides/ui-build/static/admin/_next/static/FZTEUgamBvOhgPWce135w/_buildManifest.js +1 -0
  111. fides/ui-build/static/admin/_next/static/chunks/{1115-90baef2a89f361ad.js → 1115-0da062111df309bf.js} +1 -1
  112. fides/ui-build/static/admin/_next/static/chunks/{6148-59a59d5c5925344f.js → 1533-84e250d1f26e6d7d.js} +1 -1
  113. fides/ui-build/static/admin/_next/static/chunks/1817-508b16628e8eb225.js +1 -0
  114. fides/ui-build/static/admin/_next/static/chunks/1840-5bbe6d878ed73fb4.js +1 -0
  115. fides/ui-build/static/admin/_next/static/chunks/{1975.78e719130cfe3fd6.js → 1975.afe8cad52f904fcf.js} +1 -1
  116. fides/ui-build/static/admin/_next/static/chunks/{2040-fdecc41a18e40bdc.js → 2040-fe1a06d82c0413f1.js} +1 -1
  117. fides/ui-build/static/admin/_next/static/chunks/2397-40b8db1cb2f23e2a.js +1 -0
  118. fides/ui-build/static/admin/_next/static/chunks/2921-b10bbc3a9104933b.js +1 -0
  119. fides/ui-build/static/admin/_next/static/chunks/3214-90ce0a366b0f461a.js +1 -0
  120. fides/ui-build/static/admin/_next/static/chunks/3377-eb5cd82b3ee6ab0c.js +1 -0
  121. fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
  122. fides/ui-build/static/admin/_next/static/chunks/3655-93ecd09f1cb9dbef.js +1 -0
  123. fides/ui-build/static/admin/_next/static/chunks/{3696-90c8b336bbc46782.js → 3696-6db05a35ae806825.js} +1 -1
  124. fides/ui-build/static/admin/_next/static/chunks/{3923-98bea73b618292aa.js → 3923-44255a63d6d80ff5.js} +1 -1
  125. fides/ui-build/static/admin/_next/static/chunks/401-fe8db8b5d8f600de.js +1 -0
  126. fides/ui-build/static/admin/_next/static/chunks/{4259.d1507e0db19cbed7.js → 4259.05038c9b78467244.js} +1 -1
  127. fides/ui-build/static/admin/_next/static/chunks/4277-13bcf4516326d474.js +1 -0
  128. fides/ui-build/static/admin/_next/static/chunks/431-e01ee730c8ad9ece.js +1 -0
  129. fides/ui-build/static/admin/_next/static/chunks/4496-bed72bd5639075be.js +1 -0
  130. fides/ui-build/static/admin/_next/static/chunks/454-d5c2c84f1a14e4f1.js +1 -0
  131. fides/ui-build/static/admin/_next/static/chunks/4817-d29f40d4ce729f37.js +1 -0
  132. fides/ui-build/static/admin/_next/static/chunks/5185-b2ac9fecc00b67e7.js +1 -0
  133. fides/ui-build/static/admin/_next/static/chunks/5258-4672eae0656430f9.js +1 -0
  134. fides/ui-build/static/admin/_next/static/chunks/5487-8dedd1ca94fbba54.js +1 -0
  135. fides/ui-build/static/admin/_next/static/chunks/549-6e2442db533a711e.js +1 -0
  136. fides/ui-build/static/admin/_next/static/chunks/5643-55d758444a8d7162.js +1 -0
  137. fides/ui-build/static/admin/_next/static/chunks/5724-1e40975cefa405f0.js +1 -0
  138. fides/ui-build/static/admin/_next/static/chunks/{5783-d119cb132abd8a91.js → 5783-6055edba275155ca.js} +1 -1
  139. fides/ui-build/static/admin/_next/static/chunks/6084-82e2df433fe5ba85.js +1 -0
  140. fides/ui-build/static/admin/_next/static/chunks/6344-3e21444374f8059f.js +1 -0
  141. fides/ui-build/static/admin/_next/static/chunks/6362-12e3fd23130ccf15.js +1 -0
  142. fides/ui-build/static/admin/_next/static/chunks/6372-a8d0f08dac1ebd0e.js +1 -0
  143. fides/ui-build/static/admin/_next/static/chunks/6780-3db5133c1f4c6f1e.js +1 -0
  144. fides/ui-build/static/admin/_next/static/chunks/6853-1adbdf6418ec3d62.js +1 -0
  145. fides/ui-build/static/admin/_next/static/chunks/6954-aa0c60ee1092be8e.js +1 -0
  146. fides/ui-build/static/admin/_next/static/chunks/7059-12be23a345a94c1e.js +1 -0
  147. fides/ui-build/static/admin/_next/static/chunks/7079-6e6efc3396ff1ebb.js +1 -0
  148. fides/ui-build/static/admin/_next/static/chunks/7218-d297a4a06f924b09.js +1 -0
  149. fides/ui-build/static/admin/_next/static/chunks/7245-686665c197b58e68.js +1 -0
  150. fides/ui-build/static/admin/_next/static/chunks/{7476-d055aa931da47ac0.js → 7476-a43c046c24de37cc.js} +1 -1
  151. fides/ui-build/static/admin/_next/static/chunks/7630-c654c61ba98d8c74.js +1 -0
  152. fides/ui-build/static/admin/_next/static/chunks/7654-716cf37a020b3d11.js +1 -0
  153. fides/ui-build/static/admin/_next/static/chunks/{796-02086581996a0548.js → 796-e83ace3c6ab99ac7.js} +1 -1
  154. fides/ui-build/static/admin/_next/static/chunks/8212-b9e8295ca883c9f8.js +1 -0
  155. fides/ui-build/static/admin/_next/static/chunks/8939-4925751c57c51f87.js +1 -0
  156. fides/ui-build/static/admin/_next/static/chunks/9014-eeae6f581158e645.js +1 -0
  157. fides/ui-build/static/admin/_next/static/chunks/9046-e4daf28840a69fd6.js +1 -0
  158. fides/ui-build/static/admin/_next/static/chunks/{5596-29a7c8322530b7cf.js → 9195-550bd50d538c5f79.js} +3 -3
  159. fides/ui-build/static/admin/_next/static/chunks/9330-e519adec48222d45.js +1 -0
  160. fides/ui-build/static/admin/_next/static/chunks/9341-bfc0e59bcc56c604.js +1 -0
  161. fides/ui-build/static/admin/_next/static/chunks/9450-b7b7bb1d755ecf57.js +1 -0
  162. fides/ui-build/static/admin/_next/static/chunks/{9676.b86ecbcfe5afd25d.js → 9676.7d029a5383595b69.js} +1 -1
  163. fides/ui-build/static/admin/_next/static/chunks/9682-da69ac5d06f281da.js +1 -0
  164. fides/ui-build/static/admin/_next/static/chunks/{9826-ccedc28e978ca9e1.js → 9826-657652d55936a8c6.js} +1 -1
  165. fides/ui-build/static/admin/_next/static/chunks/9911-ece086f2230e34f0.js +1 -0
  166. fides/ui-build/static/admin/_next/static/chunks/9965-56c5e4fc9cd3b3a5.js +1 -0
  167. fides/ui-build/static/admin/_next/static/chunks/pages/{404-2eb8aed4939f1142.js → 404-d079b8bf35250874.js} +1 -1
  168. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-c1c2f757b1f3da12.js → _app-e64fd8510033a27c.js} +63 -63
  169. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-ddd9d7d40847fc28.js +1 -0
  170. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-b4d18c1f4d414f5f.js +1 -0
  171. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-d451bc8932330141.js +1 -0
  172. fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7a258b7ecd6da4b8.js → add-vendors-c24663cd5dec57db.js} +1 -1
  173. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-fb5017ff5fa54fcc.js → configure-d93418688bd258eb.js} +1 -1
  174. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-e1e2fd704ac2d71d.js → [id]-9b1f2b1c06968166.js} +1 -1
  175. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-a5e738a234dadc7e.js → new-115a085e5d42de45.js} +1 -1
  176. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-d9b7b311195df29e.js +1 -0
  177. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5fc78b78a51c239c.js → [id]-3de34624829cbce8.js} +1 -1
  178. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-b79bcb93b5f4c734.js → new-dc95e7ed278d1a29.js} +1 -1
  179. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-cdfc9bb19f47c709.js +1 -0
  180. fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-069f4e3ee96ebf77.js → properties-0b995b01dc4dbd1f.js} +1 -1
  181. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-e3ad3a55624e302a.js +1 -0
  182. fides/ui-build/static/admin/_next/static/chunks/pages/{consent-d2bf72508c3cad55.js → consent-b37ed76849330edd.js} +1 -1
  183. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-2fa4b3a58f75f81d.js → [resourceUrn]-dd82729296dee5c5.js} +1 -1
  184. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-49e5477eb1a11b92.js +1 -0
  185. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-dfc1ead4a12c9ffa.js +1 -0
  186. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-5b31e3d7727b917a.js → [resourceUrn]-8442eb219958ac7e.js} +1 -1
  187. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-feda358d1801c18d.js +1 -0
  188. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-d16acb6fc07aad46.js +1 -0
  189. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-c51a1e98c45d231a.js +1 -0
  190. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore-4498881c26f1458d.js +1 -0
  191. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-bcfe38eebca30f8c.js +1 -0
  192. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-f66d0655897c4400.js +1 -0
  193. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website-5b3e0009d442bc3f.js +1 -0
  194. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-6f1e012cd641da19.js +1 -0
  195. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-581d6248fcf98d17.js +1 -0
  196. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-844a8de0d1b506e2.js → [resourceUrn]-ddc1c1641e1e9430.js} +1 -1
  197. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-11b07cf2d91b17ef.js → detection-2b48f7e524743b2b.js} +1 -1
  198. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-5525cf287d4ab493.js → [resourceUrn]-862b67418600251e.js} +1 -1
  199. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-ed4723e1b67d890e.js → discovery-0ffec855f5df262c.js} +1 -1
  200. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-6a030ab8c2e2b0db.js +1 -0
  201. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-6cb66f649b8ca4bf.js +1 -0
  202. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-0b008dad90b00aaa.js +1 -0
  203. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-5566edf9a9d1be2d.js +1 -0
  204. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d4ca1f485b6e9e02.js +1 -0
  205. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-85dee7e81dc4bafb.js +1 -0
  206. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-e905e018a2cab35d.js +1 -0
  207. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-912723bc86299b1a.js +1 -0
  208. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-f1f0affc18327033.js +1 -0
  209. fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-1f4335dca5c09860.js → fides-js-docs-5235760b3e508d7d.js} +1 -1
  210. fides/ui-build/static/admin/_next/static/chunks/pages/{index-b74d1e8608ae5b5d.js → index-692d27dbe9392c9f.js} +1 -1
  211. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-1b94e2d769a182b2.js +1 -0
  212. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-adfe6c5ac5b703d0.js +1 -0
  213. fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-f9be7080ebbb7445.js +1 -0
  214. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/[id]-caaa8602a1d449b1.js +1 -0
  215. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/new-9b106b1d2d93985b.js +1 -0
  216. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-6a1ded8cdde836c4.js +1 -0
  217. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/[key]-f94e3accf9507ebf.js +1 -0
  218. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/new-5e83220ff1f2a250.js +1 -0
  219. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-a03cbd698a23e5b3.js +1 -0
  220. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/[id]-3cde574b3c8447c0.js +1 -0
  221. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/add-template-0448bb4ae8536c58.js +1 -0
  222. fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-1621a4b87c432117.js +1 -0
  223. fides/ui-build/static/admin/_next/static/chunks/pages/notifications-4ea28f6b1dd63642.js +1 -0
  224. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-e02516d9fd314528.js +1 -0
  225. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-fec08bea801b4918.js +1 -0
  226. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-d911e5fbf5a4a888.js +1 -0
  227. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-91b1adcac6a57b2d.js +1 -0
  228. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-de309d8813b1ebfb.js +1 -0
  229. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-f2943c1309062284.js +1 -0
  230. fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-29fb7b39f8962650.js → table-migration-03eda417711ae909.js} +1 -1
  231. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-1fe486f3af832c80.js +1 -0
  232. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-ea6f78fa8b2d3f6c.js +1 -0
  233. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-8f577df28ebca869.js → configure-bda7b474493e7128.js} +1 -1
  234. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-2c0ec8fed16c20ae.js +1 -0
  235. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-57a75c7e9659271a.js → [id]-30d298a47e85709f.js} +1 -1
  236. fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-8964c2300206bc89.js → add-property-438084cca0d0f10d.js} +1 -1
  237. fides/ui-build/static/admin/_next/static/chunks/pages/{properties-08472b2a6bf1d392.js → properties-17fd44d98f5bd5b6.js} +1 -1
  238. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-baf77d34a3b3bece.js +1 -0
  239. fides/ui-build/static/admin/_next/static/chunks/pages/sandbox/privacy-notices-8c80391025ca7339.js +1 -0
  240. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-7c19810858b708cc.js +1 -0
  241. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-ee8820fe0fa14c77.js +1 -0
  242. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{[id]-bd1042a0e9be6aff.js → [id]-8eb862182f19a6c2.js} +1 -1
  243. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/{new-469ad83c8cfa1290.js → new-37c29ef618e9fe3c.js} +1 -1
  244. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-1db425150dcb1b6b.js +1 -0
  245. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-744f669431b84f71.js → domain-records-e334b43fa5c5b1e6.js} +1 -1
  246. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-9d18eb5c38d85522.js +1 -0
  247. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-604790638c656fbd.js → email-templates-cb937ed7c4b1e5a8.js} +1 -1
  248. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-be2a885150adc133.js → locations-835281251f0785cd.js} +1 -1
  249. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3c86162afe9759df.js → organization-7fd050c92866938c.js} +1 -1
  250. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-59ea66130fca0d05.js +1 -0
  251. fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-4fe3b90747d885e5.js → regulations-b0fe1051d908f366.js} +1 -1
  252. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-f108bf5015144d2f.js +1 -0
  253. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-4d470bbf199a2f9c.js → [id]-0e7c7228d01290ea.js} +1 -1
  254. fides/ui-build/static/admin/_next/static/chunks/pages/systems-adc13b542e10a37d.js +1 -0
  255. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-23dd250da26511c5.js +1 -0
  256. fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-98f737e735eaa0f0.js → [id]-aed30fb22ae7c9ec.js} +1 -1
  257. fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-562624e5461083ec.js → user-management-6b88ca3e02ee67c9.js} +1 -1
  258. fides/ui-build/static/admin/_next/static/chunks/webpack-6f97ebe373e7ef6b.js +1 -0
  259. fides/ui-build/static/admin/_next/static/css/012b10627a654d5c.css +1 -0
  260. fides/ui-build/static/admin/_next/static/css/05d05fc31d09638b.css +1 -0
  261. fides/ui-build/static/admin/_next/static/css/0fd6e0884cfcc5f3.css +1 -0
  262. fides/ui-build/static/admin/_next/static/css/14ba79c49597d37a.css +1 -0
  263. fides/ui-build/static/admin/_next/static/css/{34a7eb08b86ddb57.css → 3d6582469f7d56e0.css} +1 -1
  264. fides/ui-build/static/admin/_next/static/css/4861ca3e088f2d05.css +1 -0
  265. fides/ui-build/static/admin/_next/static/css/65ae906f224cd8ae.css +1 -0
  266. fides/ui-build/static/admin/_next/static/css/a1800714b486e230.css +1 -0
  267. fides/ui-build/static/admin/_next/static/css/af32fcac7a177a0e.css +1 -0
  268. fides/ui-build/static/admin/_next/static/css/cb417f0587918f85.css +1 -0
  269. fides/ui-build/static/admin/_next/static/css/d5701118537cbdd2.css +1 -0
  270. fides/ui-build/static/admin/_next/static/css/dd15c278b964de80.css +1 -0
  271. fides/ui-build/static/admin/_next/static/css/{5f393dea1c0d031c.css → f89607996ad54f4b.css} +1 -1
  272. fides/ui-build/static/admin/_next/static/css/f9a2a44d3d34c904.css +1 -0
  273. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  274. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  275. fides/ui-build/static/admin/add-systems.html +1 -1
  276. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  277. fides/ui-build/static/admin/consent/configure.html +1 -1
  278. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  279. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  280. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  281. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  282. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  283. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  284. fides/ui-build/static/admin/consent/properties.html +1 -1
  285. fides/ui-build/static/admin/consent/reporting.html +1 -1
  286. fides/ui-build/static/admin/consent.html +1 -1
  287. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  288. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  289. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  290. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  291. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  292. fides/ui-build/static/admin/data-catalog.html +1 -1
  293. fides/ui-build/static/admin/data-discovery/action-center/datastore/[monitorId].html +1 -0
  294. fides/ui-build/static/admin/data-discovery/action-center/datastore.html +1 -0
  295. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId]/[systemId].html +1 -0
  296. fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId].html +1 -0
  297. fides/ui-build/static/admin/data-discovery/action-center/website.html +1 -0
  298. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  299. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  300. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  301. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  302. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  303. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  304. fides/ui-build/static/admin/datamap.html +1 -1
  305. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  306. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  307. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  308. fides/ui-build/static/admin/dataset/new.html +1 -1
  309. fides/ui-build/static/admin/dataset.html +1 -1
  310. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  311. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  312. fides/ui-build/static/admin/datastore-connection.html +1 -1
  313. fides/ui-build/static/admin/index.html +1 -1
  314. fides/ui-build/static/admin/integrations/[id].html +1 -1
  315. fides/ui-build/static/admin/integrations.html +1 -1
  316. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  317. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  318. fides/ui-build/static/admin/lib/fides-preview.js +1 -1
  319. fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
  320. fides/ui-build/static/admin/lib/fides.js +3 -3
  321. fides/ui-build/static/admin/login/[provider].html +1 -1
  322. fides/ui-build/static/admin/login.html +1 -1
  323. fides/ui-build/static/admin/new-privacy-requests.html +1 -0
  324. fides/ui-build/static/admin/notifications/digests/[id].html +1 -0
  325. fides/ui-build/static/admin/notifications/digests/new.html +1 -0
  326. fides/ui-build/static/admin/notifications/digests.html +1 -0
  327. fides/ui-build/static/admin/notifications/providers/[key].html +1 -0
  328. fides/ui-build/static/admin/notifications/providers/new.html +1 -0
  329. fides/ui-build/static/admin/notifications/providers.html +1 -0
  330. fides/ui-build/static/admin/notifications/templates/[id].html +1 -0
  331. fides/ui-build/static/admin/notifications/templates/add-template.html +1 -0
  332. fides/ui-build/static/admin/notifications/templates.html +1 -0
  333. fides/ui-build/static/admin/notifications.html +1 -0
  334. fides/ui-build/static/admin/poc/ant-components.html +1 -1
  335. fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
  336. fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
  337. fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
  338. fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
  339. fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
  340. fides/ui-build/static/admin/poc/forms.html +1 -1
  341. fides/ui-build/static/admin/poc/table-migration.html +1 -1
  342. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  343. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  344. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  345. fides/ui-build/static/admin/privacy-requests.html +1 -1
  346. fides/ui-build/static/admin/properties/[id].html +1 -1
  347. fides/ui-build/static/admin/properties/add-property.html +1 -1
  348. fides/ui-build/static/admin/properties.html +1 -1
  349. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  350. fides/ui-build/static/admin/sandbox/privacy-notices.html +1 -0
  351. fides/ui-build/static/admin/settings/about/alpha.html +1 -1
  352. fides/ui-build/static/admin/settings/about.html +1 -1
  353. fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
  354. fides/ui-build/static/admin/settings/consent.html +1 -1
  355. fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -1
  356. fides/ui-build/static/admin/settings/custom-fields/new.html +1 -1
  357. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  358. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  359. fides/ui-build/static/admin/settings/domains.html +1 -1
  360. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  361. fides/ui-build/static/admin/settings/locations.html +1 -1
  362. fides/ui-build/static/admin/settings/organization.html +1 -1
  363. fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
  364. fides/ui-build/static/admin/settings/regulations.html +1 -1
  365. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  366. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  367. fides/ui-build/static/admin/systems.html +1 -1
  368. fides/ui-build/static/admin/taxonomy.html +1 -1
  369. fides/ui-build/static/admin/user-management/new.html +1 -1
  370. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  371. fides/ui-build/static/admin/user-management.html +1 -1
  372. fides/api/service/async_dsr/async_dsr_service.py +0 -195
  373. fides/api/service/async_dsr/async_dsr_strategy.py +0 -5
  374. fides/api/service/async_dsr/async_dsr_strategy_callback.py +0 -16
  375. fides/api/service/async_dsr/async_dsr_strategy_factory.py +0 -63
  376. fides/api/service/async_dsr/async_dsr_strategy_polling.py +0 -94
  377. fides/ui-build/static/admin/_next/static/_IxwgneyQjdSaZFEF3Tqu/_buildManifest.js +0 -1
  378. fides/ui-build/static/admin/_next/static/chunks/1316-2606e19807c08aa5.js +0 -1
  379. fides/ui-build/static/admin/_next/static/chunks/1467-8808ec8836e033f9.js +0 -1
  380. fides/ui-build/static/admin/_next/static/chunks/155-b4337d0826d5addc.js +0 -1
  381. fides/ui-build/static/admin/_next/static/chunks/1817-1ad037b7d6d2f6d2.js +0 -1
  382. fides/ui-build/static/admin/_next/static/chunks/1896-49010da5c2705fc5.js +0 -1
  383. fides/ui-build/static/admin/_next/static/chunks/2150-930ffaf2c4718edc.js +0 -1
  384. fides/ui-build/static/admin/_next/static/chunks/255-1bc0cbef7a59cdc6.js +0 -1
  385. fides/ui-build/static/admin/_next/static/chunks/2921-66f65496c3a09316.js +0 -1
  386. fides/ui-build/static/admin/_next/static/chunks/2962-e92d525bf570a9a3.js +0 -1
  387. fides/ui-build/static/admin/_next/static/chunks/346-aa3b88efb85f2e28.js +0 -1
  388. fides/ui-build/static/admin/_next/static/chunks/3550-83cb70e80cbe41ba.js +0 -1
  389. fides/ui-build/static/admin/_next/static/chunks/3585-f728d32fda6f1ac1.js +0 -1
  390. fides/ui-build/static/admin/_next/static/chunks/3855-ed226b8a8050bd40.js +0 -1
  391. fides/ui-build/static/admin/_next/static/chunks/3872-04d3afbfa41a7782.js +0 -1
  392. fides/ui-build/static/admin/_next/static/chunks/401-ffe4e8436e1eceb9.js +0 -1
  393. fides/ui-build/static/admin/_next/static/chunks/409-5c3d31163028339f.js +0 -1
  394. fides/ui-build/static/admin/_next/static/chunks/431-78bf05f35d7eec4f.js +0 -1
  395. fides/ui-build/static/admin/_next/static/chunks/4558-8305aee48def1dcd.js +0 -1
  396. fides/ui-build/static/admin/_next/static/chunks/4608-0c6ef78e30a51f84.js +0 -1
  397. fides/ui-build/static/admin/_next/static/chunks/4718-3a412bdb90add82f.js +0 -1
  398. fides/ui-build/static/admin/_next/static/chunks/502-0d9f4ac29ef34a1c.js +0 -1
  399. fides/ui-build/static/admin/_next/static/chunks/504-88caa30c03374e9b.js +0 -1
  400. fides/ui-build/static/admin/_next/static/chunks/5163-e682273cd76a7d07.js +0 -1
  401. fides/ui-build/static/admin/_next/static/chunks/5185-51eaa78e3ed6bfb7.js +0 -1
  402. fides/ui-build/static/admin/_next/static/chunks/5279-12c9cbdc67ad7b14.js +0 -1
  403. fides/ui-build/static/admin/_next/static/chunks/5309-3b6cf0cc9d0c6a83.js +0 -1
  404. fides/ui-build/static/admin/_next/static/chunks/5574-c31ea831371610d5.js +0 -1
  405. fides/ui-build/static/admin/_next/static/chunks/5619-9b50cec521203989.js +0 -1
  406. fides/ui-build/static/admin/_next/static/chunks/5643-10a36584c399526c.js +0 -1
  407. fides/ui-build/static/admin/_next/static/chunks/6277-182efc294d413f64.js +0 -1
  408. fides/ui-build/static/admin/_next/static/chunks/6419-9b3a86af57c86791.js +0 -1
  409. fides/ui-build/static/admin/_next/static/chunks/6853-7004a8c420b1ca02.js +0 -1
  410. fides/ui-build/static/admin/_next/static/chunks/6882-dbe0a25dcf1a8ee0.js +0 -1
  411. fides/ui-build/static/admin/_next/static/chunks/6954-4b24e1731c1cc3b3.js +0 -1
  412. fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +0 -1
  413. fides/ui-build/static/admin/_next/static/chunks/7045-14e955890f1147e4.js +0 -1
  414. fides/ui-build/static/admin/_next/static/chunks/7079-50571e9f3269d74d.js +0 -1
  415. fides/ui-build/static/admin/_next/static/chunks/7158-04745cc8d684b2e7.js +0 -1
  416. fides/ui-build/static/admin/_next/static/chunks/7218-e2983b96b95e33b4.js +0 -1
  417. fides/ui-build/static/admin/_next/static/chunks/7630-d0d3a0fe3f95e971.js +0 -1
  418. fides/ui-build/static/admin/_next/static/chunks/7725-f2a7be705b75dcc3.js +0 -1
  419. fides/ui-build/static/admin/_next/static/chunks/7929-0fd0d4948bc8d70e.js +0 -1
  420. fides/ui-build/static/admin/_next/static/chunks/8002-ed832921ad190832.js +0 -1
  421. fides/ui-build/static/admin/_next/static/chunks/8765-f622a35b40a7ec63.js +0 -1
  422. fides/ui-build/static/admin/_next/static/chunks/9037-453224ba3ee65b13.js +0 -1
  423. fides/ui-build/static/admin/_next/static/chunks/9046-b6616ba7b59d947e.js +0 -1
  424. fides/ui-build/static/admin/_next/static/chunks/9187-7438242f0d380bb0.js +0 -1
  425. fides/ui-build/static/admin/_next/static/chunks/9226-4a7027057f55ca2a.js +0 -1
  426. fides/ui-build/static/admin/_next/static/chunks/9278-08cc704317fe535e.js +0 -1
  427. fides/ui-build/static/admin/_next/static/chunks/9729-fcf6ff4e3534e4a8.js +0 -1
  428. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-4ec03eed67572861.js +0 -1
  429. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-2ca59996860a33c5.js +0 -1
  430. fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-19214babd1f219e3.js +0 -1
  431. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-92182be6603c2842.js +0 -1
  432. fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ab54b19609bff325.js +0 -1
  433. fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-c1a3caf3c286bf5d.js +0 -1
  434. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]-4a1af12d2d7cd660.js +0 -1
  435. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-99573a1ee3ef8f4c.js +0 -1
  436. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources-6e429b7511028d60.js +0 -1
  437. fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-b7326c51d88cc2cc.js +0 -1
  438. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-5b57f9132426fe52.js +0 -1
  439. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-0d512528b498d75c.js +0 -1
  440. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-040813022f0890c9.js +0 -1
  441. fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-a28cc0e23bbe4fc8.js +0 -1
  442. fides/ui-build/static/admin/_next/static/chunks/pages/datamap-7d22222608ec3aac.js +0 -1
  443. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-0abd30eada811b5b.js +0 -1
  444. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-007965429368d9a3.js +0 -1
  445. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-60a4a9eb4aab4c11.js +0 -1
  446. fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-d514cd4ec62e3b03.js +0 -1
  447. fides/ui-build/static/admin/_next/static/chunks/pages/dataset-0e3a6ac4797ffbbb.js +0 -1
  448. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-816e02b6cbe4a684.js +0 -1
  449. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-b6838162200141b3.js +0 -1
  450. fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-223c2d1ded51bfb1.js +0 -1
  451. fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-153eb88ab4e7dc6d.js +0 -1
  452. fides/ui-build/static/admin/_next/static/chunks/pages/integrations-331544e9b85c4ac2.js +0 -1
  453. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-e8d2140787045acd.js +0 -1
  454. fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-e3f93462a08251bf.js +0 -1
  455. fides/ui-build/static/admin/_next/static/chunks/pages/messaging-b5f7d6afdecd013d.js +0 -1
  456. fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-248ad9f65a872442.js +0 -1
  457. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-aedb66a62042b10a.js +0 -1
  458. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-018df38b7cd77fdb.js +0 -1
  459. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-6ca9099d03aab817.js +0 -1
  460. fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-0f2c90786ea005a4.js +0 -1
  461. fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-200b51a725f8b2d1.js +0 -1
  462. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-7dac2302f573f5ee.js +0 -1
  463. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-479890582973deaf.js +0 -1
  464. fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-7af00f72cf694077.js +0 -1
  465. fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-f7753e9effae3816.js +0 -1
  466. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-f3e6e74e0efb005c.js +0 -1
  467. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4d658222ec800511.js +0 -1
  468. fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-2fcd95c41e578d57.js +0 -1
  469. fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-a3275554ffe8e640.js +0 -1
  470. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-77239269acc2d31a.js +0 -1
  471. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-8bf1821722b082e9.js +0 -1
  472. fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-8d92be437793c96f.js +0 -1
  473. fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-97221067330c0c27.js +0 -1
  474. fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-2deb6becece69d46.js +0 -1
  475. fides/ui-build/static/admin/_next/static/chunks/pages/systems-6c91bdea40875227.js +0 -1
  476. fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-3059aba38adefa56.js +0 -1
  477. fides/ui-build/static/admin/_next/static/chunks/webpack-2766492c5dbceb0a.js +0 -1
  478. fides/ui-build/static/admin/_next/static/css/073713cd1eddda79.css +0 -1
  479. fides/ui-build/static/admin/_next/static/css/23cf870196941c9a.css +0 -1
  480. fides/ui-build/static/admin/_next/static/css/295d729ea1b11885.css +0 -1
  481. fides/ui-build/static/admin/_next/static/css/304c6f148886a8d4.css +0 -1
  482. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +0 -1
  483. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +0 -1
  484. fides/ui-build/static/admin/messaging/[id].html +0 -1
  485. fides/ui-build/static/admin/messaging/add-template.html +0 -1
  486. fides/ui-build/static/admin/messaging.html +0 -1
  487. fides/ui-build/static/admin/settings/messaging-providers/[key].html +0 -1
  488. fides/ui-build/static/admin/settings/messaging-providers/new.html +0 -1
  489. fides/ui-build/static/admin/settings/messaging-providers.html +0 -1
  490. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/WHEEL +0 -0
  491. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/entry_points.txt +0 -0
  492. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/licenses/LICENSE +0 -0
  493. {ethyca_fides-2.71.1b1.dist-info → ethyca_fides-2.74.0rc1.dist-info}/top_level.txt +0 -0
  494. /fides/ui-build/static/admin/_next/static/{_IxwgneyQjdSaZFEF3Tqu → FZTEUgamBvOhgPWce135w}/_ssgManifest.js +0 -0
  495. /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-629c88e90699369b.js → new-7dce2916cc589c54.js} +0 -0
@@ -1 +1 @@
1
- class Wt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class Ct{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},_n=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new Wt("listenerRegistered",e,!0,new Ct(this.cmpApiContext));this.invokeCallback(t)}},hn=class extends it{respond(){let e=new Ct(this.cmpApiContext);this.invokeCallback(e)}};class pn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var ye;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(ye||(ye={}));let In=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new Wt("listenerRemoved",e,t,new Ct(this.cmpApiContext));this.invokeCallback(s)}},cs=class{static[ye.ADD_EVENT_LISTENER]=_n;static[ye.GET_FIELD]=pn;static[ye.GET_SECTION]=gn;static[ye.HAS_SECTION]=Tn;static[ye.PING]=hn;static[ye.REMOVE_EVENT_LISTENER]=In};var rt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(rt||(rt={}));var je;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(je||(je={}));var ds;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ds||(ds={}));var Me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Me||(Me={}));class On{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=ye.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=ye.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new cs[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return cs[e]!==void 0}}let Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new Wt(e,i,t,new Ct(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class gt extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ee{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new gt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new gt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Oe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Oe("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class ft{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Oe("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=D.decode(i),o=ft.DICT.charAt(r);t+=o,s+=6}catch{throw new Oe("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=ft.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends ft{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Oe("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class us{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2,l=e.indexOf("11",r);let E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2;for(let S=u;S<=E;S++)t.push(S)}else{let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,t.push(u),r=l+2}}return t}}class fn extends Error{constructor(e){super(e),this.name="ValidationError"}}class ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new fn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Ve extends h{constructor(e){super(e),this.name="SubstringError"}}class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Ve("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class An extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return us.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends ve{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new Ve(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var He;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(He||(He={}));const Cn=[He.ID,He.VERSION,He.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new gt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new gt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new w;return e.put(He.ID.toString(),new c(6,Le.ID)),e.put(He.VERSION.toString(),new c(6,Le.VERSION)),e.put(He.SECTION_IDS.toString(),new An([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Le extends ee{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const wn=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],Dn=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],mn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],Vn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class nt extends ft{static instance=new nt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let u=a;u<=l;u++)t.push(u)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Qt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Rn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class Es extends ve{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Oe(e)}}decode(e){try{let t=[],s=D.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=D.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Qt([]).substring(e,i),u=lt.decode(l);i+=l.length,t.push(new Rn(o,a,u))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=D.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=te.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let u=new Qt([]).substring(e,r);r+=u.length,s+=u}return s}catch(s){throw new Ve(s)}}}class z extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new Ve(s)}}}class Ss{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ss.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=Ss.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new Ve(s)}}}class ct{static encode(e,t){if(e.length>t)throw new Oe("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=at.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(at.decode(e.substring(s,s+1)));return t}}class Ue extends ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class _s{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=D.encode(63,6);else if(r>=65)s+=D.encode(e.charCodeAt(i)-65,6);else throw new Oe("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=D.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class qt extends ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return _s.encode(this.value,this.stringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=_s.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new Ve(s)}}}class Ze extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),s=t.length,i=e;if(s<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Oe(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new Qt([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Mn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,j.VERSION)),t.put(p.CREATED.toString(),new Pt(e)),t.put(p.LAST_UPDATED.toString(),new Pt(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new z(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new z(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new qt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new Ze([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new Ze([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class wt extends ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class vn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class j extends ee{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new vn),e.push(new bn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var I;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Gn=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],yn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new Pt(e)),t.put(I.LAST_UPDATED.toString(),new Pt(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Ze([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Ze([])),t.put(I.PUB_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class xn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends ee{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new Fn),e.push(new xn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(I.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==I.CREATED&&e!==I.LAST_UPDATED){let s=new Date;super.setFieldValue(I.CREATED,s),super.setFieldValue(I.LAST_UPDATED,s)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class $n{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ne;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ne||(Ne={}));const Kn=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class zn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new $n;return t.put(Ne.VERSION,new Hn(Pe.VERSION)),t.put(Ne.NOTICE,new Jt("-",e)),t.put(Ne.OPT_OUT_SALE,new Jt("-",e)),t.put(Ne.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ne.VERSION).getValue(),t+=e.get(Ne.NOTICE).getValue(),t+=e.get(Ne.OPT_OUT_SALE).getValue(),t+=e.get(Ne.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ne.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ne.NOTICE).setValue(e.charAt(1)),t.get(Ne.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ne.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends ee{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var N;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(N||(N={}));const kn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],Yn=[N.GPC_SEGMENT_TYPE,N.GPC];class hs{static encode(e,t,s){if(e.length>s)throw new Oe("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return hs.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=hs.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,X.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(N.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(N.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(N.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatGpcSegment '"+e+"'")}}}class X extends ee{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return X.ID}getName(){return X.NAME}getVersion(){return X.VERSION}initializeSegments(){let e=[];return e.push(new jn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const Qn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],qn=[m.GPC_SEGMENT_TYPE,m.GPC];class Jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Xn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(m.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ne extends ee{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ne.ID}getName(){return ne.NAME}getVersion(){return ne.VERSION}initializeSegments(){let e=[];return e.push(new Jn),e.push(new Xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var J;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));const Zn=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];class ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(J.VERSION.toString(),new c(6,pe.VERSION)),i.put(J.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class pe extends ee{static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pe.ID}getName(){return pe.NAME}getVersion(){return pe.VERSION}initializeSegments(){let e=[];return e.push(new ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ti=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],si=[x.GPC_SEGMENT_TYPE,x.GPC];class ni extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,ie.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(x.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoGpcSegment '"+e+"'")}}}class ie extends ee{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ie.ID}getName(){return ie.NAME}getVersion(){return ie.VERSION}initializeSegments(){let e=[];return e.push(new ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(k||(k={}));const ri=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE];class oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(k.VERSION.toString(),new c(6,ge.VERSION)),i.put(k.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ge extends ee{static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ge.ID}getName(){return ge.NAME}getVersion(){return ge.VERSION}initializeSegments(){let e=[];return e.push(new oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const ai=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],li=[B.GPC_SEGMENT_TYPE,B.GPC];class ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,re.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(B.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtGpcSegment '"+e+"'")}}}class re extends ee{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return re.ID}getName(){return re.NAME}getVersion(){return re.VERSION}initializeSegments(){let e=[];return e.push(new ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const ui=[Y.VERSION,Y.PROCESSING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.ADDITIONAL_DATA_PROCESSING_CONSENT,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class Ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(Y.VERSION.toString(),new c(6,Te.VERSION)),i.put(Y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(Y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Te extends ee{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Te.ID}getName(){return Te.NAME}getVersion(){return Te.VERSION}initializeSegments(){let e=[];return e.push(new Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var V;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const Si=[V.VERSION,V.SHARING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],_i=[V.GPC_SEGMENT_TYPE,V.GPC];class hi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,oe.VERSION)),i.put(V.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class pi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(V.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtGpcSegment '"+e+"'")}}}class oe extends ee{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return oe.ID}getName(){return oe.NAME}getVersion(){return oe.VERSION}initializeSegments(){let e=[];return e.push(new hi),e.push(new pi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const gi=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],Ti=[R.GPC_SEGMENT_TYPE,R.GPC];class Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ae.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(R.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrGpcSegment '"+e+"'")}}}class ae extends ee{static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new Ii),e.push(new Oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Ni=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],fi=[M.GPC_SEGMENT_TYPE,M.GPC];class Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,le.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(M.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxGpcSegment '"+e+"'")}}}class le extends ee{static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new Ai),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Pi=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],wi=[v.GPC_SEGMENT_TYPE,v.GPC];class Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,ce.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(v.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ce extends ee{static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const Vi=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Ri=[b.GPC_SEGMENT_TYPE,b.GPC];class Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,de.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class vi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(b.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaGpcSegment '"+e+"'")}}}class de extends ee{static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return de.ID}getName(){return de.NAME}getVersion(){return de.VERSION}initializeSegments(){let e=[];return e.push(new Mi),e.push(new vi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const bi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Li=[L.GPC_SEGMENT_TYPE,L.GPC];class Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,ue.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(L.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class ue extends ee{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ue.ID}getName(){return ue.NAME}getVersion(){return ue.VERSION}initializeSegments(){let e=[];return e.push(new Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Ui=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Fi=[G.GPC_SEGMENT_TYPE,G.GPC];class xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,Ee.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Fi}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(G.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class Ee extends ee{static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new xi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Hi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],$i=[y.GPC_SEGMENT_TYPE,y.GPC];class Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,Se.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class zi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $i}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(y.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class Se extends ee{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Se.ID}getName(){return Se.NAME}getVersion(){return Se.VERSION}initializeSegments(){let e=[];return e.push(new Ki),e.push(new zi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const ki=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Yi=[U.GPC_SEGMENT_TYPE,U.GPC];class ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,_e.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(U.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnGpcSegment '"+e+"'")}}}class _e extends ee{static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _e.ID}getName(){return _e.NAME}getVersion(){return _e.VERSION}initializeSegments(){let e=[];return e.push(new ji),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class se{static SECTION_ID_NAME_MAP=new Map([[j.ID,j.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.NAME],[X.ID,X.NAME],[ne.ID,ne.NAME],[pe.ID,pe.NAME],[ie.ID,ie.NAME],[ge.ID,ge.NAME],[re.ID,re.NAME],[Te.ID,Te.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[ue.ID,ue.NAME],[Ee.ID,Ee.NAME],[Se.ID,Se.NAME],[_e.ID,_e.NAME]]);static SECTION_ORDER=[j.NAME,Ce.NAME,Pe.NAME,X.NAME,ne.NAME,pe.NAME,ie.NAME,ge.NAME,re.NAME,Te.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,ue.NAME,Ee.NAME,Se.NAME,_e.NAME]}class ps{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===_e.NAME&&(i=new _e,this.sections.set(_e.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new gt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(se.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Le;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<se.SECTION_ORDER.length;r++){let o=se.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Le;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Le(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);s.set(X.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new j(e);return t.set(j.NAME,s),new Le().setFieldValue(He.SECTION_IDS,[2]),t.set(Le.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(se.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===j.NAME?(s=new j,this.sections.set(j.NAME,s)):e===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===_e.NAME&&(s=new _e,this.sections.set(_e.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(se.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new ps;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ps,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Xt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let Dt=class extends Error{constructor(e){super(e),this.name="GVLError"}},qi=class kt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return kt.langSet.has(e)}forEach(e){kt.langSet.forEach(e)}get size(){return kt.langSet.size}},gs=class Yt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new qi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=Yt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new Yt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Dt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Dt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new Yt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await Xt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Xt.fetch(r))}return s}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Xt.fetch(s))}catch(i){throw new Dt("unable to load language: "+i.message)}}}else throw new Dt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class Ji{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new On(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(se.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(se.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(se.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return gs.fromVendorList(e)}async getGvlFromUrl(e){return gs.fromUrl(e)}}const Xi=()=>{var n,e,t,s,i,r;if((n=window.Fides)!=null&&n.options.tcfEnabled&&!((e=window.Fides)!=null&&e.options.gppEnabled)&&!((i=(s=(t=window.Fides)==null?void 0:t.experience)==null?void 0:s.privacy_notices)!=null&&i.length))return!1;if(typeof((r=window.navigator)==null?void 0:r.globalPrivacyControl)=="boolean")return window.navigator.globalPrivacyControl;const a=new URL(window.location.href).searchParams.get("globalPrivacyControl");if(a==="true")return!0;if(a==="false")return!1},Zt=()=>typeof window>"u"?{}:{globalPrivacyControl:Xi()},Zi="en";var er=Object.defineProperty,tr=(n,e,t)=>e in n?er(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>tr(n,typeof e!="symbol"?e+"":e,t);class sr{constructor(e,t,s){es(this,"consentPreference"),es(this,"notice"),es(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Ts;(n=>{(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Ts||(Ts={}));var dt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(dt||{}),De=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(De||{}),mt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(mt||{}),ut=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ut||{}),et=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(et||{}),Et=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(Et||{}),Fe=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.OT_MIGRATION="ot_migration",n))(Fe||{});const nr=(n,e)=>!!Object.keys(e).includes(n.notice_key),ts=n=>!n||n===De.OPT_OUT?!1:n===De.OPT_IN?!0:n===De.ACKNOWLEDGE,Vt=(n,e)=>n?e===dt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,ir=n=>typeof n=="string"?ts(n):n,rr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var or=Object.defineProperty,ar=Object.defineProperties,lr=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,Os=(n,e,t)=>e in n?or(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rt=(n,e)=>{for(var t in e||(e={}))cr.call(e,t)&&Os(n,t,e[t]);if(Is)for(var t of Is(e))dr.call(e,t)&&Os(n,t,e[t]);return n},ur=(n,e)=>ar(n,lr(e));const St=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ns=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),Er=n=>{if(n){if(n.location&&rr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},fs=n=>n.fidesConsentOverride===Fe.ACCEPT||n.fidesConsentOverride===Fe.REJECT,Sr=(n,e,t,s)=>{var i,r,o,a,l,u,E;return s?.fidesDisableBanner||!St(n)||s.fidesModalDisplay==="immediate"||((i=n.experience_config)==null?void 0:i.component)===Et.TCF_OVERLAY&&n.vendor_count===0?!1:((r=n.experience_config)==null?void 0:r.component)===Et.TCF_OVERLAY&&e?s&&fs(s)?!1:(o=n.meta)!=null&&o.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((a=n.experience_config)==null?void 0:a.component)===Et.MODAL||((l=n.experience_config)==null?void 0:l.component)===Et.HEADLESS||!((u=n?.privacy_notices)!=null&&u.length)?!1:t?s&&fs(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(d=>nr(d,t))):!0},_r=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},hr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=mt.OMIT})=>{if(!e?.length)return n;const i=Rt({},n);return s===mt.INCLUDE?e.forEach(r=>{i[r]=t===ut.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},pr=({consent:n,flagType:e=ut.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ut.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,ir(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=Vt(o,a)}}),s):Rt({},n)},As=(n,e,t=[],s,i,r)=>{var o,a,l;const u=Rt({},n),E=(o=window.Fides)==null?void 0:o.options,S=(a=E?.fidesConsentNonApplicableFlagMode)!=null?a:mt.OMIT,d=(l=E?.fidesConsentFlagType)!=null?l:ut.BOOLEAN,O={};Object.assign(O,hr({consent:{},nonApplicableNotices:e??[],flagType:d,mode:S}));const T=t.reduce(($,K)=>ur(Rt({},$),{[K.notice_key]:K.consent_mechanism}),{}),H={};return Object.entries(u).forEach(([$,K])=>{r?.includes($)&&!e?.includes($)||(H[$]=K)}),Object.assign(O,pr({consent:H,consentMechanisms:T,flagType:d})),O},gr=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===ut.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?dt.NOTICE_ONLY:!0:r?dt.OPT_OUT:!1}return s[i.toString()]}});var ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Mt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof ss=="object"&&ss;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,E=function(T){T=String(T).replace(u,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var $=0,K,Z,W="",Re=-1;++Re<H;)Z=l.indexOf(T.charAt(Re)),K=$%4?K*64+Z:Z,$++%4&&(W+=String.fromCharCode(255&K>>(-2*$&6)));return W},S=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,$="",K=-1,Z,W,Re,Ie,pt=T.length-H;++K<pt;)Z=T.charCodeAt(K)<<16,W=T.charCodeAt(++K)<<8,Re=T.charCodeAt(++K),Ie=Z+W+Re,$+=l.charAt(Ie>>18&63)+l.charAt(Ie>>12&63)+l.charAt(Ie>>6&63)+l.charAt(Ie&63);return H==2?(Z=T.charCodeAt(K)<<8,W=T.charCodeAt(++K),Ie=Z+W,$+=l.charAt(Ie>>10)+l.charAt(Ie>>4&63)+l.charAt(Ie<<2&63)+"="):H==1&&(Ie=T.charCodeAt(K),$+=l.charAt(Ie>>2)+l.charAt(Ie<<4&63)+"=="),$},d={encode:S,decode:E,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(s[O]=d[O]);else t.base64=d})(ss)}(Mt,Mt.exports);var Cs=Mt.exports;/*! js-cookie v3.0.5 | MIT */function vt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var Tr={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ns(n,e){function t(i,r,o){if(!(typeof document>"u")){o=vt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),u=l.slice(1).join("=");try{var E=decodeURIComponent(l[0]);if(o[E]=n.read(u,E),i===E)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",vt({},r,{expires:-1}))},withAttributes:function(i){return ns(this.converter,vt({},this.attributes,i))},withConverter:function(i){return ns(vt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Ir=ns(Tr,{path:"/"});let bt;const Or=new Uint8Array(16);function Nr(){if(!bt&&(bt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bt(Or)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function fr(n,e=0){return Ae[n[e+0]]+Ae[n[e+1]]+Ae[n[e+2]]+Ae[n[e+3]]+"-"+Ae[n[e+4]]+Ae[n[e+5]]+"-"+Ae[n[e+6]]+Ae[n[e+7]]+"-"+Ae[n[e+8]]+Ae[n[e+9]]+"-"+Ae[n[e+10]]+Ae[n[e+11]]+Ae[n[e+12]]+Ae[n[e+13]]+Ae[n[e+14]]+Ae[n[e+15]]}const Ar=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ps={randomUUID:Ar};function ws(n,e,t){if(Ps.randomUUID&&!n)return Ps.randomUUID();n=n||{};const s=n.random||(n.rng||Nr)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fr(s)}var is=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(is||{});const rs=407,Lt=",",Cr=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],Pr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Cr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),is.CONSENT.toString(),is.LEGITIMATE_INTERESTS.toString();const wr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Dr=Object.defineProperty,mr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,ms=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vr=(n,e)=>{for(var t in e||(e={}))Rr.call(e,t)&&ms(n,t,e[t]);if(Ds)for(var t of Ds(e))Mr.call(e,t)&&ms(n,t,e[t]);return n},br=(n,e)=>mr(n,Vr(e)),Lr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Vs="fides_consent",Gr=365,Gt=Ir.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),yr=()=>ws();yr();const Ur=n=>Gt.get(n),Fr=()=>{const n=Ur(Vs);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Cs.decode(n))}catch{return}}},Rs=(n,e=!1)=>{if(typeof document>"u")return;const s=new Date().toISOString();n.fides_meta.updatedAt=s;let i=JSON.stringify(n);e&&(i=Cs.encode(i));const r=window.location.hostname.split(".");let o="";for(let a=1;a<=r.length;a+=1)if(o=r.slice(-a).join("."),Gt.set(Vs,i,{path:"/",domain:o,expires:Gr})){const u=Fr();if(u&&u.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},xr=n=>{const e={};return Pr.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ts(r.preference)]))}),e},Br=(n,e=!0)=>{n.forEach(t=>{var s;if(Gt.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;Gt.remove(t.name,{domain:`.${i}`})}})},Hr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ts(s)]));return Object.fromEntries(e)},$r=(n,e)=>Lr(void 0,null,function*(){var t;const s=(t=window.Fides)==null?void 0:t.experience,i=s?.non_applicable_privacy_notices||[];return br(vr({},n),{consent:Hr(e),non_applicable_notice_keys:i})}),We=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},yt=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=We(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Kr=n=>We(n).source==="gacp",zr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>yt(s,n.gvl)).map(s=>+We(s).id)},kr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>yt(i,n.gvl)).map(i=>+We(i).id)},Ms=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(Lt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},vs=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(Lt))||[]).concat(s);return s.map((o,a)=>a<2?`${i[a]},`:a===2?t:a===3&&i[3]?`,${i[3]}`:o).join("")},Yr=1,Ut={us:{name:X.NAME,id:X.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:ie.NAME,id:ie.ID},us_ct:{name:re.NAME,id:re.ID},us_ut:{name:ge.NAME,id:ge.ID},us_va:{name:pe.NAME,id:pe.ID},us_de:{name:ce.NAME,id:ce.ID},us_fl:{name:Te.NAME,id:Te.ID},us_ia:{name:de.NAME,id:de.ID},us_mt:{name:oe.NAME,id:oe.ID},us_ne:{name:ue.NAME,id:ue.ID},us_nh:{name:Ee.NAME,id:Ee.ID},us_nj:{name:Se.NAME,id:Se.ID},us_or:{name:ae.NAME,id:ae.ID},us_tn:{name:_e.NAME,id:_e.ID},us_tx:{name:le.NAME,id:le.ID}},jr=[X.NAME,ne.NAME,ie.NAME,re.NAME,ce.NAME,de.NAME,oe.NAME,ue.NAME,Ee.NAME,Se.NAME,ae.NAME,_e.NAME,le.NAME];var $e=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))($e||{});function _t(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function Wr(n){var e;if((e=n?.experience_config)!=null&&e.translations){const{translations:t}=n.experience_config,s=t.find(i=>i.is_default);return s?.language}}function Qr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}function qr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}var Jr=Object.defineProperty,Xr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,Ls=(n,e,t)=>e in n?Jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e)=>{for(var t in e||(e={}))eo.call(e,t)&&Ls(n,t,e[t]);if(bs)for(var t of bs(e))to.call(e,t)&&Ls(n,t,e[t]);return n},ys=(n,e)=>Xr(n,Zr(e)),so=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const no={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},io="Fides.js",ro=(n,e,t,s,i)=>so(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=ys(Gs({},no),{body:JSON.stringify(ys(Gs({},e),{source:io}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var oo=Object.defineProperty,ao=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Fs=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tt=(n,e)=>{for(var t in e||(e={}))co.call(e,t)&&Fs(n,t,e[t]);if(Us)for(var t of Us(e))uo.call(e,t)&&Fs(n,t,e[t]);return n},Eo=(n,e)=>ao(n,lo(e)),Ft=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(Ft||{});const xs=(n,e,t)=>{var s,i,r,o,a,l,u,E;const S=e?Tt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=Tt({consentMethod:S?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(d.trigger=Tt(Tt({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,n),T=O?.startTime,H=S;H&&S?.consent&&(H.consent=As(S.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices,void 0,void 0,S.non_applicable_notice_keys));const $=new CustomEvent(n,{detail:Eo(Tt({},H),{debug:!!((E=(u=window.Fides)==null?void 0:u.options)!=null&&E.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent($)}};var So=Object.defineProperty,_o=(n,e,t)=>e in n?So(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ho=(n,e,t)=>_o(n,e+"",t);class po{constructor(){ho(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=ws()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const go=new po;var To=Object.defineProperty,Io=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,Hs=(n,e,t)=>e in n?To(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ke=(n,e)=>{for(var t in e||(e={}))No.call(e,t)&&Hs(n,t,e[t]);if(Bs)for(var t of Bs(e))fo.call(e,t)&&Hs(n,t,e[t]);return n},xt=(n,e)=>Io(n,Oo(e)),os=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ao=[Fe.SCRIPT,Fe.GPC,Fe.OT_MIGRATION];function Co(n,e,t,s,i,r,o,a,l){return os(this,null,function*(){const u=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),E=Ke({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield ro(s,E,n,e,t)})}const Po=n=>os(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:u,tcf:E,updateCookie:S}){var d,O,T,H,$,K,Z,W,Re;if(!S&&e&&(S=we=>$r(we,e)),!S&&!e)throw new Error("updateCookie is required");const Ie=xt(Ke({},l?.trigger),{origin:((d=l?.trigger)==null?void 0:d.origin)||(Ao.includes(i)?Ft.EXTERNAL:Ft.FIDES)}),pt=yield S(a);Object.assign(a,pt),Object.assign(a.fides_meta,{consentMethod:i}),xs("FidesUpdating",a,xt(Ke({},l),{trigger:Ie}));const At=As(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,($=(H=window.Fides)==null?void 0:H.experience)==null?void 0:$.privacy_notices,void 0,void 0,a.non_applicable_notice_keys),he=!!((Z=(K=window.Fides)==null?void 0:K.experience)!=null&&Z.non_applicable_privacy_notices)||!!((Re=(W=window.Fides)==null?void 0:W.experience)!=null&&Re.privacy_notices);if(window.Fides.consent=gr(At,r,he),window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Rs(xt(Ke({},a),{consent:At}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Co(r,a,s,i,t,e,E,o,u)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Ge,Xe;(Ge=we.notice)!=null&&Ge.cookies&&Br(we.notice.cookies,(Xe=s.experience_config)==null?void 0:Xe.auto_subdomain_cookie_deletion)}),xs("FidesUpdated",a,xt(Ke({},l),{trigger:Ie}))}),$s=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==Fe.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const E=l?.consent_mechanism===dt.NOTICE_ONLY;return E&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==Fe.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!E&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),Ks=(n,e)=>os(void 0,null,function*(){var t;const{experience:s,cookie:i,config:r,locale:o}=n;if(!s)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(et).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(et).join(", ")} (default is ${et.THROW})`);const{noticeConsent:a,fidesString:l,validation:u=et.THROW,consentMethod:E=Fe.SCRIPT,eventExtraDetails:S={trigger:{origin:Ft.EXTERNAL}},tcf:d,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:$}=s,K=Wr(s)||Zi,Z=he=>{if(u===et.THROW)throw new Error(he);u===et.WARN&&console.warn(he)};let W=i.consent||{};if(l)try{const he=Ms(l);if(he.nc){const we=_r(he.nc);W=Ke(Ke({},i.consent),we);const Ge=$s(H||[],$||[],W,E);Ge&&Z(Ge.message)}}catch(he){const we=he instanceof Error?he.message:String(he);Z(`Invalid fidesString provided: ${we}`)}else if(a){const he=$s(H||[],$||[],a,E);he&&Z(he.message),W=Ke(Ke({},i.consent),a)}const Re=[];Object.entries(W).forEach(([he,we])=>{const Ge=H?.find(Xe=>Xe.notice_key===he);if(Ge){const Xe=Qr(o,K,Ge),ls=Xe?.privacy_notice_history_id;let jt;if(typeof we=="boolean"?jt=Vt(we,Ge.consent_mechanism):jt=we,ls){const Sn=new sr(Ge,jt,ls);Re.push(Sn)}}});let Ie;if((t=T?.translations)!=null&&t.length){const he=qr(o,K,T);Ie=he?.privacy_experience_config_history_id}const pt=Er(r.geolocation),At=go.getServedNoticeHistoryId();return Po({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:E,options:r.options,userLocationString:pt,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:At,tcf:d,updateCookie:O})});class Qe extends Error{constructor(e){super(e),this.name="DecodingError"}}class ze extends Error{constructor(e){super(e),this.name="EncodingError"}}class ht extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class as{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new ze("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Qe("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Ye{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Ye.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Ye.langSet.has(e))return e;if(Ye.langSet.has(t))return t;const s=t+"-"+t;if(Ye.langSet.has(s))return s;for(const i of Ye.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Ye.langSet.forEach(e)}get size(){return Ye.langSet.size}}class _{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class It{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var be;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class Be extends It{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new Be;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Be.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class zs extends It{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(Be.unHash(i)):t.push(Be.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Be.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=Be.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var ks;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(ks||(ks={}));var q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(q||(q={}));class Ys{static ID_TO_KEY=[q.CORE,q.VENDORS_DISCLOSED,q.VENDORS_ALLOWED,q.PUBLISHER_TC];static KEY_TO_ID={[q.CORE]:0,[q.VENDORS_DISCLOSED]:1,[q.VENDORS_ALLOWED]:2,[q.PUBLISHER_TC]:3}}class me extends It{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[_.cmpId]=12;static[_.cmpVersion]=12;static[_.consentLanguage]=12;static[_.consentScreen]=6;static[_.created]=36;static[_.isServiceSpecific]=1;static[_.lastUpdated]=36;static[_.policyVersion]=6;static[_.publisherCountryCode]=12;static[_.publisherLegitimateInterests]=24;static[_.publisherConsents]=24;static[_.purposeConsents]=24;static[_.purposeLegitimateInterests]=24;static[_.purposeOneTreatment]=1;static[_.specialFeatureOptins]=12;static[_.useNonStandardTexts]=1;static[_.vendorListVersion]=12;static[_.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class xe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new ze(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");return parseInt(e,2)}}class js{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class qe{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=xe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new Qe("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)xe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Ws{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new ze(`invalid language code: ${e}`);if(t%2===1)throw new ze(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Qe("invalid bit length for language");return s}}class wo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,u="";for(let E=0;E<o;E++){const S=r[E];if(l===0&&(a++,l=S),E===o-1||r[E+1]>s(S,r[o-1])){const d=S!==l;u+=xe.encode(d),u+=P.encode(l,g.vendorId),d&&(u+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=u})}return t}static decode(e){let t=0;const s=new zs,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Be(o,a),u=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let E=0;E<u;E++){const S=xe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Qe(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)s.add(T,l)}else s.add(d,l)}}return s.bitLength=t,s}}var Ot;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Ot||(Ot={}));class Nt{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,u=g.vendorId*2+g.singleOrRange+g.numEntries;let E=a+g.numEntries;return e.forEach((S,d)=>{r+=xe.encode(S),o=e.maxId>u&&E<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),E+=g.singleOrRange,E+=g.vendorId):(s.push(d),E+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(Ot.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Ot.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Ot.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new Qe("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const u=xe.decode(e.charAt(i));i+=g.singleOrRange;const E=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,u){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=E;d<=S;d++)s.set(d)}else s.set(E)}}else{const a=e.substr(i,r);i+=r,s=qe.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=xe.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function Qs(){return{[_.version]:P,[_.created]:js,[_.lastUpdated]:js,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:Ws,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:xe,[_.useNonStandardTexts]:xe,[_.specialFeatureOptins]:qe,[_.purposeConsents]:qe,[_.purposeLegitimateInterests]:qe,[_.purposeOneTreatment]:xe,[_.publisherCountryCode]:Ws,[_.vendorConsents]:Nt,[_.vendorLegitimateInterests]:Nt,[_.publisherRestrictions]:wo,segmentType:P,[_.vendorsDisclosed]:Nt,[_.vendorsAllowed]:Nt,[_.publisherConsents]:qe,[_.publisherLegitimateInterests]:qe,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:qe,[_.publisherCustomLegitimateInterests]:qe}}class Do{1={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.purposeConsents,_.vendorConsents]};2={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.policyVersion,_.isServiceSpecific,_.useNonStandardTexts,_.specialFeatureOptins,_.purposeConsents,_.purposeLegitimateInterests,_.purposeOneTreatment,_.publisherCountryCode,_.vendorConsents,_.vendorLegitimateInterests,_.publisherRestrictions],[q.PUBLISHER_TC]:[_.publisherConsents,_.publisherLegitimateInterests,_.numCustomPurposes,_.publisherCustomConsents,_.publisherCustomLegitimateInterests],[q.VENDORS_ALLOWED]:[_.vendorsAllowed],[q.VENDORS_DISCLOSED]:[_.vendorsDisclosed]}}class mo{1=[q.CORE];2=[q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[_.supportOOB]===!0)&&this[2].push(q.VENDORS_DISCLOSED),s&&(e[_.supportOOB]&&e[_.vendorsAllowed].size>0&&this[2].push(q.VENDORS_ALLOWED),this[2].push(q.PUBLISHER_TC))}}}class qs{static fieldSequence=new Do;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new ze(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==q.CORE&&(i=P.encode(Ys.KEY_TO_ID[t],g.segmentType));const r=Qs();return s.forEach(o=>{const a=e[o],l=r[o];let u=g[o];u===void 0&&this.isPublisherCustom(o)&&(u=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,u)}catch(E){throw new ze(`Error encoding ${t}->${o}: ${E.message}`)}}),as.encode(i)}static decode(e,t,s){const i=as.decode(e);let r=0;s===q.CORE&&(t.version=P.decode(i.substr(r,g[_.version]),g[_.version])),s!==q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Qs();return o.forEach(l=>{const u=a[l];let E=g[l];if(E===void 0&&this.isPublisherCustom(l)&&(E=Number(t[_.numCustomPurposes])),E!==0){const S=i.substr(r,E);if(u===Nt?t[l]=u.decode(S,t.version):t[l]=u.decode(S,E),Number.isInteger(E))r+=E;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Qe(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Vo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const u=e.publisherRestrictions.getRestrictions(a);let E=!1;for(let S=0,d=u.length;S<d&&!E;S++)E=u[S].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||u[S].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";E||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new ze("Unable to encode TCModel without a GVL");if(!s.isReady)throw new ze("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new ze(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Ro{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class f extends It{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Ye;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ht("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new ht("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ht("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Ro.fetch(e))}catch(t){throw new ht(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new ht("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ht("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class Js extends It{static consentLanguages=f.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new zs;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){f.isInstanceOf(e)||(e=new f(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class Mo{static encode(e,t){let s="",i;return e=Vo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new mo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=qs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new Js);for(let r=0;r<i;r++){const o=s[r],l=as.decode(o.charAt(0)).substr(0,g.segmentType),u=Ys.ID_TO_KEY[P.decode(l,g.segmentType).toString()];qs.decode(o,t,u)}return t}}var Je;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Je||(Je={}));var Bt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Bt||(Bt={}));var Ht;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ht||(Ht={}));var Xs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Xs||(Xs={}));class $t{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class Kt extends $t{respond(){this.throwIfParamInvalid(),this.invokeCallback(new en(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class vo{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new Kt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class fe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new vo;static cmpStatus=Bt.LOADING;static disabled=!1;static displayStatus=Ht.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Bt.LOADING,this.disabled=!1,this.displayStatus=Ht.HIDDEN,this.eventQueue.clear()}}class Zs{cmpId=fe.cmpId;cmpVersion=fe.cmpVersion;gdprApplies=fe.gdprApplies;tcfPolicyVersion=fe.tcfPolicyVersion}class en extends Zs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=fe.eventStatus,this.cmpStatus=fe.cmpStatus,this.listenerId=t,fe.gdprApplies){const s=fe.tcModel;this.tcString=fe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class bo extends en{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),u=t[l].substr(0,i),E=t[l].substr(i+1);t[l]=u+a+E})}}return t}}class Lo extends Zs{cmpLoaded=!0;cmpStatus=fe.cmpStatus;displayStatus=fe.displayStatus;apiVersion=String(fe.apiVersion);gvlVersion;constructor(){super(),fe.tcModel&&fe.tcModel.vendorListVersion&&(this.gvlVersion=+fe.tcModel.vendorListVersion)}}class Go extends $t{respond(){this.invokeCallback(new Lo)}}class yo extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new bo(this.param))}}class Uo extends $t{respond(){const e=fe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new f(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Fo extends Kt{respond(){this.listenerId=fe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class xo extends $t{respond(){this.invokeCallback(fe.eventQueue.remove(this.param))}}class Ra{static[Je.PING]=Go;static[Je.GET_TC_DATA]=Kt;static[Je.GET_IN_APP_TC_DATA]=yo;static[Je.GET_VENDOR_LIST]=Uo;static[Je.ADD_EVENT_LISTENER]=Fo;static[Je.REMOVE_EVENT_LISTENER]=xo}const Bo=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(Lt);return t.split(".")[0]}return e??""};var Ho=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const $o=1,tn=[1,3,4,5,6],Ko=2,zo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Kr).map(o=>We(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Ko}~${s}~dv.${i}`},ko=n=>Ho(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new Js(new f(e.gvl));yield l.gvl.readyPromise,l.cmpId=rs,l.cmpVersion=$o,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const u=e.minimal_tcf?kr(e):zr(e);if(l.gvl.narrowVendorsTo(u),t){t.vendorsConsent.forEach(d=>{var O,T,H;if(yt(d,e.gvl)){const{id:$}=We(d);if(l.vendorConsents.set(+$),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const K=(T=e.gvl)==null?void 0:T.vendors[$];K&&!((H=K?.purposes)!=null&&H.length)&&K.flexiblePurposes.forEach(Z=>{const W=new Be;W.purposeId=Z,W.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+$,W)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:$}=We(H);l.vendorLegitimateInterests.set(+$)});else if(yt(d,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(Z=>Z.id===d)[0],$=H?.purpose_legitimate_interests;let K=!1;if($&&($.map(W=>W.id).filter(W=>tn.includes(W)).length&&(K=!0),!K)){const{id:W}=We(d);l.vendorLegitimateInterests.set(+W)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;tn.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(d=>{l.specialFeatureOptins.set(+d)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(d=>{d.vendors.forEach(O=>{const T=new Be;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=Mo.encode(l,{segments:[q.CORE]});const E=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=zo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:E??[]});a=`${a}${Lt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Yo=Object.defineProperty,jo=Object.defineProperties,Wo=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,qo=Object.prototype.propertyIsEnumerable,nn=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jo=(n,e)=>{for(var t in e||(e={}))Qo.call(e,t)&&nn(n,t,e[t]);if(sn)for(var t of sn(e))qo.call(e,t)&&nn(n,t,e[t]);return n},Xo=(n,e)=>jo(n,Wo(e)),Zo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const tt=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Vt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],st=n=>n?.length?n.map(e=>{const t=Vt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],ea=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:tt({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:tt({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:tt({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:tt({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:tt({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:tt({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},ta=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:st(e.purposesConsent),purpose_legitimate_interests_preferences:st(e.purposesLegint),special_feature_preferences:st(e.specialFeatures),vendor_consent_preferences:st(s),vendor_legitimate_interests_preferences:st(r),system_consent_preferences:st(t),system_legitimate_interests_preferences:st(i)}},sa=(n,e,t,s,i,r)=>Zo(void 0,null,function*(){var o;const a=yield ko({tcStringPreferences:t,experience:s});return Xo(Jo({},n),{fides_string:a,tcf_consent:xr(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),zt="us",na=n=>n?.toLowerCase().startsWith("us"),ia=n=>typeof n?.name!="string"?!1:jr.includes(n.name),ra=({experienceRegion:n,usApproach:e})=>na(n)&&e===$e.NATIONAL?zt:n,oa=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:N.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:N.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:N.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===N.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},rn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ra({experienceRegion:e,usApproach:t?.us_approach}),r=Ut[i];return!r&&t?.us_approach===$e.ALL&&(i=zt,r=Ut[i]),r&&t?.us_approach===$e.ALL&&(s?.some(a=>{var l;return(l=a.gpp_field_mapping)==null?void 0:l.find(u=>u.region===e)})||(i=zt,r=Ut[i])),!r||i===zt&&t?.us_approach===$e.STATE?{}:{gppRegion:i,gppSection:r}},aa=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,u=i[a],E=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;E&&E.forEach(S=>{let d=S.not_available;u===!1?d=S.opt_out:u&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},la=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{n.setFieldValue(t.name,l,1)})})},ca=({gppApi:n,gppSection:e,context:t})=>{var s;if(ia(e)){const i=(s=t?.globalPrivacyControl)!=null?s:!1;n.setFieldValue(e.name,N.GPC,i),n.setFieldValue(e.name,N.GPC_SEGMENT_INCLUDED,!0)}},da=[1,3,4,5,6],ua=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=rn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:u}=o,E=(a=u?.find(S=>S.region===i))==null?void 0:a.mechanism;if(E){const S=E.some(d=>{const O=n.getFieldValue(r.name,d.field),T=Array.isArray(O)?O.join(""):String(O);return T===d.opt_out?!0:(T===d.not_opt_out,!1)});S!==void 0&&(t[l]=!S)}}),t},Ea=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=wr,a=n.getSection(j.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=u.filter(d=>!da.includes(parseInt(d,10))),o.vendorsConsent=E,o.vendorsLegint=S,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},Sa=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),_a=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Ms(n);if(!n||!t||!e||!Sa(t))return;const{locale:s}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===Et.TCF_OVERLAY;if(!i.experience_config.translations.find(E=>_t(E.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const a=i.privacy_notices.map(E=>({notice:E,bestTranslation:E.translations.find(S=>_t(S.language,s))||null}));let l,u;if(r){const E=Ea({cmpApi:e,experience:i});u=i.minimal_tcf?ta({experience:i,enabledIds:E}):ea({experience:i,enabledIds:E}),l=d=>sa(d,u,E,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==dt.NOTICE_ONLY?S[d.notice.notice_key]=E.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),Ks(window.Fides,{noticeConsent:S,tcf:u,updateCookie:l})}else{const E=ua({cmpApi:e,experience:i});Ks(window.Fides,{noticeConsent:E})}},on="__gppLocator",an=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>an(n),5)},ha=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},pa=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ga=()=>{const n=[],e=[];let t;const s=(o,a,l,u)=>{if(o==="queue")return n;if(o==="events")return e;const E={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(E,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:E},!0)}else if(o==="removeEventListener"){let S=!1;for(let d=0;d<e.length;d++)if(e[d].id===l){e.splice(d,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:E},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,u]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!pa(l))return null;if(l.__gppCall&&window.__gpp){const E=l.__gppCall;window.__gpp(E.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:E.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in E?E.parameter:void 0,"version"in E?E.version:"1.1")}return null};ha(on)||(an(on),window.__gpp=s,window.addEventListener("message",i,!1))},ln=(n,{cmpApi:e,experience:t,context:s,cookie:i})=>{const{gppRegion:r,gppSection:o}=rn(t);if(!r||!o)return[];const a=new Set;a.add(o),n({gppApi:e,gppRegion:r,gppSection:o,privacyNotices:t.privacy_notices||[],noticeConsent:i?.consent});const{gpp_settings:l}=t;return oa({gppApi:e,sectionName:o.name,gppSettings:l}),ca({gppApi:e,gppSection:o,context:s}),Array.from(a)},cn=({cmpApi:n,experience:e,context:t})=>ln(la,{cmpApi:n,experience:e,context:t}),dn=({cmpApi:n,cookie:e,experience:t,context:s})=>ln(aa,{cmpApi:n,cookie:e,experience:t,context:s}),un=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(n,e)=>{if(!St(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Bo(n);return s?(e.setFieldValueBySectionId(j.ID,"CmpId",rs),e.setSectionStringById(j.ID,s),!0):!1},Ta=()=>{const n=[];if(St(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===$e.NATIONAL||e.us_approach===$e.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===$e.STATE||e.us_approach===$e.ALL)&&Object.values(Ut).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},Ia=()=>{ga();const n=new Ji(rs,Yr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Ta();if(n.setSupportedAPIs(o),!St(s))return;const{fidesString:a}=r;if(a&&_a({fidesString:a,cmpApi:n}),!a&&(!Sr(s,e.detail,i,r)||!r.tcfEnabled&&Ns(s.privacy_notices)&&!un(i,e.detail.fides_string,s.privacy_notices))){const l=Zt(),u=En(e,n);u&&n.setApplicableSections([j.ID]);const E=cn({cmpApi:n,experience:s,context:l}),S=dn({cmpApi:n,cookie:e.detail,experience:s,context:l});S.length&&n.setApplicableSections(S.map(O=>O.id)),!u&&!E.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const d=vs(n);window.Fides.fides_string=d}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(St(t)){!i.tcfEnabled&&Ns(t.privacy_notices)&&!un(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Me.READY):n.setSignalStatus(Me.NOT_READY),n.setCmpDisplayStatus(je.VISIBLE);const r=cn({cmpApi:n,experience:t,context:Zt()});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(je.HIDDEN),n.setSignalStatus(Me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(je.HIDDEN),En(e,n)&&(n.setApplicableSections([j.ID]),n.fireSectionChange("tcfeuv2")),St(window.Fides.experience)){const s=dn({cmpApi:n,cookie:e.detail,experience:window.Fides.experience,context:Zt()});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=vs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Rs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Me.READY)})};window.addEventListener("FidesInitializing",n=>{var e,t;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&typeof window<"u"&&!((t=window.Fides)!=null&&t.initialized)&&Ia()});
1
+ class Qt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class Pt{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},_n=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new Qt("listenerRegistered",e,!0,new Pt(this.cmpApiContext));this.invokeCallback(t)}},hn=class extends it{respond(){let e=new Pt(this.cmpApiContext);this.invokeCallback(e)}};class pn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var ye;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(ye||(ye={}));let In=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new Qt("listenerRemoved",e,t,new Pt(this.cmpApiContext));this.invokeCallback(s)}},cs=class{static[ye.ADD_EVENT_LISTENER]=_n;static[ye.GET_FIELD]=pn;static[ye.GET_SECTION]=gn;static[ye.HAS_SECTION]=Tn;static[ye.PING]=hn;static[ye.REMOVE_EVENT_LISTENER]=In};var rt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(rt||(rt={}));var je;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(je||(je={}));var ds;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ds||(ds={}));var Me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Me||(Me={}));class On{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=ye.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=ye.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new cs[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return cs[e]!==void 0}}let Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new Qt(e,i,t,new Pt(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class Tt extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ee{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new Tt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new Tt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Oe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Oe("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class At{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Oe("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=D.decode(i),o=At.DICT.charAt(r);t+=o,s+=6}catch{throw new Oe("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=At.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends At{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Oe("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class us{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2,l=e.indexOf("11",r);let E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2;for(let S=u;S<=E;S++)t.push(S)}else{let l=e.indexOf("11",r),u=ot.decode(e.substring(r,l+2))+i;i=u,t.push(u),r=l+2}}return t}}class fn extends Error{constructor(e){super(e),this.name="ValidationError"}}class ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new fn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Ve extends h{constructor(e){super(e),this.name="SubstringError"}}class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Ve("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class An extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return us.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends ve{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new Ve(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var He;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(He||(He={}));const Cn=[He.ID,He.VERSION,He.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new Tt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new Tt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new w;return e.put(He.ID.toString(),new c(6,Le.ID)),e.put(He.VERSION.toString(),new c(6,Le.VERSION)),e.put(He.SECTION_IDS.toString(),new An([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Le extends ee{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const wn=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],Dn=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],mn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],Vn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class nt extends At{static instance=new nt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let u=a;u<=l;u++)t.push(u)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Xt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Rn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class Es extends ve{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Oe(e)}}decode(e){try{let t=[],s=D.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=D.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Xt([]).substring(e,i),u=lt.decode(l);i+=l.length,t.push(new Rn(o,a,u))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=D.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=te.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let u=new Xt([]).substring(e,r);r+=u.length,s+=u}return s}catch(s){throw new Ve(s)}}}class z extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new Ve(s)}}}class Ss{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class wt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ss.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=Ss.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new Ve(s)}}}class ct{static encode(e,t){if(e.length>t)throw new Oe("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=at.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(at.decode(e.substring(s,s+1)));return t}}class Ue extends ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class _s{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=D.encode(63,6);else if(r>=65)s+=D.encode(e.charCodeAt(i)-65,6);else throw new Oe("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=D.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class qt extends ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return _s.encode(this.value,this.stringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=_s.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new Ve(s)}}}class Ze extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),s=t.length,i=e;if(s<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Oe(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new Xt([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Mn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,j.VERSION)),t.put(p.CREATED.toString(),new wt(e)),t.put(p.LAST_UPDATED.toString(),new wt(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new z(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new z(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new qt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new Ze([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new Ze([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Dt extends ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class vn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new Dt(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Dt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class j extends ee{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return j.ID}getName(){return j.NAME}getVersion(){return j.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new vn),e.push(new bn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var I;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Gn=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],yn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new wt(e)),t.put(I.LAST_UPDATED.toString(),new wt(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new z(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Ze([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Ze([])),t.put(I.PUB_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class xn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Dt(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Dt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends ee{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new Fn),e.push(new xn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(I.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==I.CREATED&&e!==I.LAST_UPDATED){let s=new Date;super.setFieldValue(I.CREATED,s),super.setFieldValue(I.LAST_UPDATED,s)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class $n{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ne;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ne||(Ne={}));const Kn=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class zn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new $n;return t.put(Ne.VERSION,new Hn(Pe.VERSION)),t.put(Ne.NOTICE,new Jt("-",e)),t.put(Ne.OPT_OUT_SALE,new Jt("-",e)),t.put(Ne.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ne.VERSION).getValue(),t+=e.get(Ne.NOTICE).getValue(),t+=e.get(Ne.OPT_OUT_SALE).getValue(),t+=e.get(Ne.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ne.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ne.NOTICE).setValue(e.charAt(1)),t.get(Ne.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ne.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends ee{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var N;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(N||(N={}));const kn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],Yn=[N.GPC_SEGMENT_TYPE,N.GPC];class hs{static encode(e,t,s){if(e.length>s)throw new Oe("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return hs.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=hs.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,J.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(N.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(N.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(N.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatGpcSegment '"+e+"'")}}}class J extends ee{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return J.ID}getName(){return J.NAME}getVersion(){return J.VERSION}initializeSegments(){let e=[];return e.push(new jn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const Qn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Xn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(m.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ne extends ee{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ne.ID}getName(){return ne.NAME}getVersion(){return ne.VERSION}initializeSegments(){let e=[];return e.push(new qn),e.push(new Jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var q;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Zn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(q.VERSION.toString(),new c(6,pe.VERSION)),i.put(q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(q.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class pe extends ee{static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pe.ID}getName(){return pe.NAME}getVersion(){return pe.VERSION}initializeSegments(){let e=[];return e.push(new ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ti=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],si=[x.GPC_SEGMENT_TYPE,x.GPC];class ni extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,ie.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(x.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoGpcSegment '"+e+"'")}}}class ie extends ee{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ie.ID}getName(){return ie.NAME}getVersion(){return ie.VERSION}initializeSegments(){let e=[];return e.push(new ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(k||(k={}));const ri=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE];class oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(k.VERSION.toString(),new c(6,ge.VERSION)),i.put(k.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ge extends ee{static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ge.ID}getName(){return ge.NAME}getVersion(){return ge.VERSION}initializeSegments(){let e=[];return e.push(new oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const ai=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],li=[B.GPC_SEGMENT_TYPE,B.GPC];class ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,re.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(B.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtGpcSegment '"+e+"'")}}}class re extends ee{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return re.ID}getName(){return re.NAME}getVersion(){return re.VERSION}initializeSegments(){let e=[];return e.push(new ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const ui=[Y.VERSION,Y.PROCESSING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.ADDITIONAL_DATA_PROCESSING_CONSENT,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class Ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(Y.VERSION.toString(),new c(6,Te.VERSION)),i.put(Y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(Y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Te extends ee{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Te.ID}getName(){return Te.NAME}getVersion(){return Te.VERSION}initializeSegments(){let e=[];return e.push(new Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var V;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const Si=[V.VERSION,V.SHARING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],_i=[V.GPC_SEGMENT_TYPE,V.GPC];class hi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,oe.VERSION)),i.put(V.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class pi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(V.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtGpcSegment '"+e+"'")}}}class oe extends ee{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return oe.ID}getName(){return oe.NAME}getVersion(){return oe.VERSION}initializeSegments(){let e=[];return e.push(new hi),e.push(new pi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const gi=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],Ti=[R.GPC_SEGMENT_TYPE,R.GPC];class Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,ae.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Oi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(R.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrGpcSegment '"+e+"'")}}}class ae extends ee{static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new Ii),e.push(new Oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Ni=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],fi=[M.GPC_SEGMENT_TYPE,M.GPC];class Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,le.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(M.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxGpcSegment '"+e+"'")}}}class le extends ee{static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new Ai),e.push(new Ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Pi=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],wi=[v.GPC_SEGMENT_TYPE,v.GPC];class Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,ce.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(v.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ce extends ee{static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const Vi=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Ri=[b.GPC_SEGMENT_TYPE,b.GPC];class Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,de.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class vi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(b.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaGpcSegment '"+e+"'")}}}class de extends ee{static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return de.ID}getName(){return de.NAME}getVersion(){return de.VERSION}initializeSegments(){let e=[];return e.push(new Mi),e.push(new vi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const bi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Li=[L.GPC_SEGMENT_TYPE,L.GPC];class Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,ue.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(L.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class ue extends ee{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ue.ID}getName(){return ue.NAME}getVersion(){return ue.VERSION}initializeSegments(){let e=[];return e.push(new Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Ui=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Fi=[G.GPC_SEGMENT_TYPE,G.GPC];class xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,Ee.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Fi}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(G.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class Ee extends ee{static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new xi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Hi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],$i=[y.GPC_SEGMENT_TYPE,y.GPC];class Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,Se.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class zi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $i}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(y.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class Se extends ee{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Se.ID}getName(){return Se.NAME}getVersion(){return Se.VERSION}initializeSegments(){let e=[];return e.push(new Ki),e.push(new zi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const ki=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Yi=[U.GPC_SEGMENT_TYPE,U.GPC];class ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,_e.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new z(!0)),e.put(U.GPC.toString(),new z(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnGpcSegment '"+e+"'")}}}class _e extends ee{static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _e.ID}getName(){return _e.NAME}getVersion(){return _e.VERSION}initializeSegments(){let e=[];return e.push(new ji),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class se{static SECTION_ID_NAME_MAP=new Map([[j.ID,j.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.NAME],[J.ID,J.NAME],[ne.ID,ne.NAME],[pe.ID,pe.NAME],[ie.ID,ie.NAME],[ge.ID,ge.NAME],[re.ID,re.NAME],[Te.ID,Te.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[ue.ID,ue.NAME],[Ee.ID,Ee.NAME],[Se.ID,Se.NAME],[_e.ID,_e.NAME]]);static SECTION_ORDER=[j.NAME,Ce.NAME,Pe.NAME,J.NAME,ne.NAME,pe.NAME,ie.NAME,ge.NAME,re.NAME,Te.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,ue.NAME,Ee.NAME,Se.NAME,_e.NAME]}class ps{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===_e.NAME&&(i=new _e,this.sections.set(_e.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new Tt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(se.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Le;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<se.SECTION_ORDER.length;r++){let o=se.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Le;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Le(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===J.ID){let l=new J(t[o+1]);s.set(J.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new j(e);return t.set(j.NAME,s),new Le().setFieldValue(He.SECTION_IDS,[2]),t.set(Le.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(se.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===j.NAME?(s=new j,this.sections.set(j.NAME,s)):e===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===_e.NAME&&(s=new _e,this.sections.set(_e.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(se.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new ps;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new ps,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Zt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let mt=class extends Error{constructor(e){super(e),this.name="GVLError"}},Xi=class Yt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return Yt.langSet.has(e)}forEach(e){Yt.langSet.forEach(e)}get size(){return Yt.langSet.size}},gs=class jt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Xi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=jt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new jt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new mt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new mt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new jt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await Zt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Zt.fetch(r))}return s}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Zt.fetch(s))}catch(i){throw new mt("unable to load language: "+i.message)}}}else throw new mt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new On(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(se.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(se.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(se.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return gs.fromVendorList(e)}async getGvlFromUrl(e){return gs.fromUrl(e)}}const Ji=()=>{var n,e,t,s,i,r;if((n=window.Fides)!=null&&n.options.tcfEnabled&&!((e=window.Fides)!=null&&e.options.gppEnabled)&&!((i=(s=(t=window.Fides)==null?void 0:t.experience)==null?void 0:s.privacy_notices)!=null&&i.length))return!1;if(typeof((r=window.navigator)==null?void 0:r.globalPrivacyControl)=="boolean")return window.navigator.globalPrivacyControl;const a=new URL(window.location.href).searchParams.get("globalPrivacyControl");if(a==="true")return!0;if(a==="false")return!1},es=()=>typeof window>"u"?{}:{globalPrivacyControl:Ji()},Zi="en";var er=Object.defineProperty,tr=(n,e,t)=>e in n?er(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>tr(n,typeof e!="symbol"?e+"":e,t);class sr{constructor(e,t,s){ts(this,"consentPreference"),ts(this,"notice"),ts(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Ts;(n=>{(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Ts||(Ts={}));var dt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(dt||{}),De=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(De||{}),Vt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Vt||{}),ut=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ut||{}),et=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(et||{}),Et=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(Et||{}),Fe=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.EXTERNAL_PROVIDER="external_provider",n))(Fe||{});const nr=(n,e)=>!!Object.keys(e).includes(n.notice_key),ss=n=>!n||n===De.OPT_OUT?!1:n===De.OPT_IN?!0:n===De.ACKNOWLEDGE,Rt=(n,e)=>n?e===dt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,ir=n=>typeof n=="string"?ss(n):n,rr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var or=Object.defineProperty,ar=Object.defineProperties,lr=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,Os=(n,e,t)=>e in n?or(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mt=(n,e)=>{for(var t in e||(e={}))cr.call(e,t)&&Os(n,t,e[t]);if(Is)for(var t of Is(e))dr.call(e,t)&&Os(n,t,e[t]);return n},ur=(n,e)=>ar(n,lr(e));const St=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ns=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),Er=n=>{if(n){if(n.location&&rr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},fs=n=>n.fidesConsentOverride===Fe.ACCEPT||n.fidesConsentOverride===Fe.REJECT,Sr=(n,e,t,s)=>{var i,r,o,a,l,u,E;return s?.fidesDisableBanner||!St(n)||s.fidesModalDisplay==="immediate"||((i=n.experience_config)==null?void 0:i.component)===Et.TCF_OVERLAY&&n.vendor_count===0?!1:((r=n.experience_config)==null?void 0:r.component)===Et.TCF_OVERLAY&&e?s&&fs(s)?!1:(o=n.meta)!=null&&o.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((a=n.experience_config)==null?void 0:a.component)===Et.MODAL||((l=n.experience_config)==null?void 0:l.component)===Et.HEADLESS||!((u=n?.privacy_notices)!=null&&u.length)?!1:t?s&&fs(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(d=>nr(d,t))):!0},_r=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},hr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Vt.OMIT})=>{if(!e?.length)return n;const i=Mt({},n);return s===Vt.INCLUDE?e.forEach(r=>{i[r]=t===ut.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},pr=({consent:n,flagType:e=ut.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ut.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,ir(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=Rt(o,a)}}),s):Mt({},n)},As=(n,e,t=[],s,i,r)=>{var o,a,l;const u=Mt({},n),E=(o=window.Fides)==null?void 0:o.options,S=(a=E?.fidesConsentNonApplicableFlagMode)!=null?a:Vt.OMIT,d=(l=E?.fidesConsentFlagType)!=null?l:ut.BOOLEAN,O={};Object.assign(O,hr({consent:{},nonApplicableNotices:e??[],flagType:d,mode:S}));const T=t.reduce(($,K)=>ur(Mt({},$),{[K.notice_key]:K.consent_mechanism}),{}),H={};return Object.entries(u).forEach(([$,K])=>{r?.includes($)&&!e?.includes($)||(H[$]=K)}),Object.assign(O,pr({consent:H,consentMechanisms:T,flagType:d})),O},gr=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===ut.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?dt.NOTICE_ONLY:!0:r?dt.OPT_OUT:!1}return s[i.toString()]}});var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */vt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof ns=="object"&&ns;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,E=function(T){T=String(T).replace(u,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var $=0,K,Z,W="",Re=-1;++Re<H;)Z=l.indexOf(T.charAt(Re)),K=$%4?K*64+Z:Z,$++%4&&(W+=String.fromCharCode(255&K>>(-2*$&6)));return W},S=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,$="",K=-1,Z,W,Re,Ie,pt=T.length-H;++K<pt;)Z=T.charCodeAt(K)<<16,W=T.charCodeAt(++K)<<8,Re=T.charCodeAt(++K),Ie=Z+W+Re,$+=l.charAt(Ie>>18&63)+l.charAt(Ie>>12&63)+l.charAt(Ie>>6&63)+l.charAt(Ie&63);return H==2?(Z=T.charCodeAt(K)<<8,W=T.charCodeAt(++K),Ie=Z+W,$+=l.charAt(Ie>>10)+l.charAt(Ie>>4&63)+l.charAt(Ie<<2&63)+"="):H==1&&(Ie=T.charCodeAt(K),$+=l.charAt(Ie>>2)+l.charAt(Ie<<4&63)+"=="),$},d={encode:S,decode:E,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(s[O]=d[O]);else t.base64=d})(ns)}(vt,vt.exports);var Cs=vt.exports;/*! js-cookie v3.0.5 | MIT */function bt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var Tr={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function is(n,e){function t(i,r,o){if(!(typeof document>"u")){o=bt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),u=l.slice(1).join("=");try{var E=decodeURIComponent(l[0]);if(o[E]=n.read(u,E),i===E)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",bt({},r,{expires:-1}))},withAttributes:function(i){return is(this.converter,bt({},this.attributes,i))},withConverter:function(i){return is(bt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Ir=is(Tr,{path:"/"});let Lt;const Or=new Uint8Array(16);function Nr(){if(!Lt&&(Lt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Lt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lt(Or)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function fr(n,e=0){return Ae[n[e+0]]+Ae[n[e+1]]+Ae[n[e+2]]+Ae[n[e+3]]+"-"+Ae[n[e+4]]+Ae[n[e+5]]+"-"+Ae[n[e+6]]+Ae[n[e+7]]+"-"+Ae[n[e+8]]+Ae[n[e+9]]+"-"+Ae[n[e+10]]+Ae[n[e+11]]+Ae[n[e+12]]+Ae[n[e+13]]+Ae[n[e+14]]+Ae[n[e+15]]}const Ar=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ps={randomUUID:Ar};function ws(n,e,t){if(Ps.randomUUID&&!n)return Ps.randomUUID();n=n||{};const s=n.random||(n.rng||Nr)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fr(s)}var rs=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(rs||{});const os=407,Gt=",",Cr=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],Pr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Cr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),rs.CONSENT.toString(),rs.LEGITIMATE_INTERESTS.toString();const wr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Dr=Object.defineProperty,mr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,ms=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vr=(n,e)=>{for(var t in e||(e={}))Rr.call(e,t)&&ms(n,t,e[t]);if(Ds)for(var t of Ds(e))Mr.call(e,t)&&ms(n,t,e[t]);return n},br=(n,e)=>mr(n,Vr(e)),Lr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Vs="fides_consent",Gr=365,yt=Ir.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),yr=()=>ws();yr();const Ur=n=>yt.get(n),Fr=()=>{const n=Ur(Vs);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Cs.decode(n))}catch{return}}},Rs=(n,e=!1)=>{if(typeof document>"u")return;const s=new Date().toISOString();n.fides_meta.updatedAt=s;let i=JSON.stringify(n);e&&(i=Cs.encode(i));const r=window.location.hostname.split(".");let o="";for(let a=1;a<=r.length;a+=1)if(o=r.slice(-a).join("."),yt.set(Vs,i,{path:"/",domain:o,expires:Gr})){const u=Fr();if(u&&u.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},xr=n=>{const e={};return Pr.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ss(r.preference)]))}),e},Br=(n,e=!0,t=!0)=>{const{hostname:s}=window.location;n.forEach(i=>{var r;const o=e?s:i.domain;yt.remove(i.name,{path:(r=i.path)!=null?r:"/",domain:o}),t&&yt.remove(i.name,{domain:`.${s}`})})},Hr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ss(s)]));return Object.fromEntries(e)},$r=(n,e)=>Lr(void 0,null,function*(){var t;const s=(t=window.Fides)==null?void 0:t.experience,i=s?.non_applicable_privacy_notices||[];return br(vr({},n),{consent:Hr(e),non_applicable_notice_keys:i})}),We=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Ut=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=We(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Kr=n=>We(n).source==="gacp",zr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>Ut(s,n.gvl)).map(s=>+We(s).id)},kr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>Ut(i,n.gvl)).map(i=>+We(i).id)},Ms=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(Gt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},vs=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(Gt))||[]).concat(s);return s.map((o,a)=>a<2?`${i[a]},`:a===2?t:a===3&&i[3]?`,${i[3]}`:o).join("")},Yr=1,Ft={us:{name:J.NAME,id:J.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:ie.NAME,id:ie.ID},us_ct:{name:re.NAME,id:re.ID},us_ut:{name:ge.NAME,id:ge.ID},us_va:{name:pe.NAME,id:pe.ID},us_de:{name:ce.NAME,id:ce.ID},us_fl:{name:Te.NAME,id:Te.ID},us_ia:{name:de.NAME,id:de.ID},us_mt:{name:oe.NAME,id:oe.ID},us_ne:{name:ue.NAME,id:ue.ID},us_nh:{name:Ee.NAME,id:Ee.ID},us_nj:{name:Se.NAME,id:Se.ID},us_or:{name:ae.NAME,id:ae.ID},us_tn:{name:_e.NAME,id:_e.ID},us_tx:{name:le.NAME,id:le.ID}},jr=[J.NAME,ne.NAME,ie.NAME,re.NAME,ce.NAME,de.NAME,oe.NAME,ue.NAME,Ee.NAME,Se.NAME,ae.NAME,_e.NAME,le.NAME];var $e=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))($e||{});function _t(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function Wr(n){var e;if((e=n?.experience_config)!=null&&e.translations){const{translations:t}=n.experience_config,s=t.find(i=>i.is_default);return s?.language}}function Qr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}function Xr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}var qr=Object.defineProperty,Jr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,to=Object.prototype.propertyIsEnumerable,Ls=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e)=>{for(var t in e||(e={}))eo.call(e,t)&&Ls(n,t,e[t]);if(bs)for(var t of bs(e))to.call(e,t)&&Ls(n,t,e[t]);return n},ys=(n,e)=>Jr(n,Zr(e)),so=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const no={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},io="Fides.js",ro=(n,e,t,s,i)=>so(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=ys(Gs({},no),{body:JSON.stringify(ys(Gs({},e),{source:io}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var oo=Object.defineProperty,ao=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,Us=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,Fs=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,It=(n,e)=>{for(var t in e||(e={}))co.call(e,t)&&Fs(n,t,e[t]);if(Us)for(var t of Us(e))uo.call(e,t)&&Fs(n,t,e[t]);return n},Eo=(n,e)=>ao(n,lo(e)),xt=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(xt||{});const xs=(n,e,t)=>{var s,i,r,o,a,l,u,E;const S=e?It({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=It({consentMethod:S?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(d.trigger=It(It({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,n),T=O?.startTime,H=S;H&&S?.consent&&(H.consent=As(S.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices,void 0,void 0,S.non_applicable_notice_keys));const $=new CustomEvent(n,{detail:Eo(It({},H),{debug:!!((E=(u=window.Fides)==null?void 0:u.options)!=null&&E.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent($)}};var So=Object.defineProperty,_o=(n,e,t)=>e in n?So(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ho=(n,e,t)=>_o(n,e+"",t);class po{constructor(){ho(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=ws()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const go=new po;var To=Object.defineProperty,Io=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,Hs=(n,e,t)=>e in n?To(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ke=(n,e)=>{for(var t in e||(e={}))No.call(e,t)&&Hs(n,t,e[t]);if(Bs)for(var t of Bs(e))fo.call(e,t)&&Hs(n,t,e[t]);return n},Bt=(n,e)=>Io(n,Oo(e)),as=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ao=[Fe.SCRIPT,Fe.GPC,Fe.EXTERNAL_PROVIDER];function Co(n,e,t,s,i,r,o,a,l){return as(this,null,function*(){const u=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),E=Ke({browser_identity:e.identity,preferences:u,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield ro(s,E,n,e,t)})}const Po=n=>as(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:u,tcf:E,updateCookie:S}){var d,O,T,H,$,K,Z,W,Re;if(!S&&e&&(S=we=>$r(we,e)),!S&&!e)throw new Error("updateCookie is required");const Ie=Bt(Ke({},l?.trigger),{origin:((d=l?.trigger)==null?void 0:d.origin)||(Ao.includes(i)?xt.EXTERNAL:xt.FIDES)}),pt=yield S(a);Object.assign(a,pt),Object.assign(a.fides_meta,{consentMethod:i}),xs("FidesUpdating",a,Bt(Ke({},l),{trigger:Ie}));const Ct=As(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,($=(H=window.Fides)==null?void 0:H.experience)==null?void 0:$.privacy_notices,void 0,void 0,a.non_applicable_notice_keys),he=!!((Z=(K=window.Fides)==null?void 0:K.experience)!=null&&Z.non_applicable_privacy_notices)||!!((Re=(W=window.Fides)==null?void 0:W.experience)!=null&&Re.privacy_notices);if(window.Fides.consent=gr(Ct,r,he),window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Rs(Bt(Ke({},a),{consent:Ct}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Co(r,a,s,i,t,e,E,o,u)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Ge,Je,gt;(Ge=we.notice)!=null&&Ge.cookies&&Br(we.notice.cookies,(Je=s.experience_config)==null?void 0:Je.cookie_deletion_based_on_host_domain,(gt=s.experience_config)==null?void 0:gt.auto_subdomain_cookie_deletion)}),xs("FidesUpdated",a,Bt(Ke({},l),{trigger:Ie}))}),$s=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==Fe.EXTERNAL_PROVIDER)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const E=l?.consent_mechanism===dt.NOTICE_ONLY;return E&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==Fe.EXTERNAL_PROVIDER?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!E&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),Ks=(n,e)=>as(void 0,null,function*(){var t;const{experience:s,cookie:i,config:r,locale:o}=n;if(!s)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(et).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(et).join(", ")} (default is ${et.THROW})`);const{noticeConsent:a,fidesString:l,validation:u=et.THROW,consentMethod:E=Fe.SCRIPT,eventExtraDetails:S={trigger:{origin:xt.EXTERNAL}},tcf:d,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:$}=s,K=Wr(s)||Zi,Z=he=>{if(u===et.THROW)throw new Error(he);u===et.WARN&&console.warn(he)};let W=i.consent||{};if(l)try{const he=Ms(l);if(he.nc){const we=_r(he.nc);W=Ke(Ke({},i.consent),we);const Ge=$s(H||[],$||[],W,E);Ge&&Z(Ge.message)}}catch(he){const we=he instanceof Error?he.message:String(he);Z(`Invalid fidesString provided: ${we}`)}else if(a){const he=$s(H||[],$||[],a,E);he&&Z(he.message),W=Ke(Ke({},i.consent),a)}const Re=[];Object.entries(W).forEach(([he,we])=>{const Ge=H?.find(Je=>Je.notice_key===he);if(Ge){const Je=Qr(o,K,Ge),gt=Je?.privacy_notice_history_id;let Wt;if(typeof we=="boolean"?Wt=Rt(we,Ge.consent_mechanism):Wt=we,gt){const Sn=new sr(Ge,Wt,gt);Re.push(Sn)}}});let Ie;if((t=T?.translations)!=null&&t.length){const he=Xr(o,K,T);Ie=he?.privacy_experience_config_history_id}const pt=Er(r.geolocation),Ct=go.getServedNoticeHistoryId();return Po({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:E,options:r.options,userLocationString:pt,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:Ct,tcf:d,updateCookie:O})});class Qe extends Error{constructor(e){super(e),this.name="DecodingError"}}class ze extends Error{constructor(e){super(e),this.name="EncodingError"}}class ht extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class ls{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new ze("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Qe("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Ye{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Ye.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Ye.langSet.has(e))return e;if(Ye.langSet.has(t))return t;const s=t+"-"+t;if(Ye.langSet.has(s))return s;for(const i of Ye.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Ye.langSet.forEach(e)}get size(){return Ye.langSet.size}}class _{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class Ot{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var be;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class Be extends Ot{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new Be;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Be.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class zs extends Ot{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(Be.unHash(i)):t.push(Be.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Be.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=Be.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var ks;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(ks||(ks={}));var X;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(X||(X={}));class Ys{static ID_TO_KEY=[X.CORE,X.VENDORS_DISCLOSED,X.VENDORS_ALLOWED,X.PUBLISHER_TC];static KEY_TO_ID={[X.CORE]:0,[X.VENDORS_DISCLOSED]:1,[X.VENDORS_ALLOWED]:2,[X.PUBLISHER_TC]:3}}class me extends Ot{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[_.cmpId]=12;static[_.cmpVersion]=12;static[_.consentLanguage]=12;static[_.consentScreen]=6;static[_.created]=36;static[_.isServiceSpecific]=1;static[_.lastUpdated]=36;static[_.policyVersion]=6;static[_.publisherCountryCode]=12;static[_.publisherLegitimateInterests]=24;static[_.publisherConsents]=24;static[_.purposeConsents]=24;static[_.purposeLegitimateInterests]=24;static[_.purposeOneTreatment]=1;static[_.specialFeatureOptins]=12;static[_.useNonStandardTexts]=1;static[_.vendorListVersion]=12;static[_.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class xe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new ze(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");return parseInt(e,2)}}class js{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class Xe{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=xe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new Qe("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)xe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Ws{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new ze(`invalid language code: ${e}`);if(t%2===1)throw new ze(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Qe("invalid bit length for language");return s}}class wo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,u="";for(let E=0;E<o;E++){const S=r[E];if(l===0&&(a++,l=S),E===o-1||r[E+1]>s(S,r[o-1])){const d=S!==l;u+=xe.encode(d),u+=P.encode(l,g.vendorId),d&&(u+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=u})}return t}static decode(e){let t=0;const s=new zs,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Be(o,a),u=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let E=0;E<u;E++){const S=xe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Qe(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)s.add(T,l)}else s.add(d,l)}}return s.bitLength=t,s}}var Nt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Nt||(Nt={}));class ft{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,u=g.vendorId*2+g.singleOrRange+g.numEntries;let E=a+g.numEntries;return e.forEach((S,d)=>{r+=xe.encode(S),o=e.maxId>u&&E<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),E+=g.singleOrRange,E+=g.vendorId):(s.push(d),E+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(Nt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Nt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Nt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new Qe("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const u=xe.decode(e.charAt(i));i+=g.singleOrRange;const E=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,u){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=E;d<=S;d++)s.set(d)}else s.set(E)}}else{const a=e.substr(i,r);i+=r,s=Xe.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=xe.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function Qs(){return{[_.version]:P,[_.created]:js,[_.lastUpdated]:js,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:Ws,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:xe,[_.useNonStandardTexts]:xe,[_.specialFeatureOptins]:Xe,[_.purposeConsents]:Xe,[_.purposeLegitimateInterests]:Xe,[_.purposeOneTreatment]:xe,[_.publisherCountryCode]:Ws,[_.vendorConsents]:ft,[_.vendorLegitimateInterests]:ft,[_.publisherRestrictions]:wo,segmentType:P,[_.vendorsDisclosed]:ft,[_.vendorsAllowed]:ft,[_.publisherConsents]:Xe,[_.publisherLegitimateInterests]:Xe,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:Xe,[_.publisherCustomLegitimateInterests]:Xe}}class Do{1={[X.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.purposeConsents,_.vendorConsents]};2={[X.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.policyVersion,_.isServiceSpecific,_.useNonStandardTexts,_.specialFeatureOptins,_.purposeConsents,_.purposeLegitimateInterests,_.purposeOneTreatment,_.publisherCountryCode,_.vendorConsents,_.vendorLegitimateInterests,_.publisherRestrictions],[X.PUBLISHER_TC]:[_.publisherConsents,_.publisherLegitimateInterests,_.numCustomPurposes,_.publisherCustomConsents,_.publisherCustomLegitimateInterests],[X.VENDORS_ALLOWED]:[_.vendorsAllowed],[X.VENDORS_DISCLOSED]:[_.vendorsDisclosed]}}class mo{1=[X.CORE];2=[X.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(X.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[_.supportOOB]===!0)&&this[2].push(X.VENDORS_DISCLOSED),s&&(e[_.supportOOB]&&e[_.vendorsAllowed].size>0&&this[2].push(X.VENDORS_ALLOWED),this[2].push(X.PUBLISHER_TC))}}}class Xs{static fieldSequence=new Do;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new ze(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==X.CORE&&(i=P.encode(Ys.KEY_TO_ID[t],g.segmentType));const r=Qs();return s.forEach(o=>{const a=e[o],l=r[o];let u=g[o];u===void 0&&this.isPublisherCustom(o)&&(u=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,u)}catch(E){throw new ze(`Error encoding ${t}->${o}: ${E.message}`)}}),ls.encode(i)}static decode(e,t,s){const i=ls.decode(e);let r=0;s===X.CORE&&(t.version=P.decode(i.substr(r,g[_.version]),g[_.version])),s!==X.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Qs();return o.forEach(l=>{const u=a[l];let E=g[l];if(E===void 0&&this.isPublisherCustom(l)&&(E=Number(t[_.numCustomPurposes])),E!==0){const S=i.substr(r,E);if(u===ft?t[l]=u.decode(S,t.version):t[l]=u.decode(S,E),Number.isInteger(E))r+=E;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Qe(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Vo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const u=e.publisherRestrictions.getRestrictions(a);let E=!1;for(let S=0,d=u.length;S<d&&!E;S++)E=u[S].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||u[S].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";E||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new ze("Unable to encode TCModel without a GVL");if(!s.isReady)throw new ze("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new ze(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Ro{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},u=()=>{o(new Error("error"))},E=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",u),a.addEventListener("abort",E),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class f extends Ot{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Ye;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ht("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new ht("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ht("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Ro.fetch(e))}catch(t){throw new ht(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new ht("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ht("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class qs extends Ot{static consentLanguages=f.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new zs;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){f.isInstanceOf(e)||(e=new f(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class Mo{static encode(e,t){let s="",i;return e=Vo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new mo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Xs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new qs);for(let r=0;r<i;r++){const o=s[r],l=ls.decode(o.charAt(0)).substr(0,g.segmentType),u=Ys.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Xs.decode(o,t,u)}return t}}var qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(qe||(qe={}));var Ht;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Ht||(Ht={}));var $t;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})($t||($t={}));var Js;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Js||(Js={}));class Kt{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class zt extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new en(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class vo{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new zt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class fe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new vo;static cmpStatus=Ht.LOADING;static disabled=!1;static displayStatus=$t.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Ht.LOADING,this.disabled=!1,this.displayStatus=$t.HIDDEN,this.eventQueue.clear()}}class Zs{cmpId=fe.cmpId;cmpVersion=fe.cmpVersion;gdprApplies=fe.gdprApplies;tcfPolicyVersion=fe.tcfPolicyVersion}class en extends Zs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=fe.eventStatus,this.cmpStatus=fe.cmpStatus,this.listenerId=t,fe.gdprApplies){const s=fe.tcModel;this.tcString=fe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class bo extends en{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),u=t[l].substr(0,i),E=t[l].substr(i+1);t[l]=u+a+E})}}return t}}class Lo extends Zs{cmpLoaded=!0;cmpStatus=fe.cmpStatus;displayStatus=fe.displayStatus;apiVersion=String(fe.apiVersion);gvlVersion;constructor(){super(),fe.tcModel&&fe.tcModel.vendorListVersion&&(this.gvlVersion=+fe.tcModel.vendorListVersion)}}class Go extends Kt{respond(){this.invokeCallback(new Lo)}}class yo extends zt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new bo(this.param))}}class Uo extends Kt{respond(){const e=fe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new f(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Fo extends zt{respond(){this.listenerId=fe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class xo extends Kt{respond(){this.invokeCallback(fe.eventQueue.remove(this.param))}}class Ra{static[qe.PING]=Go;static[qe.GET_TC_DATA]=zt;static[qe.GET_IN_APP_TC_DATA]=yo;static[qe.GET_VENDOR_LIST]=Uo;static[qe.ADD_EVENT_LISTENER]=Fo;static[qe.REMOVE_EVENT_LISTENER]=xo}const Bo=n=>{var e,t;if(((t=(e=window.Fides)==null?void 0:e.options)==null?void 0:t.fidesTcfGdprApplies)===!1)return null;const{fides_string:s}=n.detail;if(s){const[i]=s.split(Gt);return i.split(".")[0]}return s??""};var Ho=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const $o=1,tn=[1,3,4,5,6],Ko=2,zo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Kr).map(o=>We(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Ko}~${s}~dv.${i}`},ko=n=>Ho(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new qs(new f(e.gvl));yield l.gvl.readyPromise,l.cmpId=os,l.cmpVersion=$o,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const u=e.minimal_tcf?kr(e):zr(e);if(l.gvl.narrowVendorsTo(u),t){t.vendorsConsent.forEach(d=>{var O,T,H;if(Ut(d,e.gvl)){const{id:$}=We(d);if(l.vendorConsents.set(+$),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const K=(T=e.gvl)==null?void 0:T.vendors[$];K&&!((H=K?.purposes)!=null&&H.length)&&K.flexiblePurposes.forEach(Z=>{const W=new Be;W.purposeId=Z,W.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+$,W)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:$}=We(H);l.vendorLegitimateInterests.set(+$)});else if(Ut(d,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(Z=>Z.id===d)[0],$=H?.purpose_legitimate_interests;let K=!1;if($&&($.map(W=>W.id).filter(W=>tn.includes(W)).length&&(K=!0),!K)){const{id:W}=We(d);l.vendorLegitimateInterests.set(+W)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;tn.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(d=>{l.specialFeatureOptins.set(+d)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(d=>{d.vendors.forEach(O=>{const T=new Be;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=Mo.encode(l,{segments:[X.CORE]});const E=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=zo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:E??[]});a=`${a}${Gt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Yo=Object.defineProperty,jo=Object.defineProperties,Wo=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,nn=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qo=(n,e)=>{for(var t in e||(e={}))Qo.call(e,t)&&nn(n,t,e[t]);if(sn)for(var t of sn(e))Xo.call(e,t)&&nn(n,t,e[t]);return n},Jo=(n,e)=>jo(n,Wo(e)),Zo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(u){i(u)}},o=l=>{try{a(t.throw(l))}catch(u){i(u)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const tt=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Rt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],st=n=>n?.length?n.map(e=>{const t=Rt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],ea=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:tt({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:tt({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:tt({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:tt({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:tt({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:tt({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},ta=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:st(e.purposesConsent),purpose_legitimate_interests_preferences:st(e.purposesLegint),special_feature_preferences:st(e.specialFeatures),vendor_consent_preferences:st(s),vendor_legitimate_interests_preferences:st(r),system_consent_preferences:st(t),system_legitimate_interests_preferences:st(i)}},sa=(n,e,t,s,i,r)=>Zo(void 0,null,function*(){var o;const a=yield ko({tcStringPreferences:t,experience:s});return Jo(qo({},n),{fides_string:a,tcf_consent:xr(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),kt="us",na=n=>n?.toLowerCase().startsWith("us"),ia=n=>typeof n?.name!="string"?!1:jr.includes(n.name),ra=({experienceRegion:n,usApproach:e})=>na(n)&&e===$e.NATIONAL?kt:n,oa=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:N.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:N.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:N.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===N.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},rn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ra({experienceRegion:e,usApproach:t?.us_approach}),r=Ft[i];return!r&&t?.us_approach===$e.ALL&&(i=kt,r=Ft[i]),r&&t?.us_approach===$e.ALL&&(s?.some(a=>{var l;return(l=a.gpp_field_mapping)==null?void 0:l.find(u=>u.region===e)})||(i=kt,r=Ft[i])),!r||i===kt&&t?.us_approach===$e.STATE?{}:{gppRegion:i,gppSection:r}},aa=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,u=i[a],E=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;E&&E.forEach(S=>{let d=S.not_available;u===!1?d=S.opt_out:u&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},la=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{n.setFieldValue(t.name,l,1)})})},ca=({gppApi:n,gppSection:e,context:t})=>{var s;if(ia(e)){const i=(s=t?.globalPrivacyControl)!=null?s:!1;n.setFieldValue(e.name,N.GPC,i),n.setFieldValue(e.name,N.GPC_SEGMENT_INCLUDED,!0)}},da=[1,3,4,5,6],ua=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=rn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:u}=o,E=(a=u?.find(S=>S.region===i))==null?void 0:a.mechanism;if(E){const S=E.some(d=>{const O=n.getFieldValue(r.name,d.field),T=Array.isArray(O)?O.join(""):String(O);return T===d.opt_out?!0:(T===d.not_opt_out,!1)});S!==void 0&&(t[l]=!S)}}),t},Ea=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=wr,a=n.getSection(j.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=u.filter(d=>!da.includes(parseInt(d,10))),o.vendorsConsent=E,o.vendorsLegint=S,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},Sa=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),_a=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Ms(n);if(!n||!t||!e||!Sa(t))return;const{locale:s}=window.Fides,i=window.Fides.experience;if(!i||!i.experience_config||!i.privacy_notices)return;const r=i.experience_config.component===Et.TCF_OVERLAY;if(!i.experience_config.translations.find(E=>_t(E.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const a=i.privacy_notices.map(E=>({notice:E,bestTranslation:E.translations.find(S=>_t(S.language,s))||null}));let l,u;if(r){const E=Ea({cmpApi:e,experience:i});u=i.minimal_tcf?ta({experience:i,enabledIds:E}):ea({experience:i,enabledIds:E}),l=d=>sa(d,u,E,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==dt.NOTICE_ONLY?S[d.notice.notice_key]=E.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),Ks(window.Fides,{noticeConsent:S,tcf:u,updateCookie:l})}else{const E=ua({cmpApi:e,experience:i});Ks(window.Fides,{noticeConsent:E})}},on="__gppLocator",an=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>an(n),5)},ha=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},pa=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ga=()=>{const n=[],e=[];let t;const s=(o,a,l,u)=>{if(o==="queue")return n;if(o==="events")return e;const E={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(E,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:E},!0)}else if(o==="removeEventListener"){let S=!1;for(let d=0;d<e.length;d++)if(e[d].id===l){e.splice(d,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:E},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,u]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!pa(l))return null;if(l.__gppCall&&window.__gpp){const E=l.__gppCall;window.__gpp(E.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:E.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in E?E.parameter:void 0,"version"in E?E.version:"1.1")}return null};ha(on)||(an(on),window.__gpp=s,window.addEventListener("message",i,!1))},ln=(n,{cmpApi:e,experience:t,context:s,cookie:i})=>{const{gppRegion:r,gppSection:o}=rn(t);if(!r||!o)return[];const a=new Set;a.add(o),n({gppApi:e,gppRegion:r,gppSection:o,privacyNotices:t.privacy_notices||[],noticeConsent:i?.consent});const{gpp_settings:l}=t;return oa({gppApi:e,sectionName:o.name,gppSettings:l}),ca({gppApi:e,gppSection:o,context:s}),Array.from(a)},cn=({cmpApi:n,experience:e,context:t})=>ln(la,{cmpApi:n,experience:e,context:t}),dn=({cmpApi:n,cookie:e,experience:t,context:s})=>ln(aa,{cmpApi:n,cookie:e,experience:t,context:s}),un=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(n,e)=>{if(!St(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Bo(n);return s?(e.setFieldValueBySectionId(j.ID,"CmpId",os),e.setSectionStringById(j.ID,s),!0):!1},Ta=()=>{const n=[];if(St(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===$e.NATIONAL||e.us_approach===$e.ALL)&&n.push(`${J.ID}:${J.NAME}`),(e.us_approach===$e.STATE||e.us_approach===$e.ALL)&&Object.values(Ft).forEach(t=>{t.id!==J.ID&&n.push(`${t.id}:${t.name}`)}))}return n},Ia=()=>{ga();const n=new qi(os,Yr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Ta();if(n.setSupportedAPIs(o),!St(s))return;const{fidesString:a}=r;if(a&&_a({fidesString:a,cmpApi:n}),!a&&(!Sr(s,e.detail,i,r)||!r.tcfEnabled&&Ns(s.privacy_notices)&&!un(i,e.detail.fides_string,s.privacy_notices))){const l=es(),u=En(e,n);u&&n.setApplicableSections([j.ID]);const E=cn({cmpApi:n,experience:s,context:l}),S=dn({cmpApi:n,cookie:e.detail,experience:s,context:l});S.length&&n.setApplicableSections(S.map(O=>O.id)),!u&&!E.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const d=vs(n);window.Fides.fides_string=d}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(St(t)){!i.tcfEnabled&&Ns(t.privacy_notices)&&!un(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Me.READY):n.setSignalStatus(Me.NOT_READY),n.setCmpDisplayStatus(je.VISIBLE);const r=cn({cmpApi:n,experience:t,context:es()});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(je.HIDDEN),n.setSignalStatus(Me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(je.HIDDEN),En(e,n)&&(n.setApplicableSections([j.ID]),n.fireSectionChange("tcfeuv2")),St(window.Fides.experience)){const s=dn({cmpApi:n,cookie:e.detail,experience:window.Fides.experience,context:es()});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=vs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Rs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Me.READY)})};window.addEventListener("FidesInitializing",n=>{var e,t;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&typeof window<"u"&&!((t=window.Fides)!=null&&t.initialized)&&Ia()});