ethyca-fides 2.67.0rc0__py2.py3-none-any.whl → 2.67.0rc1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/METADATA +1 -1
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/RECORD +119 -118
- fides/_version.py +3 -3
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/ZIM71ZcqBBeTYHc-MN9_n/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-d9a488457898263b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6780-fc7d9ddb1a03e7b3.js → 6780-b42a27e72707936d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7725-539d3a906f627531.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/8735-40caf91800a3610c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-7085a401297c5520.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-4b5bff46158a19a3.js → _app-5c3a63bb1697f34c.js} +2 -2
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-a286affa43687eb5.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-92b0bd97d8e79340.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-ee3c0a103346fc06.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-8e346fb36e8034d2.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 +4 -4
- fides/ui-build/static/admin/lib/fides.js +4 -4
- 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/ui-build/static/admin/_next/static/GKmhMPa_1gMto8JZO8ENy/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5309-ce5702b9faeaff55.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8237-841439bef6682177.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-04a8c092fef1cd83.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-7caea7bb58c1f153.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-a9a70856f7be1542.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-1f0ea5c92ae9a2b4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-f53fe1f2cbebda7c.js +0 -1
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.67.0rc0.dist-info → ethyca_fides-2.67.0rc1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{GKmhMPa_1gMto8JZO8ENy → ZIM71ZcqBBeTYHc-MN9_n}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3450-ca4ba70da999f264.js → 3450-69f4e16978971bb8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4608-43acf39319177bee.js → 4608-f16f281f2d05d963.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6662-4392ba1e4c254ef7.js → 6662-a9e54ead3dc53644.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-9c4912fbce87c4df.js → 6954-ba98e778a5b45ebf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-d5b01abcb76792ce.js → data-catalog-7770a8dc34bd0fc0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-8446418c7ad28f77.js → new-c6614583b14dc9f2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-0f29b47402292070.js → datastore-connection-3bd77864da523d41.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-142abe3e3e3e5bf7.js → integrations-7f15cd8538cdc24d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-1b6b0d703cf59389.js → [id]-79f1576b1126975c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-ccd8d9e06cf2d278.js → privacy-requests-96a08c4431b5462c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-fd1a67892056830a.js → datamap-9d1840f8309b706e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/about/{alpha-8f98a4895e74725e.js → alpha-1066f0c202ef744c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-8155a35a62fdb5ae.js → about-37ba24a72a06862e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-bc4eb541906781e6.js → new-de8cb3739ab99c09.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
class jt{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 it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},Sn=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new jt("listenerRegistered",e,!0,new ft(this.cmpApiContext));this.invokeCallback(t)}},_n=class extends it{respond(){let e=new ft(this.cmpApiContext);this.invokeCallback(e)}};class hn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class pn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Le;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Le||(Le={}));let Tn=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new jt("listenerRemoved",e,t,new ft(this.cmpApiContext));this.invokeCallback(s)}},as=class{static[Le.ADD_EVENT_LISTENER]=Sn;static[Le.GET_FIELD]=hn;static[Le.GET_SECTION]=pn;static[Le.HAS_SECTION]=gn;static[Le.PING]=_n;static[Le.REMOVE_EVENT_LISTENER]=Tn};var rt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(rt||(rt={}));var ke;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(ke||(ke={}));var ls;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ls||(ls={}));var Re;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Re||(Re={}));class In{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=Le.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Le.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new as[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 as[e]!==void 0}}let On=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new jt(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 St 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 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 St("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 St("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Ie=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new 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 h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class Ot{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=D.decode(i),o=Ot.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 h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ot.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends Ot{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Ie("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class cs{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let S=E;S<=u;S++)t.push(S)}else{let l=e.indexOf("11",r),E=ot.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class Nn extends Error{constructor(e){super(e),this.name="ValidationError"}}class Me{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new Nn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Ve extends h{constructor(e){super(e),this.name="SubstringError"}}class ee{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Ve("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class fn extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return cs.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=cs.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(ee.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 ee.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends Me{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+this.bitStringLength)}catch(s){throw new Ve(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var xe;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(xe||(xe={}));const An=[xe.ID,xe.VERSION,xe.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new St("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 St(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Cn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){let e=new w;return e.put(xe.ID.toString(),new c(6,be.ID)),e.put(xe.VERSION.toString(),new c(6,be.VERSION)),e.put(xe.SECTION_IDS.toString(),new fn([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class be extends Z{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return be.ID}getName(){return be.NAME}getVersion(){return be.VERSION}initializeSegments(){let e=[];return e.push(new Cn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const Pn=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],wn=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],Dn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],mn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class st extends Ot{static instance=new st;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Wt extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(ee.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return ee.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Vn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class ds extends Me{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Ie(e)}}decode(e){try{let t=[],s=D.decode(ee.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=D.decode(ee.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(ee.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Wt([]).substring(e,i),E=lt.decode(l);i+=l.length,t.push(new Vn(o,a,E))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=ee.substring(e,t,t+12);let i=D.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=ee.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=ee.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let E=new Wt([]).substring(e,r);r+=E.length,s+=E}return s}catch(s){throw new Ve(s)}}}class $ extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+1)}catch(s){throw new Ve(s)}}}class Es{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class At extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Es.encode(this.value)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Es.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+36)}catch(s){throw new Ve(s)}}}class ct{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+=at.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(at.decode(e.substring(s,s+1)));return t}}class Ge extends Me{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class us{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=D.encode(63,6);else if(r>=65)s+=D.encode(e.charCodeAt(i)-65,6);else throw new Ie("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=D.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class Qt extends Me{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return us.encode(this.value,this.stringLength)}catch(e){throw new Ie(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+this.stringLength*6)}catch(s){throw new Ve(s)}}}class Xe extends Me{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),s=t.length,i=e;if(s<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Ie(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(ee.substring(e,t,t+16));return e.charAt(t+16)==="1"?ee.substring(e,t,t+17)+new Wt([]).substring(e,t+17):ee.substring(e,t,t+17+s)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Rn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,k.VERSION)),t.put(p.CREATED.toString(),new At(e)),t.put(p.LAST_UPDATED.toString(),new At(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new $(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new $(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new Qt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new Xe([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new Xe([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new ds(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class Ct extends Me{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Ie(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+this.getLength())}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class Mn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new Ct(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ct(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class vn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new Xe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class bn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new Xe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class k extends Z{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return k.ID}getName(){return k.NAME}getVersion(){return k.VERSION}initializeSegments(){let e=[];return e.push(new Rn),e.push(new Mn),e.push(new vn),e.push(new bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var I;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Ln=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],Gn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],yn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Un extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new At(e)),t.put(I.LAST_UPDATED.toString(),new At(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Xe([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Xe([])),t.put(I.PUB_RESTRICTIONS.toString(),new ds(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ge([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Ct(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ct(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class xn extends C{base64UrlEncoder=st.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Xe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends Z{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new Un),e.push(new Fn),e.push(new xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(I.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==I.CREATED&&e!==I.LAST_UPDATED){let s=new Date;super.setFieldValue(I.CREATED,s),super.setFieldValue(I.LAST_UPDATED,s)}}}class qt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Bn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class Hn{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Oe;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Oe||(Oe={}));const $n=[Oe.VERSION,Oe.NOTICE,Oe.OPT_OUT_SALE,Oe.LSPA_COVERED];class Kn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new Hn;return t.put(Oe.VERSION,new Bn(Pe.VERSION)),t.put(Oe.NOTICE,new qt("-",e)),t.put(Oe.OPT_OUT_SALE,new qt("-",e)),t.put(Oe.LSPA_COVERED,new qt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Oe.VERSION).getValue(),t+=e.get(Oe.NOTICE).getValue(),t+=e.get(Oe.OPT_OUT_SALE).getValue(),t+=e.get(Oe.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Oe.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Oe.NOTICE).setValue(e.charAt(1)),t.get(Oe.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Oe.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends Z{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new Kn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var N;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(N||(N={}));const zn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],kn=[N.GPC_SEGMENT_TYPE,N.GPC];class Ss{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+=D.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends Me{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Ss.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Ie(e)}}decode(e){try{this.value=Ss.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return ee.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Yn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,X.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(N.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(N.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 Yn),e.push(new jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const Wn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Qn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Wn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ne.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 qn),e.push(new Jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var J;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));const Xn=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];class Zn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(J.VERSION.toString(),new c(6,ie.VERSION)),i.put(J.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class 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 Zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ei=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],ti=[x.GPC_SEGMENT_TYPE,x.GPC];class si extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ei}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,re.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ni extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 si),e.push(new ni),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var K;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const ii=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];class ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ii}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(K.VERSION.toString(),new c(6,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.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(K.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class 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 ri),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const oi=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],ai=[B.GPC_SEGMENT_TYPE,B.GPC];class li extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,ae.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 li),e.push(new ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var 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 di=[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 Ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return di}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(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(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 h("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 Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var V;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const ui=[V.VERSION,V.SHARING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],Si=[V.GPC_SEGMENT_TYPE,V.GPC];class _i extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,ce.VERSION)),i.put(V.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class hi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 _i),e.push(new hi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const pi=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],gi=[R.GPC_SEGMENT_TYPE,R.GPC];class Ti extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,de.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(R.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 h("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 Ti),e.push(new Ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Oi=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Ni=[M.GPC_SEGMENT_TYPE,M.GPC];class fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,Ee.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 fi),e.push(new Ai),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Ci=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],Pi=[v.GPC_SEGMENT_TYPE,v.GPC];class wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ci}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,ue.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 wi),e.push(new Di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const mi=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Vi=[b.GPC_SEGMENT_TYPE,b.GPC];class Ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,Se.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 Ri),e.push(new Mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const vi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],bi=[L.GPC_SEGMENT_TYPE,L.GPC];class Li extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class _e extends Z{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 Li),e.push(new Gi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const yi=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Ui=[G.GPC_SEGMENT_TYPE,G.GPC];class Fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,he.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class he extends Z{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 xi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Bi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Hi=[y.GPC_SEGMENT_TYPE,y.GPC];class $i extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,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.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class pe extends Z{static ID=21;static VERSION=1;static NAME="usnj";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 $i),e.push(new Ki),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const zi=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],ki=[U.GPC_SEGMENT_TYPE,U.GPC];class Yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return zi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,ge.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("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 Yi),e.push(new ji),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class te{static SECTION_ID_NAME_MAP=new Map([[k.ID,k.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.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],[_e.ID,_e.NAME],[he.ID,he.NAME],[pe.ID,pe.NAME],[ge.ID,ge.NAME]]);static SECTION_ORDER=[k.NAME,Ce.NAME,Pe.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,_e.NAME,he.NAME,pe.NAME,ge.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===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===k.NAME?(i=new k,this.sections.set(k.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ge.NAME&&(i=new ge,this.sections.set(ge.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new St(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(te.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(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 be;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 s=te.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<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()),s.push(a.getId())}}let i=new be;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 be(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===k.ID){let l=new k(t[o+1]);s.set(k.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);s.set(X.NAME,l)}else if(r[o]===ne.ID){let l=new ne(t[o+1]);s.set(ne.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);s.set(he.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new k(e);return t.set(k.NAME,s),new be().setFieldValue(xe.SECTION_IDS,[2]),t.set(be.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(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 s=null;this.sections.has(e)?s=this.sections.get(e):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===k.NAME?(s=new k,this.sections.set(k.NAME,s)):e===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ge.NAME&&(s=new ge,this.sections.set(ge.NAME,s)),s&&(s.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 s=te.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Wi{gppVersion="1.1";supportedAPIs=[];eventQueue=new On(this);cmpStatus=rt.LOADING;cmpDisplayStatus=ke.HIDDEN;signalStatus=Re.NOT_READY;applicableSections=[];gppModel=new _s;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=ke.HIDDEN,this.signalStatus=Re.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new _s,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Jt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let Pt=class extends Error{constructor(e){super(e),this.name="GVLError"}},Qi=class zt{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 zt.langSet.has(e)}forEach(e){zt.langSet.forEach(e)}get size(){return zt.langSet.size}},hs=class kt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Qi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=kt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new kt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Pt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Pt("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 kt;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 Jt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Jt.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 Jt.fetch(s))}catch(i){throw new Pt("unable to load language: "+i.message)}}}else throw new Pt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Wi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new In(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(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,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(te.SECTION_ID_NAME_MAP.get(e),t,s)}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 hs.fromVendorList(e)}async getGvlFromUrl(e){return hs.fromUrl(e)}}const Ji="en";var Xi=Object.defineProperty,Zi=(n,e,t)=>e in n?Xi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xt=(n,e,t)=>Zi(n,typeof e!="symbol"?e+"":e,t);class er{constructor(e,t,s){Xt(this,"consentPreference"),Xt(this,"notice"),Xt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var ps;(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={}))})(ps||(ps={}));var wt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(wt||{}),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||{}),Dt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Dt||{}),_t=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(_t||{}),Ze=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(Ze||{}),ht=(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))(ht||{}),ye=(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))(ye||{});const tr=(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,mt=(n,e)=>n?e===wt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,sr=n=>typeof n=="string"?Zt(n):n,nr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var ir=Object.defineProperty,rr=Object.defineProperties,or=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Ts=(n,e,t)=>e in n?ir(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vt=(n,e)=>{for(var t in e||(e={}))ar.call(e,t)&&Ts(n,t,e[t]);if(gs)for(var t of gs(e))lr.call(e,t)&&Ts(n,t,e[t]);return n},cr=(n,e)=>rr(n,or(e));const dt=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)),dr=n=>{if(n){if(n.location&&nr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Os=n=>n.fidesConsentOverride===ye.ACCEPT||n.fidesConsentOverride===ye.REJECT,Er=(n,e,t,s)=>{var i,r,o,a,l,E;return s?.fidesDisableBanner||!dt(n)||s.fidesModalDisplay==="immediate"?!1:((i=n.experience_config)==null?void 0:i.component)===ht.TCF_OVERLAY&&e?s&&Os(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)===ht.MODAL||((a=n.experience_config)==null?void 0:a.component)===ht.HEADLESS||!((l=n?.privacy_notices)!=null&&l.length)?!1:t?s&&Os(s)?!1:e?.fides_meta.consentMethod===ye.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(S=>tr(S,t))):!0},ur=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},Sr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Dt.OMIT})=>{if(!e?.length)return n;const i=Vt({},n);return s===Dt.INCLUDE?e.forEach(r=>{i[r]=t===_t.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},_r=({consent:n,flagType:e=_t.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==_t.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]=mt(o,a)}}),s):Vt({},n)},Ns=(n,e,t=[],s,i)=>{var r,o,a;const l=Vt({},n),E=(r=window.Fides)==null?void 0:r.options,u=(o=E?.fidesConsentNonApplicableFlagMode)!=null?o:Dt.OMIT,S=(a=E?.fidesConsentFlagType)!=null?a:_t.BOOLEAN,d={};Object.assign(d,Sr({consent:{},nonApplicableNotices:e??[],flagType:S,mode:u}));const O=t.reduce((T,H)=>cr(Vt({},T),{[H.notice_key]:H.consent_mechanism}),{});return Object.assign(d,_r({consent:l,consentMechanisms:O,flagType:S})),d};var es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Rt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Rt.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+/",E=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(E,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var Y=0,j,se,W="",we=-1;++we<H;)se=l.indexOf(T.charAt(we)),j=Y%4?j*64+se:se,Y++%4&&(W+=String.fromCharCode(255&j>>(-2*Y&6)));return W},S=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,Y="",j=-1,se,W,we,Te,nt=T.length-H;++j<nt;)se=T.charCodeAt(j)<<16,W=T.charCodeAt(++j)<<8,we=T.charCodeAt(++j),Te=se+W+we,Y+=l.charAt(Te>>18&63)+l.charAt(Te>>12&63)+l.charAt(Te>>6&63)+l.charAt(Te&63);return H==2?(se=T.charCodeAt(j)<<8,W=T.charCodeAt(++j),Te=se+W,Y+=l.charAt(Te>>10)+l.charAt(Te>>4&63)+l.charAt(Te<<2&63)+"="):H==1&&(Te=T.charCodeAt(j),Y+=l.charAt(Te>>2)+l.charAt(Te<<4&63)+"=="),Y},d={encode:S,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(s[O]=d[O]);else t.base64=d})(es)}(Rt,Rt.exports);var fs=Rt.exports;/*! js-cookie v3.0.5 | MIT */function Mt(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 hr={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=Mt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),E=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=n.read(E,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Mt({},r,{expires:-1}))},withAttributes:function(i){return ts(this.converter,Mt({},this.attributes,i))},withConverter:function(i){return ts(Mt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var pr=ts(hr,{path:"/"});let vt;const gr=new Uint8Array(16);function Tr(){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(gr)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function Ir(n,e=0){return Ae[n[e+0]]+Ae[n[e+1]]+Ae[n[e+2]]+Ae[n[e+3]]+"-"+Ae[n[e+4]]+Ae[n[e+5]]+"-"+Ae[n[e+6]]+Ae[n[e+7]]+"-"+Ae[n[e+8]]+Ae[n[e+9]]+"-"+Ae[n[e+10]]+Ae[n[e+11]]+Ae[n[e+12]]+Ae[n[e+13]]+Ae[n[e+14]]+Ae[n[e+15]]}const Or=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var As={randomUUID:Or};function Cs(n,e,t){if(As.randomUUID&&!n)return As.randomUUID();n=n||{};const s=n.random||(n.rng||Tr)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ir(s)}var ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(ss||{});const ns=407,bt=",",Nr=[{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"}],fr=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Nr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),ss.CONSENT.toString(),ss.LEGITIMATE_INTERESTS.toString();const Ar={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Cr=Object.defineProperty,Pr=Object.defineProperties,wr=Object.getOwnPropertyDescriptors,Ps=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,ws=(n,e,t)=>e in n?Cr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vr=(n,e)=>{for(var t in e||(e={}))Dr.call(e,t)&&ws(n,t,e[t]);if(Ps)for(var t of Ps(e))mr.call(e,t)&&ws(n,t,e[t]);return n},Rr=(n,e)=>Pr(n,wr(e)),Mr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ds="fides_consent",vr=365,Lt=pr.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),br=()=>Cs();br();const Lr=n=>Lt.get(n),Gr=()=>{const n=Lr(Ds);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(fs.decode(n))}catch{return}}},ms=(n,e=!1)=>{if(typeof document>"u")return;const s=new Date().toISOString();n.fides_meta.updatedAt=s;let i=JSON.stringify(n);e&&(i=fs.encode(i));const r=window.location.hostname.split(".");let o="";for(let a=1;a<=r.length;a+=1)if(o=r.slice(-a).join("."),Lt.set(Ds,i,{path:"/",domain:o,expires:vr})){const E=Gr();if(E&&E.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},yr=n=>{const e={};return fr.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},Ur=(n,e=!0)=>{n.forEach(t=>{var s;if(Lt.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;Lt.remove(t.name,{domain:`.${i}`})}})},Fr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,Zt(s)]));return Object.fromEntries(e)},xr=(n,e)=>Mr(void 0,null,function*(){return Rr(Vr({},n),{consent:Fr(e)})}),Ye=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Gt=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=Ye(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Br=n=>Ye(n).source==="gacp",Hr=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>Gt(s,n.gvl)).map(s=>+Ye(s).id)},$r=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>Gt(i,n.gvl)).map(i=>+Ye(i).id)},Vs=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(bt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Rs=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(bt))||[]).concat(s);return s.map((o,a)=>a<2?`${i[a]},`:a===2?t:a===3&&i[3]?`,${i[3]}`:o).join("")},Kr=1,yt={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:_e.NAME,id:_e.ID},us_nh:{name:he.NAME,id:he.ID},us_nj:{name:pe.NAME,id:pe.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}};var Be=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(Be||{});function Et(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function zr(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 kr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>Et(r.language,n));if(i)return i}const s=t.translations.find(i=>Et(i.language,e));return s||t.translations[0]||null}function Yr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>Et(r.language,n));if(i)return i}const s=t.translations.find(i=>Et(i.language,e));return s||t.translations[0]||null}var jr=Object.defineProperty,Wr=Object.defineProperties,Qr=Object.getOwnPropertyDescriptors,Ms=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,vs=(n,e,t)=>e in n?jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e)=>{for(var t in e||(e={}))qr.call(e,t)&&vs(n,t,e[t]);if(Ms)for(var t of Ms(e))Jr.call(e,t)&&vs(n,t,e[t]);return n},Ls=(n,e)=>Wr(n,Qr(e)),Xr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Zr={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},eo="Fides.js",to=(n,e,t,s,i)=>Xr(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=Ls(bs({},Zr),{body:JSON.stringify(Ls(bs({},e),{source:eo}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var so=Object.defineProperty,no=Object.defineProperties,io=Object.getOwnPropertyDescriptors,Gs=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,oo=Object.prototype.propertyIsEnumerable,ys=(n,e,t)=>e in n?so(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pt=(n,e)=>{for(var t in e||(e={}))ro.call(e,t)&&ys(n,t,e[t]);if(Gs)for(var t of Gs(e))oo.call(e,t)&&ys(n,t,e[t]);return n},ao=(n,e)=>no(n,io(e)),Ut=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(Ut||{});const Us=(n,e,t)=>{var s,i,r,o,a,l,E,u;const S=e?pt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=pt({consentMethod:S?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(d.trigger=pt(pt({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,n),T=O?.startTime,H=S;H&&S?.consent&&(H.consent=Ns(S.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices));const Y=new CustomEvent(n,{detail:ao(pt({},H),{debug:!!((u=(E=window.Fides)==null?void 0:E.options)!=null&&u.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent(Y)}};var lo=Object.defineProperty,co=(n,e,t)=>e in n?lo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Eo=(n,e,t)=>co(n,e+"",t);class uo{constructor(){Eo(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=Cs()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const So=new uo;var _o=Object.defineProperty,ho=Object.defineProperties,po=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,To=Object.prototype.propertyIsEnumerable,xs=(n,e,t)=>e in n?_o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,He=(n,e)=>{for(var t in e||(e={}))go.call(e,t)&&xs(n,t,e[t]);if(Fs)for(var t of Fs(e))To.call(e,t)&&xs(n,t,e[t]);return n},Ft=(n,e)=>ho(n,po(e)),is=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Io=[ye.SCRIPT,ye.GPC,ye.OT_MIGRATION];function Oo(n,e,t,s,i,r,o,a,l){return is(this,null,function*(){const E=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),u=He({browser_identity:e.identity,preferences:E,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield to(s,u,n,e,t)})}const No=n=>is(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:E,tcf:u,updateCookie:S}){var d,O,T,H,Y;if(!S&&e&&(S=we=>xr(we,e)),!S&&!e)throw new Error("updateCookie is required");const j=Ft(He({},l?.trigger),{origin:((d=l?.trigger)==null?void 0:d.origin)||(Io.includes(i)?Ut.EXTERNAL:Ut.FIDES)}),se=yield S(a);Object.assign(a,se),Object.assign(a.fides_meta,{consentMethod:i}),Us("FidesUpdating",a,Ft(He({},l),{trigger:j}));const W=Ns(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,(Y=(H=window.Fides)==null?void 0:H.experience)==null?void 0:Y.privacy_notices);if(window.Fides.consent=W,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,ms(Ft(He({},a),{consent:W}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield Oo(r,a,s,i,t,e,u,o,E)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Te,nt;(Te=we.notice)!=null&&Te.cookies&&Ur(we.notice.cookies,(nt=s.experience_config)==null?void 0:nt.auto_subdomain_cookie_deletion)}),Us("FidesUpdated",a,Ft(He({},l),{trigger:j}))}),Bs=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==ye.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const u=l?.consent_mechanism===wt.NOTICE_ONLY;return u&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==ye.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!u&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),Hs=(n,e)=>is(void 0,null,function*(){var t;const{experience:s,cookie:i,config:r,locale:o}=n;if(!s)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(Ze).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(Ze).join(", ")} (default is ${Ze.THROW})`);const{noticeConsent:a,fidesString:l,validation:E=Ze.THROW,consentMethod:u=ye.SCRIPT,eventExtraDetails:S={trigger:{origin:Ut.EXTERNAL}},tcf:d,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:Y}=s,j=zr(s)||Ji,se=fe=>{if(E===Ze.THROW)throw new Error(fe);E===Ze.WARN&&console.warn(fe)};let W=i.consent||{};if(l)try{const fe=Vs(l);if(fe.nc){const qe=ur(fe.nc);W=He(He({},i.consent),qe);const Je=Bs(H||[],Y||[],W,u);Je&&se(Je.message)}}catch(fe){const qe=fe instanceof Error?fe.message:String(fe);se(`Invalid fidesString provided: ${qe}`)}else if(a){const fe=Bs(H||[],Y||[],a,u);fe&&se(fe.message),W=He(He({},i.consent),a)}const we=[];Object.entries(W).forEach(([fe,qe])=>{const Je=H?.find(Nt=>Nt.notice_key===fe);if(Je){const Nt=kr(o,j,Je),os=Nt?.privacy_notice_history_id;let Yt;if(typeof qe=="boolean"?Yt=mt(qe,Je.consent_mechanism):Yt=qe,os){const un=new er(Je,Yt,os);we.push(un)}}});let Te;if((t=T?.translations)!=null&&t.length){const fe=Yr(o,j,T);Te=fe?.privacy_experience_config_history_id}const nt=dr(r.geolocation),En=So.getServedNoticeHistoryId();return No({consentPreferencesToSave:we,privacyExperienceConfigHistoryId:Te,experience:s,consentMethod:u,options:r.options,userLocationString:nt,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:En,tcf:d,updateCookie:O})});class je extends Error{constructor(e){super(e),this.name="DecodingError"}}class $e extends Error{constructor(e){super(e),this.name="EncodingError"}}class ut 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 $e("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 je("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 ze{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 ze.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ze.langSet.has(e))return e;if(ze.langSet.has(t))return t;const s=t+"-"+t;if(ze.langSet.has(s))return s;for(const i of ze.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ze.langSet.forEach(e)}get size(){return ze.langSet.size}}class _{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class gt{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 gt{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 gt{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 Ks;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(Ks||(Ks={}));var q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(q||(q={}));class zs{static ID_TO_KEY=[q.CORE,q.VENDORS_DISCLOSED,q.VENDORS_ALLOWED,q.PUBLISHER_TC];static KEY_TO_ID={[q.CORE]:0,[q.VENDORS_DISCLOSED]:1,[q.VENDORS_ALLOWED]:2,[q.PUBLISHER_TC]:3}}class me extends gt{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new Ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[_.cmpId]=12;static[_.cmpVersion]=12;static[_.consentLanguage]=12;static[_.consentScreen]=6;static[_.created]=36;static[_.isServiceSpecific]=1;static[_.lastUpdated]=36;static[_.policyVersion]=6;static[_.publisherCountryCode]=12;static[_.publisherLegitimateInterests]=24;static[_.publisherConsents]=24;static[_.purposeConsents]=24;static[_.purposeLegitimateInterests]=24;static[_.purposeOneTreatment]=1;static[_.specialFeatureOptins]=12;static[_.useNonStandardTexts]=1;static[_.vendorListVersion]=12;static[_.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Ue{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new $e(`${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 je("invalid bit length");return parseInt(e,2)}}class ks{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new je("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Ue.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new je("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Ue.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Ys{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 $e(`invalid language code: ${e}`);if(t%2===1)throw new $e(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new je("invalid bit length for language");return s}}class fo{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let u=0;u<o;u++){const S=r[u];if(l===0&&(a++,l=S),u===o-1||r[u+1]>s(S,r[o-1])){const d=S!==l;E+=Ue.encode(d),E+=P.encode(l,g.vendorId),d&&(E+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const s=new $s,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Fe(o,a),E=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<E;u++){const S=Ue.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new je(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)s.add(T,l)}else s.add(d,l)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class It{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,E=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((S,d)=>{r+=Ue.encode(S),o=e.maxId>E&&u<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),u+=g.singleOrRange,u+=g.vendorId):(s.push(d),u+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(Tt.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Tt.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Tt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new je("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=Ue.decode(e.charAt(i));i+=g.singleOrRange;const u=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=u;d<=S;d++)s.set(d)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Ue.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function js(){return{[_.version]:P,[_.created]:ks,[_.lastUpdated]:ks,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:Ys,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:Ue,[_.useNonStandardTexts]:Ue,[_.specialFeatureOptins]:We,[_.purposeConsents]:We,[_.purposeLegitimateInterests]:We,[_.purposeOneTreatment]:Ue,[_.publisherCountryCode]:Ys,[_.vendorConsents]:It,[_.vendorLegitimateInterests]:It,[_.publisherRestrictions]:fo,segmentType:P,[_.vendorsDisclosed]:It,[_.vendorsAllowed]:It,[_.publisherConsents]:We,[_.publisherLegitimateInterests]:We,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:We,[_.publisherCustomLegitimateInterests]:We}}class Ao{1={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.purposeConsents,_.vendorConsents]};2={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.policyVersion,_.isServiceSpecific,_.useNonStandardTexts,_.specialFeatureOptins,_.purposeConsents,_.purposeLegitimateInterests,_.purposeOneTreatment,_.publisherCountryCode,_.vendorConsents,_.vendorLegitimateInterests,_.publisherRestrictions],[q.PUBLISHER_TC]:[_.publisherConsents,_.publisherLegitimateInterests,_.numCustomPurposes,_.publisherCustomConsents,_.publisherCustomLegitimateInterests],[q.VENDORS_ALLOWED]:[_.vendorsAllowed],[q.VENDORS_DISCLOSED]:[_.vendorsDisclosed]}}class Co{1=[q.CORE];2=[q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[_.supportOOB]===!0)&&this[2].push(q.VENDORS_DISCLOSED),s&&(e[_.supportOOB]&&e[_.vendorsAllowed].size>0&&this[2].push(q.VENDORS_ALLOWED),this[2].push(q.PUBLISHER_TC))}}}class Ws{static fieldSequence=new Ao;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new $e(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==q.CORE&&(i=P.encode(zs.KEY_TO_ID[t],g.segmentType));const r=js();return s.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,E)}catch(u){throw new $e(`Error encoding ${t}->${o}: ${u.message}`)}}),rs.encode(i)}static decode(e,t,s){const i=rs.decode(e);let r=0;s===q.CORE&&(t.version=P.decode(i.substr(r,g[_.version]),g[_.version])),s!==q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=js();return o.forEach(l=>{const E=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[_.numCustomPurposes])),u!==0){const S=i.substr(r,u);if(E===It?t[l]=E.decode(S,t.version):t[l]=E.decode(S,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new je(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class Po{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const E=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let S=0,d=E.length;S<d&&!u;S++)u=E[S].restrictionType===ve.REQUIRE_CONSENT&&r==="purposes"||E[S].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 $e("Unable to encode TCModel without a GVL");if(!s.isReady)throw new $e("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 $e(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class wo{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class f extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ze;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new ut("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new ut("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new ut("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await wo.fetch(e))}catch(t){throw new ut(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new ut("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new ut("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class Qs extends gt{static consentLanguages=f.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new $s;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){f.isInstanceOf(e)||(e=new f(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new Ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new Ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new Ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new Ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new Ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new Ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new Ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class Do{static encode(e,t){let s="",i;return e=Po.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Co(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Ws.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),E=zs.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Ws.decode(o,t,E)}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 xt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(xt||(xt={}));var Bt;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Bt||(Bt={}));var qs;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(qs||(qs={}));class Ht{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 $t extends Ht{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Xs(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 mo{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 $t(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class Ne{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new mo;static cmpStatus=xt.LOADING;static disabled=!1;static displayStatus=Bt.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=xt.LOADING,this.disabled=!1,this.displayStatus=Bt.HIDDEN,this.eventQueue.clear()}}class Js{cmpId=Ne.cmpId;cmpVersion=Ne.cmpVersion;gdprApplies=Ne.gdprApplies;tcfPolicyVersion=Ne.tcfPolicyVersion}class Xs extends Js{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=Ne.eventStatus,this.cmpStatus=Ne.cmpStatus,this.listenerId=t,Ne.gdprApplies){const s=Ne.tcModel;this.tcString=Ne.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 Vo extends Xs{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),E=t[l].substr(0,i),u=t[l].substr(i+1);t[l]=E+a+u})}}return t}}class Ro extends Js{cmpLoaded=!0;cmpStatus=Ne.cmpStatus;displayStatus=Ne.displayStatus;apiVersion=String(Ne.apiVersion);gvlVersion;constructor(){super(),Ne.tcModel&&Ne.tcModel.vendorListVersion&&(this.gvlVersion=+Ne.tcModel.vendorListVersion)}}class Mo extends Ht{respond(){this.invokeCallback(new Ro)}}class vo extends $t{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Vo(this.param))}}class bo extends Ht{respond(){const e=Ne.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new f(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Lo extends $t{respond(){this.listenerId=Ne.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Go extends Ht{respond(){this.invokeCallback(Ne.eventQueue.remove(this.param))}}class Aa{static[Qe.PING]=Mo;static[Qe.GET_TC_DATA]=$t;static[Qe.GET_IN_APP_TC_DATA]=vo;static[Qe.GET_VENDOR_LIST]=bo;static[Qe.ADD_EVENT_LISTENER]=Lo;static[Qe.REMOVE_EVENT_LISTENER]=Go}const yo=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(bt);return t.split(".")[0]}return e??""};var Uo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Fo=1,Zs=[1,3,4,5,6],xo=2,Bo=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Br).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`${xo}~${s}~dv.${i}`},Ho=n=>Uo(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new Qs(new f(e.gvl));yield l.gvl.readyPromise,l.cmpId=ns,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?$r(e):Hr(e);if(l.gvl.narrowVendorsTo(E),t){t.vendorsConsent.forEach(d=>{var O,T,H;if(Gt(d,e.gvl)){const{id:Y}=Ye(d);if(l.vendorConsents.set(+Y),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const j=(T=e.gvl)==null?void 0:T.vendors[Y];j&&!((H=j?.purposes)!=null&&H.length)&&j.flexiblePurposes.forEach(se=>{const W=new Fe;W.purposeId=se,W.restrictionType=ve.REQUIRE_CONSENT,l.publisherRestrictions.add(+Y,W)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:Y}=Ye(H);l.vendorLegitimateInterests.set(+Y)});else if(Gt(d,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(se=>se.id===d)[0],Y=H?.purpose_legitimate_interests;let j=!1;if(Y&&(Y.map(W=>W.id).filter(W=>Zs.includes(W)).length&&(j=!0),!j)){const{id:W}=Ye(d);l.vendorLegitimateInterests.set(+W)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;Zs.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 Fe;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=Do.encode(l,{segments:[q.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=Bo({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${bt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var $o=Object.defineProperty,Ko=Object.defineProperties,zo=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,ko=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,tn=(n,e,t)=>e in n?$o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jo=(n,e)=>{for(var t in e||(e={}))ko.call(e,t)&&tn(n,t,e[t]);if(en)for(var t of en(e))Yo.call(e,t)&&tn(n,t,e[t]);return n},Wo=(n,e)=>Ko(n,zo(e)),Qo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const et=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=mt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],tt=n=>n?.length?n.map(e=>{const t=mt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],qo=({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:et({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:et({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:et({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:et({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:et({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:et({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:et({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},Jo=({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:tt(e.purposesConsent),purpose_legitimate_interests_preferences:tt(e.purposesLegint),special_feature_preferences:tt(e.specialFeatures),vendor_consent_preferences:tt(s),vendor_legitimate_interests_preferences:tt(r),system_consent_preferences:tt(t),system_legitimate_interests_preferences:tt(i)}},Xo=(n,e,t,s,i,r)=>Qo(void 0,null,function*(){var o;const a=yield Ho({tcStringPreferences:t,experience:s});return Wo(jo({},n),{fides_string:a,tcf_consent:yr(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),Kt="us",Zo=n=>n?.toLowerCase().startsWith("us"),ea=({experienceRegion:n,usApproach:e})=>Zo(n)&&e===Be.NATIONAL?Kt:n,ta=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:N.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:N.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:N.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===N.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},sn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ea({experienceRegion:e,usApproach:t?.us_approach}),r=yt[i];return!r&&t?.us_approach===Be.ALL&&(i=Kt,r=yt[i]),r&&t?.us_approach===Be.ALL&&(s?.some(a=>{var l;return(l=a.gpp_field_mapping)==null?void 0:l.find(E=>E.region===e)})||(i=Kt,r=yt[i])),!r||i===Kt&&t?.us_approach===Be.STATE?{}:{gppRegion:i,gppSection:r}},sa=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,E=i[a],u=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;u&&u.forEach(S=>{let d=S.not_available;E===!1?d=S.opt_out:E&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},na=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{n.setFieldValue(t.name,l,1)})})},ia=[1,3,4,5,6],ra=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=sn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:E}=o,u=(a=E?.find(S=>S.region===i))==null?void 0:a.mechanism;if(u){const S=u.some(d=>{const O=n.getFieldValue(r.name,d.field),T=Array.isArray(O)?O.join(""):String(O);return T===d.opt_out?!0:(T===d.not_opt_out,!1)});S!==void 0&&(t[l]=!S)}}),t},oa=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=Ar,a=n.getSection(k.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=E.filter(d=>!ia.includes(parseInt(d,10))),o.vendorsConsent=u,o.vendorsLegint=S,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},aa=({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===ht.TCF_OVERLAY;if(!i.experience_config.translations.find(u=>Et(u.language,s)))return;e.setGppString(t),e.setSignalStatus(Re.READY);const a=i.privacy_notices.map(u=>({notice:u,bestTranslation:u.translations.find(S=>Et(S.language,s))||null}));let l,E;if(r){const u=oa({cmpApi:e,experience:i});E=i.minimal_tcf?Jo({experience:i,enabledIds:u}):qo({experience:i,enabledIds:u}),l=d=>Xo(d,E,u,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==wt.NOTICE_ONLY?S[d.notice.notice_key]=u.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),Hs(window.Fides,{noticeConsent:S,tcf:E,updateCookie:l})}else{const u=ra({cmpApi:e,experience:i});Hs(window.Fides,{noticeConsent:u})}},nn="__gppLocator",rn=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>rn(n),5)},la=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},ca=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,da=()=>{const n=[],e=[];let t;const s=(o,a,l,E)=>{if(o==="queue")return n;if(o==="events")return e;const u={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:ke.HIDDEN,signalStatus:Re.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(u,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:u},!0)}else if(o==="removeEventListener"){let S=!1;for(let d=0;d<e.length;d++)if(e[d].id===l){e.splice(d,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:u},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,E]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!ca(l))return null;if(l.__gppCall&&window.__gpp){const u=l.__gppCall;window.__gpp(u.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:u.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in u?u.parameter:void 0,"version"in u?u.version:"1.1")}return null};la(nn)||(rn(nn),window.__gpp=s,window.addEventListener("message",i,!1))},on=(n,{cmpApi:e,experience:t,cookie:s})=>{const{gppRegion:i,gppSection:r}=sn(t);if(!i||!r)return[];const o=new Set;o.add(r),n({gppApi:e,gppRegion:i,gppSection:r,privacyNotices:t.privacy_notices||[],noticeConsent:s?.consent});const{gpp_settings:a}=t;return ta({gppApi:e,sectionName:r.name,gppSettings:a}),Array.from(o)},an=({cmpApi:n,experience:e})=>on(na,{cmpApi:n,experience:e}),ln=({cmpApi:n,cookie:e,experience:t})=>on(sa,{cmpApi:n,cookie:e,experience:t}),cn=(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,dn=(n,e)=>{if(!dt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=yo(n);return s?(e.setFieldValueBySectionId(k.ID,"CmpId",ns),e.setSectionStringById(k.ID,s),!0):!1},Ea=()=>{const n=[];if(dt(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${k.ID}:${k.NAME}`),(e.us_approach===Be.NATIONAL||e.us_approach===Be.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===Be.STATE||e.us_approach===Be.ALL)&&Object.values(yt).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},ua=()=>{da();const n=new qi(ns,Kr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Ea();if(n.setSupportedAPIs(o),!dt(s))return;const{fidesString:a}=r;if(a&&aa({fidesString:a,cmpApi:n}),!a&&(!Er(s,e.detail,i,r)||!r.tcfEnabled&&Is(s.privacy_notices)&&!cn(i,e.detail.fides_string,s.privacy_notices))){const l=dn(e,n);l&&n.setApplicableSections([k.ID]);const E=an({cmpApi:n,experience:s}),u=ln({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(d=>d.id)),!l&&!E.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(Re.READY);const S=Rs(n);window.Fides.fides_string=S}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(dt(t)){!i.tcfEnabled&&Is(t.privacy_notices)&&!cn(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Re.READY):n.setSignalStatus(Re.NOT_READY),n.setCmpDisplayStatus(ke.VISIBLE);const r=an({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(ke.HIDDEN),n.setSignalStatus(Re.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(ke.HIDDEN),dn(e,n)&&(n.setApplicableSections([k.ID]),n.fireSectionChange("tcfeuv2")),dt(window.Fides.experience)){const s=ln({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=Rs(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,ms(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Re.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&ua()});
|
|
1
|
+
class Wt{eventName;listenerId;data;pingData;constructor(e,t,s,i){this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}class Ct{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}let it=class{callback;parameter;success=!0;cmpApiContext;constructor(e,t,s){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},Sn=class extends it{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new Wt("listenerRegistered",e,!0,new Ct(this.cmpApiContext));this.invokeCallback(t)}},_n=class extends it{respond(){let e=new Ct(this.cmpApiContext);this.invokeCallback(e)}};class hn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class pn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class gn extends it{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var ye;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(ye||(ye={}));let Tn=class extends it{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new Wt("listenerRemoved",e,t,new Ct(this.cmpApiContext));this.invokeCallback(s)}},ls=class{static[ye.ADD_EVENT_LISTENER]=Sn;static[ye.GET_FIELD]=hn;static[ye.GET_SECTION]=pn;static[ye.HAS_SECTION]=gn;static[ye.PING]=_n;static[ye.REMOVE_EVENT_LISTENER]=Tn};var rt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(rt||(rt={}));var je;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(je||(je={}));var cs;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(cs||(cs={}));var Me;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Me||(Me={}));class In{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let s=ye.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=ye.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new ls[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return ls[e]!==void 0}}let On=class{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new Wt(e,i,t,new Ct(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};class pt extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ee{segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new pt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new pt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let h=class extends Error{constructor(e){super(e),this.name="DecodingError"}},Oe=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class D{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new Oe("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}class ft{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new Oe("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=D.decode(i),o=ft.DICT.charAt(r);t+=o,s+=6}catch{throw new Oe("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new h("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=ft.REVERSE_DICT.get(i),o=D.encode(r,6);t+=o}return t}}class F extends ft{static instance=new F;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class A{static instance=new A;constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new h("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}}class ot{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new h("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let at=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new Oe("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new h("Undecodable Boolean '"+e+"'")}};class ds{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=D.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+ot.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+ot.encode(a)+ot.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=at.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),E=ot.decode(e.substring(r,l+2))+i;i=E,r=l+2,l=e.indexOf("11",r);let u=ot.decode(e.substring(r,l+2))+i;i=u,r=l+2;for(let S=E;S<=u;S++)t.push(S)}else{let l=e.indexOf("11",r),E=ot.decode(e.substring(r,l+2))+i;i=E,t.push(E),r=l+2}}return t}}class Nn extends Error{constructor(e){super(e),this.name="ValidationError"}}class ve{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new Nn("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}class Ve extends h{constructor(e){super(e),this.name="SubstringError"}}class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new Ve("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class fn extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ds.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ds.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class c extends ve{bitStringLength;constructor(e,t,s=!0){super(s),this.bitStringLength=e,this.setValue(t)}encode(){try{return D.encode(this.value,this.bitStringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=D.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new Ve(s)}}}class w{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var He;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(He||(He={}));const An=[He.ID,He.VERSION,He.SECTION_IDS];class C{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new pt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new pt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Cn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return An}initializeFields(){let e=new w;return e.put(He.ID.toString(),new c(6,Le.ID)),e.put(He.VERSION.toString(),new c(6,Le.VERSION)),e.put(He.SECTION_IDS.toString(),new fn([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Le extends ee{static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Cn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var p;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(p||(p={}));const Pn=[p.VERSION,p.CREATED,p.LAST_UPDATED,p.CMP_ID,p.CMP_VERSION,p.CONSENT_SCREEN,p.CONSENT_LANGUAGE,p.VENDOR_LIST_VERSION,p.POLICY_VERSION,p.IS_SERVICE_SPECIFIC,p.USE_NON_STANDARD_STACKS,p.SPECIAL_FEATURE_OPTINS,p.PURPOSE_CONSENTS,p.PURPOSE_LEGITIMATE_INTERESTS,p.PURPOSE_ONE_TREATMENT,p.PUBLISHER_COUNTRY_CODE,p.VENDOR_CONSENTS,p.VENDOR_LEGITIMATE_INTERESTS,p.PUBLISHER_RESTRICTIONS],wn=[p.PUBLISHER_PURPOSES_SEGMENT_TYPE,p.PUBLISHER_CONSENTS,p.PUBLISHER_LEGITIMATE_INTERESTS,p.NUM_CUSTOM_PURPOSES,p.PUBLISHER_CUSTOM_CONSENTS,p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],Dn=[p.VENDORS_ALLOWED_SEGMENT_TYPE,p.VENDORS_ALLOWED],mn=[p.VENDORS_DISCLOSED_SEGMENT_TYPE,p.VENDORS_DISCLOSED];class nt extends ft{static instance=new nt;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class lt{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=D.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+D.encode(t[r][0],16):i+="1"+D.encode(t[r][0],16)+D.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new h("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=D.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=at.decode(e.substring(i,i+1));if(i++,o===!0){let a=D.decode(e.substring(i,i+16));i+=16;let l=D.decode(e.substring(i,i+16));i+=16;for(let E=a;E<=l;E++)t.push(E)}else{let a=D.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Qt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return lt.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=lt.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Vn{key;type;ids;constructor(e,t,s){this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class Es extends ve{keyBitStringLength;typeBitStringLength;constructor(e,t,s,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=D.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=D.encode(i.getKey(),this.keyBitStringLength),t+=D.encode(i.getType(),this.typeBitStringLength),t+=lt.encode(i.getIds())}return t}catch(e){throw new Oe(e)}}decode(e){try{let t=[],s=D.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=D.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=D.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Qt([]).substring(e,i),E=lt.decode(l);i+=l.length,t.push(new Vn(o,a,E))}this.value=t}catch(t){throw new h(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=D.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=te.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let E=new Qt([]).substring(e,r);r+=E.length,s+=E}return s}catch(s){throw new Ve(s)}}}class $ extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new Ve(s)}}}class us{static encode(e){return e?D.encode(Math.round(e.getTime()/100),36):D.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new h("Undecodable Datetime '"+e+"'");return new Date(D.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return us.encode(this.value)}catch(e){throw new Oe(e)}}decode(e){try{this.value=us.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new Ve(s)}}}class ct{static encode(e,t){if(e.length>t)throw new Oe("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=at.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(at.decode(e.substring(s,s+1)));return t}}class Ue extends ve{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Ss{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=D.encode(63,6);else if(r>=65)s+=D.encode(e.charCodeAt(i)-65,6);else throw new Oe("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new h("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=D.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}class qt extends ve{stringLength;constructor(e,t,s=!0){super(s),this.stringLength=e,this.setValue(t)}encode(){try{return Ss.encode(this.value,this.stringLength)}catch(e){throw new Oe(e)}}decode(e){try{this.value=Ss.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new Ve(s)}}}class Ze extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=lt.encode(this.value),s=t.length,i=e;if(s<=i)return D.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return D.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new Oe(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=lt.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new h(t)}}substring(e,t){try{let s=D.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new Qt([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}class Rn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pn}initializeFields(){let e=new Date,t=new w;return t.put(p.VERSION.toString(),new c(6,k.VERSION)),t.put(p.CREATED.toString(),new Pt(e)),t.put(p.LAST_UPDATED.toString(),new Pt(e)),t.put(p.CMP_ID.toString(),new c(12,0)),t.put(p.CMP_VERSION.toString(),new c(12,0)),t.put(p.CONSENT_SCREEN.toString(),new c(6,0)),t.put(p.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(p.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(p.POLICY_VERSION.toString(),new c(6,2)),t.put(p.IS_SERVICE_SPECIFIC.toString(),new $(!1)),t.put(p.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(p.SPECIAL_FEATURE_OPTINS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(p.PURPOSE_ONE_TREATMENT.toString(),new $(!1)),t.put(p.PUBLISHER_COUNTRY_CODE.toString(),new qt(2,"AA")),t.put(p.VENDOR_CONSENTS.toString(),new Ze([])),t.put(p.VENDOR_LEGITIMATE_INTERESTS.toString(),new Ze([])),t.put(p.PUBLISHER_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class wt extends ve{getLength;constructor(e,t,s=!0){super(s),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new Oe(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}class Mn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return wn}initializeFields(){let e=new w;e.put(p.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(p.PUBLISHER_CONSENTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(p.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(p.NUM_CUSTOM_PURPOSES.toString(),t),e.put(p.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(p.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class vn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Dn}initializeFields(){let e=new w;return e.put(p.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(p.VENDORS_ALLOWED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class bn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new w;return e.put(p.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(p.VENDORS_DISCLOSED.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class k extends ee{static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return k.ID}getName(){return k.NAME}getVersion(){return k.VERSION}initializeSegments(){let e=[];return e.push(new Rn),e.push(new Mn),e.push(new vn),e.push(new bn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(p.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==p.CREATED&&e!==p.LAST_UPDATED){let s=new Date;super.setFieldValue(p.CREATED,s),super.setFieldValue(p.LAST_UPDATED,s)}}}var I;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(I||(I={}));const Ln=[I.VERSION,I.CREATED,I.LAST_UPDATED,I.CMP_ID,I.CMP_VERSION,I.CONSENT_SCREEN,I.CONSENT_LANGUAGE,I.VENDOR_LIST_VERSION,I.TCF_POLICY_VERSION,I.USE_NON_STANDARD_STACKS,I.SPECIAL_FEATURE_EXPRESS_CONSENT,I.PURPOSES_EXPRESS_CONSENT,I.PURPOSES_IMPLIED_CONSENT,I.VENDOR_EXPRESS_CONSENT,I.VENDOR_IMPLIED_CONSENT,I.PUB_RESTRICTIONS],Gn=[I.PUB_PURPOSES_SEGMENT_TYPE,I.PUB_PURPOSES_EXPRESS_CONSENT,I.PUB_PURPOSES_IMPLIED_CONSENT,I.NUM_CUSTOM_PURPOSES,I.CUSTOM_PURPOSES_EXPRESS_CONSENT,I.CUSTOM_PURPOSES_IMPLIED_CONSENT],yn=[I.DISCLOSED_VENDORS_SEGMENT_TYPE,I.DISCLOSED_VENDORS];class Un extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ln}initializeFields(){let e=new Date,t=new w;return t.put(I.VERSION.toString(),new c(6,Ce.VERSION)),t.put(I.CREATED.toString(),new Pt(e)),t.put(I.LAST_UPDATED.toString(),new Pt(e)),t.put(I.CMP_ID.toString(),new c(12,0)),t.put(I.CMP_VERSION.toString(),new c(12,0)),t.put(I.CONSENT_SCREEN.toString(),new c(6,0)),t.put(I.CONSENT_LANGUAGE.toString(),new qt(2,"EN")),t.put(I.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(I.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(I.USE_NON_STANDARD_STACKS.toString(),new $(!1)),t.put(I.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(I.VENDOR_EXPRESS_CONSENT.toString(),new Ze([])),t.put(I.VENDOR_IMPLIED_CONSENT.toString(),new Ze([])),t.put(I.PUB_RESTRICTIONS.toString(),new Es(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Fn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new w;e.put(I.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(I.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(I.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Ue([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(I.NUM_CUSTOM_PURPOSES.toString(),t),e.put(I.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(I.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new wt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class xn extends C{base64UrlEncoder=nt.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){let e=new w;return e.put(I.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(I.DISCLOSED_VENDORS.toString(),new Ze([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ce extends ee{static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let e=[];return e.push(new Un),e.push(new Fn),e.push(new xn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new h("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(I.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==I.CREATED&&e!==I.LAST_UPDATED){let s=new Date;super.setFieldValue(I.CREATED,s),super.setFieldValue(I.LAST_UPDATED,s)}}}class Jt{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Bn{validator;value=null;constructor(e,t){t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}class Hn{fields=new Map;containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ne;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Ne||(Ne={}));const $n=[Ne.VERSION,Ne.NOTICE,Ne.OPT_OUT_SALE,Ne.LSPA_COVERED];class Kn extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return $n}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new Hn;return t.put(Ne.VERSION,new Bn(Pe.VERSION)),t.put(Ne.NOTICE,new Jt("-",e)),t.put(Ne.OPT_OUT_SALE,new Jt("-",e)),t.put(Ne.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Ne.VERSION).getValue(),t+=e.get(Ne.NOTICE).getValue(),t+=e.get(Ne.OPT_OUT_SALE).getValue(),t+=e.get(Ne.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new h("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Ne.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Ne.NOTICE).setValue(e.charAt(1)),t.get(Ne.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Ne.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new h("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Pe extends ee{static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pe.ID}getName(){return Pe.NAME}getVersion(){return Pe.VERSION}initializeSegments(){let e=[];return e.push(new Kn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var N;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(N||(N={}));const zn=[N.VERSION,N.SHARING_NOTICE,N.SALE_OPT_OUT_NOTICE,N.SHARING_OPT_OUT_NOTICE,N.TARGETED_ADVERTISING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,N.SENSITIVE_DATA_LIMIT_USE_NOTICE,N.SALE_OPT_OUT,N.SHARING_OPT_OUT,N.TARGETED_ADVERTISING_OPT_OUT,N.SENSITIVE_DATA_PROCESSING,N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,N.PERSONAL_DATA_CONSENTS,N.MSPA_COVERED_TRANSACTION,N.MSPA_OPT_OUT_OPTION_MODE,N.MSPA_SERVICE_PROVIDER_MODE],kn=[N.GPC_SEGMENT_TYPE,N.GPC];class _s{static encode(e,t,s){if(e.length>s)throw new Oe("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=D.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new h("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new h("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new h("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(D.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}class Q extends ve{elementBitStringLength;numElements;constructor(e,t,s=!0){super(s),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return _s.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new Oe(e)}}decode(e){try{this.value=_s.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new h(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new Ve(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Yn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return zn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(N.VERSION.toString(),new c(6,X.VERSION)),i.put(N.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(N.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(N.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(N.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(N.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(N.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(N.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);s.length==66&&(s=s.substring(0,48)+"00000000"+s.substring(48,52)+"00"+s.substring(52,62)),this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNatCoreSegment '"+e+"'")}}}class jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){let e=new w;return e.put(N.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(N.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNatGpcSegment '"+e+"'")}}}class X extends ee{static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return X.ID}getName(){return X.NAME}getVersion(){return X.VERSION}initializeSegments(){let e=[];return e.push(new Yn),e.push(new jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(N.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(N.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var m;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const Wn=[m.VERSION,m.SALE_OPT_OUT_NOTICE,m.SHARING_OPT_OUT_NOTICE,m.SENSITIVE_DATA_LIMIT_USE_NOTICE,m.SALE_OPT_OUT,m.SHARING_OPT_OUT,m.SENSITIVE_DATA_PROCESSING,m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,m.PERSONAL_DATA_CONSENTS,m.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Qn=[m.GPC_SEGMENT_TYPE,m.GPC];class qn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Wn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(m.VERSION.toString(),new c(6,ie.VERSION)),i.put(m.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(m.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(m.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0]).withValidator(s)),i.put(m.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCaCoreSegment '"+e+"'")}}}class Jn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qn}initializeFields(){let e=new w;return e.put(m.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsCaGpcSegment '"+e+"'")}}}class ie extends ee{static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ie.ID}getName(){return ie.NAME}getVersion(){return ie.VERSION}initializeSegments(){let e=[];return e.push(new qn),e.push(new Jn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var J;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));const Xn=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE];class Zn extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Xn}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(J.VERSION.toString(),new c(6,re.VERSION)),i.put(J.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsVaCoreSegment '"+e+"'")}}}class re extends ee{static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return re.ID}getName(){return re.NAME}getVersion(){return re.VERSION}initializeSegments(){let e=[];return e.push(new Zn),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ei=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],ti=[x.GPC_SEGMENT_TYPE,x.GPC];class si extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ei}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(x.VERSION.toString(),new c(6,oe.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCoCoreSegment '"+e+"'")}}}class ni extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ti}initializeFields(){let e=new w;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsCoGpcSegment '"+e+"'")}}}class oe extends ee{static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return oe.ID}getName(){return oe.NAME}getVersion(){return oe.VERSION}initializeSegments(){let e=[];return e.push(new si),e.push(new ni),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var K;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const ii=[K.VERSION,K.SHARING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];class ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ii}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(K.VERSION.toString(),new c(6,ae.VERSION)),i.put(K.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(K.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsUtCoreSegment '"+e+"'")}}}class ae extends ee{static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ae.ID}getName(){return ae.NAME}getVersion(){return ae.VERSION}initializeSegments(){let e=[];return e.push(new ri),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(B||(B={}));const oi=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],ai=[B.GPC_SEGMENT_TYPE,B.GPC];class li extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(B.VERSION.toString(),new c(6,le.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsCtCoreSegment '"+e+"'")}}}class ci extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ai}initializeFields(){let e=new w;return e.put(B.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsCtGpcSegment '"+e+"'")}}}class le extends ee{static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return le.ID}getName(){return le.NAME}getVersion(){return le.VERSION}initializeSegments(){let e=[];return e.push(new li),e.push(new ci),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var 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 di=[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 Ei extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return di}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(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 h("Unable to decode UsFlCoreSegment '"+e+"'")}}}class ce extends ee{static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ce.ID}getName(){return ce.NAME}getVersion(){return ce.VERSION}initializeSegments(){let e=[];return e.push(new Ei),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}}var V;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const ui=[V.VERSION,V.SHARING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.ADDITIONAL_DATA_PROCESSING_CONSENT,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],Si=[V.GPC_SEGMENT_TYPE,V.GPC];class _i extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ui}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(V.VERSION.toString(),new c(6,de.VERSION)),i.put(V.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsMtCoreSegment '"+e+"'")}}}class hi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Si}initializeFields(){let e=new w;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsMtGpcSegment '"+e+"'")}}}class de extends ee{static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return de.ID}getName(){return de.NAME}getVersion(){return de.VERSION}initializeSegments(){let e=[];return e.push(new _i),e.push(new hi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const pi=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],gi=[R.GPC_SEGMENT_TYPE,R.GPC];class Ti extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(R.VERSION.toString(),new c(6,Ee.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Ii extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gi}initializeFields(){let e=new w;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(R.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 h("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Ee extends ee{static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new Ti),e.push(new Ii),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Oi=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.ADDITIONAL_DATA_PROCESSING_CONSENT,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Ni=[M.GPC_SEGMENT_TYPE,M.GPC];class fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Oi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(M.VERSION.toString(),new c(6,ue.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ai extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ni}initializeFields(){let e=new w;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsTxGpcSegment '"+e+"'")}}}class ue extends ee{static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ue.ID}getName(){return ue.NAME}getVersion(){return ue.VERSION}initializeSegments(){let e=[];return e.push(new fi),e.push(new Ai),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Ci=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE],Pi=[v.GPC_SEGMENT_TYPE,v.GPC];class wi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ci}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(v.VERSION.toString(),new c(6,Se.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsDeCoreSegment '"+e+"'")}}}class Di extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pi}initializeFields(){let e=new w;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsDeGpcSegment '"+e+"'")}}}class Se extends ee{static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Se.ID}getName(){return Se.NAME}getVersion(){return Se.VERSION}initializeSegments(){let e=[];return e.push(new wi),e.push(new Di),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var b;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const mi=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SENSITIVE_DATA_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],Vi=[b.GPC_SEGMENT_TYPE,b.GPC];class Ri extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(b.VERSION.toString(),new c(6,_e.VERSION)),i.put(b.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Mi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Vi}initializeFields(){let e=new w;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsIaGpcSegment '"+e+"'")}}}class _e extends ee{static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _e.ID}getName(){return _e.NAME}getVersion(){return _e.VERSION}initializeSegments(){let e=[];return e.push(new Ri),e.push(new Mi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const vi=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],bi=[L.GPC_SEGMENT_TYPE,L.GPC];class Li extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return vi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(L.VERSION.toString(),new c(6,he.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Gi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return bi}initializeFields(){let e=new w;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNeGpcSegment '"+e+"'")}}}class he extends ee{static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return he.ID}getName(){return he.NAME}getVersion(){return he.VERSION}initializeSegments(){let e=[];return e.push(new Li),e.push(new Gi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const yi=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Ui=[G.GPC_SEGMENT_TYPE,G.GPC];class Fi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(G.VERSION.toString(),new c(6,pe.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0]).withValidator(s)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNhCoreSegment '"+e+"'")}}}class xi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ui}initializeFields(){let e=new w;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNhGpcSegment '"+e+"'")}}}class pe extends ee{static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pe.ID}getName(){return pe.NAME}getVersion(){return pe.VERSION}initializeSegments(){let e=[];return e.push(new Fi),e.push(new xi),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Bi=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Hi=[y.GPC_SEGMENT_TYPE,y.GPC];class $i extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Bi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(y.VERSION.toString(),new c(6,ge.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Q(2,[0,0,0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsNjCoreSegment '"+e+"'")}}}class Ki extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hi}initializeFields(){let e=new w;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsNjGpcSegment '"+e+"'")}}}class ge extends ee{static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ge.ID}getName(){return ge.NAME}getVersion(){return ge.VERSION}initializeSegments(){let e=[];return e.push(new $i),e.push(new Ki),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const zi=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],ki=[U.GPC_SEGMENT_TYPE,U.GPC];class Yi extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return zi}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new w;return i.put(U.VERSION.toString(),new c(6,Te.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Q(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new h("Unable to decode UsTnCoreSegment '"+e+"'")}}}class ji extends C{base64UrlEncoder=F.getInstance();bitStringEncoder=A.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ki}initializeFields(){let e=new w;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new $(!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 h("Unable to decode UsTnGpcSegment '"+e+"'")}}}class Te extends ee{static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Te.ID}getName(){return Te.NAME}getVersion(){return Te.VERSION}initializeSegments(){let e=[];return e.push(new Yi),e.push(new ji),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}}class se{static SECTION_ID_NAME_MAP=new Map([[k.ID,k.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.NAME],[X.ID,X.NAME],[ie.ID,ie.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[ce.ID,ce.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[_e.ID,_e.NAME],[he.ID,he.NAME],[pe.ID,pe.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME]]);static SECTION_ORDER=[k.NAME,Ce.NAME,Pe.NAME,X.NAME,ie.NAME,re.NAME,oe.NAME,ae.NAME,le.NAME,ce.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,_e.NAME,he.NAME,pe.NAME,ge.NAME,Te.NAME]}class hs{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===k.NAME?(i=new k,this.sections.set(k.NAME,i)):e===Pe.NAME?(i=new Pe,this.sections.set(Pe.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===oe.NAME?(i=new oe,this.sections.set(oe.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===Te.NAME&&(i=new Te,this.sections.set(Te.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new pt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(se.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Le;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<se.SECTION_ORDER.length;r++){let o=se.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);a.setIsDirty(!0),t.push(a.encode()),s.push(a.getId())}}let i=new Le;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let r=new Le(t[0]).getFieldValue("SectionIds");if(r.length!==t.length-1)throw new h("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let o=0;o<r.length;o++){if(t[o+1].trim()==="")throw new h("Unable to decode '"+e+"'. Section "+(o+1)+" is blank.");if(r[o]===Ce.ID){let l=new Ce(t[o+1]);s.set(Ce.NAME,l)}else if(r[o]===k.ID){let l=new k(t[o+1]);s.set(k.NAME,l)}else if(r[o]===Pe.ID){let l=new Pe(t[o+1]);s.set(Pe.NAME,l)}else if(r[o]===X.ID){let l=new X(t[o+1]);s.set(X.NAME,l)}else if(r[o]===ie.ID){let l=new ie(t[o+1]);s.set(ie.NAME,l)}else if(r[o]===re.ID){let l=new re(t[o+1]);s.set(re.NAME,l)}else if(r[o]===oe.ID){let l=new oe(t[o+1]);s.set(oe.NAME,l)}else if(r[o]===ae.ID){let l=new ae(t[o+1]);s.set(ae.NAME,l)}else if(r[o]===le.ID){let l=new le(t[o+1]);s.set(le.NAME,l)}else if(r[o]===ce.ID){let l=new ce(t[o+1]);s.set(ce.NAME,l)}else if(r[o]===de.ID){let l=new de(t[o+1]);s.set(de.NAME,l)}else if(r[o]===Ee.ID){let l=new Ee(t[o+1]);s.set(Ee.NAME,l)}else if(r[o]===ue.ID){let l=new ue(t[o+1]);s.set(ue.NAME,l)}else if(r[o]===Se.ID){let l=new Se(t[o+1]);s.set(Se.NAME,l)}else if(r[o]===_e.ID){let l=new _e(t[o+1]);s.set(_e.NAME,l)}else if(r[o]===he.ID){let l=new he(t[o+1]);s.set(he.NAME,l)}else if(r[o]===pe.ID){let l=new pe(t[o+1]);s.set(pe.NAME,l)}else if(r[o]===ge.ID){let l=new ge(t[o+1]);s.set(ge.NAME,l)}else if(r[o]===Te.ID){let l=new Te(t[o+1]);s.set(Te.NAME,l)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new k(e);return t.set(k.NAME,s),new Le().setFieldValue(He.SECTION_IDS,[2]),t.set(Le.NAME,s),t}else throw new h("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(se.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===k.NAME?(s=new k,this.sections.set(k.NAME,s)):e===Pe.NAME?(s=new Pe,this.sections.set(Pe.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===oe.NAME?(s=new oe,this.sections.set(oe.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===Te.NAME&&(s=new Te,this.sections.set(Te.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(se.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<se.SECTION_ORDER.length;t++){let s=se.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Wi{gppVersion="1.1";supportedAPIs=[];eventQueue=new On(this);cmpStatus=rt.LOADING;cmpDisplayStatus=je.HIDDEN;signalStatus=Me.NOT_READY;applicableSections=[];gppModel=new hs;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=rt.LOADING,this.cmpDisplayStatus=je.HIDDEN,this.signalStatus=Me.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new hs,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class Xt{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}let Dt=class extends Error{constructor(e){super(e),this.name="GVLError"}},Qi=class kt{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]);has(e){return kt.langSet.has(e)}forEach(e){kt.langSet.forEach(e)}get size(){return kt.langSet.size}},ps=class Yt{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Qi;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=Yt.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new Yt;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||t.length===0)throw new Dt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Dt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new Yt;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(await Xt.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(await Xt.fetch(r))}return s}async changeLanguage(e){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Xt.fetch(s))}catch(i){throw new Dt("unable to load language: "+i.message)}}}else throw new Dt(`unsupported language ${e}`)}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};class qi{callResponder;cmpApiContext;constructor(e,t,s){this.cmpApiContext=new Wi,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new In(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(se.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(se.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(se.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(se.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(se.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(se.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(se.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return ps.fromVendorList(e)}async getGvlFromUrl(e){return ps.fromUrl(e)}}const Ji="en";var Xi=Object.defineProperty,Zi=(n,e,t)=>e in n?Xi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zt=(n,e,t)=>Zi(n,typeof e!="symbol"?e+"":e,t);class er{constructor(e,t,s){Zt(this,"consentPreference"),Zt(this,"notice"),Zt(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var gs;(n=>{(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>{e[e._0=0]="_0",e[e._1=1]="_1"})(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(gs||(gs={}));var dt=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(dt||{}),De=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(De||{}),mt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(mt||{}),Et=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(Et||{}),et=(n=>(n.THROW="throw",n.WARN="warn",n.IGNORE="ignore",n))(et||{}),gt=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(gt||{}),Fe=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n.OT_MIGRATION="ot_migration",n))(Fe||{});const tr=(n,e)=>!!Object.keys(e).includes(n.notice_key),es=n=>!n||n===De.OPT_OUT?!1:n===De.OPT_IN?!0:n===De.ACKNOWLEDGE,Vt=(n,e)=>n?e===dt.NOTICE_ONLY?De.ACKNOWLEDGE:De.OPT_IN:De.OPT_OUT,sr=n=>typeof n=="string"?es(n):n,nr=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var ir=Object.defineProperty,rr=Object.defineProperties,or=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,ar=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Is=(n,e,t)=>e in n?ir(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rt=(n,e)=>{for(var t in e||(e={}))ar.call(e,t)&&Is(n,t,e[t]);if(Ts)for(var t of Ts(e))lr.call(e,t)&&Is(n,t,e[t]);return n},cr=(n,e)=>rr(n,or(e));const ut=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Os=n=>!!(n&&n.every(e=>e.default_preference===De.OPT_IN)),dr=n=>{if(n){if(n.location&&nr.test(n.location))return n.location.replace("-","_").toLowerCase();if(n.country&&n.region)return`${n.country.toLowerCase()}_${n.region.toLowerCase()}`}},Ns=n=>n.fidesConsentOverride===Fe.ACCEPT||n.fidesConsentOverride===Fe.REJECT,Er=(n,e,t,s)=>{var i,r,o,a,l,E;return s?.fidesDisableBanner||!ut(n)||s.fidesModalDisplay==="immediate"?!1:((i=n.experience_config)==null?void 0:i.component)===gt.TCF_OVERLAY&&e?s&&Ns(s)?!1:(r=n.meta)!=null&&r.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((o=n.experience_config)==null?void 0:o.component)===gt.MODAL||((a=n.experience_config)==null?void 0:a.component)===gt.HEADLESS||!((l=n?.privacy_notices)!=null&&l.length)?!1:t?s&&Ns(s)?!1:e?.fides_meta.consentMethod===Fe.GPC?!0:!((E=n.privacy_notices)==null?void 0:E.every(S=>tr(S,t))):!0},ur=n=>{if(!n)return{};try{const e=atob(n),t=JSON.parse(e);return Object.fromEntries(Object.entries(t).map(([s,i])=>[s,!!i]))}catch(e){throw new Error("Failed to decode Notice Consent string:",{cause:e})}},Sr=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=mt.OMIT})=>{if(!e?.length)return n;const i=Rt({},n);return s===mt.INCLUDE?e.forEach(r=>{i[r]=t===Et.CONSENT_MECHANISM?De.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},_r=({consent:n,flagType:e=Et.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==Et.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,sr(o)]));const i=Object.values(n).some(r=>typeof r=="boolean");if(i&&!t)throw new Error("Cannot transform boolean consent values to consent mechanisms without consent mechanisms map");return i?(Object.keys(n).forEach(r=>{const o=n[r];if(typeof o=="string")s[r]=o;else{const a=t[r];s[r]=Vt(o,a)}}),s):Rt({},n)},fs=(n,e,t=[],s,i)=>{var r,o,a;const l=Rt({},n),E=(r=window.Fides)==null?void 0:r.options,u=(o=E?.fidesConsentNonApplicableFlagMode)!=null?o:mt.OMIT,S=(a=E?.fidesConsentFlagType)!=null?a:Et.BOOLEAN,d={};Object.assign(d,Sr({consent:{},nonApplicableNotices:e??[],flagType:S,mode:u}));const O=t.reduce((T,H)=>cr(Rt({},T),{[H.notice_key]:H.consent_mechanism}),{});return Object.assign(d,_r({consent:l,consentMechanisms:O,flagType:S})),d},hr=(n,e,t)=>new Proxy(n,{get(s,i){if(s[i.toString()]===void 0){const r=e.fidesConsentFlagType===Et.CONSENT_MECHANISM;return!t&&i.toString()==="essential"?r?dt.NOTICE_ONLY:!0:r?dt.OPT_OUT:!1}return s[i.toString()]}});var ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Mt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof ts=="object"&&ts;(r.global===r||r.window===r)&&(t=r);var o=function(T){this.message=T};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(T){throw new o(T)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=/[\t\n\f\r ]/g,u=function(T){T=String(T).replace(E,"");var H=T.length;H%4==0&&(T=T.replace(/==?$/,""),H=T.length),(H%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var Y=0,j,Z,W="",Re=-1;++Re<H;)Z=l.indexOf(T.charAt(Re)),j=Y%4?j*64+Z:Z,Y++%4&&(W+=String.fromCharCode(255&j>>(-2*Y&6)));return W},S=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var H=T.length%3,Y="",j=-1,Z,W,Re,Ie,ht=T.length-H;++j<ht;)Z=T.charCodeAt(j)<<16,W=T.charCodeAt(++j)<<8,Re=T.charCodeAt(++j),Ie=Z+W+Re,Y+=l.charAt(Ie>>18&63)+l.charAt(Ie>>12&63)+l.charAt(Ie>>6&63)+l.charAt(Ie&63);return H==2?(Z=T.charCodeAt(j)<<8,W=T.charCodeAt(++j),Ie=Z+W,Y+=l.charAt(Ie>>10)+l.charAt(Ie>>4&63)+l.charAt(Ie<<2&63)+"="):H==1&&(Ie=T.charCodeAt(j),Y+=l.charAt(Ie>>2)+l.charAt(Ie<<4&63)+"=="),Y},d={encode:S,decode:u,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=d;else for(var O in d)d.hasOwnProperty(O)&&(s[O]=d[O]);else t.base64=d})(ts)}(Mt,Mt.exports);var As=Mt.exports;/*! js-cookie v3.0.5 | MIT */function vt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var pr={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ss(n,e){function t(i,r,o){if(!(typeof document>"u")){o=vt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),E=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(o[u]=n.read(E,u),i===u)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",vt({},r,{expires:-1}))},withAttributes:function(i){return ss(this.converter,vt({},this.attributes,i))},withConverter:function(i){return ss(vt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var gr=ss(pr,{path:"/"});let bt;const Tr=new Uint8Array(16);function Ir(){if(!bt&&(bt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bt(Tr)}const Ae=[];for(let n=0;n<256;++n)Ae.push((n+256).toString(16).slice(1));function Or(n,e=0){return Ae[n[e+0]]+Ae[n[e+1]]+Ae[n[e+2]]+Ae[n[e+3]]+"-"+Ae[n[e+4]]+Ae[n[e+5]]+"-"+Ae[n[e+6]]+Ae[n[e+7]]+"-"+Ae[n[e+8]]+Ae[n[e+9]]+"-"+Ae[n[e+10]]+Ae[n[e+11]]+Ae[n[e+12]]+Ae[n[e+13]]+Ae[n[e+14]]+Ae[n[e+15]]}const Nr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Cs={randomUUID:Nr};function Ps(n,e,t){if(Cs.randomUUID&&!n)return Cs.randomUUID();n=n||{};const s=n.random||(n.rng||Ir)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Or(s)}var ns=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(ns||{});const is=407,Lt=",",fr=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],Ar=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];fr.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),ns.CONSENT.toString(),ns.LEGITIMATE_INTERESTS.toString();const Cr={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var Pr=Object.defineProperty,wr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,Ds=(n,e,t)=>e in n?Pr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rr=(n,e)=>{for(var t in e||(e={}))mr.call(e,t)&&Ds(n,t,e[t]);if(ws)for(var t of ws(e))Vr.call(e,t)&&Ds(n,t,e[t]);return n},Mr=(n,e)=>wr(n,Dr(e)),vr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const ms="fides_consent",br=365,Gt=gr.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),Lr=()=>Ps();Lr();const Gr=n=>Gt.get(n),yr=()=>{const n=Gr(ms);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(As.decode(n))}catch{return}}},Vs=(n,e=!1)=>{if(typeof document>"u")return;const s=new Date().toISOString();n.fides_meta.updatedAt=s;let i=JSON.stringify(n);e&&(i=As.encode(i));const r=window.location.hostname.split(".");let o="";for(let a=1;a<=r.length;a+=1)if(o=r.slice(-a).join("."),Gt.set(ms,i,{path:"/",domain:o,expires:br})){const E=yr();if(E&&E.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},Ur=n=>{const e={};return Ar.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,es(r.preference)]))}),e},Fr=(n,e=!0)=>{n.forEach(t=>{var s;if(Gt.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;Gt.remove(t.name,{domain:`.${i}`})}})},xr=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,es(s)]));return Object.fromEntries(e)},Br=(n,e)=>vr(void 0,null,function*(){return Mr(Rr({},n),{consent:xr(e)})}),We=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},yt=(n,e)=>{if(!e?.vendors)return;const{source:t,id:s}=We(n);if(t==="gvl"||t===void 0)return e.vendors[s]},Hr=n=>We(n).source==="gacp",$r=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(s=>s.id).filter(s=>yt(s,n.gvl)).map(s=>+We(s).id)},Kr=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(i=>yt(i,n.gvl)).map(i=>+We(i).id)},Rs=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(Lt);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Ms=n=>{var e;const t=n.getGppString();if(!t)return window.Fides.fides_string;const s=new Array(4).fill(""),i=(((e=window.Fides.fides_string)==null?void 0:e.split(Lt))||[]).concat(s);return s.map((o,a)=>a<2?`${i[a]},`:a===2?t:a===3&&i[3]?`,${i[3]}`:o).join("")},zr=1,Ut={us:{name:X.NAME,id:X.ID},us_ca:{name:ie.NAME,id:ie.ID},us_co:{name:oe.NAME,id:oe.ID},us_ct:{name:le.NAME,id:le.ID},us_ut:{name:ae.NAME,id:ae.ID},us_va:{name:re.NAME,id:re.ID},us_de:{name:Se.NAME,id:Se.ID},us_fl:{name:ce.NAME,id:ce.ID},us_ia:{name:_e.NAME,id:_e.ID},us_mt:{name:de.NAME,id:de.ID},us_ne:{name:he.NAME,id:he.ID},us_nh:{name:pe.NAME,id:pe.ID},us_nj:{name:ge.NAME,id:ge.ID},us_or:{name:Ee.NAME,id:Ee.ID},us_tn:{name:Te.NAME,id:Te.ID},us_tx:{name:ue.NAME,id:ue.ID}};var $e=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))($e||{});function St(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}function kr(n){var e;if((e=n?.experience_config)!=null&&e.translations){const{translations:t}=n.experience_config,s=t.find(i=>i.is_default);return s?.language}}function Yr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>St(r.language,n));if(i)return i}const s=t.translations.find(i=>St(i.language,e));return s||t.translations[0]||null}function jr(n,e,t){if(!t||!t.translations)return null;if(n){const i=t.translations.find(r=>St(r.language,n));if(i)return i}const s=t.translations.find(i=>St(i.language,e));return s||t.translations[0]||null}var Wr=Object.defineProperty,Qr=Object.defineProperties,qr=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,bs=(n,e,t)=>e in n?Wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e)=>{for(var t in e||(e={}))Jr.call(e,t)&&bs(n,t,e[t]);if(vs)for(var t of vs(e))Xr.call(e,t)&&bs(n,t,e[t]);return n},Gs=(n,e)=>Qr(n,qr(e)),Zr=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const eo={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},to="Fides.js",so=(n,e,t,s,i)=>Zr(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=Gs(Ls({},eo),{body:JSON.stringify(Gs(Ls({},e),{source:to}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var no=Object.defineProperty,io=Object.defineProperties,ro=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable,Us=(n,e,t)=>e in n?no(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tt=(n,e)=>{for(var t in e||(e={}))oo.call(e,t)&&Us(n,t,e[t]);if(ys)for(var t of ys(e))ao.call(e,t)&&Us(n,t,e[t]);return n},lo=(n,e)=>io(n,ro(e)),Ft=(n=>(n.FIDES="fides",n.EXTERNAL="external",n))(Ft||{});const Fs=(n,e,t)=>{var s,i,r,o,a,l,E,u;const S=e?Tt({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const d=Tt({consentMethod:S?.fides_meta.consentMethod},t);(s=t?.trigger)!=null&&s.origin||(d.trigger=Tt(Tt({},d.trigger),{origin:"fides"}));const O=(i=performance?.mark)==null?void 0:i.call(performance,n),T=O?.startTime,H=S;H&&S?.consent&&(H.consent=fs(S.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(l=(a=window.Fides)==null?void 0:a.experience)==null?void 0:l.privacy_notices));const Y=new CustomEvent(n,{detail:lo(Tt({},H),{debug:!!((u=(E=window.Fides)==null?void 0:E.options)!=null&&u.debug),extraDetails:d,timestamp:T}),bubbles:!0});window.dispatchEvent(Y)}};var co=Object.defineProperty,Eo=(n,e,t)=>e in n?co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,uo=(n,e,t)=>Eo(n,e+"",t);class So{constructor(){uo(this,"servedNoticeHistoryId",null)}getServedNoticeHistoryId(){return this.servedNoticeHistoryId||(this.servedNoticeHistoryId=Ps()),this.servedNoticeHistoryId}reset(){this.servedNoticeHistoryId=null}hasLifecycleId(){return this.servedNoticeHistoryId!==null}}const _o=new So;var ho=Object.defineProperty,po=Object.defineProperties,go=Object.getOwnPropertyDescriptors,xs=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Bs=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ke=(n,e)=>{for(var t in e||(e={}))To.call(e,t)&&Bs(n,t,e[t]);if(xs)for(var t of xs(e))Io.call(e,t)&&Bs(n,t,e[t]);return n},xt=(n,e)=>po(n,go(e)),rs=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Oo=[Fe.SCRIPT,Fe.GPC,Fe.OT_MIGRATION];function No(n,e,t,s,i,r,o,a,l){return rs(this,null,function*(){const E=(r||[]).map(S=>({preference:S.consentPreference,privacy_notice_history_id:S.noticeHistoryId||""})),u=Ke({browser_identity:e.identity,preferences:E,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:t.property_id},o??[]);yield so(s,u,n,e,t)})}const fo=n=>rs(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,eventExtraDetails:l,servedNoticeHistoryId:E,tcf:u,updateCookie:S}){var d,O,T,H,Y,j,Z,W,Re;if(!S&&e&&(S=we=>Br(we,e)),!S&&!e)throw new Error("updateCookie is required");const Ie=xt(Ke({},l?.trigger),{origin:((d=l?.trigger)==null?void 0:d.origin)||(Oo.includes(i)?Ft.EXTERNAL:Ft.FIDES)}),ht=yield S(a);Object.assign(a,ht),Object.assign(a.fides_meta,{consentMethod:i}),Fs("FidesUpdating",a,xt(Ke({},l),{trigger:Ie}));const At=fs(a.consent,(T=(O=window.Fides)==null?void 0:O.experience)==null?void 0:T.non_applicable_privacy_notices,(Y=(H=window.Fides)==null?void 0:H.experience)==null?void 0:Y.privacy_notices),ne=!!((Z=(j=window.Fides)==null?void 0:j.experience)!=null&&Z.non_applicable_privacy_notices)||!!((Re=(W=window.Fides)==null?void 0:W.experience)!=null&&Re.privacy_notices);if(window.Fides.consent=hr(At,r,ne),window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Vs(xt(Ke({},a),{consent:At}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield No(r,a,s,i,t,e,u,o,E)}catch{}e&&e.filter(we=>we.consentPreference===De.OPT_OUT).forEach(we=>{var Ge,Xe;(Ge=we.notice)!=null&&Ge.cookies&&Fr(we.notice.cookies,(Xe=s.experience_config)==null?void 0:Xe.auto_subdomain_cookie_deletion)}),Fs("FidesUpdated",a,xt(Ke({},l),{trigger:Ie}))}),Hs=(n,e,t,s)=>Object.entries(t).reduce((i,[r,o])=>{if(i)return i;const a=e.find(S=>S===r);if(a&&!o&&s!==Fe.OT_MIGRATION)return new Error(`Provided notice key '${r}' is not applicable to the current experience.`);const l=n.find(S=>S.notice_key===r);if(!a&&!l)return new Error(`'${r}' is not a valid notice key`);const u=l?.consent_mechanism===dt.NOTICE_ONLY;return u&&o!==!0&&o!==De.ACKNOWLEDGE&&s!==Fe.OT_MIGRATION?new Error(`Invalid consent value for notice-only notice key: '${r}'. Must be \`true\` or "acknowledge"`):!u&&typeof o!="boolean"&&o!==De.OPT_IN&&o!==De.OPT_OUT?new Error(`Invalid consent value for notice key: '${r}'. Must be a boolean or "opt_in" or "opt_out"`):null},null),$s=(n,e)=>rs(void 0,null,function*(){var t;const{experience:s,cookie:i,config:r,locale:o}=n;if(!s)throw new Error("Experience must be initialized before updating consent");if(!r)throw new Error("Config is not initialized");if(!i)throw new Error("Cookie is not initialized");if(!e?.noticeConsent&&!e?.fidesString&&!e?.tcf)throw new Error("Either consent object or fidesString must be provided");if(e?.validation&&!Object.values(et).includes(e.validation))throw new Error(`Validation must be one of: ${Object.values(et).join(", ")} (default is ${et.THROW})`);const{noticeConsent:a,fidesString:l,validation:E=et.THROW,consentMethod:u=Fe.SCRIPT,eventExtraDetails:S={trigger:{origin:Ft.EXTERNAL}},tcf:d,updateCookie:O}=e,{experience_config:T,privacy_notices:H,non_applicable_privacy_notices:Y}=s,j=kr(s)||Ji,Z=ne=>{if(E===et.THROW)throw new Error(ne);E===et.WARN&&console.warn(ne)};let W=i.consent||{};if(l)try{const ne=Rs(l);if(ne.nc){const we=ur(ne.nc);W=Ke(Ke({},i.consent),we);const Ge=Hs(H||[],Y||[],W,u);Ge&&Z(Ge.message)}}catch(ne){const we=ne instanceof Error?ne.message:String(ne);Z(`Invalid fidesString provided: ${we}`)}else if(a){const ne=Hs(H||[],Y||[],a,u);ne&&Z(ne.message),W=Ke(Ke({},i.consent),a)}const Re=[];Object.entries(W).forEach(([ne,we])=>{const Ge=H?.find(Xe=>Xe.notice_key===ne);if(Ge){const Xe=Yr(o,j,Ge),as=Xe?.privacy_notice_history_id;let jt;if(typeof we=="boolean"?jt=Vt(we,Ge.consent_mechanism):jt=we,as){const un=new er(Ge,jt,as);Re.push(un)}}});let Ie;if((t=T?.translations)!=null&&t.length){const ne=jr(o,j,T);Ie=ne?.privacy_experience_config_history_id}const ht=dr(r.geolocation),At=_o.getServedNoticeHistoryId();return fo({consentPreferencesToSave:Re,privacyExperienceConfigHistoryId:Ie,experience:s,consentMethod:u,options:r.options,userLocationString:ht,cookie:i,eventExtraDetails:S,servedNoticeHistoryId:At,tcf:d,updateCookie:O})});class Qe extends Error{constructor(e){super(e),this.name="DecodingError"}}class ze extends Error{constructor(e){super(e),this.name="EncodingError"}}class _t extends Error{constructor(e){super(e),this.name="GVLError"}}class ke extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class os{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new ze("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Qe("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Ye{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Ye.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Ye.langSet.has(e))return e;if(Ye.langSet.has(t))return t;const s=t+"-"+t;if(Ye.langSet.has(s))return s;for(const i of Ye.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Ye.langSet.forEach(e)}get size(){return Ye.langSet.size}}class _{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class It{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var be;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(be||(be={}));class Be extends It{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new Be;if(t.length!==2)throw new ke("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${Be.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===be.NOT_ALLOWED||this.restrictionType===be.REQUIRE_CONSENT||this.restrictionType===be.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Ks extends It{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===be.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case be.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case be.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(Be.unHash(i)):t.push(Be.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(Be.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=Be.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var zs;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(zs||(zs={}));var q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(q||(q={}));class ks{static ID_TO_KEY=[q.CORE,q.VENDORS_DISCLOSED,q.VENDORS_ALLOWED,q.PUBLISHER_TC];static KEY_TO_ID={[q.CORE]:0,[q.VENDORS_DISCLOSED]:1,[q.VENDORS_ALLOWED]:2,[q.PUBLISHER_TC]:3}}class me extends It{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ke("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[_.cmpId]=12;static[_.cmpVersion]=12;static[_.consentLanguage]=12;static[_.consentScreen]=6;static[_.created]=36;static[_.isServiceSpecific]=1;static[_.lastUpdated]=36;static[_.policyVersion]=6;static[_.publisherCountryCode]=12;static[_.publisherLegitimateInterests]=24;static[_.publisherConsents]=24;static[_.purposeConsents]=24;static[_.purposeLegitimateInterests]=24;static[_.purposeOneTreatment]=1;static[_.specialFeatureOptins]=12;static[_.useNonStandardTexts]=1;static[_.vendorListVersion]=12;static[_.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class xe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new ze(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");return parseInt(e,2)}}class Ys{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Qe("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class qe{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=xe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new Qe("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)xe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class js{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new ze(`invalid language code: ${e}`);if(t%2===1)throw new ze(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Qe("invalid bit length for language");return s}}class Ao{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,E="";for(let u=0;u<o;u++){const S=r[u];if(l===0&&(a++,l=S),u===o-1||r[u+1]>s(S,r[o-1])){const d=S!==l;E+=xe.encode(d),E+=P.encode(l,g.vendorId),d&&(E+=P.encode(S,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=E})}return t}static decode(e){let t=0;const s=new Ks,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new Be(o,a),E=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let u=0;u<E;u++){const S=xe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const d=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,S){const O=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,O<d)throw new Qe(`Invalid RangeEntry: endVendorId ${O} is less than ${d}`);for(let T=d;T<=O;T++)s.add(T,l)}else s.add(d,l)}}return s.bitLength=t,s}}var Ot;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Ot||(Ot={}));class Nt{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,E=g.vendorId*2+g.singleOrRange+g.numEntries;let u=a+g.numEntries;return e.forEach((S,d)=>{r+=xe.encode(S),o=e.maxId>E&&u<l,o&&S&&(e.has(d+1)?s.length===0&&(s.push(d),u+=g.singleOrRange,u+=g.vendorId):(s.push(d),u+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(Ot.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(Ot.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Ot.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new Qe("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const E=xe.decode(e.charAt(i));i+=g.singleOrRange;const u=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,E){const S=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let d=u;d<=S;d++)s.set(d)}else s.set(u)}}else{const a=e.substr(i,r);i+=r,s=qe.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=xe.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function Ws(){return{[_.version]:P,[_.created]:Ys,[_.lastUpdated]:Ys,[_.cmpId]:P,[_.cmpVersion]:P,[_.consentScreen]:P,[_.consentLanguage]:js,[_.vendorListVersion]:P,[_.policyVersion]:P,[_.isServiceSpecific]:xe,[_.useNonStandardTexts]:xe,[_.specialFeatureOptins]:qe,[_.purposeConsents]:qe,[_.purposeLegitimateInterests]:qe,[_.purposeOneTreatment]:xe,[_.publisherCountryCode]:js,[_.vendorConsents]:Nt,[_.vendorLegitimateInterests]:Nt,[_.publisherRestrictions]:Ao,segmentType:P,[_.vendorsDisclosed]:Nt,[_.vendorsAllowed]:Nt,[_.publisherConsents]:qe,[_.publisherLegitimateInterests]:qe,[_.numCustomPurposes]:P,[_.publisherCustomConsents]:qe,[_.publisherCustomLegitimateInterests]:qe}}class Co{1={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.purposeConsents,_.vendorConsents]};2={[q.CORE]:[_.version,_.created,_.lastUpdated,_.cmpId,_.cmpVersion,_.consentScreen,_.consentLanguage,_.vendorListVersion,_.policyVersion,_.isServiceSpecific,_.useNonStandardTexts,_.specialFeatureOptins,_.purposeConsents,_.purposeLegitimateInterests,_.purposeOneTreatment,_.publisherCountryCode,_.vendorConsents,_.vendorLegitimateInterests,_.publisherRestrictions],[q.PUBLISHER_TC]:[_.publisherConsents,_.publisherLegitimateInterests,_.numCustomPurposes,_.publisherCustomConsents,_.publisherCustomLegitimateInterests],[q.VENDORS_ALLOWED]:[_.vendorsAllowed],[q.VENDORS_DISCLOSED]:[_.vendorsDisclosed]}}class Po{1=[q.CORE];2=[q.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(q.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[_.supportOOB]===!0)&&this[2].push(q.VENDORS_DISCLOSED),s&&(e[_.supportOOB]&&e[_.vendorsAllowed].size>0&&this[2].push(q.VENDORS_ALLOWED),this[2].push(q.PUBLISHER_TC))}}}class Qs{static fieldSequence=new Co;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new ze(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==q.CORE&&(i=P.encode(ks.KEY_TO_ID[t],g.segmentType));const r=Ws();return s.forEach(o=>{const a=e[o],l=r[o];let E=g[o];E===void 0&&this.isPublisherCustom(o)&&(E=Number(e[_.numCustomPurposes]));try{i+=l.encode(a,E)}catch(u){throw new ze(`Error encoding ${t}->${o}: ${u.message}`)}}),os.encode(i)}static decode(e,t,s){const i=os.decode(e);let r=0;s===q.CORE&&(t.version=P.decode(i.substr(r,g[_.version]),g[_.version])),s!==q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Ws();return o.forEach(l=>{const E=a[l];let u=g[l];if(u===void 0&&this.isPublisherCustom(l)&&(u=Number(t[_.numCustomPurposes])),u!==0){const S=i.substr(r,u);if(E===Nt?t[l]=E.decode(S,t.version):t[l]=E.decode(S,u),Number.isInteger(u))r+=u;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Qe(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class wo{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0)if(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&l.purposes.length>0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const E=e.publisherRestrictions.getRestrictions(a);let u=!1;for(let S=0,d=E.length;S<d&&!u;S++)u=E[S].restrictionType===be.REQUIRE_CONSENT&&r==="purposes"||E[S].restrictionType===be.REQUIRE_LI&&r==="legIntPurposes";u||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new ze("Unable to encode TCModel without a GVL");if(!s.isReady)throw new ze("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new ze(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Do{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let d=a.response;if(typeof d=="string")try{d=JSON.parse(d)}catch{}r(d)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},E=()=>{o(new Error("error"))},u=()=>{o(new Error("aborted"))},S=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",E),a.addEventListener("abort",u),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=S,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class f extends It{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Ye;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new _t("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=f.baseUrl,i=t?.language;if(i)try{i=f.consentLanguages.parseLanguage(i)}catch(r){throw new _t("Error during parsing the language: "+r.message)}if(this.lang_=i||f.DEFAULT_LANGUAGE,this.cacheLang_=i||f.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new _t("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;f.CACHE.has(r)?(this.populate(f.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=f.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else f.CACHE.has(f.LATEST_CACHE_KEY)?(this.populate(f.CACHE.get(f.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+f.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&f.LANGUAGE_CACHE.size>0?(f.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(f.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(f.CACHE.delete(e),t=!0):e===void 0&&(f.CACHE=new Map,t=!0),t}cacheLanguage(){f.LANGUAGE_CACHE.has(this.cacheLang_)||f.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Do.fetch(e))}catch(t){throw new _t(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=f.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=f.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=f.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=f.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=f.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=f.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=f.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=f.consentLanguages.parseLanguage(e)}catch(i){throw new _t("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===f.DEFAULT_LANGUAGE.toLowerCase()&&!f.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,f.LANGUAGE_CACHE.has(s)){const i=f.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=f.baseUrl+f.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new _t("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&f.CACHE.set(f.LATEST_CACHE_KEY,this.getJson()),f.CACHE.has(this.vendorListVersion)||f.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new f(this.getJson());return this.lang_!==f.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class qs extends It{static consentLanguages=f.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new Ks;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){f.isInstanceOf(e)||(e=new f(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class mo{static encode(e,t){let s="",i;return e=wo.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Po(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=Qs.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new qs);for(let r=0;r<i;r++){const o=s[r],l=os.decode(o.charAt(0)).substr(0,g.segmentType),E=ks.ID_TO_KEY[P.decode(l,g.segmentType).toString()];Qs.decode(o,t,E)}return t}}var Je;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Je||(Je={}));var Bt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Bt||(Bt={}));var Ht;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ht||(Ht={}));var Js;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Js||(Js={}));class $t{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class Kt extends $t{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Zs(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class Vo{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new Kt(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class fe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new Vo;static cmpStatus=Bt.LOADING;static disabled=!1;static displayStatus=Ht.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Bt.LOADING,this.disabled=!1,this.displayStatus=Ht.HIDDEN,this.eventQueue.clear()}}class Xs{cmpId=fe.cmpId;cmpVersion=fe.cmpVersion;gdprApplies=fe.gdprApplies;tcfPolicyVersion=fe.tcfPolicyVersion}class Zs extends Xs{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=fe.eventStatus,this.cmpStatus=fe.cmpStatus,this.listenerId=t,fe.gdprApplies){const s=fe.tcModel;this.tcString=fe.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class Ro extends Zs{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),E=t[l].substr(0,i),u=t[l].substr(i+1);t[l]=E+a+u})}}return t}}class Mo extends Xs{cmpLoaded=!0;cmpStatus=fe.cmpStatus;displayStatus=fe.displayStatus;apiVersion=String(fe.apiVersion);gvlVersion;constructor(){super(),fe.tcModel&&fe.tcModel.vendorListVersion&&(this.gvlVersion=+fe.tcModel.vendorListVersion)}}class vo extends $t{respond(){this.invokeCallback(new Mo)}}class bo extends Kt{respond(){this.throwIfParamInvalid(),this.invokeCallback(new Ro(this.param))}}class Lo extends $t{respond(){const e=fe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new f(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Go extends Kt{respond(){this.listenerId=fe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class yo extends $t{respond(){this.invokeCallback(fe.eventQueue.remove(this.param))}}class Ca{static[Je.PING]=vo;static[Je.GET_TC_DATA]=Kt;static[Je.GET_IN_APP_TC_DATA]=bo;static[Je.GET_VENDOR_LIST]=Lo;static[Je.ADD_EVENT_LISTENER]=Go;static[Je.REMOVE_EVENT_LISTENER]=yo}const Uo=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(Lt);return t.split(".")[0]}return e??""};var Fo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const xo=1,en=[1,3,4,5,6],Bo=2,Ho=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(Hr).map(o=>We(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Bo}~${s}~dv.${i}`},$o=n=>Fo(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const l=new qs(new f(e.gvl));yield l.gvl.readyPromise,l.cmpId=is,l.cmpVersion=xo,l.consentScreen=1,l.isServiceSpecific=!0,l.supportOOB=!1,e.tcf_publisher_country_code&&(l.publisherCountryCode=e.tcf_publisher_country_code);const E=e.minimal_tcf?Kr(e):$r(e);if(l.gvl.narrowVendorsTo(E),t){t.vendorsConsent.forEach(d=>{var O,T,H;if(yt(d,e.gvl)){const{id:Y}=We(d);if(l.vendorConsents.set(+Y),!((O=e.tcf_publisher_restrictions)!=null&&O.length)){const j=(T=e.gvl)==null?void 0:T.vendors[Y];j&&!((H=j?.purposes)!=null&&H.length)&&j.flexiblePurposes.forEach(Z=>{const W=new Be;W.purposeId=Z,W.restrictionType=be.REQUIRE_CONSENT,l.publisherRestrictions.add(+Y,W)})}}}),t.vendorsLegint.forEach(d=>{var O,T;if(e.minimal_tcf)(O=e.tcf_vendor_legitimate_interest_ids)==null||O.forEach(H=>{const{id:Y}=We(H);l.vendorLegitimateInterests.set(+Y)});else if(yt(d,e.gvl)){const H=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(Z=>Z.id===d)[0],Y=H?.purpose_legitimate_interests;let j=!1;if(Y&&(Y.map(W=>W.id).filter(W=>en.includes(W)).length&&(j=!0),!j)){const{id:W}=We(d);l.vendorLegitimateInterests.set(+W)}}}),Object.values((i=(s=e.gvl)==null?void 0:s.vendors)!=null?i:{}).forEach(d=>{var O,T;(O=d.specialPurposes)!=null&&O.length&&!((T=d.legIntPurposes)!=null&&T.length)&&l.vendorLegitimateInterests.set(d.id)}),t.purposesConsent.forEach(d=>{l.purposeConsents.set(+d)}),t.purposesLegint.forEach(d=>{const O=+d;en.includes(O)||l.purposeLegitimateInterests.set(O)}),t.specialFeatures.forEach(d=>{l.specialFeatureOptins.set(+d)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(d=>{d.vendors.forEach(O=>{const T=new Be;T.purposeId=d.purpose_id,T.restrictionType=d.restriction_type,l.publisherRestrictions.add(O,T)})}),a=mo.encode(l,{segments:[q.CORE]});const u=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(d=>d.id),S=Ho({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:u??[]});a=`${a}${Lt}${S}`}}catch(l){return console.error("Unable to instantiate GVL: ",l),Promise.resolve("")}return Promise.resolve(a)});var Ko=Object.defineProperty,zo=Object.defineProperties,ko=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,sn=(n,e,t)=>e in n?Ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wo=(n,e)=>{for(var t in e||(e={}))Yo.call(e,t)&&sn(n,t,e[t]);if(tn)for(var t of tn(e))jo.call(e,t)&&sn(n,t,e[t]);return n},Qo=(n,e)=>zo(n,ko(e)),qo=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(E){i(E)}},o=l=>{try{a(t.throw(l))}catch(E){i(E)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const tt=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=Vt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],st=n=>n?.length?n.map(e=>{const t=Vt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Jo=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:tt({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:tt({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:tt({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:tt({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:tt({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:tt({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:tt({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},Xo=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:st(e.purposesConsent),purpose_legitimate_interests_preferences:st(e.purposesLegint),special_feature_preferences:st(e.specialFeatures),vendor_consent_preferences:st(s),vendor_legitimate_interests_preferences:st(r),system_consent_preferences:st(t),system_legitimate_interests_preferences:st(i)}},Zo=(n,e,t,s,i,r)=>qo(void 0,null,function*(){var o;const a=yield $o({tcStringPreferences:t,experience:s});return Qo(Wo({},n),{fides_string:a,tcf_consent:Ur(e),tcf_version_hash:(o=s.meta)==null?void 0:o.version_hash})}),zt="us",ea=n=>n?.toLowerCase().startsWith("us"),ta=({experienceRegion:n,usApproach:e})=>ea(n)&&e===$e.NATIONAL?zt:n,sa=({gppApi:n,sectionName:e,gppSettings:t})=>{if(!t)return;[{gppSettingField:t.mspa_covered_transactions,cmpApiField:N.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:N.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:N.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:r})=>{const o=r===N.MSPA_COVERED_TRANSACTION;let a=2;!t.mspa_covered_transactions&&!o?a=0:i&&(a=1),n.setFieldValue(e,r,a)})},nn=n=>{const{region:e,gpp_settings:t,privacy_notices:s}=n;let i=ta({experienceRegion:e,usApproach:t?.us_approach}),r=Ut[i];return!r&&t?.us_approach===$e.ALL&&(i=zt,r=Ut[i]),r&&t?.us_approach===$e.ALL&&(s?.some(a=>{var l;return(l=a.gpp_field_mapping)==null?void 0:l.find(E=>E.region===e)})||(i=zt,r=Ut[i])),!r||i===zt&&t?.us_approach===$e.STATE?{}:{gppRegion:i,gppSection:r}},na=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s,noticeConsent:i})=>{i&&s.forEach(r=>{var o;const{notice_key:a,gpp_field_mapping:l}=r,E=i[a],u=(o=l?.find(S=>S.region===e))==null?void 0:o.mechanism;u&&u.forEach(S=>{let d=S.not_available;E===!1?d=S.opt_out:E&&(d=S.not_opt_out);let O=+d;d.length>1&&(O=d.split("").map(T=>+T)),n.setFieldValue(t.name,S.field,O)})})},ia=({gppApi:n,gppRegion:e,gppSection:t,privacyNotices:s})=>{s.forEach(i=>{var r;const{gpp_field_mapping:o}=i,a=(r=o?.find(l=>l.region===e))==null?void 0:r.notice;a&&a.forEach(l=>{n.setFieldValue(t.name,l,1)})})},ra=[1,3,4,5,6],oa=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[]}=e,{gppRegion:i,gppSection:r}=nn(e);return!i||!r||s.forEach(o=>{var a;const{notice_key:l,gpp_field_mapping:E}=o,u=(a=E?.find(S=>S.region===i))==null?void 0:a.mechanism;if(u){const S=u.some(d=>{const O=n.getFieldValue(r.name,d.field),T=Array.isArray(O)?O.join(""):String(O);return T===d.opt_out?!0:(T===d.not_opt_out,!1)});S!==void 0&&(t[l]=!S)}}),t},aa=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=Cr,a=n.getSection(k.NAME);if(!a)return o;const l=a.PurposeConsents.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),E=a.PurposeLegitimateInterests.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),u=a.VendorConsents.map(d=>`gvl.${d}`),S=a.VendorLegitimateInterests.map(d=>`gvl.${d}`);return o.purposesConsent=l,o.purposesLegint=E.filter(d=>!ra.includes(parseInt(d,10))),o.vendorsConsent=u,o.vendorsLegint=S,o.specialFeatures=a.SpecialFeatureOptins.map((d,O)=>d?(O+1).toString():null).filter(d=>d!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(d=>d.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(d=>d.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(d=>d.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(d=>d.toString()))||[]),o.customPurposesConsent=[],o},la=({fidesString:n,cmpApi:e})=>{const{gpp:t}=Rs(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(u=>St(u.language,s)))return;e.setGppString(t),e.setSignalStatus(Me.READY);const a=i.privacy_notices.map(u=>({notice:u,bestTranslation:u.translations.find(S=>St(S.language,s))||null}));let l,E;if(r){const u=aa({cmpApi:e,experience:i});E=i.minimal_tcf?Xo({experience:i,enabledIds:u}):Jo({experience:i,enabledIds:u}),l=d=>Zo(d,E,u,i);const S={};a.forEach(d=>{d.notice.consent_mechanism!==dt.NOTICE_ONLY?S[d.notice.notice_key]=u.purposesConsent.includes(d.notice.id):S[d.notice.notice_key]=!0}),$s(window.Fides,{noticeConsent:S,tcf:E,updateCookie:l})}else{const u=oa({cmpApi:e,experience:i});$s(window.Fides,{noticeConsent:u})}},rn="__gppLocator",on=n=>{if(!!!window.frames[n])if(window.document.body){const t=window.document.createElement("iframe");t.style.cssText="display:none",t.name=n,window.document.body.appendChild(t)}else setTimeout(()=>on(n),5)},ca=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},da=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,Ea=()=>{const n=[],e=[];let t;const s=(o,a,l,E)=>{if(o==="queue")return n;if(o==="events")return e;const u={gppVersion:"1.1",cmpStatus:rt.STUB,cmpDisplayStatus:je.HIDDEN,signalStatus:Me.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(o==="ping")a(u,!0);else if(o==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:a,parameter:l}),a({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:u},!0)}else if(o==="removeEventListener"){let S=!1;for(let d=0;d<e.length;d++)if(e[d].id===l){e.splice(d,1),S=!0;break}a({eventName:"listenerRemoved",listenerId:l,data:S,pingData:u},!0)}else o==="hasSection"?a(!1,!0):o==="getSection"||o==="getField"?a(null,!0):n.push([].slice.apply([o,a,l,E]));return null},i=o=>{const a=typeof o.data=="string";let l={};if(a)try{l=JSON.parse(o.data)}catch{l={}}else l=o.data;if(!da(l))return null;if(l.__gppCall&&window.__gpp){const u=l.__gppCall;window.__gpp(u.command,(S,d)=>{const O={__gppReturn:{returnValue:S,success:d,callId:u.callId}};o&&o.source&&o.source.postMessage&&o.source.postMessage(a?JSON.stringify(O):O,"*")},"parameter"in u?u.parameter:void 0,"version"in u?u.version:"1.1")}return null};ca(rn)||(on(rn),window.__gpp=s,window.addEventListener("message",i,!1))},an=(n,{cmpApi:e,experience:t,cookie:s})=>{const{gppRegion:i,gppSection:r}=nn(t);if(!i||!r)return[];const o=new Set;o.add(r),n({gppApi:e,gppRegion:i,gppSection:r,privacyNotices:t.privacy_notices||[],noticeConsent:s?.consent});const{gpp_settings:a}=t;return sa({gppApi:e,sectionName:r.name,gppSettings:a}),Array.from(o)},ln=({cmpApi:n,experience:e})=>an(ia,{cmpApi:n,experience:e}),cn=({cmpApi:n,cookie:e,experience:t})=>an(na,{cmpApi:n,cookie:e,experience:t}),dn=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,En=(n,e)=>{if(!ut(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!t?.enable_tcfeu_string)return!1;const s=Uo(n);return s?(e.setFieldValueBySectionId(k.ID,"CmpId",is),e.setSectionStringById(k.ID,s),!0):!1},ua=()=>{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(`${k.ID}:${k.NAME}`),(e.us_approach===$e.NATIONAL||e.us_approach===$e.ALL)&&n.push(`${X.ID}:${X.NAME}`),(e.us_approach===$e.STATE||e.us_approach===$e.ALL)&&Object.values(Ut).forEach(t=>{t.id!==X.ID&&n.push(`${t.id}:${t.name}`)}))}return n},Sa=()=>{Ea();const n=new qi(is,zr);n.setCmpStatus(rt.LOADED),window.addEventListener("FidesReady",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=ua();if(n.setSupportedAPIs(o),!ut(s))return;const{fidesString:a}=r;if(a&&la({fidesString:a,cmpApi:n}),!a&&(!Er(s,e.detail,i,r)||!r.tcfEnabled&&Os(s.privacy_notices)&&!dn(i,e.detail.fides_string,s.privacy_notices))){const l=En(e,n);l&&n.setApplicableSections([k.ID]);const E=ln({cmpApi:n,experience:s}),u=cn({cmpApi:n,cookie:e.detail,experience:s});u.length&&n.setApplicableSections(u.map(d=>d.id)),!l&&!E.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(Me.READY);const S=Ms(n);window.Fides.fides_string=S}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(ut(t)){!i.tcfEnabled&&Os(t.privacy_notices)&&!dn(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Me.READY):n.setSignalStatus(Me.NOT_READY),n.setCmpDisplayStatus(je.VISIBLE);const r=ln({cmpApi:n,experience:t});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(je.HIDDEN),n.setSignalStatus(Me.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(je.HIDDEN),En(e,n)&&(n.setApplicableSections([k.ID]),n.fireSectionChange("tcfeuv2")),ut(window.Fides.experience)){const s=cn({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});s.length&&(n.setApplicableSections(s.map(r=>r.id)),s.forEach(r=>{n.fireSectionChange(r.name)}));const i=Ms(n);window.Fides.cookie&&(window.Fides.fides_string=i,window.Fides.cookie.fides_string=i,Vs(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(Me.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&Sa()});
|