ethyca-fides 2.69.1rc0__py2.py3-none-any.whl → 2.76.0rc2__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/METADATA +9 -6
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/RECORD +488 -361
- fides/_version.py +3 -3
- fides/api/alembic/alembic.ini +5 -1
- fides/api/alembic/migrations/env.py +7 -1
- fides/api/alembic/migrations/versions/0eef0016cf06_adding_oauth2_config_for_.py +69 -0
- fides/api/alembic/migrations/versions/303287c70600_migrate_resource_type_from_enum_to_.py +99 -0
- fides/api/alembic/migrations/versions/30369bb8ae01_add_webmonitorgroupjob_model.py +67 -0
- fides/api/alembic/migrations/versions/3efe14d4469a_adds_new_experience_configs_for_vendor_.py +79 -0
- fides/api/alembic/migrations/versions/4bfbeff34611_add_polling_status.py +68 -0
- fides/api/alembic/migrations/versions/4d8c0fcc5771_adding_default_system_groups.py +78 -0
- fides/api/alembic/migrations/versions/5fa78b1f324d_add_event_audit_table.py +82 -0
- fides/api/alembic/migrations/versions/65a1bc82ae09_adds_experience_config_for_delete_.py +53 -0
- fides/api/alembic/migrations/versions/67d0e389b003_update_consentstatus_enum.py +47 -0
- fides/api/alembic/migrations/versions/795f46f656c0_migrate_field_type_from_enum_to_string.py +61 -0
- fides/api/alembic/migrations/versions/7db29f9cd77b_create_new_sub_request_table.py +95 -0
- fides/api/alembic/migrations/versions/918aefc950c9_create_digest_conditional_dependencies.py +125 -0
- fides/api/alembic/migrations/versions/9caf76161e55_make_user_assigned_data_uses_nullable_.py +64 -0
- fides/api/alembic/migrations/versions/9e0dcbf67b9f_add_digest_config.py +84 -0
- fides/api/alembic/migrations/versions/a55e12c2c2df_add_tagging_instructions_to_data_.py +29 -0
- fides/api/alembic/migrations/versions/a8e0c016afd_add_classification_benchmark_table.py +126 -0
- fides/api/alembic/migrations/versions/b97e92b038d2_add_digest_execution_model.py +117 -0
- fides/api/alembic/migrations/versions/b9bfa12c167b_add_not_applicable_to_asset_consentstatus.py +46 -0
- fides/api/alembic/migrations/versions/c09e76282dd1_add_privacy_request_duplication_cols.py +64 -0
- fides/api/alembic/migrations/versions/cd8649be3a2b_add_classifications_and_user_assigned_.py +74 -0
- fides/api/alembic/migrations/versions/e2cda8d6abc3_add_dismissed_in_activity_view_to_.py +29 -0
- fides/api/alembic/migrations/versions/f108fa05c579_adds_optional_duration_field_to_assets.py +28 -0
- fides/api/alembic/migrations/versions/f36ce1bde293_add_system_groups.py +132 -0
- fides/api/alembic/migrations/versions/fd7571bef683_adds_new_fields_to_messagingconfig_for_.py +31 -0
- fides/api/alembic/migrations/versions/xx_2025_10_17_1603_5093e92e2a5a_add_consent_data_v3_to_the_database.py +72 -0
- fides/api/alembic/migrations/versions/xx_2025_10_27_1834_67f0f2f4748e_adding_identity_definition_model.py +45 -0
- fides/api/alembic/migrations/versions/xx_2025_10_29_1659_80d28dea3b6b_added_duplicate_group_table.py +79 -0
- fides/api/alembic/migrations/versions/xx_2025_11_05_0200_f1a2b3c4d5e6_create_staged_resource_error_table.py +82 -0
- fides/api/alembic/migrations/versions/xx_2025_11_07_1709_56fe6fad2d89_add_notice_display_order.py +47 -0
- fides/api/alembic/migrations/versions/xx_2025_11_10_1200_a1b2c3d4e5f6_add_test_datastore_to_connectiontype.py +53 -0
- fides/api/alembic/migrations/versions/xx_2025_11_11_1317_7d82c8fc4c34_store_saas_template_datasets.py +68 -0
- fides/api/alembic/migrations/versions/xx_2025_11_12_1430_b2c3d4e5f6a7_add_default_identity_definitions.py +81 -0
- fides/api/alembic/migrations/versions/xx_2025_11_25_1854_3ff6449c099e_add_index_on_providedidentity_privacy_.py +50 -0
- fides/api/api/v1/api.py +2 -0
- fides/api/api/v1/endpoints/admin.py +39 -0
- fides/api/api/v1/endpoints/connection_endpoints.py +191 -47
- fides/api/api/v1/endpoints/connector_template_endpoints.py +167 -0
- fides/api/api/v1/endpoints/generic_overrides.py +90 -15
- fides/api/api/v1/endpoints/messaging_endpoints.py +164 -34
- fides/api/api/v1/endpoints/pre_approval_webhook_endpoints.py +5 -5
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +231 -46
- fides/api/api/v1/endpoints/saas_config_endpoints.py +63 -92
- fides/api/api/v1/endpoints/storage_endpoints.py +5 -1
- fides/api/api/v1/endpoints/system.py +157 -100
- fides/api/api/v1/endpoints/user_endpoints.py +17 -4
- fides/api/app_setup.py +1 -3
- fides/api/common_exceptions.py +8 -0
- fides/api/db/base.py +8 -0
- fides/api/db/crud.py +30 -2
- fides/api/db/database.py +261 -4
- fides/api/db/safe_crud.py +377 -0
- fides/api/db/seed.py +35 -1
- fides/api/email_templates/get_email_template.py +3 -0
- fides/api/email_templates/template_names.py +1 -0
- fides/api/email_templates/templates/external_user_welcome.html +9 -5
- fides/api/email_templates/templates/manual_task_digest.html +316 -0
- fides/api/main.py +2 -0
- fides/api/migrations/post_upgrade_index_creation.py +20 -0
- fides/api/models/asset.py +17 -1
- fides/api/models/attachment.py +1 -0
- fides/api/models/conditional_dependency/__init__.py +0 -0
- fides/api/models/conditional_dependency/conditional_dependency_base.py +311 -0
- fides/api/models/connection_oauth_credentials.py +57 -0
- fides/api/models/connectionconfig.py +11 -1
- fides/api/models/detection_discovery/__init__.py +4 -0
- fides/api/models/detection_discovery/classification_benchmark.py +140 -0
- fides/api/models/detection_discovery/core.py +78 -3
- fides/api/models/detection_discovery/monitor_task.py +3 -1
- fides/api/models/detection_discovery/staged_resource_error.py +25 -0
- fides/api/models/detection_discovery/web_monitor.py +61 -0
- fides/api/models/digest/__init__.py +16 -0
- fides/api/models/digest/conditional_dependencies.py +275 -0
- fides/api/models/digest/digest_config.py +110 -0
- fides/api/models/digest/digest_execution.py +142 -0
- fides/api/models/event_audit.py +85 -0
- fides/api/models/experience_notices.py +6 -1
- fides/api/models/fides_user.py +9 -0
- fides/api/models/identity_definition.py +66 -0
- fides/api/models/location_regulation_selections.py +22 -0
- fides/api/models/manual_task/conditional_dependency.py +29 -87
- fides/api/models/manual_webhook.py +17 -6
- fides/api/models/messaging.py +30 -10
- fides/api/models/messaging_template.py +14 -0
- fides/api/models/policy.py +27 -0
- fides/api/models/privacy_experience.py +41 -0
- fides/api/models/privacy_notice.py +196 -13
- fides/api/models/privacy_preference.py +2 -0
- fides/api/models/privacy_request/duplicate_group.py +84 -0
- fides/api/models/privacy_request/privacy_request.py +154 -8
- fides/api/models/privacy_request/provided_identity.py +22 -1
- fides/api/models/privacy_request/request_task.py +98 -1
- fides/api/models/privacy_request/webhook.py +3 -1
- fides/api/models/saas_template_dataset.py +63 -0
- fides/api/models/sql_models.py +161 -7
- fides/api/models/system_group.py +85 -0
- fides/api/models/taxonomy.py +91 -9
- fides/api/models/v3/__init__.py +0 -0
- fides/api/models/v3/privacy_preferences.py +85 -0
- fides/api/models/worker_task.py +8 -0
- fides/api/oauth/roles.py +4 -0
- fides/api/schemas/application_config.py +32 -1
- fides/api/schemas/connection_configuration/connection_config.py +1 -30
- fides/api/schemas/connection_configuration/connection_oauth_config.py +42 -0
- fides/api/schemas/connection_configuration/connection_secrets_mongodb.py +15 -3
- fides/api/schemas/connection_configuration/connection_secrets_mssql.py +5 -0
- fides/api/schemas/messaging/messaging.py +49 -66
- fides/api/schemas/messaging/messaging_secrets_docs_only.py +1 -1
- fides/api/schemas/messaging/shared_schemas.py +102 -0
- fides/api/schemas/oauth.py +2 -1
- fides/api/schemas/privacy_center_config.py +29 -5
- fides/api/schemas/privacy_request.py +44 -7
- fides/api/schemas/saas/async_polling_configuration.py +81 -0
- fides/api/schemas/saas/connector_template.py +14 -0
- fides/api/schemas/saas/saas_config.py +12 -20
- fides/api/schemas/system.py +8 -0
- fides/api/schemas/taxonomy_extensions.py +8 -0
- fides/api/schemas/user.py +2 -2
- fides/api/service/async_dsr/handlers/__init__.py +0 -0
- fides/api/service/async_dsr/handlers/polling_attachment_handler.py +155 -0
- fides/api/service/async_dsr/handlers/polling_request_handler.py +88 -0
- fides/api/service/async_dsr/handlers/polling_response_handler.py +261 -0
- fides/api/service/async_dsr/handlers/polling_sub_request_handler.py +123 -0
- fides/api/service/async_dsr/strategies/__init__.py +0 -0
- fides/api/service/async_dsr/strategies/async_dsr_strategy.py +52 -0
- fides/api/service/async_dsr/strategies/async_dsr_strategy_callback.py +199 -0
- fides/api/service/async_dsr/strategies/async_dsr_strategy_factory.py +72 -0
- fides/api/service/async_dsr/strategies/async_dsr_strategy_polling.py +691 -0
- fides/api/service/async_dsr/utils.py +130 -0
- fides/api/service/connectors/base_erasure_email_connector.py +7 -0
- fides/api/service/connectors/bigquery_connector.py +34 -16
- fides/api/service/connectors/fides/fides_client.py +63 -1
- fides/api/service/connectors/http_connector.py +48 -12
- fides/api/service/connectors/microsoft_sql_server_connector.py +6 -1
- fides/api/service/connectors/mongodb_connector.py +74 -9
- fides/api/service/connectors/query_configs/saas_query_config.py +160 -79
- fides/api/service/connectors/saas/connector_registry_service.py +42 -135
- fides/api/service/connectors/saas_connector.py +116 -76
- fides/api/service/connectors/sql_connector.py +14 -4
- fides/api/service/deps.py +25 -2
- fides/api/service/messaging/message_dispatch_service.py +98 -20
- fides/api/service/messaging/messaging_crud_service.py +5 -9
- fides/api/service/privacy_request/attachment_handling.py +9 -2
- fides/api/service/privacy_request/dsr_package/dsr_report_builder.py +17 -9
- fides/api/service/privacy_request/dsr_package/templates/attachments_index.html +41 -30
- fides/api/service/privacy_request/dsr_package/templates/clickme.html +68 -0
- fides/api/service/privacy_request/dsr_package/templates/dataset_index.html +30 -27
- fides/api/service/privacy_request/duplication_detection.py +439 -0
- fides/api/service/privacy_request/email_batch_service.py +2 -1
- fides/api/service/privacy_request/request_runner_service.py +92 -91
- fides/api/service/privacy_request/request_service.py +74 -90
- fides/api/service/saas_request/saas_request_override_factory.py +71 -1
- fides/api/service/storage/streaming/schemas.py +27 -19
- fides/api/service/storage/streaming/smart_open_client.py +2 -2
- fides/api/service/storage/streaming/smart_open_streaming_storage.py +238 -147
- fides/api/service/storage/util.py +20 -106
- fides/api/service/strategy.py +6 -3
- fides/api/task/conditional_dependencies/privacy_request/__init__.py +0 -0
- fides/api/task/conditional_dependencies/privacy_request/convenience_fields.py +155 -0
- fides/api/task/conditional_dependencies/privacy_request/privacy_request_data.py +140 -0
- fides/api/task/conditional_dependencies/privacy_request/schemas.py +212 -0
- fides/api/task/conditional_dependencies/sql_schemas.py +301 -0
- fides/api/task/conditional_dependencies/sql_translator.py +757 -0
- fides/api/task/conditional_dependencies/util.py +111 -0
- fides/api/task/execute_request_tasks.py +34 -13
- fides/api/task/filter_results.py +35 -2
- fides/api/task/graph_runners.py +2 -32
- fides/api/task/graph_task.py +42 -12
- fides/api/task/manual/manual_task_conditional_evaluation.py +33 -28
- fides/api/task/manual/manual_task_graph_task.py +4 -1
- fides/api/task/manual/manual_task_utils.py +68 -26
- fides/api/task/scheduler_utils.py +39 -0
- fides/api/tasks/__init__.py +15 -1
- fides/api/util/cache.py +5 -1
- fides/api/util/connection_util.py +101 -218
- fides/api/util/event_audit_util.py +230 -0
- fides/api/util/filter_utils.py +0 -3
- fides/api/util/fuzzy_search_utils.py +7 -1
- fides/api/util/lock.py +13 -3
- fides/api/util/logger.py +58 -4
- fides/api/util/logger_context_utils.py +3 -1
- fides/api/util/masking_util.py +31 -0
- fides/api/util/memory_watchdog.py +118 -0
- fides/api/util/rate_limit.py +25 -7
- fides/api/util/saas_config_updater.py +76 -0
- fides/api/util/saas_util.py +28 -1
- fides/api/worker/__init__.py +6 -0
- fides/common/api/scope_registry.py +6 -7
- fides/common/api/v1/urn_registry.py +15 -3
- fides/config/__init__.py +11 -2
- fides/config/celery_settings.py +42 -0
- fides/config/config_proxy.py +10 -0
- fides/config/duplicate_detection_settings.py +31 -0
- fides/config/execution_settings.py +6 -6
- fides/config/security_settings.py +4 -1
- fides/config/utils.py +5 -0
- fides/data/language/languages.yml +2 -0
- fides/service/connection/__init__.py +0 -0
- fides/service/connection/connection_service.py +651 -0
- fides/service/dataset/dataset_service.py +39 -0
- fides/service/event_audit_service.py +109 -0
- fides/service/messaging/aws_ses_service.py +2 -4
- fides/service/messaging/messaging_service.py +75 -74
- fides/service/privacy_request/privacy_request_service.py +345 -100
- fides/service/system/__init__.py +0 -0
- fides/service/system/system_service.py +153 -0
- fides/service/taxonomy/handlers/legacy_handler.py +3 -3
- fides/service/taxonomy/taxonomy_service.py +64 -18
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1099-688fa865621531cc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1115-7fd171dac1eb0e51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1276.deb10ae2643f8463.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1438-8a33b3834d6e43f3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6148-59a59d5c5925344f.js → 1533-84e250d1f26e6d7d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1821-c1daa160f492aacf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1840-359ee056e4cf6629.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1975.78e719130cfe3fd6.js → 1975.bef017bc80e2012c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/2040-70972e15960d9afe.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2121.321b0fd3932164d4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2397-3434603a97f3f5d6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2921-49ed0ed897832958.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3150-da5406b80d25fe6d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3214-90ce0a366b0f461a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3377-02bf9780fd383d94.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3655-5e1ba5dd68b5ec48.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3729-31ff8ba51491bf21.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3872-cff30ca0844fe2b1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3931-8bedde156fe83564.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/401-582d9970d89deefe.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4093-7e47408c28de5375.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4259.d1507e0db19cbed7.js → 4259.05038c9b78467244.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/431-e01ee730c8ad9ece.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4322-f6aeff6880726c83.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4339-04a715ab07122744.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4496-ccbce2459174e0d6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/454-d5c2c84f1a14e4f1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4589-c1d83c6a8dab4d30.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4809-a8f4a108a42f53ed.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4903-19c0bc07a956dfa8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4910-d990773601f794c1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5185-96423702fba70ced.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5258-4e308cca01d59367.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5487-5c3501754bf027ba.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/549-1bdc3e6f3264c020.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5505-43b9c39491b88e08.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5698.2135391a128cc373.js +164 -0
- fides/ui-build/static/admin/_next/static/chunks/5783-016dfcee8e49bf61.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5826-4db99ea4e5077911.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/590-be447cacf12419dd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6084-91badbc6569a0efb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6344-026cb323c1d49926.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6362-ba0e12f2fc4cad94.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6853-882889659769d7b4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6882-bb1b469d7d7f5335.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6954-0dcf22a9aabe39c5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7170-46db82bb5b55e856.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7218-2ace8c82e3e7eb74.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7245-1cdafb35f289861b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7630-7f75ab7b8df42eb3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7654-2e9a8be02e41769a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8212-348ddd2b6933db70.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9014-eeae6f581158e645.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5596-bb601cbf40e47a0f.js → 9195-da717d324917b049.js} +3 -3
- fides/ui-build/static/admin/_next/static/chunks/9450-b7b7bb1d755ecf57.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9676.9fd9552ef744c717.js → 9676.1f395eeb9cc34968.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9826-1078e46f3ac0b688.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9911-ece086f2230e34f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-471a6b18e712f050.js → 404-800be6996aaa999c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fcdad91f6f66292b.js → _app-de4b578c904df772.js} +57 -220
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-f12020b82dd4bd1a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-a911b7990371704d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-ad585b79953c2753.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-406170eaae4329c6.js → add-vendors-bb263d394ca1c8fa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-6907c368d8611c44.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-f80cf2d3966816fd.js → [id]-c32f381af358149b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-e74cb5ea87f15b40.js → new-6efb3c069d8b47dd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-1975c529905eea9b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-b378576cba255609.js → [id]-b05331178928ab52.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2ca1de7b88094ab0.js → new-516834e930bb0d0d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-985717f2565f9d9d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-226efa1dcd41437f.js → properties-2be773e08498e40c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-850afb74f4192e87.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-b63d1e395d879b86.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-5b28f0f674ea87bd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-04cfe2cfba7b7cd8.js → [projectUrn]-676177e2f3c9c2a2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-794906929efb8e1d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-3ccbf7c0d06507b9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-1ea0b24d306b1e67.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore/[monitorId]-d4861a4a218bb65a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/datastore-4498881c26f1458d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/infrastructure/[monitorId]-66bd265044daf97d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/infrastructure-c9c79fa8576a4f77.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]/[systemId]-60cacc3232c2eead.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website/[monitorId]-437bd64a3016de36.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/website-5b3e0009d442bc3f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-8349248c2da970a6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-6919a1d6cadaa46b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-8f736b078e9842da.js → [resourceUrn]-1a50d421897d3da1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-eb814e3c22807871.js → detection-49509414a15e8393.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-6875b7783fcfda2f.js → [resourceUrn]-1a1bb80b586d0c0f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-172dbd7740e212ca.js → discovery-49de61df1e8e7fba.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-c2719f5cff20c0f8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-dfd71c1e9c458b89.js → [...subfieldNames]-415015aebab60436.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-7cdc42ec5493b83d.js → [collectionName]-5accb09715b5122d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-aebecca1d8ec5f98.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-9551a82ddec9f909.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-72f8fe47beef0f09.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-3a8aa3f633528e88.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-87512616f35ec6da.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-2f1bf4eac7aa55fd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{fides-js-docs-1f4335dca5c09860.js → fides-js-docs-5235760b3e508d7d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-8d67cd2872cb682a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-7a631df29cd0e31a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-ea3bc43cdaf273de.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/new-privacy-requests-5d8632bba1b81cd4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/[id]-92e01822ecde8fb8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests/new-1256cf6d3f6794e0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/digests-0daac00911d27617.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/[key]-2d976fe5e8ba0a3a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers/new-7766ba497b863740.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/providers-f2880d2ed4734270.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/[id]-669f585c3458faff.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates/add-template-c79e7724e4bc3899.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications/templates-891654e8dc13965c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/notifications-40c8148244c5d347.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-1e86f3e28bd23ed6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-9b7bd8c38f02c091.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-b18a53a940cf9e19.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-6d028d7450e77578.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-8399083ee2cd8cc2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-0a910125cdb2b3b8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-acc90b6f7fe915cb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-bbc42026f2685438.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-c08ca6ad21c99799.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-77c2db582f8823bc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-e784c05d056b2371.js → [id]-74ccea4868408e3d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-0a7a2db148a7561a.js → add-property-7d9f09bfe9d44dfc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-da734840e4f9d04b.js → properties-cd77bc30672bb1fa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-cc3bd9540132d5ed.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/sandbox/privacy-notices-7ce7d720107ab4b5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-68eaac2d79133679.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-6c4904c157477285.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-ae789892343c24f5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-13ee1b331ced0846.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/[id]-ee4e43692336a330.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields/new-ca51d794abfcbf25.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-ecd1dc5db8e81409.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-df06f7e2f668c540.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-da0c77bd510c6c51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-950b0c115bf673d8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-2e635dcd11b78224.js → locations-7e36cb4756973a9d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-a0e5ed486d24ccf3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-3cdebafb6870d3ad.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-7c02e469d8c5bd74.js → regulations-159aad34f1021320.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-dbd1a64090ad0946.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-7d042497a57a3788.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-21f1172e73dfc9f0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-e553161e6338ee48.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-92f52c43f522a350.js → new-efc4af017723e57a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-64452dfae2c5e614.js → [id]-b152319d67372ee4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-dba8692491f7935e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/webpack-09ca52bc7beb0b43.js +1 -0
- fides/ui-build/static/admin/_next/static/css/012b10627a654d5c.css +1 -0
- fides/ui-build/static/admin/_next/static/css/05d05fc31d09638b.css +1 -0
- fides/ui-build/static/admin/_next/static/css/0fd6e0884cfcc5f3.css +1 -0
- fides/ui-build/static/admin/_next/static/css/14ba79c49597d37a.css +1 -0
- fides/ui-build/static/admin/_next/static/css/{34a7eb08b86ddb57.css → 3d6582469f7d56e0.css} +1 -1
- fides/ui-build/static/admin/_next/static/css/3d66bb57ddcb0978.css +1 -0
- fides/ui-build/static/admin/_next/static/css/4861ca3e088f2d05.css +1 -0
- fides/ui-build/static/admin/_next/static/css/a1800714b486e230.css +1 -0
- fides/ui-build/static/admin/_next/static/css/a1e4be9466578ef1.css +1 -0
- fides/ui-build/static/admin/_next/static/css/af32fcac7a177a0e.css +1 -0
- fides/ui-build/static/admin/_next/static/css/cb417f0587918f85.css +1 -0
- fides/ui-build/static/admin/_next/static/css/dd15c278b964de80.css +1 -0
- fides/ui-build/static/admin/_next/static/css/{5f393dea1c0d031c.css → f89607996ad54f4b.css} +1 -1
- fides/ui-build/static/admin/_next/static/css/f9a2a44d3d34c904.css +1 -0
- fides/ui-build/static/admin/_next/static/l2vgGUHB04Fi4oEVlVMrc/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/datastore/[monitorId].html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/datastore.html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/infrastructure/[monitorId].html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/infrastructure.html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId]/[systemId].html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/website/[monitorId].html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center/website.html +1 -0
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
- fides/ui-build/static/admin/lib/fides.js +3 -3
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/new-privacy-requests.html +1 -0
- fides/ui-build/static/admin/notifications/digests/[id].html +1 -0
- fides/ui-build/static/admin/notifications/digests/new.html +1 -0
- fides/ui-build/static/admin/notifications/digests.html +1 -0
- fides/ui-build/static/admin/notifications/providers/[key].html +1 -0
- fides/ui-build/static/admin/notifications/providers/new.html +1 -0
- fides/ui-build/static/admin/notifications/providers.html +1 -0
- fides/ui-build/static/admin/notifications/templates/[id].html +1 -0
- fides/ui-build/static/admin/notifications/templates/add-template.html +1 -0
- fides/ui-build/static/admin/notifications/templates.html +1 -0
- fides/ui-build/static/admin/notifications.html +1 -0
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/sandbox/privacy-notices.html +1 -0
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields/[id].html +1 -0
- fides/ui-build/static/admin/settings/custom-fields/new.html +1 -0
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/api/service/async_dsr/async_dsr_service.py +0 -75
- fides/api/service/privacy_request/dsr_package/templates/welcome.html +0 -66
- fides/ui-build/static/admin/_next/static/OmXHlY9MvjoZH9jDkAytl/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1099-79646e64f26d62fa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1316-2606e19807c08aa5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1345-5e1c5b66e25c566e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1467-8808ec8836e033f9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-0ca16d288fad916d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2150-930ffaf2c4718edc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/255-1bc0cbef7a59cdc6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2921-52328140bc420d0f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/346-aa3b88efb85f2e28.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3550-d04125c828d591a1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3620-602eb74dc896d556.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3729-c17ac8031a4c4fd1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3847-230bf61b053bc706.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3855-ef5194cdb228beb6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3872-f78dec02f0d959ae.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3923-bb2417b8dcade7a4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/401-4af0a912e249d30f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4164-355644b916ae0094.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/431-86ad2beeb93c95c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4608-be8cba73f5d7c326.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4786-61154adf88e448e1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4808-dd4157aa72648068.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4831-fd99c0b3784de128.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4844-46324c3d848b8b6a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5163-e682273cd76a7d07.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-b0de22a8521686ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5487-02d00bad7c6830e0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/549-38ea1d91ee2addaa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5619-9b50cec521203989.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6084-c153669d5567e242.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6419-d0c00d661b01f8fa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6853-b17673391117c976.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-5296188c19d7d0ac.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/699-8ca44b0de9fa20f0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7476-45c5088baa8b66af.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7630-7ed6c6117775dffe.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/787-a8c7eab617e2fceb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-65674011d455af4d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/796-9e1ca1a4030707c5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8002-24af20d679efc04e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8765-f622a35b40a7ec63.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-712156d461165f56.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9187-7438242f0d380bb0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9278-08cc704317fe535e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9729-fcf6ff4e3534e4a8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9826-dbae8dee941a7fac.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9951-a88367a129b724ba.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/manual-ace203dfacacbdc4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/multiple-920fb469e0dda1d2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-bd0d82078e67cac3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-7207ab23bdb36ce8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-9dda4de5ec580279.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-0d4844d0b808e6e4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-28b192e2c074b0f3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-3e8bdefe714254ec.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn]-2c29ff7a01198f30.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-5f2d7b24804f861f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/[resourceUrn]-8eb581024bc0172f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-30108b00ac769fc3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-e1ba213fb666b3f4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-6d133580045abdda.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-9a81d42a474e1e48.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-b6ae7adb8ef0b525.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-c7390e046b2e2b7f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-e12b11ba15bc3fc1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-e32fccc4ca520d2b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-7c59a6abf6ba6207.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/[id]-927b7e476c4b47d0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/new-cbe100d50df34285.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-cce20440b177050b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-6cd8708106331b8d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-4c3c413a2668df53.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-95402b5001c07ef2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/[id]-3c6dc2f6e6bae960.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/add-template-4a6d4023a7791be8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-76b204c9b98d656f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-bc0e2adf6e0d3ac7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/AntForm-86ffcc1ad3fa912e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikAntFormItem-ec04f595465bdf69.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikControlled-41d309754ff0c1de.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/FormikField-cab1f78cec7808f9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/forms-eb6058221403b156.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-48500551fd6a7602.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-0f25a76dd18c5e20.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-ad6ad3e5bd72765d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-6032d82f0fc2893d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-d83e5bd52a638234.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-baf31c3e4b081046.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-6903f42a0412bfa6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-a82f3df840d5c1b5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-d06fb16487705b9d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/[purpose_id]-9495e2eb506606c7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-93a978443bf299db.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-9ecb803099082bf4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-16fdd91a81074dd1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-4cdd6001e7cb9aee.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-1914de830ce5cfc4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-f547f1f33c12faf3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-2ecc073f41628f62.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-20b1193ed76c56b0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-6e15332935f6b538.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-fbc8761ef4d55516.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-4d7827fc9c46b6b8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management-9cec020f89544426.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-678e89d68dbcd94f.js +0 -1
- fides/ui-build/static/admin/_next/static/css/073713cd1eddda79.css +0 -1
- fides/ui-build/static/admin/_next/static/css/23cf870196941c9a.css +0 -1
- fides/ui-build/static/admin/_next/static/css/304c6f148886a8d4.css +0 -1
- fides/ui-build/static/admin/_next/static/css/650df9c348000a26.css +0 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +0 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +0 -1
- fides/ui-build/static/admin/messaging/[id].html +0 -1
- fides/ui-build/static/admin/messaging/add-template.html +0 -1
- fides/ui-build/static/admin/messaging.html +0 -1
- fides/ui-build/static/admin/poc/table-migration.html +0 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +0 -1
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.69.1rc0.dist-info → ethyca_fides-2.76.0rc2.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-de704de849960f01.js → resources-81d1b50585468fb0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{OmXHlY9MvjoZH9jDkAytl → l2vgGUHB04Fi4oEVlVMrc}/_ssgManifest.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)}},Sn=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)}},_n=class extends it{respond(){let e=new Ct(this.cmpApiContext);this.invokeCallback(e)}};class hn 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 pn 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 gn 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 Tn=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)}},ls=class{static[ye.ADD_EVENT_LISTENER]=Sn;static[ye.GET_FIELD]=hn;static[ye.GET_SECTION]=pn;static[ye.HAS_SECTION]=gn;static[ye.PING]=_n;static[ye.REMOVE_EVENT_LISTENER]=Tn};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 cs;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(cs||(cs={}));var Me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Me||(Me={}));class In{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 ls[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 ls[e]!==void 0}}let On=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 pt 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 pt("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 pt("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 ds{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),E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let S=E;S<=u;S++)t.push(S)}else{let l=e.indexOf("11",r),E=ot.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class Nn 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 Nn("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 fn extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ds.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ds.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 An=[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 pt("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 pt(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 Cn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}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 fn([])),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 Cn),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 Pn=[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],wn=[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],Dn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],mn=[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 E=a;E<=l;E++)t.push(E)}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 Vn{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),E=lt.decode(l);i+=l.length,t.push(new Vn(o,a,E))}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 E=new Qt([]).substring(e,r);r+=E.length,s+=E}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 us{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 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{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 Ss{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 Ss.encode(this.value,this.stringLength)}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+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 Rn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}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 Mn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}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 vn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}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 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_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 Rn),e.push(new Mn),e.push(new vn),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[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 Ln=[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],Gn=[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],yn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Un extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}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 Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}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 xn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}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 Un),e.push(new Fn),e.push(new xn),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 Bn{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 Hn{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 $n=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class Kn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new Hn;return t.put(Ne.VERSION,new Bn(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 Kn),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 zn=[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],kn=[N.GPC_SEGMENT_TYPE,N.GPC];class _s{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 _s.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=_s.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 Yn 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(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 jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}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 Yn),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(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 Wn=[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 qn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Wn}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,ie.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 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 ie extends ee{static ID=8;static VERSION=1;static NAME="usca";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 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 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 Xn=[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 Zn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}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,re.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 re extends ee{static ID=9;static VERSION=1;static NAME="usva";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 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 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 ei=[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],ti=[x.GPC_SEGMENT_TYPE,x.GPC];class si extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ei}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,oe.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 ni 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(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 oe extends ee{static ID=10;static VERSION=1;static NAME="usco";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 si),e.push(new ni),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 ii=[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 ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ii}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,ae.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 ae extends ee{static ID=11;static VERSION=1;static NAME="usut";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 ri),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 oi=[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],ai=[B.GPC_SEGMENT_TYPE,B.GPC];class li extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}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,le.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 ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}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 le extends ee{static ID=12;static VERSION=1;static NAME="usct";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 li),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(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 di=[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 di}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,ce.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 ce extends ee{static ID=13;static VERSION=1;static NAME="usfl";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 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 ui=[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],Si=[V.GPC_SEGMENT_TYPE,V.GPC];class _i 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(V.VERSION.toString(),new c(6,de.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 hi 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(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 de extends ee{static ID=14;static VERSION=1;static NAME="usmt";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 _i),e.push(new hi),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 pi=[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],gi=[R.GPC_SEGMENT_TYPE,R.GPC];class Ti 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(R.VERSION.toString(),new c(6,Ee.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 Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}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 Ee extends ee{static ID=15;static VERSION=1;static NAME="usor";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 Ti),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(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 Oi=[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],Ni=[M.GPC_SEGMENT_TYPE,M.GPC];class fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}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,ue.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 Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}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 ue extends ee{static ID=16;static VERSION=1;static NAME="ustx";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 fi),e.push(new Ai),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 Ci=[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],Pi=[v.GPC_SEGMENT_TYPE,v.GPC];class wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ci}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,Se.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 Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}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 Se extends ee{static ID=17;static VERSION=1;static NAME="usde";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 wi),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(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 mi=[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],Vi=[b.GPC_SEGMENT_TYPE,b.GPC];class Ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mi}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,_e.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 Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}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 _e extends ee{static ID=18;static VERSION=1;static NAME="usia";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 Ri),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(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 vi=[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],bi=[L.GPC_SEGMENT_TYPE,L.GPC];class Li 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(L.VERSION.toString(),new c(6,he.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 Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}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 he extends ee{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return he.ID}getName(){return he.NAME}getVersion(){return he.VERSION}initializeSegments(){let e=[];return e.push(new Li),e.push(new Gi),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 yi=[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],Ui=[G.GPC_SEGMENT_TYPE,G.GPC];class Fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yi}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,pe.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 xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}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 pe extends ee{static ID=20;static VERSION=1;static NAME="usnh";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 Fi),e.push(new xi),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 Bi=[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],Hi=[y.GPC_SEGMENT_TYPE,y.GPC];class $i 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(y.VERSION.toString(),new c(6,ge.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 Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}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 ge extends ee{static ID=21;static VERSION=1;static NAME="usnj";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 $i),e.push(new Ki),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 zi=[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],ki=[U.GPC_SEGMENT_TYPE,U.GPC];class Yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return zi}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,Te.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 ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}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 Te extends ee{static ID=22;static VERSION=1;static NAME="ustn";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 Yi),e.push(new ji),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],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[pe.ID,pe.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME]]);static SECTION_ORDER=[j.NAME,Ce.NAME,Pe.NAME,X.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,_e.NAME,he.NAME,pe.NAME,ge.NAME,Te.NAME]}class hs{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===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.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===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.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)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===Te.NAME&&(i=new Te,this.sections.set(Te.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new pt(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]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.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]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.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)}else if(r[o]===he.ID){let l=new he(t[o+1]);s.set(he.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}else if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.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===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.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===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.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)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===Te.NAME&&(s=new Te,this.sections.set(Te.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 Wi{gppVersion="1.1";supportedAPIs=[];eventQueue=new On(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new hs;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 hs,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}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),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}},ps=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 qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Wi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new In(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 ps.fromVendorList(e)}async getGvlFromUrl(e){return ps.fromUrl(e)}}const Ji="en";var Xi=Object.defineProperty,Zi=(n,e,t)=>e in n?Xi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zt=(n,e,t)=>Zi(n,typeof e!="symbol"?e+"":e,t);class er{constructor(e,t,s){Zt(this,"consentPreference"),Zt(this,"notice"),Zt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var gs;(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={}))})(gs||(gs={}));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||{}),Et=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(Et||{}),et=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(et||{}),gt=(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))(gt||{}),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 tr=(n,e)=>!!Object.keys(e).includes(n.notice_key),es=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,sr=n=>typeof n=="string"?es(n):n,nr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var ir=Object.defineProperty,rr=Object.defineProperties,or=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Is=(n,e,t)=>e in n?ir(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rt=(n,e)=>{for(var t in e||(e={}))ar.call(e,t)&&Is(n,t,e[t]);if(Ts)for(var t of Ts(e))lr.call(e,t)&&Is(n,t,e[t]);return n},cr=(n,e)=>rr(n,or(e));const ut=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Os=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),dr=n=>{if(n){if(n.location&&nr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Ns=n=>n.fidesConsentOverride===Fe.ACCEPT||n.fidesConsentOverride===Fe.REJECT,Er=(n,e,t,s)=>{var i,r,o,a,l,E;return s?.fidesDisableBanner||!ut(n)||s.fidesModalDisplay==="immediate"?!1:((i=n.experience_config)==null?void 0:i.component)===gt.TCF_OVERLAY&&e?s&&Ns(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===gt.MODAL||((a=n.experience_config)==null?void 0:a.component)===gt.HEADLESS||!((l=n?.privacy_notices)!=null&&l.length)?!1:t?s&&Ns(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(S=>tr(S,t))):!0},ur=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})}},Sr=({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===Et.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},_r=({consent:n,flagType:e=Et.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==Et.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,sr(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)},fs=(n,e,t=[],s,i,r)=>{var o,a,l;const E=Rt({},n),u=(o=window.Fides)==null?void 0:o.options,S=(a=u?.fidesConsentNonApplicableFlagMode)!=null?a:mt.OMIT,d=(l=u?.fidesConsentFlagType)!=null?l:Et.BOOLEAN,O={};Object.assign(O,Sr({consent:{},nonApplicableNotices:e??[],flagType:d,mode:S}));const T=t.reduce(($,K)=>cr(Rt({},$),{[K.notice_key]:K.consent_mechanism}),{}),H={};return Object.entries(E).forEach(([$,K])=>{r?.includes($)&&!e?.includes($)||(H[$]=K)}),Object.assign(O,_r({consent:H,consentMechanisms:T,flagType:d})),O},hr=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===Et.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?dt.NOTICE_ONLY:!0:r?dt.OPT_OUT:!1}return s[i.toString()]}});var ts=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 ts=="object"&&ts;(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+/",E=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(E,"");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,ht=T.length-H;++K<ht;)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:u,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})(ts)}(Mt,Mt.exports);var As=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 pr={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 ss(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("="),E=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=n.read(E,u),i===u)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 ss(this.converter,vt({},this.attributes,i))},withConverter:function(i){return ss(vt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var gr=ss(pr,{path:"/"});let bt;const Tr=new Uint8Array(16);function Ir(){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(Tr)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function Or(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 Nr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Cs={randomUUID:Nr};function Ps(n,e,t){if(Cs.randomUUID&&!n)return Cs.randomUUID();n=n||{};const s=n.random||(n.rng||Ir)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Or(s)}var ns=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(ns||{});const is=407,Lt=",",fr=[{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"}],Ar=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];fr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),ns.CONSENT.toString(),ns.LEGITIMATE_INTERESTS.toString();const Cr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Pr=Object.defineProperty,wr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Ds=(n,e,t)=>e in n?Pr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rr=(n,e)=>{for(var t in e||(e={}))mr.call(e,t)&&Ds(n,t,e[t]);if(ws)for(var t of ws(e))Vr.call(e,t)&&Ds(n,t,e[t]);return n},Mr=(n,e)=>wr(n,Dr(e)),vr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const ms="fides_consent",br=365,Gt=gr.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),Lr=()=>Ps();Lr();const Gr=n=>Gt.get(n),yr=()=>{const n=Gr(ms);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(As.decode(n))}catch{return}}},Vs=(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=As.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(ms,i,{path:"/",domain:o,expires:br})){const E=yr();if(E&&E.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},Ur=n=>{const e={};return Ar.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,es(r.preference)]))}),e},Fr=(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}`})}})},xr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,es(s)]));return Object.fromEntries(e)},Br=(n,e)=>vr(void 0,null,function*(){var t;const s=(t=window.Fides)==null?void 0:t.experience,i=s?.non_applicable_privacy_notices||[];return Mr(Rr({},n),{consent:xr(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]},Hr=n=>We(n).source==="gacp",$r=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)},Rs=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}},Ms=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("")},zr=1,Ut={us:{name:X.NAME,id:X.ID},us_ca:{name:ie.NAME,id:ie.ID},us_co:{name:oe.NAME,id:oe.ID},us_ct:{name:le.NAME,id:le.ID},us_ut:{name:ae.NAME,id:ae.ID},us_va:{name:re.NAME,id:re.ID},us_de:{name:Se.NAME,id:Se.ID},us_fl:{name:ce.NAME,id:ce.ID},us_ia:{name:_e.NAME,id:_e.ID},us_mt:{name:de.NAME,id:de.ID},us_ne:{name:he.NAME,id:he.ID},us_nh:{name:pe.NAME,id:pe.ID},us_nj:{name:ge.NAME,id:ge.ID},us_or:{name:Ee.NAME,id:Ee.ID},us_tn:{name:Te.NAME,id:Te.ID},us_tx:{name:ue.NAME,id:ue.ID}};var $e=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))($e||{});function St(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function kr(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 Yr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>St(r.language,n));if(i)return i}const s=t.translations.find(i=>St(i.language,e));return s||t.translations[0]||null}function jr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>St(r.language,n));if(i)return i}const s=t.translations.find(i=>St(i.language,e));return s||t.translations[0]||null}var Wr=Object.defineProperty,Qr=Object.defineProperties,qr=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,bs=(n,e,t)=>e in n?Wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e)=>{for(var t in e||(e={}))Jr.call(e,t)&&bs(n,t,e[t]);if(vs)for(var t of vs(e))Xr.call(e,t)&&bs(n,t,e[t]);return n},Gs=(n,e)=>Qr(n,qr(e)),Zr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const eo={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},to="Fides.js",so=(n,e,t,s,i)=>Zr(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=Gs(Ls({},eo),{body:JSON.stringify(Gs(Ls({},e),{source:to}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var no=Object.defineProperty,io=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable,Us=(n,e,t)=>e in n?no(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tt=(n,e)=>{for(var t in e||(e={}))oo.call(e,t)&&Us(n,t,e[t]);if(ys)for(var t of ys(e))ao.call(e,t)&&Us(n,t,e[t]);return n},lo=(n,e)=>io(n,ro(e)),Ft=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(Ft||{});const Fs=(n,e,t)=>{var s,i,r,o,a,l,E,u;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=fs(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:lo(Tt({},H),{debug:!!((u=(E=window.Fides)==null?void 0:E.options)!=null&&u.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent($)}};var co=Object.defineProperty,Eo=(n,e,t)=>e in n?co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,uo=(n,e,t)=>Eo(n,e+"",t);class So{constructor(){uo(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=Ps()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const _o=new So;var ho=Object.defineProperty,po=Object.defineProperties,go=Object.getOwnPropertyDescriptors,xs=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Bs=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ke=(n,e)=>{for(var t in e||(e={}))To.call(e,t)&&Bs(n,t,e[t]);if(xs)for(var t of xs(e))Io.call(e,t)&&Bs(n,t,e[t]);return n},xt=(n,e)=>po(n,go(e)),rs=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Oo=[Fe.SCRIPT,Fe.GPC,Fe.OT_MIGRATION];function No(n,e,t,s,i,r,o,a,l){return rs(this,null,function*(){const E=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),u=Ke({browser_identity:e.identity,preferences:E,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield so(s,u,n,e,t)})}const fo=n=>rs(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:E,tcf:u,updateCookie:S}){var d,O,T,H,$,K,Z,W,Re;if(!S&&e&&(S=we=>Br(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)||(Oo.includes(i)?Ft.EXTERNAL:Ft.FIDES)}),ht=yield S(a);Object.assign(a,ht),Object.assign(a.fides_meta,{consentMethod:i}),Fs("FidesUpdating",a,xt(Ke({},l),{trigger:Ie}));const At=fs(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),ne=!!((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=hr(At,r,ne),window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Vs(xt(Ke({},a),{consent:At}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield No(r,a,s,i,t,e,u,o,E)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Ge,Xe;(Ge=we.notice)!=null&&Ge.cookies&&Fr(we.notice.cookies,(Xe=s.experience_config)==null?void 0:Xe.auto_subdomain_cookie_deletion)}),Fs("FidesUpdated",a,xt(Ke({},l),{trigger:Ie}))}),Hs=(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 u=l?.consent_mechanism===dt.NOTICE_ONLY;return u&&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"`):!u&&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),$s=(n,e)=>rs(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:E=et.THROW,consentMethod:u=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=kr(s)||Ji,Z=ne=>{if(E===et.THROW)throw new Error(ne);E===et.WARN&&console.warn(ne)};let W=i.consent||{};if(l)try{const ne=Rs(l);if(ne.nc){const we=ur(ne.nc);W=Ke(Ke({},i.consent),we);const Ge=Hs(H||[],$||[],W,u);Ge&&Z(Ge.message)}}catch(ne){const we=ne instanceof Error?ne.message:String(ne);Z(`Invalid fidesString provided: ${we}`)}else if(a){const ne=Hs(H||[],$||[],a,u);ne&&Z(ne.message),W=Ke(Ke({},i.consent),a)}const Re=[];Object.entries(W).forEach(([ne,we])=>{const Ge=H?.find(Xe=>Xe.notice_key===ne);if(Ge){const Xe=Yr(o,K,Ge),as=Xe?.privacy_notice_history_id;let jt;if(typeof we=="boolean"?jt=Vt(we,Ge.consent_mechanism):jt=we,as){const un=new er(Ge,jt,as);Re.push(un)}}});let Ie;if((t=T?.translations)!=null&&t.length){const ne=jr(o,K,T);Ie=ne?.privacy_experience_config_history_id}const ht=dr(r.geolocation),At=_o.getServedNoticeHistoryId();return fo({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:u,options:r.options,userLocationString:ht,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 _t 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 os{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 Ks 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 zs;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(zs||(zs={}));var q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(q||(q={}));class ks{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 Ys{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 js{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 Ao{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,E="";for(let u=0;u<o;u++){const S=r[u];if(l===0&&(a++,l=S),u===o-1||r[u+1]>s(S,r[o-1])){const d=S!==l;E+=xe.encode(d),E+=P.encode(l,g.vendorId),d&&(E+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const s=new Ks,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),E=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<E;u++){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,E=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((S,d)=>{r+=xe.encode(S),o=e.maxId>E&&u<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),u+=g.singleOrRange,u+=g.vendorId):(s.push(d),u+=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 E=xe.decode(e.charAt(i));i+=g.singleOrRange;const u=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=u;d<=S;d++)s.set(d)}else s.set(u)}}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 Ws(){return{[_.version]:P,[_.created]:Ys,[_.lastUpdated]:Ys,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:js,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:xe,[_.useNonStandardTexts]:xe,[_.specialFeatureOptins]:qe,[_.purposeConsents]:qe,[_.purposeLegitimateInterests]:qe,[_.purposeOneTreatment]:xe,[_.publisherCountryCode]:js,[_.vendorConsents]:Nt,[_.vendorLegitimateInterests]:Nt,[_.publisherRestrictions]:Ao,segmentType:P,[_.vendorsDisclosed]:Nt,[_.vendorsAllowed]:Nt,[_.publisherConsents]:qe,[_.publisherLegitimateInterests]:qe,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:qe,[_.publisherCustomLegitimateInterests]:qe}}class Co{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 Po{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 Co;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(ks.KEY_TO_ID[t],g.segmentType));const r=Ws();return s.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,E)}catch(u){throw new ze(`Error encoding ${t}->${o}: ${u.message}`)}}),os.encode(i)}static decode(e,t,s){const i=os.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=Ws();return o.forEach(l=>{const E=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[_.numCustomPurposes])),u!==0){const S=i.substr(r,u);if(E===Nt?t[l]=E.decode(S,t.version):t[l]=E.decode(S,u),Number.isInteger(u))r+=u;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 wo{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 E=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let S=0,d=E.length;S<d&&!u;S++)u=E[S].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||E[S].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";u||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 Do{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}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),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 _t("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 _t("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 _t("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 Do.fetch(e))}catch(t){throw new _t(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 _t("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 _t("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 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 Ks;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=wo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Po(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 qs);for(let r=0;r<i;r++){const o=s[r],l=os.decode(o.charAt(0)).substr(0,g.segmentType),E=ks.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Qs.decode(o,t,E)}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 Js;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Js||(Js={}));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 Zs(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 Xs{cmpId=fe.cmpId;cmpVersion=fe.cmpVersion;gdprApplies=fe.gdprApplies;tcfPolicyVersion=fe.tcfPolicyVersion}class Zs extends Xs{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 Ro extends Zs{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(),E=t[l].substr(0,i),u=t[l].substr(i+1);t[l]=E+a+u})}}return t}}class Mo extends Xs{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 vo extends $t{respond(){this.invokeCallback(new Mo)}}class bo extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Ro(this.param))}}class Lo 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 Go extends Kt{respond(){this.listenerId=fe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yo extends $t{respond(){this.invokeCallback(fe.eventQueue.remove(this.param))}}class Pa{static[Je.PING]=vo;static[Je.GET_TC_DATA]=Kt;static[Je.GET_IN_APP_TC_DATA]=bo;static[Je.GET_VENDOR_LIST]=Lo;static[Je.ADD_EVENT_LISTENER]=Go;static[Je.REMOVE_EVENT_LISTENER]=yo}const Uo=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 Fo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const xo=1,en=[1,3,4,5,6],Bo=2,Ho=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Hr).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`${Bo}~${s}~dv.${i}`},$o=n=>Fo(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=is,l.cmpVersion=xo,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const E=e.minimal_tcf?Kr(e):$r(e);if(l.gvl.narrowVendorsTo(E),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=>en.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;en.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 u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=Ho({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${Lt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Ko=Object.defineProperty,zo=Object.defineProperties,ko=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,sn=(n,e,t)=>e in n?Ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wo=(n,e)=>{for(var t in e||(e={}))Yo.call(e,t)&&sn(n,t,e[t]);if(tn)for(var t of tn(e))jo.call(e,t)&&sn(n,t,e[t]);return n},Qo=(n,e)=>zo(n,ko(e)),qo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},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}}):[],Jo=({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})}},Xo=({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)}},Zo=(n,e,t,s,i,r)=>qo(void 0,null,function*(){var o;const a=yield $o({tcStringPreferences:t,experience:s});return Qo(Wo({},n),{fides_string:a,tcf_consent:Ur(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),zt="us",ea=n=>n?.toLowerCase().startsWith("us"),ta=({experienceRegion:n,usApproach:e})=>ea(n)&&e===$e.NATIONAL?zt:n,sa=({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)})},nn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ta({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(E=>E.region===e)})||(i=zt,r=Ut[i])),!r||i===zt&&t?.us_approach===$e.STATE?{}:{gppRegion:i,gppSection:r}},na=({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,E=i[a],u=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;u&&u.forEach(S=>{let d=S.not_available;E===!1?d=S.opt_out:E&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},ia=({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)})})},ra=[1,3,4,5,6],oa=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=nn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:E}=o,u=(a=E?.find(S=>S.region===i))==null?void 0:a.mechanism;if(u){const S=u.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},aa=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=Cr,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),E=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=E.filter(d=>!ra.includes(parseInt(d,10))),o.vendorsConsent=u,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},la=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),ca=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Rs(n);if(!n||!t||!e||!la(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===gt.TCF_OVERLAY;if(!i.experience_config.translations.find(u=>St(u.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const a=i.privacy_notices.map(u=>({notice:u,bestTranslation:u.translations.find(S=>St(S.language,s))||null}));let l,E;if(r){const u=aa({cmpApi:e,experience:i});E=i.minimal_tcf?Xo({experience:i,enabledIds:u}):Jo({experience:i,enabledIds:u}),l=d=>Zo(d,E,u,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==dt.NOTICE_ONLY?S[d.notice.notice_key]=u.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),$s(window.Fides,{noticeConsent:S,tcf:E,updateCookie:l})}else{const u=oa({cmpApi:e,experience:i});$s(window.Fides,{noticeConsent:u})}},rn="__gppLocator",on=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(()=>on(n),5)},da=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},Ea=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ua=()=>{const n=[],e=[];let t;const s=(o,a,l,E)=>{if(o==="queue")return n;if(o==="events")return e;const u={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(u,!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:u},!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:u},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,E]));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(!Ea(l))return null;if(l.__gppCall&&window.__gpp){const u=l.__gppCall;window.__gpp(u.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:u.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in u?u.parameter:void 0,"version"in u?u.version:"1.1")}return null};da(rn)||(on(rn),window.__gpp=s,window.addEventListener("message",i,!1))},an=(n,{cmpApi:e,experience:t,cookie:s})=>{const{gppRegion:i,gppSection:r}=nn(t);if(!i||!r)return[];const o=new Set;o.add(r),n({gppApi:e,gppRegion:i,gppSection:r,privacyNotices:t.privacy_notices||[],noticeConsent:s?.consent});const{gpp_settings:a}=t;return sa({gppApi:e,sectionName:r.name,gppSettings:a}),Array.from(o)},ln=({cmpApi:n,experience:e})=>an(ia,{cmpApi:n,experience:e}),cn=({cmpApi:n,cookie:e,experience:t})=>an(na,{cmpApi:n,cookie:e,experience:t}),dn=(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(!ut(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=Uo(n);return s?(e.setFieldValueBySectionId(j.ID,"CmpId",is),e.setSectionStringById(j.ID,s),!0):!1},Sa=()=>{const n=[];if(ut(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},_a=()=>{ua();const n=new qi(is,zr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Sa();if(n.setSupportedAPIs(o),!ut(s))return;const{fidesString:a}=r;if(a&&ca({fidesString:a,cmpApi:n}),!a&&(!Er(s,e.detail,i,r)||!r.tcfEnabled&&Os(s.privacy_notices)&&!dn(i,e.detail.fides_string,s.privacy_notices))){const l=En(e,n);l&&n.setApplicableSections([j.ID]);const E=ln({cmpApi:n,experience:s}),u=cn({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(d=>d.id)),!l&&!E.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const S=Ms(n);window.Fides.fides_string=S}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(ut(t)){!i.tcfEnabled&&Os(t.privacy_notices)&&!dn(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Me.READY):n.setSignalStatus(Me.NOT_READY),n.setCmpDisplayStatus(je.VISIBLE);const r=ln({cmpApi:n,experience:t});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")),ut(window.Fides.experience)){const s=cn({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=Ms(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Vs(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)&&_a()});
|
|
1
|
+
class kt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class It{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 st=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)}},$s=class extends st{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new kt("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},js=class extends st{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Qs extends st{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 Xs extends st{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 qs extends st{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 Le;(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"})(Le||(Le={}));let Js=class extends st{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new kt("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}},ss=class{static[Le.ADD_EVENT_LISTENER]=$s;static[Le.GET_FIELD]=Qs;static[Le.GET_SECTION]=Xs;static[Le.HAS_SECTION]=qs;static[Le.PING]=js;static[Le.REMOVE_EVENT_LISTENER]=Js};var nt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(nt||(nt={}));var ze;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(ze||(ze={}));var ns;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ns||(ns={}));var me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(me||(me={}));class Zs{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=Le.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Le.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 ss[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 ss[e]!==void 0}}let en=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 kt(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class _t extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class Q{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 _t("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 _t("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"}},_e=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class P{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 _e("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 Tt{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 _e("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=P.decode(i),o=Tt.DICT.charAt(r);t+=o,s+=6}catch{throw new _e("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=Tt.REVERSE_DICT.get(i),o=P.encode(r,6);t+=o}return t}}class U extends Tt{static instance=new U;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 f{static instance=new f;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 it{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 rt=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new _e("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class is{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=P.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"+it.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"+it.encode(a)+it.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=P.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=rt.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=it.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let d=it.decode(e.substring(r,l+2))+i;i=d,r=l+2;for(let S=E;S<=d;S++)t.push(S)}else{let l=e.indexOf("11",r),E=it.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class tn 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 tn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Pe extends h{constructor(e){super(e),this.name="SubstringError"}}class X{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Pe("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class sn extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return is.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=is.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=P.decode(X.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 X.substring(e,t,i)}catch(s){throw new Pe(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 P.encode(this.value,this.bitStringLength)}catch(e){throw new _e(e)}}decode(e){try{this.value=P.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.bitStringLength)}catch(s){throw new Pe(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 Fe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(Fe||(Fe={}));const nn=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class A{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 _t("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 _t(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 rn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return nn}initializeFields(){let e=new w;return e.put(Fe.ID.toString(),new c(6,Me.ID)),e.put(Fe.VERSION.toString(),new c(6,Me.VERSION)),e.put(Fe.SECTION_IDS.toString(),new sn([])),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 Me extends Q{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Me.ID}getName(){return Me.NAME}getVersion(){return Me.VERSION}initializeSegments(){let e=[];return e.push(new rn),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 on=[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],an=[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],ln=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],cn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class tt extends Tt{static instance=new tt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class ot{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=P.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+P.encode(t[r][0],16):i+="1"+P.encode(t[r][0],16)+P.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=P.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=rt.decode(e.substring(i,i+1));if(i++,o===!0){let a=P.decode(e.substring(i,i+16));i+=16;let l=P.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=P.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Kt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=P.decode(X.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return X.substring(e,t,i)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class dn{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 rs 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+=P.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=P.encode(i.getKey(),this.keyBitStringLength),t+=P.encode(i.getType(),this.typeBitStringLength),t+=ot.encode(i.getIds())}return t}catch(e){throw new _e(e)}}decode(e){try{let t=[],s=P.decode(X.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=P.decode(X.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=P.decode(X.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Kt([]).substring(e,i),E=ot.decode(l);i+=l.length,t.push(new dn(o,a,E))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=X.substring(e,t,t+12);let i=P.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=X.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=X.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let E=new Kt([]).substring(e,r);r+=E.length,s+=E}return s}catch(s){throw new Pe(s)}}}class H extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return rt.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=rt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+1)}catch(s){throw new Pe(s)}}}class os{static encode(e){return e?P.encode(Math.round(e.getTime()/100),36):P.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(P.decode(e)*100)}}class Nt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return os.encode(this.value)}catch(e){throw new _e(e)}}decode(e){try{this.value=os.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+36)}catch(s){throw new Pe(s)}}}class at{static encode(e,t){if(e.length>t)throw new _e("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=rt.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(rt.decode(e.substring(s,s+1)));return t}}class Ge extends Ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return at.encode(this.value,this.numElements)}catch(e){throw new _e(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.numElements)}catch(s){throw new Pe(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 as{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+=P.encode(63,6);else if(r>=65)s+=P.encode(e.charCodeAt(i)-65,6);else throw new _e("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=P.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class zt extends Ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return as.encode(this.value,this.stringLength)}catch(e){throw new _e(e)}}decode(e){try{this.value=as.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.stringLength*6)}catch(s){throw new Pe(s)}}}class qe 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=ot.encode(this.value),s=t.length,i=e;if(s<=i)return P.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 P.encode(e,16)+"0"+at.encode(r,i)}}catch(e){throw new _e(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=ot.decode(e.substring(17));else{let t=[],s=at.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=P.decode(X.substring(e,t,t+16));return e.charAt(t+16)==="1"?X.substring(e,t,t+17)+new Kt([]).substring(e,t+17):X.substring(e,t,t+17+s)}catch(s){throw new Pe(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class En extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return on}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,Y.VERSION)),t.put(p.CREATED.toString(),new Nt(e)),t.put(p.LAST_UPDATED.toString(),new Nt(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 zt(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 H(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new H(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ge([!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 Ge([!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 H(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new zt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new qe([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new rs(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 Ot extends Ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return at.encode(this.value,this.getLength())}catch(e){throw new _e(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.getLength())}catch(s){throw new Pe(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 un extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return an}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ge([!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 Ge([!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 Ot(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ot(()=>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 Sn extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ln}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 qe([])),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 _n extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return cn}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 qe([])),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 Y extends Q{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Y.ID}getName(){return Y.NAME}getVersion(){return Y.VERSION}initializeSegments(){let e=[];return e.push(new En),e.push(new un),e.push(new Sn),e.push(new _n),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 T;(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"})(T||(T={}));const hn=[T.VERSION,T.CREATED,T.LAST_UPDATED,T.CMP_ID,T.CMP_VERSION,T.CONSENT_SCREEN,T.CONSENT_LANGUAGE,T.VENDOR_LIST_VERSION,T.TCF_POLICY_VERSION,T.USE_NON_STANDARD_STACKS,T.SPECIAL_FEATURE_EXPRESS_CONSENT,T.PURPOSES_EXPRESS_CONSENT,T.PURPOSES_IMPLIED_CONSENT,T.VENDOR_EXPRESS_CONSENT,T.VENDOR_IMPLIED_CONSENT,T.PUB_RESTRICTIONS],pn=[T.PUB_PURPOSES_SEGMENT_TYPE,T.PUB_PURPOSES_EXPRESS_CONSENT,T.PUB_PURPOSES_IMPLIED_CONSENT,T.NUM_CUSTOM_PURPOSES,T.CUSTOM_PURPOSES_EXPRESS_CONSENT,T.CUSTOM_PURPOSES_IMPLIED_CONSENT],gn=[T.DISCLOSED_VENDORS_SEGMENT_TYPE,T.DISCLOSED_VENDORS];class Tn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return hn}initializeFields(){let e=new Date,t=new w;return t.put(T.VERSION.toString(),new c(6,Te.VERSION)),t.put(T.CREATED.toString(),new Nt(e)),t.put(T.LAST_UPDATED.toString(),new Nt(e)),t.put(T.CMP_ID.toString(),new c(12,0)),t.put(T.CMP_VERSION.toString(),new c(12,0)),t.put(T.CONSENT_SCREEN.toString(),new c(6,0)),t.put(T.CONSENT_LANGUAGE.toString(),new zt(2,"EN")),t.put(T.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(T.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(T.USE_NON_STANDARD_STACKS.toString(),new H(!1)),t.put(T.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!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(T.PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!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(T.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(T.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(T.PUB_RESTRICTIONS.toString(),new rs(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 In extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pn}initializeFields(){let e=new w;e.put(T.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(T.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!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(T.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!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(T.NUM_CUSTOM_PURPOSES.toString(),t),e.put(T.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e.put(T.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ot(()=>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 Nn extends A{base64UrlEncoder=tt.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gn}initializeFields(){let e=new w;return e.put(T.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(T.DISCLOSED_VENDORS.toString(),new qe([])),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 Te extends Q{static ID=5;static VERSION=1;static NAME="tcfcav1";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 Tn),e.push(new In),e.push(new Nn),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(T.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==T.CREATED&&e!==T.LAST_UPDATED){let s=new Date;super.setFieldValue(T.CREATED,s),super.setFieldValue(T.LAST_UPDATED,s)}}}class Yt{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 On{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 fn{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.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(he||(he={}));const An=[he.VERSION,he.NOTICE,he.OPT_OUT_SALE,he.LSPA_COVERED];class Cn extends A{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new fn;return t.put(he.VERSION,new On(Ie.VERSION)),t.put(he.NOTICE,new Yt("-",e)),t.put(he.OPT_OUT_SALE,new Yt("-",e)),t.put(he.LSPA_COVERED,new Yt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(he.VERSION).getValue(),t+=e.get(he.NOTICE).getValue(),t+=e.get(he.OPT_OUT_SALE).getValue(),t+=e.get(he.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(he.VERSION).setValue(parseInt(e.substring(0,1))),t.get(he.NOTICE).setValue(e.charAt(1)),t.get(he.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(he.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Ie extends Q{static ID=6;static VERSION=1;static NAME="uspv1";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 Cn),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 I;(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"})(I||(I={}));const wn=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],Pn=[I.GPC_SEGMENT_TYPE,I.GPC];class ls{static encode(e,t,s){if(e.length>s)throw new _e("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=P.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(P.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class W extends Ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ls.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new _e(e)}}decode(e){try{this.value=ls.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return X.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Pe(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 Dn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}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(I.VERSION.toString(),new c(6,j.VERSION)),i.put(I.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(I.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 mn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}initializeFields(){let e=new w;return e.put(I.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(I.GPC.toString(),new H(!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 Q{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 Dn),e.push(new mn),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(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.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(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var D;(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"})(D||(D={}));const Vn=[D.VERSION,D.SALE_OPT_OUT_NOTICE,D.SHARING_OPT_OUT_NOTICE,D.SENSITIVE_DATA_LIMIT_USE_NOTICE,D.SALE_OPT_OUT,D.SHARING_OPT_OUT,D.SENSITIVE_DATA_PROCESSING,D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,D.PERSONAL_DATA_CONSENTS,D.MSPA_COVERED_TRANSACTION,D.MSPA_OPT_OUT_OPTION_MODE,D.MSPA_SERVICE_PROVIDER_MODE],Rn=[D.GPC_SEGMENT_TYPE,D.GPC];class Mn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vn}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(D.VERSION.toString(),new c(6,J.VERSION)),i.put(D.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(D.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(D.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(D.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(D.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 bn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new w;return e.put(D.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(D.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(D.GPC.toString(),new H(!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 J extends Q{static ID=8;static VERSION=1;static NAME="usca";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 bn),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(D.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(D.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(D.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var $;(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"})($||($={}));const Ln=[$.VERSION,$.SHARING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE];class Gn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}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($.VERSION.toString(),new c(6,Ee.VERSION)),i.put($.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.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 Ee extends Q{static ID=9;static VERSION=1;static NAME="usva";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 Gn),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 F;(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"})(F||(F={}));const vn=[F.VERSION,F.SHARING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],yn=[F.GPC_SEGMENT_TYPE,F.GPC];class Un extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vn}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(F.VERSION.toString(),new c(6,Z.VERSION)),i.put(F.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.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 Fn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new H(!0)),e.put(F.GPC.toString(),new H(!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 Z extends Q{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Z.ID}getName(){return Z.NAME}getVersion(){return Z.VERSION}initializeSegments(){let e=[];return e.push(new Un),e.push(new Fn),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(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.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(F.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 xn=[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 Bn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xn}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,ue.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 W(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 ue extends Q{static ID=11;static VERSION=1;static NAME="usut";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 Bn),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 Hn=[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],kn=[x.GPC_SEGMENT_TYPE,x.GPC];class Kn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hn}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,ee.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 W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),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 UsCtCoreSegment '"+e+"'")}}}class zn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}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 H(!0)),e.put(x.GPC.toString(),new H(!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 ee extends Q{static ID=12;static VERSION=1;static NAME="usct";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 Kn),e.push(new zn),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 z;(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"})(z||(z={}));const Yn=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];class Wn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}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(z.VERSION.toString(),new c(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(z.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 Se extends Q{static ID=13;static VERSION=1;static NAME="usfl";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 Wn),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 m;(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"})(m||(m={}));const $n=[m.VERSION,m.SHARING_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],jn=[m.GPC_SEGMENT_TYPE,m.GPC];class Qn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}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,te.VERSION)),i.put(m.SHARING_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 W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),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 UsMtCoreSegment '"+e+"'")}}}class Xn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}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 H(!0)),e.put(m.GPC.toString(),new H(!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 te extends Q{static ID=14;static VERSION=1;static NAME="usmt";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 Qn),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 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 qn=[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],Jn=[V.GPC_SEGMENT_TYPE,V.GPC];class Zn extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.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(V.VERSION.toString(),new c(6,se.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 W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(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 UsOrCoreSegment '"+e+"'")}}}class ei extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}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 H(!0)),e.put(V.GPC.toString(),new H(!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 se extends Q{static ID=15;static VERSION=1;static NAME="usor";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 Zn),e.push(new ei),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 ti=[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],si=[R.GPC_SEGMENT_TYPE,R.GPC];class ni extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.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(R.VERSION.toString(),new c(6,ne.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 W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),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 UsTxCoreSegment '"+e+"'")}}}class ii extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}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 H(!0)),e.put(R.GPC.toString(),new H(!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 ne extends Q{static ID=16;static VERSION=1;static NAME="ustx";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 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(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 ri=[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],oi=[M.GPC_SEGMENT_TYPE,M.GPC];class ai extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.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(M.VERSION.toString(),new c(6,ie.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 W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),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 UsDeCoreSegment '"+e+"'")}}}class li extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}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 H(!0)),e.put(M.GPC.toString(),new H(!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 ie extends Q{static ID=17;static VERSION=1;static NAME="usde";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 ai),e.push(new li),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 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 ci=[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],di=[b.GPC_SEGMENT_TYPE,b.GPC];class Ei extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ci}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.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 W(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 ui extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return di}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 H(!0)),e.put(b.GPC.toString(),new H(!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 re extends Q{static ID=18;static VERSION=1;static NAME="usia";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 Ei),e.push(new ui),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 Si=[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],_i=[L.GPC_SEGMENT_TYPE,L.GPC];class hi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.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(L.VERSION.toString(),new c(6,oe.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 W(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 pi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _i}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 H(!0)),e.put(L.GPC.toString(),new H(!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 oe extends Q{static ID=19;static VERSION=1;static NAME="usne";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(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 gi=[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],Ti=[G.GPC_SEGMENT_TYPE,G.GPC];class Ii extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.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(G.VERSION.toString(),new c(6,ae.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 W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(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 Ni extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}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 H(!0)),e.put(G.GPC.toString(),new H(!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 ae extends Q{static ID=20;static VERSION=1;static NAME="usnh";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 Ni),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 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 Oi=[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],fi=[v.GPC_SEGMENT_TYPE,v.GPC];class Ai extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}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,le.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 W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(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 UsNjCoreSegment '"+e+"'")}}}class Ci extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fi}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 H(!0)),e.put(v.GPC.toString(),new H(!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 le extends Q{static ID=21;static VERSION=1;static NAME="usnj";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(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 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 wi=[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],Pi=[y.GPC_SEGMENT_TYPE,y.GPC];class Di extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}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,ce.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 W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),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 UsTnCoreSegment '"+e+"'")}}}class mi extends A{base64UrlEncoder=U.getInstance();bitStringEncoder=f.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}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 H(!0)),e.put(y.GPC.toString(),new H(!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 ce extends Q{static ID=22;static VERSION=1;static NAME="ustn";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(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(".")}}class q{static SECTION_ID_NAME_MAP=new Map([[Y.ID,Y.NAME],[Te.ID,Te.NAME],[Ie.ID,Ie.NAME],[j.ID,j.NAME],[J.ID,J.NAME],[Ee.ID,Ee.NAME],[Z.ID,Z.NAME],[ue.ID,ue.NAME],[ee.ID,ee.NAME],[Se.ID,Se.NAME],[te.ID,te.NAME],[se.ID,se.NAME],[ne.ID,ne.NAME],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME]]);static SECTION_ORDER=[Y.NAME,Te.NAME,Ie.NAME,j.NAME,J.NAME,Ee.NAME,Z.NAME,ue.NAME,ee.NAME,Se.NAME,te.NAME,se.NAME,ne.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME]}class cs{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===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===Y.NAME?(i=new Y,this.sections.set(Y.NAME,i)):e===Ie.NAME?(i=new Ie,this.sections.set(Ie.NAME,i)):e===j.NAME?(i=new j,this.sections.set(j.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===Z.NAME?(i=new Z,this.sections.set(Z.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===te.NAME?(i=new te,this.sections.set(te.NAME,i)):e===se.NAME?(i=new se,this.sections.set(se.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.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)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new _t(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(q.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(q.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(q.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(q.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(q.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 Me;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<q.SECTION_ORDER.length;t++){let s=q.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<q.SECTION_ORDER.length;r++){let o=q.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 Me;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 Me(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]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}else if(r[o]===Y.ID){let l=new Y(t[o+1]);s.set(Y.NAME,l)}else if(r[o]===Ie.ID){let l=new Ie(t[o+1]);s.set(Ie.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===J.ID){let l=new J(t[o+1]);s.set(J.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===Z.ID){let l=new Z(t[o+1]);s.set(Z.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]===te.ID){let l=new te(t[o+1]);s.set(te.NAME,l)}else if(r[o]===se.ID){let l=new se(t[o+1]);s.set(se.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.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)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new Y(e);return t.set(Y.NAME,s),new Me().setFieldValue(Fe.SECTION_IDS,[2]),t.set(Me.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(q.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===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===Y.NAME?(s=new Y,this.sections.set(Y.NAME,s)):e===Ie.NAME?(s=new Ie,this.sections.set(Ie.NAME,s)):e===j.NAME?(s=new j,this.sections.set(j.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===Z.NAME?(s=new Z,this.sections.set(Z.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===te.NAME?(s=new te,this.sections.set(te.NAME,s)):e===se.NAME?(s=new se,this.sections.set(se.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.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)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(q.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<q.SECTION_ORDER.length;t++){let s=q.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 Vi{gppVersion="1.1";supportedAPIs=[];eventQueue=new en(this);cmpStatus=nt.LOADING;cmpDisplayStatus=ze.HIDDEN;signalStatus=me.NOT_READY;applicableSections=[];gppModel=new cs;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=nt.LOADING,this.cmpDisplayStatus=ze.HIDDEN,this.signalStatus=me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new cs,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Wt{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 _=a.response;if(typeof _=="string")try{_=JSON.parse(_)}catch{}r(_)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},d=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",d),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 ft=class extends Error{constructor(e){super(e),this.name="GVLError"}},Ri=class Ft{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 Ft.langSet.has(e)}forEach(e){Ft.langSet.forEach(e)}get size(){return Ft.langSet.size}},ds=class xt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Ri;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=xt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new xt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new ft("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new ft("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 xt;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 Wt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Wt.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 Wt.fetch(s))}catch(i){throw new ft("unable to load language: "+i.message)}}}else throw new ft(`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 Mi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Vi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new Zs(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(q.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(q.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(q.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(q.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(q.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(q.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(q.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return ds.fromVendorList(e)}async getGvlFromUrl(e){return ds.fromUrl(e)}}const bi=()=>{if(window.Fides?.options.tcfEnabled&&!window.Fides?.options.gppEnabled&&!window.Fides?.experience?.privacy_notices?.length)return!1;if(window.navigator?.globalPrivacyControl===!0)return window.navigator.globalPrivacyControl;const e=new URL(window.location.href).searchParams.get("globalPrivacyControl");return e==="true"?!0:e==="false"?!1:window.navigator?.globalPrivacyControl},$t=()=>typeof window>"u"?{}:{globalPrivacyControl:bi()},Li="en";class Gi{constructor(e,t,s){this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Es;(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={}))})(Es||(Es={}));var lt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(lt||{}),Ce=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ce||{}),At=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(At||{}),ct=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ct||{}),Je=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(Je||{}),dt=(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))(dt||{}),ve=(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))(ve||{});const vi=(n,e)=>!!Object.keys(e).includes(n.notice_key),jt=n=>!n||n===Ce.OPT_OUT?!1:n===Ce.OPT_IN?!0:n===Ce.ACKNOWLEDGE,Ct=(n,e)=>n?e===lt.NOTICE_ONLY?Ce.ACKNOWLEDGE:Ce.OPT_IN:Ce.OPT_OUT,yi=n=>typeof n=="string"?jt(n):n,Ui=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i,Et=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,us=n=>!!(n&&n.every(e=>e.default_preference===Ce.OPT_IN)),Fi=n=>{if(n){if(n.location&&Ui.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Ss=n=>n.fidesConsentOverride===ve.ACCEPT||n.fidesConsentOverride===ve.REJECT,xi=(n,e,t,s)=>s?.fidesDisableBanner||!Et(n)||s.fidesModalDisplay==="immediate"||n.experience_config?.component===dt.TCF_OVERLAY&&n.vendor_count===0?!1:n.experience_config?.component===dt.TCF_OVERLAY&&e?s&&Ss(s)?!1:n.meta?.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:n.experience_config?.component===dt.MODAL||n.experience_config?.component===dt.HEADLESS||!n?.privacy_notices?.length?!1:t?s&&Ss(s)?!1:e?.fides_meta.consentMethod===ve.GPC?!0:!n.privacy_notices?.every(r=>vi(r,t)):!0,Bi=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})}},Hi=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=At.OMIT})=>{if(!e?.length)return n;const i={...n};return s===At.INCLUDE?e.forEach(r=>{i[r]=t===ct.CONSENT_MECHANISM?Ce.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},ki=({consent:n,flagType:e=ct.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ct.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,yi(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]=Ct(o,a)}}),s):{...n}},_s=(n,e,t=[],s,i,r)=>{const o={...n},a=window.Fides?.options,l=a?.fidesConsentNonApplicableFlagMode??At.OMIT,E=a?.fidesConsentFlagType??ct.BOOLEAN,d={};Object.assign(d,Hi({consent:{},nonApplicableNotices:e??[],flagType:E,mode:l}));const S=t.reduce((B,O)=>({...B,[O.notice_key]:O.consent_mechanism}),{}),_={};return Object.entries(o).forEach(([B,O])=>{r?.includes(B)&&!e?.includes(B)||(_[B]=O)}),Object.assign(d,ki({consent:_,consentMechanisms:S,flagType:E})),d},Ki=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===ct.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?lt.NOTICE_ONLY:!0:r?lt.OPT_OUT:!1}return s[i.toString()]}});var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */wt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof Qt=="object"&&Qt;(r.global===r||r.window===r)&&(t=r);var o=function(O){this.message=O};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(O){throw new o(O)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=/[\t\n\f\r ]/g,d=function(O){O=String(O).replace(E,"");var de=O.length;de%4==0&&(O=O.replace(/==?$/,""),de=O.length),(de%4==1||/[^+a-zA-Z0-9/]/.test(O))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var De=0,Ne,Ae,be="",Ke=-1;++Ke<de;)Ae=l.indexOf(O.charAt(Ke)),Ne=De%4?Ne*64+Ae:Ae,De++%4&&(be+=String.fromCharCode(255&Ne>>(-2*De&6)));return be},S=function(O){O=String(O),/[^\0-\xFF]/.test(O)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var de=O.length%3,De="",Ne=-1,Ae,be,Ke,fe,Bt=O.length-de;++Ne<Bt;)Ae=O.charCodeAt(Ne)<<16,be=O.charCodeAt(++Ne)<<8,Ke=O.charCodeAt(++Ne),fe=Ae+be+Ke,De+=l.charAt(fe>>18&63)+l.charAt(fe>>12&63)+l.charAt(fe>>6&63)+l.charAt(fe&63);return de==2?(Ae=O.charCodeAt(Ne)<<8,be=O.charCodeAt(++Ne),fe=Ae+be,De+=l.charAt(fe>>10)+l.charAt(fe>>4&63)+l.charAt(fe<<2&63)+"="):de==1&&(fe=O.charCodeAt(Ne),De+=l.charAt(fe>>2)+l.charAt(fe<<4&63)+"=="),De},_={encode:S,decode:d,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=_;else for(var B in _)_.hasOwnProperty(B)&&(s[B]=_[B]);else t.base64=_})(Qt)}(wt,wt.exports);var hs=wt.exports;/*! js-cookie v3.0.5 | MIT */function Pt(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 zi={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 Xt(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Pt({},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("="),E=l.slice(1).join("=");try{var d=decodeURIComponent(l[0]);if(o[d]=n.read(E,d),i===d)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Pt({},r,{expires:-1}))},withAttributes:function(i){return Xt(this.converter,Pt({},this.attributes,i))},withConverter:function(i){return Xt(Pt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Yi=Xt(zi,{path:"/"});let Dt;const Wi=new Uint8Array(16);function $i(){if(!Dt&&(Dt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dt(Wi)}const ge=[];for(let n=0;n<256;++n)ge.push((n+256).toString(16).slice(1));function ji(n,e=0){return ge[n[e+0]]+ge[n[e+1]]+ge[n[e+2]]+ge[n[e+3]]+"-"+ge[n[e+4]]+ge[n[e+5]]+"-"+ge[n[e+6]]+ge[n[e+7]]+"-"+ge[n[e+8]]+ge[n[e+9]]+"-"+ge[n[e+10]]+ge[n[e+11]]+ge[n[e+12]]+ge[n[e+13]]+ge[n[e+14]]+ge[n[e+15]]}const Qi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var ps={randomUUID:Qi};function gs(n,e,t){if(ps.randomUUID&&!n)return ps.randomUUID();n=n||{};const s=n.random||(n.rng||$i)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ji(s)}var qt=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(qt||{});const Jt=407,mt=",",Xi=[{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"}],qi=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Xi.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),qt.CONSENT.toString(),qt.LEGITIMATE_INTERESTS.toString();const Ji={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]},Ts="fides_consent",Zi=365,Is=n=>{const e=(n??"").trim();return e.length>0?`${Ts}_${e}`:Ts},Vt=Yi.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),er=()=>gs();er();const tr=n=>Vt.get(n),sr=n=>{const e=tr(Is(n));if(e)try{return JSON.parse(e)}catch{try{return JSON.parse(hs.decode(e))}catch{return}}},Ns=(n,{base64Cookie:e=!1,fidesCookieSuffix:t}={})=>{if(typeof document>"u")return;const i=new Date().toISOString();n.fides_meta.updatedAt=i;let r=JSON.stringify(n);e&&(r=hs.encode(r));const o=window.location.hostname.split(".");let a="";for(let l=1;l<=o.length;l+=1)if(a=o.slice(-l).join("."),Vt.set(Is(t),r,{path:"/",domain:a,expires:Zi})){const d=sr(t);if(d&&d.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},nr=n=>{const e={};return qi.forEach(({cookieKey:t})=>{const s=n[t]??[];e[t]=Object.fromEntries(s.map(i=>[i.id,jt(i.preference)]))}),e},ir=(n,e=!0,t=!0)=>{const{hostname:s}=window.location;n.forEach(i=>{const r=e?s:i.domain;Vt.remove(i.name,{path:i.path??"/",domain:r}),t&&Vt.remove(i.name,{domain:`.${s}`})})},rr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,jt(s)]));return Object.fromEntries(e)},or=async(n,e)=>{const s=window.Fides?.experience?.non_applicable_privacy_notices||[];return{...n,consent:rr(e),non_applicable_notice_keys:s}},Ye=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Rt=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=Ye(n);if(t==="gvl"||t===void 0)return e.vendors[s]},ar=n=>Ye(n).source==="gacp",lr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>Rt(s,n.gvl)).map(s=>+Ye(s).id)},cr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>Rt(i,n.gvl)).map(i=>+Ye(i).id)},Os=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(mt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},fs=n=>{const e=n.getGppString();if(!e)return window.Fides.fides_string;const t=new Array(4).fill(""),s=(window.Fides.fides_string?.split(mt)||[]).concat(t);return t.map((r,o)=>o<2?`${s[o]},`:o===2?e:o===3&&s[3]?`,${s[3]}`:r).join("")},dr=1,Mt={us:{name:j.NAME,id:j.ID},us_ca:{name:J.NAME,id:J.ID},us_co:{name:Z.NAME,id:Z.ID},us_ct:{name:ee.NAME,id:ee.ID},us_ut:{name:ue.NAME,id:ue.ID},us_va:{name:Ee.NAME,id:Ee.ID},us_de:{name:ie.NAME,id:ie.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:re.NAME,id:re.ID},us_mt:{name:te.NAME,id:te.ID},us_ne:{name:oe.NAME,id:oe.ID},us_nh:{name:ae.NAME,id:ae.ID},us_nj:{name:le.NAME,id:le.ID},us_or:{name:se.NAME,id:se.ID},us_tn:{name:ce.NAME,id:ce.ID},us_tx:{name:ne.NAME,id:ne.ID}},Er=[j.NAME,J.NAME,Z.NAME,ee.NAME,ie.NAME,re.NAME,te.NAME,oe.NAME,ae.NAME,le.NAME,se.NAME,ce.NAME,ne.NAME];var xe=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(xe||{});function ut(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function ur(n){if(n?.experience_config?.translations){const{translations:e}=n.experience_config;return e.find(s=>s.is_default)?.language}}function Sr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>ut(r.language,n));if(i)return i}const s=t.translations.find(i=>ut(i.language,e));return s||t.translations[0]||null}function _r(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>ut(r.language,n));if(i)return i}const s=t.translations.find(i=>ut(i.language,e));return s||t.translations[0]||null}const hr={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},pr="Fides.js",gr=async(n,e,t,s,i)=>{if(t.apiOptions?.savePreferencesFn){try{await t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(a){return Promise.reject(a)}return Promise.resolve()}const r={...hr,body:JSON.stringify({...e,source:pr})};return(await fetch(`${t.fidesApiUrl}/privacy-preferences`,r)).ok,Promise.resolve()};var bt=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(bt||{});const As=(n,e,t)=>{const s=e?{...e}:void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const i={consentMethod:s?.fides_meta.consentMethod,...t};t?.trigger?.origin||(i.trigger={...i.trigger,origin:"fides"});const o=performance?.mark?.(n)?.startTime,a=s;a&&s?.consent&&(a.consent=_s(s.consent,window.Fides?.experience?.non_applicable_privacy_notices,window.Fides?.experience?.privacy_notices,void 0,void 0,s.non_applicable_notice_keys));const l=new CustomEvent(n,{detail:{...a,debug:!!window.Fides?.options?.debug,extraDetails:i,timestamp:o},bubbles:!0});window.dispatchEvent(l)}};class Tr{constructor(){this.servedNoticeHistoryId=null}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=gs()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const Ir=new Tr,Nr=[ve.SCRIPT,ve.GPC,ve.EXTERNAL_PROVIDER];async function Or(n,e,t,s,i,r,o,a,l){const E=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),d={browser_identity:e.identity,preferences:E,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id,...o??[]};await gr(s,d,n,e,t)}const fr=async({consentPreferencesToSave:n,privacyExperienceConfigHistoryId:e,experience:t,consentMethod:s,options:i,userLocationString:r,cookie:o,eventExtraDetails:a,servedNoticeHistoryId:l,tcf:E,updateCookie:d})=>{if(!d&&n&&(d=de=>or(de,n)),!d&&!n)throw new Error("updateCookie is required");const S={...a?.trigger,origin:a?.trigger?.origin||(Nr.includes(s)?bt.EXTERNAL:bt.FIDES)},_=await d(o);Object.assign(o,_),Object.assign(o.fides_meta,{consentMethod:s}),As("FidesUpdating",o,{...a,trigger:S});const B=_s(o.consent,window.Fides?.experience?.non_applicable_privacy_notices,window.Fides?.experience?.privacy_notices,void 0,void 0,o.non_applicable_notice_keys),O=!!window.Fides?.experience?.non_applicable_privacy_notices||!!window.Fides?.experience?.privacy_notices;if(window.Fides.consent=Ki(B,i,O),window.Fides.fides_string=o.fides_string,window.Fides.tcf_consent=o.tcf_consent,Ns({...o,consent:B},i),window.Fides.saved_consent=o.consent,!i.fidesDisableSaveApi)try{await Or(i,o,t,s,e,n,E,r,l)}catch{}n&&n.filter(de=>de.consentPreference===Ce.OPT_OUT).forEach(de=>{de.notice?.cookies&&ir(de.notice.cookies,t.experience_config?.cookie_deletion_based_on_host_domain,t.experience_config?.auto_subdomain_cookie_deletion)}),As("FidesUpdated",o,{...a,trigger:S})},Cs=(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!==ve.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 d=l?.consent_mechanism===lt.NOTICE_ONLY;return d&&o!==!0&&o!==Ce.ACKNOWLEDGE&&s!==ve.EXTERNAL_PROVIDER?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!d&&typeof o!="boolean"&&o!==Ce.OPT_IN&&o!==Ce.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),ws=async(n,e)=>{const{experience:t,cookie:s,config:i,locale:r}=n;if(!t)throw new Error("Experience must be initialized before updating consent");if(!i)throw new Error("Config is not initialized");if(!s)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(Je).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(Je).join(", ")} (default is ${Je.THROW})`);const{noticeConsent:o,fidesString:a,validation:l=Je.THROW,consentMethod:E=ve.SCRIPT,eventExtraDetails:d={trigger:{origin:bt.EXTERNAL}},tcf:S,updateCookie:_}=e,{experience_config:B,privacy_notices:O,non_applicable_privacy_notices:de}=t,De=ur(t)||Li,Ne=Oe=>{if(l===Je.THROW)throw new Error(Oe);l===Je.WARN&&console.warn(Oe)};let Ae=s.consent||{};if(a)try{const Oe=Os(a);if(Oe.nc){const Qe=Bi(Oe.nc);Ae={...s.consent,...Qe};const Xe=Cs(O||[],de||[],Ae,E);Xe&&Ne(Xe.message)}}catch(Oe){const Qe=Oe instanceof Error?Oe.message:String(Oe);Ne(`Invalid fidesString provided: ${Qe}`)}else if(o){const Oe=Cs(O||[],de||[],o,E);Oe&&Ne(Oe.message),Ae={...s.consent,...o}}const be=[];Object.entries(Ae).forEach(([Oe,Qe])=>{const Xe=O?.find(es=>es.notice_key===Oe);if(Xe){const ts=Sr(r,De,Xe)?.privacy_notice_history_id;let Ht;if(typeof Qe=="boolean"?Ht=Ct(Qe,Xe.consent_mechanism):Ht=Qe,ts){const Ws=new Gi(Xe,Ht,ts);be.push(Ws)}}});let Ke;B?.translations?.length&&(Ke=_r(r,De,B)?.privacy_experience_config_history_id);const fe=Fi(i.geolocation),Bt=Ir.getServedNoticeHistoryId();return fr({consentPreferencesToSave:be,privacyExperienceConfigHistoryId:Ke,experience:t,consentMethod:E,options:i.options,userLocationString:fe,cookie:s,eventExtraDetails:d,servedNoticeHistoryId:Bt,tcf:S,updateCookie:_})};class We extends Error{constructor(e){super(e),this.name="DecodingError"}}class Be extends Error{constructor(e){super(e),this.name="EncodingError"}}class St extends Error{constructor(e){super(e),this.name="GVLError"}}class He extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class Zt{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 Be("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 We("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 ke{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","IS","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 ke.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ke.langSet.has(e))return e;if(ke.langSet.has(t))return t;const s=t+"-"+t;if(ke.langSet.has(s))return s;for(const i of ke.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ke.langSet.forEach(e)}get size(){return ke.langSet.size}}class u{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 ht{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 Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class Ue extends ht{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 Ue;if(t.length!==2)throw new He("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}${Ue.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===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Ps extends ht{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===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.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(Ue.unHash(i)):t.push(Ue.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Ue.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=Ue.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 Ds;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(Ds||(Ds={}));var k;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(k||(k={}));class ms{static ID_TO_KEY=[k.CORE,k.VENDORS_DISCLOSED,k.VENDORS_ALLOWED,k.PUBLISHER_TC];static KEY_TO_ID={[k.CORE]:0,[k.VENDORS_DISCLOSED]:1,[k.VENDORS_ALLOWED]:2,[k.PUBLISHER_TC]:3}}class we extends ht{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 He("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set,this.maxId_=0}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[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.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 ye{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class C{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 Be(`${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 We("invalid bit length");return parseInt(e,2)}}class Vs{static encode(e,t){return C.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new We("invalid bit length");const s=new Date;return s.setTime(C.decode(e,t)*100),s}}class $e{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=ye.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new We("bitfield encoding length mismatch");const s=new we;for(let i=1;i<=t;i++)ye.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Rs{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 Be(`invalid language code: ${e}`);if(t%2===1)throw new Be(`numBits must be even, ${t} is not valid`);t=t/2;const o=C.encode(i,t),a=C.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=C.decode(e.slice(0,r),r)+65,a=C.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new We("invalid bit length for language");return s}}class Ar{static encode(e){let t=C.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+=C.encode(i.purposeId,g.purposeId),t+=C.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let d=0;d<o;d++){const S=r[d];if(l===0&&(a++,l=S),d===o-1||r[d+1]>s(S,r[o-1])){const _=S!==l;E+=ye.encode(_),E+=C.encode(l,g.vendorId),_&&(E+=C.encode(S,g.vendorId)),l=0}}t+=C.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const s=new Ps,i=C.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=C.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=C.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Ue(o,a),E=C.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let d=0;d<E;d++){const S=ye.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const _=C.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const B=C.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,B<_)throw new We(`Invalid RangeEntry: endVendorId ${B} is less than ${_}`);for(let O=_;O<=B;O++)s.add(O,l)}else s.add(_,l)}}return s.bitLength=t,s}}var pt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(pt||(pt={}));class gt{static encode(e){const t=[];let s=[],i=C.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,E=g.vendorId*2+g.singleOrRange+g.numEntries;let d=a+g.numEntries;return e.forEach((S,_)=>{r+=ye.encode(S),o=e.maxId>E&&d<l,o&&S&&(e.has(_+1)?s.length===0&&(s.push(_),d+=g.singleOrRange,d+=g.vendorId):(s.push(_),d+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(pt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(pt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=C.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=C.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===pt.RANGE){if(s=new we,t===1){if(e.substr(i,1)==="1")throw new We("Unable to decode default consent=1");i++}const a=C.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=ye.decode(e.charAt(i));i+=g.singleOrRange;const d=C.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const S=C.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let _=d;_<=S;_++)s.set(_)}else s.set(d)}}else{const a=e.substr(i,r);i+=r,s=$e.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=C.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=ye.encode(!r),s+=C.encode(i[0],g.vendorId),r||(s+=C.encode(i[1],g.vendorId))}),s}}function Ms(){return{[u.version]:C,[u.created]:Vs,[u.lastUpdated]:Vs,[u.cmpId]:C,[u.cmpVersion]:C,[u.consentScreen]:C,[u.consentLanguage]:Rs,[u.vendorListVersion]:C,[u.policyVersion]:C,[u.isServiceSpecific]:ye,[u.useNonStandardTexts]:ye,[u.specialFeatureOptins]:$e,[u.purposeConsents]:$e,[u.purposeLegitimateInterests]:$e,[u.purposeOneTreatment]:ye,[u.publisherCountryCode]:Rs,[u.vendorConsents]:gt,[u.vendorLegitimateInterests]:gt,[u.publisherRestrictions]:Ar,segmentType:C,[u.vendorsDisclosed]:gt,[u.vendorsAllowed]:gt,[u.publisherConsents]:$e,[u.publisherLegitimateInterests]:$e,[u.numCustomPurposes]:C,[u.publisherCustomConsents]:$e,[u.publisherCustomLegitimateInterests]:$e}}class Cr{1={[k.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[k.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[k.VENDORS_DISCLOSED]:[u.vendorsDisclosed],[k.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[k.VENDORS_ALLOWED]:[u.vendorsAllowed]}}class wr{1=[k.CORE];2=[k.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(k.VENDORS_DISCLOSED),this[2].push(k.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[u.supportOOB]===!0)&&this[2].push(k.VENDORS_DISCLOSED),s&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(k.VENDORS_ALLOWED),this[2].push(k.PUBLISHER_TC))}}}class bs{static fieldSequence=new Cr;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new Be(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==k.CORE&&(i=C.encode(ms.KEY_TO_ID[t],g.segmentType));const r=Ms();return s.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[u.numCustomPurposes]));try{i+=l.encode(a,E)}catch(d){throw new Be(`Error encoding ${t}->${o}: ${d.message}`)}}),Zt.encode(i)}static decode(e,t,s){const i=Zt.decode(e);let r=0;s===k.CORE&&(t.version=C.decode(i.substr(r,g[u.version]),g[u.version])),s!==k.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Ms();return o.forEach(l=>{const E=a[l];let d=g[l];if(d===void 0&&this.isPublisherCustom(l)&&(d=Number(t[u.numCustomPurposes])),d!==0){const S=i.substr(r,d);if(E===gt?t[l]=E.decode(S,t.version):t[l]=E.decode(S,d),Number.isInteger(d))r+=d;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new We(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Pr{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 E=e.publisherRestrictions.getRestrictions(a);let d=!1;for(let S=0,_=E.length;S<_&&!d;S++)d=E[S].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||E[S].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";d||i.unset(a)}else i.unset(a)}})}),e}];static process(e,t){const s=e.gvl;if(!s)throw new Be("Unable to encode TCModel without a GVL");if(!s.isReady)throw new Be("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 Be(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Dr{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 _=a.response;if(typeof _=="string")try{_=JSON.parse(_)}catch{}r(_)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},d=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",d),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 N extends ht{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ke;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new St("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=N.baseUrl,i=t?.language;if(i)try{i=N.consentLanguages.parseLanguage(i)}catch(r){throw new St("Error during parsing the language: "+r.message)}if(this.lang_=i||N.DEFAULT_LANGUAGE,this.cacheLang_=i||N.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new St("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;N.CACHE.has(r)?(this.populate(N.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=N.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else N.CACHE.has(N.LATEST_CACHE_KEY)?(this.populate(N.CACHE.get(N.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+N.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&N.LANGUAGE_CACHE.size>0?(N.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(N.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(N.CACHE.delete(e),t=!0):e===void 0&&(N.CACHE=new Map,t=!0),t}cacheLanguage(){N.LANGUAGE_CACHE.has(this.cacheLang_)||N.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 Dr.fetch(e))}catch(t){throw new St(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]=N.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=N.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=N.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=N.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=N.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=N.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]=N.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=N.consentLanguages.parseLanguage(e)}catch(i){throw new St("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===N.DEFAULT_LANGUAGE.toLowerCase()&&!N.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,N.LANGUAGE_CACHE.has(s)){const i=N.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=N.baseUrl+N.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new St("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&&N.CACHE.set(N.LATEST_CACHE_KEY,this.getJson()),N.CACHE.has(this.vendorListVersion)||N.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 N(this.getJson());return this.lang_!==N.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class Ls extends ht{static consentLanguages=N.consentLanguages;isServiceSpecific_=!0;supportOOB_=!1;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=5;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new we;purposeConsents=new we;purposeLegitimateInterests=new we;publisherConsents=new we;publisherLegitimateInterests=new we;publisherCustomConsents=new we;publisherCustomLegitimateInterests=new we;customPurposes;vendorConsents=new we;vendorLegitimateInterests=new we;vendorsDisclosed=new we;vendorsAllowed=new we;publisherRestrictions=new Ps;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){N.isInstanceOf(e)||(e=new N(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 He("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 He("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 He("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 He("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new He("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 He("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 He("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 mr{static encode(e,t){let s="",i;return e=Pr.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new wr(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=bs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new Ls);for(let r=0;r<i;r++){const o=s[r],l=Zt.decode(o.charAt(0)).substr(0,g.segmentType),E=ms.ID_TO_KEY[C.decode(l,g.segmentType).toString()];bs.decode(o,t,E)}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 Lt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Lt||(Lt={}));var Gt;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Gt||(Gt={}));var Gs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Gs||(Gs={}));class vt{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 yt extends vt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new ys(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 Vr{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 yt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class pe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Vr;static cmpStatus=Lt.LOADING;static disabled=!1;static displayStatus=Gt.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=Lt.LOADING,this.disabled=!1,this.displayStatus=Gt.HIDDEN,this.eventQueue.clear()}}class vs{cmpId=pe.cmpId;cmpVersion=pe.cmpVersion;gdprApplies=pe.gdprApplies;tcfPolicyVersion=pe.tcfPolicyVersion}class ys extends vs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=pe.eventStatus,this.cmpStatus=pe.cmpStatus,this.listenerId=t,pe.gdprApplies){const s=pe.tcModel;this.tcString=pe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.isServiceSpecific===!1&&(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),disclosedVendors:this.createVectorField(s.vendorsDisclosed,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 Rr extends ys{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(),E=t[l].substr(0,i),d=t[l].substr(i+1);t[l]=E+a+d})}}return t}}class Mr extends vs{cmpLoaded=!0;cmpStatus=pe.cmpStatus;displayStatus=pe.displayStatus;apiVersion=String(pe.apiVersion);gvlVersion;constructor(){super(),pe.tcModel&&pe.tcModel.vendorListVersion&&(this.gvlVersion=+pe.tcModel.vendorListVersion)}}class br extends vt{respond(){this.invokeCallback(new Mr)}}class Lr extends yt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Rr(this.param))}}class Gr extends vt{respond(){const e=pe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new N(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class vr extends yt{respond(){this.listenerId=pe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yr extends vt{respond(){this.invokeCallback(pe.eventQueue.remove(this.param))}}class Io{static[je.PING]=br;static[je.GET_TC_DATA]=yt;static[je.GET_IN_APP_TC_DATA]=Lr;static[je.GET_VENDOR_LIST]=Gr;static[je.ADD_EVENT_LISTENER]=vr;static[je.REMOVE_EVENT_LISTENER]=yr}const Ur=n=>{if(window.Fides?.options?.fidesTcfGdprApplies===!1)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(mt);return t.split(".")[0]}return e??""},Fr=1,Us=[1,3,4,5,6],xr=2,Br=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(ar).map(o=>Ye(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${xr}~${s}~dv.${i}`},Hr=async({experience:n,tcStringPreferences:e})=>{let t="";try{const s=new Ls(new N(n.gvl));await s.gvl.readyPromise,s.cmpId=Jt,s.cmpVersion=Fr,s.consentScreen=1,s.isServiceSpecific=!0,s.supportOOB=!1,n.tcf_publisher_country_code&&(s.publisherCountryCode=n.tcf_publisher_country_code);const i=n.minimal_tcf?cr(n):lr(n);if(s.gvl.narrowVendorsTo(i),i.forEach(r=>{s.vendorsDisclosed.set(r)}),e){e.vendorsConsent.forEach(a=>{if(Rt(a,n.gvl)){const{id:l}=Ye(a);if(s.vendorConsents.set(+l),!n.tcf_publisher_restrictions?.length){const E=n.gvl?.vendors[l];E&&!E?.purposes?.length&&E.flexiblePurposes.forEach(d=>{const S=new Ue;S.purposeId=d,S.restrictionType=Re.REQUIRE_CONSENT,s.publisherRestrictions.add(+l,S)})}}}),e.vendorsLegint.forEach(a=>{if(n.minimal_tcf)n.tcf_vendor_legitimate_interest_ids?.forEach(l=>{const{id:E}=Ye(l);s.vendorLegitimateInterests.set(+E)});else if(Rt(a,n.gvl)){const E=n.tcf_vendor_legitimate_interests?.filter(S=>S.id===a)[0]?.purpose_legitimate_interests;let d=!1;if(E&&(E.map(_=>_.id).filter(_=>Us.includes(_)).length&&(d=!0),!d)){const{id:_}=Ye(a);s.vendorLegitimateInterests.set(+_)}}}),Object.values(n.gvl?.vendors??{}).forEach(a=>{a.specialPurposes?.length&&!a.legIntPurposes?.length&&s.vendorLegitimateInterests.set(a.id)}),e.purposesConsent.forEach(a=>{s.purposeConsents.set(+a)}),e.purposesLegint.forEach(a=>{const l=+a;Us.includes(l)||s.purposeLegitimateInterests.set(l)}),e.specialFeatures.forEach(a=>{s.specialFeatureOptins.set(+a)}),n.tcf_publisher_restrictions&&n.tcf_publisher_restrictions.length>0&&n.tcf_publisher_restrictions.forEach(a=>{if(a.restriction_type===3){console.warn("Skipping TCF publisher restriction with type 3 (undefined/not used)",a);return}a.vendors.forEach(l=>{const E=new Ue;E.purposeId=a.purpose_id,E.restrictionType=a.restriction_type,s.publisherRestrictions.add(l,E)})}),t=mr.encode(s,{segments:[k.CORE,k.VENDORS_DISCLOSED]});const r=n.minimal_tcf?n.tcf_vendor_consent_ids:n.tcf_vendor_consents?.map(a=>a.id),o=Br({userConsentedVendorIds:e?.vendorsConsent??[],disclosedVendorIds:r??[]});t=`${t}${mt}${o}`}}catch(s){return console.error("Unable to instantiate GVL: ",s),Promise.resolve("")}return Promise.resolve(t)},Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Ct(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n?.length?n.map(e=>{const t=Ct(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],kr=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{n.tcf_system_consents?.map(a=>a.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{n.tcf_system_legitimate_interests?.map(a=>a.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},Kr=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{n.tcf_system_consent_ids?.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{n.tcf_system_legitimate_interest_ids?.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},zr=async(n,e,t,s,i,r)=>{const o=await Hr({tcStringPreferences:t,experience:s});return{...n,fides_string:o,tcf_consent:nr(e),tcf_version_hash:s.meta?.version_hash}},Ut="us",Yr=n=>n?.toLowerCase().startsWith("us"),Wr=n=>typeof n?.name!="string"?!1:Er.includes(n.name),$r=({experienceRegion:n,usApproach:e})=>Yr(n)&&e===xe.NATIONAL?Ut:n,jr=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===I.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},Fs=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=$r({experienceRegion:e,usApproach:t?.us_approach}),r=Mt[i];return!r&&t?.us_approach===xe.ALL&&(i=Ut,r=Mt[i]),r&&t?.us_approach===xe.ALL&&(s?.some(a=>a.gpp_field_mapping?.find(l=>l.region===e))||(i=Ut,r=Mt[i])),!r||i===Ut&&t?.us_approach===xe.STATE?{}:{gppRegion:i,gppSection:r}},Qr=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{const{notice_key:o,gpp_field_mapping:a}=r,l=i[o],E=a?.find(d=>d.region===e)?.mechanism;E&&E.forEach(d=>{let S=d.not_available;l===!1?S=d.opt_out:l&&(S=d.not_opt_out);let _=+S;S.length>1&&(_=S.split("").map(B=>+B)),n.setFieldValue(t.name,d.field,_)})})},Xr=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{const{gpp_field_mapping:r}=i,o=r?.find(a=>a.region===e)?.notice;o&&o.forEach(a=>{n.setFieldValue(t.name,a,1)})})},qr=({gppApi:n,gppSection:e,context:t})=>{if(Wr(e)){const s=t?.globalPrivacyControl??!1;n.setFieldValue(e.name,I.GPC,s),n.setFieldValue(e.name,I.GPC_SEGMENT_INCLUDED,!0)}},Jr=[1,3,4,5,6],Zr=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=Fs(e);return!i||!r||s.forEach(o=>{const{notice_key:a,gpp_field_mapping:l}=o,E=l?.find(d=>d.region===i)?.mechanism;if(E){const d=E.some(S=>{const _=n.getFieldValue(r.name,S.field),B=Array.isArray(_)?_.join(""):String(_);return B===S.opt_out?!0:(B===S.not_opt_out,!1)});d!==void 0&&(t[a]=!d)}}),t},eo=({cmpApi:n,experience:e})=>{const t=Ji,s=n.getSection(Y.NAME);if(!s)return t;const i=s.PurposeConsents.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),r=s.PurposeLegitimateInterests.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),o=s.VendorConsents.map(l=>`gvl.${l}`),a=s.VendorLegitimateInterests.map(l=>`gvl.${l}`);return t.purposesConsent=i,t.purposesLegint=r.filter(l=>!Jr.includes(parseInt(l,10))),t.vendorsConsent=o,t.vendorsLegint=a,t.specialFeatures=s.SpecialFeatureOptins.map((l,E)=>l?(E+1).toString():null).filter(l=>l!==null),"tcf_special_purposes"in e?(t.specialPurposes=e.tcf_special_purposes?.map(l=>l.id.toString())||[],t.features=e.tcf_features?.map(l=>l.id.toString())||[]):"tcf_special_purpose_ids"in e&&(t.specialPurposes=e.tcf_special_purpose_ids?.map(l=>l.toString())||[],t.features=e.tcf_feature_ids?.map(l=>l.toString())||[]),t.customPurposesConsent=[],t},to=n=>!n||typeof n!="string"?!1:/^DB[A-Za-z0-9~.]+$/.test(n),so=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Os(n);if(!n||!t||!e||!to(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===dt.TCF_OVERLAY;if(!i.experience_config.translations.find(d=>ut(d.language,s)))return;e.setGppString(t),e.setSignalStatus(me.READY);const a=i.privacy_notices.map(d=>({notice:d,bestTranslation:d.translations.find(S=>ut(S.language,s))||null}));let l,E;if(r){const d=eo({cmpApi:e,experience:i});E=i.minimal_tcf?Kr({experience:i,enabledIds:d}):kr({experience:i,enabledIds:d}),l=_=>zr(_,E,d,i);const S={};a.forEach(_=>{_.notice.consent_mechanism!==lt.NOTICE_ONLY?S[_.notice.notice_key]=d.purposesConsent.includes(_.notice.id):S[_.notice.notice_key]=!0}),ws(window.Fides,{noticeConsent:S,tcf:E,updateCookie:l})}else{const d=Zr({cmpApi:e,experience:i});ws(window.Fides,{noticeConsent:d})}},xs="__gppLocator",Bs=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(()=>Bs(n),5)},no=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},io=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,ro=()=>{const n=[],e=[];let t;const s=(o,a,l,E)=>{if(o==="queue")return n;if(o==="events")return e;const d={gppVersion:"1.1",cmpStatus:nt.STUB,cmpDisplayStatus:ze.HIDDEN,signalStatus:me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(d,!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:d},!0)}else if(o==="removeEventListener"){let S=!1;for(let _=0;_<e.length;_++)if(e[_].id===l){e.splice(_,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:d},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,E]));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(!io(l))return null;if(l.__gppCall&&window.__gpp){const d=l.__gppCall;window.__gpp(d.command,(S,_)=>{const B={__gppReturn:{returnValue:S,success:_,callId:d.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(B):B,"*")},"parameter"in d?d.parameter:void 0,"version"in d?d.version:"1.1")}return null};no(xs)||(Bs(xs),window.__gpp=s,window.addEventListener("message",i,!1))},Hs=(n,{cmpApi:e,experience:t,context:s,cookie:i})=>{const{gppRegion:r,gppSection:o}=Fs(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 jr({gppApi:e,sectionName:o.name,gppSettings:l}),qr({gppApi:e,gppSection:o,context:s}),Array.from(a)},ks=({cmpApi:n,experience:e,context:t})=>Hs(Xr,{cmpApi:n,experience:e,context:t}),Ks=({cmpApi:n,cookie:e,experience:t,context:s})=>Hs(Qr,{cmpApi:n,cookie:e,experience:t,context:s}),zs=(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,Ys=(n,e)=>{if(!Et(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=Ur(n);return s?(e.setFieldValueBySectionId(Y.ID,"CmpId",Jt),e.setSectionStringById(Y.ID,s),!0):!1},oo=()=>{const n=[];if(Et(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${Y.ID}:${Y.NAME}`),(e.us_approach===xe.NATIONAL||e.us_approach===xe.ALL)&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===xe.STATE||e.us_approach===xe.ALL)&&Object.values(Mt).forEach(t=>{t.id!==j.ID&&n.push(`${t.id}:${t.name}`)}))}return n},ao=()=>{ro();const n=new Mi(Jt,dr);n.setCmpStatus(nt.LOADED),window.addEventListener("FidesReady",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides,r=oo();if(n.setSupportedAPIs(r),!Et(t))return;const{fidesString:o}=i;if(o&&so({fidesString:o,cmpApi:n}),!o&&(!xi(t,e.detail,s,i)||!i.tcfEnabled&&us(t.privacy_notices)&&!zs(s,e.detail.fides_string,t.privacy_notices))){const a=$t(),l=Ys(e,n);l&&n.setApplicableSections([Y.ID]);const E=ks({cmpApi:n,experience:t,context:a}),d=Ks({cmpApi:n,cookie:e.detail,experience:t,context:a});d.length&&n.setApplicableSections(d.map(_=>_.id)),!l&&!E.length&&!d.length&&n.setApplicableSections([-1]),n.setSignalStatus(me.READY);const S=fs(n);window.Fides.fides_string=S}window.Fides.options.debug&&typeof window?.__gpp=="function"&&window?.__gpp?.("ping",a=>{})}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(Et(t)){!i.tcfEnabled&&us(t.privacy_notices)&&!zs(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(me.READY):n.setSignalStatus(me.NOT_READY),n.setCmpDisplayStatus(ze.VISIBLE);const r=ks({cmpApi:n,experience:t,context:$t()});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(ze.HIDDEN),n.setSignalStatus(me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(ze.HIDDEN),Ys(e,n)&&(n.setApplicableSections([Y.ID]),n.fireSectionChange("tcfeuv2")),Et(window.Fides.experience)){const s=Ks({cmpApi:n,cookie:e.detail,experience:window.Fides.experience,context:$t()});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=fs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Ns(window.Fides.cookie,window.Fides.options))}n.setSignalStatus(me.READY)})};window.addEventListener("FidesInitializing",n=>{n.detail.extraDetails?.gppEnabled&&typeof window<"u"&&!window.Fides?.initialized&&ao()});
|