window.__tcfapi = function (command, version, callback) { callback({ gdprApplies: false, tcString: "", eventStatus: "tcloaded", cmpId: 299, cmpVersion: 10, cmpStatus: 'disabled' }, true); }; window.dispatchEvent(new Event("tcfapiready"));(()=>{var Oo=Object.defineProperty;var go=(i,t,e)=>t in i?Oo(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var s=(i,t,e)=>go(i,typeof t!="symbol"?t+"":t,e);var Et=(i,t,e)=>new Promise((r,o)=>{var n=S=>{try{d(e.next(S))}catch(K){o(K)}},E=S=>{try{d(e.throw(S))}catch(K){o(K)}},d=S=>S.done?r(S.value):Promise.resolve(S.value).then(n,E);d((e=e.apply(i,t)).next())});var hr=299;var Pe=class{constructor(t,e,r,o){s(this,"eventName");s(this,"listenerId");s(this,"data");s(this,"pingData");this.eventName=t,this.listenerId=e,this.data=r,this.pingData=o}};var he=class{constructor(t){s(this,"gppVersion");s(this,"cmpStatus");s(this,"cmpDisplayStatus");s(this,"signalStatus");s(this,"supportedAPIs");s(this,"cmpId");s(this,"sectionList");s(this,"applicableSections");s(this,"gppString");s(this,"parsedSections");this.gppVersion=t.gppVersion,this.cmpStatus=t.cmpStatus,this.cmpDisplayStatus=t.cmpDisplayStatus,this.signalStatus=t.signalStatus,this.supportedAPIs=t.supportedAPIs,this.cmpId=t.cmpId,this.sectionList=t.gppModel.getSectionIds(),this.applicableSections=t.applicableSections,this.gppString=t.gppModel.encode(),this.parsedSections=t.gppModel.toObject()}};var ce=class{constructor(t,e,r){s(this,"callback");s(this,"parameter");s(this,"success",!0);s(this,"cmpApiContext");this.cmpApiContext=t,Object.assign(this,{callback:e,parameter:r})}execute(){try{return this.respond()}catch(t){return this.invokeCallback(null),null}}invokeCallback(t){let e=t!==null;this.callback&&this.callback(t,e)}};var ut=class extends ce{respond(){let t=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),e=new Pe("listenerRegistered",t,!0,new he(this.cmpApiContext));this.invokeCallback(e)}};var Ot=class extends ce{respond(){let t=new he(this.cmpApiContext);this.invokeCallback(t)}};var gt=class extends ce{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("
. parameter required");let t=this.parameter.split(".");if(t.length!=2)throw new Error("Field name must be in the format
.");let e=t[0],r=t[1],o=this.cmpApiContext.gppModel.getFieldValue(e,r);this.invokeCallback(o)}};var It=class extends ce{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("
parameter required");let t=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(t=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(t)}};var ht=class extends ce{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("
[.version] parameter required");let t=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(t)}};var Te;(function(i){i.ADD_EVENT_LISTENER="addEventListener",i.GET_FIELD="getField",i.GET_SECTION="getSection",i.HAS_SECTION="hasSection",i.PING="ping",i.REMOVE_EVENT_LISTENER="removeEventListener"})(Te||(Te={}));var ft=class extends ce{respond(){let t=this.parameter,e=this.cmpApiContext.eventQueue.remove(t),r=new Pe("listenerRemoved",t,e,new he(this.cmpApiContext));this.invokeCallback(r)}};var fr,Ar,Dr,Pr,Cr,wr;wr=Te.ADD_EVENT_LISTENER,Cr=Te.GET_FIELD,Pr=Te.GET_SECTION,Dr=Te.HAS_SECTION,Ar=Te.PING,fr=Te.REMOVE_EVENT_LISTENER;var Oe=class{};s(Oe,wr,ut),s(Oe,Cr,gt),s(Oe,Pr,It),s(Oe,Dr,ht),s(Oe,Ar,Ot),s(Oe,fr,ft);var lt;(function(i){i.STUB="stub",i.LOADING="loading",i.LOADED="loaded",i.ERROR="error"})(lt||(lt={}));var at;(function(i){i.VISIBLE="visible",i.HIDDEN="hidden",i.DISABLED="disabled"})(at||(at={}));var Vr;(function(i){i.GPP_LOADED="gpploaded",i.CMP_UI_SHOWN="cmpuishown",i.USER_ACTION_COMPLETE="useractioncomplete"})(Vr||(Vr={}));var St;(function(i){i.NOT_READY="not ready",i.READY="ready"})(St||(St={}));var At=class{constructor(t,e){s(this,"callQueue");s(this,"customCommands");s(this,"cmpApiContext");if(this.cmpApiContext=t,e){let r=Te.ADD_EVENT_LISTENER;if(e!=null&&e[r])throw new Error(`Built-In Custom Commmand for ${r} not allowed`);if(r=Te.REMOVE_EVENT_LISTENER,e!=null&&e[r])throw new Error(`Built-In Custom Commmand for ${r} not allowed`);this.customCommands=e}try{this.callQueue=window.__gpp()||[]}catch(r){this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(t,e,r,o){if(typeof t!="string")e(null,!1);else{if(e&&typeof e!="function")throw new Error("invalid callback function");this.isCustomCommand(t)?this.customCommands[t](e,r):this.isBuiltInCommand(t)?new Oe[t](this.cmpApiContext,e,r).execute():e&&e(null,!1)}}purgeQueuedCalls(){let t=this.callQueue;this.callQueue=[],t.forEach(e=>{window.__gpp(...e)})}isCustomCommand(t){return this.customCommands&&typeof this.customCommands[t]=="function"}isBuiltInCommand(t){return Oe[t]!==void 0}};var Dt=class{constructor(t){s(this,"eventQueue",new Map);s(this,"queueNumber",1e3);s(this,"cmpApiContext");this.cmpApiContext=t;try{let r=window.__gpp("events")||[];for(var e=0;e{let n=new Pe(t,o,e,new he(this.cmpApiContext));r.callback(n,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}};var fe=class extends Error{constructor(t){super(t),this.name="InvalidFieldError"}};var h=class{constructor(){s(this,"segments");s(this,"encodedString",null);s(this,"dirty",!1);s(this,"decoded",!0);this.segments=this.initializeSegments()}hasField(t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let e=0;e=1)for(r.push(1);t>=r[0]*2;)r.unshift(r[0]*2);let o="";for(let n=0;n=E?(o+="1",t-=E):o+="0"}if(o.length>e)throw new f("Numeric value '"+t+"' is too large for a bit string length of '"+e+"'");for(;o.length0;)t+="0";for(;t.length%6>0;)t+="0";return t}};s(Pt,"instance",new Pt);var m=Pt;var Ct=class Ct{constructor(){}static getInstance(){return this.instance}encode(t,e){let r="";for(let o=0;o=1&&(e.push(1),t>=2)){e.push(2);let o=2;for(;t>=e[o-1]+e[o-2];)e.push(e[o-1]+e[o-2]),o++}let r="1";for(let o=e.length-1;o>=0;o--){let n=e[o];t>=n?(r="1"+r,t-=n):r="0"+r}return r}static decode(t){if(!/^[0-1]*$/.test(t)||t.length<2||t.indexOf("11")!==t.length-2)throw new a("Undecodable FibonacciInteger '"+t+"'");let e=0,r=[];for(let o=0;oE-d);let e=[],r=0,o=0;for(;ot.length||e<0||e>r)throw new F("Invalid substring indexes "+e+":"+r+" for string of length "+t.length);return t.substring(e,r)}};var dt=class extends B{constructor(t,e=!0){super(e),this.setValue(t)}encode(){try{return Xe.encode(this.value)}catch(t){throw new f(t)}}decode(t){try{this.value=Xe.decode(t)}catch(e){throw new a(e)}}substring(t,e){try{let r=u.decode(U.substring(t,e,e+12)),o=e+12;for(let n=0;ne-r))}};var l=class extends B{constructor(e,r,o=!0){super(o);s(this,"bitStringLength");this.bitStringLength=e,this.setValue(r)}encode(){try{return u.encode(this.value,this.bitStringLength)}catch(e){throw new f(e)}}decode(e){try{this.value=u.decode(e)}catch(r){throw new a(r)}}substring(e,r){try{return U.substring(e,r,r+this.bitStringLength)}catch(o){throw new F(o)}}};var _=class{constructor(){s(this,"fields",new Map)}containsKey(t){return this.fields.has(t)}put(t,e){this.fields.set(t,e)}get(t){return this.fields.get(t)}getAll(){return new Map(this.fields)}reset(t){this.fields.clear(),t.getAll().forEach((e,r)=>{this.fields.set(r,e)})}};var ge;(function(i){i.ID="Id",i.VERSION="Version",i.SECTION_IDS="SectionIds"})(ge||(ge={}));var Rr=[ge.ID,ge.VERSION,ge.SECTION_IDS];var c=class{constructor(){s(this,"fields");s(this,"encodedString",null);s(this,"dirty",!1);s(this,"decoded",!0);this.fields=this.initializeFields()}validate(){}hasField(t){return this.fields.containsKey(t)}getFieldValue(t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(t))return this.fields.get(t).getValue();throw new fe("Invalid field: '"+t+"'")}setFieldValue(t,e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(t))this.fields.get(t).setValue(e),this.dirty=!0;else throw new fe(t+" not found")}toObj(){let t={},e=this.getFieldNames();for(let r=0;r0&&this.decode(t)}getId(){return Ce.ID}getName(){return Ce.NAME}getVersion(){return Ce.VERSION}initializeSegments(){let t=[];return t.push(new Vt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;oo&&e[o].decode(r[o])}return e}encodeSection(t){let e=[];for(let r=0;r0;)t+="0";return t}};s(Rt,"instance",new Rt);var Ne=Rt;var ue=class{static encode(t){t.sort((n,E)=>n-E);let e=[],r=0;for(;re-r))}};var Mt=class{constructor(t,e,r){s(this,"key");s(this,"type");s(this,"ids");this.key=t,this.type=e,this.ids=r}getKey(){return this.key}setKey(t){this.key=t}getType(){return this.type}setType(t){this.type=t}getIds(){return this.ids}setIds(t){this.ids=t}};var tt=class extends B{constructor(e,r,o,n=!0){super(n);s(this,"keyBitStringLength");s(this,"typeBitStringLength");this.keyBitStringLength=e,this.typeBitStringLength=r,this.setValue(o)}encode(){try{let e=this.value,r="";r+=u.encode(e.length,12);for(let o=0;oe)throw new f("Too many values '"+t.length+"'");let r="";for(let o=0;othis.numElements&&(r=r.slice(0,this.numElements)),super.setValue(r)}};var pt=class{static encode(t,e){for(;t.length=65)r+=u.encode(t.charCodeAt(o)-65,6);else throw new f("Unencodable FixedString '"+t+"'")}return r}static decode(t){if(!/^[0-1]*$/.test(t)||t.length%6!==0)throw new a("Undecodable FixedString '"+t+"'");let e="";for(let r=0;r0?this.value[this.value.length-1]:0,e=ue.encode(this.value),r=e.length,o=t;if(r<=o)return u.encode(t,16)+"1"+e;{let n=[],E=0;for(let d=0;de-r))}};var Gt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",Ne.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Mr}initializeFields(){let e=new Date,r=new _;return r.put(T.VERSION.toString(),new l(6,W.VERSION)),r.put(T.CREATED.toString(),new we(e)),r.put(T.LAST_UPDATED.toString(),new we(e)),r.put(T.CMP_ID.toString(),new l(12,0)),r.put(T.CMP_VERSION.toString(),new l(12,0)),r.put(T.CONSENT_SCREEN.toString(),new l(6,0)),r.put(T.CONSENT_LANGUAGE.toString(),new qe(2,"EN")),r.put(T.VENDOR_LIST_VERSION.toString(),new l(12,0)),r.put(T.POLICY_VERSION.toString(),new l(6,2)),r.put(T.IS_SERVICE_SPECIFIC.toString(),new O(!1)),r.put(T.USE_NON_STANDARD_STACKS.toString(),new O(!1)),r.put(T.SPECIAL_FEATURE_OPTINS.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(T.PURPOSE_CONSENTS.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(T.PURPOSE_LEGITIMATE_INTERESTS.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(T.PURPOSE_ONE_TREATMENT.toString(),new O(!1)),r.put(T.PUBLISHER_COUNTRY_CODE.toString(),new qe(2,"AA")),r.put(T.VENDOR_CONSENTS.toString(),new _e([])),r.put(T.VENDOR_LEGITIMATE_INTERESTS.toString(),new _e([])),r.put(T.PUBLISHER_RESTRICTIONS.toString(),new tt(6,2,[],!1)),r}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}};var Ve=class extends B{constructor(e,r,o=!0){super(o);s(this,"getLength");this.getLength=e,this.setValue(r)}encode(){try{return pe.encode(this.value,this.getLength())}catch(e){throw new f(e)}}decode(e){try{this.value=pe.decode(e)}catch(r){throw new a(r)}}substring(e,r){try{return U.substring(e,r,r+this.getLength())}catch(o){throw new F(o)}}getValue(){return[...super.getValue()]}setValue(e){let r=this.getLength(),o=[...e];for(let n=o.length;nr&&(o=o.slice(0,r)),super.setValue([...o])}};var bt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",Ne.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Gr}initializeFields(){let e=new _;e.put(T.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(T.PUBLISHER_CONSENTS.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(T.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new de([!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 r=new l(6,0);return e.put(T.NUM_CUSTOM_PURPOSES.toString(),r),e.put(T.PUBLISHER_CUSTOM_CONSENTS.toString(),new Ve(()=>r.getValue(),[])),e.put(T.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new Ve(()=>r.getValue(),[])),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}};var Ut=class extends c{constructor(e){super();s(this,"base64UrlEncoder",Ne.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return br}initializeFields(){let e=new _;return e.put(T.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new l(3,2)),e.put(T.VENDORS_ALLOWED.toString(),new _e([])),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}};var Lt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",Ne.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Ur}initializeFields(){let e=new _;return e.put(T.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new l(3,1)),e.put(T.VENDORS_DISCLOSED.toString(),new _e([])),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}};var Re=class Re extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Re.ID}getName(){return Re.NAME}getVersion(){return Re.VERSION}initializeSegments(){let t=[];return t.push(new Gt),t.push(new bt),t.push(new Ut),t.push(new Lt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;o="A"&&E<="H")e[0].decode(r[o]);else if(E>="I"&&E<="P")e[3].decode(r[o]);else if(E>="Q"&&E<="X")e[2].decode(r[o]);else if(E>="Y"&&E<="Z"||E>="a"&&E<="f")e[1].decode(r[o]);else throw new a("Unable to decode TcfEuV2 segment '"+n+"'")}}}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),this.getFieldValue(T.IS_SERVICE_SPECIFIC)?t.length>=2&&e.push(t[1].encode()):t.length>=2&&(e.push(t[2].encode()),t.length>=3&&e.push(t[3].encode()))),e.join(".")}setFieldValue(t,e){if(super.setFieldValue(t,e),t!==T.CREATED&&t!==T.LAST_UPDATED){let r=new Date;super.setFieldValue(T.CREATED,r),super.setFieldValue(T.LAST_UPDATED,r)}}};s(Re,"ID",2),s(Re,"VERSION",2),s(Re,"NAME","tcfeuv2");var W=Re;var N;(function(i){i.VERSION="Version",i.CREATED="Created",i.LAST_UPDATED="LastUpdated",i.CMP_ID="CmpId",i.CMP_VERSION="CmpVersion",i.CONSENT_SCREEN="ConsentScreen",i.CONSENT_LANGUAGE="ConsentLanguage",i.VENDOR_LIST_VERSION="VendorListVersion",i.TCF_POLICY_VERSION="TcfPolicyVersion",i.USE_NON_STANDARD_STACKS="UseNonStandardStacks",i.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",i.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",i.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",i.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",i.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",i.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",i.PUB_RESTRICTIONS="PubRestrictions",i.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",i.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",i.NUM_CUSTOM_PURPOSES="NumCustomPurposes",i.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",i.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",i.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",i.DISCLOSED_VENDORS="DisclosedVendors"})(N||(N={}));var Lr=[N.VERSION,N.CREATED,N.LAST_UPDATED,N.CMP_ID,N.CMP_VERSION,N.CONSENT_SCREEN,N.CONSENT_LANGUAGE,N.VENDOR_LIST_VERSION,N.TCF_POLICY_VERSION,N.USE_NON_STANDARD_STACKS,N.SPECIAL_FEATURE_EXPRESS_CONSENT,N.PURPOSES_EXPRESS_CONSENT,N.PURPOSES_IMPLIED_CONSENT,N.VENDOR_EXPRESS_CONSENT,N.VENDOR_IMPLIED_CONSENT,N.PUB_RESTRICTIONS],xr=[N.PUB_PURPOSES_SEGMENT_TYPE,N.PUB_PURPOSES_EXPRESS_CONSENT,N.PUB_PURPOSES_IMPLIED_CONSENT,N.NUM_CUSTOM_PURPOSES,N.CUSTOM_PURPOSES_EXPRESS_CONSENT,N.CUSTOM_PURPOSES_IMPLIED_CONSENT],Fr=[N.DISCLOSED_VENDORS_SEGMENT_TYPE,N.DISCLOSED_VENDORS];var xt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Lr}initializeFields(){let e=new Date,r=new _;return r.put(N.VERSION.toString(),new l(6,j.VERSION)),r.put(N.CREATED.toString(),new we(e)),r.put(N.LAST_UPDATED.toString(),new we(e)),r.put(N.CMP_ID.toString(),new l(12,0)),r.put(N.CMP_VERSION.toString(),new l(12,0)),r.put(N.CONSENT_SCREEN.toString(),new l(6,0)),r.put(N.CONSENT_LANGUAGE.toString(),new qe(2,"EN")),r.put(N.VENDOR_LIST_VERSION.toString(),new l(12,0)),r.put(N.TCF_POLICY_VERSION.toString(),new l(6,2)),r.put(N.USE_NON_STANDARD_STACKS.toString(),new O(!1)),r.put(N.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(N.PURPOSES_EXPRESS_CONSENT.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(N.PURPOSES_IMPLIED_CONSENT.toString(),new de([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),r.put(N.VENDOR_EXPRESS_CONSENT.toString(),new _e([])),r.put(N.VENDOR_IMPLIED_CONSENT.toString(),new _e([])),r.put(N.PUB_RESTRICTIONS.toString(),new tt(6,2,[],!1)),r}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}};var Ft=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return xr}initializeFields(){let e=new _;e.put(N.PUB_PURPOSES_SEGMENT_TYPE.toString(),new l(3,3)),e.put(N.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new de([!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(N.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new de([!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 r=new l(6,0);return e.put(N.NUM_CUSTOM_PURPOSES.toString(),r),e.put(N.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new Ve(()=>r.getValue(),[])),e.put(N.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new Ve(()=>r.getValue(),[])),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}};var yt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",Ne.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Fr}initializeFields(){let e=new _;return e.put(N.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new l(3,1)),e.put(N.DISCLOSED_VENDORS.toString(),new _e([])),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode HeaderV1CoreSegment '"+e+"'")}}};var Me=class Me extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Me.ID}getName(){return Me.NAME}getVersion(){return Me.VERSION}initializeSegments(){let t=[];return t.push(new xt),t.push(new Ft),t.push(new yt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;o="A"&&E<="H")e[0].decode(r[o]);else if(E>="I"&&E<="P")e[2].decode(r[o]);else if(E>="Y"&&E<="Z"||E>="a"&&E<="f")e[1].decode(r[o]);else throw new a("Unable to decode TcfCaV1 segment '"+n+"'")}}}return e}encodeSection(t){let e=[];return e.push(t[0].encode()),e.push(t[1].encode()),this.getFieldValue(N.DISCLOSED_VENDORS).length>0&&e.push(t[2].encode()),e.join(".")}setFieldValue(t,e){if(super.setFieldValue(t,e),t!==N.CREATED&&t!==N.LAST_UPDATED){let r=new Date;super.setFieldValue(N.CREATED,r),super.setFieldValue(N.LAST_UPDATED,r)}}};s(Me,"ID",5),s(Me,"VERSION",1),s(Me,"NAME","tcfcav1");var j=Me;var rt=class{constructor(t,e){s(this,"validator");s(this,"value",null);e?this.validator=e:this.validator=new class{test(r){return!0}},this.setValue(t)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(t){t?this.value=t.charAt(0):t=null}};var vt=class{constructor(t,e){s(this,"validator");s(this,"value",null);e?this.validator=e:this.validator=new class{test(r){return!0}},this.setValue(t)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(t){this.value=t}};var Bt=class{constructor(){s(this,"fields",new Map)}containsKey(t){return this.fields.has(t)}put(t,e){this.fields.set(t,e)}get(t){return this.fields.get(t)}getAll(){return new Map(this.fields)}reset(t){this.fields.clear(),t.getAll().forEach((e,r)=>{this.fields.set(r,e)})}};var k;(function(i){i.VERSION="Version",i.NOTICE="Notice",i.OPT_OUT_SALE="OptOutSale",i.LSPA_COVERED="LspaCovered"})(k||(k={}));var yr=[k.VERSION,k.NOTICE,k.OPT_OUT_SALE,k.LSPA_COVERED];var zt=class extends c{constructor(t){super(),t&&this.decode(t)}getFieldNames(){return yr}initializeFields(){let t=new class{test(r){return r==="-"||r==="Y"||r==="N"}},e=new Bt;return e.put(k.VERSION,new vt(Q.VERSION)),e.put(k.NOTICE,new rt("-",t)),e.put(k.OPT_OUT_SALE,new rt("-",t)),e.put(k.LSPA_COVERED,new rt("-",t)),e}encodeSegment(t){let e="";return e+=t.get(k.VERSION).getValue(),e+=t.get(k.NOTICE).getValue(),e+=t.get(k.OPT_OUT_SALE).getValue(),e+=t.get(k.LSPA_COVERED).getValue(),e}decodeSegment(t,e){if(t==null||t.length!=4)throw new a("Unable to decode UspV1CoreSegment '"+t+"'");try{e.get(k.VERSION).setValue(parseInt(t.substring(0,1))),e.get(k.NOTICE).setValue(t.charAt(1)),e.get(k.OPT_OUT_SALE).setValue(t.charAt(2)),e.get(k.LSPA_COVERED).setValue(t.charAt(3))}catch(r){throw new a("Unable to decode UspV1CoreSegment '"+t+"'")}}};var Ge=class Ge extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Ge.ID}getName(){return Ge.NAME}getVersion(){return Ge.VERSION}initializeSegments(){let t=[];return t.push(new zt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;oo&&e[o].decode(r[o])}return e}encodeSection(t){let e=[];for(let r=0;rr)throw new f("Too many values '"+t.length+"'");let o="";for(let n=0;ne*r)throw new a("Undecodable FixedIntegerList '"+t+"'");if(t.length%e!=0)throw new a("Undecodable FixedIntegerList '"+t+"'");for(;t.lengthe*r&&(t=t.substring(0,e*r));let o=[];for(let n=0;nthis.numElements&&(r=r.slice(0,this.numElements)),super.setValue(r)}};var Ht=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return vr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(g.VERSION.toString(),new l(6,X.VERSION)),n.put(g.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(g.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(g.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(g.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(g.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(o)),n.put(g.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(g.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(g.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(g.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(g.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNatCoreSegment '"+e+"'")}}};var Kt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Br}initializeFields(){let e=new _;return e.put(g.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(g.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(g.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNatGpcSegment '"+e+"'")}}};var be=class be extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return be.ID}getName(){return be.NAME}getVersion(){return be.VERSION}initializeSegments(){let t=[];return t.push(new Ht),t.push(new Kt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(g.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(g.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(g.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(be,"ID",7),s(be,"VERSION",1),s(be,"NAME","usnat");var X=be;var A;(function(i){i.VERSION="Version",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",i.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",i.SALE_OPT_OUT="SaleOptOut",i.SHARING_OPT_OUT="SharingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.PERSONAL_DATA_CONSENTS="PersonalDataConsents",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(A||(A={}));var zr=[A.VERSION,A.SALE_OPT_OUT_NOTICE,A.SHARING_OPT_OUT_NOTICE,A.SENSITIVE_DATA_LIMIT_USE_NOTICE,A.SALE_OPT_OUT,A.SHARING_OPT_OUT,A.SENSITIVE_DATA_PROCESSING,A.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,A.PERSONAL_DATA_CONSENTS,A.MSPA_COVERED_TRANSACTION,A.MSPA_OPT_OUT_OPTION_MODE,A.MSPA_SERVICE_PROVIDER_MODE],Hr=[A.GPC_SEGMENT_TYPE,A.GPC];var Yt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return zr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(A.VERSION.toString(),new l(6,$.VERSION)),n.put(A.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(A.SHARING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(A.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(A.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(A.SHARING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(A.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0,0]).withValidator(o)),n.put(A.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0]).withValidator(o)),n.put(A.PERSONAL_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(A.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(A.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(A.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCaCoreSegment '"+e+"'")}}};var Wt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Hr}initializeFields(){let e=new _;return e.put(A.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(A.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(A.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCaGpcSegment '"+e+"'")}}};var Ue=class Ue extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Ue.ID}getName(){return Ue.NAME}getVersion(){return Ue.VERSION}initializeSegments(){let t=[];return t.push(new Yt),t.push(new Wt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(A.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(A.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(A.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(Ue,"ID",8),s(Ue,"VERSION",1),s(Ue,"NAME","usca");var $=Ue;var H;(function(i){i.VERSION="Version",i.SHARING_NOTICE="SharingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(H||(H={}));var Kr=[H.VERSION,H.SHARING_NOTICE,H.SALE_OPT_OUT_NOTICE,H.TARGETED_ADVERTISING_OPT_OUT_NOTICE,H.SALE_OPT_OUT,H.TARGETED_ADVERTISING_OPT_OUT,H.SENSITIVE_DATA_PROCESSING,H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,H.MSPA_COVERED_TRANSACTION,H.MSPA_OPT_OUT_OPTION_MODE,H.MSPA_SERVICE_PROVIDER_MODE];var kt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Kr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(H.VERSION.toString(),new l(6,q.VERSION)),n.put(H.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(H.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(H.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(H.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(H.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(H.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(H.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(H.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(H.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsVaCoreSegment '"+e+"'")}}};var Le=class Le extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let t=[];return t.push(new kt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;oo&&e[o].decode(r[o])}return e}encodeSection(t){let e=[];for(let r=0;r=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(L.VERSION.toString(),new l(6,J.VERSION)),n.put(L.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(L.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(L.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(L.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0]).withValidator(o)),n.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(L.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCoCoreSegment '"+e+"'")}}};var Qt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Wr}initializeFields(){let e=new _;return e.put(L.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(L.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCoGpcSegment '"+e+"'")}}};var xe=class xe extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return xe.ID}getName(){return xe.NAME}getVersion(){return xe.VERSION}initializeSegments(){let t=[];return t.push(new jt),t.push(new Qt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(xe,"ID",10),s(xe,"VERSION",1),s(xe,"NAME","usco");var J=xe;var y;(function(i){i.VERSION="Version",i.SHARING_NOTICE="SharingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(y||(y={}));var kr=[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 Xt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return kr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(y.VERSION.toString(),new l(6,Z.VERSION)),n.put(y.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(y.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(y.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(y.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(y.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(y.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsUtCoreSegment '"+e+"'")}}};var Fe=class Fe extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Fe.ID}getName(){return Fe.NAME}getVersion(){return Fe.VERSION}initializeSegments(){let t=[];return t.push(new Xt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;oo&&e[o].decode(r[o])}return e}encodeSection(t){let e=[];for(let r=0;r=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(x.VERSION.toString(),new l(6,ee.VERSION)),n.put(x.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(x.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(x.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(x.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(x.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCtCoreSegment '"+e+"'")}}};var qt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Qr}initializeFields(){let e=new _;return e.put(x.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(x.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsCtGpcSegment '"+e+"'")}}};var ye=class ye extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return ye.ID}getName(){return ye.NAME}getVersion(){return ye.VERSION}initializeSegments(){let t=[];return t.push(new $t),t.push(new qt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(ye,"ID",12),s(ye,"VERSION",1),s(ye,"NAME","usct");var ee=ye;var v;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(v||(v={}));var Xr=[v.VERSION,v.PROCESSING_NOTICE,v.SALE_OPT_OUT_NOTICE,v.TARGETED_ADVERTISING_OPT_OUT_NOTICE,v.SALE_OPT_OUT,v.TARGETED_ADVERTISING_OPT_OUT,v.SENSITIVE_DATA_PROCESSING,v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,v.ADDITIONAL_DATA_PROCESSING_CONSENT,v.MSPA_COVERED_TRANSACTION,v.MSPA_OPT_OUT_OPTION_MODE,v.MSPA_SERVICE_PROVIDER_MODE];var Jt=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Xr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(v.VERSION.toString(),new l(6,te.VERSION)),n.put(v.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(v.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(v.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(v.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(v.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsFlCoreSegment '"+e+"'")}}};var ve=class ve extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return ve.ID}getName(){return ve.NAME}getVersion(){return ve.VERSION}initializeSegments(){let t=[];return t.push(new Jt),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");for(let o=0;oo&&e[o].decode(r[o])}return e}encodeSection(t){let e=[];for(let r=0;r=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(D.VERSION.toString(),new l(6,re.VERSION)),n.put(D.SHARING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(D.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(D.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(D.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(D.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(D.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(D.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(D.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(D.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(D.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsMtCoreSegment '"+e+"'")}}};var er=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return qr}initializeFields(){let e=new _;return e.put(D.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(D.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(D.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsMtGpcSegment '"+e+"'")}}};var Be=class Be extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Be.ID}getName(){return Be.NAME}getVersion(){return Be.VERSION}initializeSegments(){let t=[];return t.push(new Zt),t.push(new er),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(D.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(Be,"ID",14),s(Be,"VERSION",1),s(Be,"NAME","usmt");var re=Be;var P;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(P||(P={}));var Jr=[P.VERSION,P.PROCESSING_NOTICE,P.SALE_OPT_OUT_NOTICE,P.TARGETED_ADVERTISING_OPT_OUT_NOTICE,P.SALE_OPT_OUT,P.TARGETED_ADVERTISING_OPT_OUT,P.SENSITIVE_DATA_PROCESSING,P.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,P.ADDITIONAL_DATA_PROCESSING_CONSENT,P.MSPA_COVERED_TRANSACTION,P.MSPA_OPT_OUT_OPTION_MODE,P.MSPA_SERVICE_PROVIDER_MODE],Zr=[P.GPC_SEGMENT_TYPE,P.GPC];var tr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Jr}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(P.VERSION.toString(),new l(6,oe.VERSION)),n.put(P.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(P.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(P.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(P.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(P.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(P.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(o)),n.put(P.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(P.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(P.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(P.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(P.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsOrCoreSegment '"+e+"'")}}};var rr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Zr}initializeFields(){let e=new _;return e.put(P.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(P.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(P.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsOrGpcSegment '"+e+"'")}}};var ze=class ze extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return ze.ID}getName(){return ze.NAME}getVersion(){return ze.VERSION}initializeSegments(){let t=[];return t.push(new tr),t.push(new rr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(P.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(P.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(P.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(ze,"ID",15),s(ze,"VERSION",1),s(ze,"NAME","usor");var oe=ze;var C;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(C||(C={}));var eo=[C.VERSION,C.PROCESSING_NOTICE,C.SALE_OPT_OUT_NOTICE,C.TARGETED_ADVERTISING_OPT_OUT_NOTICE,C.SALE_OPT_OUT,C.TARGETED_ADVERTISING_OPT_OUT,C.SENSITIVE_DATA_PROCESSING,C.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,C.ADDITIONAL_DATA_PROCESSING_CONSENT,C.MSPA_COVERED_TRANSACTION,C.MSPA_OPT_OUT_OPTION_MODE,C.MSPA_SERVICE_PROVIDER_MODE],to=[C.GPC_SEGMENT_TYPE,C.GPC];var or=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return eo}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(C.VERSION.toString(),new l(6,ie.VERSION)),n.put(C.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(C.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(C.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(C.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(C.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(C.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(C.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(C.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(C.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(C.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(C.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsTxCoreSegment '"+e+"'")}}};var ir=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return to}initializeFields(){let e=new _;return e.put(C.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(C.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(C.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsTxGpcSegment '"+e+"'")}}};var He=class He extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return He.ID}getName(){return He.NAME}getVersion(){return He.VERSION}initializeSegments(){let t=[];return t.push(new or),t.push(new ir),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(C.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(C.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(C.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(He,"ID",16),s(He,"VERSION",1),s(He,"NAME","ustx");var ie=He;var w;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(w||(w={}));var ro=[w.VERSION,w.PROCESSING_NOTICE,w.SALE_OPT_OUT_NOTICE,w.TARGETED_ADVERTISING_OPT_OUT_NOTICE,w.SALE_OPT_OUT,w.TARGETED_ADVERTISING_OPT_OUT,w.SENSITIVE_DATA_PROCESSING,w.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,w.ADDITIONAL_DATA_PROCESSING_CONSENT,w.MSPA_COVERED_TRANSACTION,w.MSPA_OPT_OUT_OPTION_MODE,w.MSPA_SERVICE_PROVIDER_MODE],oo=[w.GPC_SEGMENT_TYPE,w.GPC];var nr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return ro}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(w.VERSION.toString(),new l(6,ne.VERSION)),n.put(w.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(w.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(w.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(w.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(w.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(w.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0,0]).withValidator(o)),n.put(w.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0,0,0]).withValidator(o)),n.put(w.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(w.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(w.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(w.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsDeCoreSegment '"+e+"'")}}};var sr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return oo}initializeFields(){let e=new _;return e.put(w.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(w.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(w.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsDeGpcSegment '"+e+"'")}}};var Ke=class Ke extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Ke.ID}getName(){return Ke.NAME}getVersion(){return Ke.VERSION}initializeSegments(){let t=[];return t.push(new nr),t.push(new sr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(w.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(w.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(w.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(Ke,"ID",17),s(Ke,"VERSION",1),s(Ke,"NAME","usde");var ne=Ke;var V;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(V||(V={}));var io=[V.VERSION,V.PROCESSING_NOTICE,V.SALE_OPT_OUT_NOTICE,V.TARGETED_ADVERTISING_OPT_OUT_NOTICE,V.SENSITIVE_DATA_OPT_OUT_NOTICE,V.SALE_OPT_OUT,V.TARGETED_ADVERTISING_OPT_OUT,V.SENSITIVE_DATA_PROCESSING,V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,V.MSPA_COVERED_TRANSACTION,V.MSPA_OPT_OUT_OPTION_MODE,V.MSPA_SERVICE_PROVIDER_MODE],no=[V.GPC_SEGMENT_TYPE,V.GPC];var Er=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return io}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(V.VERSION.toString(),new l(6,se.VERSION)),n.put(V.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(V.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(V.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(V.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(V.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(V.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsIaCoreSegment '"+e+"'")}}};var lr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return no}initializeFields(){let e=new _;return e.put(V.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(V.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsIaGpcSegment '"+e+"'")}}};var Ye=class Ye extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Ye.ID}getName(){return Ye.NAME}getVersion(){return Ye.VERSION}initializeSegments(){let t=[];return t.push(new Er),t.push(new lr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(Ye,"ID",18),s(Ye,"VERSION",1),s(Ye,"NAME","usia");var se=Ye;var R;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(R||(R={}));var so=[R.VERSION,R.PROCESSING_NOTICE,R.SALE_OPT_OUT_NOTICE,R.TARGETED_ADVERTISING_OPT_OUT_NOTICE,R.SALE_OPT_OUT,R.TARGETED_ADVERTISING_OPT_OUT,R.SENSITIVE_DATA_PROCESSING,R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,R.ADDITIONAL_DATA_PROCESSING_CONSENT,R.MSPA_COVERED_TRANSACTION,R.MSPA_OPT_OUT_OPTION_MODE,R.MSPA_SERVICE_PROVIDER_MODE],Eo=[R.GPC_SEGMENT_TYPE,R.GPC];var ar=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return so}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(R.VERSION.toString(),new l(6,Ee.VERSION)),n.put(R.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(R.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(R.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(R.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(R.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNeCoreSegment '"+e+"'")}}};var Sr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return Eo}initializeFields(){let e=new _;return e.put(R.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(R.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNeGpcSegment '"+e+"'")}}};var We=class We extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return We.ID}getName(){return We.NAME}getVersion(){return We.VERSION}initializeSegments(){let t=[];return t.push(new ar),t.push(new Sr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(We,"ID",19),s(We,"VERSION",1),s(We,"NAME","usne");var Ee=We;var M;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(M||(M={}));var lo=[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],ao=[M.GPC_SEGMENT_TYPE,M.GPC];var dr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return lo}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(M.VERSION.toString(),new l(6,le.VERSION)),n.put(M.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(M.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(M.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(M.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0]).withValidator(o)),n.put(M.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(M.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNhCoreSegment '"+e+"'")}}};var cr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return ao}initializeFields(){let e=new _;return e.put(M.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(M.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNhGpcSegment '"+e+"'")}}};var ke=class ke extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return ke.ID}getName(){return ke.NAME}getVersion(){return ke.VERSION}initializeSegments(){let t=[];return t.push(new dr),t.push(new cr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(ke,"ID",20),s(ke,"VERSION",1),s(ke,"NAME","usnh");var le=ke;var G;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(G||(G={}));var So=[G.VERSION,G.PROCESSING_NOTICE,G.SALE_OPT_OUT_NOTICE,G.TARGETED_ADVERTISING_OPT_OUT_NOTICE,G.SALE_OPT_OUT,G.TARGETED_ADVERTISING_OPT_OUT,G.SENSITIVE_DATA_PROCESSING,G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,G.ADDITIONAL_DATA_PROCESSING_CONSENT,G.MSPA_COVERED_TRANSACTION,G.MSPA_OPT_OUT_OPTION_MODE,G.MSPA_SERVICE_PROVIDER_MODE],co=[G.GPC_SEGMENT_TYPE,G.GPC];var pr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return So}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(G.VERSION.toString(),new l(6,ae.VERSION)),n.put(G.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(G.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(G.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(G.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(o)),n.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new I(2,[0,0,0,0,0]).withValidator(o)),n.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(G.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNjCoreSegment '"+e+"'")}}};var _r=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return co}initializeFields(){let e=new _;return e.put(G.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(G.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsNjGpcSegment '"+e+"'")}}};var je=class je extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return je.ID}getName(){return je.NAME}getVersion(){return je.VERSION}initializeSegments(){let t=[];return t.push(new pr),t.push(new _r),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(je,"ID",21),s(je,"VERSION",1),s(je,"NAME","usnj");var ae=je;var b;(function(i){i.VERSION="Version",i.PROCESSING_NOTICE="ProcessingNotice",i.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",i.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",i.SALE_OPT_OUT="SaleOptOut",i.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",i.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",i.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",i.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",i.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",i.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",i.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",i.GPC_SEGMENT_TYPE="GpcSegmentType",i.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",i.GPC="Gpc"})(b||(b={}));var po=[b.VERSION,b.PROCESSING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.ADDITIONAL_DATA_PROCESSING_CONSENT,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],_o=[b.GPC_SEGMENT_TYPE,b.GPC];var Tr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return po}initializeFields(){let e=new class{test(E){return E>=0&&E<=2}},r=new class{test(E){return E>=1&&E<=2}},o=new class{test(E){for(let d=0;d2)return!1}return!0}},n=new _;return n.put(b.VERSION.toString(),new l(6,Se.VERSION)),n.put(b.PROCESSING_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(b.SALE_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new l(2,0).withValidator(e)),n.put(b.SALE_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new l(2,0).withValidator(e)),n.put(b.SENSITIVE_DATA_PROCESSING.toString(),new I(2,[0,0,0,0,0,0,0,0]).withValidator(o)),n.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new l(2,0).withValidator(e)),n.put(b.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new l(2,0).withValidator(e)),n.put(b.MSPA_COVERED_TRANSACTION.toString(),new l(2,1).withValidator(r)),n.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new l(2,0).withValidator(e)),n.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new l(2,0).withValidator(e)),n}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsTnCoreSegment '"+e+"'")}}};var mr=class extends c{constructor(e){super();s(this,"base64UrlEncoder",m.getInstance());s(this,"bitStringEncoder",p.getInstance());e&&this.decode(e)}getFieldNames(){return _o}initializeFields(){let e=new _;return e.put(b.GPC_SEGMENT_TYPE.toString(),new l(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new O(!0)),e.put(b.GPC.toString(),new O(!1)),e}encodeSegment(e){let r=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(r)}decodeSegment(e,r){(e==null||e.length===0)&&this.fields.reset(r);try{let o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),r)}catch(o){throw new a("Unable to decode UsTnGpcSegment '"+e+"'")}}};var Qe=class Qe extends h{constructor(t){super(),t&&t.length>0&&this.decode(t)}getId(){return Qe.ID}getName(){return Qe.NAME}getVersion(){return Qe.VERSION}initializeSegments(){let t=[];return t.push(new Tr),t.push(new mr),t}decodeSection(t){let e=this.initializeSegments();if(t!=null&&t.length!==0){let r=t.split(".");r.length>0&&e[0].decode(r[0]),r.length>1?(e[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),e[1].decode(r[1])):e[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return e}encodeSection(t){let e=[];return t.length>=1&&(e.push(t[0].encode()),t.length>=2&&t[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&e.push(t[1].encode())),e.join(".")}};s(Qe,"ID",22),s(Qe,"VERSION",1),s(Qe,"NAME","ustn");var Se=Qe;var z=class{};s(z,"SECTION_ID_NAME_MAP",new Map([[W.ID,W.NAME],[j.ID,j.NAME],[Q.ID,Q.NAME],[X.ID,X.NAME],[$.ID,$.NAME],[q.ID,q.NAME],[J.ID,J.NAME],[Z.ID,Z.NAME],[ee.ID,ee.NAME],[te.ID,te.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME],[ie.ID,ie.NAME],[ne.ID,ne.NAME],[se.ID,se.NAME],[Ee.ID,Ee.NAME],[le.ID,le.NAME],[ae.ID,ae.NAME],[Se.ID,Se.NAME]])),s(z,"SECTION_ORDER",[W.NAME,j.NAME,Q.NAME,X.NAME,$.NAME,q.NAME,J.NAME,Z.NAME,ee.NAME,te.NAME,re.NAME,oe.NAME,ie.NAME,ne.NAME,se.NAME,Ee.NAME,le.NAME,ae.NAME,Se.NAME]);var Tt=class{constructor(t){s(this,"sections",new Map);s(this,"encodedString",null);s(this,"decoded",!0);s(this,"dirty",!1);t&&this.decode(t)}setFieldValue(t,e,r){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let o=null;if(this.sections.has(t)?o=this.sections.get(t):t===j.NAME?(o=new j,this.sections.set(j.NAME,o)):t===W.NAME?(o=new W,this.sections.set(W.NAME,o)):t===Q.NAME?(o=new Q,this.sections.set(Q.NAME,o)):t===X.NAME?(o=new X,this.sections.set(X.NAME,o)):t===$.NAME?(o=new $,this.sections.set($.NAME,o)):t===q.NAME?(o=new q,this.sections.set(q.NAME,o)):t===J.NAME?(o=new J,this.sections.set(J.NAME,o)):t===Z.NAME?(o=new Z,this.sections.set(Z.NAME,o)):t===ee.NAME?(o=new ee,this.sections.set(ee.NAME,o)):t===te.NAME?(o=new te,this.sections.set(te.NAME,o)):t===re.NAME?(o=new re,this.sections.set(re.NAME,o)):t===oe.NAME?(o=new oe,this.sections.set(oe.NAME,o)):t===ie.NAME?(o=new ie,this.sections.set(ie.NAME,o)):t===ne.NAME?(o=new ne,this.sections.set(ne.NAME,o)):t===se.NAME?(o=new se,this.sections.set(se.NAME,o)):t===Ee.NAME?(o=new Ee,this.sections.set(Ee.NAME,o)):t===le.NAME?(o=new le,this.sections.set(le.NAME,o)):t===ae.NAME?(o=new ae,this.sections.set(ae.NAME,o)):t===Se.NAME&&(o=new Se,this.sections.set(Se.NAME,o)),o)o.setFieldValue(e,r),this.dirty=!0;else throw new fe(t+"."+e+" not found")}setFieldValueBySectionId(t,e,r){this.setFieldValue(z.SECTION_ID_NAME_MAP.get(t),e,r)}getFieldValue(t,e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).getFieldValue(e):null}getFieldValueBySectionId(t,e){return this.getFieldValue(z.SECTION_ID_NAME_MAP.get(t),e)}hasField(t,e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).hasField(e):!1}hasFieldBySectionId(t,e){return this.hasField(z.SECTION_ID_NAME_MAP.get(t),e)}hasSection(t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)}hasSectionId(t){return this.hasSection(z.SECTION_ID_NAME_MAP.get(t))}deleteSection(t){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(t),this.dirty=!0}deleteSectionById(t){this.deleteSection(z.SECTION_ID_NAME_MAP.get(t))}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 t=new Ie;return t.setFieldValue("SectionIds",this.getSectionIds()),t.toObj()}getSection(t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let t=[];for(let e=0;e{let d=new XMLHttpRequest,S=()=>{if(d.readyState==XMLHttpRequest.DONE)if(d.status>=200&&d.status<300){let Nt=d.response;if(typeof Nt=="string")try{Nt=JSON.parse(Nt)}catch(Po){}n(Nt)}else E(new Error(`HTTP Status: ${d.status} response type: ${d.responseType}`))},K=()=>{E(new Error("error"))},De=()=>{E(new Error("aborted"))},st=()=>{E(new Error("Timeout "+o+"ms "+t))};d.withCredentials=r,d.addEventListener("load",S),d.addEventListener("error",K),d.addEventListener("abort",De),e===null?d.open("GET",t,!0):d.open("POST",t,!0),d.responseType="json",d.timeout=o,d.ontimeout=st,d.send(e)})}static post(t,e,r=!1,o=0){return this.absCall(t,JSON.stringify(e),r,o)}static fetch(t,e=!1,r=0){return this.absCall(t,null,e,r)}};var Je=class extends Error{constructor(t){super(t),this.name="GVLError"}};var it=class it{has(t){return it.langSet.has(t)}forEach(t){it.langSet.forEach(t)}get size(){return it.langSet.size}};s(it,"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"]));var ur=it;var nt=class nt{constructor(){s(this,"vendors");s(this,"consentLanguages",new ur);s(this,"gvlSpecificationVersion");s(this,"vendorListVersion");s(this,"tcfPolicyVersion");s(this,"lastUpdated");s(this,"purposes");s(this,"specialPurposes");s(this,"features");s(this,"specialFeatures");s(this,"stacks");s(this,"dataCategories");s(this,"language",nt.DEFAULT_LANGUAGE);s(this,"vendorIds");s(this,"ready",!1);s(this,"fullVendorList");s(this,"byPurposeVendorMap");s(this,"bySpecialPurposeVendorMap");s(this,"byFeatureVendorMap");s(this,"bySpecialFeatureVendorMap");s(this,"baseUrl");s(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(t){let e=new nt;return e.populate(t),e}static fromUrl(t){return Et(this,null,function*(){let e=t.baseUrl;if(!e||e.length===0)throw new Je("Invalid baseUrl: '"+e+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new Je("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+="/");let r=new nt;if(r.baseUrl=e,t.languageFilename?r.languageFilename=t.languageFilename:r.languageFilename="purposes-[LANG].json",t.version>0){let o=t.versionedFilename;o||(o="archives/vendor-list-v[VERSION].json");let n=e+o.replace("[VERSION]",String(t.version));r.populate(yield ot.fetch(n))}else{let o=t.latestFilename;o||(o="vendor-list.json");let n=e+o;r.populate(yield ot.fetch(n))}return r})}changeLanguage(t){return Et(this,null,function*(){let e=t.toUpperCase();if(this.consentLanguages.has(e)){if(e!==this.language){this.language=e;let r=this.baseUrl+this.languageFilename.replace("[LANG]",t);try{this.populate(yield ot.fetch(r))}catch(o){throw new Je("unable to load language: "+o.message)}}}else throw new Je(`unsupported language ${t}`)})}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(t){return t!==void 0&&t.vendors!==void 0}populate(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.dataCategories=t.dataCategories,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.ready=!0)}mapVendors(t){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(e=>{this.byPurposeVendorMap[e]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(e=>{this.bySpecialPurposeVendorMap[e]=new Set}),Object.keys(this.features).forEach(e=>{this.byFeatureVendorMap[e]=new Set}),Object.keys(this.specialFeatures).forEach(e=>{this.bySpecialFeatureVendorMap[e]=new Set}),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map(e=>+e)),this.vendorIds=new Set(t),this.vendors=t.reduce((e,r)=>{let o=this.vendors[String(r)];return o&&o.deletedDate===void 0&&(o.purposes.forEach(n=>{this.byPurposeVendorMap[String(n)].consent.add(r)}),o.specialPurposes.forEach(n=>{this.bySpecialPurposeVendorMap[String(n)].add(r)}),o.legIntPurposes&&o.legIntPurposes.forEach(n=>{this.byPurposeVendorMap[String(n)].legInt.add(r)}),o.impConsPurposes&&o.impConsPurposes.forEach(n=>{this.byPurposeVendorMap[String(n)].impCons.add(r)}),o.flexiblePurposes&&o.flexiblePurposes.forEach(n=>{this.byPurposeVendorMap[String(n)].flexible.add(r)}),o.features.forEach(n=>{this.byFeatureVendorMap[String(n)].add(r)}),o.specialFeatures.forEach(n=>{this.bySpecialFeatureVendorMap[String(n)].add(r)}),e[r]=o),e},{})}getFilteredVendors(t,e,r,o){let n=t.charAt(0).toUpperCase()+t.slice(1),E,d={};return t==="purpose"&&r?E=this["by"+n+"VendorMap"][String(e)][r]:E=this["by"+(o?"Special":"")+n+"VendorMap"][String(e)],E.forEach(S=>{d[String(S)]=this.vendors[String(S)]}),d}getVendorsWithConsentPurpose(t){return this.getFilteredVendors("purpose",t,"consent")}getVendorsWithLegIntPurpose(t){return this.getFilteredVendors("purpose",t,"legInt")}getVendorsWithFlexiblePurpose(t){return this.getFilteredVendors("purpose",t,"flexible")}getVendorsWithSpecialPurpose(t){return this.getFilteredVendors("purpose",t,void 0,!0)}getVendorsWithFeature(t){return this.getFilteredVendors("feature",t)}getVendorsWithSpecialFeature(t){return this.getFilteredVendors("feature",t,void 0,!0)}narrowVendorsTo(t){this.mapVendors(t)}get isReady(){return this.ready}static isInstanceOf(t){return typeof t=="object"&&typeof t.narrowVendorsTo=="function"}};s(nt,"DEFAULT_LANGUAGE","EN");var mt=nt;var Or=class{constructor(t,e,r){s(this,"callResponder");s(this,"cmpApiContext");this.cmpApiContext=new Nr,this.cmpApiContext.cmpId=t,this.cmpApiContext.cmpVersion=e,this.callResponder=new At(this.cmpApiContext,r)}fireEvent(t,e){this.cmpApiContext.eventQueue.exec(t,e)}fireErrorEvent(t){this.cmpApiContext.eventQueue.exec("error",t)}fireSectionChange(t){this.cmpApiContext.eventQueue.exec("sectionChange",t)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(t){this.cmpApiContext.eventStatus=t}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(t){this.cmpApiContext.cmpStatus=t,this.cmpApiContext.eventQueue.exec("cmpStatus",t)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(t){this.cmpApiContext.cmpDisplayStatus=t,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",t)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(t){this.cmpApiContext.signalStatus=t,this.cmpApiContext.eventQueue.exec("signalStatus",t)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(t){this.cmpApiContext.applicableSections=t}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(t){this.cmpApiContext.supportedAPIs=t}setGppString(t){this.cmpApiContext.gppModel.decode(t)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(t,e){this.cmpApiContext.gppModel.decodeSection(t,e)}setSectionStringById(t,e){this.setSectionString(z.SECTION_ID_NAME_MAP.get(t),e)}getSectionString(t){return this.cmpApiContext.gppModel.encodeSection(t)}getSectionStringById(t){return this.getSectionString(z.SECTION_ID_NAME_MAP.get(t))}setFieldValue(t,e,r){this.cmpApiContext.gppModel.setFieldValue(t,e,r)}setFieldValueBySectionId(t,e,r){this.setFieldValue(z.SECTION_ID_NAME_MAP.get(t),e,r)}getFieldValue(t,e){return this.cmpApiContext.gppModel.getFieldValue(t,e)}getFieldValueBySectionId(t,e){return this.getFieldValue(z.SECTION_ID_NAME_MAP.get(t),e)}getSection(t){return this.cmpApiContext.gppModel.getSection(t)}getSectionById(t){return this.getSection(z.SECTION_ID_NAME_MAP.get(t))}hasSection(t){return this.cmpApiContext.gppModel.hasSection(t)}hasSectionId(t){return this.hasSection(z.SECTION_ID_NAME_MAP.get(t))}deleteSection(t){this.cmpApiContext.gppModel.deleteSection(t)}deleteSectionById(t){this.deleteSection(z.SECTION_ID_NAME_MAP.get(t))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(t){return mt.fromVendorList(t)}getGvlFromUrl(t){return Et(this,null,function*(){return mt.fromUrl(t)})}};var gr={SaleOptOutNotice:1,SharingOptOutNotice:1,SensitiveDataLimitUseNotice:1,SaleOptOut:2,SharingOptOut:2,SensitiveDataProcessing:[2,2,2,2,2,2,2,2,2],KnownChildSensitiveDataConsents:[0,0],PersonalDataConsents:2,MspaCoveredTransaction:2,MspaOptOutOptionMode:0,MspaServiceProviderMode:0},To={SaleOptOutNotice:1,SharingOptOutNotice:1,SensitiveDataLimitUseNotice:1,SaleOptOut:1,SharingOptOut:1,SensitiveDataProcessing:[1,1,1,1,1,1,1,1,1],KnownChildSensitiveDataConsents:[0,0],MspaCoveredTransaction:0,MspaOptOutOptionMode:0,MspaServiceProviderMode:0};var Io=1,Y=new Or(hr,Io),mo={CA:{id:8,prefix:"usca"}};function ho(i){return mo[i]||mo.DEFAULT}function No(i){localStorage.setItem("gppConsent",i)}function fo(){return localStorage.getItem("gppConsent")||null}function Ir(i,t){try{let r=ho(t).prefix;switch(console.log(`\u2705 Storing GPP consent for section: ${r}`),r){case"usca":(i==null?void 0:i.SaleOptOutNotice)!==void 0&&Y.setFieldValue(r,"SaleOptOutNotice",i.SaleOptOutNotice),(i==null?void 0:i.SharingOptOutNotice)!==void 0&&Y.setFieldValue(r,"SharingOptOutNotice",i.SharingOptOutNotice),(i==null?void 0:i.SensitiveDataLimitUseNotice)!==void 0&&Y.setFieldValue(r,"SensitiveDataLimitUseNotice",i.SensitiveDataLimitUseNotice),(i==null?void 0:i.SaleOptOut)!==void 0&&Y.setFieldValue(r,"SaleOptOut",i.SaleOptOut),(i==null?void 0:i.SharingOptOut)!==void 0&&Y.setFieldValue(r,"SharingOptOut",i.SharingOptOut),(i==null?void 0:i.SensitiveDataProcessing)!==void 0&&Y.setFieldValue(r,"SensitiveDataProcessing",i.SensitiveDataProcessing),(i==null?void 0:i.KnownChildSensitiveDataConsents)!==void 0&&Y.setFieldValue(r,"KnownChildSensitiveDataConsents",i.KnownChildSensitiveDataConsents),(i==null?void 0:i.PersonalDataConsents)!==void 0&&Y.setFieldValue(r,"PersonalDataConsents",i.PersonalDataConsents),(i==null?void 0:i.MspaCoveredTransaction)!==void 0&&Y.setFieldValue(r,"MspaCoveredTransaction",i.MspaCoveredTransaction),(i==null?void 0:i.MspaOptOutOptionMode)!==void 0&&Y.setFieldValue(r,"MspaOptOutOptionMode",i.MspaOptOutOptionMode),(i==null?void 0:i.MspaServiceProviderMode)!==void 0&&Y.setFieldValue(r,"MspaServiceProviderMode",i.MspaServiceProviderMode),(navigator==null?void 0:navigator.globalPrivacyControl)!==void 0&&Y.setFieldValue(r,"Gpc",navigator.globalPrivacyControl);break;default:console.warn(`\u26A0\uFE0F Unknown jurisdiction: ${t}. Using fallback section.`),Y.setFieldValue("usnat","SaleOptOut",i.saleOptOut?1:0);break}Y.fireSectionChange(r);let o=Y.getGppString();No(o),console.log(`\u2705 Stored GPP Consent for ${t} in section ${r}`)}catch(e){console.error("\u274C Failed to store GPP consent:",e)}}function Ao(i){let t=document.createElement("div");t.innerHTML=`

Privacy Preferences

We and our partners share information on your use of this website to help improve your experience.

`,document.body.appendChild(t),document.getElementById("ez-ccpa-accept-all").onclick=function(){Ir(gr,i),Y.setEventStatus("useractioncomplete"),t.remove()},document.getElementById("ez-ccpa-reject-all").onclick=function(){Ir(To,i),Y.setEventStatus("useractioncomplete"),t.remove()}}function Do(i){console.log(`\u2705 IAB GPP CMP API Initialized! User is in jurisdiction: ${i}`);let t=fo();t&&t!="undefined"?(console.log("\u2705 Restoring previous consent:",t),Y.setGppString(t)):(console.log("\u2139\uFE0F No stored consent found. Showing consent UI."),Ir(gr,uo)),Y.setSignalStatus("ready"),Y.setCmpStatus("loaded"),Y.setEventStatus("gpploaded"),document.addEventListener("DOMContentLoaded",function(){Ao(i)}),window.__gpp("addEventListener",(e,r)=>{r?(console.log("\u2705 GPP Consent Updated:",e),No(e.pingData.gppString)):console.error("\u274C Failed to receive GPP event data.")})}var uo="CA";window.ezGPPEnabled=!0;Do(uo);})();