ethyca-fides 2.61.2b4__py2.py3-none-any.whl → 2.62.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/RECORD +93 -93
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/WHEEL +1 -1
- fides/_version.py +3 -3
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-preview.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +2 -2
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/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.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
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.61.2b4.dist-info → ethyca_fides-2.62.0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{BXgY7gp1yrU1L9K6Hyamm → HjKGzeR8dVp9pFhcBuU9r}/_buildManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/{BXgY7gp1yrU1L9K6Hyamm → HjKGzeR8dVp9pFhcBuU9r}/_ssgManifest.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
var Cr=Object.defineProperty,fr=(n,e,t)=>e in n?Cr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>fr(n,typeof e!="symbol"?e+"":e,t);class vn{constructor(e,t,s,i){Nt(this,"eventName"),Nt(this,"listenerId"),Nt(this,"data"),Nt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var mr=Object.defineProperty,Pr=(n,e,t)=>e in n?mr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Me=(n,e,t)=>Pr(n,typeof e!="symbol"?e+"":e,t);class It{constructor(e){Me(this,"gppVersion"),Me(this,"cmpStatus"),Me(this,"cmpDisplayStatus"),Me(this,"signalStatus"),Me(this,"supportedAPIs"),Me(this,"cmpId"),Me(this,"sectionList"),Me(this,"applicableSections"),Me(this,"gppString"),Me(this,"parsedSections"),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()}}var wr=Object.defineProperty,Dr=(n,e,t)=>e in n?wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>Dr(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){At(this,"callback"),At(this,"parameter"),At(this,"success",!0),At(this,"cmpApiContext"),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)}},br=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vn("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},vr=class extends nt{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Vr extends nt{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 Rr extends nt{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 yr extends nt{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 Ue;(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"})(Ue||(Ue={}));let Mr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vn("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}};var Ur=Object.defineProperty,Lr=(n,e,t)=>e in n?Ur(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>Lr(n,typeof e!="symbol"?e+"":e,t),Os,Ns,Is,As,Cs,fs;fs=Ue.ADD_EVENT_LISTENER,Cs=Ue.GET_FIELD,As=Ue.GET_SECTION,Is=Ue.HAS_SECTION,Ns=Ue.PING,Os=Ue.REMOVE_EVENT_LISTENER;let Ke=class{};st(Ke,fs,br),st(Ke,Cs,Vr),st(Ke,As,Rr),st(Ke,Is,yr),st(Ke,Ns,vr),st(Ke,Os,Mr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var Ye;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ye||(Ye={}));var ms;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ms||(ms={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var Gr=Object.defineProperty,Fr=(n,e,t)=>e in n?Gr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vn=(n,e,t)=>Fr(n,typeof e!="symbol"?e+"":e,t);class xr{constructor(e,t){if(Vn(this,"callQueue"),Vn(this,"customCommands"),Vn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Ue.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ue.REMOVE_EVENT_LISTENER,t!=null&&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 Ke[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 Ke[e]!==void 0}}var $r=Object.defineProperty,jr=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>jr(n,typeof e!="symbol"?e+"":e,t);let Hr=class{constructor(e){Rn(this,"eventQueue",new Map),Rn(this,"queueNumber",1e3),Rn(this,"cmpApiContext"),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 vn(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},ut=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var Br=Object.defineProperty,kr=(n,e,t)=>e in n?Br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ct=(n,e,t)=>kr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){Ct(this,"segments"),Ct(this,"encodedString",null),Ct(this,"dirty",!1),Ct(this,"decoded",!0),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 ut("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 ut("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 p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},se=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new se("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 p("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}}var Kr=Object.defineProperty,Yr=(n,e,t)=>e in n?Kr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Yr(n,typeof e!="symbol"?e+"":e,t);const yn=class Ts{encode(e){if(!/^[0-1]*$/.test(e))throw new se("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=V.decode(i),o=Ts.DICT.charAt(r);t+=o,s+=6}catch{throw new se("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ts.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}};Ps(yn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ps(yn,"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]]));let ws=yn;var zr=Object.defineProperty,Wr=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qr=(n,e,t)=>Wr(n,typeof e!="symbol"?e+"":e,t);const Mn=class extends ws{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}};Qr(Mn,"instance",new Mn);let H=Mn;var Jr=Object.defineProperty,qr=(n,e,t)=>e in n?Jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xr=(n,e,t)=>qr(n,typeof e!="symbol"?e+"":e,t);const Un=class{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 c=a.substring(e,i);a.decode(c),i+=c.length}catch(c){if(c.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};Xr(Un,"instance",new Un);let b=Un;class rt{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 p("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 ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new se("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Ds{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=V.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let c=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(c)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,r=c+2,c=e.indexOf("11",r);let S=rt.decode(e.substring(r,c+2))+i;i=S,r=c+2;for(let h=d;h<=S;h++)t.push(h)}else{let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,t.push(d),r=c+2}}return t}}let Zr=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var eo=Object.defineProperty,to=(n,e,t)=>e in n?eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>to(n,typeof e!="symbol"?e+"":e,t);class ve{constructor(e=!0){Ln(this,"hardFailIfMissing"),Ln(this,"validator"),Ln(this,"value"),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 Zr("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class no extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ds.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Ds.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var so=Object.defineProperty,io=(n,e,t)=>e in n?so(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ro=(n,e,t)=>io(n,typeof e!="symbol"?e+"":e,t);class l extends ve{constructor(e,t,s=!0){super(s),ro(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var oo=Object.defineProperty,ao=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,co=(n,e,t)=>ao(n,typeof e!="symbol"?e+"":e,t);class v{constructor(){co(this,"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 $e;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})($e||($e={}));const lo=[$e.ID,$e.VERSION,$e.SECTION_IDS];var Eo=Object.defineProperty,uo=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ft=(n,e,t)=>uo(n,typeof e!="symbol"?e+"":e,t);class P{constructor(){ft(this,"fields"),ft(this,"encodedString",null),ft(this,"dirty",!1),ft(this,"decoded",!0),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 ut("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 ut(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}}var So=Object.defineProperty,po=(n,e,t)=>e in n?So(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>po(n,typeof e!="symbol"?e+"":e,t);class ho extends P{constructor(e){super(),bs(this,"base64UrlEncoder",H.getInstance()),bs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return lo}initializeFields(){let e=new v;return e.put($e.ID.toString(),new l(6,Je.ID)),e.put($e.VERSION.toString(),new l(6,Je.VERSION)),e.put($e.SECTION_IDS.toString(),new no([])),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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var _o=Object.defineProperty,go=(n,e,t)=>e in n?_o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>go(n,typeof e!="symbol"?e+"":e,t);const mt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new ho),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(".")}};Gn(mt,"ID",3),Gn(mt,"VERSION",1),Gn(mt,"NAME","header");let Je=mt;var _;(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"})(_||(_={}));const To=[_.VERSION,_.CREATED,_.LAST_UPDATED,_.CMP_ID,_.CMP_VERSION,_.CONSENT_SCREEN,_.CONSENT_LANGUAGE,_.VENDOR_LIST_VERSION,_.POLICY_VERSION,_.IS_SERVICE_SPECIFIC,_.USE_NON_STANDARD_STACKS,_.SPECIAL_FEATURE_OPTINS,_.PURPOSE_CONSENTS,_.PURPOSE_LEGITIMATE_INTERESTS,_.PURPOSE_ONE_TREATMENT,_.PUBLISHER_COUNTRY_CODE,_.VENDOR_CONSENTS,_.VENDOR_LEGITIMATE_INTERESTS,_.PUBLISHER_RESTRICTIONS],Oo=[_.PUBLISHER_PURPOSES_SEGMENT_TYPE,_.PUBLISHER_CONSENTS,_.PUBLISHER_LEGITIMATE_INTERESTS,_.NUM_CUSTOM_PURPOSES,_.PUBLISHER_CUSTOM_CONSENTS,_.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],No=[_.VENDORS_ALLOWED_SEGMENT_TYPE,_.VENDORS_ALLOWED],Io=[_.VENDORS_DISCLOSED_SEGMENT_TYPE,_.VENDORS_DISCLOSED];var Ao=Object.defineProperty,Co=(n,e,t)=>e in n?Ao(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fo=(n,e,t)=>Co(n,typeof e!="symbol"?e+"":e,t);const Fn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};fo(Fn,"instance",new Fn);let St=Fn;class at{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let c=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=c;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class xn extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var mo=Object.defineProperty,Po=(n,e,t)=>e in n?mo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$n=(n,e,t)=>Po(n,typeof e!="symbol"?e+"":e,t);class wo{constructor(e,t,s){$n(this,"key"),$n(this,"type"),$n(this,"ids"),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}}var Do=Object.defineProperty,bo=(n,e,t)=>e in n?Do(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>bo(n,typeof e!="symbol"?e+"":e,t);class Vs extends ve{constructor(e,t,s,i=!0){super(i),vs(this,"keyBitStringLength"),vs(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new se(e)}}decode(e){try{let t=[],s=V.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let c=new xn([]).substring(e,i),d=at.decode(c);i+=c.length,t.push(new wo(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=V.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 c=te.substring(e,r,r+this.typeBitStringLength);r+=c.length,s+=c;let d=new xn([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class K extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Rs{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Rs.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Rs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new se("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var vo=Object.defineProperty,Vo=(n,e,t)=>e in n?vo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ro=(n,e,t)=>Vo(n,typeof e!="symbol"?e+"":e,t);class Le extends ve{constructor(e,t=!0){super(t),Ro(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(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 ys{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new se("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var yo=Object.defineProperty,Mo=(n,e,t)=>e in n?yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Uo=(n,e,t)=>Mo(n,typeof e!="symbol"?e+"":e,t);class jn extends ve{constructor(e,t,s=!0){super(s),Uo(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ys.encode(this.value,this.stringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=ys.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(s)}}}class qe extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=at.encode(this.value),s=t.length,i=e;if(s<=i)return V.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return V.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new se(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.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 p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new xn([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var Lo=Object.defineProperty,Go=(n,e,t)=>e in n?Lo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>Go(n,typeof e!="symbol"?e+"":e,t);class Fo extends P{constructor(e){super(),Ms(this,"base64UrlEncoder",St.getInstance()),Ms(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return To}initializeFields(){let e=new Date,t=new v;return t.put(_.VERSION.toString(),new l(6,X.VERSION)),t.put(_.CREATED.toString(),new Pt(e)),t.put(_.LAST_UPDATED.toString(),new Pt(e)),t.put(_.CMP_ID.toString(),new l(12,0)),t.put(_.CMP_VERSION.toString(),new l(12,0)),t.put(_.CONSENT_SCREEN.toString(),new l(6,0)),t.put(_.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(_.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(_.POLICY_VERSION.toString(),new l(6,2)),t.put(_.IS_SERVICE_SPECIFIC.toString(),new K(!1)),t.put(_.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(_.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_ONE_TREATMENT.toString(),new K(!1)),t.put(_.PUBLISHER_COUNTRY_CODE.toString(),new jn(2,"AA")),t.put(_.VENDOR_CONSENTS.toString(),new qe([])),t.put(_.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(_.PUBLISHER_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var xo=Object.defineProperty,$o=(n,e,t)=>e in n?xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jo=(n,e,t)=>$o(n,typeof e!="symbol"?e+"":e,t);class wt extends ve{constructor(e,t,s=!0){super(s),jo(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(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])}}var Ho=Object.defineProperty,Bo=(n,e,t)=>e in n?Ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>Bo(n,typeof e!="symbol"?e+"":e,t);class ko extends P{constructor(e){super(),Us(this,"base64UrlEncoder",St.getInstance()),Us(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Oo}initializeFields(){let e=new v;e.put(_.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(_.PUBLISHER_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(_.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(_.NUM_CUSTOM_PURPOSES.toString(),t),e.put(_.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(_.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 p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Ko=Object.defineProperty,Yo=(n,e,t)=>e in n?Ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>Yo(n,typeof e!="symbol"?e+"":e,t);class zo extends P{constructor(e){super(),Ls(this,"base64UrlEncoder",St.getInstance()),Ls(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return No}initializeFields(){let e=new v;return e.put(_.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(_.VENDORS_ALLOWED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var Wo=Object.defineProperty,Qo=(n,e,t)=>e in n?Wo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e,t)=>Qo(n,typeof e!="symbol"?e+"":e,t);class Jo extends P{constructor(e){super(),Gs(this,"base64UrlEncoder",St.getInstance()),Gs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Io}initializeFields(){let e=new v;return e.put(_.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(_.VENDORS_DISCLOSED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var qo=Object.defineProperty,Xo=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>Xo(n,typeof e!="symbol"?e+"":e,t);const Dt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new Fo),e.push(new ko),e.push(new zo),e.push(new Jo),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 p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(_.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!==_.CREATED&&e!==_.LAST_UPDATED){let s=new Date;super.setFieldValue(_.CREATED,s),super.setFieldValue(_.LAST_UPDATED,s)}}};Hn(Dt,"ID",2),Hn(Dt,"VERSION",2),Hn(Dt,"NAME","tcfeuv2");let X=Dt;var O;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(O||(O={}));const Zo=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],ea=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],ta=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];var na=Object.defineProperty,sa=(n,e,t)=>e in n?na(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>sa(n,typeof e!="symbol"?e+"":e,t);class ia extends P{constructor(e){super(),Fs(this,"base64UrlEncoder",H.getInstance()),Fs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Zo}initializeFields(){let e=new Date,t=new v;return t.put(O.VERSION.toString(),new l(6,Ae.VERSION)),t.put(O.CREATED.toString(),new Pt(e)),t.put(O.LAST_UPDATED.toString(),new Pt(e)),t.put(O.CMP_ID.toString(),new l(12,0)),t.put(O.CMP_VERSION.toString(),new l(12,0)),t.put(O.CONSENT_SCREEN.toString(),new l(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new l(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(O.PUB_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var ra=Object.defineProperty,oa=(n,e,t)=>e in n?ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>oa(n,typeof e!="symbol"?e+"":e,t);class aa extends P{constructor(e){super(),xs(this,"base64UrlEncoder",H.getInstance()),xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ea}initializeFields(){let e=new v;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(O.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 p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var ca=Object.defineProperty,la=(n,e,t)=>e in n?ca(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>la(n,typeof e!="symbol"?e+"":e,t);class da extends P{constructor(e){super(),$s(this,"base64UrlEncoder",St.getInstance()),$s(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ta}initializeFields(){let e=new v;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(O.DISCLOSED_VENDORS.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var Ea=Object.defineProperty,ua=(n,e,t)=>e in n?Ea(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bn=(n,e,t)=>ua(n,typeof e!="symbol"?e+"":e,t);const bt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new ia),e.push(new aa),e.push(new da),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 p("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}};Bn(bt,"ID",5),Bn(bt,"VERSION",1),Bn(bt,"NAME","tcfcav1");let Ae=bt;var Sa=Object.defineProperty,pa=(n,e,t)=>e in n?Sa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>pa(n,typeof e!="symbol"?e+"":e,t);class kn{constructor(e,t){js(this,"validator"),js(this,"value",null),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}}var ha=Object.defineProperty,_a=(n,e,t)=>e in n?ha(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>_a(n,typeof e!="symbol"?e+"":e,t);class ga{constructor(e,t){Hs(this,"validator"),Hs(this,"value",null),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}}var Ta=Object.defineProperty,Oa=(n,e,t)=>e in n?Ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Na=(n,e,t)=>Oa(n,typeof e!="symbol"?e+"":e,t);class Ia{constructor(){Na(this,"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 ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(ie||(ie={}));const Aa=[ie.VERSION,ie.NOTICE,ie.OPT_OUT_SALE,ie.LSPA_COVERED];class Ca extends P{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Aa}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new Ia;return t.put(ie.VERSION,new ga(Ce.VERSION)),t.put(ie.NOTICE,new kn("-",e)),t.put(ie.OPT_OUT_SALE,new kn("-",e)),t.put(ie.LSPA_COVERED,new kn("-",e)),t}encodeSegment(e){let t="";return t+=e.get(ie.VERSION).getValue(),t+=e.get(ie.NOTICE).getValue(),t+=e.get(ie.OPT_OUT_SALE).getValue(),t+=e.get(ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ie.NOTICE).setValue(e.charAt(1)),t.get(ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var fa=Object.defineProperty,ma=(n,e,t)=>e in n?fa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>ma(n,typeof e!="symbol"?e+"":e,t);const vt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new Ca),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(".")}};Kn(vt,"ID",6),Kn(vt,"VERSION",1),Kn(vt,"NAME","uspv1");let Ce=vt;var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const Pa=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],wa=[I.GPC_SEGMENT_TYPE,I.GPC];class Bs{static encode(e,t,s){if(e.length>s)throw new se("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Da=Object.defineProperty,ba=(n,e,t)=>e in n?Da(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ks=(n,e,t)=>ba(n,typeof e!="symbol"?e+"":e,t);class W extends ve{constructor(e,t,s=!0){super(s),ks(this,"elementBitStringLength"),ks(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Bs.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=Bs.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(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)}}var va=Object.defineProperty,Va=(n,e,t)=>e in n?va(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Va(n,typeof e!="symbol"?e+"":e,t);class Ra extends P{constructor(e){super(),Ks(this,"base64UrlEncoder",H.getInstance()),Ks(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Pa}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 v;return i.put(I.VERSION.toString(),new l(6,re.VERSION)),i.put(I.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var ya=Object.defineProperty,Ma=(n,e,t)=>e in n?ya(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>Ma(n,typeof e!="symbol"?e+"":e,t);class Ua extends P{constructor(e){super(),Ys(this,"base64UrlEncoder",H.getInstance()),Ys(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return wa}initializeFields(){let e=new v;return e.put(I.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(I.GPC.toString(),new K(!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 p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var La=Object.defineProperty,Ga=(n,e,t)=>e in n?La(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>Ga(n,typeof e!="symbol"?e+"":e,t);const Vt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new Ra),e.push(new Ua),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Yn(Vt,"ID",7),Yn(Vt,"VERSION",1),Yn(Vt,"NAME","usnat");let re=Vt;var R;(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"})(R||(R={}));const Fa=[R.VERSION,R.SALE_OPT_OUT_NOTICE,R.SHARING_OPT_OUT_NOTICE,R.SENSITIVE_DATA_LIMIT_USE_NOTICE,R.SALE_OPT_OUT,R.SHARING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.PERSONAL_DATA_CONSENTS,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],xa=[R.GPC_SEGMENT_TYPE,R.GPC];var $a=Object.defineProperty,ja=(n,e,t)=>e in n?$a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>ja(n,typeof e!="symbol"?e+"":e,t);class Ha extends P{constructor(e){super(),zs(this,"base64UrlEncoder",H.getInstance()),zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Fa}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 v;return i.put(R.VERSION.toString(),new l(6,ce.VERSION)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(R.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var Ba=Object.defineProperty,ka=(n,e,t)=>e in n?Ba(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>ka(n,typeof e!="symbol"?e+"":e,t);class Ka extends P{constructor(e){super(),Ws(this,"base64UrlEncoder",H.getInstance()),Ws(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return xa}initializeFields(){let e=new v;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(R.GPC.toString(),new K(!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 p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var Ya=Object.defineProperty,za=(n,e,t)=>e in n?Ya(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>za(n,typeof e!="symbol"?e+"":e,t);const Rt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Ha),e.push(new Ka),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(".")}};zn(Rt,"ID",8),zn(Rt,"VERSION",1),zn(Rt,"NAME","usca");let ce=Rt;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 Wa=[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];var Qa=Object.defineProperty,Ja=(n,e,t)=>e in n?Qa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>Ja(n,typeof e!="symbol"?e+"":e,t);class qa extends P{constructor(e){super(),Qs(this,"base64UrlEncoder",H.getInstance()),Qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Wa}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 v;return i.put(J.VERSION.toString(),new l(6,le.VERSION)),i.put(J.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var Xa=Object.defineProperty,Za=(n,e,t)=>e in n?Xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>Za(n,typeof e!="symbol"?e+"":e,t);const yt=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new qa),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(".")}};Wn(yt,"ID",9),Wn(yt,"VERSION",1),Wn(yt,"NAME","usva");let le=yt;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 ec=[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],tc=[B.GPC_SEGMENT_TYPE,B.GPC];var nc=Object.defineProperty,sc=(n,e,t)=>e in n?nc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>sc(n,typeof e!="symbol"?e+"":e,t);class ic extends P{constructor(e){super(),Js(this,"base64UrlEncoder",H.getInstance()),Js(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ec}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 v;return i.put(B.VERSION.toString(),new l(6,de.VERSION)),i.put(B.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var rc=Object.defineProperty,oc=(n,e,t)=>e in n?rc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>oc(n,typeof e!="symbol"?e+"":e,t);class ac extends P{constructor(e){super(),qs(this,"base64UrlEncoder",H.getInstance()),qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return tc}initializeFields(){let e=new v;return e.put(B.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(B.GPC.toString(),new K(!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 p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var cc=Object.defineProperty,lc=(n,e,t)=>e in n?cc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>lc(n,typeof e!="symbol"?e+"":e,t);const Mt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new ic),e.push(new ac),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(".")}};Qn(Mt,"ID",10),Qn(Mt,"VERSION",1),Qn(Mt,"NAME","usco");let de=Mt;var Y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const dc=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];var Ec=Object.defineProperty,uc=(n,e,t)=>e in n?Ec(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>uc(n,typeof e!="symbol"?e+"":e,t);class Sc extends P{constructor(e){super(),Xs(this,"base64UrlEncoder",H.getInstance()),Xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return dc}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 v;return i.put(Y.VERSION.toString(),new l(6,Ee.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var pc=Object.defineProperty,hc=(n,e,t)=>e in n?pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>hc(n,typeof e!="symbol"?e+"":e,t);const Ut=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new Sc),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(".")}};Jn(Ut,"ID",11),Jn(Ut,"VERSION",1),Jn(Ut,"NAME","usut");let Ee=Ut;var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(k||(k={}));const _c=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE],gc=[k.GPC_SEGMENT_TYPE,k.GPC];var Tc=Object.defineProperty,Oc=(n,e,t)=>e in n?Tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>Oc(n,typeof e!="symbol"?e+"":e,t);class Nc extends P{constructor(e){super(),Zs(this,"base64UrlEncoder",H.getInstance()),Zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return _c}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 v;return i.put(k.VERSION.toString(),new l(6,ue.VERSION)),i.put(k.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var Ic=Object.defineProperty,Ac=(n,e,t)=>e in n?Ic(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Ac(n,typeof e!="symbol"?e+"":e,t);class Cc extends P{constructor(e){super(),ei(this,"base64UrlEncoder",H.getInstance()),ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return gc}initializeFields(){let e=new v;return e.put(k.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(k.GPC.toString(),new K(!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 p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var fc=Object.defineProperty,mc=(n,e,t)=>e in n?fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>mc(n,typeof e!="symbol"?e+"":e,t);const Lt=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new Nc),e.push(new Cc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};qn(Lt,"ID",12),qn(Lt,"VERSION",1),qn(Lt,"NAME","usct");let ue=Lt;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 Pc=[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];var wc=Object.defineProperty,Dc=(n,e,t)=>e in n?wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Dc(n,typeof e!="symbol"?e+"":e,t);class bc extends P{constructor(e){super(),ti(this,"base64UrlEncoder",H.getInstance()),ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Pc}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 v;return i.put(z.VERSION.toString(),new l(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var vc=Object.defineProperty,Vc=(n,e,t)=>e in n?vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>Vc(n,typeof e!="symbol"?e+"":e,t);const Gt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new bc),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(".")}};Xn(Gt,"ID",13),Xn(Gt,"VERSION",1),Xn(Gt,"NAME","usfl");let Se=Gt;var y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.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 Rc=[y.VERSION,y.SHARING_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],yc=[y.GPC_SEGMENT_TYPE,y.GPC];var Mc=Object.defineProperty,Uc=(n,e,t)=>e in n?Mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);class Lc extends P{constructor(e){super(),ni(this,"base64UrlEncoder",H.getInstance()),ni(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Rc}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 v;return i.put(y.VERSION.toString(),new l(6,pe.VERSION)),i.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var Gc=Object.defineProperty,Fc=(n,e,t)=>e in n?Gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>Fc(n,typeof e!="symbol"?e+"":e,t);class xc extends P{constructor(e){super(),si(this,"base64UrlEncoder",H.getInstance()),si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return yc}initializeFields(){let e=new v;return e.put(y.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(y.GPC.toString(),new K(!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 p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var $c=Object.defineProperty,jc=(n,e,t)=>e in n?$c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>jc(n,typeof e!="symbol"?e+"":e,t);const Ft=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new Lc),e.push(new xc),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(".")}};Zn(Ft,"ID",14),Zn(Ft,"VERSION",1),Zn(Ft,"NAME","usmt");let pe=Ft;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 Hc=[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],Bc=[M.GPC_SEGMENT_TYPE,M.GPC];var kc=Object.defineProperty,Kc=(n,e,t)=>e in n?kc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>Kc(n,typeof e!="symbol"?e+"":e,t);class Yc extends P{constructor(e){super(),ii(this,"base64UrlEncoder",H.getInstance()),ii(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Hc}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 v;return i.put(M.VERSION.toString(),new l(6,fe.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var zc=Object.defineProperty,Wc=(n,e,t)=>e in n?zc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>Wc(n,typeof e!="symbol"?e+"":e,t);class Qc extends P{constructor(e){super(),ri(this,"base64UrlEncoder",H.getInstance()),ri(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Bc}initializeFields(){let e=new v;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(M.GPC.toString(),new K(!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 p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var Jc=Object.defineProperty,qc=(n,e,t)=>e in n?Jc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>qc(n,typeof e!="symbol"?e+"":e,t);const xt=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new Yc),e.push(new Qc),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(".")}};es(xt,"ID",15),es(xt,"VERSION",1),es(xt,"NAME","usor");let fe=xt;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 Xc=[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],Zc=[U.GPC_SEGMENT_TYPE,U.GPC];var el=Object.defineProperty,tl=(n,e,t)=>e in n?el(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>tl(n,typeof e!="symbol"?e+"":e,t);class nl extends P{constructor(e){super(),oi(this,"base64UrlEncoder",H.getInstance()),oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xc}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 v;return i.put(U.VERSION.toString(),new l(6,he.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var sl=Object.defineProperty,il=(n,e,t)=>e in n?sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>il(n,typeof e!="symbol"?e+"":e,t);class rl extends P{constructor(e){super(),ai(this,"base64UrlEncoder",H.getInstance()),ai(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Zc}initializeFields(){let e=new v;return e.put(U.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(U.GPC.toString(),new K(!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 p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var ol=Object.defineProperty,al=(n,e,t)=>e in n?ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>al(n,typeof e!="symbol"?e+"":e,t);const $t=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new nl),e.push(new rl),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(".")}};ts($t,"ID",16),ts($t,"VERSION",1),ts($t,"NAME","ustx");let he=$t;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 cl=[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],ll=[L.GPC_SEGMENT_TYPE,L.GPC];var dl=Object.defineProperty,El=(n,e,t)=>e in n?dl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>El(n,typeof e!="symbol"?e+"":e,t);class ul extends P{constructor(e){super(),ci(this,"base64UrlEncoder",H.getInstance()),ci(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return cl}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 v;return i.put(L.VERSION.toString(),new l(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var Sl=Object.defineProperty,pl=(n,e,t)=>e in n?Sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>pl(n,typeof e!="symbol"?e+"":e,t);class hl extends P{constructor(e){super(),li(this,"base64UrlEncoder",H.getInstance()),li(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ll}initializeFields(){let e=new v;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(L.GPC.toString(),new K(!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 p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var _l=Object.defineProperty,gl=(n,e,t)=>e in n?_l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>gl(n,typeof e!="symbol"?e+"":e,t);const jt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new ul),e.push(new hl),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(".")}};ns(jt,"ID",17),ns(jt,"VERSION",1),ns(jt,"NAME","usde");let _e=jt;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.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"})(G||(G={}));const Tl=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SENSITIVE_DATA_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Ol=[G.GPC_SEGMENT_TYPE,G.GPC];var Nl=Object.defineProperty,Il=(n,e,t)=>e in n?Nl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>Il(n,typeof e!="symbol"?e+"":e,t);class Al extends P{constructor(e){super(),di(this,"base64UrlEncoder",H.getInstance()),di(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Tl}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 v;return i.put(G.VERSION.toString(),new l(6,ge.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var Cl=Object.defineProperty,fl=(n,e,t)=>e in n?Cl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>fl(n,typeof e!="symbol"?e+"":e,t);class ml extends P{constructor(e){super(),Ei(this,"base64UrlEncoder",H.getInstance()),Ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ol}initializeFields(){let e=new v;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(G.GPC.toString(),new K(!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 p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var Pl=Object.defineProperty,wl=(n,e,t)=>e in n?Pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>wl(n,typeof e!="symbol"?e+"":e,t);const Ht=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new Al),e.push(new ml),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(".")}};ss(Ht,"ID",18),ss(Ht,"VERSION",1),ss(Ht,"NAME","usia");let ge=Ht;var F;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(F||(F={}));const Dl=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],bl=[F.GPC_SEGMENT_TYPE,F.GPC];var vl=Object.defineProperty,Vl=(n,e,t)=>e in n?vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>Vl(n,typeof e!="symbol"?e+"":e,t);class Rl extends P{constructor(e){super(),ui(this,"base64UrlEncoder",H.getInstance()),ui(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Dl}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 v;return i.put(F.VERSION.toString(),new l(6,Te.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var yl=Object.defineProperty,Ml=(n,e,t)=>e in n?yl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Ml(n,typeof e!="symbol"?e+"":e,t);class Ul extends P{constructor(e){super(),Si(this,"base64UrlEncoder",H.getInstance()),Si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return bl}initializeFields(){let e=new v;return e.put(F.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(F.GPC.toString(),new K(!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 p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var Ll=Object.defineProperty,Gl=(n,e,t)=>e in n?Ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,is=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);const Bt=class fn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fn.ID}getName(){return fn.NAME}getVersion(){return fn.VERSION}initializeSegments(){let e=[];return e.push(new Rl),e.push(new Ul),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};is(Bt,"ID",19),is(Bt,"VERSION",1),is(Bt,"NAME","usne");let Te=Bt;var x;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const Fl=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],xl=[x.GPC_SEGMENT_TYPE,x.GPC];var $l=Object.defineProperty,jl=(n,e,t)=>e in n?$l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>jl(n,typeof e!="symbol"?e+"":e,t);class Hl extends P{constructor(e){super(),pi(this,"base64UrlEncoder",H.getInstance()),pi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Fl}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 v;return i.put(x.VERSION.toString(),new l(6,Oe.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var Bl=Object.defineProperty,kl=(n,e,t)=>e in n?Bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>kl(n,typeof e!="symbol"?e+"":e,t);class Kl extends P{constructor(e){super(),hi(this,"base64UrlEncoder",H.getInstance()),hi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return xl}initializeFields(){let e=new v;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(x.GPC.toString(),new K(!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 p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var Yl=Object.defineProperty,zl=(n,e,t)=>e in n?Yl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>zl(n,typeof e!="symbol"?e+"":e,t);const kt=class mn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mn.ID}getName(){return mn.NAME}getVersion(){return mn.VERSION}initializeSegments(){let e=[];return e.push(new Hl),e.push(new Kl),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(".")}};rs(kt,"ID",20),rs(kt,"VERSION",1),rs(kt,"NAME","usnh");let Oe=kt;var $;(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"})($||($={}));const Wl=[$.VERSION,$.PROCESSING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.ADDITIONAL_DATA_PROCESSING_CONSENT,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],Ql=[$.GPC_SEGMENT_TYPE,$.GPC];var Jl=Object.defineProperty,ql=(n,e,t)=>e in n?Jl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>ql(n,typeof e!="symbol"?e+"":e,t);class Xl extends P{constructor(e){super(),_i(this,"base64UrlEncoder",H.getInstance()),_i(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Wl}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 v;return i.put($.VERSION.toString(),new l(6,Ne.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var Zl=Object.defineProperty,ed=(n,e,t)=>e in n?Zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>ed(n,typeof e!="symbol"?e+"":e,t);class td extends P{constructor(e){super(),gi(this,"base64UrlEncoder",H.getInstance()),gi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ql}initializeFields(){let e=new v;return e.put($.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put($.GPC.toString(),new K(!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 p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var nd=Object.defineProperty,sd=(n,e,t)=>e in n?nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,os=(n,e,t)=>sd(n,typeof e!="symbol"?e+"":e,t);const Kt=class Pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pn.ID}getName(){return Pn.NAME}getVersion(){return Pn.VERSION}initializeSegments(){let e=[];return e.push(new Xl),e.push(new td),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($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};os(Kt,"ID",21),os(Kt,"VERSION",1),os(Kt,"NAME","usnj");let Ne=Kt;var j;(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"})(j||(j={}));const id=[j.VERSION,j.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],rd=[j.GPC_SEGMENT_TYPE,j.GPC];var od=Object.defineProperty,ad=(n,e,t)=>e in n?od(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>ad(n,typeof e!="symbol"?e+"":e,t);class cd extends P{constructor(e){super(),Ti(this,"base64UrlEncoder",H.getInstance()),Ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return id}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 v;return i.put(j.VERSION.toString(),new l(6,Ie.VERSION)),i.put(j.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var ld=Object.defineProperty,dd=(n,e,t)=>e in n?ld(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>dd(n,typeof e!="symbol"?e+"":e,t);class Ed extends P{constructor(e){super(),Oi(this,"base64UrlEncoder",H.getInstance()),Oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return rd}initializeFields(){let e=new v;return e.put(j.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(j.GPC.toString(),new K(!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 p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var ud=Object.defineProperty,Sd=(n,e,t)=>e in n?ud(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,as=(n,e,t)=>Sd(n,typeof e!="symbol"?e+"":e,t);const Yt=class wn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new cd),e.push(new Ed),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(j.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(j.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(j.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};as(Yt,"ID",22),as(Yt,"VERSION",1),as(Yt,"NAME","ustn");let Ie=Yt;var pd=Object.defineProperty,hd=(n,e,t)=>e in n?pd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>hd(n,typeof e!="symbol"?e+"":e,t);class Z{}Ni(Z,"SECTION_ID_NAME_MAP",new Map([[X.ID,X.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[re.ID,re.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[fe.ID,fe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME],[Ie.ID,Ie.NAME]])),Ni(Z,"SECTION_ORDER",[X.NAME,Ae.NAME,Ce.NAME,re.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,fe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME,Ie.NAME]);var _d=Object.defineProperty,gd=(n,e,t)=>e in n?_d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zt=(n,e,t)=>gd(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e){zt(this,"sections",new Map),zt(this,"encodedString",null),zt(this,"decoded",!0),zt(this,"dirty",!1),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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.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)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.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)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new ut(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.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(Z.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(Z.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(Z.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(Z.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 Je;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<Z.SECTION_ORDER.length;t++){let s=Z.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<Z.SECTION_ORDER.length;r++){let o=Z.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new Je;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 i=new Je(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===X.ID){let o=new X(t[r+1]);s.set(X.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===re.ID){let o=new re(t[r+1]);s.set(re.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===fe.ID){let o=new fe(t[r+1]);s.set(fe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}else if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new X(e);return t.set(X.NAME,s),new Je().setFieldValue($e.SECTION_IDS,[2]),t.set(Je.NAME,s),t}else throw new p("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(Z.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===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.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)):e===Oe.NAME?(s=new Oe,this.sections.set(Oe.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)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Z.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<Z.SECTION_ORDER.length;t++){let s=Z.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}}var Td=Object.defineProperty,Od=(n,e,t)=>e in n?Td(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>Od(n,typeof e!="symbol"?e+"":e,t);class Nd{constructor(){Ve(this,"gppVersion","1.1"),Ve(this,"supportedAPIs",[]),Ve(this,"eventQueue",new Hr(this)),Ve(this,"cmpStatus",it.LOADING),Ve(this,"cmpDisplayStatus",Ye.HIDDEN),Ve(this,"signalStatus",be.NOT_READY),Ve(this,"applicableSections",[]),Ve(this,"gppModel",new Ii),Ve(this,"cmpId"),Ve(this,"cmpVersion"),Ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=Ye.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Ii,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class cs{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,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 Wt extends Error{constructor(e){super(e),this.name="GVLError"}}var Id=Object.defineProperty,Ad=(n,e,t)=>e in n?Id(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Cd=(n,e,t)=>Ad(n,typeof e!="symbol"?e+"":e,t);const Ai=class Dn{has(e){return Dn.langSet.has(e)}forEach(e){Dn.langSet.forEach(e)}get size(){return Dn.langSet.size}};Cd(Ai,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let fd=Ai;var md=Object.defineProperty,Pd=(n,e,t)=>e in n?md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>Pd(n,typeof e!="symbol"?e+"":e,t),Ci=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const fi=class bn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new fd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",bn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new bn;return t.populate(e),t}static fromUrl(e){return Ci(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Wt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new bn;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(yield cs.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield cs.fetch(r))}return s})}changeLanguage(e){return Ci(this,null,function*(){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(yield cs.fetch(s))}catch(i){throw new Wt("unable to load language: "+i.message)}}}else throw new Wt(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),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"}};q(fi,"DEFAULT_LANGUAGE","EN");let mi=fi;var wd=Object.defineProperty,Dd=(n,e,t)=>e in n?wd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>Dd(n,typeof e!="symbol"?e+"":e,t),bd=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});class vd{constructor(e,t,s){Pi(this,"callResponder"),Pi(this,"cmpApiContext"),this.cmpApiContext=new Nd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new xr(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(Z.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Z.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Z.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return mi.fromVendorList(e)}getGvlFromUrl(e){return bd(this,null,function*(){return mi.fromUrl(e)})}}var Vd=Object.defineProperty,Rd=(n,e,t)=>e in n?Vd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ls=(n,e,t)=>Rd(n,typeof e!="symbol"?e+"":e,t);class wi{constructor(e,t,s){ls(this,"consentPreference"),ls(this,"notice"),ls(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Di;(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={}))})(Di||(Di={}));var yd=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(yd||{}),Md=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Md||{}),bi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(bi||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Qt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Qt||{}),pt=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(pt||{}),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||{}),Ud=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(Ud||{}),Ld=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(Ld||{}),Gd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(Gd||{}),Fd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(Fd||{}),xd=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(xd||{}),lt=(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))(lt||{}),$d=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))($d||{}),jd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(jd||{}),Hd=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(Hd||{});const Bd=(n,e)=>!!Object.keys(e).includes(n.notice_key),ds=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,_t=(n,e)=>n?e===bi.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,kd=n=>typeof n=="string"?ds(n):n,Kd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var Yd=Object.defineProperty,zd=Object.defineProperties,Wd=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,Qd=Object.prototype.hasOwnProperty,Jd=Object.prototype.propertyIsEnumerable,Vi=(n,e,t)=>e in n?Yd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))Qd.call(e,t)&&Vi(n,t,e[t]);if(vi)for(var t of vi(e))Jd.call(e,t)&&Vi(n,t,e[t]);return n},qd=(n,e)=>zd(n,Wd(e));const dt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ri=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),Xd=n=>n?n.location&&Kd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,Zd=n=>n.fidesConsentOverride===lt.ACCEPT||n.fidesConsentOverride===lt.REJECT,eE=(n,e,t,s)=>{var i,r,o,a,c,d;return s!=null&&s.fidesDisableBanner||!dt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===ht.TCF_OVERLAY&&e?(r=n.meta)!=null&&r.version_hash&&e.fides_meta.consentMethod!==lt.DISMISS?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||!((c=n?.privacy_notices)!=null&&c.length)?!1:t?s&&Zd(s)?!1:e?.fides_meta.consentMethod===lt.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(S=>Bd(S,t))):!0},tE=(n,e)=>n.map(t=>{var s;const i=_t(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new wi(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),nE=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Qt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Jt({},n);return s===Qt.INCLUDE?e.forEach(r=>{i[r]=t===pt.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},sE=({consent:n,flagType:e=pt.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==pt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,kd(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]=_t(o,a)}}),s):Jt({},n)},yi=(n,e,t=[],s,i)=>{var r,o,a;const c=Jt({},n),d=(r=window.Fides)==null?void 0:r.options,S=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Qt.OMIT,h=(a=s??d?.fidesConsentFlagType)!=null?a:pt.BOOLEAN,E={};Object.assign(E,nE({consent:{},nonApplicableNotices:e??[],flagType:h,mode:S}));const N=t.reduce((T,m)=>qd(Jt({},T),{[m.notice_key]:m.consent_mechanism}),{});return Object.assign(E,sE({consent:c,consentMechanisms:N,flagType:h})),E};var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */qt.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)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,S=function(T){T=String(T).replace(d,"");var m=T.length;m%4==0&&(T=T.replace(/==?$/,""),m=T.length),(m%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,f,D,ne="",ye=-1;++ye<m;)D=c.indexOf(T.charAt(ye)),f=C%4?f*64+D:D,C++%4&&(ne+=String.fromCharCode(255&f>>(-2*C&6)));return ne},h=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var m=T.length%3,C="",f=-1,D,ne,ye,Pe,Ar=T.length-m;++f<Ar;)D=T.charCodeAt(f)<<16,ne=T.charCodeAt(++f)<<8,ye=T.charCodeAt(++f),Pe=D+ne+ye,C+=c.charAt(Pe>>18&63)+c.charAt(Pe>>12&63)+c.charAt(Pe>>6&63)+c.charAt(Pe&63);return m==2?(D=T.charCodeAt(f)<<8,ne=T.charCodeAt(++f),Pe=D+ne,C+=c.charAt(Pe>>10)+c.charAt(Pe>>4&63)+c.charAt(Pe<<2&63)+"="):m==1&&(Pe=T.charCodeAt(f),C+=c.charAt(Pe>>2)+c.charAt(Pe<<4&63)+"=="),C},E={encode:h,decode:S,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var N in E)E.hasOwnProperty(N)&&(s[N]=E[N]);else t.base64=E})(Es)}(qt,qt.exports);var Mi=qt.exports;/*! js-cookie v3.0.5 | MIT */function Xt(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 iE={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 us(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Xt({},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 c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].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 c=r[a].split("="),d=c.slice(1).join("=");try{var S=decodeURIComponent(c[0]);if(o[S]=n.read(d,S),i===S)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Xt({},r,{expires:-1}))},withAttributes:function(i){return us(this.converter,Xt({},this.attributes,i))},withConverter:function(i){return us(Xt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var rE=us(iE,{path:"/"});let Zt;const oE=new Uint8Array(16);function aE(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(oE)}const ae=[];for(let n=0;n<256;++n)ae.push((n+256).toString(16).slice(1));function cE(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 lE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ui={randomUUID:lE};function dE(n,e,t){if(Ui.randomUUID&&!e&&!n)return Ui.randomUUID();n=n||{};const s=n.random||(n.rng||aE)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return cE(s)}var EE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(EE||{}),Ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ss||{});const ps=407,en=",",uE=[{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"}],SE=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];uE.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Ss.CONSENT.toString(),Ss.LEGITIMATE_INTERESTS.toString();const pE={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]},Li="fides_consent",hE=365,tn=rE.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),_E=()=>dE();_E();const gE=n=>tn.get(n),TE=()=>{const n=gE(Li);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Mi.decode(n))}catch{return}}},Gi=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Mi.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),tn.set(Li,s,{path:"/",domain:r,expires:hE})){const a=TE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},OE=n=>{const e={};return SE.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ds(r.preference)]))}),e},NE=(n,e=!0)=>{n.forEach(t=>{var s;if(tn.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;tn.remove(t.name,{domain:`.${i}`})}})},IE=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ds(s)]));return Object.fromEntries(e)};var AE=(n=>(n.GVL="gvl",n.AC="gacp",n))(AE||{});const je=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},nn=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=je(n);if(t==="gvl"||t===void 0)return e.vendors[s]},CE=n=>je(n).source==="gacp",fE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},mE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},PE=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(en);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},Fi=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(en))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},wE=1,Xe={us:{name:re.NAME,id:re.ID},us_ca:{name:ce.NAME,id:ce.ID},us_co:{name:de.NAME,id:de.ID},us_ct:{name:ue.NAME,id:ue.ID},us_ut:{name:Ee.NAME,id:Ee.ID},us_va:{name:le.NAME,id:le.ID},us_de:{name:_e.NAME,id:_e.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:ge.NAME,id:ge.ID},us_mt:{name:pe.NAME,id:pe.ID},us_ne:{name:Te.NAME,id:Te.ID},us_nh:{name:Oe.NAME,id:Oe.ID},us_nj:{name:Ne.NAME,id:Ne.ID},us_tn:{name:Ie.NAME,id:Ie.ID},us_tx:{name:he.NAME,id:he.ID}};function xi(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var DE=Object.defineProperty,bE=Object.defineProperties,vE=Object.getOwnPropertyDescriptors,$i=Object.getOwnPropertySymbols,VE=Object.prototype.hasOwnProperty,RE=Object.prototype.propertyIsEnumerable,ji=(n,e,t)=>e in n?DE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hi=(n,e)=>{for(var t in e||(e={}))VE.call(e,t)&&ji(n,t,e[t]);if($i)for(var t of $i(e))RE.call(e,t)&&ji(n,t,e[t]);return n},Bi=(n,e)=>bE(n,vE(e)),yE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())}),ME=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(ME||{});const UE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},LE="Fides.js",GE=(n,e,t,s,i)=>yE(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(c){return Promise.reject(c)}return Promise.resolve()}const o=Bi(Hi({},UE),{body:JSON.stringify(Bi(Hi({},e),{source:LE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var FE=Object.defineProperty,xE=Object.defineProperties,$E=Object.getOwnPropertyDescriptors,ki=Object.getOwnPropertySymbols,jE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,Ki=(n,e,t)=>e in n?FE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hs=(n,e)=>{for(var t in e||(e={}))jE.call(e,t)&&Ki(n,t,e[t]);if(ki)for(var t of ki(e))HE.call(e,t)&&Ki(n,t,e[t]);return n},BE=(n,e)=>xE(n,$E(e));const Yi=(n,e,t,s)=>{var i,r,o,a,c;const d=e?hs({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const S=hs({consentMethod:d?.fides_meta.consentMethod},s),h=(i=performance?.mark)==null?void 0:i.call(performance,n),E=h?.startTime,N=d;N&&d!=null&&d.consent&&(N.consent=yi(d.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(c=(a=window.Fides)==null?void 0:a.experience)==null?void 0:c.privacy_notices));const T=new CustomEvent(n,{detail:BE(hs({},N),{debug:t,extraDetails:S,timestamp:E}),bubbles:!0});window.dispatchEvent(T)}};var kE=Object.defineProperty,KE=Object.defineProperties,YE=Object.getOwnPropertyDescriptors,zi=Object.getOwnPropertySymbols,zE=Object.prototype.hasOwnProperty,WE=Object.prototype.propertyIsEnumerable,Wi=(n,e,t)=>e in n?kE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qi=(n,e)=>{for(var t in e||(e={}))zE.call(e,t)&&Wi(n,t,e[t]);if(zi)for(var t of zi(e))WE.call(e,t)&&Wi(n,t,e[t]);return n},QE=(n,e)=>KE(n,YE(e)),Ji=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});function JE(n,e,t,s,i,r,o,a,c,d){return Ji(this,null,function*(){const S=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),h=Qi({browser_identity:e.identity,preferences:S,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:c,property_id:d},o??[]);yield GE(s,h,n,e,t)})}const qE=n=>Ji(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:c,tcf:d,updateCookie:S,propertyId:h}){var E,N,T,m;const C=yield S(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),Yi("FidesUpdating",a,r.debug);const f=yi(a.consent,(N=(E=window.Fides)==null?void 0:E.experience)==null?void 0:N.non_applicable_privacy_notices,(m=(T=window.Fides)==null?void 0:T.experience)==null?void 0:m.privacy_notices);if(window.Fides.consent=f,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Gi(QE(Qi({},a),{consent:f}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield JE(r,a,s,i,t,e,d,o,c,h)}catch{}e&&e.filter(D=>D.consentPreference===Ge.OPT_OUT).forEach(D=>{var ne,ye;(ne=D.notice)!=null&&ne.cookies&&NE(D.notice.cookies,(ye=s.experience_config)==null?void 0:ye.auto_subdomain_cookie_deletion)}),Yi("FidesUpdated",a,r.debug)});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class He extends Error{constructor(e){super(e),this.name="EncodingError"}}class Et extends Error{constructor(e){super(e),this.name="GVLError"}}class Be extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class _s{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 He("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class ke{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return ke.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(ke.langSet.has(e))return e;if(ke.langSet.has(t))return t;const s=t+"-"+t;if(ke.langSet.has(s))return s;for(const i of ke.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){ke.langSet.forEach(e)}get size(){return ke.langSet.size}}class u{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class 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 Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class xe 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 xe;if(t.length!==2)throw new Be("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}${xe.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class qi 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===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(xe.unHash(i)):t.push(xe.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(xe.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=xe.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 Xi;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(Xi||(Xi={}));var Q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class Zi{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 Be("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Fe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class w{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new He(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class er{static encode(e,t){return w.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(w.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Fe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Fe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class tr{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 He(`invalid language code: ${e}`);if(t%2===1)throw new He(`numBits must be even, ${t} is not valid`);t=t/2;const o=w.encode(i,t),a=w.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=w.decode(e.slice(0,r),r)+65,a=w.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class XE{static encode(e){let t=w.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=w.encode(i.purposeId,g.purposeId),t+=w.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,c=0,d="";for(let S=0;S<o;S++){const h=r[S];if(c===0&&(a++,c=h),S===o-1||r[S+1]>s(h,r[o-1])){const E=h!==c;d+=Fe.encode(E),d+=w.encode(c,g.vendorId),E&&(d+=w.encode(h,g.vendorId)),c=0}}t+=w.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new qi,i=w.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=w.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=w.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const c=new xe(o,a),d=w.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let S=0;S<d;S++){const h=Fe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const E=w.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,h){const N=w.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,N<E)throw new ze(`Invalid RangeEntry: endVendorId ${N} is less than ${E}`);for(let T=E;T<=N;T++)s.add(T,c)}else s.add(E,c)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class Ot{static encode(e){const t=[];let s=[],i=w.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,c=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let S=a+g.numEntries;return e.forEach((h,E)=>{r+=Fe.encode(h),o=e.maxId>d&&S<c,o&&h&&(e.has(E+1)?s.length===0&&(s.push(E),S+=g.singleOrRange,S+=g.vendorId):(s.push(E),S+=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=w.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=w.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===Tt.RANGE){if(s=new me,t===1){if(e.substr(i,1)==="1")throw new ze("Unable to decode default consent=1");i++}const a=w.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let c=0;c<a;c++){const d=Fe.decode(e.charAt(i));i+=g.singleOrRange;const S=w.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const h=w.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let E=S;E<=h;E++)s.set(E)}else s.set(S)}}else{const a=e.substr(i,r);i+=r,s=We.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=w.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Fe.encode(!r),s+=w.encode(i[0],g.vendorId),r||(s+=w.encode(i[1],g.vendorId))}),s}}function nr(){return{[u.version]:w,[u.created]:er,[u.lastUpdated]:er,[u.cmpId]:w,[u.cmpVersion]:w,[u.consentScreen]:w,[u.consentLanguage]:tr,[u.vendorListVersion]:w,[u.policyVersion]:w,[u.isServiceSpecific]:Fe,[u.useNonStandardTexts]:Fe,[u.specialFeatureOptins]:We,[u.purposeConsents]:We,[u.purposeLegitimateInterests]:We,[u.purposeOneTreatment]:Fe,[u.publisherCountryCode]:tr,[u.vendorConsents]:Ot,[u.vendorLegitimateInterests]:Ot,[u.publisherRestrictions]:XE,segmentType:w,[u.vendorsDisclosed]:Ot,[u.vendorsAllowed]:Ot,[u.publisherConsents]:We,[u.publisherLegitimateInterests]:We,[u.numCustomPurposes]:w,[u.publisherCustomConsents]:We,[u.publisherCustomLegitimateInterests]:We}}class ZE{1={[Q.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[Q.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[Q.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[Q.VENDORS_ALLOWED]:[u.vendorsAllowed],[Q.VENDORS_DISCLOSED]:[u.vendorsDisclosed]}}class eu{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[u.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),s&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class sr{static fieldSequence=new ZE;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new He(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=w.encode(Zi.KEY_TO_ID[t],g.segmentType));const r=nr();return s.forEach(o=>{const a=e[o],c=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[u.numCustomPurposes]));try{i+=c.encode(a,d)}catch(S){throw new He(`Error encoding ${t}->${o}: ${S.message}`)}}),_s.encode(i)}static decode(e,t,s){const i=_s.decode(e);let r=0;s===Q.CORE&&(t.version=w.decode(i.substr(r,g[u.version]),g[u.version])),s!==Q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=nr();return o.forEach(c=>{const d=a[c];let S=g[c];if(S===void 0&&this.isPublisherCustom(c)&&(S=Number(t[u.numCustomPurposes])),S!==0){const h=i.substr(r,S);if(d===Ot?t[c]=d.decode(h,t.version):t[c]=d.decode(h,S),Number.isInteger(S))r+=S;else if(Number.isInteger(t[c].bitLength))r+=t[c].bitLength;else throw new ze(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class tu{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 c=t.vendors[a];if(!c||c.deletedDate)i.unset(a);else if(c[r].length===0)if(r==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let S=!1;for(let h=0,E=d.length;h<E&&!S;h++)S=d[h].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[h].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";S||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new He("Unable to encode TCModel without a GVL");if(!s.isReady)throw new He("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 He(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class nu{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class A extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new ke;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new Et("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new Et("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new Et("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await nu.fetch(e))}catch(t){throw new Et(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new Et("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new Et("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class ir extends gt{static consentLanguages=A.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new qi;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new Be("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 Be("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 Be("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 Be("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new Be("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 Be("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 Be("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 su{static encode(e,t){let s="",i;return e=tu.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new eu(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=sr.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new ir);for(let r=0;r<i;r++){const o=s[r],c=_s.decode(o.charAt(0)).substr(0,g.segmentType),d=Zi.ID_TO_KEY[w.decode(c,g.segmentType).toString()];sr.decode(o,t,d)}return t}}var Qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var sn;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(sn||(sn={}));var rn;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(rn||(rn={}));var rr;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(rr||(rr={}));class on{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 an extends on{respond(){this.throwIfParamInvalid(),this.invokeCallback(new ar(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 iu{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 an(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new iu;static cmpStatus=sn.LOADING;static disabled=!1;static displayStatus=rn.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=sn.LOADING,this.disabled=!1,this.displayStatus=rn.HIDDEN,this.eventQueue.clear()}}class or{cmpId=oe.cmpId;cmpVersion=oe.cmpVersion;gdprApplies=oe.gdprApplies;tcfPolicyVersion=oe.tcfPolicyVersion}class ar extends or{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=oe.eventStatus,this.cmpStatus=oe.cmpStatus,this.listenerId=t,oe.gdprApplies){const s=oe.tcModel;this.tcString=oe.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 ru extends ar{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(),c=o.purposeId.toString(),d=t[c].substr(0,i),S=t[c].substr(i+1);t[c]=d+a+S})}}return t}}class ou extends or{cmpLoaded=!0;cmpStatus=oe.cmpStatus;displayStatus=oe.displayStatus;apiVersion=String(oe.apiVersion);gvlVersion;constructor(){super(),oe.tcModel&&oe.tcModel.vendorListVersion&&(this.gvlVersion=+oe.tcModel.vendorListVersion)}}class au extends on{respond(){this.invokeCallback(new ou)}}class cu extends an{respond(){this.throwIfParamInvalid(),this.invokeCallback(new ru(this.param))}}class lu extends on{respond(){const e=oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class du extends an{respond(){this.listenerId=oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Eu extends on{respond(){this.invokeCallback(oe.eventQueue.remove(this.param))}}class oS{static[Qe.PING]=au;static[Qe.GET_TC_DATA]=an;static[Qe.GET_IN_APP_TC_DATA]=cu;static[Qe.GET_VENDOR_LIST]=lu;static[Qe.ADD_EVENT_LISTENER]=du;static[Qe.REMOVE_EVENT_LISTENER]=Eu}const uu=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(en);return t.split(".")[0]}return e??""};var Su=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const pu=1,cr=[1,3,4,5,6],hu=2,_u=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(CE).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${hu}~${s}~dv.${i}`},gu=n=>Su(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const c=new ir(new A(e.gvl));yield c.gvl.readyPromise,c.cmpId=ps,c.cmpVersion=pu,c.consentScreen=1,c.isServiceSpecific=!0,c.supportOOB=!1,e.tcf_publisher_country_code&&(c.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?mE(e):fE(e);if(c.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var N,T,m;if(nn(E,e.gvl)){const{id:C}=je(E);if(c.vendorConsents.set(+C),!((N=e.tcf_publisher_restrictions)!=null&&N.length)){const f=(T=e.gvl)==null?void 0:T.vendors[C];f&&!((m=f?.purposes)!=null&&m.length)&&f.flexiblePurposes.forEach(D=>{const ne=new xe;ne.purposeId=D,ne.restrictionType=Re.REQUIRE_CONSENT,c.publisherRestrictions.add(+C,ne)})}}}),t.vendorsLegint.forEach(E=>{var N,T;if(e.minimal_tcf)(N=e.tcf_vendor_legitimate_interest_ids)==null||N.forEach(m=>{const{id:C}=je(m);c.vendorLegitimateInterests.set(+C)});else if(nn(E,e.gvl)){const m=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(D=>D.id===E)[0],C=m?.purpose_legitimate_interests;let f=!1;if(C&&(C.map(D=>D.id).filter(D=>cr.includes(D)).length&&(f=!0),!f)){const{id:D}=je(E);c.vendorLegitimateInterests.set(+D)}}}),(s=e.gvl)!=null&&s.vendors&&((i=e.tcf_vendor_relationships)==null||i.forEach(E=>{var N,T;const{id:m}=je(E.id),C=(N=e.gvl)==null?void 0:N.vendors[m];C&&(T=C.specialPurposes)!=null&&T.length&&(!C.legIntPurposes||C.legIntPurposes.length===0)&&c.vendorLegitimateInterests.set(+m)})),t.purposesConsent.forEach(E=>{c.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const N=+E;cr.includes(N)||c.purposeLegitimateInterests.set(N)}),t.specialFeatures.forEach(E=>{c.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(N=>{const T=new xe;T.purposeId=E.purpose_id,T.restrictionType=E.restriction_type,c.publisherRestrictions.add(N,T)})}),a=su.encode(c,{segments:[Q.CORE]});const S=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),h=_u({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:S??[]});a=`${a}${en}${h}`}}catch(c){return console.error("Unable to instantiate GVL: ",c),Promise.resolve("")}return Promise.resolve(a)});var Tu=Object.defineProperty,Ou=Object.defineProperties,Nu=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertySymbols,Iu=Object.prototype.hasOwnProperty,Au=Object.prototype.propertyIsEnumerable,dr=(n,e,t)=>e in n?Tu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Cu=(n,e)=>{for(var t in e||(e={}))Iu.call(e,t)&&dr(n,t,e[t]);if(lr)for(var t of lr(e))Au.call(e,t)&&dr(n,t,e[t]);return n},fu=(n,e)=>Ou(n,Nu(e)),mu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=_t(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=_t(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Pu=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(c=>c.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(c=>c.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},wu=({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:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},Du=(n,e,t,s,i)=>mu(void 0,null,function*(){var r;const o=yield gu({tcStringPreferences:t,experience:s}),a=fu(Cu({},n),{fides_string:o,tcf_consent:OE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=IE(i)),a}),bu=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=_t(e.includes(t.id),t.consent_mechanism);return new wi(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",Er=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:s,cmpApiField:i})=>{const r=i===I.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},vu=n=>n?.toLowerCase().startsWith("us"),gs=({experienceRegion:n,usApproach:e})=>vu(n)&&e===De.NATIONAL?tt:n,ur=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE?[]:(t.add(c),s.forEach(d=>{var S;const{gpp_field_mapping:h}=d,E=(S=h?.find(N=>N.region===a))==null?void 0:S.notice;E&&E.forEach(N=>{n.setFieldValue(c.name,N,1)})}),Er({cmpApi:n,sectionName:c.name,gppSettings:r}),Array.from(t))},Sr=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let c=gs({experienceRegion:r,usApproach:a}),d=Xe[c];if(!d&&a===De.ALL&&(c=tt,d=Xe[c]),!d||c===tt&&a===De.STATE)return[];s.add(d);const{consent:S}=e;return Object.keys(S).forEach(h=>{var E;const N=i?.find(m=>m.notice_key===h),T=S[h];if(N){const{gpp_field_mapping:m}=N,C=(E=m?.find(f=>f.region===c))==null?void 0:E.mechanism;C&&C.forEach(f=>{let D=f.not_available;T===!1?D=f.opt_out:T&&(D=f.not_opt_out);let ne=+D;D.length>1&&(ne=D.split("").map(ye=>+ye)),n.setFieldValue(d.name,f.field,ne)})}}),Er({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var Vu=Object.defineProperty,Ru=Object.defineProperties,yu=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,Mu=Object.prototype.hasOwnProperty,Uu=Object.prototype.propertyIsEnumerable,hr=(n,e,t)=>e in n?Vu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_r=(n,e)=>{for(var t in e||(e={}))Mu.call(e,t)&&hr(n,t,e[t]);if(pr)for(var t of pr(e))Uu.call(e,t)&&hr(n,t,e[t]);return n},gr=(n,e)=>Ru(n,yu(e));const Lu=[1,3,4,5,6],Gu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE||s.forEach(d=>{var S;const{notice_key:h,gpp_field_mapping:E}=d,N=(S=E?.find(T=>T.region===a))==null?void 0:S.mechanism;if(N){const T=N.some(m=>{const C=n.getFieldValue(c.name,m.field),f=Array.isArray(C)?C.join(""):String(C);return f===m.opt_out?!0:(m.not_opt_out,!1)});T!==void 0&&(t[h]=!T)}}),t},Fu=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=pE,a=n.getSection(X.NAME);if(!a)return o;const c=a.PurposeConsents.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),S=a.VendorConsents.map(E=>`gvl.${E}`),h=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=c,o.purposesLegint=d.filter(E=>!Lu.includes(parseInt(E,10))),o.vendorsConsent=S,o.vendorsLegint=h,o.specialFeatures=a.SpecialFeatureOptins.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},xu=({fidesString:n,cmpApi:e})=>{const{gpp:t}=PE(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,c=window.Fides.experience;if(!c||!c.experience_config||!c.privacy_notices)return;const d=c.experience_config.component===ht.TCF_OVERLAY,S=Xd(r),h=c.experience_config.translations.find(C=>xi(C.language,o));if(!h)return;e.setGppString(t),e.setSignalStatus(be.READY);const E=c.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(f=>xi(f.language,o))||null}));let N,T,m;if(d){const C=Fu({cmpApi:e,experience:c});m=bu(E.map(({notice:f,bestTranslation:D})=>gr(_r({},f),{bestTranslation:D})),C.customPurposesConsent),T=c.minimal_tcf?wu({experience:c,enabledIds:C}):Pu({experience:c,enabledIds:C}),N=f=>Du(f,T,C,c)}else{const C=Gu({cmpApi:e,experience:c}),f=Object.entries(C).filter(([D,ne])=>ne).map(([D])=>D);m=tE(E,f),N=D=>Promise.resolve(gr(_r({},D),{consent:C}))}qE({consentPreferencesToSave:m,privacyExperienceConfigHistoryId:h.privacy_experience_config_history_id,experience:c,consentMethod:lt.SCRIPT,options:s,userLocationString:S||void 0,cookie:i,propertyId:a?.propertyId,tcf:T,updateCookie:N})},Tr="__gppLocator",Or=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Or(n),5)},$u=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},ju=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,Hu=()=>{const n=[],e=[];let t;const s=(r,o,a,c)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:Ye.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let S=!1;for(let h=0;h<e.length;h++)if(e[h].id===a){e.splice(h,1),S=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:S,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,c]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!ju(a))return null;if(a.__gppCall&&window.__gpp){const c=a.__gppCall;window.__gpp(c.command,(d,S)=>{const h={__gppReturn:{returnValue:d,success:S,callId:c.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(h):h,"*")},"parameter"in c?c.parameter:void 0,"version"in c?c.version:"1.1")}return null};$u(Tr)||(Or(Tr),window.__gpp=s,window.addEventListener("message",i,!1))},Nr=(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,Ir=(n,e)=>{if(!dt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=uu(n);return s?(e.setFieldValueBySectionId(X.ID,"CmpId",ps),e.setSectionStringById(X.ID,s),!0):!1},Bu=()=>{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(`${X.ID}:${X.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${re.ID}:${re.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==re.ID&&n.push(`${t.id}:${t.name}`)}))}return n},ku=()=>{Hu();const n=new vd(ps,wE);n.setCmpStatus(it.LOADED),window.addEventListener("FidesInitialized",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Bu();if(n.setSupportedAPIs(o),!dt(s))return;const{fidesString:a}=r;if(a&&xu({fidesString:a,cmpApi:n}),!a&&(!eE(s,e.detail,i,r)||!r.tcfEnabled&&Ri(s.privacy_notices)&&!Nr(i,e.detail.fides_string,s.privacy_notices))){const c=Ir(e,n);c&&n.setApplicableSections([X.ID]);const d=ur({cmpApi:n,experience:s}),S=Sr({cmpApi:n,cookie:e.detail,experience:s});S.length&&n.setApplicableSections(S.map(E=>E.id)),!c&&!d.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const h=Fi(n);window.Fides.fides_string=h}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",c=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(dt(t)){!i.tcfEnabled&&Ri(t.privacy_notices)&&!Nr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(Ye.VISIBLE);const r=ur({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(Ye.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(Ye.HIDDEN),Ir(e,n)&&(n.setApplicableSections([X.ID]),n.fireSectionChange("tcfeuv2")),dt(window.Fides.experience)){const t=Sr({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=Fi(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,Gi(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&ku()});
|
1
|
+
var Pr=Object.defineProperty,wr=(n,e,t)=>e in n?Pr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>wr(n,typeof e!="symbol"?e+"":e,t);class vn{constructor(e,t,s,i){Nt(this,"eventName"),Nt(this,"listenerId"),Nt(this,"data"),Nt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var Dr=Object.defineProperty,br=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Me=(n,e,t)=>br(n,typeof e!="symbol"?e+"":e,t);class It{constructor(e){Me(this,"gppVersion"),Me(this,"cmpStatus"),Me(this,"cmpDisplayStatus"),Me(this,"signalStatus"),Me(this,"supportedAPIs"),Me(this,"cmpId"),Me(this,"sectionList"),Me(this,"applicableSections"),Me(this,"gppString"),Me(this,"parsedSections"),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()}}var vr=Object.defineProperty,Vr=(n,e,t)=>e in n?vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>Vr(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){At(this,"callback"),At(this,"parameter"),At(this,"success",!0),At(this,"cmpApiContext"),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)}},Rr=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new vn("listenerRegistered",e,!0,new It(this.cmpApiContext));this.invokeCallback(t)}},yr=class extends nt{respond(){let e=new It(this.cmpApiContext);this.invokeCallback(e)}};class Mr extends nt{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 Ur extends nt{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 Lr extends nt{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 Ue;(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"})(Ue||(Ue={}));let Gr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new vn("listenerRemoved",e,t,new It(this.cmpApiContext));this.invokeCallback(s)}};var Fr=Object.defineProperty,$r=(n,e,t)=>e in n?Fr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>$r(n,typeof e!="symbol"?e+"":e,t),Os,Ns,Is,As,Cs,fs;fs=Ue.ADD_EVENT_LISTENER,Cs=Ue.GET_FIELD,As=Ue.GET_SECTION,Is=Ue.HAS_SECTION,Ns=Ue.PING,Os=Ue.REMOVE_EVENT_LISTENER;let Ke=class{};st(Ke,fs,Rr),st(Ke,Cs,Mr),st(Ke,As,Ur),st(Ke,Is,Lr),st(Ke,Ns,yr),st(Ke,Os,Gr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var Ye;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(Ye||(Ye={}));var ms;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(ms||(ms={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var xr=Object.defineProperty,jr=(n,e,t)=>e in n?xr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vn=(n,e,t)=>jr(n,typeof e!="symbol"?e+"":e,t);class Hr{constructor(e,t){if(Vn(this,"callQueue"),Vn(this,"customCommands"),Vn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Ue.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Ue.REMOVE_EVENT_LISTENER,t!=null&&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 Ke[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 Ke[e]!==void 0}}var kr=Object.defineProperty,Br=(n,e,t)=>e in n?kr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>Br(n,typeof e!="symbol"?e+"":e,t);let Kr=class{constructor(e){Rn(this,"eventQueue",new Map),Rn(this,"queueNumber",1e3),Rn(this,"cmpApiContext"),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 vn(e,i,t,new It(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},ut=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var Yr=Object.defineProperty,zr=(n,e,t)=>e in n?Yr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ct=(n,e,t)=>zr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){Ct(this,"segments"),Ct(this,"encodedString",null),Ct(this,"dirty",!1),Ct(this,"decoded",!0),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 ut("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 ut("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 p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},se=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class V{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new se("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 p("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}}var Wr=Object.defineProperty,Qr=(n,e,t)=>e in n?Wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Qr(n,typeof e!="symbol"?e+"":e,t);const yn=class Ts{encode(e){if(!/^[0-1]*$/.test(e))throw new se("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=V.decode(i),o=Ts.DICT.charAt(r);t+=o,s+=6}catch{throw new se("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=Ts.REVERSE_DICT.get(i),o=V.encode(r,6);t+=o}return t}};Ps(yn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ps(yn,"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]]));let ws=yn;var Jr=Object.defineProperty,qr=(n,e,t)=>e in n?Jr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xr=(n,e,t)=>qr(n,typeof e!="symbol"?e+"":e,t);const Mn=class extends ws{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}};Xr(Mn,"instance",new Mn);let H=Mn;var Zr=Object.defineProperty,eo=(n,e,t)=>e in n?Zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,to=(n,e,t)=>eo(n,typeof e!="symbol"?e+"":e,t);const Un=class{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 c=a.substring(e,i);a.decode(c),i+=c.length}catch(c){if(c.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};to(Un,"instance",new Un);let b=Un;class rt{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 p("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 ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new se("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class Ds{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=V.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let c=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(c)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,r=c+2,c=e.indexOf("11",r);let S=rt.decode(e.substring(r,c+2))+i;i=S,r=c+2;for(let h=d;h<=S;h++)t.push(h)}else{let c=e.indexOf("11",r),d=rt.decode(e.substring(r,c+2))+i;i=d,t.push(d),r=c+2}}return t}}let no=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var so=Object.defineProperty,io=(n,e,t)=>e in n?so(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>io(n,typeof e!="symbol"?e+"":e,t);class ve{constructor(e=!0){Ln(this,"hardFailIfMissing"),Ln(this,"validator"),Ln(this,"value"),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 no("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class ro extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ds.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Ds.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var oo=Object.defineProperty,ao=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,co=(n,e,t)=>ao(n,typeof e!="symbol"?e+"":e,t);class l extends ve{constructor(e,t,s=!0){super(s),co(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return V.encode(this.value,this.bitStringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=V.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var lo=Object.defineProperty,Eo=(n,e,t)=>e in n?lo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,uo=(n,e,t)=>Eo(n,typeof e!="symbol"?e+"":e,t);class v{constructor(){uo(this,"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 So=[xe.ID,xe.VERSION,xe.SECTION_IDS];var po=Object.defineProperty,ho=(n,e,t)=>e in n?po(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ft=(n,e,t)=>ho(n,typeof e!="symbol"?e+"":e,t);class w{constructor(){ft(this,"fields"),ft(this,"encodedString",null),ft(this,"dirty",!1),ft(this,"decoded",!0),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 ut("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 ut(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}}var _o=Object.defineProperty,go=(n,e,t)=>e in n?_o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>go(n,typeof e!="symbol"?e+"":e,t);class To extends w{constructor(e){super(),bs(this,"base64UrlEncoder",H.getInstance()),bs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return So}initializeFields(){let e=new v;return e.put(xe.ID.toString(),new l(6,Je.ID)),e.put(xe.VERSION.toString(),new l(6,Je.VERSION)),e.put(xe.SECTION_IDS.toString(),new ro([])),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 p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var Oo=Object.defineProperty,No=(n,e,t)=>e in n?Oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>No(n,typeof e!="symbol"?e+"":e,t);const mt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new To),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(".")}};Gn(mt,"ID",3),Gn(mt,"VERSION",1),Gn(mt,"NAME","header");let Je=mt;var _;(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"})(_||(_={}));const Io=[_.VERSION,_.CREATED,_.LAST_UPDATED,_.CMP_ID,_.CMP_VERSION,_.CONSENT_SCREEN,_.CONSENT_LANGUAGE,_.VENDOR_LIST_VERSION,_.POLICY_VERSION,_.IS_SERVICE_SPECIFIC,_.USE_NON_STANDARD_STACKS,_.SPECIAL_FEATURE_OPTINS,_.PURPOSE_CONSENTS,_.PURPOSE_LEGITIMATE_INTERESTS,_.PURPOSE_ONE_TREATMENT,_.PUBLISHER_COUNTRY_CODE,_.VENDOR_CONSENTS,_.VENDOR_LEGITIMATE_INTERESTS,_.PUBLISHER_RESTRICTIONS],Ao=[_.PUBLISHER_PURPOSES_SEGMENT_TYPE,_.PUBLISHER_CONSENTS,_.PUBLISHER_LEGITIMATE_INTERESTS,_.NUM_CUSTOM_PURPOSES,_.PUBLISHER_CUSTOM_CONSENTS,_.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],Co=[_.VENDORS_ALLOWED_SEGMENT_TYPE,_.VENDORS_ALLOWED],fo=[_.VENDORS_DISCLOSED_SEGMENT_TYPE,_.VENDORS_DISCLOSED];var mo=Object.defineProperty,Po=(n,e,t)=>e in n?mo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wo=(n,e,t)=>Po(n,typeof e!="symbol"?e+"":e,t);const Fn=class extends ws{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};wo(Fn,"instance",new Fn);let St=Fn;class at{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=V.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+V.encode(t[r][0],16):i+="1"+V.encode(t[r][0],16)+V.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=V.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=V.decode(e.substring(i,i+16));i+=16;let c=V.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=c;d++)t.push(d)}else{let a=V.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class $n extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=V.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 we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var Do=Object.defineProperty,bo=(n,e,t)=>e in n?Do(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>bo(n,typeof e!="symbol"?e+"":e,t);class vo{constructor(e,t,s){xn(this,"key"),xn(this,"type"),xn(this,"ids"),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}}var Vo=Object.defineProperty,Ro=(n,e,t)=>e in n?Vo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>Ro(n,typeof e!="symbol"?e+"":e,t);class Vs extends ve{constructor(e,t,s,i=!0){super(i),vs(this,"keyBitStringLength"),vs(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=V.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=V.encode(i.getKey(),this.keyBitStringLength),t+=V.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new se(e)}}decode(e){try{let t=[],s=V.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=V.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=V.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let c=new $n([]).substring(e,i),d=at.decode(c);i+=c.length,t.push(new vo(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=V.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 c=te.substring(e,r,r+this.typeBitStringLength);r+=c.length,s+=c;let d=new $n([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class K extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class Rs{static encode(e){return e?V.encode(Math.round(e.getTime()/100),36):V.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(V.decode(e)*100)}}class Pt extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Rs.encode(this.value)}catch(e){throw new se(e)}}decode(e){try{this.value=Rs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new se("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var yo=Object.defineProperty,Mo=(n,e,t)=>e in n?yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Uo=(n,e,t)=>Mo(n,typeof e!="symbol"?e+"":e,t);class Le extends ve{constructor(e,t=!0){super(t),Uo(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(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 ys{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=V.encode(63,6);else if(r>=65)s+=V.encode(e.charCodeAt(i)-65,6);else throw new se("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=V.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var Lo=Object.defineProperty,Go=(n,e,t)=>e in n?Lo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fo=(n,e,t)=>Go(n,typeof e!="symbol"?e+"":e,t);class jn extends ve{constructor(e,t,s=!0){super(s),Fo(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ys.encode(this.value,this.stringLength)}catch(e){throw new se(e)}}decode(e){try{this.value=ys.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(s)}}}class qe extends ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=at.encode(this.value),s=t.length,i=e;if(s<=i)return V.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return V.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new se(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.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 p(t)}}substring(e,t){try{let s=V.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new $n([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var $o=Object.defineProperty,xo=(n,e,t)=>e in n?$o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>xo(n,typeof e!="symbol"?e+"":e,t);class jo extends w{constructor(e){super(),Ms(this,"base64UrlEncoder",St.getInstance()),Ms(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Io}initializeFields(){let e=new Date,t=new v;return t.put(_.VERSION.toString(),new l(6,X.VERSION)),t.put(_.CREATED.toString(),new Pt(e)),t.put(_.LAST_UPDATED.toString(),new Pt(e)),t.put(_.CMP_ID.toString(),new l(12,0)),t.put(_.CMP_VERSION.toString(),new l(12,0)),t.put(_.CONSENT_SCREEN.toString(),new l(6,0)),t.put(_.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(_.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(_.POLICY_VERSION.toString(),new l(6,2)),t.put(_.IS_SERVICE_SPECIFIC.toString(),new K(!1)),t.put(_.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(_.SPECIAL_FEATURE_OPTINS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(_.PURPOSE_ONE_TREATMENT.toString(),new K(!1)),t.put(_.PUBLISHER_COUNTRY_CODE.toString(),new jn(2,"AA")),t.put(_.VENDOR_CONSENTS.toString(),new qe([])),t.put(_.VENDOR_LEGITIMATE_INTERESTS.toString(),new qe([])),t.put(_.PUBLISHER_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var Ho=Object.defineProperty,ko=(n,e,t)=>e in n?Ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bo=(n,e,t)=>ko(n,typeof e!="symbol"?e+"":e,t);class wt extends ve{constructor(e,t,s=!0){super(s),Bo(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new se(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(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])}}var Ko=Object.defineProperty,Yo=(n,e,t)=>e in n?Ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>Yo(n,typeof e!="symbol"?e+"":e,t);class zo extends w{constructor(e){super(),Us(this,"base64UrlEncoder",St.getInstance()),Us(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ao}initializeFields(){let e=new v;e.put(_.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(_.PUBLISHER_CONSENTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(_.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(_.NUM_CUSTOM_PURPOSES.toString(),t),e.put(_.PUBLISHER_CUSTOM_CONSENTS.toString(),new wt(()=>t.getValue(),[])),e.put(_.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 p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Wo=Object.defineProperty,Qo=(n,e,t)=>e in n?Wo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>Qo(n,typeof e!="symbol"?e+"":e,t);class Jo extends w{constructor(e){super(),Ls(this,"base64UrlEncoder",St.getInstance()),Ls(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Co}initializeFields(){let e=new v;return e.put(_.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(_.VENDORS_ALLOWED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var qo=Object.defineProperty,Xo=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gs=(n,e,t)=>Xo(n,typeof e!="symbol"?e+"":e,t);class Zo extends w{constructor(e){super(),Gs(this,"base64UrlEncoder",St.getInstance()),Gs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return fo}initializeFields(){let e=new v;return e.put(_.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(_.VENDORS_DISCLOSED.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var ea=Object.defineProperty,ta=(n,e,t)=>e in n?ea(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>ta(n,typeof e!="symbol"?e+"":e,t);const Dt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new jo),e.push(new zo),e.push(new Jo),e.push(new Zo),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 p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(_.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!==_.CREATED&&e!==_.LAST_UPDATED){let s=new Date;super.setFieldValue(_.CREATED,s),super.setFieldValue(_.LAST_UPDATED,s)}}};Hn(Dt,"ID",2),Hn(Dt,"VERSION",2),Hn(Dt,"NAME","tcfeuv2");let X=Dt;var O;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(O||(O={}));const na=[O.VERSION,O.CREATED,O.LAST_UPDATED,O.CMP_ID,O.CMP_VERSION,O.CONSENT_SCREEN,O.CONSENT_LANGUAGE,O.VENDOR_LIST_VERSION,O.TCF_POLICY_VERSION,O.USE_NON_STANDARD_STACKS,O.SPECIAL_FEATURE_EXPRESS_CONSENT,O.PURPOSES_EXPRESS_CONSENT,O.PURPOSES_IMPLIED_CONSENT,O.VENDOR_EXPRESS_CONSENT,O.VENDOR_IMPLIED_CONSENT,O.PUB_RESTRICTIONS],sa=[O.PUB_PURPOSES_SEGMENT_TYPE,O.PUB_PURPOSES_EXPRESS_CONSENT,O.PUB_PURPOSES_IMPLIED_CONSENT,O.NUM_CUSTOM_PURPOSES,O.CUSTOM_PURPOSES_EXPRESS_CONSENT,O.CUSTOM_PURPOSES_IMPLIED_CONSENT],ia=[O.DISCLOSED_VENDORS_SEGMENT_TYPE,O.DISCLOSED_VENDORS];var ra=Object.defineProperty,oa=(n,e,t)=>e in n?ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>oa(n,typeof e!="symbol"?e+"":e,t);class aa extends w{constructor(e){super(),Fs(this,"base64UrlEncoder",H.getInstance()),Fs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return na}initializeFields(){let e=new Date,t=new v;return t.put(O.VERSION.toString(),new l(6,Ae.VERSION)),t.put(O.CREATED.toString(),new Pt(e)),t.put(O.LAST_UPDATED.toString(),new Pt(e)),t.put(O.CMP_ID.toString(),new l(12,0)),t.put(O.CMP_VERSION.toString(),new l(12,0)),t.put(O.CONSENT_SCREEN.toString(),new l(6,0)),t.put(O.CONSENT_LANGUAGE.toString(),new jn(2,"EN")),t.put(O.VENDOR_LIST_VERSION.toString(),new l(12,0)),t.put(O.TCF_POLICY_VERSION.toString(),new l(6,2)),t.put(O.USE_NON_STANDARD_STACKS.toString(),new K(!1)),t.put(O.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(O.VENDOR_EXPRESS_CONSENT.toString(),new qe([])),t.put(O.VENDOR_IMPLIED_CONSENT.toString(),new qe([])),t.put(O.PUB_RESTRICTIONS.toString(),new Vs(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 p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var ca=Object.defineProperty,la=(n,e,t)=>e in n?ca(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>la(n,typeof e!="symbol"?e+"":e,t);class da extends w{constructor(e){super(),$s(this,"base64UrlEncoder",H.getInstance()),$s(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sa}initializeFields(){let e=new v;e.put(O.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(O.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(O.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Le([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new l(6,0);return e.put(O.NUM_CUSTOM_PURPOSES.toString(),t),e.put(O.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new wt(()=>t.getValue(),[])),e.put(O.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 p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var Ea=Object.defineProperty,ua=(n,e,t)=>e in n?Ea(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>ua(n,typeof e!="symbol"?e+"":e,t);class Sa extends w{constructor(e){super(),xs(this,"base64UrlEncoder",St.getInstance()),xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ia}initializeFields(){let e=new v;return e.put(O.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(O.DISCLOSED_VENDORS.toString(),new qe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var pa=Object.defineProperty,ha=(n,e,t)=>e in n?pa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kn=(n,e,t)=>ha(n,typeof e!="symbol"?e+"":e,t);const bt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new aa),e.push(new da),e.push(new Sa),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 p("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(O.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==O.CREATED&&e!==O.LAST_UPDATED){let s=new Date;super.setFieldValue(O.CREATED,s),super.setFieldValue(O.LAST_UPDATED,s)}}};kn(bt,"ID",5),kn(bt,"VERSION",1),kn(bt,"NAME","tcfcav1");let Ae=bt;var _a=Object.defineProperty,ga=(n,e,t)=>e in n?_a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>ga(n,typeof e!="symbol"?e+"":e,t);class Bn{constructor(e,t){js(this,"validator"),js(this,"value",null),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}}var Ta=Object.defineProperty,Oa=(n,e,t)=>e in n?Ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>Oa(n,typeof e!="symbol"?e+"":e,t);class Na{constructor(e,t){Hs(this,"validator"),Hs(this,"value",null),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}}var Ia=Object.defineProperty,Aa=(n,e,t)=>e in n?Ia(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ca=(n,e,t)=>Aa(n,typeof e!="symbol"?e+"":e,t);class fa{constructor(){Ca(this,"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 ie;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(ie||(ie={}));const ma=[ie.VERSION,ie.NOTICE,ie.OPT_OUT_SALE,ie.LSPA_COVERED];class Pa extends w{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ma}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new fa;return t.put(ie.VERSION,new Na(Ce.VERSION)),t.put(ie.NOTICE,new Bn("-",e)),t.put(ie.OPT_OUT_SALE,new Bn("-",e)),t.put(ie.LSPA_COVERED,new Bn("-",e)),t}encodeSegment(e){let t="";return t+=e.get(ie.VERSION).getValue(),t+=e.get(ie.NOTICE).getValue(),t+=e.get(ie.OPT_OUT_SALE).getValue(),t+=e.get(ie.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ie.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ie.NOTICE).setValue(e.charAt(1)),t.get(ie.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ie.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var wa=Object.defineProperty,Da=(n,e,t)=>e in n?wa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>Da(n,typeof e!="symbol"?e+"":e,t);const vt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new Pa),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(".")}};Kn(vt,"ID",6),Kn(vt,"VERSION",1),Kn(vt,"NAME","uspv1");let Ce=vt;var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const ba=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.SHARING_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,I.SENSITIVE_DATA_LIMIT_USE_NOTICE,I.SALE_OPT_OUT,I.SHARING_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.PERSONAL_DATA_CONSENTS,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],va=[I.GPC_SEGMENT_TYPE,I.GPC];class ks{static encode(e,t,s){if(e.length>s)throw new se("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=V.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(V.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Va=Object.defineProperty,Ra=(n,e,t)=>e in n?Va(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bs=(n,e,t)=>Ra(n,typeof e!="symbol"?e+"":e,t);class W extends ve{constructor(e,t,s=!0){super(s),Bs(this,"elementBitStringLength"),Bs(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return ks.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new se(e)}}decode(e){try{this.value=ks.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(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)}}var ya=Object.defineProperty,Ma=(n,e,t)=>e in n?ya(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Ma(n,typeof e!="symbol"?e+"":e,t);class Ua extends w{constructor(e){super(),Ks(this,"base64UrlEncoder",H.getInstance()),Ks(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ba}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 v;return i.put(I.VERSION.toString(),new l(6,re.VERSION)),i.put(I.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(I.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(I.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(I.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var La=Object.defineProperty,Ga=(n,e,t)=>e in n?La(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>Ga(n,typeof e!="symbol"?e+"":e,t);class Fa extends w{constructor(e){super(),Ys(this,"base64UrlEncoder",H.getInstance()),Ys(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return va}initializeFields(){let e=new v;return e.put(I.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(I.GPC.toString(),new K(!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 p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var $a=Object.defineProperty,xa=(n,e,t)=>e in n?$a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>xa(n,typeof e!="symbol"?e+"":e,t);const Vt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new Ua),e.push(new Fa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Yn(Vt,"ID",7),Yn(Vt,"VERSION",1),Yn(Vt,"NAME","usnat");let re=Vt;var R;(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"})(R||(R={}));const ja=[R.VERSION,R.SALE_OPT_OUT_NOTICE,R.SHARING_OPT_OUT_NOTICE,R.SENSITIVE_DATA_LIMIT_USE_NOTICE,R.SALE_OPT_OUT,R.SHARING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.PERSONAL_DATA_CONSENTS,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],Ha=[R.GPC_SEGMENT_TYPE,R.GPC];var ka=Object.defineProperty,Ba=(n,e,t)=>e in n?ka(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>Ba(n,typeof e!="symbol"?e+"":e,t);class Ka extends w{constructor(e){super(),zs(this,"base64UrlEncoder",H.getInstance()),zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ja}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 v;return i.put(R.VERSION.toString(),new l(6,ce.VERSION)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0]).withValidator(s)),i.put(R.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var Ya=Object.defineProperty,za=(n,e,t)=>e in n?Ya(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>za(n,typeof e!="symbol"?e+"":e,t);class Wa extends w{constructor(e){super(),Ws(this,"base64UrlEncoder",H.getInstance()),Ws(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Ha}initializeFields(){let e=new v;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(R.GPC.toString(),new K(!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 p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var Qa=Object.defineProperty,Ja=(n,e,t)=>e in n?Qa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>Ja(n,typeof e!="symbol"?e+"":e,t);const Rt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Ka),e.push(new Wa),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(".")}};zn(Rt,"ID",8),zn(Rt,"VERSION",1),zn(Rt,"NAME","usca");let ce=Rt;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 qa=[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];var Xa=Object.defineProperty,Za=(n,e,t)=>e in n?Xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>Za(n,typeof e!="symbol"?e+"":e,t);class ec extends w{constructor(e){super(),Qs(this,"base64UrlEncoder",H.getInstance()),Qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return qa}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 v;return i.put(J.VERSION.toString(),new l(6,le.VERSION)),i.put(J.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(J.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(J.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var tc=Object.defineProperty,nc=(n,e,t)=>e in n?tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>nc(n,typeof e!="symbol"?e+"":e,t);const yt=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new ec),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(".")}};Wn(yt,"ID",9),Wn(yt,"VERSION",1),Wn(yt,"NAME","usva");let le=yt;var k;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(k||(k={}));const sc=[k.VERSION,k.SHARING_NOTICE,k.SALE_OPT_OUT_NOTICE,k.TARGETED_ADVERTISING_OPT_OUT_NOTICE,k.SALE_OPT_OUT,k.TARGETED_ADVERTISING_OPT_OUT,k.SENSITIVE_DATA_PROCESSING,k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,k.MSPA_COVERED_TRANSACTION,k.MSPA_OPT_OUT_OPTION_MODE,k.MSPA_SERVICE_PROVIDER_MODE],ic=[k.GPC_SEGMENT_TYPE,k.GPC];var rc=Object.defineProperty,oc=(n,e,t)=>e in n?rc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>oc(n,typeof e!="symbol"?e+"":e,t);class ac extends w{constructor(e){super(),Js(this,"base64UrlEncoder",H.getInstance()),Js(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return sc}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 v;return i.put(k.VERSION.toString(),new l(6,de.VERSION)),i.put(k.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(k.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(k.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(k.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(k.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(k.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var cc=Object.defineProperty,lc=(n,e,t)=>e in n?cc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>lc(n,typeof e!="symbol"?e+"":e,t);class dc extends w{constructor(e){super(),qs(this,"base64UrlEncoder",H.getInstance()),qs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ic}initializeFields(){let e=new v;return e.put(k.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(k.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(k.GPC.toString(),new K(!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 p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var Ec=Object.defineProperty,uc=(n,e,t)=>e in n?Ec(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>uc(n,typeof e!="symbol"?e+"":e,t);const Mt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new ac),e.push(new dc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(k.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(k.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Qn(Mt,"ID",10),Qn(Mt,"VERSION",1),Qn(Mt,"NAME","usco");let de=Mt;var Y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Y||(Y={}));const Sc=[Y.VERSION,Y.SHARING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE];var pc=Object.defineProperty,hc=(n,e,t)=>e in n?pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>hc(n,typeof e!="symbol"?e+"":e,t);class _c extends w{constructor(e){super(),Xs(this,"base64UrlEncoder",H.getInstance()),Xs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Sc}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 v;return i.put(Y.VERSION.toString(),new l(6,Ee.VERSION)),i.put(Y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(Y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var gc=Object.defineProperty,Tc=(n,e,t)=>e in n?gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>Tc(n,typeof e!="symbol"?e+"":e,t);const Ut=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new _c),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(".")}};Jn(Ut,"ID",11),Jn(Ut,"VERSION",1),Jn(Ut,"NAME","usut");let Ee=Ut;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 Oc=[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],Nc=[B.GPC_SEGMENT_TYPE,B.GPC];var Ic=Object.defineProperty,Ac=(n,e,t)=>e in n?Ic(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>Ac(n,typeof e!="symbol"?e+"":e,t);class Cc extends w{constructor(e){super(),Zs(this,"base64UrlEncoder",H.getInstance()),Zs(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Oc}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 v;return i.put(B.VERSION.toString(),new l(6,ue.VERSION)),i.put(B.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var fc=Object.defineProperty,mc=(n,e,t)=>e in n?fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>mc(n,typeof e!="symbol"?e+"":e,t);class Pc extends w{constructor(e){super(),ei(this,"base64UrlEncoder",H.getInstance()),ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Nc}initializeFields(){let e=new v;return e.put(B.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(B.GPC.toString(),new K(!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 p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var wc=Object.defineProperty,Dc=(n,e,t)=>e in n?wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>Dc(n,typeof e!="symbol"?e+"":e,t);const Lt=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new Cc),e.push(new Pc),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(".")}};qn(Lt,"ID",12),qn(Lt,"VERSION",1),qn(Lt,"NAME","usct");let ue=Lt;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 bc=[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];var vc=Object.defineProperty,Vc=(n,e,t)=>e in n?vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Vc(n,typeof e!="symbol"?e+"":e,t);class Rc extends w{constructor(e){super(),ti(this,"base64UrlEncoder",H.getInstance()),ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return bc}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 v;return i.put(z.VERSION.toString(),new l(6,Se.VERSION)),i.put(z.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(z.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(z.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var yc=Object.defineProperty,Mc=(n,e,t)=>e in n?yc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>Mc(n,typeof e!="symbol"?e+"":e,t);const Gt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new Rc),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(".")}};Xn(Gt,"ID",13),Xn(Gt,"VERSION",1),Xn(Gt,"NAME","usfl");let Se=Gt;var y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.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 Uc=[y.VERSION,y.SHARING_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],Lc=[y.GPC_SEGMENT_TYPE,y.GPC];var Gc=Object.defineProperty,Fc=(n,e,t)=>e in n?Gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>Fc(n,typeof e!="symbol"?e+"":e,t);class $c extends w{constructor(e){super(),ni(this,"base64UrlEncoder",H.getInstance()),ni(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Uc}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 v;return i.put(y.VERSION.toString(),new l(6,pe.VERSION)),i.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var xc=Object.defineProperty,jc=(n,e,t)=>e in n?xc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>jc(n,typeof e!="symbol"?e+"":e,t);class Hc extends w{constructor(e){super(),si(this,"base64UrlEncoder",H.getInstance()),si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Lc}initializeFields(){let e=new v;return e.put(y.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(y.GPC.toString(),new K(!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 p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var kc=Object.defineProperty,Bc=(n,e,t)=>e in n?kc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Bc(n,typeof e!="symbol"?e+"":e,t);const Ft=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new $c),e.push(new Hc),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(".")}};Zn(Ft,"ID",14),Zn(Ft,"VERSION",1),Zn(Ft,"NAME","usmt");let pe=Ft;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 Kc=[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],Yc=[M.GPC_SEGMENT_TYPE,M.GPC];var zc=Object.defineProperty,Wc=(n,e,t)=>e in n?zc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>Wc(n,typeof e!="symbol"?e+"":e,t);class Qc extends w{constructor(e){super(),ii(this,"base64UrlEncoder",H.getInstance()),ii(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Kc}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 v;return i.put(M.VERSION.toString(),new l(6,fe.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var Jc=Object.defineProperty,qc=(n,e,t)=>e in n?Jc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>qc(n,typeof e!="symbol"?e+"":e,t);class Xc extends w{constructor(e){super(),ri(this,"base64UrlEncoder",H.getInstance()),ri(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Yc}initializeFields(){let e=new v;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(M.GPC.toString(),new K(!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 p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var Zc=Object.defineProperty,el=(n,e,t)=>e in n?Zc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>el(n,typeof e!="symbol"?e+"":e,t);const $t=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new Qc),e.push(new Xc),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(".")}};es($t,"ID",15),es($t,"VERSION",1),es($t,"NAME","usor");let fe=$t;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 tl=[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],nl=[U.GPC_SEGMENT_TYPE,U.GPC];var sl=Object.defineProperty,il=(n,e,t)=>e in n?sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>il(n,typeof e!="symbol"?e+"":e,t);class rl extends w{constructor(e){super(),oi(this,"base64UrlEncoder",H.getInstance()),oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return tl}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 v;return i.put(U.VERSION.toString(),new l(6,he.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var ol=Object.defineProperty,al=(n,e,t)=>e in n?ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>al(n,typeof e!="symbol"?e+"":e,t);class cl extends w{constructor(e){super(),ai(this,"base64UrlEncoder",H.getInstance()),ai(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return nl}initializeFields(){let e=new v;return e.put(U.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(U.GPC.toString(),new K(!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 p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var ll=Object.defineProperty,dl=(n,e,t)=>e in n?ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>dl(n,typeof e!="symbol"?e+"":e,t);const xt=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new rl),e.push(new cl),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(".")}};ts(xt,"ID",16),ts(xt,"VERSION",1),ts(xt,"NAME","ustx");let he=xt;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 El=[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],ul=[L.GPC_SEGMENT_TYPE,L.GPC];var Sl=Object.defineProperty,pl=(n,e,t)=>e in n?Sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>pl(n,typeof e!="symbol"?e+"":e,t);class hl extends w{constructor(e){super(),ci(this,"base64UrlEncoder",H.getInstance()),ci(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return El}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 v;return i.put(L.VERSION.toString(),new l(6,_e.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var _l=Object.defineProperty,gl=(n,e,t)=>e in n?_l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>gl(n,typeof e!="symbol"?e+"":e,t);class Tl extends w{constructor(e){super(),li(this,"base64UrlEncoder",H.getInstance()),li(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ul}initializeFields(){let e=new v;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(L.GPC.toString(),new K(!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 p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var Ol=Object.defineProperty,Nl=(n,e,t)=>e in n?Ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>Nl(n,typeof e!="symbol"?e+"":e,t);const jt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new hl),e.push(new Tl),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(".")}};ns(jt,"ID",17),ns(jt,"VERSION",1),ns(jt,"NAME","usde");let _e=jt;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.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"})(G||(G={}));const Il=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SENSITIVE_DATA_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],Al=[G.GPC_SEGMENT_TYPE,G.GPC];var Cl=Object.defineProperty,fl=(n,e,t)=>e in n?Cl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>fl(n,typeof e!="symbol"?e+"":e,t);class ml extends w{constructor(e){super(),di(this,"base64UrlEncoder",H.getInstance()),di(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Il}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 v;return i.put(G.VERSION.toString(),new l(6,ge.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var Pl=Object.defineProperty,wl=(n,e,t)=>e in n?Pl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>wl(n,typeof e!="symbol"?e+"":e,t);class Dl extends w{constructor(e){super(),Ei(this,"base64UrlEncoder",H.getInstance()),Ei(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Al}initializeFields(){let e=new v;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(G.GPC.toString(),new K(!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 p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var bl=Object.defineProperty,vl=(n,e,t)=>e in n?bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>vl(n,typeof e!="symbol"?e+"":e,t);const Ht=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new ml),e.push(new Dl),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(".")}};ss(Ht,"ID",18),ss(Ht,"VERSION",1),ss(Ht,"NAME","usia");let ge=Ht;var F;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(F||(F={}));const Vl=[F.VERSION,F.PROCESSING_NOTICE,F.SALE_OPT_OUT_NOTICE,F.TARGETED_ADVERTISING_OPT_OUT_NOTICE,F.SALE_OPT_OUT,F.TARGETED_ADVERTISING_OPT_OUT,F.SENSITIVE_DATA_PROCESSING,F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,F.ADDITIONAL_DATA_PROCESSING_CONSENT,F.MSPA_COVERED_TRANSACTION,F.MSPA_OPT_OUT_OPTION_MODE,F.MSPA_SERVICE_PROVIDER_MODE],Rl=[F.GPC_SEGMENT_TYPE,F.GPC];var yl=Object.defineProperty,Ml=(n,e,t)=>e in n?yl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>Ml(n,typeof e!="symbol"?e+"":e,t);class Ul extends w{constructor(e){super(),ui(this,"base64UrlEncoder",H.getInstance()),ui(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Vl}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 v;return i.put(F.VERSION.toString(),new l(6,Te.VERSION)),i.put(F.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(F.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(F.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var Ll=Object.defineProperty,Gl=(n,e,t)=>e in n?Ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);class Fl extends w{constructor(e){super(),Si(this,"base64UrlEncoder",H.getInstance()),Si(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Rl}initializeFields(){let e=new v;return e.put(F.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(F.GPC.toString(),new K(!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 p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var $l=Object.defineProperty,xl=(n,e,t)=>e in n?$l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,is=(n,e,t)=>xl(n,typeof e!="symbol"?e+"":e,t);const kt=class fn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return fn.ID}getName(){return fn.NAME}getVersion(){return fn.VERSION}initializeSegments(){let e=[];return e.push(new Ul),e.push(new Fl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};is(kt,"ID",19),is(kt,"VERSION",1),is(kt,"NAME","usne");let Te=kt;var $;(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"})($||($={}));const jl=[$.VERSION,$.PROCESSING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.ADDITIONAL_DATA_PROCESSING_CONSENT,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],Hl=[$.GPC_SEGMENT_TYPE,$.GPC];var kl=Object.defineProperty,Bl=(n,e,t)=>e in n?kl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>Bl(n,typeof e!="symbol"?e+"":e,t);class Kl extends w{constructor(e){super(),pi(this,"base64UrlEncoder",H.getInstance()),pi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return jl}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 v;return i.put($.VERSION.toString(),new l(6,Oe.VERSION)),i.put($.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0]).withValidator(s)),i.put($.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var Yl=Object.defineProperty,zl=(n,e,t)=>e in n?Yl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>zl(n,typeof e!="symbol"?e+"":e,t);class Wl extends w{constructor(e){super(),hi(this,"base64UrlEncoder",H.getInstance()),hi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Hl}initializeFields(){let e=new v;return e.put($.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put($.GPC.toString(),new K(!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 p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var Ql=Object.defineProperty,Jl=(n,e,t)=>e in n?Ql(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>Jl(n,typeof e!="symbol"?e+"":e,t);const Bt=class mn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mn.ID}getName(){return mn.NAME}getVersion(){return mn.VERSION}initializeSegments(){let e=[];return e.push(new Kl),e.push(new Wl),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($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};rs(Bt,"ID",20),rs(Bt,"VERSION",1),rs(Bt,"NAME","usnh");let Oe=Bt;var x;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const ql=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Xl=[x.GPC_SEGMENT_TYPE,x.GPC];var Zl=Object.defineProperty,ed=(n,e,t)=>e in n?Zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>ed(n,typeof e!="symbol"?e+"":e,t);class td extends w{constructor(e){super(),_i(this,"base64UrlEncoder",H.getInstance()),_i(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ql}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 v;return i.put(x.VERSION.toString(),new l(6,Ne.VERSION)),i.put(x.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new W(2,[0,0,0,0,0]).withValidator(s)),i.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var nd=Object.defineProperty,sd=(n,e,t)=>e in n?nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>sd(n,typeof e!="symbol"?e+"":e,t);class id extends w{constructor(e){super(),gi(this,"base64UrlEncoder",H.getInstance()),gi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return Xl}initializeFields(){let e=new v;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(x.GPC.toString(),new K(!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 p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var rd=Object.defineProperty,od=(n,e,t)=>e in n?rd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,os=(n,e,t)=>od(n,typeof e!="symbol"?e+"":e,t);const Kt=class Pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pn.ID}getName(){return Pn.NAME}getVersion(){return Pn.VERSION}initializeSegments(){let e=[];return e.push(new td),e.push(new id),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(".")}};os(Kt,"ID",21),os(Kt,"VERSION",1),os(Kt,"NAME","usnj");let Ne=Kt;var j;(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"})(j||(j={}));const ad=[j.VERSION,j.PROCESSING_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.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],cd=[j.GPC_SEGMENT_TYPE,j.GPC];var ld=Object.defineProperty,dd=(n,e,t)=>e in n?ld(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>dd(n,typeof e!="symbol"?e+"":e,t);class Ed extends w{constructor(e){super(),Ti(this,"base64UrlEncoder",H.getInstance()),Ti(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return ad}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 v;return i.put(j.VERSION.toString(),new l(6,Ie.VERSION)),i.put(j.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),i.put(j.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),i.put(j.SENSITIVE_DATA_PROCESSING.toString(),new W(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),i.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(t)),i.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),i.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(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 p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var ud=Object.defineProperty,Sd=(n,e,t)=>e in n?ud(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>Sd(n,typeof e!="symbol"?e+"":e,t);class pd extends w{constructor(e){super(),Oi(this,"base64UrlEncoder",H.getInstance()),Oi(this,"bitStringEncoder",b.getInstance()),e&&this.decode(e)}getFieldNames(){return cd}initializeFields(){let e=new v;return e.put(j.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new K(!0)),e.put(j.GPC.toString(),new K(!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 p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var hd=Object.defineProperty,_d=(n,e,t)=>e in n?hd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,as=(n,e,t)=>_d(n,typeof e!="symbol"?e+"":e,t);const Yt=class wn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new Ed),e.push(new pd),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(j.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(j.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(j.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};as(Yt,"ID",22),as(Yt,"VERSION",1),as(Yt,"NAME","ustn");let Ie=Yt;var gd=Object.defineProperty,Td=(n,e,t)=>e in n?gd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Td(n,typeof e!="symbol"?e+"":e,t);class Z{}Ni(Z,"SECTION_ID_NAME_MAP",new Map([[X.ID,X.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[re.ID,re.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[pe.ID,pe.NAME],[fe.ID,fe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME],[Ie.ID,Ie.NAME]])),Ni(Z,"SECTION_ORDER",[X.NAME,Ae.NAME,Ce.NAME,re.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,pe.NAME,fe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME,Ie.NAME]);var Od=Object.defineProperty,Nd=(n,e,t)=>e in n?Od(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zt=(n,e,t)=>Nd(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e){zt(this,"sections",new Map),zt(this,"encodedString",null),zt(this,"decoded",!0),zt(this,"dirty",!1),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===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===fe.NAME?(i=new fe,this.sections.set(fe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.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)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.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)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new ut(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.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(Z.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(Z.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(Z.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(Z.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 Je;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<Z.SECTION_ORDER.length;t++){let s=Z.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<Z.SECTION_ORDER.length;r++){let o=Z.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new Je;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 i=new Je(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===X.ID){let o=new X(t[r+1]);s.set(X.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===re.ID){let o=new re(t[r+1]);s.set(re.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===fe.ID){let o=new fe(t[r+1]);s.set(fe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}else if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new X(e);return t.set(X.NAME,s),new Je().setFieldValue(xe.SECTION_IDS,[2]),t.set(Je.NAME,s),t}else throw new p("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(Z.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===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===fe.NAME?(s=new fe,this.sections.set(fe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.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)):e===Oe.NAME?(s=new Oe,this.sections.set(Oe.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)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Z.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<Z.SECTION_ORDER.length;t++){let s=Z.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}}var Id=Object.defineProperty,Ad=(n,e,t)=>e in n?Id(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>Ad(n,typeof e!="symbol"?e+"":e,t);class Cd{constructor(){Ve(this,"gppVersion","1.1"),Ve(this,"supportedAPIs",[]),Ve(this,"eventQueue",new Kr(this)),Ve(this,"cmpStatus",it.LOADING),Ve(this,"cmpDisplayStatus",Ye.HIDDEN),Ve(this,"signalStatus",be.NOT_READY),Ve(this,"applicableSections",[]),Ve(this,"gppModel",new Ii),Ve(this,"cmpId"),Ve(this,"cmpVersion"),Ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=Ye.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Ii,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class cs{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,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 Wt extends Error{constructor(e){super(e),this.name="GVLError"}}var fd=Object.defineProperty,md=(n,e,t)=>e in n?fd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pd=(n,e,t)=>md(n,typeof e!="symbol"?e+"":e,t);const Ai=class Dn{has(e){return Dn.langSet.has(e)}forEach(e){Dn.langSet.forEach(e)}get size(){return Dn.langSet.size}};Pd(Ai,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let wd=Ai;var Dd=Object.defineProperty,bd=(n,e,t)=>e in n?Dd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>bd(n,typeof e!="symbol"?e+"":e,t),Ci=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const fi=class bn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new wd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",bn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new bn;return t.populate(e),t}static fromUrl(e){return Ci(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Wt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Wt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new bn;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(yield cs.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield cs.fetch(r))}return s})}changeLanguage(e){return Ci(this,null,function*(){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(yield cs.fetch(s))}catch(i){throw new Wt("unable to load language: "+i.message)}}}else throw new Wt(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),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"}};q(fi,"DEFAULT_LANGUAGE","EN");let mi=fi;var vd=Object.defineProperty,Vd=(n,e,t)=>e in n?vd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>Vd(n,typeof e!="symbol"?e+"":e,t),Rd=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});class yd{constructor(e,t,s){Pi(this,"callResponder"),Pi(this,"cmpApiContext"),this.cmpApiContext=new Cd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new Hr(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(Z.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Z.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Z.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Z.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Z.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Z.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return mi.fromVendorList(e)}getGvlFromUrl(e){return Rd(this,null,function*(){return mi.fromUrl(e)})}}var Md=Object.defineProperty,Ud=(n,e,t)=>e in n?Md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ls=(n,e,t)=>Ud(n,typeof e!="symbol"?e+"":e,t);class wi{constructor(e,t,s){ls(this,"consentPreference"),ls(this,"notice"),ls(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Di;(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={}))})(Di||(Di={}));var Ld=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(Ld||{}),Gd=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Gd||{}),bi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(bi||{}),Ge=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.NOT_APPLICABLE="not_applicable",n.TCF="tcf",n))(Ge||{}),Qt=(n=>(n.OMIT="omit",n.INCLUDE="include",n))(Qt||{}),pt=(n=>(n.BOOLEAN="boolean",n.CONSENT_MECHANISM="consent_mechanism",n))(pt||{}),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||{}),Fd=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(Fd||{}),$d=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))($d||{}),xd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(xd||{}),jd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n.OPT_IN_ONLY="opt_in_only",n))(jd||{}),Hd=(n=>(n.REJECT_ALL="reject_all",n.REJECT_CONSENT_ONLY="reject_consent_only",n))(Hd||{}),lt=(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))(lt||{}),kd=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(kd||{}),Bd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(Bd||{}),Kd=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(Kd||{});const Yd=(n,e)=>!!Object.keys(e).includes(n.notice_key),ds=n=>!n||n===Ge.OPT_OUT?!1:n===Ge.OPT_IN?!0:n===Ge.ACKNOWLEDGE,_t=(n,e)=>n?e===bi.NOTICE_ONLY?Ge.ACKNOWLEDGE:Ge.OPT_IN:Ge.OPT_OUT,zd=n=>typeof n=="string"?ds(n):n,Wd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var Qd=Object.defineProperty,Jd=Object.defineProperties,qd=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,Xd=Object.prototype.hasOwnProperty,Zd=Object.prototype.propertyIsEnumerable,Vi=(n,e,t)=>e in n?Qd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jt=(n,e)=>{for(var t in e||(e={}))Xd.call(e,t)&&Vi(n,t,e[t]);if(vi)for(var t of vi(e))Zd.call(e,t)&&Vi(n,t,e[t]);return n},eE=(n,e)=>Jd(n,qd(e));const dt=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ri=n=>!!(n&&n.every(e=>e.default_preference===Ge.OPT_IN)),tE=n=>n?n.location&&Wd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,nE=n=>n.fidesConsentOverride===lt.ACCEPT||n.fidesConsentOverride===lt.REJECT,sE=(n,e,t,s)=>{var i,r,o,a,c,d;return s!=null&&s.fidesDisableBanner||!dt(n)?!1:((i=n.experience_config)==null?void 0:i.component)===ht.TCF_OVERLAY&&e?(r=n.meta)!=null&&r.version_hash&&e.fides_meta.consentMethod!==lt.DISMISS?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||!((c=n?.privacy_notices)!=null&&c.length)?!1:t?s&&nE(s)?!1:e?.fides_meta.consentMethod===lt.GPC?!0:!((d=n.privacy_notices)!=null&&d.every(S=>Yd(S,t))):!0},iE=(n,e)=>n.map(t=>{var s;const i=_t(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new wi(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)}),rE=({consent:n,nonApplicableNotices:e,flagType:t,mode:s=Qt.OMIT})=>{if(!(e!=null&&e.length))return n;const i=Jt({},n);return s===Qt.INCLUDE?e.forEach(r=>{i[r]=t===pt.CONSENT_MECHANISM?Ge.NOT_APPLICABLE:!0}):e.forEach(r=>{delete i[r]}),i},oE=({consent:n,flagType:e=pt.BOOLEAN,consentMechanisms:t})=>{const s={};if(e!==pt.CONSENT_MECHANISM)return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,zd(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]=_t(o,a)}}),s):Jt({},n)},yi=(n,e,t=[],s,i)=>{var r,o,a;const c=Jt({},n),d=(r=window.Fides)==null?void 0:r.options,S=(o=i??d?.fidesConsentNonApplicableFlagMode)!=null?o:Qt.OMIT,h=(a=s??d?.fidesConsentFlagType)!=null?a:pt.BOOLEAN,E={};Object.assign(E,rE({consent:{},nonApplicableNotices:e??[],flagType:h,mode:S}));const N=t.reduce((T,P)=>eE(Jt({},T),{[P.notice_key]:P.consent_mechanism}),{});return Object.assign(E,oE({consent:c,consentMechanisms:N,flagType:h})),E};var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */qt.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)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,S=function(T){T=String(T).replace(d,"");var P=T.length;P%4==0&&(T=T.replace(/==?$/,""),P=T.length),(P%4==1||/[^+a-zA-Z0-9/]/.test(T))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var C=0,f,m,ne="",ye=-1;++ye<P;)m=c.indexOf(T.charAt(ye)),f=C%4?f*64+m:m,C++%4&&(ne+=String.fromCharCode(255&f>>(-2*C&6)));return ne},h=function(T){T=String(T),/[^\0-\xFF]/.test(T)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var P=T.length%3,C="",f=-1,m,ne,ye,Pe,mr=T.length-P;++f<mr;)m=T.charCodeAt(f)<<16,ne=T.charCodeAt(++f)<<8,ye=T.charCodeAt(++f),Pe=m+ne+ye,C+=c.charAt(Pe>>18&63)+c.charAt(Pe>>12&63)+c.charAt(Pe>>6&63)+c.charAt(Pe&63);return P==2?(m=T.charCodeAt(f)<<8,ne=T.charCodeAt(++f),Pe=m+ne,C+=c.charAt(Pe>>10)+c.charAt(Pe>>4&63)+c.charAt(Pe<<2&63)+"="):P==1&&(Pe=T.charCodeAt(f),C+=c.charAt(Pe>>2)+c.charAt(Pe<<4&63)+"=="),C},E={encode:h,decode:S,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=E;else for(var N in E)E.hasOwnProperty(N)&&(s[N]=E[N]);else t.base64=E})(Es)}(qt,qt.exports);var Mi=qt.exports;/*! js-cookie v3.0.5 | MIT */function Xt(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 aE={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 us(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Xt({},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 c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].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 c=r[a].split("="),d=c.slice(1).join("=");try{var S=decodeURIComponent(c[0]);if(o[S]=n.read(d,S),i===S)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Xt({},r,{expires:-1}))},withAttributes:function(i){return us(this.converter,Xt({},this.attributes,i))},withConverter:function(i){return us(Xt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var cE=us(aE,{path:"/"});let Zt;const lE=new Uint8Array(16);function dE(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(lE)}const ae=[];for(let n=0;n<256;++n)ae.push((n+256).toString(16).slice(1));function EE(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 uE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Ui={randomUUID:uE};function SE(n,e,t){if(Ui.randomUUID&&!e&&!n)return Ui.randomUUID();n=n||{};const s=n.random||(n.rng||dE)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return EE(s)}var pE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(pE||{}),Ss=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(Ss||{});const ps=407,en=",",hE=[{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"}],_E=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];hE.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),Ss.CONSENT.toString(),Ss.LEGITIMATE_INTERESTS.toString();const gE={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]};var TE=Object.defineProperty,OE=Object.defineProperties,NE=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,AE=Object.prototype.propertyIsEnumerable,Gi=(n,e,t)=>e in n?TE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,CE=(n,e)=>{for(var t in e||(e={}))IE.call(e,t)&&Gi(n,t,e[t]);if(Li)for(var t of Li(e))AE.call(e,t)&&Gi(n,t,e[t]);return n},fE=(n,e)=>OE(n,NE(e)),mE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Fi="fides_consent",PE=365,tn=cE.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),wE=()=>SE();wE();const DE=n=>tn.get(n),bE=()=>{const n=DE(Fi);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(Mi.decode(n))}catch{return}}},$i=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=Mi.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),tn.set(Fi,s,{path:"/",domain:r,expires:PE})){const a=bE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},vE=n=>{const e={};return _E.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,ds(r.preference)]))}),e},VE=(n,e=!0)=>{n.forEach(t=>{var s;if(tn.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;tn.remove(t.name,{domain:`.${i}`})}})},xi=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,ds(s)]));return Object.fromEntries(e)},RE=(n,e)=>mE(void 0,null,function*(){return fE(CE({},n),{consent:xi(e)})});var yE=(n=>(n.GVL="gvl",n.AC="gacp",n))(yE||{});const je=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},nn=(n,e)=>{if(!(e!=null&&e.vendors))return;const{source:t,id:s}=je(n);if(t==="gvl"||t===void 0)return e.vendors[s]},ME=n=>je(n).source==="gacp",UE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},LE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>nn(t,n.gvl)).map(t=>+je(t).id)},GE=n=>{if(!n)return{tc:"",ac:"",gpp:"",nc:""};const[e="",t="",s="",i=""]=n.split(en);return e?{tc:e,ac:t,gpp:s,nc:i}:{tc:"",ac:"",gpp:s,nc:i}},ji=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(en))||[]).concat(s);return s.map((r,o)=>o<2?`${i[o]},`:o===2?t:o===3&&i[3]?`,${i[3]}`:r).join("")},FE=1,Xe={us:{name:re.NAME,id:re.ID},us_ca:{name:ce.NAME,id:ce.ID},us_co:{name:de.NAME,id:de.ID},us_ct:{name:ue.NAME,id:ue.ID},us_ut:{name:Ee.NAME,id:Ee.ID},us_va:{name:le.NAME,id:le.ID},us_de:{name:_e.NAME,id:_e.ID},us_fl:{name:Se.NAME,id:Se.ID},us_ia:{name:ge.NAME,id:ge.ID},us_mt:{name:pe.NAME,id:pe.ID},us_ne:{name:Te.NAME,id:Te.ID},us_nh:{name:Oe.NAME,id:Oe.ID},us_nj:{name:Ne.NAME,id:Ne.ID},us_tn:{name:Ie.NAME,id:Ie.ID},us_tx:{name:he.NAME,id:he.ID}};function Hi(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var $E=Object.defineProperty,xE=Object.defineProperties,jE=Object.getOwnPropertyDescriptors,ki=Object.getOwnPropertySymbols,HE=Object.prototype.hasOwnProperty,kE=Object.prototype.propertyIsEnumerable,Bi=(n,e,t)=>e in n?$E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ki=(n,e)=>{for(var t in e||(e={}))HE.call(e,t)&&Bi(n,t,e[t]);if(ki)for(var t of ki(e))kE.call(e,t)&&Bi(n,t,e[t]);return n},Yi=(n,e)=>xE(n,jE(e)),BE=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())}),KE=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(KE||{});const YE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},zE="Fides.js",WE=(n,e,t,s,i)=>BE(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(c){return Promise.reject(c)}return Promise.resolve()}const o=Yi(Ki({},YE),{body:JSON.stringify(Yi(Ki({},e),{source:zE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var QE=Object.defineProperty,JE=Object.defineProperties,qE=Object.getOwnPropertyDescriptors,zi=Object.getOwnPropertySymbols,XE=Object.prototype.hasOwnProperty,ZE=Object.prototype.propertyIsEnumerable,Wi=(n,e,t)=>e in n?QE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hs=(n,e)=>{for(var t in e||(e={}))XE.call(e,t)&&Wi(n,t,e[t]);if(zi)for(var t of zi(e))ZE.call(e,t)&&Wi(n,t,e[t]);return n},eu=(n,e)=>JE(n,qE(e));const Qi=(n,e,t,s)=>{var i,r,o,a,c;const d=e?hs({},e):void 0;if(typeof window<"u"&&typeof CustomEvent<"u"){const S=hs({consentMethod:d?.fides_meta.consentMethod},s),h=(i=performance?.mark)==null?void 0:i.call(performance,n),E=h?.startTime,N=d;N&&d!=null&&d.consent&&(N.consent=yi(d.consent,(o=(r=window.Fides)==null?void 0:r.experience)==null?void 0:o.non_applicable_privacy_notices,(c=(a=window.Fides)==null?void 0:a.experience)==null?void 0:c.privacy_notices));const T=new CustomEvent(n,{detail:eu(hs({},N),{debug:t,extraDetails:S,timestamp:E}),bubbles:!0});window.dispatchEvent(T)}};var tu=Object.defineProperty,nu=Object.defineProperties,su=Object.getOwnPropertyDescriptors,Ji=Object.getOwnPropertySymbols,iu=Object.prototype.hasOwnProperty,ru=Object.prototype.propertyIsEnumerable,qi=(n,e,t)=>e in n?tu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xi=(n,e)=>{for(var t in e||(e={}))iu.call(e,t)&&qi(n,t,e[t]);if(Ji)for(var t of Ji(e))ru.call(e,t)&&qi(n,t,e[t]);return n},ou=(n,e)=>nu(n,su(e)),Zi=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});function au(n,e,t,s,i,r,o,a,c,d){return Zi(this,null,function*(){const S=(r||[]).map(E=>({preference:E.consentPreference,privacy_notice_history_id:E.noticeHistoryId||""})),h=Xi({browser_identity:e.identity,preferences:S,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:c,property_id:d},o??[]);yield WE(s,h,n,e,t)})}const cu=n=>Zi(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:c,tcf:d,updateCookie:S,propertyId:h}){var E,N,T,P;if(!S&&e&&(S=m=>RE(m,e)),!S&&!e)throw new Error("updateCookie is required");const C=yield S(a);Object.assign(a,C),Object.assign(a.fides_meta,{consentMethod:i}),Qi("FidesUpdating",a,r.debug);const f=yi(a.consent,(N=(E=window.Fides)==null?void 0:E.experience)==null?void 0:N.non_applicable_privacy_notices,(P=(T=window.Fides)==null?void 0:T.experience)==null?void 0:P.privacy_notices);if(window.Fides.consent=f,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,$i(ou(Xi({},a),{consent:f}),r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield au(r,a,s,i,t,e,d,o,c,h)}catch{}e&&e.filter(m=>m.consentPreference===Ge.OPT_OUT).forEach(m=>{var ne,ye;(ne=m.notice)!=null&&ne.cookies&&VE(m.notice.cookies,(ye=s.experience_config)==null?void 0:ye.auto_subdomain_cookie_deletion)}),Qi("FidesUpdated",a,r.debug)});class ze extends Error{constructor(e){super(e),this.name="DecodingError"}}class He extends Error{constructor(e){super(e),this.name="EncodingError"}}class Et 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 _s{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 He("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new ze("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class Be{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 Be.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(Be.langSet.has(e))return e;if(Be.langSet.has(t))return t;const s=t+"-"+t;if(Be.langSet.has(s))return s;for(const i of Be.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){Be.langSet.forEach(e)}get size(){return Be.langSet.size}}class u{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class 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 Re;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Re||(Re={}));class $e 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 $e;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}${$e.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Re.NOT_ALLOWED||this.restrictionType===Re.REQUIRE_CONSENT||this.restrictionType===Re.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class er 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===Re.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Re.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Re.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push($e.unHash(i)):t.push($e.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add($e.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=$e.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 tr;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(tr||(tr={}));var Q;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(Q||(Q={}));class nr{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[u.cmpId]=12;static[u.cmpVersion]=12;static[u.consentLanguage]=12;static[u.consentScreen]=6;static[u.created]=36;static[u.isServiceSpecific]=1;static[u.lastUpdated]=36;static[u.policyVersion]=6;static[u.publisherCountryCode]=12;static[u.publisherLegitimateInterests]=24;static[u.publisherConsents]=24;static[u.purposeConsents]=24;static[u.purposeLegitimateInterests]=24;static[u.purposeOneTreatment]=1;static[u.specialFeatureOptins]=12;static[u.useNonStandardTexts]=1;static[u.vendorListVersion]=12;static[u.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Fe{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class D{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 He(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");return parseInt(e,2)}}class sr{static encode(e,t){return D.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new ze("invalid bit length");const s=new Date;return s.setTime(D.decode(e,t)*100),s}}class We{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Fe.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new ze("bitfield encoding length mismatch");const s=new me;for(let i=1;i<=t;i++)Fe.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class ir{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 He(`invalid language code: ${e}`);if(t%2===1)throw new He(`numBits must be even, ${t} is not valid`);t=t/2;const o=D.encode(i,t),a=D.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=D.decode(e.slice(0,r),r)+65,a=D.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new ze("invalid bit length for language");return s}}class lu{static encode(e){let t=D.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+=D.encode(i.purposeId,g.purposeId),t+=D.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,c=0,d="";for(let S=0;S<o;S++){const h=r[S];if(c===0&&(a++,c=h),S===o-1||r[S+1]>s(h,r[o-1])){const E=h!==c;d+=Fe.encode(E),d+=D.encode(c,g.vendorId),E&&(d+=D.encode(h,g.vendorId)),c=0}}t+=D.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new er,i=D.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=D.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=D.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const c=new $e(o,a),d=D.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let S=0;S<d;S++){const h=Fe.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const E=D.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,h){const N=D.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,N<E)throw new ze(`Invalid RangeEntry: endVendorId ${N} is less than ${E}`);for(let T=E;T<=N;T++)s.add(T,c)}else s.add(E,c)}}return s.bitLength=t,s}}var Tt;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(Tt||(Tt={}));class Ot{static encode(e){const t=[];let s=[],i=D.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,c=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let S=a+g.numEntries;return e.forEach((h,E)=>{r+=Fe.encode(h),o=e.maxId>d&&S<c,o&&h&&(e.has(E+1)?s.length===0&&(s.push(E),S+=g.singleOrRange,S+=g.vendorId):(s.push(E),S+=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=D.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=D.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 ze("Unable to decode default consent=1");i++}const a=D.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let c=0;c<a;c++){const d=Fe.decode(e.charAt(i));i+=g.singleOrRange;const S=D.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const h=D.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let E=S;E<=h;E++)s.set(E)}else s.set(S)}}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=D.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Fe.encode(!r),s+=D.encode(i[0],g.vendorId),r||(s+=D.encode(i[1],g.vendorId))}),s}}function rr(){return{[u.version]:D,[u.created]:sr,[u.lastUpdated]:sr,[u.cmpId]:D,[u.cmpVersion]:D,[u.consentScreen]:D,[u.consentLanguage]:ir,[u.vendorListVersion]:D,[u.policyVersion]:D,[u.isServiceSpecific]:Fe,[u.useNonStandardTexts]:Fe,[u.specialFeatureOptins]:We,[u.purposeConsents]:We,[u.purposeLegitimateInterests]:We,[u.purposeOneTreatment]:Fe,[u.publisherCountryCode]:ir,[u.vendorConsents]:Ot,[u.vendorLegitimateInterests]:Ot,[u.publisherRestrictions]:lu,segmentType:D,[u.vendorsDisclosed]:Ot,[u.vendorsAllowed]:Ot,[u.publisherConsents]:We,[u.publisherLegitimateInterests]:We,[u.numCustomPurposes]:D,[u.publisherCustomConsents]:We,[u.publisherCustomLegitimateInterests]:We}}class du{1={[Q.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.purposeConsents,u.vendorConsents]};2={[Q.CORE]:[u.version,u.created,u.lastUpdated,u.cmpId,u.cmpVersion,u.consentScreen,u.consentLanguage,u.vendorListVersion,u.policyVersion,u.isServiceSpecific,u.useNonStandardTexts,u.specialFeatureOptins,u.purposeConsents,u.purposeLegitimateInterests,u.purposeOneTreatment,u.publisherCountryCode,u.vendorConsents,u.vendorLegitimateInterests,u.publisherRestrictions],[Q.PUBLISHER_TC]:[u.publisherConsents,u.publisherLegitimateInterests,u.numCustomPurposes,u.publisherCustomConsents,u.publisherCustomLegitimateInterests],[Q.VENDORS_ALLOWED]:[u.vendorsAllowed],[Q.VENDORS_DISCLOSED]:[u.vendorsDisclosed]}}class Eu{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[u.supportOOB]===!0)&&this[2].push(Q.VENDORS_DISCLOSED),s&&(e[u.supportOOB]&&e[u.vendorsAllowed].size>0&&this[2].push(Q.VENDORS_ALLOWED),this[2].push(Q.PUBLISHER_TC))}}}class or{static fieldSequence=new du;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new He(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==Q.CORE&&(i=D.encode(nr.KEY_TO_ID[t],g.segmentType));const r=rr();return s.forEach(o=>{const a=e[o],c=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[u.numCustomPurposes]));try{i+=c.encode(a,d)}catch(S){throw new He(`Error encoding ${t}->${o}: ${S.message}`)}}),_s.encode(i)}static decode(e,t,s){const i=_s.decode(e);let r=0;s===Q.CORE&&(t.version=D.decode(i.substr(r,g[u.version]),g[u.version])),s!==Q.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=rr();return o.forEach(c=>{const d=a[c];let S=g[c];if(S===void 0&&this.isPublisherCustom(c)&&(S=Number(t[u.numCustomPurposes])),S!==0){const h=i.substr(r,S);if(d===Ot?t[c]=d.decode(h,t.version):t[c]=d.decode(h,S),Number.isInteger(S))r+=S;else if(Number.isInteger(t[c].bitLength))r+=t[c].bitLength;else throw new ze(c)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class uu{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 c=t.vendors[a];if(!c||c.deletedDate)i.unset(a);else if(c[r].length===0)if(r==="legIntPurposes"&&c.purposes.length===0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(r==="legIntPurposes"&&c.purposes.length>0&&c.legIntPurposes.length===0&&c.specialPurposes.length>0)i.set(a);else if(e.isServiceSpecific)if(c.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let S=!1;for(let h=0,E=d.length;h<E&&!S;h++)S=d[h].restrictionType===Re.REQUIRE_CONSENT&&r==="purposes"||d[h].restrictionType===Re.REQUIRE_LI&&r==="legIntPurposes";S||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new He("Unable to encode TCModel without a GVL");if(!s.isReady)throw new He("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 He(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class Su{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,c=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let E=a.response;if(typeof E=="string")try{E=JSON.parse(E)}catch{}r(E)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},h=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",c),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=h,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class A extends gt{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Be;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new Et("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=A.baseUrl,i=t?.language;if(i)try{i=A.consentLanguages.parseLanguage(i)}catch(r){throw new Et("Error during parsing the language: "+r.message)}if(this.lang_=i||A.DEFAULT_LANGUAGE,this.cacheLang_=i||A.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new Et("must specify GVL.baseUrl before loading GVL json");if(e>0){const r=e;A.CACHE.has(r)?(this.populate(A.CACHE.get(r)),this.readyPromise=Promise.resolve()):(s+=A.versionedFilename.replace("[VERSION]",String(r)),this.readyPromise=this.fetchJson(s))}else A.CACHE.has(A.LATEST_CACHE_KEY)?(this.populate(A.CACHE.get(A.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+A.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&A.LANGUAGE_CACHE.size>0?(A.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(A.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(A.CACHE.delete(e),t=!0):e===void 0&&(A.CACHE=new Map,t=!0),t}cacheLanguage(){A.LANGUAGE_CACHE.has(this.cacheLang_)||A.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await Su.fetch(e))}catch(t){throw new Et(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=A.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=A.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=A.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=A.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=A.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=A.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=A.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=A.consentLanguages.parseLanguage(e)}catch(i){throw new Et("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===A.DEFAULT_LANGUAGE.toLowerCase()&&!A.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,A.LANGUAGE_CACHE.has(s)){const i=A.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=A.baseUrl+A.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new Et("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&A.CACHE.set(A.LATEST_CACHE_KEY,this.getJson()),A.CACHE.has(this.vendorListVersion)||A.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(c=>{a[String(c)]=this.vendors[String(c)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new A(this.getJson());return this.lang_!==A.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class ar extends gt{static consentLanguages=A.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new me;purposeConsents=new me;purposeLegitimateInterests=new me;publisherConsents=new me;publisherLegitimateInterests=new me;publisherCustomConsents=new me;publisherCustomLegitimateInterests=new me;customPurposes;vendorConsents=new me;vendorLegitimateInterests=new me;vendorsDisclosed=new me;vendorsAllowed=new me;publisherRestrictions=new er;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){A.isInstanceOf(e)||(e=new A(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ke("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ke("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ke("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ke("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new ke("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ke("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ke("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class pu{static encode(e,t){let s="",i;return e=uu.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new Eu(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=or.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new ar);for(let r=0;r<i;r++){const o=s[r],c=_s.decode(o.charAt(0)).substr(0,g.segmentType),d=nr.ID_TO_KEY[D.decode(c,g.segmentType).toString()];or.decode(o,t,d)}return t}}var Qe;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Qe||(Qe={}));var sn;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(sn||(sn={}));var rn;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(rn||(rn={}));var cr;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(cr||(cr={}));class on{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 an extends on{respond(){this.throwIfParamInvalid(),this.invokeCallback(new dr(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 hu{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 an(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class oe{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new hu;static cmpStatus=sn.LOADING;static disabled=!1;static displayStatus=rn.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=sn.LOADING,this.disabled=!1,this.displayStatus=rn.HIDDEN,this.eventQueue.clear()}}class lr{cmpId=oe.cmpId;cmpVersion=oe.cmpVersion;gdprApplies=oe.gdprApplies;tcfPolicyVersion=oe.tcfPolicyVersion}class dr extends lr{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=oe.eventStatus,this.cmpStatus=oe.cmpStatus,this.listenerId=t,oe.gdprApplies){const s=oe.tcModel;this.tcString=oe.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 _u extends dr{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(),c=o.purposeId.toString(),d=t[c].substr(0,i),S=t[c].substr(i+1);t[c]=d+a+S})}}return t}}class gu extends lr{cmpLoaded=!0;cmpStatus=oe.cmpStatus;displayStatus=oe.displayStatus;apiVersion=String(oe.apiVersion);gvlVersion;constructor(){super(),oe.tcModel&&oe.tcModel.vendorListVersion&&(this.gvlVersion=+oe.tcModel.vendorListVersion)}}class Tu extends on{respond(){this.invokeCallback(new gu)}}class Ou extends an{respond(){this.throwIfParamInvalid(),this.invokeCallback(new _u(this.param))}}class Nu extends on{respond(){const e=oe.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new A(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Iu extends an{respond(){this.listenerId=oe.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class Au extends on{respond(){this.invokeCallback(oe.eventQueue.remove(this.param))}}class gS{static[Qe.PING]=Tu;static[Qe.GET_TC_DATA]=an;static[Qe.GET_IN_APP_TC_DATA]=Ou;static[Qe.GET_VENDOR_LIST]=Nu;static[Qe.ADD_EVENT_LISTENER]=Iu;static[Qe.REMOVE_EVENT_LISTENER]=Au}const Cu=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(en);return t.split(".")[0]}return e??""};var fu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const mu=1,Er=[1,3,4,5,6],Pu=2,wu=({userConsentedVendorIds:n,disclosedVendorIds:e})=>{const t=r=>r.filter(ME).map(o=>je(o).id).sort((o,a)=>Number(o)-Number(a)).join("."),s=t(n),i=t(e.filter(r=>!n.includes(r)));return`${Pu}~${s}~dv.${i}`},Du=n=>fu(void 0,[n],function*({experience:e,tcStringPreferences:t}){var s,i,r,o;let a="";try{const c=new ar(new A(e.gvl));yield c.gvl.readyPromise,c.cmpId=ps,c.cmpVersion=mu,c.consentScreen=1,c.isServiceSpecific=!0,c.supportOOB=!1,e.tcf_publisher_country_code&&(c.publisherCountryCode=e.tcf_publisher_country_code);const d=e.minimal_tcf?LE(e):UE(e);if(c.gvl.narrowVendorsTo(d),t){t.vendorsConsent.forEach(E=>{var N,T,P;if(nn(E,e.gvl)){const{id:C}=je(E);if(c.vendorConsents.set(+C),!((N=e.tcf_publisher_restrictions)!=null&&N.length)){const f=(T=e.gvl)==null?void 0:T.vendors[C];f&&!((P=f?.purposes)!=null&&P.length)&&f.flexiblePurposes.forEach(m=>{const ne=new $e;ne.purposeId=m,ne.restrictionType=Re.REQUIRE_CONSENT,c.publisherRestrictions.add(+C,ne)})}}}),t.vendorsLegint.forEach(E=>{var N,T;if(e.minimal_tcf)(N=e.tcf_vendor_legitimate_interest_ids)==null||N.forEach(P=>{const{id:C}=je(P);c.vendorLegitimateInterests.set(+C)});else if(nn(E,e.gvl)){const P=(T=e.tcf_vendor_legitimate_interests)==null?void 0:T.filter(m=>m.id===E)[0],C=P?.purpose_legitimate_interests;let f=!1;if(C&&(C.map(m=>m.id).filter(m=>Er.includes(m)).length&&(f=!0),!f)){const{id:m}=je(E);c.vendorLegitimateInterests.set(+m)}}}),(s=e.gvl)!=null&&s.vendors&&((i=e.tcf_vendor_relationships)==null||i.forEach(E=>{var N,T;const{id:P}=je(E.id),C=(N=e.gvl)==null?void 0:N.vendors[P];C&&(T=C.specialPurposes)!=null&&T.length&&(!C.legIntPurposes||C.legIntPurposes.length===0)&&c.vendorLegitimateInterests.set(+P)})),t.purposesConsent.forEach(E=>{c.purposeConsents.set(+E)}),t.purposesLegint.forEach(E=>{const N=+E;Er.includes(N)||c.purposeLegitimateInterests.set(N)}),t.specialFeatures.forEach(E=>{c.specialFeatureOptins.set(+E)}),e.tcf_publisher_restrictions&&e.tcf_publisher_restrictions.length>0&&e.tcf_publisher_restrictions.forEach(E=>{E.vendors.forEach(N=>{const T=new $e;T.purposeId=E.purpose_id,T.restrictionType=E.restriction_type,c.publisherRestrictions.add(N,T)})}),a=pu.encode(c,{segments:[Q.CORE]});const S=e.minimal_tcf?e.tcf_vendor_consent_ids:(r=e.tcf_vendor_consents)==null?void 0:r.map(E=>E.id),h=wu({userConsentedVendorIds:(o=t?.vendorsConsent)!=null?o:[],disclosedVendorIds:S??[]});a=`${a}${en}${h}`}}catch(c){return console.error("Unable to instantiate GVL: ",c),Promise.resolve("")}return Promise.resolve(a)});var bu=Object.defineProperty,vu=Object.defineProperties,Vu=Object.getOwnPropertyDescriptors,ur=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,yu=Object.prototype.propertyIsEnumerable,Sr=(n,e,t)=>e in n?bu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mu=(n,e)=>{for(var t in e||(e={}))Ru.call(e,t)&&Sr(n,t,e[t]);if(ur)for(var t of ur(e))yu.call(e,t)&&Sr(n,t,e[t]);return n},Uu=(n,e)=>vu(n,Vu(e)),Lu=(n,e,t)=>new Promise((s,i)=>{var r=c=>{try{a(t.next(c))}catch(d){i(d)}},o=c=>{try{a(t.throw(c))}catch(d){i(d)}},a=c=>c.done?s(c.value):Promise.resolve(c.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=_t(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=_t(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],Gu=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(c=>c.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(c=>c.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},Fu=({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:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},$u=(n,e,t,s,i)=>Lu(void 0,null,function*(){var r;const o=yield Du({tcStringPreferences:t,experience:s}),a=Uu(Mu({},n),{fides_string:o,tcf_consent:vE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=xi(i)),a}),xu=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=_t(e.includes(t.id),t.consent_mechanism);return new wi(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",pr=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:I.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:I.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:I.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:s,cmpApiField:i})=>{const r=i===I.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},ju=n=>n?.toLowerCase().startsWith("us"),gs=({experienceRegion:n,usApproach:e})=>ju(n)&&e===De.NATIONAL?tt:n,hr=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE?[]:(t.add(c),s.forEach(d=>{var S;const{gpp_field_mapping:h}=d,E=(S=h?.find(N=>N.region===a))==null?void 0:S.notice;E&&E.forEach(N=>{n.setFieldValue(c.name,N,1)})}),pr({cmpApi:n,sectionName:c.name,gppSettings:r}),Array.from(t))},_r=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let c=gs({experienceRegion:r,usApproach:a}),d=Xe[c];if(!d&&a===De.ALL&&(c=tt,d=Xe[c]),!d||c===tt&&a===De.STATE)return[];s.add(d);const{consent:S}=e;return Object.keys(S).forEach(h=>{var E;const N=i?.find(P=>P.notice_key===h),T=S[h];if(N){const{gpp_field_mapping:P}=N,C=(E=P?.find(f=>f.region===c))==null?void 0:E.mechanism;C&&C.forEach(f=>{let m=f.not_available;T===!1?m=f.opt_out:T&&(m=f.not_opt_out);let ne=+m;m.length>1&&(ne=m.split("").map(ye=>+ye)),n.setFieldValue(d.name,f.field,ne)})}}),pr({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var Hu=Object.defineProperty,ku=Object.defineProperties,Bu=Object.getOwnPropertyDescriptors,gr=Object.getOwnPropertySymbols,Ku=Object.prototype.hasOwnProperty,Yu=Object.prototype.propertyIsEnumerable,Tr=(n,e,t)=>e in n?Hu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Or=(n,e)=>{for(var t in e||(e={}))Ku.call(e,t)&&Tr(n,t,e[t]);if(gr)for(var t of gr(e))Yu.call(e,t)&&Tr(n,t,e[t]);return n},Nr=(n,e)=>ku(n,Bu(e));const zu=[1,3,4,5,6],Wu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=gs({experienceRegion:i,usApproach:o}),c=Xe[a];return!c&&o===De.ALL&&(a=tt,c=Xe[a]),!c||a===tt&&o===De.STATE||s.forEach(d=>{var S;const{notice_key:h,gpp_field_mapping:E}=d,N=(S=E?.find(T=>T.region===a))==null?void 0:S.mechanism;if(N){const T=N.some(P=>{const C=n.getFieldValue(c.name,P.field),f=Array.isArray(C)?C.join(""):String(C);return f===P.opt_out?!0:(P.not_opt_out,!1)});T!==void 0&&(t[h]=!T)}}),t},Qu=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=gE,a=n.getSection(X.NAME);if(!a)return o;const c=a.PurposeConsents.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),d=a.PurposeLegitimateInterests.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),S=a.VendorConsents.map(E=>`gvl.${E}`),h=a.VendorLegitimateInterests.map(E=>`gvl.${E}`);return o.purposesConsent=c,o.purposesLegint=d.filter(E=>!zu.includes(parseInt(E,10))),o.vendorsConsent=S,o.vendorsLegint=h,o.specialFeatures=a.SpecialFeatureOptins.map((E,N)=>E?(N+1).toString():null).filter(E=>E!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(E=>E.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(E=>E.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(E=>E.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(E=>E.toString()))||[]),o.customPurposesConsent=[],o},Ju=({fidesString:n,cmpApi:e})=>{const{gpp:t}=GE(n);if(!n||!t||!e)return;const{options:s,cookie:i,geolocation:r,locale:o,config:a}=window.Fides,c=window.Fides.experience;if(!c||!c.experience_config||!c.privacy_notices)return;const d=c.experience_config.component===ht.TCF_OVERLAY,S=tE(r),h=c.experience_config.translations.find(C=>Hi(C.language,o));if(!h)return;e.setGppString(t),e.setSignalStatus(be.READY);const E=c.privacy_notices.map(C=>({notice:C,bestTranslation:C.translations.find(f=>Hi(f.language,o))||null}));let N,T,P;if(d){const C=Qu({cmpApi:e,experience:c});P=xu(E.map(({notice:f,bestTranslation:m})=>Nr(Or({},f),{bestTranslation:m})),C.customPurposesConsent),T=c.minimal_tcf?Fu({experience:c,enabledIds:C}):Gu({experience:c,enabledIds:C}),N=f=>$u(f,T,C,c)}else{const C=Wu({cmpApi:e,experience:c}),f=Object.entries(C).filter(([m,ne])=>ne).map(([m])=>m);P=iE(E,f),N=m=>Promise.resolve(Nr(Or({},m),{consent:C}))}cu({consentPreferencesToSave:P,privacyExperienceConfigHistoryId:h.privacy_experience_config_history_id,experience:c,consentMethod:lt.SCRIPT,options:s,userLocationString:S||void 0,cookie:i,propertyId:a?.propertyId,tcf:T,updateCookie:N})},Ir="__gppLocator",Ar=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>Ar(n),5)},qu=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},Xu=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,Zu=()=>{const n=[],e=[];let t;const s=(r,o,a,c)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:Ye.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let S=!1;for(let h=0;h<e.length;h++)if(e[h].id===a){e.splice(h,1),S=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:S,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,c]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!Xu(a))return null;if(a.__gppCall&&window.__gpp){const c=a.__gppCall;window.__gpp(c.command,(d,S)=>{const h={__gppReturn:{returnValue:d,success:S,callId:c.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(h):h,"*")},"parameter"in c?c.parameter:void 0,"version"in c?c.version:"1.1")}return null};qu(Ir)||(Ar(Ir),window.__gpp=s,window.addEventListener("message",i,!1))},Cr=(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,fr=(n,e)=>{if(!dt(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=Cu(n);return s?(e.setFieldValueBySectionId(X.ID,"CmpId",ps),e.setSectionStringById(X.ID,s),!0):!1},eS=()=>{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(`${X.ID}:${X.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${re.ID}:${re.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==re.ID&&n.push(`${t.id}:${t.name}`)}))}return n},tS=()=>{Zu();const n=new yd(ps,FE);n.setCmpStatus(it.LOADED),window.addEventListener("FidesInitialized",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=eS();if(n.setSupportedAPIs(o),!dt(s))return;const{fidesString:a}=r;if(a&&Ju({fidesString:a,cmpApi:n}),!a&&(!sE(s,e.detail,i,r)||!r.tcfEnabled&&Ri(s.privacy_notices)&&!Cr(i,e.detail.fides_string,s.privacy_notices))){const c=fr(e,n);c&&n.setApplicableSections([X.ID]);const d=hr({cmpApi:n,experience:s}),S=_r({cmpApi:n,cookie:e.detail,experience:s});S.length&&n.setApplicableSections(S.map(E=>E.id)),!c&&!d.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const h=ji(n);window.Fides.fides_string=h}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",c=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(dt(t)){!i.tcfEnabled&&Ri(t.privacy_notices)&&!Cr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(Ye.VISIBLE);const r=hr({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(Ye.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(Ye.HIDDEN),fr(e,n)&&(n.setApplicableSections([X.ID]),n.fireSectionChange("tcfeuv2")),dt(window.Fides.experience)){const t=_r({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=ji(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,$i(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&tS()});
|