ethyca-fides 2.64.2rc0__py2.py3-none-any.whl → 2.64.3b0__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.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/METADATA +3 -3
- {ethyca_fides-2.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/RECORD +237 -245
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/41a634d8c669_manual_task_restrict_deletes.py +257 -0
- fides/api/alembic/migrations/versions/6a76a1fa4f3f_add_manual_task_instance_table.py +256 -0
- fides/api/alembic/migrations/versions/aadfe83c5644_add_manual_task_to_connectiontype_enum.py +46 -0
- fides/api/api/v1/api.py +2 -0
- fides/api/api/v1/endpoints/partitioning_endpoints.py +108 -0
- fides/api/db/base.py +6 -3
- fides/api/db/database.py +27 -2
- fides/api/graph/config.py +16 -9
- fides/api/models/attachment.py +15 -3
- fides/api/models/comment.py +23 -5
- fides/api/models/connectionconfig.py +11 -0
- fides/api/models/db_cache.py +1 -1
- fides/api/models/detection_discovery/core.py +15 -15
- fides/api/models/fides_user_respondent_email_verification.py +27 -2
- fides/api/models/manual_task.py +965 -0
- fides/api/models/tcf_publisher_restrictions.py +16 -4
- fides/api/schemas/partitioning/__init__.py +17 -0
- fides/api/schemas/partitioning/bigquery_time_based_partitioning.py +31 -0
- fides/api/schemas/partitioning/time_based_partitioning.py +1376 -0
- fides/api/service/connectors/query_configs/bigquery_query_config.py +44 -22
- fides/api/service/connectors/query_configs/query_config.py +5 -2
- fides/api/util/connection_util.py +25 -2
- fides/common/api/v1/urn_registry.py +4 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1040-af383f535c11eb24.js → 1040-3def3c62138371bb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1169-76bbada4f3d16538.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1807-3beab149351d5ded.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1817-b4688ba5042ec687.js → 1817-a3813209d7a6d28d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{2921-aabf41bf3d7573f9.js → 2921-81a48418f77bc9a7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3450-f6fc4ed04a63935f.js → 3450-3a1f0e80ead8d1b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-0dec3e7d9e886550.js → 3855-b85ad4e52433d519.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-ffa16c2df7ef0ab6.js → 3872-09f81435f7905d76.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3923-b0fb0989671407b7.js → 3923-565a852f322fdadc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{401-6721f8bcb14a6537.js → 401-c3f586a23a061526.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{409-037cfc3f096150f0.js → 409-e0d39af1d9ce8ff2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-de4ca969faf2b9f4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4230-18f4849f9db58a08.js → 4230-d80ae2430aca784a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{431-f72599f01b98f07d.js → 431-c74dab231c8ac968.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5309-4511df9708d5a63c.js → 5309-0e44dbd914896514.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5574-3cd33b3a6c937899.js → 5574-917c5ff63d222308.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/570-c99f07161bd339cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6084-40d5d94561a6093e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6662-6a915300505fd9c0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6853-a4097260e402980e.js → 6853-8d0a099f61c758d1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6882-3cc73d407a088d7d.js → 6882-13d6f8d95b1e404f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-8bac07b8278ded5c.js → 6954-882b87698c5ed4fb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7476-aaf8970dbbbe4864.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7630-c558dc3a199a633d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/787-9c751615f5816094.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{79-5670e31eb65d0a53.js → 79-3f742fe4efd9893f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{796-9a6b13c838e25538.js → 796-83a8bbdcdb67f2ba.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/827-c6fe34fb336467ae.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9014-eeae6f581158e645.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9046-fdf53cc7e926a8c1.js → 9046-6995482a030e323c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{905-742074a074be1055.js → 905-ffdbd0b14167e8bd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9226-50427ff861ffa8bf.js → 9226-8a3be36ad1a9c1e7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9392.25024e070026343d.js → 9392.9a948112de74781b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9676.e60a53f1f5890847.js → 9676.cc515c853b8cf578.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-1dca308466dce863.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9826-303b14ef4fc7ab4a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9951-7de52d41dc1319f7.js → 9951-b5b77bfcc8efb493.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-ac2f0844e5c4b4cd.js → 404-488f8f03fe0ffbc7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-8310662c216e8f04.js → _app-030b20295bb61f96.js} +92 -89
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-0a5f2310ce6b1059.js → manual-1e88ac28bc7a41b6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-00cb904825aad7e3.js → multiple-f2c9451fffaaa529.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-a8e0bc7b6674f47e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-fa7305b88c1afd20.js → add-vendors-b17d160147365cf3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-f140ec9d8e8a0f7a.js → configure-8e168d78acdf0cfe.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-0edb7c92518e7d21.js → [id]-5ca2467de7986929.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-a0039f216fb3eb93.js → new-06bb3b0bf097fcdb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-d8d926f0735a2546.js → privacy-experience-3c11fecc2797ab68.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-5c949f2e3cef2398.js → [id]-92bc6c7b82a679b4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-130155cfb4a0bcc7.js → new-a3da3243526b7ecb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-1135ad8924d32c36.js → privacy-notices-b7d82386e7521041.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-776855e370414beb.js → properties-20a2029b7e7fc895.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-21c23f75ff1135d9.js → reporting-0ce299131db4c3e5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-4d5ea70a77df1bb8.js → consent-9f6a7a231bba17b7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-c623d6f1a61c8ea9.js → [resourceUrn]-11d52f1570759c4d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-030ee304cbe5e530.js → [projectUrn]-fd705968b357e99a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-cfac259a30641e68.js → projects-45b585deee0b2371.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-57bd5cdf784f059f.js → [resourceUrn]-b83afa5565d0c84e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-51d99174c8006eb5.js → resources-d8db234a44a2ddf4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-132e54310cd047af.js → data-catalog-2810fa2b519a076b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-c948f93c833d4358.js → [systemId]-e861699a8866c64b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-333f53caab751428.js → [monitorId]-5dd2fbf33e228f9c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-27205f8457a1ecb0.js → action-center-806cae6bc128cd38.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-20a1043f6a06198f.js → activity-487285bd5eca2595.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-06edce289876dea1.js → [resourceUrn]-393e20924c83373e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-faf326a6200637d0.js → detection-8733807dad4bc96e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-64acf269256ee74f.js → [resourceUrn]-14bd7500362ff224.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-8c3e4be6d36da66d.js → discovery-9e7dfd5a6acc2e8f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-fb50de22f83edd4a.js → datamap-c9509d72c538d22b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-41ab27c4195cfa93.js → [...subfieldNames]-4e8a436297a055b2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-6e2caba24b3e78c2.js → [collectionName]-6ce02295bb7f5b6d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-904d43e31157aa55.js → [datasetId]-9eaa907437fde063.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-55243db34cf77b7e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-5a24f549246605b2.js → dataset-b328595abf20ea5d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-4a33dd0371dbaebc.js → [id]-81ab412e337d2888.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-e88509346b2d2851.js → new-34dfc172165dbb1c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-cdb77886d7fd4f44.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-1adb6bcb71701ac2.js → index-de954b741cbca022.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-41c4f321da3c6169.js → [id]-16dd6eff8f5dcc81.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-40a3cd14264796e2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-9b4d1d61c7c97509.js → [id]-42edcab11e8b5c3c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-f8fd4795e260887c.js → add-template-333e54ac8c3ad57a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-aa744ae8b61e5ff2.js → messaging-8e1e6f3782983225.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-3f62dd959a039fe9.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-47e947c02ae90fd0.js → AntForm-920338760f5a71b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-24f9a44512ce8827.js → FormikAntFormItem-7462fb387a9de3f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-e567a69f8c37fb9a.js → FormikControlled-6148fce7a4e2e9ca.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-35a33f9c7def2220.js → FormikField-30efd8c937bf19e4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-780e18dde8e38099.js → forms-c44de83e0952d1e0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-7852aa60090c8c9a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-11dd6152bf6607cc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-c50c2ee7d7d2a585.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-282de19599d67aaf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-1a1aa83a3f88844c.js → configure-1d981663e1a84166.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-3f962ade5df86380.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-19737d4f21aadbee.js → [id]-b08a69b1c460c7fe.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-9ccb295110feee20.js → add-property-a5d1c65ec21df69d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-3a1037a2e036212a.js → properties-3a75c6ed8308d126.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-959d2a35ca015976.js → datamap-dda59a7105ee609b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-965cc21889b25e44.js → alpha-6773158ba6ccf4b0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-0e1c381d488a7ada.js → about-2e046d177d52465c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-1ad018d87c79a9d6.js → [purpose_id]-91f2ec72f9654cbd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-0a87f29768425a37.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-9d5310145cbdc8ba.js → custom-fields-94d97e3eb964c494.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-0b44b2b224077dcd.js → domain-records-2c7ecff0a8a74c42.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-b9e77c75c6b77c88.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-bb60c397a03558d8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-811dadb489f23d7d.js → locations-8d4383584c72eb5a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-4b835393f5274379.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-54f142bc3e4c95ba.js → regulations-29892065d99ff113.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-9669fa6b20545530.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-6eb886e7b7e6785b.js → [id]-8fa8a2f238e08791.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-7b71274334c559a4.js → systems-acdbdd3dfd21162f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-c9510a1eb612323d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-b124cc24b930c9e1.js → new-a2524414e968f862.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-75d41fde668b9025.js → [id]-87ed17fa1d9f8f72.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-dd43755b687c09a7.js → user-management-6b4e0764bb8816b8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-da78c536f3d86d06.js +1 -0
- fides/ui-build/static/admin/_next/static/css/{c693338e3bc8dcc6.css → 1994066ec907b7df.css} +1 -1
- fides/ui-build/static/admin/_next/static/ezJVaZ_Oi_0J2-wPEOvj1/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[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/messaging.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/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/api/models/manual_tasks/__init__.py +0 -14
- fides/api/models/manual_tasks/manual_task.py +0 -120
- fides/api/models/manual_tasks/manual_task_config.py +0 -136
- fides/api/models/manual_tasks/manual_task_log.py +0 -104
- fides/api/schemas/manual_tasks/__init__.py +0 -0
- fides/api/schemas/manual_tasks/manual_task_config.py +0 -311
- fides/api/schemas/manual_tasks/manual_task_schemas.py +0 -79
- fides/api/schemas/manual_tasks/manual_task_status.py +0 -151
- fides/service/manual_tasks/__init__.py +0 -0
- fides/service/manual_tasks/manual_task_config_service.py +0 -370
- fides/service/manual_tasks/manual_task_service.py +0 -294
- fides/service/manual_tasks/utils.py +0 -185
- fides/ui-build/static/admin/_next/static/chunks/1100-2dfb464ef0359d6d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2430-b480401d44c55416.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3505-a79256cd851dfab4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3513-24db696153a0778b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3670-2abd9b2f17770872.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3983-17ae9c232bddc413.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-cb74476245af456e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-8a791c8cc79d28c4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-f597a7cf03f8c9e1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6060-cb1ab5be7067bf7b.js +0 -4
- fides/ui-build/static/admin/_next/static/chunks/6277-32adfa799bfd1616.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6659-b2088f525bf13c17.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6662-0ce35f1a7a4d07b0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/69-9952d261ca57275e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7553-a95939c32d54b5b7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8433-0acacfca722ce475.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-118e4abca85bbd97.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/c78d26b1-88a3e1bacb2a03c2.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-9fee3bc13b393070.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-3f997c29f6d8cb24.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-8f9b8890018e1ea5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-adc286ff254e7f41.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/ant-components-3407158757fb3627.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/poc/table-migration-7a17dffa515e5560.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-91dd0039cc2b70bc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-dda47b868cf8ea27.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-53acc4a492d160ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-138e4697e269d339.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4c56222e847986ff.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-50bdc72e2f34c39e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/email-templates-983fbf2cf335b945.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-5ae1bdd93c5bd72a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-fef247a87baeb080.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-88178d29a15ba479.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-0a61b5bd21a41fe6.js +0 -1
- fides/ui-build/static/admin/_next/static/rJbP2kuATyoki-YIQWFdS/_buildManifest.js +0 -1
- {ethyca_fides-2.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.64.2rc0.dist-info → ethyca_fides-2.64.3b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{rJbP2kuATyoki-YIQWFdS → ezJVaZ_Oi_0J2-wPEOvj1}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
class xt{eventName;listenerId;data;pingData;constructor(e,t,n,i){this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}class Tt{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 tt=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,n){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},cn=class extends tt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new xt("listenerRegistered",e,!0,new Tt(this.cmpApiContext));this.invokeCallback(t)}},dn=class extends tt{respond(){let e=new Tt(this.cmpApiContext);this.invokeCallback(e)}};class En extends tt{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],n=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,n);this.invokeCallback(i)}}class un extends tt{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 Sn extends tt{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 be;(function(s){s.ADD_EVENT_LISTENER="addEventListener",s.GET_FIELD="getField",s.GET_SECTION="getSection",s.HAS_SECTION="hasSection",s.PING="ping",s.REMOVE_EVENT_LISTENER="removeEventListener"})(be||(be={}));let pn=class extends tt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new xt("listenerRemoved",e,t,new Tt(this.cmpApiContext));this.invokeCallback(n)}},es=class{static[be.ADD_EVENT_LISTENER]=cn;static[be.GET_FIELD]=En;static[be.GET_SECTION]=un;static[be.HAS_SECTION]=Sn;static[be.PING]=dn;static[be.REMOVE_EVENT_LISTENER]=pn};var st;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(st||(st={}));var Ke;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Ke||(Ke={}));var ts;(function(s){s.GPP_LOADED="gpploaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(ts||(ts={}));var me;(function(s){s.NOT_READY="not ready",s.READY="ready"})(me||(me={}));class _n{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let n=be.ADD_EVENT_LISTENER;if(t?.[n])throw new Error(`Built-In Custom Commmand for ${n} not allowed`);if(n=be.REMOVE_EVENT_LISTENER,t?.[n])throw new Error(`Built-In Custom Commmand for ${n} 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,n,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,n):this.isBuiltInCommand(e)?new es[e](this.cmpApiContext,t,n).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 es[e]!==void 0}}let hn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let n=window.__gpp("events")||[];for(var t=0;t<n.length;t++){let i=n[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(n){console.log(n)}}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((n,i)=>{let r=new xt(e,i,t,new Tt(this.cmpApiContext));n.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class ct extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class Z{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 n=this.segments[t];if(n.getFieldNames().includes(e))return n.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 n=this.segments[t];if(n.hasField(e))return n.getFieldValue(e)}throw new ct("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let n=0;n<this.segments.length;n++){let i=this.segments[n];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new ct("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let n=this.segments[t].toObj();for(const[i,r]of Object.entries(n))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 _=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Te=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class M{static encode(e,t){let n=[];if(e>=1)for(n.push(1);e>=n[0]*2;)n.unshift(n[0]*2);let i="";for(let r=0;r<n.length;r++){let o=n[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Te("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 _("Undecodable FixedInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length;i++)i===0?n[e.length-(i+1)]=1:n[e.length-(i+1)]=n[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}class gt{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 Te("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",n=0;for(;n<=e.length-6;){let i=e.substring(n,n+6);try{let r=M.decode(i),o=gt.DICT.charAt(r);t+=o,n+=6}catch{throw new Te("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new _("Undecodable Base64URL string '"+e+"'");let t="";for(let n=0;n<e.length;n++){let i=e.charAt(n),r=gt.REVERSE_DICT.get(i),o=M.encode(r,6);t+=o}return t}}class k extends gt{static instance=new k;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 w{static instance=new w;constructor(){}static getInstance(){return this.instance}encode(e,t){let n="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);n+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return n}decode(e,t,n){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(n.containsKey(o)){let a=n.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 _("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class nt{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 n="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(n="1"+n,e-=r):n="0"+n}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new _("Undecodable FibonacciInteger '"+e+"'");let t=0,n=[];for(let i=0;i<e.length-1;i++)i===0?n.push(1):i===1?n.push(2):n.push(n[i-1]+n[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=n[i]);return t}}let it=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Te("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new _("Undecodable Boolean '"+e+"'")}};class ss{static encode(e){e=e.sort((o,a)=>o-a);let t=[],n=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=M.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-n;n=t[o][0],r+="0"+nt.encode(a)}else{let a=t[o][0]-n;n=t[o][0];let l=t[o][t[o].length-1]-n;n=t[o][t[o].length-1],r+="1"+nt.encode(a)+nt.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],n=M.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<n;o++){let a=it.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=nt.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let S=nt.decode(e.substring(r,l+2))+i;i=S,r=l+2;for(let p=E;p<=S;p++)t.push(p)}else{let l=e.indexOf("11",r),E=nt.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class gn 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 gn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class we extends _{constructor(e){super(e),this.name="SubstringError"}}class ee{static substring(e,t,n){if(n>e.length||t<0||t>n)throw new we("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class Tn extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ss.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=ss.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=M.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return ee.substring(e,t,i)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class c extends Ve{bitStringLength;constructor(e,t,n=!0){super(n),this.bitStringLength=e,this.setValue(t)}encode(){try{return M.encode(this.value,this.bitStringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=M.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(n){throw new we(n)}}}class V{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,n)=>{this.fields.set(n,t)})}}var Fe;(function(s){s.ID="Id",s.VERSION="Version",s.SECTION_IDS="SectionIds"})(Fe||(Fe={}));const In=[Fe.ID,Fe.VERSION,Fe.SECTION_IDS];class D{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 ct("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 ct(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let n=0;n<t.length;n++){let i=t[n],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 On extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return In}initializeFields(){let e=new V;return e.put(Fe.ID.toString(),new c(6,Me.ID)),e.put(Fe.VERSION.toString(),new c(6,Me.VERSION)),e.put(Fe.SECTION_IDS.toString(),new Tn([])),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Me extends Z{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Me.ID}getName(){return Me.NAME}getVersion(){return Me.VERSION}initializeSegments(){let e=[];return e.push(new On),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var h;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.POLICY_VERSION="PolicyVersion",s.IS_SERVICE_SPECIFIC="IsServiceSpecific",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",s.PURPOSE_CONSENTS="PurposeConsents",s.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",s.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",s.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",s.VENDOR_CONSENTS="VendorConsents",s.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",s.PUBLISHER_RESTRICTIONS="PublisherRestrictions",s.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",s.PUBLISHER_CONSENTS="PublisherConsents",s.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",s.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",s.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",s.VENDORS_ALLOWED="VendorsAllowed",s.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",s.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const Nn=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],An=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],fn=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],Cn=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];class et extends gt{static instance=new et;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class rt{static encode(e){e.sort((r,o)=>r-o);let t=[],n=0;for(;n<e.length;){let r=n;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(n,r+1)),n=r+1}let i=M.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+M.encode(t[r][0],16):i+="1"+M.encode(t[r][0],16)+M.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FixedIntegerRange '"+e+"'");let t=[],n=M.decode(e.substring(0,12)),i=12;for(let r=0;r<n;r++){let o=it.decode(e.substring(i,i+1));if(i++,o===!0){let a=M.decode(e.substring(i,i+16));i+=16;let l=M.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=M.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Ft extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return rt.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=rt.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let n=M.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<n;r++)e.charAt(i)==="1"?i+=33:i+=17;return ee.substring(e,t,i)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class Pn{key;type;ids;constructor(e,t,n){this.key=e,this.type=t,this.ids=n}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 ns extends Ve{keyBitStringLength;typeBitStringLength;constructor(e,t,n,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{let e=this.value,t="";t+=M.encode(e.length,12);for(let n=0;n<e.length;n++){let i=e[n];t+=M.encode(i.getKey(),this.keyBitStringLength),t+=M.encode(i.getType(),this.typeBitStringLength),t+=rt.encode(i.getIds())}return t}catch(e){throw new Te(e)}}decode(e){try{let t=[],n=M.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<n;r++){let o=M.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=M.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Ft([]).substring(e,i),E=rt.decode(l);i+=l.length,t.push(new Pn(o,a,E))}this.value=t}catch(t){throw new _(t)}}substring(e,t){try{let n="";n+=ee.substring(e,t,t+12);let i=M.decode(n.toString()),r=t+n.length;for(let o=0;o<i;o++){let a=ee.substring(e,r,r+this.keyBitStringLength);r+=a.length,n+=a;let l=ee.substring(e,r,r+this.typeBitStringLength);r+=l.length,n+=l;let E=new Ft([]).substring(e,r);r+=E.length,n+=E}return n}catch(n){throw new we(n)}}}class j extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return it.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=it.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(n){throw new we(n)}}}class is{static encode(e){return e?M.encode(Math.round(e.getTime()/100),36):M.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new _("Undecodable Datetime '"+e+"'");return new Date(M.decode(e)*100)}}class It extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return is.encode(this.value)}catch(e){throw new Te(e)}}decode(e){try{this.value=is.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(n){throw new we(n)}}}class ot{static encode(e,t){if(e.length>t)throw new Te("Too many values '"+e.length+"'");let n="";for(let i=0;i<e.length;i++)n+=it.encode(e[i]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedBitfield '"+e+"'");let t=[];for(let n=0;n<e.length;n++)t.push(it.decode(e.substring(n,n+1)));return t}}class Le extends Ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ot.encode(this.value,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class rs{static encode(e,t){for(;e.length<t;)e+=" ";let n="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)n+=M.encode(63,6);else if(r>=65)n+=M.encode(e.charCodeAt(i)-65,6);else throw new Te("Unencodable FixedString '"+e+"'")}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new _("Undecodable FixedString '"+e+"'");let t="";for(let n=0;n<e.length;n+=6){let i=M.decode(e.substring(n,n+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Bt extends Ve{stringLength;constructor(e,t,n=!0){super(n),this.stringLength=e,this.setValue(t)}encode(){try{return rs.encode(this.value,this.stringLength)}catch(e){throw new Te(e)}}decode(e){try{this.value=rs.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(n){throw new we(n)}}}class Qe extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=rt.encode(this.value),n=t.length,i=e;if(n<=i)return M.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 M.encode(e,16)+"0"+ot.encode(r,i)}}catch(e){throw new Te(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=rt.decode(e.substring(17));else{let t=[],n=ot.decode(e.substring(17));for(let i=0;i<n.length;i++)n[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new _(t)}}substring(e,t){try{let n=M.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Ft([]).substring(e,t+17):ee.substring(e,t,t+17+n)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,n)=>t-n))}}class wn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Nn}initializeFields(){let e=new Date,t=new V;return t.put(h.VERSION.toString(),new c(6,W.VERSION)),t.put(h.CREATED.toString(),new It(e)),t.put(h.LAST_UPDATED.toString(),new It(e)),t.put(h.CMP_ID.toString(),new c(12,0)),t.put(h.CMP_VERSION.toString(),new c(12,0)),t.put(h.CONSENT_SCREEN.toString(),new c(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new Bt(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(h.POLICY_VERSION.toString(),new c(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new j(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new Le([!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(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!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(h.PURPOSE_ONE_TREATMENT.toString(),new j(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Bt(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Qe([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Qe([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new ns(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Ot extends Ve{getLength;constructor(e,t,n=!0){super(n),this.getLength=e,this.setValue(t)}encode(){try{return ot.encode(this.value,this.getLength())}catch(e){throw new Te(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),n=[...e];for(let i=n.length;i<t;i++)n.push(!1);n.length>t&&(n=n.slice(0,t)),super.setValue([...n])}}class Dn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){let e=new V;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new Le([!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(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!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(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new Ot(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class mn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fn}initializeFields(){let e=new V;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Vn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new V;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class W extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){let e=[];return e.push(new wn),e.push(new Dn),e.push(new mn),e.push(new Vn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[3].decode(n[i]);else if(o>="Q"&&o<="X")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.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!==h.CREATED&&e!==h.LAST_UPDATED){let n=new Date;super.setFieldValue(h.CREATED,n),super.setFieldValue(h.LAST_UPDATED,n)}}}var I;(function(s){s.VERSION="Version",s.CREATED="Created",s.LAST_UPDATED="LastUpdated",s.CMP_ID="CmpId",s.CMP_VERSION="CmpVersion",s.CONSENT_SCREEN="ConsentScreen",s.CONSENT_LANGUAGE="ConsentLanguage",s.VENDOR_LIST_VERSION="VendorListVersion",s.TCF_POLICY_VERSION="TcfPolicyVersion",s.USE_NON_STANDARD_STACKS="UseNonStandardStacks",s.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",s.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",s.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",s.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",s.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",s.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",s.PUB_RESTRICTIONS="PubRestrictions",s.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",s.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",s.NUM_CUSTOM_PURPOSES="NumCustomPurposes",s.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",s.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",s.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",s.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Rn=[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],Mn=[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],bn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Ln extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new Date,t=new V;return t.put(I.VERSION.toString(),new c(6,Ae.VERSION)),t.put(I.CREATED.toString(),new It(e)),t.put(I.LAST_UPDATED.toString(),new It(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 Bt(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 j(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!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 Le([!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 Qe([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Qe([])),t.put(I.PUB_RESTRICTIONS.toString(),new ns(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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class vn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Mn}initializeFields(){let e=new V;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!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 Le([!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 Ot(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ot(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Gn extends D{base64UrlEncoder=et.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bn}initializeFields(){let e=new V;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ae extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";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 Ln),e.push(new vn),e.push(new Gn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<n.length;i++){let r=n[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(n[i]);else if(o>="I"&&o<="P")t[2].decode(n[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(n[i]);else throw new _("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 n=new Date;super.setFieldValue(I.CREATED,n),super.setFieldValue(I.LAST_UPDATED,n)}}}class Ht{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){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 yn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(n){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class Un{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,n)=>{this.fields.set(n,t)})}}var Ie;(function(s){s.VERSION="Version",s.NOTICE="Notice",s.OPT_OUT_SALE="OptOutSale",s.LSPA_COVERED="LspaCovered"})(Ie||(Ie={}));const xn=[Ie.VERSION,Ie.NOTICE,Ie.OPT_OUT_SALE,Ie.LSPA_COVERED];class Fn extends D{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xn}initializeFields(){const e=new class{test(n){return n==="-"||n==="Y"||n==="N"}};let t=new Un;return t.put(Ie.VERSION,new yn(fe.VERSION)),t.put(Ie.NOTICE,new Ht("-",e)),t.put(Ie.OPT_OUT_SALE,new Ht("-",e)),t.put(Ie.LSPA_COVERED,new Ht("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ie.VERSION).getValue(),t+=e.get(Ie.NOTICE).getValue(),t+=e.get(Ie.OPT_OUT_SALE).getValue(),t+=e.get(Ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new _("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ie.NOTICE).setValue(e.charAt(1)),t.get(Ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new _("Unable to decode UspV1CoreSegment '"+e+"'")}}}class fe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fe.ID}getName(){return fe.NAME}getVersion(){return fe.VERSION}initializeSegments(){let e=[];return e.push(new Fn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var N;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(N||(N={}));const Bn=[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],Hn=[N.GPC_SEGMENT_TYPE,N.GPC];class os{static encode(e,t,n){if(e.length>n)throw new Te("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=M.encode(e[r],t);for(;i.length<t*n;)i+="0";return i}static decode(e,t,n){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new _("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new _("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*n;)e+="0";e.length>t*n&&(e=e.substring(0,t*n));let i=[];for(let r=0;r<e.length;r+=t)i.push(M.decode(e.substring(r,r+t)));for(;i.length<n;)i.push(0);return i}}class Q extends Ve{elementBitStringLength;numElements;constructor(e,t,n=!0){super(n),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return os.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Te(e)}}decode(e){try{this.value=os.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new _(t)}}substring(e,t){try{return ee.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(n){throw new we(n)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let n=t.length;n<this.numElements;n++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class kn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;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(n)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);n.length==66&&(n=n.substring(0,48)+"00000000"+n.substring(48,52)+"00"+n.substring(52,62)),this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Kn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hn}initializeFields(){let e=new V;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(N.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNatGpcSegment '"+e+"'")}}}class X extends Z{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 kn),e.push(new Kn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 b;(function(s){s.VERSION="Version",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",s.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",s.SALE_OPT_OUT="SaleOptOut",s.SHARING_OPT_OUT="SharingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.PERSONAL_DATA_CONSENTS="PersonalDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(b||(b={}));const $n=[b.VERSION,b.SALE_OPT_OUT_NOTICE,b.SHARING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_LIMIT_USE_NOTICE,b.SALE_OPT_OUT,b.SHARING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.PERSONAL_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],jn=[b.GPC_SEGMENT_TYPE,b.GPC];class Yn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;return i.put(b.VERSION.toString(),new c(6,ne.VERSION)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SHARING_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,0]).withValidator(n)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(n)),i.put(b.PERSONAL_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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCaCoreSegment '"+e+"'")}}}class zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}initializeFields(){let e=new V;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(b.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ne extends Z{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ne.ID}getName(){return ne.NAME}getVersion(){return ne.VERSION}initializeSegments(){let e=[];return e.push(new Yn),e.push(new zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 q;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Wn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class Qn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(q.VERSION.toString(),new c(6,ie.VERSION)),i.put(q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(q.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsVaCoreSegment '"+e+"'")}}}class ie extends Z{static ID=9;static VERSION=1;static NAME="usva";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}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var K;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(K||(K={}));const Jn=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_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],qn=[K.GPC_SEGMENT_TYPE,K.GPC];class Xn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;return i.put(K.VERSION.toString(),new c(6,re.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.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]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCoCoreSegment '"+e+"'")}}}class Zn extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qn}initializeFields(){let e=new V;return e.put(K.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(K.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(K.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCoGpcSegment '"+e+"'")}}}class re extends Z{static ID=10;static VERSION=1;static NAME="usco";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 Xn),e.push(new Zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(K.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(K.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(K.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const ei=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class ti extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(Y.VERSION.toString(),new c(6,oe.VERSION)),i.put(Y.SHARING_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.SENSITIVE_DATA_PROCESSING_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(n)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsUtCoreSegment '"+e+"'")}}}class oe extends Z{static ID=11;static VERSION=1;static NAME="usut";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 ti),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var $;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})($||($={}));const si=[$.VERSION,$.SHARING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],ni=[$.GPC_SEGMENT_TYPE,$.GPC];class ii extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;return i.put($.VERSION.toString(),new c(6,ae.VERSION)),i.put($.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCtCoreSegment '"+e+"'")}}}class ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ni}initializeFields(){let e=new V;return e.put($.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put($.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsCtGpcSegment '"+e+"'")}}}class ae extends Z{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new ii),e.push(new ri),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue($.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($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var z;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(z||(z={}));const oi=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];class ai extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(z.VERSION.toString(),new c(6,le.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsFlCoreSegment '"+e+"'")}}}class le extends Z{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new ai),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");for(let i=0;i<t.length;i++)n.length>i&&t[i].decode(n[i])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var L;(function(s){s.VERSION="Version",s.SHARING_NOTICE="SharingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(L||(L={}));const li=[L.VERSION,L.SHARING_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],ci=[L.GPC_SEGMENT_TYPE,L.GPC];class di extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;return i.put(L.VERSION.toString(),new c(6,ce.VERSION)),i.put(L.SHARING_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(n)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsMtCoreSegment '"+e+"'")}}}class Ei extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ci}initializeFields(){let e=new V;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(L.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsMtGpcSegment '"+e+"'")}}}class ce extends Z{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new di),e.push(new Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 v;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(v||(v={}));const ui=[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],Si=[v.GPC_SEGMENT_TYPE,v.GPC];class pi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(v.VERSION.toString(),new c(6,de.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,0,0]).withValidator(n)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsOrCoreSegment '"+e+"'")}}}class _i extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){let e=new V;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(v.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsOrGpcSegment '"+e+"'")}}}class de extends Z{static ID=15;static VERSION=1;static NAME="usor";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 pi),e.push(new _i),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 G;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(G||(G={}));const hi=[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],gi=[G.GPC_SEGMENT_TYPE,G.GPC];class Ti extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},n=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 V;return i.put(G.VERSION.toString(),new c(6,Ee.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ii extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){let e=new V;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(G.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxGpcSegment '"+e+"'")}}}class Ee extends Z{static ID=16;static VERSION=1;static NAME="ustx";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 n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(y||(y={}));const Oi=[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],Ni=[y.GPC_SEGMENT_TYPE,y.GPC];class Ai extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(y.VERSION.toString(),new c(6,ue.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]).withValidator(n)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(n)),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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsDeCoreSegment '"+e+"'")}}}class fi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){let e=new V;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(y.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsDeGpcSegment '"+e+"'")}}}class ue extends Z{static ID=17;static VERSION=1;static NAME="usde";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 Ai),e.push(new fi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(U||(U={}));const Ci=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SENSITIVE_DATA_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Pi=[U.GPC_SEGMENT_TYPE,U.GPC];class wi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(U.VERSION.toString(),new c(6,Se.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.SENSITIVE_DATA_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(n)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Di extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){let e=new V;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(U.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsIaGpcSegment '"+e+"'")}}}class Se extends Z{static ID=18;static VERSION=1;static NAME="usia";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 n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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(".")}}var x;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(x||(x={}));const mi=[x.VERSION,x.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Vi=[x.GPC_SEGMENT_TYPE,x.GPC];class Ri extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(x.VERSION.toString(),new c(6,pe.VERSION)),i.put(x.PROCESSING_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,0]).withValidator(n)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Mi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new V;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(x.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeGpcSegment '"+e+"'")}}}class pe extends Z{static ID=19;static VERSION=1;static NAME="usne";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 Ri),e.push(new Mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 F;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(F||(F={}));const bi=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],Li=[F.GPC_SEGMENT_TYPE,F.GPC];class vi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(F.VERSION.toString(),new c(6,_e.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(n)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Gi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new V;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(F.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNhGpcSegment '"+e+"'")}}}class _e extends Z{static ID=20;static VERSION=1;static NAME="usnh";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 vi),e.push(new Gi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var B;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(B||(B={}));const yi=[B.VERSION,B.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],Ui=[B.GPC_SEGMENT_TYPE,B.GPC];class xi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(B.VERSION.toString(),new c(6,he.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.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,0,0]).withValidator(n)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(n)),i.put(B.ADDITIONAL_DATA_PROCESSING_CONSENT.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNjCoreSegment '"+e+"'")}}}class Fi extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){let e=new V;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(B.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNjGpcSegment '"+e+"'")}}}class he extends Z{static ID=21;static VERSION=1;static NAME="usnj";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 xi),e.push(new Fi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[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 H;(function(s){s.VERSION="Version",s.PROCESSING_NOTICE="ProcessingNotice",s.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",s.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",s.SALE_OPT_OUT="SaleOptOut",s.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",s.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",s.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",s.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",s.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",s.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",s.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",s.GPC_SEGMENT_TYPE="GpcSegmentType",s.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",s.GPC="Gpc"})(H||(H={}));const Bi=[H.VERSION,H.PROCESSING_NOTICE,H.SALE_OPT_OUT_NOTICE,H.TARGETED_ADVERTISING_OPT_OUT_NOTICE,H.SALE_OPT_OUT,H.TARGETED_ADVERTISING_OPT_OUT,H.SENSITIVE_DATA_PROCESSING,H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,H.ADDITIONAL_DATA_PROCESSING_CONSENT,H.MSPA_COVERED_TRANSACTION,H.MSPA_OPT_OUT_OPTION_MODE,H.MSPA_SERVICE_PROVIDER_MODE],Hi=[H.GPC_SEGMENT_TYPE,H.GPC];class ki extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.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}},n=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 V;return i.put(H.VERSION.toString(),new c(6,ge.VERSION)),i.put(H.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(H.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(H.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(H.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(H.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(H.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(H.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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Ki extends D{base64UrlEncoder=k.getInstance();bitStringEncoder=w.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){let e=new V;return e.put(H.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(H.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(H.GPC.toString(),new j(!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 n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTnGpcSegment '"+e+"'")}}}class ge extends Z{static ID=22;static VERSION=1;static NAME="ustn";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 ki),e.push(new Ki),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(H.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(H.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(H.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[W.ID,W.NAME],[Ae.ID,Ae.NAME],[fe.ID,fe.NAME],[X.ID,X.NAME],[ne.ID,ne.NAME],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[ge.ID,ge.NAME]]);static SECTION_ORDER=[W.NAME,Ae.NAME,fe.NAME,X.NAME,ne.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,_e.NAME,he.NAME,ge.NAME]}class as{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,n){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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===W.NAME?(i=new W,this.sections.set(W.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===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===pe.NAME?(i=new pe,this.sections.set(pe.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===ge.NAME&&(i=new ge,this.sections.set(ge.NAME,i)),i)i.setFieldValue(t,n),this.dirty=!0,i.setIsDirty(!0);else throw new ct(e+"."+t+" not found")}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}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(te.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(te.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(te.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(te.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Me;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<te.SECTION_ORDER.length;t++){let n=te.SECTION_ORDER[t];if(this.sections.has(n)){let i=this.sections.get(n);e.push(i.getId())}}return e}encodeModel(e){let t=[],n=[];for(let r=0;r<te.SECTION_ORDER.length;r++){let o=te.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),n.push(a.getId())}}let i=new Me;return i.setFieldValue("SectionIds",n),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),n=new Map;if(t[0].startsWith("D")){let r=new Me(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new _("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 _("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ae.ID){let l=new Ae(t[o+1]);n.set(Ae.NAME,l)}else if(r[o]===W.ID){let l=new W(t[o+1]);n.set(W.NAME,l)}else if(r[o]===fe.ID){let l=new fe(t[o+1]);n.set(fe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);n.set(X.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);n.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);n.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);n.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);n.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);n.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);n.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);n.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);n.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);n.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);n.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);n.set(Se.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);n.set(pe.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);n.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);n.set(he.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);n.set(ge.NAME,l)}}}return n}else if(e.startsWith("C")){let t=new Map,n=new W(e);return t.set(W.NAME,n),new Me().setFieldValue(Fe.SECTION_IDS,[2]),t.set(Me.NAME,n),t}else throw new _("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(te.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let n=null;this.sections.has(e)?n=this.sections.get(e):e===Ae.NAME?(n=new Ae,this.sections.set(Ae.NAME,n)):e===W.NAME?(n=new W,this.sections.set(W.NAME,n)):e===fe.NAME?(n=new fe,this.sections.set(fe.NAME,n)):e===X.NAME?(n=new X,this.sections.set(X.NAME,n)):e===ne.NAME?(n=new ne,this.sections.set(ne.NAME,n)):e===ie.NAME?(n=new ie,this.sections.set(ie.NAME,n)):e===re.NAME?(n=new re,this.sections.set(re.NAME,n)):e===oe.NAME?(n=new oe,this.sections.set(oe.NAME,n)):e===ae.NAME?(n=new ae,this.sections.set(ae.NAME,n)):e===le.NAME?(n=new le,this.sections.set(le.NAME,n)):e===ce.NAME?(n=new ce,this.sections.set(ce.NAME,n)):e===de.NAME?(n=new de,this.sections.set(de.NAME,n)):e===Ee.NAME?(n=new Ee,this.sections.set(Ee.NAME,n)):e===ue.NAME?(n=new ue,this.sections.set(ue.NAME,n)):e===Se.NAME?(n=new Se,this.sections.set(Se.NAME,n)):e===pe.NAME?(n=new pe,this.sections.set(pe.NAME,n)):e===_e.NAME?(n=new _e,this.sections.set(_e.NAME,n)):e===he.NAME?(n=new he,this.sections.set(he.NAME,n)):e===ge.NAME&&(n=new ge,this.sections.set(ge.NAME,n)),n&&(n.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(te.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<te.SECTION_ORDER.length;t++){let n=te.SECTION_ORDER[t];this.sections.has(n)&&(e[n]=this.sections.get(n).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 $i{gppVersion="1.1";supportedAPIs=[];eventQueue=new hn(this);cmpStatus=st.LOADING;cmpDisplayStatus=Ke.HIDDEN;signalStatus=me.NOT_READY;applicableSections=[];gppModel=new as;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=st.LOADING,this.cmpDisplayStatus=Ke.HIDDEN,this.signalStatus=me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new as,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class kt{static absCall(e,t,n,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"))},S=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}let Nt=class extends Error{constructor(e){super(e),this.name="GVLError"}},ji=class yt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return yt.langSet.has(e)}forEach(e){yt.langSet.forEach(e)}get size(){return yt.langSet.size}},ls=class Ut{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new ji;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=Ut.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new Ut;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Nt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Nt("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 n=new Ut;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.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));n.populate(await kt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;n.populate(await kt.fetch(r))}return n}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const n=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await kt.fetch(n))}catch(i){throw new Nt("unable to load language: "+i.message)}}}else throw new Nt(`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,n)=>{const i=this.vendors[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]: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 Yi{callResponder;cmpApiContext;constructor(e,t,n){this.cmpApiContext=new $i,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new _n(this.cmpApiContext,n)}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(te.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(te.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(te.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(te.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(te.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(te.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return ls.fromVendorList(e)}async getGvlFromUrl(e){return ls.fromUrl(e)}}var zi=Object.defineProperty,Wi=(s,e,t)=>e in s?zi(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Kt=(s,e,t)=>Wi(s,typeof e!="symbol"?e+"":e,t);class cs{constructor(e,t,n){Kt(this,"consentPreference"),Kt(this,"notice"),Kt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=n}}var ds;(s=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFgdprApplies||(s.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFPurposeOneTreatment||(s.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(s.IABTCFUseNonStandardTexts||(s.IABTCFUseNonStandardTexts={}))})(ds||(ds={}));var Qi=(s=>(s.GPP_US_NATIONAL="gpp_us_national",s.GPP_US_STATE="gpp_us_state",s))(Qi||{}),Ji=(s=>(s.FRONTEND="frontend",s.SYSTEM_WIDE="system_wide",s.NOT_APPLICABLE="not_applicable",s))(Ji||{}),Es=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.NOTICE_ONLY="notice_only",s))(Es||{}),ve=(s=>(s.OPT_IN="opt_in",s.OPT_OUT="opt_out",s.ACKNOWLEDGE="acknowledge",s.NOT_APPLICABLE="not_applicable",s.TCF="tcf",s))(ve||{}),At=(s=>(s.OMIT="omit",s.INCLUDE="include",s))(At||{}),dt=(s=>(s.BOOLEAN="boolean",s.CONSENT_MECHANISM="consent_mechanism",s))(dt||{}),qi=(s=>(s.THROW="throw",s.WARN="warn",s.IGNORE="ignore",s))(qi||{}),Et=(s=>(s.OVERLAY="overlay",s.BANNER_AND_MODAL="banner_and_modal",s.MODAL="modal",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.HEADLESS="headless",s))(Et||{}),Xi=(s=>(s.ALWAYS_ENABLED="always_enabled",s.ENABLED_WHERE_REQUIRED="enabled_where_required",s.ALWAYS_DISABLED="always_disabled",s))(Xi||{}),Zi=(s=>(s.OPTIONS="options",s.EXPERIENCE_TRANSLATION="language",s))(Zi||{}),er=(s=>(s.PRIMARY="primary",s.SECONDARY="secondary",s.TERTIARY="tertiary",s))(er||{}),tr=(s=>(s.ACKNOWLEDGE="acknowledge",s.OPT_IN_OPT_OUT="opt_in_opt_out",s.OPT_IN_ONLY="opt_in_only",s))(tr||{}),sr=(s=>(s.REJECT_ALL="reject_all",s.REJECT_CONSENT_ONLY="reject_consent_only",s))(sr||{}),$e=(s=>(s.BUTTON="button",s.REJECT="reject",s.ACCEPT="accept",s.SCRIPT="script",s.SAVE="save",s.DISMISS="dismiss",s.GPC="gpc",s.INDIVIDUAL_NOTICE="individual_notice",s.ACKNOWLEDGE="acknowledge",s.OT_MIGRATION="ot_migration",s))($e||{}),nr=(s=>(s.privacy_center="privacy_center",s.overlay="overlay",s.api="api",s))(nr||{}),ir=(s=>(s.NONE="none",s.APPLIED="applied",s.OVERRIDDEN="overridden",s))(ir||{}),rr=(s=>(s.OVERLAY="overlay",s.MODAL="modal",s.BANNER="banner",s.PRIVACY_CENTER="privacy_center",s.TCF_OVERLAY="tcf_overlay",s.TCF_BANNER="tcf_banner",s))(rr||{});const or=(s,e)=>!!Object.keys(e).includes(s.notice_key),$t=s=>!s||s===ve.OPT_OUT?!1:s===ve.OPT_IN?!0:s===ve.ACKNOWLEDGE,ut=(s,e)=>s?e===Es.NOTICE_ONLY?ve.ACKNOWLEDGE:ve.OPT_IN:ve.OPT_OUT,ar=s=>typeof s=="string"?$t(s):s,lr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var cr=Object.defineProperty,dr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Ss=(s,e,t)=>e in s?cr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ft=(s,e)=>{for(var t in e||(e={}))ur.call(e,t)&&Ss(s,t,e[t]);if(us)for(var t of us(e))Sr.call(e,t)&&Ss(s,t,e[t]);return s},pr=(s,e)=>dr(s,Er(e));const at=s=>!s||typeof s!="object"?!1:Object.keys(s).length===0||"id"in s,ps=s=>!!(s&&s.every(e=>e.default_preference===ve.OPT_IN)),_r=s=>s?s.location&&lr.test(s.location)?s.location.replace("-","_").toLowerCase():s.country&&s.region?`${s.country.toLowerCase()}_${s.region.toLowerCase()}`:null:null,_s=s=>s.fidesConsentOverride===$e.ACCEPT||s.fidesConsentOverride===$e.REJECT,hr=(s,e,t,n)=>{var i,r,o,a,l,E;return n!=null&&n.fidesDisableBanner||!at(s)?!1:((i=s.experience_config)==null?void 0:i.component)===Et.TCF_OVERLAY&&e?n&&_s(n)?!1:(r=s.meta)!=null&&r.version_hash?s.meta.version_hash!==e.tcf_version_hash:!0:((o=s.experience_config)==null?void 0:o.component)===Et.MODAL||((a=s.experience_config)==null?void 0:a.component)===Et.HEADLESS||!((l=s?.privacy_notices)!=null&&l.length)?!1:t?n&&_s(n)?!1:e?.fides_meta.consentMethod===$e.GPC?!0:!((E=s.privacy_notices)!=null&&E.every(S=>or(S,t))):!0},gr=(s,e)=>s.map(t=>{var n;const i=ut(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new cs(t.notice,i,(n=t.bestTranslation)==null?void 0:n.privacy_notice_history_id)}),Tr=({consent:s,nonApplicableNotices:e,flagType:t,mode:n=At.OMIT})=>{if(!(e!=null&&e.length))return s;const i=ft({},s);return n===At.INCLUDE?e.forEach(r=>{i[r]=t===dt.CONSENT_MECHANISM?ve.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},Ir=({consent:s,flagType:e=dt.BOOLEAN,consentMechanisms:t})=>{const n={};if(e!==dt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(s).map(([r,o])=>[r,ar(o)]));const i=Object.values(s).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(s).forEach(r=>{const o=s[r];if(typeof o=="string")n[r]=o;else{const a=t[r];n[r]=ut(o,a)}}),n):ft({},s)},hs=(s,e,t=[],n,i)=>{var r,o,a;const l=ft({},s),E=(r=window.Fides)==null?void 0:r.options,S=(o=i??E?.fidesConsentNonApplicableFlagMode)!=null?o:At.OMIT,p=(a=n??E?.fidesConsentFlagType)!=null?a:dt.BOOLEAN,d={};Object.assign(d,Tr({consent:{},nonApplicableNotices:e??[],flagType:p,mode:S}));const O=t.reduce((T,P)=>pr(ft({},T),{[P.notice_key]:P.consent_mechanism}),{});return Object.assign(d,Ir({consent:l,consentMechanisms:O,flagType:p})),d};var jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ct={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Ct.exports,function(s,e){(function(t){var n=e,i=s&&s.exports==n&&s,r=typeof jt=="object"&&jt;(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,S=function(T){T=String(T).replace(E,"");var P=T.length;P%4==0&&(T=T.replace(/==?$/,""),P=T.length),(P%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var f=0,C,R,se="",Ue=-1;++Ue<P;)R=l.indexOf(T.charAt(Ue)),C=f%4?C*64+R:R,f++%4&&(se+=String.fromCharCode(255&C>>(-2*f&6)));return se},p=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var P=T.length%3,f="",C=-1,R,se,Ue,Ce,xe=T.length-P;++C<xe;)R=T.charCodeAt(C)<<16,se=T.charCodeAt(++C)<<8,Ue=T.charCodeAt(++C),Ce=R+se+Ue,f+=l.charAt(Ce>>18&63)+l.charAt(Ce>>12&63)+l.charAt(Ce>>6&63)+l.charAt(Ce&63);return P==2?(R=T.charCodeAt(C)<<8,se=T.charCodeAt(++C),Ce=R+se,f+=l.charAt(Ce>>10)+l.charAt(Ce>>4&63)+l.charAt(Ce<<2&63)+"="):P==1&&(Ce=T.charCodeAt(C),f+=l.charAt(Ce>>2)+l.charAt(Ce<<4&63)+"=="),f},d={encode:p,decode:S,version:"1.0.0"};if(n&&!n.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(n[O]=d[O]);else t.base64=d})(jt)}(Ct,Ct.exports);var gs=Ct.exports;/*! js-cookie v3.0.5 | MIT */function Pt(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)s[n]=t[n]}return s}var Or={read:function(s){return s[0]==='"'&&(s=s.slice(1,-1)),s.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(s){return encodeURIComponent(s).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Yt(s,e){function t(i,r,o){if(!(typeof document>"u")){o=Pt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+s.write(r,i)+a}}function n(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 S=decodeURIComponent(l[0]);if(o[S]=s.read(E,S),i===S)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,r){t(i,"",Pt({},r,{expires:-1}))},withAttributes:function(i){return Yt(this.converter,Pt({},this.attributes,i))},withConverter:function(i){return Yt(Pt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(s)}})}var Nr=Yt(Or,{path:"/"});let wt;const Ar=new Uint8Array(16);function fr(){if(!wt&&(wt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wt(Ar)}const Ne=[];for(let s=0;s<256;++s)Ne.push((s+256).toString(16).slice(1));function Cr(s,e=0){return Ne[s[e+0]]+Ne[s[e+1]]+Ne[s[e+2]]+Ne[s[e+3]]+"-"+Ne[s[e+4]]+Ne[s[e+5]]+"-"+Ne[s[e+6]]+Ne[s[e+7]]+"-"+Ne[s[e+8]]+Ne[s[e+9]]+"-"+Ne[s[e+10]]+Ne[s[e+11]]+Ne[s[e+12]]+Ne[s[e+13]]+Ne[s[e+14]]+Ne[s[e+15]]}const Pr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ts={randomUUID:Pr};function wr(s,e,t){if(Ts.randomUUID&&!e&&!s)return Ts.randomUUID();s=s||{};const n=s.random||(s.rng||fr)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=n[i];return e}return Cr(n)}var Dr=(s=>(s.CONSENT="Consent",s.CONTRACT="Contract",s.LEGAL_OBLIGATIONS="Legal obligations",s.VITAL_INTERESTS="Vital interests",s.PUBLIC_INTEREST="Public interest",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(Dr||{}),zt=(s=>(s.CONSENT="Consent",s.LEGITIMATE_INTERESTS="Legitimate interests",s))(zt||{});const Wt=407,Dt=",",mr=[{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"}],Vr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];mr.filter(({experienceKey:s})=>s!=="tcf_features"&&s!=="tcf_special_purposes").map(s=>s.experienceKey),zt.CONSENT.toString(),zt.LEGITIMATE_INTERESTS.toString();const Rr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Mr=Object.defineProperty,br=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Is=Object.getOwnPropertySymbols,vr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Os=(s,e,t)=>e in s?Mr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,yr=(s,e)=>{for(var t in e||(e={}))vr.call(e,t)&&Os(s,t,e[t]);if(Is)for(var t of Is(e))Gr.call(e,t)&&Os(s,t,e[t]);return s},Ur=(s,e)=>br(s,Lr(e)),xr=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Ns="fides_consent",Fr=365,mt=Nr.withConverter({read(s){return decodeURIComponent(s)},write(s){return encodeURIComponent(s)}}),Br=()=>wr();Br();const Hr=s=>mt.get(s),kr=()=>{const s=Hr(Ns);if(s)try{return JSON.parse(s)}catch{try{return JSON.parse(gs.decode(s))}catch{return}}},As=(s,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();s.fides_meta.updatedAt=t;let n=JSON.stringify(s);e&&(n=gs.encode(n));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),mt.set(Ns,n,{path:"/",domain:r,expires:Fr})){const a=kr();if(a&&a.fides_meta.updatedAt===s.fides_meta.updatedAt)break}},Kr=s=>{const e={};return Vr.forEach(({cookieKey:t})=>{var n;const i=(n=s[t])!=null?n:[];e[t]=Object.fromEntries(i.map(r=>[r.id,$t(r.preference)]))}),e},$r=(s,e=!0)=>{s.forEach(t=>{var n;if(mt.remove(t.name,{path:(n=t.path)!=null?n:"/",domain:t.domain}),e){const{hostname:i}=window.location;mt.remove(t.name,{domain:`.${i}`})}})},fs=s=>{const e=new Map(s.map(({notice:t,consentPreference:n})=>[t.notice_key,$t(n)]));return Object.fromEntries(e)},jr=(s,e)=>xr(void 0,null,function*(){return Ur(yr({},s),{consent:fs(e)})});var Yr=(s=>(s.GVL="gvl",s.AC="gacp",s))(Yr||{});const je=s=>{const e=s.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Vt=(s,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:n}=je(s);if(t==="gvl"||t===void 0)return e.vendors[n]},zr=s=>je(s).source==="gacp",Wr=s=>{const{tcf_vendor_relationships:e=[]}=s;return e.map(t=>t.id).filter(t=>Vt(t,s.gvl)).map(t=>+je(t).id)},Qr=s=>{const e=[...s.tcf_vendor_consent_ids||[],...s.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Vt(t,s.gvl)).map(t=>+je(t).id)},Jr=s=>{if(!s)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",n="",i=""]=s.split(Dt);return e?{tc:e,ac:t,gpp:n,nc:i}:{tc:"",ac:"",gpp:n,nc:i}},Cs=s=>{var e;const t=s.getGppString();if(!t)return window.Fides.fides_string;const n=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(Dt))||[]).concat(n);return n.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},qr=1,Je={us:{name:X.NAME,id:X.ID},us_ca:{name:ne.NAME,id:ne.ID},us_co:{name:re.NAME,id:re.ID},us_ct:{name:ae.NAME,id:ae.ID},us_ut:{name:oe.NAME,id:oe.ID},us_va:{name:ie.NAME,id:ie.ID},us_de:{name:ue.NAME,id:ue.ID},us_fl:{name:le.NAME,id:le.ID},us_ia:{name:Se.NAME,id:Se.ID},us_mt:{name:ce.NAME,id:ce.ID},us_ne:{name:pe.NAME,id:pe.ID},us_nh:{name:_e.NAME,id:_e.ID},us_nj:{name:he.NAME,id:he.ID},us_or:{name:de.NAME,id:de.ID},us_tn:{name:ge.NAME,id:ge.ID},us_tx:{name:Ee.NAME,id:Ee.ID}};function Ps(s,e){return s.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var Xr=Object.defineProperty,Zr=Object.defineProperties,eo=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,so=Object.prototype.propertyIsEnumerable,Ds=(s,e,t)=>e in s?Xr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ms=(s,e)=>{for(var t in e||(e={}))to.call(e,t)&&Ds(s,t,e[t]);if(ws)for(var t of ws(e))so.call(e,t)&&Ds(s,t,e[t]);return s},Vs=(s,e)=>Zr(s,eo(e)),no=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())}),io=(s=>(s.PRIVACY_EXPERIENCE="/privacy-experience",s.PRIVACY_PREFERENCES="/privacy-preferences",s.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",s.NOTICES_SERVED="/notices-served",s))(io||{});const ro={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},oo="Fides.js",ao=(s,e,t,n,i)=>no(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(s,n.consent,n.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=Vs(ms({},ro),{body:JSON.stringify(Vs(ms({},e),{source:oo}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var lo=Object.defineProperty,co=Object.defineProperties,Eo=Object.getOwnPropertyDescriptors,Rs=Object.getOwnPropertySymbols,uo=Object.prototype.hasOwnProperty,So=Object.prototype.propertyIsEnumerable,Ms=(s,e,t)=>e in s?lo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Rt=(s,e)=>{for(var t in e||(e={}))uo.call(e,t)&&Ms(s,t,e[t]);if(Rs)for(var t of Rs(e))So.call(e,t)&&Ms(s,t,e[t]);return s},bs=(s,e)=>co(s,Eo(e)),Qt=(s=>(s.FIDES="fides",s.EXTERNAL="external",s))(Qt||{}),po=(s=>(s.TOGGLE="toggle",s.BUTTON="button",s.LINK="link",s))(po||{});const Ls=(s,e,t)=>{var n,i,r,o,a,l,E,S;const p=e?Rt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=Rt({consentMethod:p?.fides_meta.consentMethod},t);(n=t?.trigger)!=null&&n.origin||(d.trigger=bs(Rt({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,s),T=O?.startTime,P=p;P&&p!=null&&p.consent&&(P.consent=hs(p.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));const f=new CustomEvent(s,{detail:bs(Rt({},P),{debug:!!((S=(E=window.Fides)==null?void 0:E.options)!=null&&S.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent(f)}};var _o=Object.defineProperty,ho=Object.defineProperties,go=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Gs=(s,e,t)=>e in s?_o(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,St=(s,e)=>{for(var t in e||(e={}))To.call(e,t)&&Gs(s,t,e[t]);if(vs)for(var t of vs(e))Io.call(e,t)&&Gs(s,t,e[t]);return s},Mt=(s,e)=>ho(s,go(e)),ys=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Oo=[$e.SCRIPT,$e.GPC,$e.OT_MIGRATION];function No(s,e,t,n,i,r,o,a,l,E){return ys(this,null,function*(){const S=(o||[]).map(d=>({preference:d.consentPreference,privacy_notice_history_id:d.noticeHistoryId||""})),p=St({browser_identity:e.identity,preferences:S,privacy_experience_config_history_id:r,user_geography:l,method:n,served_notice_history_id:E,property_id:i},a??[]);yield ao(n,p,s,e,t)})}const Ao=s=>ys(void 0,[s],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:n,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:E,tcf:S,updateCookie:p,propertyId:d}){var O,T,P,f,C,R;if(!p&&e&&(p=xe=>jr(xe,e)),!p&&!e)throw new Error("updateCookie is required");const se=Mt(St({},l?.trigger),{origin:((O=l?.trigger)==null?void 0:O.origin)||(Oo.includes(i)?Qt.EXTERNAL:Qt.FIDES)}),Ue=yield p(a);Object.assign(a,Ue),Object.assign(a.fides_meta,{consentMethod:i}),Ls("FidesUpdating",a,Mt(St({},l),{trigger:se}));const Ce=hs(a.consent,(P=(T=window.Fides)==null?void 0:T.experience)==null?void 0:P.non_applicable_privacy_notices,(C=(f=window.Fides)==null?void 0:f.experience)==null?void 0:C.privacy_notices);if(window.Fides.consent=Ce,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,As(Mt(St({},a),{consent:Ce}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield No(r,a,n,i,((R=d?.length)!=null?R:0)>0?d:window.Fides.config.propertyId,t,e,S,o,E)}catch{}e&&e.filter(xe=>xe.consentPreference===ve.OPT_OUT).forEach(xe=>{var Xt,Zt;(Xt=xe.notice)!=null&&Xt.cookies&&$r(xe.notice.cookies,(Zt=n.experience_config)==null?void 0:Zt.auto_subdomain_cookie_deletion)}),Ls("FidesUpdated",a,Mt(St({},l),{trigger:se}))});class Ye extends Error{constructor(e){super(e),this.name="DecodingError"}}class Be extends Error{constructor(e){super(e),this.name="EncodingError"}}class lt extends Error{constructor(e){super(e),this.name="GVLError"}}class He extends Error{constructor(e,t,n=""){super(`invalid value ${t} passed for ${e} ${n}`),this.name="TCModelError"}}class Jt{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new Be("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let n="";for(let i=0;i<e.length;i+=this.BASIS)n+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return n}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Ye("Invalidly encoded Base64URL string");let t="";for(let n=0;n<e.length;n++){const i=this.REVERSE_DICT.get(e[n]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class ke{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return ke.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ke.langSet.has(e))return e;if(ke.langSet.has(t))return t;const n=t+"-"+t;if(ke.langSet.has(n))return n;for(const i of ke.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ke.langSet.forEach(e)}get size(){return ke.langSet.size}}class u{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class pt{clone(){const e=new this.constructor;return Object.keys(this).forEach(n=>{const i=this.deepClone(this[n]);i!==void 0&&(e[n]=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 n=[];for(const i of e)n.push(this.deepClone(i));return e instanceof Array?n:new e.constructor(n)}else{const n={};for(const i in e)e.hasOwnProperty(i)&&(n[i]=this.deepClone(e[i]));return n}}}}var Re;(function(s){s[s.NOT_ALLOWED=0]="NOT_ALLOWED",s[s.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",s[s.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class ye extends pt{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),n=new ye;if(t.length!==2)throw new He("hash",e);return n.purposeId=parseInt(t[0],10),n.restrictionType=parseInt(t[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${ye.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Us extends pt{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,n){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[n];if(r)if(e===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const n=t.hash;this.has(n)||(this.map.set(n,new Set),this.bitLength=0),this.map.get(n).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),n=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(n))this.map.set(n,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(n).add(o)}getVendors(e){let t=[];if(e){const n=e.hash;this.has(n)&&(t=Array.from(this.map.get(n)))}else{const n=new Set;this.map.forEach(i=>{i.forEach(r=>{n.add(r)})}),t=Array.from(n)}return t.sort((n,i)=>n-i)}getRestrictionType(e,t){let n;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(n===void 0||n>i.restrictionType)&&(n=i.restrictionType)}),n}vendorHasRestriction(e,t){let n=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!n;r++)n=t.isSameAs(i[r]);return n}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((n,i)=>{e?n.has(e)&&t.push(ye.unHash(i)):t.push(ye.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,n)=>{e.add(ye.unHash(n).purposeId)}),Array.from(e)}remove(e,t){const n=t.hash,i=this.map.get(n);i&&(i.delete(e),i.size==0&&(this.map.delete(n),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,n)=>{const i=ye.unHash(n);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 xs;(function(s){s.COOKIE="cookie",s.WEB="web",s.APP="app"})(xs||(xs={}));var J;(function(s){s.CORE="core",s.VENDORS_DISCLOSED="vendorsDisclosed",s.VENDORS_ALLOWED="vendorsAllowed",s.PUBLISHER_TC="publisherTC"})(J||(J={}));class Fs{static ID_TO_KEY=[J.CORE,J.VENDORS_DISCLOSED,J.VENDORS_ALLOWED,J.PUBLISHER_TC];static KEY_TO_ID={[J.CORE]:0,[J.VENDORS_DISCLOSED]:1,[J.VENDORS_ALLOWED]:2,[J.PUBLISHER_TC]:3}}class Pe extends pt{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(n=>{let i=Number.isInteger(parseInt(n,10));return i=i&&this.isValidNumber(e[n].id),i=i&&e[n].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new He("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Ge{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class m{static encode(e,t){let n;if(typeof e=="string"&&(e=parseInt(e,10)),n=e.toString(2),n.length>t||e<0)throw new Be(`${e} too large to encode into ${t}`);return n.length<t&&(n="0".repeat(t-n.length)+n),n}static decode(e,t){if(t!==e.length)throw new Ye("invalid bit length");return parseInt(e,2)}}class Bs{static encode(e,t){return m.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Ye("invalid bit length");const n=new Date;return n.setTime(m.decode(e,t)*100),n}}class ze{static encode(e,t){let n="";for(let i=1;i<=t;i++)n+=Ge.encode(e.has(i));return n}static decode(e,t){if(e.length!==t)throw new Ye("bitfield encoding length mismatch");const n=new Pe;for(let i=1;i<=t;i++)Ge.decode(e[i-1])&&n.set(i);return n.bitLength=e.length,n}}class Hs{static encode(e,t){e=e.toUpperCase();const n=65,i=e.charCodeAt(0)-n,r=e.charCodeAt(1)-n;if(i<0||i>25||r<0||r>25)throw new Be(`invalid language code: ${e}`);if(t%2===1)throw new Be(`numBits must be even, ${t} is not valid`);t=t/2;const o=m.encode(i,t),a=m.encode(r,t);return o+a}static decode(e,t){let n;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=m.decode(e.slice(0,r),r)+65,a=m.decode(e.slice(r),r)+65;n=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Ye("invalid bit length for language");return n}}class fo{static encode(e){let t=m.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const n=(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+=m.encode(i.purposeId,g.purposeId),t+=m.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let S=0;S<o;S++){const p=r[S];if(l===0&&(a++,l=p),S===o-1||r[S+1]>n(p,r[o-1])){const d=p!==l;E+=Ge.encode(d),E+=m.encode(l,g.vendorId),d&&(E+=m.encode(p,g.vendorId)),l=0}}t+=m.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const n=new Us,i=m.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=m.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=m.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new ye(o,a),E=m.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let S=0;S<E;S++){const p=Ge.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=m.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,p){const O=m.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Ye(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)n.add(T,l)}else n.add(d,l)}}return n.bitLength=t,n}}var _t;(function(s){s[s.FIELD=0]="FIELD",s[s.RANGE=1]="RANGE"})(_t||(_t={}));class ht{static encode(e){const t=[];let n=[],i=m.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 S=a+g.numEntries;return e.forEach((p,d)=>{r+=Ge.encode(p),o=e.maxId>E&&S<l,o&&p&&(e.has(d+1)?n.length===0&&(n.push(d),S+=g.singleOrRange,S+=g.vendorId):(n.push(d),S+=g.vendorId,t.push(n),n=[]))}),o?(i+=String(_t.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(_t.FIELD),i+=r),i}static decode(e,t){let n,i=0;const r=m.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=m.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===_t.RANGE){if(n=new Pe,t===1){if(e.substr(i,1)==="1")throw new Ye("Unable to decode default consent=1");i++}const a=m.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=Ge.decode(e.charAt(i));i+=g.singleOrRange;const S=m.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const p=m.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=S;d<=p;d++)n.set(d)}else n.set(S)}}else{const a=e.substr(i,r);i+=r,n=ze.decode(a,r)}return n.bitLength=i,n}static buildRangeEncoding(e){const t=e.length;let n=m.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;n+=Ge.encode(!r),n+=m.encode(i[0],g.vendorId),r||(n+=m.encode(i[1],g.vendorId))}),n}}function ks(){return{[u.version]:m,[u.created]:Bs,[u.lastUpdated]:Bs,[u.cmpId]:m,[u.cmpVersion]:m,[u.consentScreen]:m,[u.consentLanguage]:Hs,[u.vendorListVersion]:m,[u.policyVersion]:m,[u.isServiceSpecific]:Ge,[u.useNonStandardTexts]:Ge,[u.specialFeatureOptins]:ze,[u.purposeConsents]:ze,[u.purposeLegitimateInterests]:ze,[u.purposeOneTreatment]:Ge,[u.publisherCountryCode]:Hs,[u.vendorConsents]:ht,[u.vendorLegitimateInterests]:ht,[u.publisherRestrictions]:fo,segmentType:m,[u.vendorsDisclosed]:ht,[u.vendorsAllowed]:ht,[u.publisherConsents]:ze,[u.publisherLegitimateInterests]:ze,[u.numCustomPurposes]:m,[u.publisherCustomConsents]:ze,[u.publisherCustomLegitimateInterests]:ze}}class Co{1={[J.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[J.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[J.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[J.VENDORS_ALLOWED]:[u.vendorsAllowed],[J.VENDORS_DISCLOSED]:[u.vendorsDisclosed]}}class Po{1=[J.CORE];2=[J.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(J.PUBLISHER_TC);else{const n=!!(t&&t.isForVendors);(!n||e[u.supportOOB]===!0)&&this[2].push(J.VENDORS_DISCLOSED),n&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(J.VENDORS_ALLOWED),this[2].push(J.PUBLISHER_TC))}}}class Ks{static fieldSequence=new Co;static encode(e,t){let n;try{n=this.fieldSequence[String(e.version)][t]}catch{throw new Be(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==J.CORE&&(i=m.encode(Fs.KEY_TO_ID[t],g.segmentType));const r=ks();return n.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[u.numCustomPurposes]));try{i+=l.encode(a,E)}catch(S){throw new Be(`Error encoding ${t}->${o}: ${S.message}`)}}),Jt.encode(i)}static decode(e,t,n){const i=Jt.decode(e);let r=0;n===J.CORE&&(t.version=m.decode(i.substr(r,g[u.version]),g[u.version])),n!==J.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][n],a=ks();return o.forEach(l=>{const E=a[l];let S=g[l];if(S===void 0&&this.isPublisherCustom(l)&&(S=Number(t[u.numCustomPurposes])),S!==0){const p=i.substr(r,S);if(E===ht?t[l]=E.decode(p,t.version):t[l]=E.decode(p,S),Number.isInteger(S))r+=S;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Ye(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 n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.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 S=!1;for(let p=0,d=E.length;p<d&&!S;p++)S=E[p].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||E[p].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";S||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const n=e.gvl;if(!n)throw new Be("Unable to encode TCModel without a GVL");if(!n.isReady)throw new Be("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=n.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new Be(`Invalid version: ${e.version}`);return this.processor[i](e,n)}}class Do{static absCall(e,t,n,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"))},S=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=n,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=p,a.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}class A extends pt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ke;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new lt("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 n=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new lt("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!n)throw new lt("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(n+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(n))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(n+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.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 lt(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]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.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]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new lt("Error during parsing the language: "+i.message)}const n=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(n))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(n)){const i=A.LANGUAGE_CACHE.get(n);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=n,this.cacheLanguage()}catch(r){throw new lt("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&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.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,n)=>{const i=this.vendors_[String(n)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(n)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(n)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(n)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(n)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(n)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(n)}),t[n]=i),t},{})}getFilteredVendors(e,t,n,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&n?o=this["by"+r+"VendorMap"][String(t)][n]: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 A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class $s extends pt{static consentLanguages=A.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 Pe;purposeConsents=new Pe;purposeLegitimateInterests=new Pe;publisherConsents=new Pe;publisherLegitimateInterests=new Pe;publisherCustomConsents=new Pe;publisherCustomLegitimateInterests=new Pe;customPurposes;vendorConsents=new Pe;vendorLegitimateInterests=new Pe;vendorsDisclosed=new Pe;vendorsAllowed=new Pe;publisherRestrictions=new Us;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new He("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new He("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new He("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new He("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new He("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new He("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((n,i)=>Number(n)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new He("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class mo{static encode(e,t){let n="",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="."),n+=Ks.encode(e,r)+a}),n}static decode(e,t){const n=e.split("."),i=n.length;t||(t=new $s);for(let r=0;r<i;r++){const o=n[r],l=Jt.decode(o.charAt(0)).substr(0,g.segmentType),E=Fs.ID_TO_KEY[m.decode(l,g.segmentType).toString()];Ks.decode(o,t,E)}return t}}var We;(function(s){s.PING="ping",s.GET_TC_DATA="getTCData",s.GET_IN_APP_TC_DATA="getInAppTCData",s.GET_VENDOR_LIST="getVendorList",s.ADD_EVENT_LISTENER="addEventListener",s.REMOVE_EVENT_LISTENER="removeEventListener"})(We||(We={}));var bt;(function(s){s.STUB="stub",s.LOADING="loading",s.LOADED="loaded",s.ERROR="error"})(bt||(bt={}));var Lt;(function(s){s.VISIBLE="visible",s.HIDDEN="hidden",s.DISABLED="disabled"})(Lt||(Lt={}));var js;(function(s){s.TC_LOADED="tcloaded",s.CMP_UI_SHOWN="cmpuishown",s.USER_ACTION_COMPLETE="useractioncomplete"})(js||(js={}));class vt{listenerId;callback;next;param;success=!0;constructor(e,t,n,i){Object.assign(this,{callback:e,listenerId:n,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 Gt extends vt{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 Gt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Vo;static cmpStatus=bt.LOADING;static disabled=!1;static displayStatus=Lt.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=Lt.HIDDEN,this.eventQueue.clear()}}class Ys{cmpId=Oe.cmpId;cmpVersion=Oe.cmpVersion;gdprApplies=Oe.gdprApplies;tcfPolicyVersion=Oe.tcfPolicyVersion}class zs extends Ys{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Oe.eventStatus,this.cmpStatus=Oe.cmpStatus,this.listenerId=t,Oe.gdprApplies){const n=Oe.tcModel;this.tcString=Oe.tcString,this.isServiceSpecific=n.isServiceSpecific,this.useNonStandardTexts=n.useNonStandardTexts,this.purposeOneTreatment=n.purposeOneTreatment,this.publisherCC=n.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(n.vendorsAllowed,e),disclosedVendors:this.createVectorField(n.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(n.purposeConsents),legitimateInterests:this.createVectorField(n.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(n.vendorConsents,e),legitimateInterests:this.createVectorField(n.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(n.specialFeatureOptins),this.publisher={consents:this.createVectorField(n.publisherConsents),legitimateInterests:this.createVectorField(n.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(n.publisherCustomConsents),legitimateInterests:this.createVectorField(n.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(n.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();for(let i=1;i<=n;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((n,i)=>(n[String(i)]=e.has(Number(i)),n),{}):[...e].reduce((n,i)=>(n[i[0].toString(10)]=i[1],n),{})}}class Ro extends zs{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,n)=>(t+=n[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const n=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(n)});for(let i=0;i<n;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),S=t[l].substr(i+1);t[l]=E+a+S})}}return t}}class Mo extends Ys{cmpLoaded=!0;cmpStatus=Oe.cmpStatus;displayStatus=Oe.displayStatus;apiVersion=String(Oe.apiVersion);gvlVersion;constructor(){super(),Oe.tcModel&&Oe.tcModel.vendorListVersion&&(this.gvlVersion=+Oe.tcModel.vendorListVersion)}}class bo extends vt{respond(){this.invokeCallback(new Mo)}}class Lo extends Gt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Ro(this.param))}}class vo extends vt{respond(){const e=Oe.tcModel,t=e.vendorListVersion;let n;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?n=e.gvl:n=new A(this.param),n.readyPromise.then(()=>{this.invokeCallback(n.getJson())})}}class Go extends Gt{respond(){this.listenerId=Oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yo extends vt{respond(){this.invokeCallback(Oe.eventQueue.remove(this.param))}}class wa{static[We.PING]=bo;static[We.GET_TC_DATA]=Gt;static[We.GET_IN_APP_TC_DATA]=Lo;static[We.GET_VENDOR_LIST]=vo;static[We.ADD_EVENT_LISTENER]=Go;static[We.REMOVE_EVENT_LISTENER]=yo}const Uo=s=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=s.detail;if(e){const[t]=e.split(Dt);return t.split(".")[0]}return e??""};var xo=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const Fo=1,Ws=[1,3,4,5,6],Bo=2,Ho=({userConsentedVendorIds:s,disclosedVendorIds:e})=>{const t=r=>r.filter(zr).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),n=t(s),i=t(e.filter(r=>!s.includes(r)));return`${Bo}~${n}~dv.${i}`},ko=s=>xo(void 0,[s],function*({experience:e,tcStringPreferences:t}){var n,i,r,o;let a="";try{const l=new $s(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=Wt,l.cmpVersion=Fo,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?Qr(e):Wr(e);if(l.gvl.narrowVendorsTo(E),t){t.vendorsConsent.forEach(d=>{var O,T,P;if(Vt(d,e.gvl)){const{id:f}=je(d);if(l.vendorConsents.set(+f),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const C=(T=e.gvl)==null?void 0:T.vendors[f];C&&!((P=C?.purposes)!=null&&P.length)&&C.flexiblePurposes.forEach(R=>{const se=new ye;se.purposeId=R,se.restrictionType=Re.REQUIRE_CONSENT,l.publisherRestrictions.add(+f,se)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(P=>{const{id:f}=je(P);l.vendorLegitimateInterests.set(+f)});else if(Vt(d,e.gvl)){const P=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(R=>R.id===d)[0],f=P?.purpose_legitimate_interests;let C=!1;if(f&&(f.map(R=>R.id).filter(R=>Ws.includes(R)).length&&(C=!0),!C)){const{id:R}=je(d);l.vendorLegitimateInterests.set(+R)}}}),Object.values((i=(n=e.gvl)==null?void 0:n.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;Ws.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 ye;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=mo.encode(l,{segments:[J.CORE]});const S=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),p=Ho({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:S??[]});a=`${a}${Dt}${p}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Ko=Object.defineProperty,$o=Object.defineProperties,jo=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable,Js=(s,e,t)=>e in s?Ko(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Wo=(s,e)=>{for(var t in e||(e={}))Yo.call(e,t)&&Js(s,t,e[t]);if(Qs)for(var t of Qs(e))zo.call(e,t)&&Js(s,t,e[t]);return s},Qo=(s,e)=>$o(s,jo(e)),Jo=(s,e,t)=>new Promise((n,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?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,e)).next())});const qe=({modelList:s,enabledIds:e})=>s?s.map(t=>{const n=ut(e.includes(`${t.id}`));return{id:t.id,preference:n}}):[],Xe=s=>s!=null&&s.length?s.map(e=>{const t=ut(!0);let n=e;return Number.isNaN(parseInt(e,10))||(n=parseInt(e,10)),{id:n,preference:t}}):[],qo=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:qe({modelList:s.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:qe({modelList:s.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:qe({modelList:s.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:qe({modelList:s.tcf_vendor_consents,enabledIds:n}),vendor_legitimate_interests_preferences:qe({modelList:s.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:qe({modelList:s.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:qe({modelList:s.tcf_system_legitimate_interests,enabledIds:i})}},Xo=({experience:s,enabledIds:e})=>{const t=[],n=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=s.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):n.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=s.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Xe(e.purposesConsent),purpose_legitimate_interests_preferences:Xe(e.purposesLegint),special_feature_preferences:Xe(e.specialFeatures),vendor_consent_preferences:Xe(n),vendor_legitimate_interests_preferences:Xe(r),system_consent_preferences:Xe(t),system_legitimate_interests_preferences:Xe(i)}},Zo=(s,e,t,n,i)=>Jo(void 0,null,function*(){var r;const o=yield ko({tcStringPreferences:t,experience:n}),a=Qo(Wo({},s),{fides_string:o,tcf_consent:Kr(e),tcf_version_hash:(r=n.meta)==null?void 0:r.version_hash});return i&&(a.consent=fs(i)),a}),ea=(s,e)=>!s||!e?[]:s.map(t=>{var n;const i=ut(e.includes(t.id),t.consent_mechanism);return new cs(t,i,(n=t.bestTranslation)==null?void 0:n.privacy_notice_history_id)});var De=(s=>(s.NATIONAL="national",s.STATE="state",s.ALL="all",s))(De||{});const Ze="us",qs=({cmpApi:s,sectionName:e,gppSettings:t})=>{t&&[{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:n,cmpApiField:i})=>{const r=i===N.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:n&&(o=1),s.setFieldValue(e,i,o)})},ta=s=>s?.toLowerCase().startsWith("us"),qt=({experienceRegion:s,usApproach:e})=>ta(s)&&e===De.NATIONAL?Ze:s,Xs=({cmpApi:s,experience:e})=>{const t=new Set,{privacy_notices:n=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=qt({experienceRegion:i,usApproach:o}),l=Je[a];return!l&&o===De.ALL&&(a=Ze,l=Je[a]),!l||a===Ze&&o===De.STATE?[]:(t.add(l),n.forEach(E=>{var S;const{gpp_field_mapping:p}=E,d=(S=p?.find(O=>O.region===a))==null?void 0:S.notice;d&&d.forEach(O=>{s.setFieldValue(l.name,O,1)})}),qs({cmpApi:s,sectionName:l.name,gppSettings:r}),Array.from(t))},Zs=({cmpApi:s,cookie:e,experience:t})=>{const n=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let l=qt({experienceRegion:r,usApproach:a}),E=Je[l];if(!E&&a===De.ALL&&(l=Ze,E=Je[l]),!E||l===Ze&&a===De.STATE)return[];n.add(E);const{consent:S}=e;return Object.keys(S).forEach(p=>{var d;const O=i?.find(P=>P.notice_key===p),T=S[p];if(O){const{gpp_field_mapping:P}=O,f=(d=P?.find(C=>C.region===l))==null?void 0:d.mechanism;f&&f.forEach(C=>{let R=C.not_available;T===!1?R=C.opt_out:T&&(R=C.not_opt_out);let se=+R;R.length>1&&(se=R.split("").map(Ue=>+Ue)),s.setFieldValue(E.name,C.field,se)})}}),qs({cmpApi:s,sectionName:E.name,gppSettings:o}),Array.from(n)};var sa=Object.defineProperty,na=Object.defineProperties,ia=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,oa=Object.prototype.propertyIsEnumerable,tn=(s,e,t)=>e in s?sa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,sn=(s,e)=>{for(var t in e||(e={}))ra.call(e,t)&&tn(s,t,e[t]);if(en)for(var t of en(e))oa.call(e,t)&&tn(s,t,e[t]);return s},nn=(s,e)=>na(s,ia(e));const aa=[1,3,4,5,6],la=({cmpApi:s,experience:e})=>{const t={},{privacy_notices:n=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=qt({experienceRegion:i,usApproach:o}),l=Je[a];return!l&&o===De.ALL&&(a=Ze,l=Je[a]),!l||a===Ze&&o===De.STATE||n.forEach(E=>{var S;const{notice_key:p,gpp_field_mapping:d}=E,O=(S=d?.find(T=>T.region===a))==null?void 0:S.mechanism;if(O){const T=O.some(P=>{const f=s.getFieldValue(l.name,P.field),C=Array.isArray(f)?f.join(""):String(f);return C===P.opt_out?!0:(P.not_opt_out,!1)});T!==void 0&&(t[p]=!T)}}),t},ca=({cmpApi:s,experience:e})=>{var t,n,i,r;const o=Rr,a=s.getSection(W.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),S=a.VendorConsents.map(d=>`gvl.${d}`),p=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=E.filter(d=>!aa.includes(parseInt(d,10))),o.vendorsConsent=S,o.vendorsLegint=p,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=((n=e.tcf_features)==null?void 0:n.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},da=({fidesString:s,cmpApi:e})=>{const{gpp:t}=Jr(s);if(!s||!t||!e)return;const{options:n,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,l=window.Fides.experience;if(!l||!l.experience_config||!l.privacy_notices)return;const E=l.experience_config.component===Et.TCF_OVERLAY,S=_r(r),p=l.experience_config.translations.find(f=>Ps(f.language,o));if(!p)return;e.setGppString(t),e.setSignalStatus(me.READY);const d=l.privacy_notices.map(f=>({notice:f,bestTranslation:f.translations.find(C=>Ps(C.language,o))||null}));let O,T,P;if(E){const f=ca({cmpApi:e,experience:l});P=ea(d.map(({notice:C,bestTranslation:R})=>nn(sn({},C),{bestTranslation:R})),f.customPurposesConsent),T=l.minimal_tcf?Xo({experience:l,enabledIds:f}):qo({experience:l,enabledIds:f}),O=C=>Zo(C,T,f,l)}else{const f=la({cmpApi:e,experience:l}),C=Object.entries(f).filter(([R,se])=>se).map(([R])=>R);P=gr(d,C),O=R=>Promise.resolve(nn(sn({},R),{consent:f}))}Ao({consentPreferencesToSave:P,privacyExperienceConfigHistoryId:p.privacy_experience_config_history_id,experience:l,consentMethod:$e.SCRIPT,options:n,userLocationString:S||void 0,cookie:i,propertyId:a?.propertyId,tcf:T,updateCookie:O})},rn="__gppLocator",on=s=>{if(!window.frames[s])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=s,window.document.body.appendChild(e)}else setTimeout(()=>on(s),5)},Ea=s=>{let e=window,t;for(;e;){try{if(e.frames[s]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},ua=s=>typeof s=="object"&&s!=null&&"__gppCall"in s,Sa=()=>{const s=[],e=[];let t;const n=(r,o,a,l)=>{if(r==="queue")return s;if(r==="events")return e;const E={gppVersion:"1.1",cmpStatus:st.STUB,cmpDisplayStatus:Ke.HIDDEN,signalStatus:me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(E,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:E},!0)}else if(r==="removeEventListener"){let S=!1;for(let p=0;p<e.length;p++)if(e[p].id===a){e.splice(p,1),S=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:S,pingData:E},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):s.push([].slice.apply([r,o,a,l]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!ua(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(E,S)=>{const p={__gppReturn:{returnValue:E,success:S,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(p):p,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};Ea(rn)||(on(rn),window.__gpp=n,window.addEventListener("message",i,!1))},an=(s,e,t)=>s?e?!0:!!(t&&Object.entries(s).some(([n,i])=>n in t.map(r=>r.notice_key)&&i!==void 0)):!1,ln=(s,e)=>{if(!at(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const n=Uo(s);return n?(e.setFieldValueBySectionId(W.ID,"CmpId",Wt),e.setSectionStringById(W.ID,n),!0):!1},pa=()=>{const s=[];if(at(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&s.push(`${W.ID}:${W.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&s.push(`${X.ID}:${X.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Je).forEach(t=>{t.id!==X.ID&&s.push(`${t.id}:${t.name}`)}))}return s},_a=()=>{Sa();const s=new Yi(Wt,qr);s.setCmpStatus(st.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:n,saved_consent:i,options:r}=window.Fides,o=pa();if(s.setSupportedAPIs(o),!at(n))return;const{fidesString:a}=r;if(a&&da({fidesString:a,cmpApi:s}),!a&&(!hr(n,e.detail,i,r)||!r.tcfEnabled&&ps(n.privacy_notices)&&!an(i,e.detail.fides_string,n.privacy_notices))){const l=ln(e,s);l&&s.setApplicableSections([W.ID]);const E=Xs({cmpApi:s,experience:n}),S=Zs({cmpApi:s,cookie:e.detail,experience:n});S.length&&s.setApplicableSections(S.map(d=>d.id)),!l&&!E.length&&!S.length&&s.setApplicableSections([-1]),s.setSignalStatus(me.READY);const p=Cs(s);window.Fides.fides_string=p}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:n,options:i}=window.Fides;if(at(t)){!i.tcfEnabled&&ps(t.privacy_notices)&&!an(n,e.detail.fides_string,t.privacy_notices)?s.setSignalStatus(me.READY):s.setSignalStatus(me.NOT_READY),s.setCmpDisplayStatus(Ke.VISIBLE);const r=Xs({cmpApi:s,experience:t});r.length&&(s.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{s.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(s.setCmpDisplayStatus(Ke.HIDDEN),s.setSignalStatus(me.READY))}),window.addEventListener("FidesUpdated",e=>{if(s.setCmpDisplayStatus(Ke.HIDDEN),ln(e,s)&&(s.setApplicableSections([W.ID]),s.fireSectionChange("tcfeuv2")),at(window.Fides.experience)){const t=Zs({cmpApi:s,cookie:e.detail,experience:window.Fides.experience});t.length&&(s.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{s.fireSectionChange(i.name)}));const n=Cs(s);window.Fides.cookie&&(window.Fides.fides_string=n,window.Fides.cookie.fides_string=n,As(window.Fides.cookie,window.Fides.options.base64Cookie))}s.setSignalStatus(me.READY)})};window.addEventListener("FidesInitializing",s=>{var e;(e=s.detail.extraDetails)!=null&&e.gppEnabled&&_a()});
|
|
1
|
+
class zt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class ft{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 ot=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)}},pn=class extends ot{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new zt("listenerRegistered",e,!0,new ft(this.cmpApiContext));this.invokeCallback(t)}},_n=class extends ot{respond(){let e=new ft(this.cmpApiContext);this.invokeCallback(e)}};class hn extends ot{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class gn extends ot{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class Tn extends ot{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 Ge;(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"})(Ge||(Ge={}));let On=class extends ot{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new zt("listenerRemoved",e,t,new ft(this.cmpApiContext));this.invokeCallback(s)}},ls=class{static[Ge.ADD_EVENT_LISTENER]=pn;static[Ge.GET_FIELD]=hn;static[Ge.GET_SECTION]=gn;static[Ge.HAS_SECTION]=Tn;static[Ge.PING]=_n;static[Ge.REMOVE_EVENT_LISTENER]=On};var at;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(at||(at={}));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=Ge.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ge.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 Nn=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new zt(e,i,t,new ft(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class _t extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class te{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new _t("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new _t("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let _=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Ie=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{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 Ie("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 _("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 Nt{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 Ie("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=V.decode(i),o=Nt.DICT.charAt(r);t+=o,s+=6}catch{throw new Ie("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new _("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Nt.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}}class H extends Nt{static instance=new H;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 C{static instance=new C;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 _("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class lt{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 _("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 ct=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Ie("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new _("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=V.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"+lt.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"+lt.encode(a)+lt.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ct.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),d=lt.decode(e.substring(r,l+2))+i;i=d,r=l+2,l=e.indexOf("11",r);let u=lt.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let p=d;p<=u;p++)t.push(p)}else{let l=e.indexOf("11",r),d=lt.decode(e.substring(r,l+2))+i;i=d,t.push(d),r=l+2}}return t}}class An extends Error{constructor(e){super(e),this.name="ValidationError"}}class be{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 An("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Re extends _{constructor(e){super(e),this.name="SubstringError"}}class se{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Re("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class fn extends be{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ds.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ds.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let s=V.decode(se.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 se.substring(e,t,i)}catch(s){throw new Re(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends be{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+this.bitStringLength)}catch(s){throw new Re(s)}}}class D{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 Be;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(Be||(Be={}));const Cn=[Be.ID,Be.VERSION,Be.SECTION_IDS];class P{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new _t("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new _t(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Pn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new D;return e.put(Be.ID.toString(),new c(6,Le.ID)),e.put(Be.VERSION.toString(),new c(6,Le.VERSION)),e.put(Be.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 _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Le extends te{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var h;(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"})(h||(h={}));const wn=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],Dn=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],mn=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],Rn=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];class rt extends Nt{static instance=new rt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class dt{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=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new _("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ct.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let l=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=l;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Wt extends be{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return dt.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=dt.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{let s=V.decode(se.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return se.substring(e,t,i)}catch(s){throw new Re(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 be{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+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=dt.encode(i.getIds())}return t}catch(e){throw new Ie(e)}}decode(e){try{let t=[],s=V.decode(se.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(se.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(se.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Wt([]).substring(e,i),d=dt.decode(l);i+=l.length,t.push(new Vn(o,a,d))}this.value=t}catch(t){throw new _(t)}}substring(e,t){try{let s="";s+=se.substring(e,t,t+12);let i=V.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=se.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=se.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let d=new Wt([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new Re(s)}}}class $ extends be{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ct.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+1)}catch(s){throw new Re(s)}}}class us{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new _("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Ct extends be{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return us.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+36)}catch(s){throw new Re(s)}}}class Et{static encode(e,t){if(e.length>t)throw new Ie("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ct.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new _("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ct.decode(e.substring(s,s+1)));return t}}class ye extends be{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return Et.encode(this.value,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Et.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+this.numElements)}catch(s){throw new Re(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+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new Ie("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new _("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Qt extends be{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 Ie(e)}}decode(e){try{this.value=Ss.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+this.stringLength*6)}catch(s){throw new Re(s)}}}class Ze extends be{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=dt.encode(this.value),s=t.length,i=e;if(s<=i)return V.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 V.encode(e,16)+"0"+Et.encode(r,i)}}catch(e){throw new Ie(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=dt.decode(e.substring(17));else{let t=[],s=Et.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 _(t)}}substring(e,t){try{let s=V.decode(se.substring(e,t,t+16));return e.charAt(t+16)==="1"?se.substring(e,t,t+17)+new Wt([]).substring(e,t+17):se.substring(e,t,t+17+s)}catch(s){throw new Re(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Mn extends P{base64UrlEncoder=rt.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new Date,t=new D;return t.put(h.VERSION.toString(),new c(6,W.VERSION)),t.put(h.CREATED.toString(),new Ct(e)),t.put(h.LAST_UPDATED.toString(),new Ct(e)),t.put(h.CMP_ID.toString(),new c(12,0)),t.put(h.CMP_VERSION.toString(),new c(12,0)),t.put(h.CONSENT_SCREEN.toString(),new c(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(h.POLICY_VERSION.toString(),new c(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new $(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new ye([!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(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new ye([!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(h.PURPOSE_ONE_TREATMENT.toString(),new $(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Qt(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Ze([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Ze([])),t.put(h.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 _("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Pt extends be{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return Et.encode(this.value,this.getLength())}catch(e){throw new Ie(e)}}decode(e){try{this.value=Et.decode(e)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+this.getLength())}catch(s){throw new Re(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 bn extends P{base64UrlEncoder=rt.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new D;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new ye([!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(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new ye([!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(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new Pt(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Pt(()=>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 _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class vn extends P{base64UrlEncoder=rt.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new D;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.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 _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Ln extends P{base64UrlEncoder=rt.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rn}initializeFields(){let e=new D;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.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 _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class W extends te{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){let e=[];return e.push(new Mn),e.push(new bn),e.push(new vn),e.push(new Ln),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new _("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.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!==h.CREATED&&e!==h.LAST_UPDATED){let s=new Date;super.setFieldValue(h.CREATED,s),super.setFieldValue(h.LAST_UPDATED,s)}}}var O;(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"})(O||(O={}));const Gn=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],yn=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],Un=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];class xn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new Date,t=new D;return t.put(O.VERSION.toString(),new c(6,Pe.VERSION)),t.put(O.CREATED.toString(),new Ct(e)),t.put(O.LAST_UPDATED.toString(),new Ct(e)),t.put(O.CMP_ID.toString(),new c(12,0)),t.put(O.CMP_VERSION.toString(),new c(12,0)),t.put(O.CONSENT_SCREEN.toString(),new c(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new ye([!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(O.PURPOSES_IMPLIED_CONSENT.toString(),new ye([!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(O.VENDOR_EXPRESS_CONSENT.toString(),new Ze([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new Ze([])),t.put(O.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 _("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Fn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new D;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new ye([!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(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new ye([!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(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Pt(()=>t.getValue(),[])),e.put(O.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Pt(()=>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 _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Bn extends P{base64UrlEncoder=rt.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Un}initializeFields(){let e=new D;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(O.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 _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Pe extends te{static ID=5;static VERSION=1;static NAME="tcfcav1";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 xn),e.push(new Fn),e.push(new Bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new _("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(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Hn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class kn{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ne;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ne||(Ne={}));const Kn=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class $n extends P{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kn}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new kn;return t.put(Ne.VERSION,new Hn(we.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 _("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 _("Unable to decode UspV1CoreSegment '"+e+"'")}}}class we extends te{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return we.ID}getName(){return we.NAME}getVersion(){return we.VERSION}initializeSegments(){let e=[];return e.push(new $n),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<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 jn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],Yn=[N.GPC_SEGMENT_TYPE,N.GPC];class ps{static encode(e,t,s){if(e.length>s)throw new Ie("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.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 _("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new _("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new _("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(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends be{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ps.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ps.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new _(t)}}substring(e,t){try{return se.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Re(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 zn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return jn}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 D;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 _("Unable to decode UsNatCoreSegment '"+e+"'")}}}class Wn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yn}initializeFields(){let e=new D;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(N.GPC.toString(),new $(!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 _("Unable to decode UsNatGpcSegment '"+e+"'")}}}class X extends te{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 zn),e.push(new Wn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Qn=[M.VERSION,M.SALE_OPT_OUT_NOTICE,M.SHARING_OPT_OUT_NOTICE,M.SENSITIVE_DATA_LIMIT_USE_NOTICE,M.SALE_OPT_OUT,M.SHARING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.PERSONAL_DATA_CONSENTS,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Jn=[M.GPC_SEGMENT_TYPE,M.GPC];class qn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;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 _("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Xn extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Jn}initializeFields(){let e=new D;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(M.GPC.toString(),new $(!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 _("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ie extends te{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 Xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var q;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(q||(q={}));const Zn=[q.VERSION,q.SHARING_NOTICE,q.SALE_OPT_OUT_NOTICE,q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,q.SALE_OPT_OUT,q.TARGETED_ADVERTISING_OPT_OUT,q.SENSITIVE_DATA_PROCESSING,q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,q.MSPA_COVERED_TRANSACTION,q.MSPA_OPT_OUT_OPTION_MODE,q.MSPA_SERVICE_PROVIDER_MODE];class ei extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.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 D;return i.put(q.VERSION.toString(),new c(6,re.VERSION)),i.put(q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(q.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(q.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(q.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsVaCoreSegment '"+e+"'")}}}class re extends te{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 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 k;(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"})(k||(k={}));const ti=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_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],si=[k.GPC_SEGMENT_TYPE,k.GPC];class ni extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(k.VERSION.toString(),new c(6,oe.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.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]).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 _("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ii extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return si}initializeFields(){let e=new D;return e.put(k.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(k.GPC.toString(),new $(!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 _("Unable to decode UsCoGpcSegment '"+e+"'")}}}class oe extends te{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 ni),e.push(new ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.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(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var Y;(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"})(Y||(Y={}));const ri=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];class oi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(Y.VERSION.toString(),new c(6,ae.VERSION)),i.put(Y.SHARING_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.SENSITIVE_DATA_PROCESSING_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 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 _("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ae extends te{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 oi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var K;(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"})(K||(K={}));const ai=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_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],li=[K.GPC_SEGMENT_TYPE,K.GPC];class ci extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(K.VERSION.toString(),new c(6,le.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.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 Q(2,[0,0,0]).withValidator(s)),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 _("Unable to decode UsCtCoreSegment '"+e+"'")}}}class di extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return li}initializeFields(){let e=new D;return e.put(K.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(K.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(K.GPC.toString(),new $(!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 _("Unable to decode UsCtGpcSegment '"+e+"'")}}}class le extends te{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 ci),e.push(new di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(K.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(K.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(K.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var z;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(z||(z={}));const Ei=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE];class ui extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.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 D;return i.put(z.VERSION.toString(),new c(6,ce.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsFlCoreSegment '"+e+"'")}}}class ce extends te{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 ui),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.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"})(b||(b={}));const Si=[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.ADDITIONAL_DATA_PROCESSING_CONSENT,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],pi=[b.GPC_SEGMENT_TYPE,b.GPC];class _i extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(b.VERSION.toString(),new c(6,de.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.ADDITIONAL_DATA_PROCESSING_CONSENT.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 _("Unable to decode UsMtCoreSegment '"+e+"'")}}}class hi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pi}initializeFields(){let e=new D;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(b.GPC.toString(),new $(!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 _("Unable to decode UsMtGpcSegment '"+e+"'")}}}class de extends te{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(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 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 gi=[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],Ti=[v.GPC_SEGMENT_TYPE,v.GPC];class Oi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(v.VERSION.toString(),new c(6,Ee.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,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 _("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Ii extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ti}initializeFields(){let e=new D;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(v.GPC.toString(),new $(!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 _("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Ee extends te{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 Oi),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(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 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 Ni=[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],Ai=[L.GPC_SEGMENT_TYPE,L.GPC];class fi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(L.VERSION.toString(),new c(6,ue.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ci extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ai}initializeFields(){let e=new D;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(L.GPC.toString(),new $(!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 _("Unable to decode UsTxGpcSegment '"+e+"'")}}}class ue extends te{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 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(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 Pi=[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],wi=[G.GPC_SEGMENT_TYPE,G.GPC];class Di extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.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 D;return i.put(G.VERSION.toString(),new c(6,Se.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,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,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 _("Unable to decode UsDeCoreSegment '"+e+"'")}}}class mi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wi}initializeFields(){let e=new D;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(G.GPC.toString(),new $(!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 _("Unable to decode UsDeGpcSegment '"+e+"'")}}}class Se extends te{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 Di),e.push(new mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(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.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"})(y||(y={}));const Ri=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SENSITIVE_DATA_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Vi=[y.GPC_SEGMENT_TYPE,y.GPC];class Mi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ri}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(y.VERSION.toString(),new c(6,pe.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.SENSITIVE_DATA_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 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 _("Unable to decode UsIaCoreSegment '"+e+"'")}}}class bi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new D;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(y.GPC.toString(),new $(!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 _("Unable to decode UsIaGpcSegment '"+e+"'")}}}class pe extends te{static ID=18;static VERSION=1;static NAME="usia";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 Mi),e.push(new bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(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 vi=[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],Li=[U.GPC_SEGMENT_TYPE,U.GPC];class Gi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.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 D;return i.put(U.VERSION.toString(),new c(6,_e.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}class yi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Li}initializeFields(){let e=new D;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(U.GPC.toString(),new $(!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 _("Unable to decode UsNeGpcSegment '"+e+"'")}}}class _e extends te{static ID=19;static VERSION=1;static NAME="usne";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 Gi),e.push(new yi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(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(".")}}var x;(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"})(x||(x={}));const Ui=[x.VERSION,x.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],xi=[x.GPC_SEGMENT_TYPE,x.GPC];class Fi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.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 D;return i.put(x.VERSION.toString(),new c(6,he.VERSION)),i.put(x.PROCESSING_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,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.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 _("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Bi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xi}initializeFields(){let e=new D;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(x.GPC.toString(),new $(!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 _("Unable to decode UsNhGpcSegment '"+e+"'")}}}class he extends te{static ID=20;static VERSION=1;static NAME="usnh";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 Fi),e.push(new Bi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(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 F;(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"})(F||(F={}));const Hi=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],ki=[F.GPC_SEGMENT_TYPE,F.GPC];class Ki extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new D;return i.put(F.VERSION.toString(),new c(6,ge.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new _("Unable to decode UsNjCoreSegment '"+e+"'")}}}class $i extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){let e=new D;return e.put(F.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(F.GPC.toString(),new $(!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 _("Unable to decode UsNjGpcSegment '"+e+"'")}}}class ge extends te{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 Ki),e.push(new $i),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var B;(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"})(B||(B={}));const ji=[B.VERSION,B.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],Yi=[B.GPC_SEGMENT_TYPE,B.GPC];class zi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ji}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 D;return i.put(B.VERSION.toString(),new c(6,Te.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.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.ADDITIONAL_DATA_PROCESSING_CONSENT.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 _("Unable to decode UsTnCoreSegment '"+e+"'")}}}class Wi extends P{base64UrlEncoder=H.getInstance();bitStringEncoder=C.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Yi}initializeFields(){let e=new D;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(B.GPC.toString(),new $(!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 _("Unable to decode UsTnGpcSegment '"+e+"'")}}}class Te extends te{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 zi),e.push(new Wi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(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(".")}}class ne{static SECTION_ID_NAME_MAP=new Map([[W.ID,W.NAME],[Pe.ID,Pe.NAME],[we.ID,we.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],[pe.ID,pe.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME]]);static SECTION_ORDER=[W.NAME,Pe.NAME,we.NAME,X.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,_e.NAME,he.NAME,ge.NAME,Te.NAME]}class _s{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===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===W.NAME?(i=new W,this.sections.set(W.NAME,i)):e===we.NAME?(i=new we,this.sections.set(we.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===pe.NAME?(i=new pe,this.sections.set(pe.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===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 _t(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(ne.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(ne.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(ne.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(ne.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(ne.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<ne.SECTION_ORDER.length;t++){let s=ne.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<ne.SECTION_ORDER.length;r++){let o=ne.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 _("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 _("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===W.ID){let l=new W(t[o+1]);s.set(W.NAME,l)}else if(r[o]===we.ID){let l=new we(t[o+1]);s.set(we.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]===pe.ID){let l=new pe(t[o+1]);s.set(pe.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]===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 W(e);return t.set(W.NAME,s),new Le().setFieldValue(Be.SECTION_IDS,[2]),t.set(Le.NAME,s),t}else throw new _("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(ne.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===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===W.NAME?(s=new W,this.sections.set(W.NAME,s)):e===we.NAME?(s=new we,this.sections.set(we.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===pe.NAME?(s=new pe,this.sections.set(pe.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===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(ne.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<ne.SECTION_ORDER.length;t++){let s=ne.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Qi{gppVersion="1.1";supportedAPIs=[];eventQueue=new Nn(this);cmpStatus=at.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new _s;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=at.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new _s,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class qt{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 E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=p,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 wt=class extends Error{constructor(e){super(e),this.name="GVLError"}},Ji=class $t{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 $t.langSet.has(e)}forEach(e){$t.langSet.forEach(e)}get size(){return $t.langSet.size}},hs=class jt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Ji;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=jt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new jt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new wt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new jt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await qt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await qt.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 qt.fetch(s))}catch(i){throw new wt("unable to load language: "+i.message)}}}else throw new wt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Qi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new 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(ne.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(ne.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(ne.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(ne.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(ne.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(ne.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(ne.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return hs.fromVendorList(e)}async getGvlFromUrl(e){return hs.fromUrl(e)}}const Xi="en";var Zi=Object.defineProperty,er=(n,e,t)=>e in n?Zi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xt=(n,e,t)=>er(n,typeof e!="symbol"?e+"":e,t);class tr{constructor(e,t,s){Xt(this,"consentPreference"),Xt(this,"notice"),Xt(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 sr=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(sr||{}),nr=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(nr||{}),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||{}),ht=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(ht||{}),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||{}),ir=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(ir||{}),rr=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(rr||{}),or=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(or||{}),ar=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(ar||{}),lr=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(lr||{}),Ue=(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))(Ue||{}),cr=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(cr||{}),dr=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(dr||{}),Er=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(Er||{});const ur=(n,e)=>!!Object.keys(e).includes(n.notice_key),Zt=n=>!n||n===De.OPT_OUT?!1:n===De.OPT_IN?!0:n===De.ACKNOWLEDGE,Rt=(n,e)=>n?e===Dt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,Sr=n=>typeof n=="string"?Zt(n):n,pr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var _r=Object.defineProperty,hr=Object.defineProperties,gr=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Os=(n,e,t)=>e in n?_r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vt=(n,e)=>{for(var t in e||(e={}))Tr.call(e,t)&&Os(n,t,e[t]);if(Ts)for(var t of Ts(e))Or.call(e,t)&&Os(n,t,e[t]);return n},Ir=(n,e)=>hr(n,gr(e));const ut=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Is=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),Nr=n=>{if(n){if(n.location&&pr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Ns=n=>n.fidesConsentOverride===Ue.ACCEPT||n.fidesConsentOverride===Ue.REJECT,Ar=(n,e,t,s)=>{var i,r,o,a,l,d;return s!=null&&s.fidesDisableBanner||!ut(n)?!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===Ue.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(u=>ur(u,t))):!0},fr=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})}},Cr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=mt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Vt({},n);return s===mt.INCLUDE?e.forEach(r=>{i[r]=t===ht.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},Pr=({consent:n,flagType:e=ht.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==ht.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]=Rt(o,a)}}),s):Vt({},n)},As=(n,e,t=[],s,i)=>{var r,o,a;const l=Vt({},n),d=(r=window.Fides)==null?void 0:r.options,u=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:mt.OMIT,p=(a=s??d?.fidesConsentFlagType)!=null?a:ht.BOOLEAN,E={};Object.assign(E,Cr({consent:{},nonApplicableNotices:e??[],flagType:p,mode:u}));const I=t.reduce((T,f)=>Ir(Vt({},T),{[f.notice_key]:f.consent_mechanism}),{});return Object.assign(E,Pr({consent:l,consentMechanisms:I,flagType:p})),E};var es=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 es=="object"&&es;(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+/",d=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(d,"");var f=T.length;f%4==0&&(T=T.replace(/==?$/,""),f=T.length),(f%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var R=0,m,j,Z="",ee=-1;++ee<f;)j=l.indexOf(T.charAt(ee)),m=R%4?m*64+j:j,R++%4&&(Z+=String.fromCharCode(255&m>>(-2*R&6)));return Z},p=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var f=T.length%3,R="",m=-1,j,Z,ee,Oe,Je=T.length-f;++m<Je;)j=T.charCodeAt(m)<<16,Z=T.charCodeAt(++m)<<8,ee=T.charCodeAt(++m),Oe=j+Z+ee,R+=l.charAt(Oe>>18&63)+l.charAt(Oe>>12&63)+l.charAt(Oe>>6&63)+l.charAt(Oe&63);return f==2?(j=T.charCodeAt(m)<<8,Z=T.charCodeAt(++m),Oe=j+Z,R+=l.charAt(Oe>>10)+l.charAt(Oe>>4&63)+l.charAt(Oe<<2&63)+"="):f==1&&(Oe=T.charCodeAt(m),R+=l.charAt(Oe>>2)+l.charAt(Oe<<4&63)+"=="),R},E={encode:p,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var I in E)E.hasOwnProperty(I)&&(s[I]=E[I]);else t.base64=E})(es)}(Mt,Mt.exports);var fs=Mt.exports;/*! js-cookie v3.0.5 | MIT */function bt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var wr={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 ts(n,e){function t(i,r,o){if(!(typeof document>"u")){o=bt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),d=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=n.read(d,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",bt({},r,{expires:-1}))},withAttributes:function(i){return ts(this.converter,bt({},this.attributes,i))},withConverter:function(i){return ts(bt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var Dr=ts(wr,{path:"/"});let vt;const mr=new Uint8Array(16);function Rr(){if(!vt&&(vt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vt(mr)}const Ce=[];for(let n=0;n<256;++n)Ce.push((n+256).toString(16).slice(1));function Vr(n,e=0){return Ce[n[e+0]]+Ce[n[e+1]]+Ce[n[e+2]]+Ce[n[e+3]]+"-"+Ce[n[e+4]]+Ce[n[e+5]]+"-"+Ce[n[e+6]]+Ce[n[e+7]]+"-"+Ce[n[e+8]]+Ce[n[e+9]]+"-"+Ce[n[e+10]]+Ce[n[e+11]]+Ce[n[e+12]]+Ce[n[e+13]]+Ce[n[e+14]]+Ce[n[e+15]]}const Mr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Cs={randomUUID:Mr};function Ps(n,e,t){if(Cs.randomUUID&&!e&&!n)return Cs.randomUUID();n=n||{};const s=n.random||(n.rng||Rr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return Vr(s)}var br=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(br||{}),ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(ss||{});const ns=407,Lt=",",vr=[{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"}],Lr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];vr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),ss.CONSENT.toString(),ss.LEGITIMATE_INTERESTS.toString();const Gr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var yr=Object.defineProperty,Ur=Object.defineProperties,xr=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable,Ds=(n,e,t)=>e in n?yr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hr=(n,e)=>{for(var t in e||(e={}))Fr.call(e,t)&&Ds(n,t,e[t]);if(ws)for(var t of ws(e))Br.call(e,t)&&Ds(n,t,e[t]);return n},kr=(n,e)=>Ur(n,xr(e)),Kr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},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",$r=365,Gt=Dr.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),jr=()=>Ps();jr();const Yr=n=>Gt.get(n),zr=()=>{const n=Yr(ms);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(fs.decode(n))}catch{return}}},Rs=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=fs.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),Gt.set(ms,s,{path:"/",domain:r,expires:$r})){const a=zr();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},Wr=n=>{const e={};return Lr.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,Zt(r.preference)]))}),e},Qr=(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}`})}})},Jr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,Zt(s)]));return Object.fromEntries(e)},qr=(n,e)=>Kr(void 0,null,function*(){return kr(Hr({},n),{consent:Jr(e)})});var Xr=(n=>(n.GVL="gvl",n.AC="gacp",n))(Xr||{});const Ye=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!=null&&e.vendors))return;const{source:t,id:s}=Ye(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Zr=n=>Ye(n).source==="gacp",eo=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>yt(t,n.gvl)).map(t=>+Ye(t).id)},to=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>yt(t,n.gvl)).map(t=>+Ye(t).id)},Vs=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((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},so=1,tt={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:pe.NAME,id:pe.ID},us_mt:{name:de.NAME,id:de.ID},us_ne:{name:_e.NAME,id:_e.ID},us_nh:{name:he.NAME,id:he.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}};function St(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function no(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 io(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}return t.translations.find(i=>St(i.language,e))||t.translations[0]||null}function ro(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}return t.translations.find(i=>St(i.language,e))||t.translations[0]||null}var oo=Object.defineProperty,ao=Object.defineProperties,lo=Object.getOwnPropertyDescriptors,bs=Object.getOwnPropertySymbols,co=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,vs=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e)=>{for(var t in e||(e={}))co.call(e,t)&&vs(n,t,e[t]);if(bs)for(var t of bs(e))Eo.call(e,t)&&vs(n,t,e[t]);return n},Gs=(n,e)=>ao(n,lo(e)),uo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())}),So=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(So||{});const po={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},_o="Fides.js",ho=(n,e,t,s,i)=>uo(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({},po),{body:JSON.stringify(Gs(Ls({},e),{source:_o}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var go=Object.defineProperty,To=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,Io=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,Us=(n,e,t)=>e in n?go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ut=(n,e)=>{for(var t in e||(e={}))Io.call(e,t)&&Us(n,t,e[t]);if(ys)for(var t of ys(e))No.call(e,t)&&Us(n,t,e[t]);return n},xs=(n,e)=>To(n,Oo(e)),xt=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(xt||{}),Ao=(n=>(n.TOGGLE="toggle",n.BUTTON="button",n.LINK="link",n))(Ao||{});const Fs=(n,e,t)=>{var s,i,r,o,a,l,d,u;const p=e?Ut({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const E=Ut({consentMethod:p?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(E.trigger=xs(Ut({},E.trigger),{origin:"fides"}));const I=(i=performance?.mark)==null?void 0:i.call(performance,n),T=I?.startTime,f=p;f&&p!=null&&p.consent&&(f.consent=As(p.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));const R=new CustomEvent(n,{detail:xs(Ut({},f),{debug:!!((u=(d=window.Fides)==null?void 0:d.options)!=null&&u.debug),extraDetails:E,timestamp:T}),bubbles:!0});window.dispatchEvent(R)}};var fo=Object.defineProperty,Co=Object.defineProperties,Po=Object.getOwnPropertyDescriptors,Bs=Object.getOwnPropertySymbols,wo=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable,Hs=(n,e,t)=>e in n?fo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,He=(n,e)=>{for(var t in e||(e={}))wo.call(e,t)&&Hs(n,t,e[t]);if(Bs)for(var t of Bs(e))Do.call(e,t)&&Hs(n,t,e[t]);return n},Ft=(n,e)=>Co(n,Po(e)),is=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const mo=[Ue.SCRIPT,Ue.GPC,Ue.OT_MIGRATION];function Ro(n,e,t,s,i,r,o,a,l){return is(this,null,function*(){const d=(r||[]).map(p=>({preference:p.consentPreference,privacy_notice_history_id:p.noticeHistoryId||""})),u=He({browser_identity:e.identity,preferences:d,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield ho(s,u,n,e,t)})}const Vo=n=>is(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:d,tcf:u,updateCookie:p}){var E,I,T,f,R;if(!p&&e&&(p=ee=>qr(ee,e)),!p&&!e)throw new Error("updateCookie is required");const m=Ft(He({},l?.trigger),{origin:((E=l?.trigger)==null?void 0:E.origin)||(mo.includes(i)?xt.EXTERNAL:xt.FIDES)}),j=yield p(a);Object.assign(a,j),Object.assign(a.fides_meta,{consentMethod:i}),Fs("FidesUpdating",a,Ft(He({},l),{trigger:m}));const Z=As(a.consent,(T=(I=window.Fides)==null?void 0:I.experience)==null?void 0:T.non_applicable_privacy_notices,(R=(f=window.Fides)==null?void 0:f.experience)==null?void 0:R.privacy_notices);if(window.Fides.consent=Z,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Rs(Ft(He({},a),{consent:Z}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Ro(r,a,s,i,t,e,u,o,d)}catch{}e&&e.filter(ee=>ee.consentPreference===De.OPT_OUT).forEach(ee=>{var Oe,Je;(Oe=ee.notice)!=null&&Oe.cookies&&Qr(ee.notice.cookies,(Je=s.experience_config)==null?void 0:Je.auto_subdomain_cookie_deletion)}),Fs("FidesUpdated",a,Ft(He({},l),{trigger:m}))}),ks=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(u=>u===r);if(a&&!o&&s!==Ue.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(u=>u.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const d=l?.consent_mechanism===Dt.NOTICE_ONLY;return d&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==Ue.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!d&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),Ks=(n,e,t)=>is(void 0,null,function*(){var s;const{experience:i,cookie:r,config:o,locale:a}=n;if(!i)throw new Error("Experience must be initialized before updating consent");if(!o)throw new Error("Config is not initialized");if(!r)throw new Error("Cookie is not initialized");if(!(e!=null&&e.noticeConsent)&&!(e!=null&&e.fidesString)&&!(e!=null&&e.tcf))throw new Error("Either consent object or fidesString must be provided");if(e!=null&&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:l,fidesString:d,validation:u=et.THROW,consentMethod:p=Ue.SCRIPT,eventExtraDetails:E={trigger:{origin:xt.EXTERNAL}},tcf:I,updateCookie:T}=e,{experience_config:f,privacy_notices:R,non_applicable_privacy_notices:m}=i,j=no(i)||Xi,Z=fe=>{if(u===et.THROW)throw new Error(fe);u===et.WARN&&console.warn(fe)};let ee=r.consent||{};if(d)try{const fe=Vs(d);if(fe.nc){const qe=fr(fe.nc);ee=He(He({},r.consent),qe);const Xe=ks(R||[],m||[],ee,p);Xe&&Z(Xe.message)}}catch(fe){const qe=fe instanceof Error?fe.message:String(fe);Z(`Invalid fidesString provided: ${qe}`)}else if(l){const fe=ks(R||[],m||[],l,p);fe&&Z(fe.message),ee=He(He({},r.consent),l)}const Oe=[];Object.entries(ee).forEach(([fe,qe])=>{const Xe=R?.find(At=>At.notice_key===fe);if(Xe){const At=io(a,j,Xe),as=At?.privacy_notice_history_id;let Yt;if(typeof qe=="boolean"?Yt=Rt(qe,Xe.consent_mechanism):Yt=qe,as){const Sn=new tr(Xe,Yt,as);Oe.push(Sn)}}});let Je;if((s=f?.translations)!=null&&s.length){const fe=ro(a,j,f);Je=fe?.privacy_experience_config_history_id}const un=Nr(o.geolocation);return t||(t=Ps()),Vo({consentPreferencesToSave:Oe,privacyExperienceConfigHistoryId:Je,experience:i,consentMethod:p,options:o.options,userLocationString:un,cookie:r,eventExtraDetails:E,servedNoticeHistoryId:t,tcf:I,updateCookie:T})});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class ke extends Error{constructor(e){super(e),this.name="EncodingError"}}class pt 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 rs{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 ke("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 ze("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 $e{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 $e.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if($e.langSet.has(e))return e;if($e.langSet.has(t))return t;const s=t+"-"+t;if($e.langSet.has(s))return s;for(const i of $e.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){$e.langSet.forEach(e)}get size(){return $e.langSet.size}}class S{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 Tt{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 ve;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(ve||(ve={}));class Fe extends Tt{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 Fe;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}${Fe.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===ve.NOT_ALLOWED||this.restrictionType===ve.REQUIRE_CONSENT||this.restrictionType===ve.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class $s extends Tt{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===ve.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case ve.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case ve.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(Fe.unHash(i)):t.push(Fe.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Fe.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=Fe.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 js;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(js||(js={}));var J;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(J||(J={}));class Ys{static ID_TO_KEY=[J.CORE,J.VENDORS_DISCLOSED,J.VENDORS_ALLOWED,J.PUBLISHER_TC];static KEY_TO_ID={[J.CORE]:0,[J.VENDORS_DISCLOSED]:1,[J.VENDORS_ALLOWED]:2,[J.PUBLISHER_TC]:3}}class me extends Tt{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[S.cmpId]=12;static[S.cmpVersion]=12;static[S.consentLanguage]=12;static[S.consentScreen]=6;static[S.created]=36;static[S.isServiceSpecific]=1;static[S.lastUpdated]=36;static[S.policyVersion]=6;static[S.publisherCountryCode]=12;static[S.publisherLegitimateInterests]=24;static[S.publisherConsents]=24;static[S.purposeConsents]=24;static[S.purposeLegitimateInterests]=24;static[S.purposeOneTreatment]=1;static[S.specialFeatureOptins]=12;static[S.useNonStandardTexts]=1;static[S.vendorListVersion]=12;static[S.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 w{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 ke(`${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 ze("invalid bit length");return parseInt(e,2)}}class zs{static encode(e,t){return w.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(w.decode(e,t)*100),s}}class We{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 ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)xe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Ws{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new ke(`invalid language code: ${e}`);if(t%2===1)throw new ke(`numBits must be even, ${t} is not valid`);t=t/2;const o=w.encode(i,t),a=w.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=w.decode(e.slice(0,r),r)+65,a=w.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class Mo{static encode(e){let t=w.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+=w.encode(i.purposeId,g.purposeId),t+=w.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,d="";for(let u=0;u<o;u++){const p=r[u];if(l===0&&(a++,l=p),u===o-1||r[u+1]>s(p,r[o-1])){const E=p!==l;d+=xe.encode(E),d+=w.encode(l,g.vendorId),E&&(d+=w.encode(p,g.vendorId)),l=0}}t+=w.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new $s,i=w.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=w.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=w.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Fe(o,a),d=w.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<d;u++){const p=xe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const E=w.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,p){const I=w.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,I<E)throw new ze(`Invalid RangeEntry: endVendorId ${I} is less than ${E}`);for(let T=E;T<=I;T++)s.add(T,l)}else s.add(E,l)}}return s.bitLength=t,s}}var Ot;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Ot||(Ot={}));class It{static encode(e){const t=[];let s=[],i=w.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((p,E)=>{r+=xe.encode(p),o=e.maxId>d&&u<l,o&&p&&(e.has(E+1)?s.length===0&&(s.push(E),u+=g.singleOrRange,u+=g.vendorId):(s.push(E),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=w.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=w.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 ze("Unable to decode default consent=1");i++}const a=w.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const d=xe.decode(e.charAt(i));i+=g.singleOrRange;const u=w.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const p=w.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let E=u;E<=p;E++)s.set(E)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=w.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=xe.encode(!r),s+=w.encode(i[0],g.vendorId),r||(s+=w.encode(i[1],g.vendorId))}),s}}function Qs(){return{[S.version]:w,[S.created]:zs,[S.lastUpdated]:zs,[S.cmpId]:w,[S.cmpVersion]:w,[S.consentScreen]:w,[S.consentLanguage]:Ws,[S.vendorListVersion]:w,[S.policyVersion]:w,[S.isServiceSpecific]:xe,[S.useNonStandardTexts]:xe,[S.specialFeatureOptins]:We,[S.purposeConsents]:We,[S.purposeLegitimateInterests]:We,[S.purposeOneTreatment]:xe,[S.publisherCountryCode]:Ws,[S.vendorConsents]:It,[S.vendorLegitimateInterests]:It,[S.publisherRestrictions]:Mo,segmentType:w,[S.vendorsDisclosed]:It,[S.vendorsAllowed]:It,[S.publisherConsents]:We,[S.publisherLegitimateInterests]:We,[S.numCustomPurposes]:w,[S.publisherCustomConsents]:We,[S.publisherCustomLegitimateInterests]:We}}class bo{1={[J.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.purposeConsents,S.vendorConsents]};2={[J.CORE]:[S.version,S.created,S.lastUpdated,S.cmpId,S.cmpVersion,S.consentScreen,S.consentLanguage,S.vendorListVersion,S.policyVersion,S.isServiceSpecific,S.useNonStandardTexts,S.specialFeatureOptins,S.purposeConsents,S.purposeLegitimateInterests,S.purposeOneTreatment,S.publisherCountryCode,S.vendorConsents,S.vendorLegitimateInterests,S.publisherRestrictions],[J.PUBLISHER_TC]:[S.publisherConsents,S.publisherLegitimateInterests,S.numCustomPurposes,S.publisherCustomConsents,S.publisherCustomLegitimateInterests],[J.VENDORS_ALLOWED]:[S.vendorsAllowed],[J.VENDORS_DISCLOSED]:[S.vendorsDisclosed]}}class vo{1=[J.CORE];2=[J.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(J.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[S.supportOOB]===!0)&&this[2].push(J.VENDORS_DISCLOSED),s&&(e[S.supportOOB]&&e[S.vendorsAllowed].size>0&&this[2].push(J.VENDORS_ALLOWED),this[2].push(J.PUBLISHER_TC))}}}class Js{static fieldSequence=new bo;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new ke(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==J.CORE&&(i=w.encode(Ys.KEY_TO_ID[t],g.segmentType));const r=Qs();return s.forEach(o=>{const a=e[o],l=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[S.numCustomPurposes]));try{i+=l.encode(a,d)}catch(u){throw new ke(`Error encoding ${t}->${o}: ${u.message}`)}}),rs.encode(i)}static decode(e,t,s){const i=rs.decode(e);let r=0;s===J.CORE&&(t.version=w.decode(i.substr(r,g[S.version]),g[S.version])),s!==J.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Qs();return o.forEach(l=>{const d=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[S.numCustomPurposes])),u!==0){const p=i.substr(r,u);if(d===It?t[l]=d.decode(p,t.version):t[l]=d.decode(p,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new ze(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Lo{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 d=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let p=0,E=d.length;p<E&&!u;p++)u=d[p].restrictionType===ve.REQUIRE_CONSENT&&r==="purposes"||d[p].restrictionType===ve.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 ke("Unable to encode TCModel without a GVL");if(!s.isReady)throw new ke("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 ke(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Go{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 E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},p=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=p,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 A extends Tt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new $e;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new pt("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=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new pt("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new pt("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.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 Go.fetch(e))}catch(t){throw new pt(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]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.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]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new pt("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new pt("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&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.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 A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class qs extends Tt{static consentLanguages=A.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 $s;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(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 yo{static encode(e,t){let s="",i;return e=Lo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new vo(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Js.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=rs.decode(o.charAt(0)).substr(0,g.segmentType),d=Ys.ID_TO_KEY[w.decode(l,g.segmentType).toString()];Js.decode(o,t,d)}return t}}var Qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var Bt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Bt||(Bt={}));var Ht;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ht||(Ht={}));var Xs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Xs||(Xs={}));class kt{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class Kt extends kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new en(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class Uo{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 Ae{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Uo;static cmpStatus=Bt.LOADING;static disabled=!1;static displayStatus=Ht.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Bt.LOADING,this.disabled=!1,this.displayStatus=Ht.HIDDEN,this.eventQueue.clear()}}class Zs{cmpId=Ae.cmpId;cmpVersion=Ae.cmpVersion;gdprApplies=Ae.gdprApplies;tcfPolicyVersion=Ae.tcfPolicyVersion}class en extends Zs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Ae.eventStatus,this.cmpStatus=Ae.cmpStatus,this.listenerId=t,Ae.gdprApplies){const s=Ae.tcModel;this.tcString=Ae.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 xo extends en{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),d=t[l].substr(0,i),u=t[l].substr(i+1);t[l]=d+a+u})}}return t}}class Fo extends Zs{cmpLoaded=!0;cmpStatus=Ae.cmpStatus;displayStatus=Ae.displayStatus;apiVersion=String(Ae.apiVersion);gvlVersion;constructor(){super(),Ae.tcModel&&Ae.tcModel.vendorListVersion&&(this.gvlVersion=+Ae.tcModel.vendorListVersion)}}class Bo extends kt{respond(){this.invokeCallback(new Fo)}}class Ho extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new xo(this.param))}}class ko extends kt{respond(){const e=Ae.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Ko extends Kt{respond(){this.listenerId=Ae.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class $o extends kt{respond(){this.invokeCallback(Ae.eventQueue.remove(this.param))}}class ma{static[Qe.PING]=Bo;static[Qe.GET_TC_DATA]=Kt;static[Qe.GET_IN_APP_TC_DATA]=Ho;static[Qe.GET_VENDOR_LIST]=ko;static[Qe.ADD_EVENT_LISTENER]=Ko;static[Qe.REMOVE_EVENT_LISTENER]=$o}const jo=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 Yo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const zo=1,tn=[1,3,4,5,6],Wo=2,Qo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Zr).map(o=>Ye(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Wo}~${s}~dv.${i}`},Jo=n=>Yo(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new qs(new A(e.gvl));yield l.gvl.readyPromise,l.cmpId=ns,l.cmpVersion=zo,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?to(e):eo(e);if(l.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var I,T,f;if(yt(E,e.gvl)){const{id:R}=Ye(E);if(l.vendorConsents.set(+R),!((I=e.tcf_publisher_restrictions)!=null&&I.length)){const m=(T=e.gvl)==null?void 0:T.vendors[R];m&&!((f=m?.purposes)!=null&&f.length)&&m.flexiblePurposes.forEach(j=>{const Z=new Fe;Z.purposeId=j,Z.restrictionType=ve.REQUIRE_CONSENT,l.publisherRestrictions.add(+R,Z)})}}}),t.vendorsLegint.forEach(E=>{var I,T;if(e.minimal_tcf)(I=e.tcf_vendor_legitimate_interest_ids)==null||I.forEach(f=>{const{id:R}=Ye(f);l.vendorLegitimateInterests.set(+R)});else if(yt(E,e.gvl)){const f=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(j=>j.id===E)[0],R=f?.purpose_legitimate_interests;let m=!1;if(R&&(R.map(j=>j.id).filter(j=>tn.includes(j)).length&&(m=!0),!m)){const{id:j}=Ye(E);l.vendorLegitimateInterests.set(+j)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(E=>{var I,T;(I=E.specialPurposes)!=null&&I.length&&!((T=E.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(E.id)}),t.purposesConsent.forEach(E=>{l.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const I=+E;tn.includes(I)||l.purposeLegitimateInterests.set(I)}),t.specialFeatures.forEach(E=>{l.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(I=>{const T=new Fe;T.purposeId=E.purpose_id,T.restrictionType=E.restriction_type,l.publisherRestrictions.add(I,T)})}),a=yo.encode(l,{segments:[J.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),p=Qo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${Lt}${p}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var qo=Object.defineProperty,Xo=Object.defineProperties,Zo=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,ta=Object.prototype.propertyIsEnumerable,nn=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sa=(n,e)=>{for(var t in e||(e={}))ea.call(e,t)&&nn(n,t,e[t]);if(sn)for(var t of sn(e))ta.call(e,t)&&nn(n,t,e[t]);return n},na=(n,e)=>Xo(n,Zo(e)),ia=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const st=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Rt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],nt=n=>n!=null&&n.length?n.map(e=>{const t=Rt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],ra=({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:st({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:st({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:st({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:st({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:st({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:st({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:st({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},oa=({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:nt(e.purposesConsent),purpose_legitimate_interests_preferences:nt(e.purposesLegint),special_feature_preferences:nt(e.specialFeatures),vendor_consent_preferences:nt(s),vendor_legitimate_interests_preferences:nt(r),system_consent_preferences:nt(t),system_legitimate_interests_preferences:nt(i)}},aa=(n,e,t,s,i)=>ia(void 0,null,function*(){var r;const o=yield Jo({tcStringPreferences:t,experience:s}),a=na(sa({},n),{fides_string:o,tcf_consent:Wr(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=i),a});var Ve=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(Ve||{});const it="us",rn=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{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:s,cmpApiField:i})=>{const r=i===N.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},la=n=>n?.toLowerCase().startsWith("us"),os=({experienceRegion:n,usApproach:e})=>la(n)&&e===Ve.NATIONAL?it:n,on=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=os({experienceRegion:i,usApproach:o}),l=tt[a];return!l&&o===Ve.ALL&&(a=it,l=tt[a]),!l||a===it&&o===Ve.STATE?[]:(t.add(l),s.forEach(d=>{var u;const{gpp_field_mapping:p}=d,E=(u=p?.find(I=>I.region===a))==null?void 0:u.notice;E&&E.forEach(I=>{n.setFieldValue(l.name,I,1)})}),rn({cmpApi:n,sectionName:l.name,gppSettings:r}),Array.from(t))},an=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let l=os({experienceRegion:r,usApproach:a}),d=tt[l];if(!d&&a===Ve.ALL&&(l=it,d=tt[l]),!d||l===it&&a===Ve.STATE)return[];s.add(d);const{consent:u}=e;return Object.keys(u).forEach(p=>{var E;const I=i?.find(f=>f.notice_key===p),T=u[p];if(I){const{gpp_field_mapping:f}=I,R=(E=f?.find(m=>m.region===l))==null?void 0:E.mechanism;R&&R.forEach(m=>{let j=m.not_available;T===!1?j=m.opt_out:T&&(j=m.not_opt_out);let Z=+j;j.length>1&&(Z=j.split("").map(ee=>+ee)),n.setFieldValue(d.name,m.field,Z)})}}),rn({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)},ca=[1,3,4,5,6],da=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=os({experienceRegion:i,usApproach:o}),l=tt[a];return!l&&o===Ve.ALL&&(a=it,l=tt[a]),!l||a===it&&o===Ve.STATE||s.forEach(d=>{var u;const{notice_key:p,gpp_field_mapping:E}=d,I=(u=E?.find(T=>T.region===a))==null?void 0:u.mechanism;if(I){const T=I.some(f=>{const R=n.getFieldValue(l.name,f.field),m=Array.isArray(R)?R.join(""):String(R);return m===f.opt_out?!0:(f.not_opt_out,!1)});T!==void 0&&(t[p]=!T)}}),t},Ea=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=Gr,a=n.getSection(W.NAME);if(!a)return o;const l=a.PurposeConsents.map((E,I)=>E?(I+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,I)=>E?(I+1).toString():null).filter(E=>E!==null),u=a.VendorConsents.map(E=>`gvl.${E}`),p=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=l,o.purposesLegint=d.filter(E=>!ca.includes(parseInt(E,10))),o.vendorsConsent=u,o.vendorsLegint=p,o.specialFeatures=a.SpecialFeatureOptins.map((E,I)=>E?(I+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},ua=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Vs(n);if(!n||!t||!e)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(d=>St(d.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const o=i.privacy_notices.map(d=>({notice:d,bestTranslation:d.translations.find(u=>St(u.language,s))||null}));let a,l;if(r){const d=Ea({cmpApi:e,experience:i});l=i.minimal_tcf?oa({experience:i,enabledIds:d}):ra({experience:i,enabledIds:d}),a=p=>aa(p,l,d,i);const u={};o.forEach(p=>{p.notice.consent_mechanism!==Dt.NOTICE_ONLY?u[p.notice.notice_key]=d.purposesConsent.includes(p.notice.id):u[p.notice.notice_key]=!0}),Ks(window.Fides,{noticeConsent:u,tcf:l,updateCookie:a})}else{const d=da({cmpApi:e,experience:i});Ks(window.Fides,{noticeConsent:d})}},ln="__gppLocator",cn=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>cn(n),5)},Sa=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},pa=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,_a=()=>{const n=[],e=[];let t;const s=(r,o,a,l)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:at.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const u=t;e.push({id:u,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:u,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let u=!1;for(let p=0;p<e.length;p++)if(e[p].id===a){e.splice(p,1),u=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:u,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,l]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!pa(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(d,u)=>{const p={__gppReturn:{returnValue:d,success:u,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(p):p,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};Sa(ln)||(cn(ln),window.__gpp=s,window.addEventListener("message",i,!1))},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!=null&&t.enable_tcfeu_string))return!1;const s=jo(n);return s?(e.setFieldValueBySectionId(W.ID,"CmpId",ns),e.setSectionStringById(W.ID,s),!0):!1},ha=()=>{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(`${W.ID}:${W.NAME}`),(e.us_approach===Ve.NATIONAL||e.us_approach===Ve.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===Ve.STATE||e.us_approach===Ve.ALL)&&Object.values(tt).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},ga=()=>{_a();const n=new qi(ns,so);n.setCmpStatus(at.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=ha();if(n.setSupportedAPIs(o),!ut(s))return;const{fidesString:a}=r;if(a&&ua({fidesString:a,cmpApi:n}),!a&&(!Ar(s,e.detail,i,r)||!r.tcfEnabled&&Is(s.privacy_notices)&&!dn(i,e.detail.fides_string,s.privacy_notices))){const l=En(e,n);l&&n.setApplicableSections([W.ID]);const d=on({cmpApi:n,experience:s}),u=an({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(E=>E.id)),!l&&!d.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const p=Ms(n);window.Fides.fides_string=p}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&&Is(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=on({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([W.ID]),n.fireSectionChange("tcfeuv2")),ut(window.Fides.experience)){const t=an({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Ms(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,Rs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Me.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&ga()});
|