ethyca-fides 2.69.3b1__py2.py3-none-any.whl → 2.70.0rc0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/RECORD +251 -229
- fides/_version.py +3 -3
- 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/b9bfa12c167b_add_not_applicable_to_asset_consentstatus.py +46 -0
- fides/api/alembic/migrations/versions/fd7571bef683_adds_new_fields_to_messagingconfig_for_.py +31 -0
- fides/api/api/v1/endpoints/messaging_endpoints.py +164 -34
- fides/api/db/base.py +1 -0
- fides/api/db/seed.py +34 -0
- fides/api/models/asset.py +1 -0
- fides/api/models/event_audit.py +68 -0
- fides/api/models/messaging.py +30 -10
- fides/api/models/taxonomy.py +16 -4
- fides/api/schemas/application_config.py +4 -1
- fides/api/schemas/messaging/messaging.py +33 -66
- fides/api/schemas/messaging/messaging_secrets_docs_only.py +1 -1
- fides/api/schemas/messaging/shared_schemas.py +102 -0
- fides/api/service/deps.py +10 -2
- fides/api/service/messaging/message_dispatch_service.py +16 -15
- fides/api/service/messaging/messaging_crud_service.py +5 -9
- fides/api/service/privacy_request/request_runner_service.py +18 -0
- fides/api/tasks/__init__.py +1 -0
- fides/api/worker/__init__.py +2 -0
- fides/common/api/v1/urn_registry.py +2 -1
- fides/service/event_audit_service.py +115 -0
- fides/service/messaging/aws_ses_service.py +2 -4
- fides/service/taxonomy/taxonomy_service.py +49 -3
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/IEGnswU38MkVE0gbr0ZXX/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1115-7888473b3dc28cda.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/155-88303b05c6e115a5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1817-17079d2f8cf94941.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2040-ab6212a3074f34f9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/2121.1de2fa060eae34aa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3585-451504ea5ed7a1ea.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3696-c25dc8d1b0e1aee1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3700-2a7094f112a1608a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3855-12ee1dfbbe47fd28.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3872-3514b712afd683c0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/409-c1256ecda1b15db6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/431-78bf05f35d7eec4f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4558-de5ced790b3380dc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4608-96f480766541124b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4718-6585c97c26647e65.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/502-a40d39e615f7b664.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/504-afd3588f1908ac33.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5185-33f50cf9ae17b42e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-3b6cf0cc9d0c6a83.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5574-b8c4cba5a6938c00.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5596-bb601cbf40e47a0f.js → 5596-29a7c8322530b7cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5698.2135391a128cc373.js +164 -0
- fides/ui-build/static/admin/_next/static/chunks/5783-8de76df87af55e98.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6084-2cd165179c428a6f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6416-18d438ff85d807f8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6882-447f15e87b8c48a5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7045-f15044a4d4525946.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7158-835ba42fd881d8dd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7202.3febe9e89640c712.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7476-0b6e114658b15eaa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7630-e7ea13be69c118a1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7725-dd6736855807936a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7929-919e2dff24e40397.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/796-e07ac2c543f569e3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8002-25fd174aec9b077b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9037-453224ba3ee65b13.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-2a332fe338535c84.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9226-2f960b7ca530642a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9676.9fd9552ef744c717.js → 9676.b86ecbcfe5afd25d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9826-c02be5882205bbbc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9951-0c8a80f01e431957.js → 9951-651d521d9a02b6df.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-a653cee14ce2366b.js → _app-e08a732e348aa667.js} +63 -226
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-adaec1ec185160af.js → manual-939253f8daf349b2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-f90aa48500c1cbde.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-c0db068d1863222f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-a94e19870fe3e210.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-17cdca29c6d4cdd6.js → properties-069f4e3ee96ebf77.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-09be5455ba85db39.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-e5a33654a2dfaf35.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-d0dbba5bff738b57.js → [resourceUrn]-293c1f2d9aefb447.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-be7b385073f22414.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-cfc118e68285405c.js → [resourceUrn]-18501152fa1e4f40.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-351caadeef03876a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-758d51b4d37dbd09.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-0e4d9ff89c63793c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-1554afcb8b9da2ab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-2635ef588bf06145.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-8f736b078e9842da.js → [resourceUrn]-0497f3ffdb632516.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-eb814e3c22807871.js → detection-a780390da99f3e43.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-6875b7783fcfda2f.js → [resourceUrn]-1901c26cdde820da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-172dbd7740e212ca.js → discovery-0cea22af5929c81f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-619f27c745188adb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-ef71f387fbbab425.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-d790553662caf5c3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-cb63db8594fe8dc1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-78e052c8f95110c4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-d6d7ee8bd8858a8a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-785205655317b1d3.js → [id]-cc149157d290a94d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-a6985f77afbc5bc0.js → new-4c9fb068a5561658.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a832084ce294f8af.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/index-269b8f81546dad66.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-8b13bb5f7bee61c6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-6f109ef64304ef59.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-8566e3b7b2a632fa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b38b656807ed0cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-b00532a0ad4f6927.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-65f0d5672041a202.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-3d2a77cb07aa8dc0.js → [id]-322a01e2bceab3fb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-210e7e3b3d776d44.js → add-property-777ed2d73812043d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-18257b6a70fa8a97.js → properties-08472b2a6bf1d392.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-b20c53b82a54f5ea.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-55e36839d219a503.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-26ce8fc493993765.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-7ddf9d992fe714a6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-7c78ae51f0dd7102.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-05ffbda19ab894b9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/[key]-b0d93bf478bf63ee.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/new-084f9756b9987285.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-6c51ffd46bb598e7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-44456bfe54ac4ad5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-fbe7e8030d837aed.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-a86bafe1b4e1205f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-1895c6a13b543436.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-ae3f3470e2734933.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-1b9c4b2749e3ece4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-92f52c43f522a350.js → new-6304dad2c5fab694.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-763861f5eb207db5.js → [id]-ff4711db191099cd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-2766492c5dbceb0a.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/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/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/poc/table-migration.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/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.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/messaging-providers/[key].html +1 -0
- fides/ui-build/static/admin/settings/messaging-providers/new.html +1 -0
- fides/ui-build/static/admin/settings/messaging-providers.html +1 -0
- 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/ui-build/static/admin/_next/static/_b75ACzlGNz3tZqGUPTE5/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1099-718ce18b9bd70cdb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1345-1961771e9619db39.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1817-9423665774c2c08f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3620-34355b0c44325537.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3642-c052564812532324.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3729-c8accd71498f6fe4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3855-0565d44d150c985a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3872-c022bb7259a9f323.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4164-cadb4c6528662248.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-caa9cb70fb66ac99.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4786-d2b03ba5c82a02ed.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4808-57c5ac15fd8b0d81.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4831-c0d20b2a0b7332bb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4844-e5064a161a7e5a12.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5258-0062e0a1e4f8c03e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5487-46774dc9df554af1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/549-170c96caa601e15a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6084-2c7b81cbcae7e3b4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7476-fdd0eb08a12e0334.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7630-8613916021366672.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/787-f2eca25837ff7305.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/79-68834fd07d69f428.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/796-8fbae2fc714e7a3a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8002-193a97fe4de8b779.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-1afcfb1c4dbdd6c6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9826-d49a56431e896acb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-0a2b2f4a30245089.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-b7b7fb3e8b2ea816.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-23d3e50db42f31b3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-75be0acd400cf527.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent-9b4e0a08ae6216c7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects-25c5916c8357f98d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-9fa11c01b44ba8f1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-fb16cb8fd2b3826f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-a481a5be96dede96.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-6c65b86a61340753.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-7fe1ca395914f77f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-ea1eabce2a3fc2c7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-3c629aecee30c575.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-a13ea13e0316d5a2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]-a6ae353b3b1536cc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-85b28db67d96f201.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-409fe1a086fb7d38.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-93d5c01dd927bad2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/index-bf3042fdbfb12b3d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-e545f8ef5c945f45.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-f297e6cdb9fe97b9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-6e864b293571a508.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-0fc3f1f3b1cd6f2a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-089c166287a89166.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure-5a3cd9b14a37ef27.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-73be3cfaaa95ece4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-adbea0f9fd21ff3a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/alpha-b678e7577eef5e5c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about-3f3039c7e86cab2f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-d502bf1e7580df06.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-b841d63011827b43.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domain-records-50f9b26c6907d6de.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-5ae0d30eb3b770ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-f5924e64a15a0dc3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-88f6badc1bb38b97.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-d5f8db89c7e91a02.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-0366184eda09a933.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-a659f18a30ef89f3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-f4bf47ed2c4746ba.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-2d9548cfa6086e8f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-606818148553db7b.js +0 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +0 -1
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.69.3b1.dist-info → ethyca_fides-2.70.0rc0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{_b75ACzlGNz3tZqGUPTE5 → IEGnswU38MkVE0gbr0ZXX}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-765918f8aa37fdb2.js → 2921-66f65496c3a09316.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3923-23df37eef17d6ea2.js → 3923-a551756b413367ea.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{401-45f399d4d1325340.js → 401-ffe4e8436e1eceb9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6853-8fb39280a8f0eb89.js → 6853-7004a8c420b1ca02.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-3b26ff8259c4d5c3.js → 6954-599f2de2c902e9b2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-8d9c703c96662265.js → 404-2eb8aed4939f1142.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-20050dbae806179d.js → multiple-83ed7da0bb90b0a5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-7b8cec88b5ad53d1.js → add-vendors-46b88bda3d7b15c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-c30382719d6f797a.js → [id]-fd41ffaff543e05a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-dff842dbed2bc6c8.js → privacy-experience-92a337ee96845af2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-074cdbfc678ba791.js → [id]-1fd2cda8707314f6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-bcddda632b4df409.js → new-2987e397445713c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-8ffd8d148269d323.js → [projectUrn]-6a4b0d49dcbf17a8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-9b7e4b86b1e8a40a.js → resources-af80fdca3bbdc82f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-f03f1fdaa1f5a0c6.js → [id]-d8c5c03fb2f31d65.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-8f90e275e932940b.js → add-template-0e0c06e3c8aabe02.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-68385a251c7ade5f.js → messaging-3f15804cf9625f01.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-fc7d652910f3ad8d.js → ant-components-248ad9f65a872442.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-fb6e6f4b276b6189.js → AntForm-aedb66a62042b10a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-00869abf79950a9a.js → FormikAntFormItem-018df38b7cd77fdb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-5716d749236c9f70.js → FormikControlled-6ca9099d03aab817.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-d6dfb9daa3935db3.js → FormikField-0f2c90786ea005a4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-9697549bce7060be.js → forms-200b51a725f8b2d1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-888656ae0bd40f62.js → table-migration-e551fccfcaae76e7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-c64b87694eda4785.js → [purpose_id]-f3e6e74e0efb005c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-e29384f7a3db5221.js → locations-77fb85bdd0be42b5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-46d06037fcadaf00.js → regulations-2866ac99faa5a542.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-98a3277820e232c7.js → user-management-82fcf1151e2fe2ba.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 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 gt extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ee{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new gt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new gt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Oe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Oe("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class ft{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Oe("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=D.decode(i),o=ft.DICT.charAt(r);t+=o,s+=6}catch{throw new Oe("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=ft.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends ft{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Oe("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class 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 gt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new gt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class 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 gt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(se.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Le;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<se.SECTION_ORDER.length;r++){let o=se.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Le;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Le(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===j.ID){let l=new j(t[o+1]);s.set(j.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);s.set(X.NAME,l)}else if(r[o]===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||{}),ut=(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))(ut||{}),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 St=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,u;return s?.fidesDisableBanner||!St(n)||s.fidesModalDisplay==="immediate"||((i=n.experience_config)==null?void 0:i.component)===ut.TCF_OVERLAY&&n.vendor_count===0?!1:((r=n.experience_config)==null?void 0:r.component)===ut.TCF_OVERLAY&&e?s&&Ns(s)?!1:(o=n.meta)!=null&&o.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((a=n.experience_config)==null?void 0:a.component)===ut.MODAL||((l=n.experience_config)==null?void 0:l.component)===ut.HEADLESS||!((E=n?.privacy_notices)!=null&&E.length)?!1:t?s&&Ns(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((u=n.privacy_notices)==null?void 0:u.every(d=>tr(d,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,pt=T.length-H;++K<pt;)Z=T.charCodeAt(K)<<16,W=T.charCodeAt(++K)<<8,Re=T.charCodeAt(++K),Ie=Z+W+Re,$+=l.charAt(Ie>>18&63)+l.charAt(Ie>>12&63)+l.charAt(Ie>>6&63)+l.charAt(Ie&63);return H==2?(Z=T.charCodeAt(K)<<8,W=T.charCodeAt(++K),Ie=Z+W,$+=l.charAt(Ie>>10)+l.charAt(Ie>>4&63)+l.charAt(Ie<<2&63)+"="):H==1&&(Ie=T.charCodeAt(K),$+=l.charAt(Ie>>2)+l.charAt(Ie<<4&63)+"=="),$},d={encode:S,decode: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 _t(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=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}function jr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>_t(r.language,n));if(i)return i}const s=t.translations.find(i=>_t(i.language,e));return s||t.translations[0]||null}var 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)}),pt=yield S(a);Object.assign(a,pt),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 pt=dr(r.geolocation),At=_o.getServedNoticeHistoryId();return fo({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:u,options:r.options,userLocationString:pt,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:At,tcf:d,updateCookie:O})});class Qe extends Error{constructor(e){super(e),this.name="DecodingError"}}class ze extends Error{constructor(e){super(e),this.name="EncodingError"}}class ht extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class 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 ht("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new ht("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ht("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Do.fetch(e))}catch(t){throw new ht(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new ht("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ht("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class qs extends 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===ut.TCF_OVERLAY;if(!i.experience_config.translations.find(u=>_t(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=>_t(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(!St(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Uo(n);return s?(e.setFieldValueBySectionId(j.ID,"CmpId",is),e.setSectionStringById(j.ID,s),!0):!1},Sa=()=>{const n=[];if(St(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${j.ID}:${j.NAME}`),(e.us_approach===$e.NATIONAL||e.us_approach===$e.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===$e.STATE||e.us_approach===$e.ALL)&&Object.values(Ut).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},_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),!St(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(St(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")),St(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()});
|