ethyca-fides 2.56.3b0__py2.py3-none-any.whl → 2.56.3b2__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/METADATA +1 -2
  2. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/RECORD +106 -102
  3. fides/_version.py +3 -3
  4. fides/api/alembic/migrations/versions/1152c1717849_fix_monitorexecution_started_default.py +57 -0
  5. fides/api/alembic/migrations/versions/69ad6d844e21_add_comments_and_comment_references.py +84 -0
  6. fides/api/alembic/migrations/versions/6ea2171c544f_change_attachment_storage_key_to_.py +77 -0
  7. fides/api/custom_types.py +24 -1
  8. fides/api/db/base.py +1 -0
  9. fides/api/models/attachment.py +109 -49
  10. fides/api/models/comment.py +109 -0
  11. fides/api/models/detection_discovery.py +4 -2
  12. fides/api/service/connectors/query_configs/saas_query_config.py +21 -15
  13. fides/api/service/storage/storage_uploader_service.py +4 -10
  14. fides/api/task/graph_task.py +84 -43
  15. fides/api/tasks/storage.py +106 -15
  16. fides/api/util/aws_util.py +19 -0
  17. fides/api/util/collection_util.py +117 -0
  18. fides/api/util/consent_util.py +20 -5
  19. fides/api/util/saas_util.py +32 -56
  20. fides/config/security_settings.py +7 -13
  21. fides/data/language/languages.yml +2 -0
  22. fides/ui-build/static/admin/404.html +1 -1
  23. fides/ui-build/static/admin/_next/static/chunks/pages/{_app-54e64129c5f3042a.js → _app-3b7bbcdb61d952e7.js} +1 -1
  24. fides/ui-build/static/admin/_next/static/chunks/pages/{index-c9fa68dc0fa42c81.js → index-94e6d589c4edf360.js} +1 -1
  25. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4769f55b138073f7.js +1 -0
  26. fides/ui-build/static/admin/_next/static/{o6oSu0mrMicc3b7f8nyq5 → n4uO6TqGfiKHQ-X5XYkoy}/_buildManifest.js +1 -1
  27. fides/ui-build/static/admin/add-systems/manual.html +1 -1
  28. fides/ui-build/static/admin/add-systems/multiple.html +1 -1
  29. fides/ui-build/static/admin/add-systems.html +1 -1
  30. fides/ui-build/static/admin/ant-poc.html +1 -1
  31. fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
  32. fides/ui-build/static/admin/consent/configure.html +1 -1
  33. fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
  34. fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
  35. fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
  36. fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
  37. fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
  38. fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
  39. fides/ui-build/static/admin/consent/properties.html +1 -1
  40. fides/ui-build/static/admin/consent/reporting.html +1 -1
  41. fides/ui-build/static/admin/consent.html +1 -1
  42. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
  43. fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
  44. fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
  45. fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
  46. fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
  47. fides/ui-build/static/admin/data-catalog.html +1 -1
  48. fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
  49. fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
  50. fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
  51. fides/ui-build/static/admin/data-discovery/activity.html +1 -1
  52. fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
  53. fides/ui-build/static/admin/data-discovery/detection.html +1 -1
  54. fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
  55. fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
  56. fides/ui-build/static/admin/datamap.html +1 -1
  57. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
  58. fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
  59. fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
  60. fides/ui-build/static/admin/dataset/new.html +1 -1
  61. fides/ui-build/static/admin/dataset.html +1 -1
  62. fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
  63. fides/ui-build/static/admin/datastore-connection/new.html +1 -1
  64. fides/ui-build/static/admin/datastore-connection.html +1 -1
  65. fides/ui-build/static/admin/index.html +1 -1
  66. fides/ui-build/static/admin/integrations/[id].html +1 -1
  67. fides/ui-build/static/admin/integrations.html +1 -1
  68. fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
  69. fides/ui-build/static/admin/lib/fides-headless.js +1 -1
  70. fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
  71. fides/ui-build/static/admin/lib/fides.js +2 -2
  72. fides/ui-build/static/admin/login/[provider].html +1 -1
  73. fides/ui-build/static/admin/login.html +1 -1
  74. fides/ui-build/static/admin/messaging/[id].html +1 -1
  75. fides/ui-build/static/admin/messaging/add-template.html +1 -1
  76. fides/ui-build/static/admin/messaging.html +1 -1
  77. fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
  78. fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
  79. fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
  80. fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
  81. fides/ui-build/static/admin/privacy-requests.html +1 -1
  82. fides/ui-build/static/admin/properties/[id].html +1 -1
  83. fides/ui-build/static/admin/properties/add-property.html +1 -1
  84. fides/ui-build/static/admin/properties.html +1 -1
  85. fides/ui-build/static/admin/reporting/datamap.html +1 -1
  86. fides/ui-build/static/admin/settings/about.html +1 -1
  87. fides/ui-build/static/admin/settings/consent.html +1 -1
  88. fides/ui-build/static/admin/settings/custom-fields.html +1 -1
  89. fides/ui-build/static/admin/settings/domain-records.html +1 -1
  90. fides/ui-build/static/admin/settings/domains.html +1 -1
  91. fides/ui-build/static/admin/settings/email-templates.html +1 -1
  92. fides/ui-build/static/admin/settings/locations.html +1 -1
  93. fides/ui-build/static/admin/settings/organization.html +1 -1
  94. fides/ui-build/static/admin/settings/regulations.html +1 -1
  95. fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
  96. fides/ui-build/static/admin/systems/configure/[id].html +1 -1
  97. fides/ui-build/static/admin/systems.html +1 -1
  98. fides/ui-build/static/admin/taxonomy.html +1 -1
  99. fides/ui-build/static/admin/user-management/new.html +1 -1
  100. fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
  101. fides/ui-build/static/admin/user-management.html +1 -1
  102. fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-815497f4f12600ec.js +0 -1
  103. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/LICENSE +0 -0
  104. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/WHEEL +0 -0
  105. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/entry_points.txt +0 -0
  106. {ethyca_fides-2.56.3b0.dist-info → ethyca_fides-2.56.3b2.dist-info}/top_level.txt +0 -0
  107. /fides/ui-build/static/admin/_next/static/{o6oSu0mrMicc3b7f8nyq5 → n4uO6TqGfiKHQ-X5XYkoy}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- var Ki=Object.defineProperty,Yi=(n,e,t)=>e in n?Ki(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$e=(n,e,t)=>Yi(n,typeof e!="symbol"?e+"":e,t);class Ft{constructor(e,t,i,s){$e(this,"eventName"),$e(this,"listenerId"),$e(this,"data"),$e(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=i,this.pingData=s}}var zi=Object.defineProperty,ki=(n,e,t)=>e in n?zi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_e=(n,e,t)=>ki(n,typeof e!="symbol"?e+"":e,t);class xe{constructor(e){_e(this,"gppVersion"),_e(this,"cmpStatus"),_e(this,"cmpDisplayStatus"),_e(this,"signalStatus"),_e(this,"supportedAPIs"),_e(this,"cmpId"),_e(this,"sectionList"),_e(this,"applicableSections"),_e(this,"gppString"),_e(this,"parsedSections"),this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}var Wi=Object.defineProperty,Qi=(n,e,t)=>e in n?Wi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,je=(n,e,t)=>Qi(n,typeof e!="symbol"?e+"":e,t);class we{constructor(e,t,i){je(this,"callback"),je(this,"parameter"),je(this,"success",!0),je(this,"cmpApiContext"),this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:i})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}}class Xi extends we{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new Ft("listenerRegistered",e,!0,new xe(this.cmpApiContext));this.invokeCallback(t)}}class qi extends we{respond(){let e=new xe(this.cmpApiContext);this.invokeCallback(e)}}class Ji extends we{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],i=e[1],s=this.cmpApiContext.gppModel.getFieldValue(t,i);this.invokeCallback(s)}}class Zi extends we{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class es extends we{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Te;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Te||(Te={}));class ts extends we{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),i=new Ft("listenerRemoved",e,t,new xe(this.cmpApiContext));this.invokeCallback(i)}}var ns=Object.defineProperty,is=(n,e,t)=>e in n?ns(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ve=(n,e,t)=>is(n,typeof e!="symbol"?e+"":e,t),Cn,Pn,Dn,wn,Vn,Rn;Rn=Te.ADD_EVENT_LISTENER,Vn=Te.GET_FIELD,wn=Te.GET_SECTION,Dn=Te.HAS_SECTION,Pn=Te.PING,Cn=Te.REMOVE_EVENT_LISTENER;class Ie{}Ve(Ie,Rn,Xi),Ve(Ie,Vn,Ji),Ve(Ie,wn,Zi),Ve(Ie,Dn,es),Ve(Ie,Pn,qi),Ve(Ie,Cn,ts);var Re;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Re||(Re={}));var pe;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(pe||(pe={}));var bn;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(bn||(bn={}));var Ne;(function(n){n.NOT_READY="not ready",n.READY="ready"})(Ne||(Ne={}));var ss=Object.defineProperty,rs=(n,e,t)=>e in n?ss(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$t=(n,e,t)=>rs(n,typeof e!="symbol"?e+"":e,t);class os{constructor(e,t){if($t(this,"callQueue"),$t(this,"customCommands"),$t(this,"cmpApiContext"),this.cmpApiContext=e,t){let i=Te.ADD_EVENT_LISTENER;if(t!=null&&t[i])throw new Error(`Built-In Custom Commmand for ${i} not allowed`);if(i=Te.REMOVE_EVENT_LISTENER,t!=null&&t[i])throw new Error(`Built-In Custom Commmand for ${i} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,i,s){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,i):this.isBuiltInCommand(e)?new Ie[e](this.cmpApiContext,t,i).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return Ie[e]!==void 0}}var as=Object.defineProperty,ls=(n,e,t)=>e in n?as(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xt=(n,e,t)=>ls(n,typeof e!="symbol"?e+"":e,t);class Es{constructor(e){xt(this,"eventQueue",new Map),xt(this,"queueNumber",1e3),xt(this,"cmpApiContext"),this.cmpApiContext=e;try{let i=window.__gpp("events")||[];for(var t=0;t<i.length;t++){let s=i[t];this.eventQueue.set(s.id,{callback:s.callback,parameter:s.parameter})}}catch(i){console.log(i)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((i,s)=>{let r=new Ft(e,s,t,new xe(this.cmpApiContext));i.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}}let Ge=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var ds=Object.defineProperty,Ss=(n,e,t)=>e in n?ds(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,He=(n,e,t)=>Ss(n,typeof e!="symbol"?e+"":e,t);class j{constructor(){He(this,"segments"),He(this,"encodedString",null),He(this,"dirty",!1),He(this,"decoded",!0),this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let i=this.segments[t];if(i.getFieldNames().includes(e))return i.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let i=this.segments[t];if(i.hasField(e))return i.getFieldValue(e)}throw new Ge("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let i=0;i<this.segments.length;i++){let s=this.segments[i];if(s.hasField(e)){s.setFieldValue(e,t);return}}throw new Ge("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let i=this.segments[t].toObj();for(const[s,r]of Object.entries(i))e[s]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let d=class extends Error{constructor(e){super(e),this.name="DecodingError"}},K=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class h{static encode(e,t){let i=[];if(e>=1)for(i.push(1);e>=i[0]*2;)i.unshift(i[0]*2);let s="";for(let r=0;r<i.length;r++){let o=i[r];e>=o?(s+="1",e-=o):s+="0"}if(s.length>t)throw new K("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;s.length<t;)s="0"+s;return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new d("Undecodable FixedInteger '"+e+"'");let t=0,i=[];for(let s=0;s<e.length;s++)s===0?i[e.length-(s+1)]=1:i[e.length-(s+1)]=i[e.length-s]*2;for(let s=0;s<e.length;s++)e.charAt(s)==="1"&&(t+=i[s]);return t}}var cs=Object.defineProperty,us=(n,e,t)=>e in n?cs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mn=(n,e,t)=>us(n,typeof e!="symbol"?e+"":e,t);const jt=class gn{encode(e){if(!/^[0-1]*$/.test(e))throw new K("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",i=0;for(;i<=e.length-6;){let s=e.substring(i,i+6);try{let r=h.decode(s),o=gn.DICT.charAt(r);t+=o,i+=6}catch{throw new K("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new d("Undecodable Base64URL string '"+e+"'");let t="";for(let i=0;i<e.length;i++){let s=e.charAt(i),r=gn.REVERSE_DICT.get(s),o=h.encode(r,6);t+=o}return t}};mn(jt,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),mn(jt,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]));let Mn=jt;var _s=Object.defineProperty,Ts=(n,e,t)=>e in n?_s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ns=(n,e,t)=>Ts(n,typeof e!="symbol"?e+"":e,t);const Ht=class extends Mn{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}};Ns(Ht,"instance",new Ht);let b=Ht;var Os=Object.defineProperty,hs=(n,e,t)=>e in n?Os(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gs=(n,e,t)=>hs(n,typeof e!="symbol"?e+"":e,t);const Bt=class{constructor(){}static getInstance(){return this.instance}encode(e,t){let i="";for(let s=0;s<t.length;s++){let r=t[s];if(e.containsKey(r)){let o=e.get(r);i+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return i}decode(e,t,i){let s=0;for(let r=0;r<t.length;r++){let o=t[r];if(i.containsKey(o)){let l=i.get(o);try{let E=l.substring(e,s);l.decode(E),s+=E.length}catch(E){if(E.name==="SubstringError"&&!l.getHardFailIfMissing())return;throw new d("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};gs(Bt,"instance",new Bt);let N=Bt;class be{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let s=2;for(;e>=t[s-1]+t[s-2];)t.push(t[s-1]+t[s-2]),s++}let i="1";for(let s=t.length-1;s>=0;s--){let r=t[s];e>=r?(i="1"+i,e-=r):i="0"+i}return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new d("Undecodable FibonacciInteger '"+e+"'");let t=0,i=[];for(let s=0;s<e.length-1;s++)s===0?i.push(1):s===1?i.push(2):i.push(i[s-1]+i[s-2]);for(let s=0;s<e.length-1;s++)e.charAt(s)==="1"&&(t+=i[s]);return t}}class me{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new K("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new d("Undecodable Boolean '"+e+"'")}}class fn{static encode(e){e=e.sort((o,l)=>o-l);let t=[],i=0,s=0;for(;s<e.length;){let o=s;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(s,o+1)),s=o+1}let r=h.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let l=t[o][0]-i;i=t[o][0],r+="0"+be.encode(l)}else{let l=t[o][0]-i;i=t[o][0];let E=t[o][t[o].length-1]-i;i=t[o][t[o].length-1],r+="1"+be.encode(l)+be.encode(E)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new d("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],i=h.decode(e.substring(0,12)),s=0,r=12;for(let o=0;o<i;o++){let l=me.decode(e.substring(r,r+1));if(r++,l===!0){let E=e.indexOf("11",r),u=be.decode(e.substring(r,E+2))+s;s=u,r=E+2,E=e.indexOf("11",r);let x=be.decode(e.substring(r,E+2))+s;s=x,r=E+2;for(let B=u;B<=x;B++)t.push(B)}else{let E=e.indexOf("11",r),u=be.decode(e.substring(r,E+2))+s;s=u,t.push(u),r=E+2}}return t}}let Is=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var ps=Object.defineProperty,As=(n,e,t)=>e in n?ps(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kt=(n,e,t)=>As(n,typeof e!="symbol"?e+"":e,t);class Se{constructor(e=!0){Kt(this,"hardFailIfMissing"),Kt(this,"validator"),Kt(this,"value"),this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new Is("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let de=class extends d{constructor(e){super(e),this.name="SubstringError"}};class H{static substring(e,t,i){if(i>e.length||t<0||t>i)throw new de("Invalid substring indexes "+t+":"+i+" for string of length "+e.length);return e.substring(t,i)}}class Cs extends Se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return fn.encode(this.value)}catch(e){throw new K(e)}}decode(e){try{this.value=fn.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{let i=h.decode(H.substring(e,t,t+12)),s=t+12;for(let r=0;r<i;r++)e.charAt(s)==="1"?s=e.indexOf("11",e.indexOf("11",s+1)+2)+2:s=e.indexOf("11",s+1)+2;return H.substring(e,t,s)}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,i)=>t-i))}}var Ps=Object.defineProperty,Ds=(n,e,t)=>e in n?Ps(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ws=(n,e,t)=>Ds(n,typeof e!="symbol"?e+"":e,t);class a extends Se{constructor(e,t,i=!0){super(i),ws(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return h.encode(this.value,this.bitStringLength)}catch(e){throw new K(e)}}decode(e){try{this.value=h.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+this.bitStringLength)}catch(i){throw new de(i)}}}var Vs=Object.defineProperty,Rs=(n,e,t)=>e in n?Vs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>Rs(n,typeof e!="symbol"?e+"":e,t);class O{constructor(){bs(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,i)=>{this.fields.set(i,t)})}}var ge;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(ge||(ge={}));const ms=[ge.ID,ge.VERSION,ge.SECTION_IDS];var Ms=Object.defineProperty,fs=(n,e,t)=>e in n?Ms(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Be=(n,e,t)=>fs(n,typeof e!="symbol"?e+"":e,t);class T{constructor(){Be(this,"fields"),Be(this,"encodedString",null),Be(this,"dirty",!1),Be(this,"decoded",!0),this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new Ge("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new Ge(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let i=0;i<t.length;i++){let s=t[i],r=this.getFieldValue(s);e[s]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var Us=Object.defineProperty,Gs=(n,e,t)=>e in n?Us(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Un=(n,e,t)=>Gs(n,typeof e!="symbol"?e+"":e,t);class vs extends T{constructor(e){super(),Un(this,"base64UrlEncoder",b.getInstance()),Un(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ms}initializeFields(){let e=new O;return e.put(ge.ID.toString(),new a(6,Ce.ID)),e.put(ge.VERSION.toString(),new a(6,Ce.VERSION)),e.put(ge.SECTION_IDS.toString(),new Cs([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var ys=Object.defineProperty,Ls=(n,e,t)=>e in n?ys(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yt=(n,e,t)=>Ls(n,typeof e!="symbol"?e+"":e,t);const Ke=class Nt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nt.ID}getName(){return Nt.NAME}getVersion(){return Nt.VERSION}initializeSegments(){let e=[];return e.push(new vs),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<t.length;s++)i.length>s&&t[s].decode(i[s])}return t}encodeSection(e){let t=[];for(let i=0;i<e.length;i++){let s=e[i];t.push(s.encode())}return t.join(".")}};Yt(Ke,"ID",3),Yt(Ke,"VERSION",1),Yt(Ke,"NAME","header");let Ce=Ke;var S;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(S||(S={}));const Fs=[S.VERSION,S.CREATED,S.LAST_UPDATED,S.CMP_ID,S.CMP_VERSION,S.CONSENT_SCREEN,S.CONSENT_LANGUAGE,S.VENDOR_LIST_VERSION,S.POLICY_VERSION,S.IS_SERVICE_SPECIFIC,S.USE_NON_STANDARD_STACKS,S.SPECIAL_FEATURE_OPTINS,S.PURPOSE_CONSENTS,S.PURPOSE_LEGITIMATE_INTERESTS,S.PURPOSE_ONE_TREATMENT,S.PUBLISHER_COUNTRY_CODE,S.VENDOR_CONSENTS,S.VENDOR_LEGITIMATE_INTERESTS,S.PUBLISHER_RESTRICTIONS],$s=[S.PUBLISHER_PURPOSES_SEGMENT_TYPE,S.PUBLISHER_CONSENTS,S.PUBLISHER_LEGITIMATE_INTERESTS,S.NUM_CUSTOM_PURPOSES,S.PUBLISHER_CUSTOM_CONSENTS,S.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],xs=[S.VENDORS_ALLOWED_SEGMENT_TYPE,S.VENDORS_ALLOWED],js=[S.VENDORS_DISCLOSED_SEGMENT_TYPE,S.VENDORS_DISCLOSED];var Hs=Object.defineProperty,Bs=(n,e,t)=>e in n?Hs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Bs(n,typeof e!="symbol"?e+"":e,t);const zt=class extends Mn{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};Ks(zt,"instance",new zt);let ve=zt;class Me{static encode(e){e.sort((r,o)=>r-o);let t=[],i=0;for(;i<e.length;){let r=i;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(i,r+1)),i=r+1}let s=h.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?s+="0"+h.encode(t[r][0],16):s+="1"+h.encode(t[r][0],16)+h.encode(t[r][t[r].length-1],16);return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new d("Undecodable FixedIntegerRange '"+e+"'");let t=[],i=h.decode(e.substring(0,12)),s=12;for(let r=0;r<i;r++){let o=me.decode(e.substring(s,s+1));if(s++,o===!0){let l=h.decode(e.substring(s,s+16));s+=16;let E=h.decode(e.substring(s,s+16));s+=16;for(let u=l;u<=E;u++)t.push(u)}else{let l=h.decode(e.substring(s,s+16));t.push(l),s+=16}}return t}}class kt extends Se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Me.encode(this.value)}catch(e){throw new K(e)}}decode(e){try{this.value=Me.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{let i=h.decode(H.substring(e,t,t+12)),s=t+12;for(let r=0;r<i;r++)e.charAt(s)==="1"?s+=33:s+=17;return H.substring(e,t,s)}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,i)=>t-i))}}var Ys=Object.defineProperty,zs=(n,e,t)=>e in n?Ys(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wt=(n,e,t)=>zs(n,typeof e!="symbol"?e+"":e,t);class ks{constructor(e,t,i){Wt(this,"key"),Wt(this,"type"),Wt(this,"ids"),this.key=e,this.type=t,this.ids=i}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}var Ws=Object.defineProperty,Qs=(n,e,t)=>e in n?Ws(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gn=(n,e,t)=>Qs(n,typeof e!="symbol"?e+"":e,t);class vn extends Se{constructor(e,t,i,s=!0){super(s),Gn(this,"keyBitStringLength"),Gn(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(i)}encode(){try{let e=this.value,t="";t+=h.encode(e.length,12);for(let i=0;i<e.length;i++){let s=e[i];t+=h.encode(s.getKey(),this.keyBitStringLength),t+=h.encode(s.getType(),this.typeBitStringLength),t+=Me.encode(s.getIds())}return t}catch(e){throw new K(e)}}decode(e){try{let t=[],i=h.decode(H.substring(e,0,12)),s=12;for(let r=0;r<i;r++){let o=h.decode(H.substring(e,s,s+this.keyBitStringLength));s+=this.keyBitStringLength;let l=h.decode(H.substring(e,s,s+this.typeBitStringLength));s+=this.typeBitStringLength;let E=new kt([]).substring(e,s),u=Me.decode(E);s+=E.length,t.push(new ks(o,l,u))}this.value=t}catch(t){throw new d(t)}}substring(e,t){try{let i="";i+=H.substring(e,t,t+12);let s=h.decode(i.toString()),r=t+i.length;for(let o=0;o<s;o++){let l=H.substring(e,r,r+this.keyBitStringLength);r+=l.length,i+=l;let E=H.substring(e,r,r+this.typeBitStringLength);r+=E.length,i+=E;let u=new kt([]).substring(e,r);r+=u.length,i+=u}return i}catch(i){throw new de(i)}}}class f extends Se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return me.encode(this.value)}catch(e){throw new K(e)}}decode(e){try{this.value=me.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+1)}catch(i){throw new de(i)}}}class yn{static encode(e){return e?h.encode(Math.round(e.getTime()/100),36):h.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new d("Undecodable Datetime '"+e+"'");return new Date(h.decode(e)*100)}}class Ye extends Se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return yn.encode(this.value)}catch(e){throw new K(e)}}decode(e){try{this.value=yn.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+36)}catch(i){throw new de(i)}}}class fe{static encode(e,t){if(e.length>t)throw new K("Too many values '"+e.length+"'");let i="";for(let s=0;s<e.length;s++)i+=me.encode(e[s]);for(;i.length<t;)i+="0";return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new d("Undecodable FixedBitfield '"+e+"'");let t=[];for(let i=0;i<e.length;i++)t.push(me.decode(e.substring(i,i+1)));return t}}var Xs=Object.defineProperty,qs=(n,e,t)=>e in n?Xs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>qs(n,typeof e!="symbol"?e+"":e,t);class Oe extends Se{constructor(e,t=!0){super(t),Js(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return fe.encode(this.value,this.numElements)}catch(e){throw new K(e)}}decode(e){try{this.value=fe.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+this.numElements)}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let i=t.length;i<this.numElements;i++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Ln{static encode(e,t){for(;e.length<t;)e+=" ";let i="";for(let s=0;s<e.length;s++){let r=e.charCodeAt(s);if(r===32)i+=h.encode(63,6);else if(r>=65)i+=h.encode(e.charCodeAt(s)-65,6);else throw new K("Unencodable FixedString '"+e+"'")}return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new d("Undecodable FixedString '"+e+"'");let t="";for(let i=0;i<e.length;i+=6){let s=h.decode(e.substring(i,i+6));s===63?t+=" ":t+=String.fromCharCode(s+65)}return t.trim()}}var Zs=Object.defineProperty,er=(n,e,t)=>e in n?Zs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,tr=(n,e,t)=>er(n,typeof e!="symbol"?e+"":e,t);class Qt extends Se{constructor(e,t,i=!0){super(i),tr(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return Ln.encode(this.value,this.stringLength)}catch(e){throw new K(e)}}decode(e){try{this.value=Ln.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+this.stringLength*6)}catch(i){throw new de(i)}}}class Pe extends Se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=Me.encode(this.value),i=t.length,s=e;if(i<=s)return h.encode(e,16)+"1"+t;{let r=[],o=0;for(let l=0;l<e;l++)l===this.value[o]-1?(r[l]=!0,o++):r[l]=!1;return h.encode(e,16)+"0"+fe.encode(r,s)}}catch(e){throw new K(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=Me.decode(e.substring(17));else{let t=[],i=fe.decode(e.substring(17));for(let s=0;s<i.length;s++)i[s]===!0&&t.push(s+1);this.value=t}}catch(t){throw new d(t)}}substring(e,t){try{let i=h.decode(H.substring(e,t,t+16));return e.charAt(t+16)==="1"?H.substring(e,t,t+17)+new kt([]).substring(e,t+17):H.substring(e,t,t+17+i)}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,i)=>t-i))}}var nr=Object.defineProperty,ir=(n,e,t)=>e in n?nr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fn=(n,e,t)=>ir(n,typeof e!="symbol"?e+"":e,t);class sr extends T{constructor(e){super(),Fn(this,"base64UrlEncoder",ve.getInstance()),Fn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Fs}initializeFields(){let e=new Date,t=new O;return t.put(S.VERSION.toString(),new a(6,$.VERSION)),t.put(S.CREATED.toString(),new Ye(e)),t.put(S.LAST_UPDATED.toString(),new Ye(e)),t.put(S.CMP_ID.toString(),new a(12,0)),t.put(S.CMP_VERSION.toString(),new a(12,0)),t.put(S.CONSENT_SCREEN.toString(),new a(6,0)),t.put(S.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(S.VENDOR_LIST_VERSION.toString(),new a(12,0)),t.put(S.POLICY_VERSION.toString(),new a(6,2)),t.put(S.IS_SERVICE_SPECIFIC.toString(),new f(!1)),t.put(S.USE_NON_STANDARD_STACKS.toString(),new f(!1)),t.put(S.SPECIAL_FEATURE_OPTINS.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(S.PURPOSE_CONSENTS.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(S.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(S.PURPOSE_ONE_TREATMENT.toString(),new f(!1)),t.put(S.PUBLISHER_COUNTRY_CODE.toString(),new Qt(2,"AA")),t.put(S.VENDOR_CONSENTS.toString(),new Pe([])),t.put(S.VENDOR_LEGITIMATE_INTERESTS.toString(),new Pe([])),t.put(S.PUBLISHER_RESTRICTIONS.toString(),new vn(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var rr=Object.defineProperty,or=(n,e,t)=>e in n?rr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ar=(n,e,t)=>or(n,typeof e!="symbol"?e+"":e,t);class ze extends Se{constructor(e,t,i=!0){super(i),ar(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return fe.encode(this.value,this.getLength())}catch(e){throw new K(e)}}decode(e){try{this.value=fe.decode(e)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+this.getLength())}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),i=[...e];for(let s=i.length;s<t;s++)i.push(!1);i.length>t&&(i=i.slice(0,t)),super.setValue([...i])}}var lr=Object.defineProperty,Er=(n,e,t)=>e in n?lr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$n=(n,e,t)=>Er(n,typeof e!="symbol"?e+"":e,t);class dr extends T{constructor(e){super(),$n(this,"base64UrlEncoder",ve.getInstance()),$n(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return $s}initializeFields(){let e=new O;e.put(S.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new a(3,3)),e.put(S.PUBLISHER_CONSENTS.toString(),new Oe([!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(S.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new a(6,0);return e.put(S.NUM_CUSTOM_PURPOSES.toString(),t),e.put(S.PUBLISHER_CUSTOM_CONSENTS.toString(),new ze(()=>t.getValue(),[])),e.put(S.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new ze(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Sr=Object.defineProperty,cr=(n,e,t)=>e in n?Sr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>cr(n,typeof e!="symbol"?e+"":e,t);class ur extends T{constructor(e){super(),xn(this,"base64UrlEncoder",ve.getInstance()),xn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return xs}initializeFields(){let e=new O;return e.put(S.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new a(3,2)),e.put(S.VENDORS_ALLOWED.toString(),new Pe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var _r=Object.defineProperty,Tr=(n,e,t)=>e in n?_r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jn=(n,e,t)=>Tr(n,typeof e!="symbol"?e+"":e,t);class Nr extends T{constructor(e){super(),jn(this,"base64UrlEncoder",ve.getInstance()),jn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return js}initializeFields(){let e=new O;return e.put(S.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new a(3,1)),e.put(S.VENDORS_DISCLOSED.toString(),new Pe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var Or=Object.defineProperty,hr=(n,e,t)=>e in n?Or(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xt=(n,e,t)=>hr(n,typeof e!="symbol"?e+"":e,t);const ke=class Ot extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ot.ID}getName(){return Ot.NAME}getVersion(){return Ot.VERSION}initializeSegments(){let e=[];return e.push(new sr),e.push(new dr),e.push(new ur),e.push(new Nr),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<i.length;s++){let r=i[s];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(i[s]);else if(o>="I"&&o<="P")t[3].decode(i[s]);else if(o>="Q"&&o<="X")t[2].decode(i[s]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(i[s]);else throw new d("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(S.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==S.CREATED&&e!==S.LAST_UPDATED){let i=new Date;super.setFieldValue(S.CREATED,i),super.setFieldValue(S.LAST_UPDATED,i)}}};Xt(ke,"ID",2),Xt(ke,"VERSION",2),Xt(ke,"NAME","tcfeuv2");let $=ke;var c;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(c||(c={}));const gr=[c.VERSION,c.CREATED,c.LAST_UPDATED,c.CMP_ID,c.CMP_VERSION,c.CONSENT_SCREEN,c.CONSENT_LANGUAGE,c.VENDOR_LIST_VERSION,c.TCF_POLICY_VERSION,c.USE_NON_STANDARD_STACKS,c.SPECIAL_FEATURE_EXPRESS_CONSENT,c.PURPOSES_EXPRESS_CONSENT,c.PURPOSES_IMPLIED_CONSENT,c.VENDOR_EXPRESS_CONSENT,c.VENDOR_IMPLIED_CONSENT,c.PUB_RESTRICTIONS],Ir=[c.PUB_PURPOSES_SEGMENT_TYPE,c.PUB_PURPOSES_EXPRESS_CONSENT,c.PUB_PURPOSES_IMPLIED_CONSENT,c.NUM_CUSTOM_PURPOSES,c.CUSTOM_PURPOSES_EXPRESS_CONSENT,c.CUSTOM_PURPOSES_IMPLIED_CONSENT],pr=[c.DISCLOSED_VENDORS_SEGMENT_TYPE,c.DISCLOSED_VENDORS];var Ar=Object.defineProperty,Cr=(n,e,t)=>e in n?Ar(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>Cr(n,typeof e!="symbol"?e+"":e,t);class Pr extends T{constructor(e){super(),Hn(this,"base64UrlEncoder",b.getInstance()),Hn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return gr}initializeFields(){let e=new Date,t=new O;return t.put(c.VERSION.toString(),new a(6,ae.VERSION)),t.put(c.CREATED.toString(),new Ye(e)),t.put(c.LAST_UPDATED.toString(),new Ye(e)),t.put(c.CMP_ID.toString(),new a(12,0)),t.put(c.CMP_VERSION.toString(),new a(12,0)),t.put(c.CONSENT_SCREEN.toString(),new a(6,0)),t.put(c.CONSENT_LANGUAGE.toString(),new Qt(2,"EN")),t.put(c.VENDOR_LIST_VERSION.toString(),new a(12,0)),t.put(c.TCF_POLICY_VERSION.toString(),new a(6,2)),t.put(c.USE_NON_STANDARD_STACKS.toString(),new f(!1)),t.put(c.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(c.PURPOSES_EXPRESS_CONSENT.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(c.PURPOSES_IMPLIED_CONSENT.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(c.VENDOR_EXPRESS_CONSENT.toString(),new Pe([])),t.put(c.VENDOR_IMPLIED_CONSENT.toString(),new Pe([])),t.put(c.PUB_RESTRICTIONS.toString(),new vn(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var Dr=Object.defineProperty,wr=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bn=(n,e,t)=>wr(n,typeof e!="symbol"?e+"":e,t);class Vr extends T{constructor(e){super(),Bn(this,"base64UrlEncoder",b.getInstance()),Bn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Ir}initializeFields(){let e=new O;e.put(c.PUB_PURPOSES_SEGMENT_TYPE.toString(),new a(3,3)),e.put(c.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Oe([!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(c.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Oe([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new a(6,0);return e.put(c.NUM_CUSTOM_PURPOSES.toString(),t),e.put(c.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new ze(()=>t.getValue(),[])),e.put(c.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new ze(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var Rr=Object.defineProperty,br=(n,e,t)=>e in n?Rr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>br(n,typeof e!="symbol"?e+"":e,t);class mr extends T{constructor(e){super(),Kn(this,"base64UrlEncoder",ve.getInstance()),Kn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return pr}initializeFields(){let e=new O;return e.put(c.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new a(3,1)),e.put(c.DISCLOSED_VENDORS.toString(),new Pe([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var Mr=Object.defineProperty,fr=(n,e,t)=>e in n?Mr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qt=(n,e,t)=>fr(n,typeof e!="symbol"?e+"":e,t);const We=class ht extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ht.ID}getName(){return ht.NAME}getVersion(){return ht.VERSION}initializeSegments(){let e=[];return e.push(new Pr),e.push(new Vr),e.push(new mr),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<i.length;s++){let r=i[s];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(i[s]);else if(o>="I"&&o<="P")t[2].decode(i[s]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(i[s]);else throw new d("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(c.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==c.CREATED&&e!==c.LAST_UPDATED){let i=new Date;super.setFieldValue(c.CREATED,i),super.setFieldValue(c.LAST_UPDATED,i)}}};qt(We,"ID",5),qt(We,"VERSION",1),qt(We,"NAME","tcfcav1");let ae=We;var Ur=Object.defineProperty,Gr=(n,e,t)=>e in n?Ur(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>Gr(n,typeof e!="symbol"?e+"":e,t);class Jt{constructor(e,t){Yn(this,"validator"),Yn(this,"value",null),t?this.validator=t:this.validator=new class{test(i){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}var vr=Object.defineProperty,yr=(n,e,t)=>e in n?vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>yr(n,typeof e!="symbol"?e+"":e,t);class Lr{constructor(e,t){zn(this,"validator"),zn(this,"value",null),t?this.validator=t:this.validator=new class{test(i){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}var Fr=Object.defineProperty,$r=(n,e,t)=>e in n?Fr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xr=(n,e,t)=>$r(n,typeof e!="symbol"?e+"":e,t);class jr{constructor(){xr(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,i)=>{this.fields.set(i,t)})}}var Y;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(Y||(Y={}));const Hr=[Y.VERSION,Y.NOTICE,Y.OPT_OUT_SALE,Y.LSPA_COVERED];class Br extends T{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Hr}initializeFields(){const e=new class{test(i){return i==="-"||i==="Y"||i==="N"}};let t=new jr;return t.put(Y.VERSION,new Lr(le.VERSION)),t.put(Y.NOTICE,new Jt("-",e)),t.put(Y.OPT_OUT_SALE,new Jt("-",e)),t.put(Y.LSPA_COVERED,new Jt("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Y.VERSION).getValue(),t+=e.get(Y.NOTICE).getValue(),t+=e.get(Y.OPT_OUT_SALE).getValue(),t+=e.get(Y.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new d("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Y.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Y.NOTICE).setValue(e.charAt(1)),t.get(Y.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Y.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new d("Unable to decode UspV1CoreSegment '"+e+"'")}}}var Kr=Object.defineProperty,Yr=(n,e,t)=>e in n?Kr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zt=(n,e,t)=>Yr(n,typeof e!="symbol"?e+"":e,t);const Qe=class gt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gt.ID}getName(){return gt.NAME}getVersion(){return gt.VERSION}initializeSegments(){let e=[];return e.push(new Br),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<t.length;s++)i.length>s&&t[s].decode(i[s])}return t}encodeSection(e){let t=[];for(let i=0;i<e.length;i++){let s=e[i];t.push(s.encode())}return t.join(".")}};Zt(Qe,"ID",6),Zt(Qe,"VERSION",1),Zt(Qe,"NAME","uspv1");let le=Qe;var _;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(_||(_={}));const zr=[_.VERSION,_.SHARING_NOTICE,_.SALE_OPT_OUT_NOTICE,_.SHARING_OPT_OUT_NOTICE,_.TARGETED_ADVERTISING_OPT_OUT_NOTICE,_.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,_.SENSITIVE_DATA_LIMIT_USE_NOTICE,_.SALE_OPT_OUT,_.SHARING_OPT_OUT,_.TARGETED_ADVERTISING_OPT_OUT,_.SENSITIVE_DATA_PROCESSING,_.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,_.PERSONAL_DATA_CONSENTS,_.MSPA_COVERED_TRANSACTION,_.MSPA_OPT_OUT_OPTION_MODE,_.MSPA_SERVICE_PROVIDER_MODE],kr=[_.GPC_SEGMENT_TYPE,_.GPC];class kn{static encode(e,t,i){if(e.length>i)throw new K("Too many values '"+e.length+"'");let s="";for(let r=0;r<e.length;r++)s+=h.encode(e[r],t);for(;s.length<t*i;)s+="0";return s}static decode(e,t,i){if(!/^[0-1]*$/.test(e))throw new d("Undecodable FixedInteger '"+e+"'");if(e.length>t*i)throw new d("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new d("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*i;)e+="0";e.length>t*i&&(e=e.substring(0,t*i));let s=[];for(let r=0;r<e.length;r+=t)s.push(h.decode(e.substring(r,r+t)));for(;s.length<i;)s.push(0);return s}}var Wr=Object.defineProperty,Qr=(n,e,t)=>e in n?Wr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>Qr(n,typeof e!="symbol"?e+"":e,t);class v extends Se{constructor(e,t,i=!0){super(i),Wn(this,"elementBitStringLength"),Wn(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return kn.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new K(e)}}decode(e){try{this.value=kn.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new d(t)}}substring(e,t){try{return H.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(i){throw new de(i)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let i=t.length;i<this.numElements;i++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}var Xr=Object.defineProperty,qr=(n,e,t)=>e in n?Xr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>qr(n,typeof e!="symbol"?e+"":e,t);class Jr extends T{constructor(e){super(),Qn(this,"base64UrlEncoder",b.getInstance()),Qn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return zr}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(_.VERSION.toString(),new a(6,z.VERSION)),s.put(_.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.SHARING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(_.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(_.SHARING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(_.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(_.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(i)),s.put(_.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(_.PERSONAL_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(_.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(_.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(_.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNatCoreSegment '"+e+"'")}}}var Zr=Object.defineProperty,eo=(n,e,t)=>e in n?Zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>eo(n,typeof e!="symbol"?e+"":e,t);class to extends T{constructor(e){super(),Xn(this,"base64UrlEncoder",b.getInstance()),Xn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return kr}initializeFields(){let e=new O;return e.put(_.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(_.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(_.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNatGpcSegment '"+e+"'")}}}var no=Object.defineProperty,io=(n,e,t)=>e in n?no(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,en=(n,e,t)=>io(n,typeof e!="symbol"?e+"":e,t);const Xe=class It extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return It.ID}getName(){return It.NAME}getVersion(){return It.VERSION}initializeSegments(){let e=[];return e.push(new Jr),e.push(new to),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(_.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(_.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(_.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};en(Xe,"ID",7),en(Xe,"VERSION",1),en(Xe,"NAME","usnat");let z=Xe;var g;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(g||(g={}));const so=[g.VERSION,g.SALE_OPT_OUT_NOTICE,g.SHARING_OPT_OUT_NOTICE,g.SENSITIVE_DATA_LIMIT_USE_NOTICE,g.SALE_OPT_OUT,g.SHARING_OPT_OUT,g.SENSITIVE_DATA_PROCESSING,g.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,g.PERSONAL_DATA_CONSENTS,g.MSPA_COVERED_TRANSACTION,g.MSPA_OPT_OUT_OPTION_MODE,g.MSPA_SERVICE_PROVIDER_MODE],ro=[g.GPC_SEGMENT_TYPE,g.GPC];var oo=Object.defineProperty,ao=(n,e,t)=>e in n?oo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>ao(n,typeof e!="symbol"?e+"":e,t);class lo extends T{constructor(e){super(),qn(this,"base64UrlEncoder",b.getInstance()),qn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return so}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(g.VERSION.toString(),new a(6,k.VERSION)),s.put(g.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(g.SHARING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(g.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(g.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(g.SHARING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(g.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0,0]).withValidator(i)),s.put(g.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0]).withValidator(i)),s.put(g.PERSONAL_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(g.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(g.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(g.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCaCoreSegment '"+e+"'")}}}var Eo=Object.defineProperty,So=(n,e,t)=>e in n?Eo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>So(n,typeof e!="symbol"?e+"":e,t);class co extends T{constructor(e){super(),Jn(this,"base64UrlEncoder",b.getInstance()),Jn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ro}initializeFields(){let e=new O;return e.put(g.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(g.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(g.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCaGpcSegment '"+e+"'")}}}var uo=Object.defineProperty,_o=(n,e,t)=>e in n?uo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,tn=(n,e,t)=>_o(n,typeof e!="symbol"?e+"":e,t);const qe=class pt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pt.ID}getName(){return pt.NAME}getVersion(){return pt.VERSION}initializeSegments(){let e=[];return e.push(new lo),e.push(new co),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(g.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(g.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(g.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};tn(qe,"ID",8),tn(qe,"VERSION",1),tn(qe,"NAME","usca");let k=qe;var y;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(y||(y={}));const To=[y.VERSION,y.SHARING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE];var No=Object.defineProperty,Oo=(n,e,t)=>e in n?No(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Oo(n,typeof e!="symbol"?e+"":e,t);class ho extends T{constructor(e){super(),Zn(this,"base64UrlEncoder",b.getInstance()),Zn(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return To}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(y.VERSION.toString(),new a(6,W.VERSION)),s.put(y.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(y.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(y.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(y.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(y.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsVaCoreSegment '"+e+"'")}}}var go=Object.defineProperty,Io=(n,e,t)=>e in n?go(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,nn=(n,e,t)=>Io(n,typeof e!="symbol"?e+"":e,t);const Je=class At extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return At.ID}getName(){return At.NAME}getVersion(){return At.VERSION}initializeSegments(){let e=[];return e.push(new ho),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<t.length;s++)i.length>s&&t[s].decode(i[s])}return t}encodeSection(e){let t=[];for(let i=0;i<e.length;i++){let s=e[i];t.push(s.encode())}return t.join(".")}};nn(Je,"ID",9),nn(Je,"VERSION",1),nn(Je,"NAME","usva");let W=Je;var m;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(m||(m={}));const po=[m.VERSION,m.SHARING_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.MSPA_COVERED_TRANSACTION,m.MSPA_OPT_OUT_OPTION_MODE,m.MSPA_SERVICE_PROVIDER_MODE],Ao=[m.GPC_SEGMENT_TYPE,m.GPC];var Co=Object.defineProperty,Po=(n,e,t)=>e in n?Co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Po(n,typeof e!="symbol"?e+"":e,t);class Do extends T{constructor(e){super(),ei(this,"base64UrlEncoder",b.getInstance()),ei(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return po}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(m.VERSION.toString(),new a(6,Q.VERSION)),s.put(m.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(m.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(m.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(m.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(m.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(m.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0]).withValidator(i)),s.put(m.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(m.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(m.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(m.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCoCoreSegment '"+e+"'")}}}var wo=Object.defineProperty,Vo=(n,e,t)=>e in n?wo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Vo(n,typeof e!="symbol"?e+"":e,t);class Ro extends T{constructor(e){super(),ti(this,"base64UrlEncoder",b.getInstance()),ti(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Ao}initializeFields(){let e=new O;return e.put(m.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(m.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(m.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCoGpcSegment '"+e+"'")}}}var bo=Object.defineProperty,mo=(n,e,t)=>e in n?bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sn=(n,e,t)=>mo(n,typeof e!="symbol"?e+"":e,t);const Ze=class Ct extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ct.ID}getName(){return Ct.NAME}getVersion(){return Ct.VERSION}initializeSegments(){let e=[];return e.push(new Do),e.push(new Ro),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(m.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(m.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};sn(Ze,"ID",10),sn(Ze,"VERSION",1),sn(Ze,"NAME","usco");let Q=Ze;var U;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(U||(U={}));const Mo=[U.VERSION,U.SHARING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE];var fo=Object.defineProperty,Uo=(n,e,t)=>e in n?fo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>Uo(n,typeof e!="symbol"?e+"":e,t);class Go extends T{constructor(e){super(),ni(this,"base64UrlEncoder",b.getInstance()),ni(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Mo}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(U.VERSION.toString(),new a(6,X.VERSION)),s.put(U.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(U.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(U.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(U.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(U.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(U.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsUtCoreSegment '"+e+"'")}}}var vo=Object.defineProperty,yo=(n,e,t)=>e in n?vo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rn=(n,e,t)=>yo(n,typeof e!="symbol"?e+"":e,t);const et=class Pt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pt.ID}getName(){return Pt.NAME}getVersion(){return Pt.VERSION}initializeSegments(){let e=[];return e.push(new Go),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<t.length;s++)i.length>s&&t[s].decode(i[s])}return t}encodeSection(e){let t=[];for(let i=0;i<e.length;i++){let s=e[i];t.push(s.encode())}return t.join(".")}};rn(et,"ID",11),rn(et,"VERSION",1),rn(et,"NAME","usut");let X=et;var M;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const Lo=[M.VERSION,M.SHARING_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.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],Fo=[M.GPC_SEGMENT_TYPE,M.GPC];var $o=Object.defineProperty,xo=(n,e,t)=>e in n?$o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>xo(n,typeof e!="symbol"?e+"":e,t);class jo extends T{constructor(e){super(),ii(this,"base64UrlEncoder",b.getInstance()),ii(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Lo}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(M.VERSION.toString(),new a(6,q.VERSION)),s.put(M.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(M.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(M.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(M.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(M.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCtCoreSegment '"+e+"'")}}}var Ho=Object.defineProperty,Bo=(n,e,t)=>e in n?Ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>Bo(n,typeof e!="symbol"?e+"":e,t);class Ko extends T{constructor(e){super(),si(this,"base64UrlEncoder",b.getInstance()),si(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Fo}initializeFields(){let e=new O;return e.put(M.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(M.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsCtGpcSegment '"+e+"'")}}}var Yo=Object.defineProperty,zo=(n,e,t)=>e in n?Yo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,on=(n,e,t)=>zo(n,typeof e!="symbol"?e+"":e,t);const tt=class Dt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Dt.ID}getName(){return Dt.NAME}getVersion(){return Dt.VERSION}initializeSegments(){let e=[];return e.push(new jo),e.push(new Ko),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};on(tt,"ID",12),on(tt,"VERSION",1),on(tt,"NAME","usct");let q=tt;var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(G||(G={}));const ko=[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];var Wo=Object.defineProperty,Qo=(n,e,t)=>e in n?Wo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>Qo(n,typeof e!="symbol"?e+"":e,t);class Xo extends T{constructor(e){super(),ri(this,"base64UrlEncoder",b.getInstance()),ri(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ko}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(G.VERSION.toString(),new a(6,J.VERSION)),s.put(G.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(G.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(G.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(G.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(G.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsFlCoreSegment '"+e+"'")}}}var qo=Object.defineProperty,Jo=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,an=(n,e,t)=>Jo(n,typeof e!="symbol"?e+"":e,t);const nt=class wt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wt.ID}getName(){return wt.NAME}getVersion(){return wt.VERSION}initializeSegments(){let e=[];return e.push(new Xo),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");for(let s=0;s<t.length;s++)i.length>s&&t[s].decode(i[s])}return t}encodeSection(e){let t=[];for(let i=0;i<e.length;i++){let s=e[i];t.push(s.encode())}return t.join(".")}};an(nt,"ID",13),an(nt,"VERSION",1),an(nt,"NAME","usfl");let J=nt;var I;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(I||(I={}));const Zo=[I.VERSION,I.SHARING_NOTICE,I.SALE_OPT_OUT_NOTICE,I.TARGETED_ADVERTISING_OPT_OUT_NOTICE,I.SALE_OPT_OUT,I.TARGETED_ADVERTISING_OPT_OUT,I.SENSITIVE_DATA_PROCESSING,I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,I.ADDITIONAL_DATA_PROCESSING_CONSENT,I.MSPA_COVERED_TRANSACTION,I.MSPA_OPT_OUT_OPTION_MODE,I.MSPA_SERVICE_PROVIDER_MODE],ea=[I.GPC_SEGMENT_TYPE,I.GPC];var ta=Object.defineProperty,na=(n,e,t)=>e in n?ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>na(n,typeof e!="symbol"?e+"":e,t);class ia extends T{constructor(e){super(),oi(this,"base64UrlEncoder",b.getInstance()),oi(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Zo}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(I.VERSION.toString(),new a(6,Z.VERSION)),s.put(I.SHARING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(I.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(I.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(I.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(I.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(I.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(I.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(I.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(I.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(I.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(I.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsMtCoreSegment '"+e+"'")}}}var sa=Object.defineProperty,ra=(n,e,t)=>e in n?sa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>ra(n,typeof e!="symbol"?e+"":e,t);class oa extends T{constructor(e){super(),ai(this,"base64UrlEncoder",b.getInstance()),ai(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ea}initializeFields(){let e=new O;return e.put(I.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(I.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(I.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsMtGpcSegment '"+e+"'")}}}var aa=Object.defineProperty,la=(n,e,t)=>e in n?aa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ln=(n,e,t)=>la(n,typeof e!="symbol"?e+"":e,t);const it=class Vt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Vt.ID}getName(){return Vt.NAME}getVersion(){return Vt.VERSION}initializeSegments(){let e=[];return e.push(new ia),e.push(new oa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(I.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(I.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ln(it,"ID",14),ln(it,"VERSION",1),ln(it,"NAME","usmt");let Z=it;var p;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(p||(p={}));const Ea=[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],da=[p.GPC_SEGMENT_TYPE,p.GPC];var Sa=Object.defineProperty,ca=(n,e,t)=>e in n?Sa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>ca(n,typeof e!="symbol"?e+"":e,t);class ua extends T{constructor(e){super(),li(this,"base64UrlEncoder",b.getInstance()),li(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Ea}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(p.VERSION.toString(),new a(6,Ee.VERSION)),s.put(p.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(p.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(p.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(p.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(p.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(p.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(i)),s.put(p.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(p.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(p.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(p.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(p.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsOrCoreSegment '"+e+"'")}}}var _a=Object.defineProperty,Ta=(n,e,t)=>e in n?_a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>Ta(n,typeof e!="symbol"?e+"":e,t);class Na extends T{constructor(e){super(),Ei(this,"base64UrlEncoder",b.getInstance()),Ei(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return da}initializeFields(){let e=new O;return e.put(p.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(p.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(p.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsOrGpcSegment '"+e+"'")}}}var Oa=Object.defineProperty,ha=(n,e,t)=>e in n?Oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,En=(n,e,t)=>ha(n,typeof e!="symbol"?e+"":e,t);const st=class Rt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Rt.ID}getName(){return Rt.NAME}getVersion(){return Rt.VERSION}initializeSegments(){let e=[];return e.push(new ua),e.push(new Na),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(p.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(p.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(p.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};En(st,"ID",15),En(st,"VERSION",1),En(st,"NAME","usor");let Ee=st;var A;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(A||(A={}));const ga=[A.VERSION,A.PROCESSING_NOTICE,A.SALE_OPT_OUT_NOTICE,A.TARGETED_ADVERTISING_OPT_OUT_NOTICE,A.SALE_OPT_OUT,A.TARGETED_ADVERTISING_OPT_OUT,A.SENSITIVE_DATA_PROCESSING,A.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,A.ADDITIONAL_DATA_PROCESSING_CONSENT,A.MSPA_COVERED_TRANSACTION,A.MSPA_OPT_OUT_OPTION_MODE,A.MSPA_SERVICE_PROVIDER_MODE],Ia=[A.GPC_SEGMENT_TYPE,A.GPC];var pa=Object.defineProperty,Aa=(n,e,t)=>e in n?pa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>Aa(n,typeof e!="symbol"?e+"":e,t);class Ca extends T{constructor(e){super(),di(this,"base64UrlEncoder",b.getInstance()),di(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ga}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(A.VERSION.toString(),new a(6,ee.VERSION)),s.put(A.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(A.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(A.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(A.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(A.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(A.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(A.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(A.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(A.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(A.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(A.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsTxCoreSegment '"+e+"'")}}}var Pa=Object.defineProperty,Da=(n,e,t)=>e in n?Pa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>Da(n,typeof e!="symbol"?e+"":e,t);class wa extends T{constructor(e){super(),Si(this,"base64UrlEncoder",b.getInstance()),Si(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Ia}initializeFields(){let e=new O;return e.put(A.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(A.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(A.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsTxGpcSegment '"+e+"'")}}}var Va=Object.defineProperty,Ra=(n,e,t)=>e in n?Va(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,dn=(n,e,t)=>Ra(n,typeof e!="symbol"?e+"":e,t);const rt=class bt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return bt.ID}getName(){return bt.NAME}getVersion(){return bt.VERSION}initializeSegments(){let e=[];return e.push(new Ca),e.push(new wa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(A.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(A.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(A.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};dn(rt,"ID",16),dn(rt,"VERSION",1),dn(rt,"NAME","ustx");let ee=rt;var C;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(C||(C={}));const ba=[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],ma=[C.GPC_SEGMENT_TYPE,C.GPC];var Ma=Object.defineProperty,fa=(n,e,t)=>e in n?Ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>fa(n,typeof e!="symbol"?e+"":e,t);class Ua extends T{constructor(e){super(),ci(this,"base64UrlEncoder",b.getInstance()),ci(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ba}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(C.VERSION.toString(),new a(6,te.VERSION)),s.put(C.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(C.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(C.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(C.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(C.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(C.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0,0]).withValidator(i)),s.put(C.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0,0,0]).withValidator(i)),s.put(C.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(C.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(C.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(C.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsDeCoreSegment '"+e+"'")}}}var Ga=Object.defineProperty,va=(n,e,t)=>e in n?Ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>va(n,typeof e!="symbol"?e+"":e,t);class ya extends T{constructor(e){super(),ui(this,"base64UrlEncoder",b.getInstance()),ui(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ma}initializeFields(){let e=new O;return e.put(C.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(C.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(C.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsDeGpcSegment '"+e+"'")}}}var La=Object.defineProperty,Fa=(n,e,t)=>e in n?La(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sn=(n,e,t)=>Fa(n,typeof e!="symbol"?e+"":e,t);const ot=class mt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return mt.ID}getName(){return mt.NAME}getVersion(){return mt.VERSION}initializeSegments(){let e=[];return e.push(new Ua),e.push(new ya),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(C.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(C.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(C.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Sn(ot,"ID",17),Sn(ot,"VERSION",1),Sn(ot,"NAME","usde");let te=ot;var P;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(P||(P={}));const $a=[P.VERSION,P.PROCESSING_NOTICE,P.SALE_OPT_OUT_NOTICE,P.TARGETED_ADVERTISING_OPT_OUT_NOTICE,P.SENSITIVE_DATA_OPT_OUT_NOTICE,P.SALE_OPT_OUT,P.TARGETED_ADVERTISING_OPT_OUT,P.SENSITIVE_DATA_PROCESSING,P.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,P.MSPA_COVERED_TRANSACTION,P.MSPA_OPT_OUT_OPTION_MODE,P.MSPA_SERVICE_PROVIDER_MODE],xa=[P.GPC_SEGMENT_TYPE,P.GPC];var ja=Object.defineProperty,Ha=(n,e,t)=>e in n?ja(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_i=(n,e,t)=>Ha(n,typeof e!="symbol"?e+"":e,t);class Ba extends T{constructor(e){super(),_i(this,"base64UrlEncoder",b.getInstance()),_i(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return $a}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(P.VERSION.toString(),new a(6,ne.VERSION)),s.put(P.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(P.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(P.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(P.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(P.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(P.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(P.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(P.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(P.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(P.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(P.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsIaCoreSegment '"+e+"'")}}}var Ka=Object.defineProperty,Ya=(n,e,t)=>e in n?Ka(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ti=(n,e,t)=>Ya(n,typeof e!="symbol"?e+"":e,t);class za extends T{constructor(e){super(),Ti(this,"base64UrlEncoder",b.getInstance()),Ti(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return xa}initializeFields(){let e=new O;return e.put(P.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(P.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(P.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsIaGpcSegment '"+e+"'")}}}var ka=Object.defineProperty,Wa=(n,e,t)=>e in n?ka(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,cn=(n,e,t)=>Wa(n,typeof e!="symbol"?e+"":e,t);const at=class Mt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Mt.ID}getName(){return Mt.NAME}getVersion(){return Mt.VERSION}initializeSegments(){let e=[];return e.push(new Ba),e.push(new za),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(P.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(P.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(P.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};cn(at,"ID",18),cn(at,"VERSION",1),cn(at,"NAME","usia");let ne=at;var D;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(D||(D={}));const Qa=[D.VERSION,D.PROCESSING_NOTICE,D.SALE_OPT_OUT_NOTICE,D.TARGETED_ADVERTISING_OPT_OUT_NOTICE,D.SALE_OPT_OUT,D.TARGETED_ADVERTISING_OPT_OUT,D.SENSITIVE_DATA_PROCESSING,D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,D.ADDITIONAL_DATA_PROCESSING_CONSENT,D.MSPA_COVERED_TRANSACTION,D.MSPA_OPT_OUT_OPTION_MODE,D.MSPA_SERVICE_PROVIDER_MODE],Xa=[D.GPC_SEGMENT_TYPE,D.GPC];var qa=Object.defineProperty,Ja=(n,e,t)=>e in n?qa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Ja(n,typeof e!="symbol"?e+"":e,t);class Za extends T{constructor(e){super(),Ni(this,"base64UrlEncoder",b.getInstance()),Ni(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Qa}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(D.VERSION.toString(),new a(6,ie.VERSION)),s.put(D.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(D.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(D.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(D.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(D.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(D.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(D.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(D.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(D.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(D.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNeCoreSegment '"+e+"'")}}}var el=Object.defineProperty,tl=(n,e,t)=>e in n?el(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Oi=(n,e,t)=>tl(n,typeof e!="symbol"?e+"":e,t);class nl extends T{constructor(e){super(),Oi(this,"base64UrlEncoder",b.getInstance()),Oi(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Xa}initializeFields(){let e=new O;return e.put(D.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(D.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(D.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNeGpcSegment '"+e+"'")}}}var il=Object.defineProperty,sl=(n,e,t)=>e in n?il(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,un=(n,e,t)=>sl(n,typeof e!="symbol"?e+"":e,t);const lt=class ft extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ft.ID}getName(){return ft.NAME}getVersion(){return ft.VERSION}initializeSegments(){let e=[];return e.push(new Za),e.push(new nl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(D.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};un(lt,"ID",19),un(lt,"VERSION",1),un(lt,"NAME","usne");let ie=lt;var w;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(w||(w={}));const rl=[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],ol=[w.GPC_SEGMENT_TYPE,w.GPC];var al=Object.defineProperty,ll=(n,e,t)=>e in n?al(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,hi=(n,e,t)=>ll(n,typeof e!="symbol"?e+"":e,t);class El extends T{constructor(e){super(),hi(this,"base64UrlEncoder",b.getInstance()),hi(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return rl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(w.VERSION.toString(),new a(6,se.VERSION)),s.put(w.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(w.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(w.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(w.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(w.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(w.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(w.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0]).withValidator(i)),s.put(w.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(w.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(w.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(w.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNhCoreSegment '"+e+"'")}}}var dl=Object.defineProperty,Sl=(n,e,t)=>e in n?dl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,gi=(n,e,t)=>Sl(n,typeof e!="symbol"?e+"":e,t);class cl extends T{constructor(e){super(),gi(this,"base64UrlEncoder",b.getInstance()),gi(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return ol}initializeFields(){let e=new O;return e.put(w.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(w.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(w.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNhGpcSegment '"+e+"'")}}}var ul=Object.defineProperty,_l=(n,e,t)=>e in n?ul(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_n=(n,e,t)=>_l(n,typeof e!="symbol"?e+"":e,t);const Et=class Ut extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ut.ID}getName(){return Ut.NAME}getVersion(){return Ut.VERSION}initializeSegments(){let e=[];return e.push(new El),e.push(new cl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(w.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(w.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(w.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};_n(Et,"ID",20),_n(Et,"VERSION",1),_n(Et,"NAME","usnh");let se=Et;var V;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const Tl=[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],Nl=[V.GPC_SEGMENT_TYPE,V.GPC];var Ol=Object.defineProperty,hl=(n,e,t)=>e in n?Ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ii=(n,e,t)=>hl(n,typeof e!="symbol"?e+"":e,t);class gl extends T{constructor(e){super(),Ii(this,"base64UrlEncoder",b.getInstance()),Ii(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Tl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(V.VERSION.toString(),new a(6,re.VERSION)),s.put(V.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(V.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(V.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(V.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(i)),s.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new v(2,[0,0,0,0,0]).withValidator(i)),s.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(V.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNjCoreSegment '"+e+"'")}}}var Il=Object.defineProperty,pl=(n,e,t)=>e in n?Il(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>pl(n,typeof e!="symbol"?e+"":e,t);class Al extends T{constructor(e){super(),pi(this,"base64UrlEncoder",b.getInstance()),pi(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Nl}initializeFields(){let e=new O;return e.put(V.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(V.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsNjGpcSegment '"+e+"'")}}}var Cl=Object.defineProperty,Pl=(n,e,t)=>e in n?Cl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tn=(n,e,t)=>Pl(n,typeof e!="symbol"?e+"":e,t);const dt=class Gt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Gt.ID}getName(){return Gt.NAME}getVersion(){return Gt.VERSION}initializeSegments(){let e=[];return e.push(new gl),e.push(new Al),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Tn(dt,"ID",21),Tn(dt,"VERSION",1),Tn(dt,"NAME","usnj");let re=dt;var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const Dl=[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],wl=[R.GPC_SEGMENT_TYPE,R.GPC];var Vl=Object.defineProperty,Rl=(n,e,t)=>e in n?Vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ai=(n,e,t)=>Rl(n,typeof e!="symbol"?e+"":e,t);class bl extends T{constructor(e){super(),Ai(this,"base64UrlEncoder",b.getInstance()),Ai(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return Dl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},i=new class{test(r){for(let o=0;o<r.length;o++){let l=r[o];if(l<0||l>2)return!1}return!0}};let s=new O;return s.put(R.VERSION.toString(),new a(6,oe.VERSION)),s.put(R.PROCESSING_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(R.SALE_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new a(2,0).withValidator(e)),s.put(R.SALE_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new a(2,0).withValidator(e)),s.put(R.SENSITIVE_DATA_PROCESSING.toString(),new v(2,[0,0,0,0,0,0,0,0]).withValidator(i)),s.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new a(2,0).withValidator(e)),s.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new a(2,0).withValidator(e)),s.put(R.MSPA_COVERED_TRANSACTION.toString(),new a(2,1).withValidator(t)),s.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new a(2,0).withValidator(e)),s.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new a(2,0).withValidator(e)),s}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsTnCoreSegment '"+e+"'")}}}var ml=Object.defineProperty,Ml=(n,e,t)=>e in n?ml(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ci=(n,e,t)=>Ml(n,typeof e!="symbol"?e+"":e,t);class fl extends T{constructor(e){super(),Ci(this,"base64UrlEncoder",b.getInstance()),Ci(this,"bitStringEncoder",N.getInstance()),e&&this.decode(e)}getFieldNames(){return wl}initializeFields(){let e=new O;return e.put(R.GPC_SEGMENT_TYPE.toString(),new a(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new f(!0)),e.put(R.GPC.toString(),new f(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let i=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(i,this.getFieldNames(),t)}catch{throw new d("Unable to decode UsTnGpcSegment '"+e+"'")}}}var Ul=Object.defineProperty,Gl=(n,e,t)=>e in n?Ul(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nn=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);const St=class vt extends j{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return vt.ID}getName(){return vt.NAME}getVersion(){return vt.VERSION}initializeSegments(){let e=[];return e.push(new bl),e.push(new fl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let i=e.split(".");i.length>0&&t[0].decode(i[0]),i.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(i[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Nn(St,"ID",22),Nn(St,"VERSION",1),Nn(St,"NAME","ustn");let oe=St;var vl=Object.defineProperty,yl=(n,e,t)=>e in n?vl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Pi=(n,e,t)=>yl(n,typeof e!="symbol"?e+"":e,t);class F{}Pi(F,"SECTION_ID_NAME_MAP",new Map([[$.ID,$.NAME],[ae.ID,ae.NAME],[le.ID,le.NAME],[z.ID,z.NAME],[k.ID,k.NAME],[W.ID,W.NAME],[Q.ID,Q.NAME],[X.ID,X.NAME],[q.ID,q.NAME],[J.ID,J.NAME],[Z.ID,Z.NAME],[Ee.ID,Ee.NAME],[ee.ID,ee.NAME],[te.ID,te.NAME],[ne.ID,ne.NAME],[ie.ID,ie.NAME],[se.ID,se.NAME],[re.ID,re.NAME],[oe.ID,oe.NAME]])),Pi(F,"SECTION_ORDER",[$.NAME,ae.NAME,le.NAME,z.NAME,k.NAME,W.NAME,Q.NAME,X.NAME,q.NAME,J.NAME,Z.NAME,Ee.NAME,ee.NAME,te.NAME,ne.NAME,ie.NAME,se.NAME,re.NAME,oe.NAME]);var Ll=Object.defineProperty,Fl=(n,e,t)=>e in n?Ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ct=(n,e,t)=>Fl(n,typeof e!="symbol"?e+"":e,t);class Di{constructor(e){ct(this,"sections",new Map),ct(this,"encodedString",null),ct(this,"decoded",!0),ct(this,"dirty",!1),e&&this.decode(e)}setFieldValue(e,t,i){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;if(this.sections.has(e)?s=this.sections.get(e):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===$.NAME?(s=new $,this.sections.set($.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===z.NAME?(s=new z,this.sections.set(z.NAME,s)):e===k.NAME?(s=new k,this.sections.set(k.NAME,s)):e===W.NAME?(s=new W,this.sections.set(W.NAME,s)):e===Q.NAME?(s=new Q,this.sections.set(Q.NAME,s)):e===X.NAME?(s=new X,this.sections.set(X.NAME,s)):e===q.NAME?(s=new q,this.sections.set(q.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===Z.NAME?(s=new Z,this.sections.set(Z.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ee.NAME?(s=new ee,this.sections.set(ee.NAME,s)):e===te.NAME?(s=new te,this.sections.set(te.NAME,s)):e===ne.NAME?(s=new ne,this.sections.set(ne.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===se.NAME?(s=new se,this.sections.set(se.NAME,s)):e===re.NAME?(s=new re,this.sections.set(re.NAME,s)):e===oe.NAME&&(s=new oe,this.sections.set(oe.NAME,s)),s)s.setFieldValue(t,i),this.dirty=!0,s.setIsDirty(!0);else throw new Ge(e+"."+t+" not found")}setFieldValueBySectionId(e,t,i){this.setFieldValue(F.SECTION_ID_NAME_MAP.get(e),t,i)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(F.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(F.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(F.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(F.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new Ce;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<F.SECTION_ORDER.length;t++){let i=F.SECTION_ORDER[t];if(this.sections.has(i)){let s=this.sections.get(i);e.push(s.getId())}}return e}encodeModel(e){let t=[],i=[];for(let r=0;r<F.SECTION_ORDER.length;r++){let o=F.SECTION_ORDER[r];if(e.has(o)){let l=e.get(o);t.push(l.encode()),i.push(l.getId())}}let s=new Ce;return s.setFieldValue("SectionIds",i),t.unshift(s.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),i=new Map;if(t[0].startsWith("D")){let s=new Ce(t[0]).getFieldValue("SectionIds");if(s.length!==t.length-1)throw new d("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<s.length;r++){if(t[r+1].trim()==="")throw new d("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(s[r]===ae.ID){let o=new ae(t[r+1]);i.set(ae.NAME,o)}else if(s[r]===$.ID){let o=new $(t[r+1]);i.set($.NAME,o)}else if(s[r]===le.ID){let o=new le(t[r+1]);i.set(le.NAME,o)}else if(s[r]===z.ID){let o=new z(t[r+1]);i.set(z.NAME,o)}else if(s[r]===k.ID){let o=new k(t[r+1]);i.set(k.NAME,o)}else if(s[r]===W.ID){let o=new W(t[r+1]);i.set(W.NAME,o)}else if(s[r]===Q.ID){let o=new Q(t[r+1]);i.set(Q.NAME,o)}else if(s[r]===X.ID){let o=new X(t[r+1]);i.set(X.NAME,o)}else if(s[r]===q.ID){let o=new q(t[r+1]);i.set(q.NAME,o)}else if(s[r]===J.ID){let o=new J(t[r+1]);i.set(J.NAME,o)}else if(s[r]===Z.ID){let o=new Z(t[r+1]);i.set(Z.NAME,o)}else if(s[r]===Ee.ID){let o=new Ee(t[r+1]);i.set(Ee.NAME,o)}else if(s[r]===ee.ID){let o=new ee(t[r+1]);i.set(ee.NAME,o)}else if(s[r]===te.ID){let o=new te(t[r+1]);i.set(te.NAME,o)}else if(s[r]===ne.ID){let o=new ne(t[r+1]);i.set(ne.NAME,o)}else if(s[r]===ie.ID){let o=new ie(t[r+1]);i.set(ie.NAME,o)}else if(s[r]===se.ID){let o=new se(t[r+1]);i.set(se.NAME,o)}else if(s[r]===re.ID){let o=new re(t[r+1]);i.set(re.NAME,o)}else if(s[r]===oe.ID){let o=new oe(t[r+1]);i.set(oe.NAME,o)}}}return i}else if(e.startsWith("C")){let t=new Map,i=new $(e);return t.set($.NAME,i),new Ce().setFieldValue(ge.SECTION_IDS,[2]),t.set(Ce.NAME,i),t}else throw new d("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(F.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;this.sections.has(e)?i=this.sections.get(e):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===$.NAME?(i=new $,this.sections.set($.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===z.NAME?(i=new z,this.sections.set(z.NAME,i)):e===k.NAME?(i=new k,this.sections.set(k.NAME,i)):e===W.NAME?(i=new W,this.sections.set(W.NAME,i)):e===Q.NAME?(i=new Q,this.sections.set(Q.NAME,i)):e===X.NAME?(i=new X,this.sections.set(X.NAME,i)):e===q.NAME?(i=new q,this.sections.set(q.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===Z.NAME?(i=new Z,this.sections.set(Z.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ee.NAME?(i=new ee,this.sections.set(ee.NAME,i)):e===te.NAME?(i=new te,this.sections.set(te.NAME,i)):e===ne.NAME?(i=new ne,this.sections.set(ne.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===se.NAME?(i=new se,this.sections.set(se.NAME,i)):e===re.NAME?(i=new re,this.sections.set(re.NAME,i)):e===oe.NAME&&(i=new oe,this.sections.set(oe.NAME,i)),i&&(i.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(F.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<F.SECTION_ORDER.length;t++){let i=F.SECTION_ORDER[t];this.sections.has(i)&&(e[i]=this.sections.get(i).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var $l=Object.defineProperty,xl=(n,e,t)=>e in n?$l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ce=(n,e,t)=>xl(n,typeof e!="symbol"?e+"":e,t);class jl{constructor(){ce(this,"gppVersion","1.1"),ce(this,"supportedAPIs",[]),ce(this,"eventQueue",new Es(this)),ce(this,"cmpStatus",Re.LOADING),ce(this,"cmpDisplayStatus",pe.HIDDEN),ce(this,"signalStatus",Ne.NOT_READY),ce(this,"applicableSections",[]),ce(this,"gppModel",new Di),ce(this,"cmpId"),ce(this,"cmpVersion"),ce(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=Re.LOADING,this.cmpDisplayStatus=pe.HIDDEN,this.signalStatus=Ne.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Di,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class On{static absCall(e,t,i,s){return new Promise((r,o)=>{const l=new XMLHttpRequest,E=()=>{if(l.readyState==XMLHttpRequest.DONE)if(l.status>=200&&l.status<300){let ue=l.response;if(typeof ue=="string")try{ue=JSON.parse(ue)}catch{}r(ue)}else o(new Error(`HTTP Status: ${l.status} response type: ${l.responseType}`))},u=()=>{o(new Error("error"))},x=()=>{o(new Error("aborted"))},B=()=>{o(new Error("Timeout "+s+"ms "+e))};l.withCredentials=i,l.addEventListener("load",E),l.addEventListener("error",u),l.addEventListener("abort",x),t===null?l.open("GET",e,!0):l.open("POST",e,!0),l.responseType="json",l.timeout=s,l.ontimeout=B,l.send(t)})}static post(e,t,i=!1,s=0){return this.absCall(e,JSON.stringify(t),i,s)}static fetch(e,t=!1,i=0){return this.absCall(e,null,t,i)}}class ut extends Error{constructor(e){super(e),this.name="GVLError"}}var Hl=Object.defineProperty,Bl=(n,e,t)=>e in n?Hl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kl=(n,e,t)=>Bl(n,typeof e!="symbol"?e+"":e,t);const wi=class yt{has(e){return yt.langSet.has(e)}forEach(e){yt.langSet.forEach(e)}get size(){return yt.langSet.size}};Kl(wi,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let Yl=wi;var zl=Object.defineProperty,kl=(n,e,t)=>e in n?zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,L=(n,e,t)=>kl(n,typeof e!="symbol"?e+"":e,t),Vi=(n,e,t)=>new Promise((i,s)=>{var r=E=>{try{l(t.next(E))}catch(u){s(u)}},o=E=>{try{l(t.throw(E))}catch(u){s(u)}},l=E=>E.done?i(E.value):Promise.resolve(E.value).then(r,o);l((t=t.apply(n,e)).next())});const Ri=class Lt{constructor(){L(this,"vendors"),L(this,"consentLanguages",new Yl),L(this,"gvlSpecificationVersion"),L(this,"vendorListVersion"),L(this,"tcfPolicyVersion"),L(this,"lastUpdated"),L(this,"purposes"),L(this,"specialPurposes"),L(this,"features"),L(this,"specialFeatures"),L(this,"stacks"),L(this,"dataCategories"),L(this,"language",Lt.DEFAULT_LANGUAGE),L(this,"vendorIds"),L(this,"ready",!1),L(this,"fullVendorList"),L(this,"byPurposeVendorMap"),L(this,"bySpecialPurposeVendorMap"),L(this,"byFeatureVendorMap"),L(this,"bySpecialFeatureVendorMap"),L(this,"baseUrl"),L(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new Lt;return t.populate(e),t}static fromUrl(e){return Vi(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new ut("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new ut("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let i=new Lt;if(i.baseUrl=t,e.languageFilename?i.languageFilename=e.languageFilename:i.languageFilename="purposes-[LANG].json",e.version>0){let s=e.versionedFilename;s||(s="archives/vendor-list-v[VERSION].json");let r=t+s.replace("[VERSION]",String(e.version));i.populate(yield On.fetch(r))}else{let s=e.latestFilename;s||(s="vendor-list.json");let r=t+s;i.populate(yield On.fetch(r))}return i})}changeLanguage(e){return Vi(this,null,function*(){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const i=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(yield On.fetch(i))}catch(s){throw new ut("unable to load language: "+s.message)}}}else throw new ut(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,i)=>{const s=this.vendors[String(i)];return s&&s.deletedDate===void 0&&(s.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(i)}),s.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(i)}),s.legIntPurposes&&s.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(i)}),s.impConsPurposes&&s.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(i)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(i)}),s.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(i)}),s.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(i)}),t[i]=s),t},{})}getFilteredVendors(e,t,i,s){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const l={};return e==="purpose"&&i?o=this["by"+r+"VendorMap"][String(t)][i]:o=this["by"+(s?"Special":"")+r+"VendorMap"][String(t)],o.forEach(E=>{l[String(E)]=this.vendors[String(E)]}),l}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};L(Ri,"DEFAULT_LANGUAGE","EN");let bi=Ri;var Wl=Object.defineProperty,Ql=(n,e,t)=>e in n?Wl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mi=(n,e,t)=>Ql(n,typeof e!="symbol"?e+"":e,t),Xl=(n,e,t)=>new Promise((i,s)=>{var r=E=>{try{l(t.next(E))}catch(u){s(u)}},o=E=>{try{l(t.throw(E))}catch(u){s(u)}},l=E=>E.done?i(E.value):Promise.resolve(E.value).then(r,o);l((t=t.apply(n,e)).next())});class ql{constructor(e,t,i){mi(this,"callResponder"),mi(this,"cmpApiContext"),this.cmpApiContext=new jl,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new os(this.cmpApiContext,i)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(F.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(F.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,i){this.cmpApiContext.gppModel.setFieldValue(e,t,i)}setFieldValueBySectionId(e,t,i){this.setFieldValue(F.SECTION_ID_NAME_MAP.get(e),t,i)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(F.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(F.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(F.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(F.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return bi.fromVendorList(e)}getGvlFromUrl(e){return Xl(this,null,function*(){return bi.fromUrl(e)})}}var Mi;(n=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Mi||(Mi={}));var Jl=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(Jl||{}),Zl=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Zl||{}),eE=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(eE||{}),fi=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.TCF="tcf",n))(fi||{}),_t=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(_t||{}),tE=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(tE||{}),nE=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(nE||{}),iE=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(iE||{}),sE=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n))(sE||{}),rE=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n))(rE||{}),oE=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(oE||{}),aE=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(aE||{}),lE=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(lE||{});const EE=(n,e)=>!!Object.keys(e).includes(n.notice_key),ye=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,Ui=n=>!!(n&&n.every(e=>e.default_preference===fi.OPT_IN)),dE=(n,e,t)=>{var i,s,r,o,l,E;return((i=n.experience_config)==null?void 0:i.component)===_t.TCF_OVERLAY?(s=n.meta)!=null&&s.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((r=n.experience_config)==null?void 0:r.component)===_t.MODAL||((o=n.experience_config)==null?void 0:o.component)===_t.HEADLESS||!((l=n?.privacy_notices)!=null&&l.length)?!1:t?!((E=n.privacy_notices)!=null&&E.every(u=>EE(u,t))):!0},Gi="__gppLocator",vi=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>vi(n),5)},SE=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},cE=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,uE=()=>{const n=[],e=[];let t;const i=(r,o,l,E)=>{if(r==="queue")return n;if(r==="events")return e;const u={gppVersion:"1.1",cmpStatus:Re.STUB,cmpDisplayStatus:pe.HIDDEN,signalStatus:Ne.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(u,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const x=t;e.push({id:x,callback:o,parameter:l}),o({eventName:"listenerRegistered",listenerId:x,data:!0,pingData:u},!0)}else if(r==="removeEventListener"){let x=!1;for(let B=0;B<e.length;B++)if(e[B].id===l){e.splice(B,1),x=!0;break}o({eventName:"listenerRemoved",listenerId:l,data:x,pingData:u},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,l,E]));return null},s=r=>{const o=typeof r.data=="string";let l={};if(o)try{l=JSON.parse(r.data)}catch{l={}}else l=r.data;if(!cE(l))return null;if(l.__gppCall&&window.__gpp){const E=l.__gppCall;window.__gpp(E.command,(u,x)=>{const B={__gppReturn:{returnValue:u,success:x,callId:E.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(B):B,"*")},"parameter"in E?E.parameter:void 0,"version"in E?E.version:"1.1")}return null};SE(Gi)||(vi(Gi),window.__gpp=i,window.addEventListener("message",s,!1))};var he=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(he||{});const Tt={us:{name:z.NAME,id:z.ID,prefix:"usnat"},us_ca:{name:k.NAME,id:k.ID,prefix:"usca"},us_ct:{name:q.NAME,id:q.ID,prefix:"usct"},us_co:{name:Q.NAME,id:Q.ID,prefix:"usco"},us_ut:{name:X.NAME,id:X.ID,prefix:"usut"},us_va:{name:W.NAME,id:W.ID,prefix:"usva"},us_de:{name:te.NAME,id:te.ID,prefix:"usde"},us_fl:{name:J.NAME,id:J.ID,prefix:"usfl"},us_ia:{name:ne.NAME,id:ne.ID,prefix:"usia"},us_mt:{name:Z.NAME,id:Z.ID,prefix:"usmt"},us_ne:{name:ie.NAME,id:ie.ID,prefix:"usne"},us_nh:{name:se.NAME,id:se.ID,prefix:"usnh"},us_nj:{name:re.NAME,id:re.ID,prefix:"usnj"},us_tn:{name:oe.NAME,id:oe.ID,prefix:"ustn"},us_tx:{name:ee.NAME,id:ee.ID,prefix:"ustx"}},Le="us",yi=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:_.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_opt_out_option_mode,cmpApiField:_.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_service_provider_mode,cmpApiField:_.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:i,cmpApiField:s})=>{n.setFieldValue(e,s,i?1:2)})},_E=n=>n?.toLowerCase().startsWith("us"),Li=({experienceRegion:n,usApproach:e})=>_E(n)&&e===he.NATIONAL?Le:n,Fi=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:i=[],region:s,gpp_settings:r}=e,o=r?.us_approach;let l=Li({experienceRegion:s,usApproach:o}),E=Tt[l];return!E&&o===he.ALL&&(l=Le,E=Tt[l]),!E||l===Le&&o===he.STATE?[]:(t.add(E),i.forEach(u=>{var x;const{gpp_field_mapping:B}=u,ue=(x=B?.find(Ae=>Ae.region===l))==null?void 0:x.notice;ue&&ue.forEach(Ae=>{n.setFieldValue(E.name,Ae,1)})}),yi({cmpApi:n,sectionName:E.name,gppSettings:r}),Array.from(t))},$i=({cmpApi:n,cookie:e,experience:t})=>{const i=new Set,{privacy_notices:s=[],region:r,gpp_settings:o}=t,l=o?.us_approach;let E=Li({experienceRegion:r,usApproach:l}),u=Tt[E];if(!u&&l===he.ALL&&(E=Le,u=Tt[E]),!u||E===Le&&l===he.STATE)return[];i.add(u);const{consent:x}=e;return Object.keys(x).forEach(B=>{var ue;const Ae=s?.find(Fe=>Fe.notice_key===B),In=x[B];if(Ae){const{gpp_field_mapping:Fe}=Ae,pn=(ue=Fe?.find(De=>De.region===E))==null?void 0:ue.mechanism;pn&&pn.forEach(De=>{let Ue=De.not_available;In===!1?Ue=De.opt_out:In&&(Ue=De.not_opt_out);let An=+Ue;Ue.length>1&&(An=Ue.split("").map(Bi=>+Bi)),n.setFieldValue(u.name,De.field,An)})}}),yi({cmpApi:n,sectionName:u.name,gppSettings:o}),Array.from(i)};var TE=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(TE||{}),hn=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(hn||{});const xi=407,NE=",",OE=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}];OE.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),hn.CONSENT.toString(),hn.LEGITIMATE_INTERESTS.toString();const hE=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(NE);return t.split(".")[0]}return e??""},gE=1,ji=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([i,s])=>i in t.map(r=>r.notice_key)&&s!==void 0)):!1,Hi=(n,e)=>{if(!ye(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const i=hE(n);return i?(e.setFieldValueBySectionId($.ID,"CmpId",xi),e.setSectionStringById($.ID,i),!0):!1},IE=()=>{const n=[];if(ye(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${$.ID}:${$.NAME}`),(e.us_approach===he.NATIONAL||e.us_approach===he.ALL)&&n.push(`${z.ID}:${z.NAME}`),(e.us_approach===he.STATE||e.us_approach===he.ALL)&&[k,Q,q,X,W,te,J,ne,Z,ie,se,re,oe,ee].forEach(t=>{n.push(`${t.ID}:${t.NAME}`)}))}return n},pE=()=>{uE();const n=new ql(xi,gE);n.setCmpStatus(Re.LOADED),window.addEventListener("FidesInitialized",e=>{const{experience:t,saved_consent:i,options:s,geolocation:r}=window.Fides,o=s.tcfEnabled;if(n.setSupportedAPIs(IE()),ye(t)&&(!dE(t,e.detail,i)||!o&&Ui(t.privacy_notices)&&!ji(i,e.detail.fides_string,t.privacy_notices))){const l=Hi(e,n);l&&n.setApplicableSections([$.ID]);const E=Fi({cmpApi:n,experience:t}),u=$i({cmpApi:n,cookie:e.detail,experience:t});u.length&&n.setApplicableSections(u.map(x=>x.id)),!l&&!E.length&&!u.length&&n.setApplicableSections([-1]),n.setSignalStatus(Ne.READY)}}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:i,options:s}=window.Fides,r=s.tcfEnabled;if(ye(t)){!r&&Ui(t.privacy_notices)&&!ji(i,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(Ne.READY):n.setSignalStatus(Ne.NOT_READY),n.setCmpDisplayStatus(pe.VISIBLE);const o=Fi({cmpApi:n,experience:t});o.length&&(n.setApplicableSections(o.map(l=>l.id)),o.forEach(l=>{n.fireSectionChange(l.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(pe.HIDDEN),n.setSignalStatus(Ne.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(pe.HIDDEN),Hi(e,n)&&(n.setApplicableSections([$.ID]),n.fireSectionChange("tcfeuv2")),ye(window.Fides.experience)){const t=$i({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}))}n.setSignalStatus(Ne.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&pE()});
1
+ var _r=Object.defineProperty,gr=(n,e,t)=>e in n?_r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tt=(n,e,t)=>gr(n,typeof e!="symbol"?e+"":e,t);class fn{constructor(e,t,s,i){Tt(this,"eventName"),Tt(this,"listenerId"),Tt(this,"data"),Tt(this,"pingData"),this.eventName=e,this.listenerId=t,this.data=s,this.pingData=i}}var Tr=Object.defineProperty,Or=(n,e,t)=>e in n?Tr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Re=(n,e,t)=>Or(n,typeof e!="symbol"?e+"":e,t);class Ot{constructor(e){Re(this,"gppVersion"),Re(this,"cmpStatus"),Re(this,"cmpDisplayStatus"),Re(this,"signalStatus"),Re(this,"supportedAPIs"),Re(this,"cmpId"),Re(this,"sectionList"),Re(this,"applicableSections"),Re(this,"gppString"),Re(this,"parsedSections"),this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}var Nr=Object.defineProperty,Ir=(n,e,t)=>e in n?Nr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Nt=(n,e,t)=>Ir(n,typeof e!="symbol"?e+"":e,t);let nt=class{constructor(e,t,s){Nt(this,"callback"),Nt(this,"parameter"),Nt(this,"success",!0),Nt(this,"cmpApiContext"),this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:s})}execute(){try{return this.respond()}catch{return this.invokeCallback(null),null}}invokeCallback(e){const t=e!==null;this.callback&&this.callback(e,t)}},Ar=class extends nt{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new fn("listenerRegistered",e,!0,new Ot(this.cmpApiContext));this.invokeCallback(t)}},Cr=class extends nt{respond(){let e=new Ot(this.cmpApiContext);this.invokeCallback(e)}};class Pr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],s=e[1],i=this.cmpApiContext.gppModel.getFieldValue(t,s);this.invokeCallback(i)}}class mr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section> parameter required");let e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class fr extends nt{respond(){if(!this.parameter||this.parameter.length===0)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var Me;(function(n){n.ADD_EVENT_LISTENER="addEventListener",n.GET_FIELD="getField",n.GET_SECTION="getSection",n.HAS_SECTION="hasSection",n.PING="ping",n.REMOVE_EVENT_LISTENER="removeEventListener"})(Me||(Me={}));let wr=class extends nt{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),s=new fn("listenerRemoved",e,t,new Ot(this.cmpApiContext));this.invokeCallback(s)}};var Dr=Object.defineProperty,br=(n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,st=(n,e,t)=>br(n,typeof e!="symbol"?e+"":e,t),Ss,ps,hs,_s,gs,Ts;Ts=Me.ADD_EVENT_LISTENER,gs=Me.GET_FIELD,_s=Me.GET_SECTION,hs=Me.HAS_SECTION,ps=Me.PING,Ss=Me.REMOVE_EVENT_LISTENER;let He=class{};st(He,Ts,Ar),st(He,gs,Pr),st(He,_s,mr),st(He,hs,fr),st(He,ps,Cr),st(He,Ss,wr);var it;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(it||(it={}));var ke;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(ke||(ke={}));var Os;(function(n){n.GPP_LOADED="gpploaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Os||(Os={}));var be;(function(n){n.NOT_READY="not ready",n.READY="ready"})(be||(be={}));var Vr=Object.defineProperty,vr=(n,e,t)=>e in n?Vr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,wn=(n,e,t)=>vr(n,typeof e!="symbol"?e+"":e,t);class Rr{constructor(e,t){if(wn(this,"callQueue"),wn(this,"customCommands"),wn(this,"cmpApiContext"),this.cmpApiContext=e,t){let s=Me.ADD_EVENT_LISTENER;if(t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);if(s=Me.REMOVE_EVENT_LISTENER,t!=null&&t[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch{this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,s,i){if(typeof e!="string")t(null,!1);else{if(t&&typeof t!="function")throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,s):this.isBuiltInCommand(e)?new He[e](this.cmpApiContext,t,s).execute():t&&t(null,!1)}}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(t=>{window.__gpp(...t)})}isCustomCommand(e){return this.customCommands&&typeof this.customCommands[e]=="function"}isBuiltInCommand(e){return He[e]!==void 0}}var Mr=Object.defineProperty,yr=(n,e,t)=>e in n?Mr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Dn=(n,e,t)=>yr(n,typeof e!="symbol"?e+"":e,t);let Ur=class{constructor(e){Dn(this,"eventQueue",new Map),Dn(this,"queueNumber",1e3),Dn(this,"cmpApiContext"),this.cmpApiContext=e;try{let s=window.__gpp("events")||[];for(var t=0;t<s.length;t++){let i=s[t];this.eventQueue.set(i.id,{callback:i.callback,parameter:i.parameter})}}catch(s){console.log(s)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((s,i)=>{let r=new fn(e,i,t,new Ot(this.cmpApiContext));s.callback(r,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}},lt=class extends Error{constructor(e){super(e),this.name="InvalidFieldError"}};var Lr=Object.defineProperty,Gr=(n,e,t)=>e in n?Lr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,It=(n,e,t)=>Gr(n,typeof e!="symbol"?e+"":e,t);class ee{constructor(){It(this,"segments"),It(this,"encodedString",null),It(this,"dirty",!1),It(this,"decoded",!0),this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.getFieldNames().includes(e))return s.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let s=this.segments[t];if(s.hasField(e))return s.getFieldValue(e)}throw new lt("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let s=0;s<this.segments.length;s++){let i=this.segments[s];if(i.hasField(e)){i.setFieldValue(e,t);return}}throw new lt("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let s=this.segments[t].toObj();for(const[i,r]of Object.entries(s))e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}let p=class extends Error{constructor(e){super(e),this.name="DecodingError"}},ne=class extends Error{constructor(e){super(e),this.name="EncodingError"}};class w{static encode(e,t){let s=[];if(e>=1)for(s.push(1);e>=s[0]*2;)s.unshift(s[0]*2);let i="";for(let r=0;r<s.length;r++){let o=s[r];e>=o?(i+="1",e-=o):i+="0"}if(i.length>t)throw new ne("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length;i++)i===0?s[e.length-(i+1)]=1:s[e.length-(i+1)]=s[e.length-i]*2;for(let i=0;i<e.length;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}var Fr=Object.defineProperty,xr=(n,e,t)=>e in n?Fr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ns=(n,e,t)=>xr(n,typeof e!="symbol"?e+"":e,t);const bn=class us{encode(e){if(!/^[0-1]*$/.test(e))throw new ne("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",s=0;for(;s<=e.length-6;){let i=e.substring(s,s+6);try{let r=w.decode(i),o=us.DICT.charAt(r);t+=o,s+=6}catch{throw new ne("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new p("Undecodable Base64URL string '"+e+"'");let t="";for(let s=0;s<e.length;s++){let i=e.charAt(s),r=us.REVERSE_DICT.get(i),o=w.encode(r,6);t+=o}return t}};Ns(bn,"DICT","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Ns(bn,"REVERSE_DICT",new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]));let Is=bn;var $r=Object.defineProperty,jr=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hr=(n,e,t)=>jr(n,typeof e!="symbol"?e+"":e,t);const Vn=class extends Is{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}};Hr(Vn,"instance",new Vn);let F=Vn;var kr=Object.defineProperty,Br=(n,e,t)=>e in n?kr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kr=(n,e,t)=>Br(n,typeof e!="symbol"?e+"":e,t);const vn=class{constructor(){}static getInstance(){return this.instance}encode(e,t){let s="";for(let i=0;i<t.length;i++){let r=t[i];if(e.containsKey(r)){let o=e.get(r);s+=o.encode()}else throw new Error("Field not found: '"+r+"'")}return s}decode(e,t,s){let i=0;for(let r=0;r<t.length;r++){let o=t[r];if(s.containsKey(o)){let a=s.get(o);try{let l=a.substring(e,i);a.decode(l),i+=l.length}catch(l){if(l.name==="SubstringError"&&!a.getHardFailIfMissing())return;throw new p("Unable to decode field '"+o+"'")}}else throw new Error("Field not found: '"+o+"'")}}};Kr(vn,"instance",new vn);let m=vn;class rt{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let i=2;for(;e>=t[i-1]+t[i-2];)t.push(t[i-1]+t[i-2]),i++}let s="1";for(let i=t.length-1;i>=0;i--){let r=t[i];e>=r?(s="1"+s,e-=r):s="0"+s}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new p("Undecodable FibonacciInteger '"+e+"'");let t=0,s=[];for(let i=0;i<e.length-1;i++)i===0?s.push(1):i===1?s.push(2):s.push(s[i-1]+s[i-2]);for(let i=0;i<e.length-1;i++)e.charAt(i)==="1"&&(t+=s[i]);return t}}let ot=class{static encode(e){if(e===!0)return"1";if(e===!1)return"0";throw new ne("Unencodable Boolean '"+e+"'")}static decode(e){if(e==="1")return!0;if(e==="0")return!1;throw new p("Undecodable Boolean '"+e+"'")}};class As{static encode(e){e=e.sort((o,a)=>o-a);let t=[],s=0,i=0;for(;i<e.length;){let o=i;for(;o<e.length-1&&e[o]+1===e[o+1];)o++;t.push(e.slice(i,o+1)),i=o+1}let r=w.encode(t.length,12);for(let o=0;o<t.length;o++)if(t[o].length==1){let a=t[o][0]-s;s=t[o][0],r+="0"+rt.encode(a)}else{let a=t[o][0]-s;s=t[o][0];let l=t[o][t[o].length-1]-s;s=t[o][t[o].length-1],r+="1"+rt.encode(a)+rt.encode(l)}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],s=w.decode(e.substring(0,12)),i=0,r=12;for(let o=0;o<s;o++){let a=ot.decode(e.substring(r,r+1));if(r++,a===!0){let l=e.indexOf("11",r),d=rt.decode(e.substring(r,l+2))+i;i=d,r=l+2,l=e.indexOf("11",r);let S=rt.decode(e.substring(r,l+2))+i;i=S,r=l+2;for(let _=d;_<=S;_++)t.push(_)}else{let l=e.indexOf("11",r),d=rt.decode(e.substring(r,l+2))+i;i=d,t.push(d),r=l+2}}return t}}let Yr=class extends Error{constructor(e){super(e),this.name="ValidationError"}};var zr=Object.defineProperty,Wr=(n,e,t)=>e in n?zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rn=(n,e,t)=>Wr(n,typeof e!="symbol"?e+"":e,t);class Ve{constructor(e=!0){Rn(this,"hardFailIfMissing"),Rn(this,"validator"),Rn(this,"value"),this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return this.value!==void 0&&this.value!==null}getValue(){return this.value}setValue(e){if(!this.validator||this.validator.test(e))this.value=e;else throw new Yr("Invalid value '"+e+"'")}getHardFailIfMissing(){return this.hardFailIfMissing}}let we=class extends p{constructor(e){super(e),this.name="SubstringError"}};class te{static substring(e,t,s){if(s>e.length||t<0||t>s)throw new we("Invalid substring indexes "+t+":"+s+" for string of length "+e.length);return e.substring(t,s)}}class Qr extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return As.encode(this.value)}catch(e){throw new ne(e)}}decode(e){try{this.value=As.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=w.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i=e.indexOf("11",e.indexOf("11",i+1)+2)+2:i=e.indexOf("11",i+1)+2;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var qr=Object.defineProperty,Jr=(n,e,t)=>e in n?qr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xr=(n,e,t)=>Jr(n,typeof e!="symbol"?e+"":e,t);class c extends Ve{constructor(e,t,s=!0){super(s),Xr(this,"bitStringLength"),this.bitStringLength=e,this.setValue(t)}encode(){try{return w.encode(this.value,this.bitStringLength)}catch(e){throw new ne(e)}}decode(e){try{this.value=w.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.bitStringLength)}catch(s){throw new we(s)}}}var Zr=Object.defineProperty,eo=(n,e,t)=>e in n?Zr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,to=(n,e,t)=>eo(n,typeof e!="symbol"?e+"":e,t);class f{constructor(){to(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var Ge;(function(n){n.ID="Id",n.VERSION="Version",n.SECTION_IDS="SectionIds"})(Ge||(Ge={}));const no=[Ge.ID,Ge.VERSION,Ge.SECTION_IDS];var so=Object.defineProperty,io=(n,e,t)=>e in n?so(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,At=(n,e,t)=>io(n,typeof e!="symbol"?e+"":e,t);class C{constructor(){At(this,"fields"),At(this,"encodedString",null),At(this,"dirty",!1),At(this,"decoded",!0),this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new lt("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))this.fields.get(e).setValue(t),this.dirty=!0;else throw new lt(e+" not found")}toObj(){let e={},t=this.getFieldNames();for(let s=0;s<t.length;s++){let i=t[s],r=this.getFieldValue(i);e[i]=r}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var ro=Object.defineProperty,oo=(n,e,t)=>e in n?ro(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Cs=(n,e,t)=>oo(n,typeof e!="symbol"?e+"":e,t);class ao extends C{constructor(e){super(),Cs(this,"base64UrlEncoder",F.getInstance()),Cs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return no}initializeFields(){let e=new f;return e.put(Ge.ID.toString(),new c(6,qe.ID)),e.put(Ge.VERSION.toString(),new c(6,qe.VERSION)),e.put(Ge.SECTION_IDS.toString(),new Qr([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var co=Object.defineProperty,lo=(n,e,t)=>e in n?co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mn=(n,e,t)=>lo(n,typeof e!="symbol"?e+"":e,t);const Ct=class sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return sn.ID}getName(){return sn.NAME}getVersion(){return sn.VERSION}initializeSegments(){let e=[];return e.push(new ao),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Mn(Ct,"ID",3),Mn(Ct,"VERSION",1),Mn(Ct,"NAME","header");let qe=Ct;var h;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.POLICY_VERSION="PolicyVersion",n.IS_SERVICE_SPECIFIC="IsServiceSpecific",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",n.PURPOSE_CONSENTS="PurposeConsents",n.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",n.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",n.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",n.VENDOR_CONSENTS="VendorConsents",n.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",n.PUBLISHER_RESTRICTIONS="PublisherRestrictions",n.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",n.PUBLISHER_CONSENTS="PublisherConsents",n.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",n.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",n.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",n.VENDORS_ALLOWED="VendorsAllowed",n.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",n.VENDORS_DISCLOSED="VendorsDisclosed"})(h||(h={}));const Eo=[h.VERSION,h.CREATED,h.LAST_UPDATED,h.CMP_ID,h.CMP_VERSION,h.CONSENT_SCREEN,h.CONSENT_LANGUAGE,h.VENDOR_LIST_VERSION,h.POLICY_VERSION,h.IS_SERVICE_SPECIFIC,h.USE_NON_STANDARD_STACKS,h.SPECIAL_FEATURE_OPTINS,h.PURPOSE_CONSENTS,h.PURPOSE_LEGITIMATE_INTERESTS,h.PURPOSE_ONE_TREATMENT,h.PUBLISHER_COUNTRY_CODE,h.VENDOR_CONSENTS,h.VENDOR_LEGITIMATE_INTERESTS,h.PUBLISHER_RESTRICTIONS],uo=[h.PUBLISHER_PURPOSES_SEGMENT_TYPE,h.PUBLISHER_CONSENTS,h.PUBLISHER_LEGITIMATE_INTERESTS,h.NUM_CUSTOM_PURPOSES,h.PUBLISHER_CUSTOM_CONSENTS,h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],So=[h.VENDORS_ALLOWED_SEGMENT_TYPE,h.VENDORS_ALLOWED],po=[h.VENDORS_DISCLOSED_SEGMENT_TYPE,h.VENDORS_DISCLOSED];var ho=Object.defineProperty,_o=(n,e,t)=>e in n?ho(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,go=(n,e,t)=>_o(n,typeof e!="symbol"?e+"":e,t);const yn=class extends Is{constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}};go(yn,"instance",new yn);let dt=yn;class at{static encode(e){e.sort((r,o)=>r-o);let t=[],s=0;for(;s<e.length;){let r=s;for(;r<e.length-1&&e[r]+1===e[r+1];)r++;t.push(e.slice(s,r+1)),s=r+1}let i=w.encode(t.length,12);for(let r=0;r<t.length;r++)t[r].length===1?i+="0"+w.encode(t[r][0],16):i+="1"+w.encode(t[r][0],16)+w.encode(t[r][t[r].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new p("Undecodable FixedIntegerRange '"+e+"'");let t=[],s=w.decode(e.substring(0,12)),i=12;for(let r=0;r<s;r++){let o=ot.decode(e.substring(i,i+1));if(i++,o===!0){let a=w.decode(e.substring(i,i+16));i+=16;let l=w.decode(e.substring(i,i+16));i+=16;for(let d=a;d<=l;d++)t.push(d)}else{let a=w.decode(e.substring(i,i+16));t.push(a),i+=16}}return t}}class Un extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return at.encode(this.value)}catch(e){throw new ne(e)}}decode(e){try{this.value=at.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{let s=w.decode(te.substring(e,t,t+12)),i=t+12;for(let r=0;r<s;r++)e.charAt(i)==="1"?i+=33:i+=17;return te.substring(e,t,i)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var To=Object.defineProperty,Oo=(n,e,t)=>e in n?To(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ln=(n,e,t)=>Oo(n,typeof e!="symbol"?e+"":e,t);class No{constructor(e,t,s){Ln(this,"key"),Ln(this,"type"),Ln(this,"ids"),this.key=e,this.type=t,this.ids=s}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}var Io=Object.defineProperty,Ao=(n,e,t)=>e in n?Io(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ps=(n,e,t)=>Ao(n,typeof e!="symbol"?e+"":e,t);class ms extends Ve{constructor(e,t,s,i=!0){super(i),Ps(this,"keyBitStringLength"),Ps(this,"typeBitStringLength"),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(s)}encode(){try{let e=this.value,t="";t+=w.encode(e.length,12);for(let s=0;s<e.length;s++){let i=e[s];t+=w.encode(i.getKey(),this.keyBitStringLength),t+=w.encode(i.getType(),this.typeBitStringLength),t+=at.encode(i.getIds())}return t}catch(e){throw new ne(e)}}decode(e){try{let t=[],s=w.decode(te.substring(e,0,12)),i=12;for(let r=0;r<s;r++){let o=w.decode(te.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let a=w.decode(te.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let l=new Un([]).substring(e,i),d=at.decode(l);i+=l.length,t.push(new No(o,a,d))}this.value=t}catch(t){throw new p(t)}}substring(e,t){try{let s="";s+=te.substring(e,t,t+12);let i=w.decode(s.toString()),r=t+s.length;for(let o=0;o<i;o++){let a=te.substring(e,r,r+this.keyBitStringLength);r+=a.length,s+=a;let l=te.substring(e,r,r+this.typeBitStringLength);r+=l.length,s+=l;let d=new Un([]).substring(e,r);r+=d.length,s+=d}return s}catch(s){throw new we(s)}}}class j extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ot.encode(this.value)}catch(e){throw new ne(e)}}decode(e){try{this.value=ot.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+1)}catch(s){throw new we(s)}}}class fs{static encode(e){return e?w.encode(Math.round(e.getTime()/100),36):w.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||e.length!==36)throw new p("Undecodable Datetime '"+e+"'");return new Date(w.decode(e)*100)}}class Pt extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return fs.encode(this.value)}catch(e){throw new ne(e)}}decode(e){try{this.value=fs.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+36)}catch(s){throw new we(s)}}}class ct{static encode(e,t){if(e.length>t)throw new ne("Too many values '"+e.length+"'");let s="";for(let i=0;i<e.length;i++)s+=ot.encode(e[i]);for(;s.length<t;)s+="0";return s}static decode(e){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedBitfield '"+e+"'");let t=[];for(let s=0;s<e.length;s++)t.push(ot.decode(e.substring(s,s+1)));return t}}var Co=Object.defineProperty,Po=(n,e,t)=>e in n?Co(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mo=(n,e,t)=>Po(n,typeof e!="symbol"?e+"":e,t);class ye extends Ve{constructor(e,t=!0){super(t),mo(this,"numElements"),this.numElements=e.length,this.setValue(e)}encode(){try{return ct.encode(this.value,this.numElements)}catch(e){throw new ne(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class ws{static encode(e,t){for(;e.length<t;)e+=" ";let s="";for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===32)s+=w.encode(63,6);else if(r>=65)s+=w.encode(e.charCodeAt(i)-65,6);else throw new ne("Unencodable FixedString '"+e+"'")}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!==0)throw new p("Undecodable FixedString '"+e+"'");let t="";for(let s=0;s<e.length;s+=6){let i=w.decode(e.substring(s,s+6));i===63?t+=" ":t+=String.fromCharCode(i+65)}return t.trim()}}var fo=Object.defineProperty,wo=(n,e,t)=>e in n?fo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Do=(n,e,t)=>wo(n,typeof e!="symbol"?e+"":e,t);class Gn extends Ve{constructor(e,t,s=!0){super(s),Do(this,"stringLength"),this.stringLength=e,this.setValue(t)}encode(){try{return ws.encode(this.value,this.stringLength)}catch(e){throw new ne(e)}}decode(e){try{this.value=ws.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.stringLength*6)}catch(s){throw new we(s)}}}class Je extends Ve{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=at.encode(this.value),s=t.length,i=e;if(s<=i)return w.encode(e,16)+"1"+t;{let r=[],o=0;for(let a=0;a<e;a++)a===this.value[o]-1?(r[a]=!0,o++):r[a]=!1;return w.encode(e,16)+"0"+ct.encode(r,i)}}catch(e){throw new ne(e)}}decode(e){try{if(e.charAt(16)==="1")this.value=at.decode(e.substring(17));else{let t=[],s=ct.decode(e.substring(17));for(let i=0;i<s.length;i++)s[i]===!0&&t.push(i+1);this.value=t}}catch(t){throw new p(t)}}substring(e,t){try{let s=w.decode(te.substring(e,t,t+16));return e.charAt(t+16)==="1"?te.substring(e,t,t+17)+new Un([]).substring(e,t+17):te.substring(e,t,t+17+s)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((t,s)=>t-s))}}var bo=Object.defineProperty,Vo=(n,e,t)=>e in n?bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ds=(n,e,t)=>Vo(n,typeof e!="symbol"?e+"":e,t);class vo extends C{constructor(e){super(),Ds(this,"base64UrlEncoder",dt.getInstance()),Ds(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Eo}initializeFields(){let e=new Date,t=new f;return t.put(h.VERSION.toString(),new c(6,J.VERSION)),t.put(h.CREATED.toString(),new Pt(e)),t.put(h.LAST_UPDATED.toString(),new Pt(e)),t.put(h.CMP_ID.toString(),new c(12,0)),t.put(h.CMP_VERSION.toString(),new c(12,0)),t.put(h.CONSENT_SCREEN.toString(),new c(6,0)),t.put(h.CONSENT_LANGUAGE.toString(),new Gn(2,"EN")),t.put(h.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(h.POLICY_VERSION.toString(),new c(6,2)),t.put(h.IS_SERVICE_SPECIFIC.toString(),new j(!1)),t.put(h.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(h.SPECIAL_FEATURE_OPTINS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_CONSENTS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_LEGITIMATE_INTERESTS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(h.PURPOSE_ONE_TREATMENT.toString(),new j(!1)),t.put(h.PUBLISHER_COUNTRY_CODE.toString(),new Gn(2,"AA")),t.put(h.VENDOR_CONSENTS.toString(),new Je([])),t.put(h.VENDOR_LEGITIMATE_INTERESTS.toString(),new Je([])),t.put(h.PUBLISHER_RESTRICTIONS.toString(),new ms(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}var Ro=Object.defineProperty,Mo=(n,e,t)=>e in n?Ro(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,yo=(n,e,t)=>Mo(n,typeof e!="symbol"?e+"":e,t);class mt extends Ve{constructor(e,t,s=!0){super(s),yo(this,"getLength"),this.getLength=e,this.setValue(t)}encode(){try{return ct.encode(this.value,this.getLength())}catch(e){throw new ne(e)}}decode(e){try{this.value=ct.decode(e)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.getLength())}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),s=[...e];for(let i=s.length;i<t;i++)s.push(!1);s.length>t&&(s=s.slice(0,t)),super.setValue([...s])}}var Uo=Object.defineProperty,Lo=(n,e,t)=>e in n?Uo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bs=(n,e,t)=>Lo(n,typeof e!="symbol"?e+"":e,t);class Go extends C{constructor(e){super(),bs(this,"base64UrlEncoder",dt.getInstance()),bs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return uo}initializeFields(){let e=new f;e.put(h.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(h.PUBLISHER_CONSENTS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(h.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(h.NUM_CUSTOM_PURPOSES.toString(),t),e.put(h.PUBLISHER_CUSTOM_CONSENTS.toString(),new mt(()=>t.getValue(),[])),e.put(h.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new mt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}var Fo=Object.defineProperty,xo=(n,e,t)=>e in n?Fo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Vs=(n,e,t)=>xo(n,typeof e!="symbol"?e+"":e,t);class $o extends C{constructor(e){super(),Vs(this,"base64UrlEncoder",dt.getInstance()),Vs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return So}initializeFields(){let e=new f;return e.put(h.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new c(3,2)),e.put(h.VENDORS_ALLOWED.toString(),new Je([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}var jo=Object.defineProperty,Ho=(n,e,t)=>e in n?jo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,vs=(n,e,t)=>Ho(n,typeof e!="symbol"?e+"":e,t);class ko extends C{constructor(e){super(),vs(this,"base64UrlEncoder",dt.getInstance()),vs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return po}initializeFields(){let e=new f;return e.put(h.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new c(3,1)),e.put(h.VENDORS_DISCLOSED.toString(),new Je([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}var Bo=Object.defineProperty,Ko=(n,e,t)=>e in n?Bo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fn=(n,e,t)=>Ko(n,typeof e!="symbol"?e+"":e,t);const ft=class rn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return rn.ID}getName(){return rn.NAME}getVersion(){return rn.VERSION}initializeSegments(){let e=[];return e.push(new vo),e.push(new Go),e.push(new $o),e.push(new ko),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[3].decode(s[i]);else if(o>="Q"&&o<="X")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfEuV2 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(h.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode()))),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==h.CREATED&&e!==h.LAST_UPDATED){let s=new Date;super.setFieldValue(h.CREATED,s),super.setFieldValue(h.LAST_UPDATED,s)}}};Fn(ft,"ID",2),Fn(ft,"VERSION",2),Fn(ft,"NAME","tcfeuv2");let J=ft;var T;(function(n){n.VERSION="Version",n.CREATED="Created",n.LAST_UPDATED="LastUpdated",n.CMP_ID="CmpId",n.CMP_VERSION="CmpVersion",n.CONSENT_SCREEN="ConsentScreen",n.CONSENT_LANGUAGE="ConsentLanguage",n.VENDOR_LIST_VERSION="VendorListVersion",n.TCF_POLICY_VERSION="TcfPolicyVersion",n.USE_NON_STANDARD_STACKS="UseNonStandardStacks",n.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",n.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",n.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",n.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",n.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",n.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",n.PUB_RESTRICTIONS="PubRestrictions",n.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",n.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",n.NUM_CUSTOM_PURPOSES="NumCustomPurposes",n.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",n.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",n.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",n.DISCLOSED_VENDORS="DisclosedVendors"})(T||(T={}));const Yo=[T.VERSION,T.CREATED,T.LAST_UPDATED,T.CMP_ID,T.CMP_VERSION,T.CONSENT_SCREEN,T.CONSENT_LANGUAGE,T.VENDOR_LIST_VERSION,T.TCF_POLICY_VERSION,T.USE_NON_STANDARD_STACKS,T.SPECIAL_FEATURE_EXPRESS_CONSENT,T.PURPOSES_EXPRESS_CONSENT,T.PURPOSES_IMPLIED_CONSENT,T.VENDOR_EXPRESS_CONSENT,T.VENDOR_IMPLIED_CONSENT,T.PUB_RESTRICTIONS],zo=[T.PUB_PURPOSES_SEGMENT_TYPE,T.PUB_PURPOSES_EXPRESS_CONSENT,T.PUB_PURPOSES_IMPLIED_CONSENT,T.NUM_CUSTOM_PURPOSES,T.CUSTOM_PURPOSES_EXPRESS_CONSENT,T.CUSTOM_PURPOSES_IMPLIED_CONSENT],Wo=[T.DISCLOSED_VENDORS_SEGMENT_TYPE,T.DISCLOSED_VENDORS];var Qo=Object.defineProperty,qo=(n,e,t)=>e in n?Qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Rs=(n,e,t)=>qo(n,typeof e!="symbol"?e+"":e,t);class Jo extends C{constructor(e){super(),Rs(this,"base64UrlEncoder",F.getInstance()),Rs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Yo}initializeFields(){let e=new Date,t=new f;return t.put(T.VERSION.toString(),new c(6,Ie.VERSION)),t.put(T.CREATED.toString(),new Pt(e)),t.put(T.LAST_UPDATED.toString(),new Pt(e)),t.put(T.CMP_ID.toString(),new c(12,0)),t.put(T.CMP_VERSION.toString(),new c(12,0)),t.put(T.CONSENT_SCREEN.toString(),new c(6,0)),t.put(T.CONSENT_LANGUAGE.toString(),new Gn(2,"EN")),t.put(T.VENDOR_LIST_VERSION.toString(),new c(12,0)),t.put(T.TCF_POLICY_VERSION.toString(),new c(6,2)),t.put(T.USE_NON_STANDARD_STACKS.toString(),new j(!1)),t.put(T.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.PURPOSES_EXPRESS_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.PURPOSES_IMPLIED_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(T.VENDOR_EXPRESS_CONSENT.toString(),new Je([])),t.put(T.VENDOR_IMPLIED_CONSENT.toString(),new Je([])),t.put(T.PUB_RESTRICTIONS.toString(),new ms(6,2,[],!1)),t}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}var Xo=Object.defineProperty,Zo=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ms=(n,e,t)=>Zo(n,typeof e!="symbol"?e+"":e,t);class ea extends C{constructor(e){super(),Ms(this,"base64UrlEncoder",F.getInstance()),Ms(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return zo}initializeFields(){let e=new f;e.put(T.PUB_PURPOSES_SEGMENT_TYPE.toString(),new c(3,3)),e.put(T.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(T.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new ye([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new c(6,0);return e.put(T.NUM_CUSTOM_PURPOSES.toString(),t),e.put(T.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new mt(()=>t.getValue(),[])),e.put(T.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new mt(()=>t.getValue(),[])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}var ta=Object.defineProperty,na=(n,e,t)=>e in n?ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ys=(n,e,t)=>na(n,typeof e!="symbol"?e+"":e,t);class sa extends C{constructor(e){super(),ys(this,"base64UrlEncoder",dt.getInstance()),ys(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Wo}initializeFields(){let e=new f;return e.put(T.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new c(3,1)),e.put(T.DISCLOSED_VENDORS.toString(),new Je([])),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}var ia=Object.defineProperty,ra=(n,e,t)=>e in n?ia(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xn=(n,e,t)=>ra(n,typeof e!="symbol"?e+"":e,t);const wt=class on extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return on.ID}getName(){return on.NAME}getVersion(){return on.VERSION}initializeSegments(){let e=[];return e.push(new Jo),e.push(new ea),e.push(new sa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<s.length;i++){let r=s[i];if(r.length!==0){let o=r.charAt(0);if(o>="A"&&o<="H")t[0].decode(s[i]);else if(o>="I"&&o<="P")t[2].decode(s[i]);else if(o>="Y"&&o<="Z"||o>="a"&&o<="f")t[1].decode(s[i]);else throw new p("Unable to decode TcfCaV1 segment '"+r+"'")}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(T.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==T.CREATED&&e!==T.LAST_UPDATED){let s=new Date;super.setFieldValue(T.CREATED,s),super.setFieldValue(T.LAST_UPDATED,s)}}};xn(wt,"ID",5),xn(wt,"VERSION",1),xn(wt,"NAME","tcfcav1");let Ie=wt;var oa=Object.defineProperty,aa=(n,e,t)=>e in n?oa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Us=(n,e,t)=>aa(n,typeof e!="symbol"?e+"":e,t);class $n{constructor(e,t){Us(this,"validator"),Us(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}var ca=Object.defineProperty,la=(n,e,t)=>e in n?ca(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ls=(n,e,t)=>la(n,typeof e!="symbol"?e+"":e,t);class da{constructor(e,t){Ls(this,"validator"),Ls(this,"value",null),t?this.validator=t:this.validator=new class{test(s){return!0}},this.setValue(e)}hasValue(){return this.value!=null}getValue(){return this.value}setValue(e){this.value=e}}var Ea=Object.defineProperty,ua=(n,e,t)=>e in n?Ea(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sa=(n,e,t)=>ua(n,typeof e!="symbol"?e+"":e,t);class pa{constructor(){Sa(this,"fields",new Map)}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach((t,s)=>{this.fields.set(s,t)})}}var se;(function(n){n.VERSION="Version",n.NOTICE="Notice",n.OPT_OUT_SALE="OptOutSale",n.LSPA_COVERED="LspaCovered"})(se||(se={}));const ha=[se.VERSION,se.NOTICE,se.OPT_OUT_SALE,se.LSPA_COVERED];class _a extends C{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ha}initializeFields(){const e=new class{test(s){return s==="-"||s==="Y"||s==="N"}};let t=new pa;return t.put(se.VERSION,new da(Ae.VERSION)),t.put(se.NOTICE,new $n("-",e)),t.put(se.OPT_OUT_SALE,new $n("-",e)),t.put(se.LSPA_COVERED,new $n("-",e)),t}encodeSegment(e){let t="";return t+=e.get(se.VERSION).getValue(),t+=e.get(se.NOTICE).getValue(),t+=e.get(se.OPT_OUT_SALE).getValue(),t+=e.get(se.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(e==null||e.length!=4)throw new p("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(se.VERSION).setValue(parseInt(e.substring(0,1))),t.get(se.NOTICE).setValue(e.charAt(1)),t.get(se.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(se.LSPA_COVERED).setValue(e.charAt(3))}catch{throw new p("Unable to decode UspV1CoreSegment '"+e+"'")}}}var ga=Object.defineProperty,Ta=(n,e,t)=>e in n?ga(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jn=(n,e,t)=>Ta(n,typeof e!="symbol"?e+"":e,t);const Dt=class an extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return an.ID}getName(){return an.NAME}getVersion(){return an.VERSION}initializeSegments(){let e=[];return e.push(new _a),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};jn(Dt,"ID",6),jn(Dt,"VERSION",1),jn(Dt,"NAME","uspv1");let Ae=Dt;var O;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(O||(O={}));const Oa=[O.VERSION,O.SHARING_NOTICE,O.SALE_OPT_OUT_NOTICE,O.SHARING_OPT_OUT_NOTICE,O.TARGETED_ADVERTISING_OPT_OUT_NOTICE,O.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,O.SENSITIVE_DATA_LIMIT_USE_NOTICE,O.SALE_OPT_OUT,O.SHARING_OPT_OUT,O.TARGETED_ADVERTISING_OPT_OUT,O.SENSITIVE_DATA_PROCESSING,O.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,O.PERSONAL_DATA_CONSENTS,O.MSPA_COVERED_TRANSACTION,O.MSPA_OPT_OUT_OPTION_MODE,O.MSPA_SERVICE_PROVIDER_MODE],Na=[O.GPC_SEGMENT_TYPE,O.GPC];class Gs{static encode(e,t,s){if(e.length>s)throw new ne("Too many values '"+e.length+"'");let i="";for(let r=0;r<e.length;r++)i+=w.encode(e[r],t);for(;i.length<t*s;)i+="0";return i}static decode(e,t,s){if(!/^[0-1]*$/.test(e))throw new p("Undecodable FixedInteger '"+e+"'");if(e.length>t*s)throw new p("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new p("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*s;)e+="0";e.length>t*s&&(e=e.substring(0,t*s));let i=[];for(let r=0;r<e.length;r+=t)i.push(w.decode(e.substring(r,r+t)));for(;i.length<s;)i.push(0);return i}}var Ia=Object.defineProperty,Aa=(n,e,t)=>e in n?Ia(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fs=(n,e,t)=>Aa(n,typeof e!="symbol"?e+"":e,t);class Y extends Ve{constructor(e,t,s=!0){super(s),Fs(this,"elementBitStringLength"),Fs(this,"numElements"),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return Gs.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new ne(e)}}decode(e){try{this.value=Gs.decode(e,this.elementBitStringLength,this.numElements)}catch(t){throw new p(t)}}substring(e,t){try{return te.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(s){throw new we(s)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let s=t.length;s<this.numElements;s++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}var Ca=Object.defineProperty,Pa=(n,e,t)=>e in n?Ca(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xs=(n,e,t)=>Pa(n,typeof e!="symbol"?e+"":e,t);class ma extends C{constructor(e){super(),xs(this,"base64UrlEncoder",F.getInstance()),xs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Oa}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(O.VERSION.toString(),new c(6,ie.VERSION)),i.put(O.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(O.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(O.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(O.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(O.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(O.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put(O.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(O.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(O.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(O.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatCoreSegment '"+e+"'")}}}var fa=Object.defineProperty,wa=(n,e,t)=>e in n?fa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$s=(n,e,t)=>wa(n,typeof e!="symbol"?e+"":e,t);class Da extends C{constructor(e){super(),$s(this,"base64UrlEncoder",F.getInstance()),$s(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Na}initializeFields(){let e=new f;return e.put(O.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(O.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(O.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNatGpcSegment '"+e+"'")}}}var ba=Object.defineProperty,Va=(n,e,t)=>e in n?ba(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hn=(n,e,t)=>Va(n,typeof e!="symbol"?e+"":e,t);const bt=class cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return cn.ID}getName(){return cn.NAME}getVersion(){return cn.VERSION}initializeSegments(){let e=[];return e.push(new ma),e.push(new Da),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(O.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(O.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(O.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Hn(bt,"ID",7),Hn(bt,"VERSION",1),Hn(bt,"NAME","usnat");let ie=bt;var D;(function(n){n.VERSION="Version",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",n.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",n.SALE_OPT_OUT="SaleOptOut",n.SHARING_OPT_OUT="SharingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.PERSONAL_DATA_CONSENTS="PersonalDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(D||(D={}));const va=[D.VERSION,D.SALE_OPT_OUT_NOTICE,D.SHARING_OPT_OUT_NOTICE,D.SENSITIVE_DATA_LIMIT_USE_NOTICE,D.SALE_OPT_OUT,D.SHARING_OPT_OUT,D.SENSITIVE_DATA_PROCESSING,D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,D.PERSONAL_DATA_CONSENTS,D.MSPA_COVERED_TRANSACTION,D.MSPA_OPT_OUT_OPTION_MODE,D.MSPA_SERVICE_PROVIDER_MODE],Ra=[D.GPC_SEGMENT_TYPE,D.GPC];var Ma=Object.defineProperty,ya=(n,e,t)=>e in n?Ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,js=(n,e,t)=>ya(n,typeof e!="symbol"?e+"":e,t);class Ua extends C{constructor(e){super(),js(this,"base64UrlEncoder",F.getInstance()),js(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return va}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(D.VERSION.toString(),new c(6,ae.VERSION)),i.put(D.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(D.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SHARING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(D.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(D.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0]).withValidator(s)),i.put(D.PERSONAL_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(D.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(D.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(D.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaCoreSegment '"+e+"'")}}}var La=Object.defineProperty,Ga=(n,e,t)=>e in n?La(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Hs=(n,e,t)=>Ga(n,typeof e!="symbol"?e+"":e,t);class Fa extends C{constructor(e){super(),Hs(this,"base64UrlEncoder",F.getInstance()),Hs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Ra}initializeFields(){let e=new f;return e.put(D.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(D.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(D.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCaGpcSegment '"+e+"'")}}}var xa=Object.defineProperty,$a=(n,e,t)=>e in n?xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,kn=(n,e,t)=>$a(n,typeof e!="symbol"?e+"":e,t);const Vt=class ln extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){let e=[];return e.push(new Ua),e.push(new Fa),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(D.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(D.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};kn(Vt,"ID",8),kn(Vt,"VERSION",1),kn(Vt,"NAME","usca");let ae=Vt;var Q;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Q||(Q={}));const ja=[Q.VERSION,Q.SHARING_NOTICE,Q.SALE_OPT_OUT_NOTICE,Q.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Q.SALE_OPT_OUT,Q.TARGETED_ADVERTISING_OPT_OUT,Q.SENSITIVE_DATA_PROCESSING,Q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Q.MSPA_COVERED_TRANSACTION,Q.MSPA_OPT_OUT_OPTION_MODE,Q.MSPA_SERVICE_PROVIDER_MODE];var Ha=Object.defineProperty,ka=(n,e,t)=>e in n?Ha(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ks=(n,e,t)=>ka(n,typeof e!="symbol"?e+"":e,t);class Ba extends C{constructor(e){super(),ks(this,"base64UrlEncoder",F.getInstance()),ks(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return ja}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(Q.VERSION.toString(),new c(6,ce.VERSION)),i.put(Q.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Q.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(Q.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Q.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(Q.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(Q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(Q.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(Q.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(Q.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsVaCoreSegment '"+e+"'")}}}var Ka=Object.defineProperty,Ya=(n,e,t)=>e in n?Ka(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bn=(n,e,t)=>Ya(n,typeof e!="symbol"?e+"":e,t);const vt=class dn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return dn.ID}getName(){return dn.NAME}getVersion(){return dn.VERSION}initializeSegments(){let e=[];return e.push(new Ba),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Bn(vt,"ID",9),Bn(vt,"VERSION",1),Bn(vt,"NAME","usva");let ce=vt;var x;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(x||(x={}));const za=[x.VERSION,x.SHARING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],Wa=[x.GPC_SEGMENT_TYPE,x.GPC];var Qa=Object.defineProperty,qa=(n,e,t)=>e in n?Qa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Bs=(n,e,t)=>qa(n,typeof e!="symbol"?e+"":e,t);class Ja extends C{constructor(e){super(),Bs(this,"base64UrlEncoder",F.getInstance()),Bs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return za}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(x.VERSION.toString(),new c(6,le.VERSION)),i.put(x.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(x.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(x.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0]).withValidator(s)),i.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoCoreSegment '"+e+"'")}}}var Xa=Object.defineProperty,Za=(n,e,t)=>e in n?Xa(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ks=(n,e,t)=>Za(n,typeof e!="symbol"?e+"":e,t);class ec extends C{constructor(e){super(),Ks(this,"base64UrlEncoder",F.getInstance()),Ks(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Wa}initializeFields(){let e=new f;return e.put(x.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(x.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCoGpcSegment '"+e+"'")}}}var tc=Object.defineProperty,nc=(n,e,t)=>e in n?tc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kn=(n,e,t)=>nc(n,typeof e!="symbol"?e+"":e,t);const Rt=class En extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new Ja),e.push(new ec),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Kn(Rt,"ID",10),Kn(Rt,"VERSION",1),Kn(Rt,"NAME","usco");let le=Rt;var B;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(B||(B={}));const sc=[B.VERSION,B.SHARING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE];var ic=Object.defineProperty,rc=(n,e,t)=>e in n?ic(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ys=(n,e,t)=>rc(n,typeof e!="symbol"?e+"":e,t);class oc extends C{constructor(e){super(),Ys(this,"base64UrlEncoder",F.getInstance()),Ys(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return sc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(B.VERSION.toString(),new c(6,de.VERSION)),i.put(B.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(B.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(B.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsUtCoreSegment '"+e+"'")}}}var ac=Object.defineProperty,cc=(n,e,t)=>e in n?ac(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Yn=(n,e,t)=>cc(n,typeof e!="symbol"?e+"":e,t);const Mt=class un extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return un.ID}getName(){return un.NAME}getVersion(){return un.VERSION}initializeSegments(){let e=[];return e.push(new oc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Yn(Mt,"ID",11),Yn(Mt,"VERSION",1),Yn(Mt,"NAME","usut");let de=Mt;var $;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})($||($={}));const lc=[$.VERSION,$.SHARING_NOTICE,$.SALE_OPT_OUT_NOTICE,$.TARGETED_ADVERTISING_OPT_OUT_NOTICE,$.SALE_OPT_OUT,$.TARGETED_ADVERTISING_OPT_OUT,$.SENSITIVE_DATA_PROCESSING,$.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,$.MSPA_COVERED_TRANSACTION,$.MSPA_OPT_OUT_OPTION_MODE,$.MSPA_SERVICE_PROVIDER_MODE],dc=[$.GPC_SEGMENT_TYPE,$.GPC];var Ec=Object.defineProperty,uc=(n,e,t)=>e in n?Ec(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zs=(n,e,t)=>uc(n,typeof e!="symbol"?e+"":e,t);class Sc extends C{constructor(e){super(),zs(this,"base64UrlEncoder",F.getInstance()),zs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return lc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put($.VERSION.toString(),new c(6,Ee.VERSION)),i.put($.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put($.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put($.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put($.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put($.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put($.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put($.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtCoreSegment '"+e+"'")}}}var pc=Object.defineProperty,hc=(n,e,t)=>e in n?pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ws=(n,e,t)=>hc(n,typeof e!="symbol"?e+"":e,t);class _c extends C{constructor(e){super(),Ws(this,"base64UrlEncoder",F.getInstance()),Ws(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return dc}initializeFields(){let e=new f;return e.put($.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put($.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put($.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsCtGpcSegment '"+e+"'")}}}var gc=Object.defineProperty,Tc=(n,e,t)=>e in n?gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,zn=(n,e,t)=>Tc(n,typeof e!="symbol"?e+"":e,t);const yt=class Sn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Sn.ID}getName(){return Sn.NAME}getVersion(){return Sn.VERSION}initializeSegments(){let e=[];return e.push(new Sc),e.push(new _c),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue($.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue($.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};zn(yt,"ID",12),zn(yt,"VERSION",1),zn(yt,"NAME","usct");let Ee=yt;var K;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(K||(K={}));const Oc=[K.VERSION,K.PROCESSING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.ADDITIONAL_DATA_PROCESSING_CONSENT,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE];var Nc=Object.defineProperty,Ic=(n,e,t)=>e in n?Nc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qs=(n,e,t)=>Ic(n,typeof e!="symbol"?e+"":e,t);class Ac extends C{constructor(e){super(),Qs(this,"base64UrlEncoder",F.getInstance()),Qs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Oc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(K.VERSION.toString(),new c(6,ue.VERSION)),i.put(K.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(K.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(K.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put(K.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(K.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(K.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsFlCoreSegment '"+e+"'")}}}var Cc=Object.defineProperty,Pc=(n,e,t)=>e in n?Cc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wn=(n,e,t)=>Pc(n,typeof e!="symbol"?e+"":e,t);const Ut=class pn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return pn.ID}getName(){return pn.NAME}getVersion(){return pn.VERSION}initializeSegments(){let e=[];return e.push(new Ac),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");for(let i=0;i<t.length;i++)s.length>i&&t[i].decode(s[i])}return t}encodeSection(e){let t=[];for(let s=0;s<e.length;s++){let i=e[s];t.push(i.encode())}return t.join(".")}};Wn(Ut,"ID",13),Wn(Ut,"VERSION",1),Wn(Ut,"NAME","usfl");let ue=Ut;var b;(function(n){n.VERSION="Version",n.SHARING_NOTICE="SharingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(b||(b={}));const mc=[b.VERSION,b.SHARING_NOTICE,b.SALE_OPT_OUT_NOTICE,b.TARGETED_ADVERTISING_OPT_OUT_NOTICE,b.SALE_OPT_OUT,b.TARGETED_ADVERTISING_OPT_OUT,b.SENSITIVE_DATA_PROCESSING,b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,b.ADDITIONAL_DATA_PROCESSING_CONSENT,b.MSPA_COVERED_TRANSACTION,b.MSPA_OPT_OUT_OPTION_MODE,b.MSPA_SERVICE_PROVIDER_MODE],fc=[b.GPC_SEGMENT_TYPE,b.GPC];var wc=Object.defineProperty,Dc=(n,e,t)=>e in n?wc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qs=(n,e,t)=>Dc(n,typeof e!="symbol"?e+"":e,t);class bc extends C{constructor(e){super(),qs(this,"base64UrlEncoder",F.getInstance()),qs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return mc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(b.VERSION.toString(),new c(6,Se.VERSION)),i.put(b.SHARING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(b.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(b.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(b.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put(b.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(b.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(b.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtCoreSegment '"+e+"'")}}}var Vc=Object.defineProperty,vc=(n,e,t)=>e in n?Vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Js=(n,e,t)=>vc(n,typeof e!="symbol"?e+"":e,t);class Rc extends C{constructor(e){super(),Js(this,"base64UrlEncoder",F.getInstance()),Js(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return fc}initializeFields(){let e=new f;return e.put(b.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(b.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(b.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsMtGpcSegment '"+e+"'")}}}var Mc=Object.defineProperty,yc=(n,e,t)=>e in n?Mc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qn=(n,e,t)=>yc(n,typeof e!="symbol"?e+"":e,t);const Lt=class hn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return hn.ID}getName(){return hn.NAME}getVersion(){return hn.VERSION}initializeSegments(){let e=[];return e.push(new bc),e.push(new Rc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(b.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(b.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Qn(Lt,"ID",14),Qn(Lt,"VERSION",1),Qn(Lt,"NAME","usmt");let Se=Lt;var V;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(V||(V={}));const Uc=[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],Lc=[V.GPC_SEGMENT_TYPE,V.GPC];var Gc=Object.defineProperty,Fc=(n,e,t)=>e in n?Gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xs=(n,e,t)=>Fc(n,typeof e!="symbol"?e+"":e,t);class xc extends C{constructor(e){super(),Xs(this,"base64UrlEncoder",F.getInstance()),Xs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Uc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(V.VERSION.toString(),new c(6,Ce.VERSION)),i.put(V.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(V.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(V.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(V.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put(V.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(V.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(V.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrCoreSegment '"+e+"'")}}}var $c=Object.defineProperty,jc=(n,e,t)=>e in n?$c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zs=(n,e,t)=>jc(n,typeof e!="symbol"?e+"":e,t);class Hc extends C{constructor(e){super(),Zs(this,"base64UrlEncoder",F.getInstance()),Zs(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Lc}initializeFields(){let e=new f;return e.put(V.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(V.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(V.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsOrGpcSegment '"+e+"'")}}}var kc=Object.defineProperty,Bc=(n,e,t)=>e in n?kc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,qn=(n,e,t)=>Bc(n,typeof e!="symbol"?e+"":e,t);const Gt=class _n extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _n.ID}getName(){return _n.NAME}getVersion(){return _n.VERSION}initializeSegments(){let e=[];return e.push(new xc),e.push(new Hc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(V.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(V.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};qn(Gt,"ID",15),qn(Gt,"VERSION",1),qn(Gt,"NAME","usor");let Ce=Gt;var v;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(v||(v={}));const Kc=[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],Yc=[v.GPC_SEGMENT_TYPE,v.GPC];var zc=Object.defineProperty,Wc=(n,e,t)=>e in n?zc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ei=(n,e,t)=>Wc(n,typeof e!="symbol"?e+"":e,t);class Qc extends C{constructor(e){super(),ei(this,"base64UrlEncoder",F.getInstance()),ei(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Kc}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(v.VERSION.toString(),new c(6,pe.VERSION)),i.put(v.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(v.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(v.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(v.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(v.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(v.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(v.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxCoreSegment '"+e+"'")}}}var qc=Object.defineProperty,Jc=(n,e,t)=>e in n?qc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ti=(n,e,t)=>Jc(n,typeof e!="symbol"?e+"":e,t);class Xc extends C{constructor(e){super(),ti(this,"base64UrlEncoder",F.getInstance()),ti(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Yc}initializeFields(){let e=new f;return e.put(v.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(v.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(v.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTxGpcSegment '"+e+"'")}}}var Zc=Object.defineProperty,el=(n,e,t)=>e in n?Zc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jn=(n,e,t)=>el(n,typeof e!="symbol"?e+"":e,t);const Ft=class gn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return gn.ID}getName(){return gn.NAME}getVersion(){return gn.VERSION}initializeSegments(){let e=[];return e.push(new Qc),e.push(new Xc),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(v.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(v.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Jn(Ft,"ID",16),Jn(Ft,"VERSION",1),Jn(Ft,"NAME","ustx");let pe=Ft;var R;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(R||(R={}));const tl=[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],nl=[R.GPC_SEGMENT_TYPE,R.GPC];var sl=Object.defineProperty,il=(n,e,t)=>e in n?sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ni=(n,e,t)=>il(n,typeof e!="symbol"?e+"":e,t);class rl extends C{constructor(e){super(),ni(this,"base64UrlEncoder",F.getInstance()),ni(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return tl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(R.VERSION.toString(),new c(6,he.VERSION)),i.put(R.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(R.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(R.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(R.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0,0,0]).withValidator(s)),i.put(R.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(R.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(R.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeCoreSegment '"+e+"'")}}}var ol=Object.defineProperty,al=(n,e,t)=>e in n?ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,si=(n,e,t)=>al(n,typeof e!="symbol"?e+"":e,t);class cl extends C{constructor(e){super(),si(this,"base64UrlEncoder",F.getInstance()),si(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return nl}initializeFields(){let e=new f;return e.put(R.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(R.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(R.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsDeGpcSegment '"+e+"'")}}}var ll=Object.defineProperty,dl=(n,e,t)=>e in n?ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xn=(n,e,t)=>dl(n,typeof e!="symbol"?e+"":e,t);const xt=class Tn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){let e=[];return e.push(new rl),e.push(new cl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(R.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(R.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Xn(xt,"ID",17),Xn(xt,"VERSION",1),Xn(xt,"NAME","usde");let he=xt;var M;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(M||(M={}));const El=[M.VERSION,M.PROCESSING_NOTICE,M.SALE_OPT_OUT_NOTICE,M.TARGETED_ADVERTISING_OPT_OUT_NOTICE,M.SENSITIVE_DATA_OPT_OUT_NOTICE,M.SALE_OPT_OUT,M.TARGETED_ADVERTISING_OPT_OUT,M.SENSITIVE_DATA_PROCESSING,M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,M.MSPA_COVERED_TRANSACTION,M.MSPA_OPT_OUT_OPTION_MODE,M.MSPA_SERVICE_PROVIDER_MODE],ul=[M.GPC_SEGMENT_TYPE,M.GPC];var Sl=Object.defineProperty,pl=(n,e,t)=>e in n?Sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ii=(n,e,t)=>pl(n,typeof e!="symbol"?e+"":e,t);class hl extends C{constructor(e){super(),ii(this,"base64UrlEncoder",F.getInstance()),ii(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return El}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(M.VERSION.toString(),new c(6,_e.VERSION)),i.put(M.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(M.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(M.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaCoreSegment '"+e+"'")}}}var _l=Object.defineProperty,gl=(n,e,t)=>e in n?_l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ri=(n,e,t)=>gl(n,typeof e!="symbol"?e+"":e,t);class Tl extends C{constructor(e){super(),ri(this,"base64UrlEncoder",F.getInstance()),ri(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return ul}initializeFields(){let e=new f;return e.put(M.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(M.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsIaGpcSegment '"+e+"'")}}}var Ol=Object.defineProperty,Nl=(n,e,t)=>e in n?Ol(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Zn=(n,e,t)=>Nl(n,typeof e!="symbol"?e+"":e,t);const $t=class On extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new hl),e.push(new Tl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};Zn($t,"ID",18),Zn($t,"VERSION",1),Zn($t,"NAME","usia");let _e=$t;var y;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(y||(y={}));const Il=[y.VERSION,y.PROCESSING_NOTICE,y.SALE_OPT_OUT_NOTICE,y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,y.SALE_OPT_OUT,y.TARGETED_ADVERTISING_OPT_OUT,y.SENSITIVE_DATA_PROCESSING,y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,y.ADDITIONAL_DATA_PROCESSING_CONSENT,y.MSPA_COVERED_TRANSACTION,y.MSPA_OPT_OUT_OPTION_MODE,y.MSPA_SERVICE_PROVIDER_MODE],Al=[y.GPC_SEGMENT_TYPE,y.GPC];var Cl=Object.defineProperty,Pl=(n,e,t)=>e in n?Cl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,oi=(n,e,t)=>Pl(n,typeof e!="symbol"?e+"":e,t);class ml extends C{constructor(e){super(),oi(this,"base64UrlEncoder",F.getInstance()),oi(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Il}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(y.VERSION.toString(),new c(6,ge.VERSION)),i.put(y.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(y.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(y.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(y.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(y.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeCoreSegment '"+e+"'")}}}var fl=Object.defineProperty,wl=(n,e,t)=>e in n?fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ai=(n,e,t)=>wl(n,typeof e!="symbol"?e+"":e,t);class Dl extends C{constructor(e){super(),ai(this,"base64UrlEncoder",F.getInstance()),ai(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Al}initializeFields(){let e=new f;return e.put(y.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(y.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(y.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNeGpcSegment '"+e+"'")}}}var bl=Object.defineProperty,Vl=(n,e,t)=>e in n?bl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,es=(n,e,t)=>Vl(n,typeof e!="symbol"?e+"":e,t);const jt=class Nn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Nn.ID}getName(){return Nn.NAME}getVersion(){return Nn.VERSION}initializeSegments(){let e=[];return e.push(new ml),e.push(new Dl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(y.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(y.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};es(jt,"ID",19),es(jt,"VERSION",1),es(jt,"NAME","usne");let ge=jt;var U;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(U||(U={}));const vl=[U.VERSION,U.PROCESSING_NOTICE,U.SALE_OPT_OUT_NOTICE,U.TARGETED_ADVERTISING_OPT_OUT_NOTICE,U.SALE_OPT_OUT,U.TARGETED_ADVERTISING_OPT_OUT,U.SENSITIVE_DATA_PROCESSING,U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,U.ADDITIONAL_DATA_PROCESSING_CONSENT,U.MSPA_COVERED_TRANSACTION,U.MSPA_OPT_OUT_OPTION_MODE,U.MSPA_SERVICE_PROVIDER_MODE],Rl=[U.GPC_SEGMENT_TYPE,U.GPC];var Ml=Object.defineProperty,yl=(n,e,t)=>e in n?Ml(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>yl(n,typeof e!="symbol"?e+"":e,t);class Ul extends C{constructor(e){super(),ci(this,"base64UrlEncoder",F.getInstance()),ci(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return vl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(U.VERSION.toString(),new c(6,Te.VERSION)),i.put(U.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(U.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(U.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(U.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0]).withValidator(s)),i.put(U.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(U.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(U.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhCoreSegment '"+e+"'")}}}var Ll=Object.defineProperty,Gl=(n,e,t)=>e in n?Ll(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);class Fl extends C{constructor(e){super(),li(this,"base64UrlEncoder",F.getInstance()),li(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Rl}initializeFields(){let e=new f;return e.put(U.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(U.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(U.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNhGpcSegment '"+e+"'")}}}var xl=Object.defineProperty,$l=(n,e,t)=>e in n?xl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ts=(n,e,t)=>$l(n,typeof e!="symbol"?e+"":e,t);const Ht=class In extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return In.ID}getName(){return In.NAME}getVersion(){return In.VERSION}initializeSegments(){let e=[];return e.push(new Ul),e.push(new Fl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(U.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(U.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ts(Ht,"ID",20),ts(Ht,"VERSION",1),ts(Ht,"NAME","usnh");let Te=Ht;var L;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(L||(L={}));const jl=[L.VERSION,L.PROCESSING_NOTICE,L.SALE_OPT_OUT_NOTICE,L.TARGETED_ADVERTISING_OPT_OUT_NOTICE,L.SALE_OPT_OUT,L.TARGETED_ADVERTISING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.ADDITIONAL_DATA_PROCESSING_CONSENT,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Hl=[L.GPC_SEGMENT_TYPE,L.GPC];var kl=Object.defineProperty,Bl=(n,e,t)=>e in n?kl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,di=(n,e,t)=>Bl(n,typeof e!="symbol"?e+"":e,t);class Kl extends C{constructor(e){super(),di(this,"base64UrlEncoder",F.getInstance()),di(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return jl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(L.VERSION.toString(),new c(6,Oe.VERSION)),i.put(L.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(L.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(L.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(s)),i.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Y(2,[0,0,0,0,0]).withValidator(s)),i.put(L.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjCoreSegment '"+e+"'")}}}var Yl=Object.defineProperty,zl=(n,e,t)=>e in n?Yl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ei=(n,e,t)=>zl(n,typeof e!="symbol"?e+"":e,t);class Wl extends C{constructor(e){super(),Ei(this,"base64UrlEncoder",F.getInstance()),Ei(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Hl}initializeFields(){let e=new f;return e.put(L.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(L.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsNjGpcSegment '"+e+"'")}}}var Ql=Object.defineProperty,ql=(n,e,t)=>e in n?Ql(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ns=(n,e,t)=>ql(n,typeof e!="symbol"?e+"":e,t);const kt=class An extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return An.ID}getName(){return An.NAME}getVersion(){return An.VERSION}initializeSegments(){let e=[];return e.push(new Kl),e.push(new Wl),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ns(kt,"ID",21),ns(kt,"VERSION",1),ns(kt,"NAME","usnj");let Oe=kt;var G;(function(n){n.VERSION="Version",n.PROCESSING_NOTICE="ProcessingNotice",n.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",n.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",n.SALE_OPT_OUT="SaleOptOut",n.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",n.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",n.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",n.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",n.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",n.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",n.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",n.GPC_SEGMENT_TYPE="GpcSegmentType",n.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",n.GPC="Gpc"})(G||(G={}));const Jl=[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],Xl=[G.GPC_SEGMENT_TYPE,G.GPC];var Zl=Object.defineProperty,ed=(n,e,t)=>e in n?Zl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ui=(n,e,t)=>ed(n,typeof e!="symbol"?e+"":e,t);class td extends C{constructor(e){super(),ui(this,"base64UrlEncoder",F.getInstance()),ui(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Jl}initializeFields(){const e=new class{test(r){return r>=0&&r<=2}},t=new class{test(r){return r>=1&&r<=2}},s=new class{test(r){for(let o=0;o<r.length;o++){let a=r[o];if(a<0||a>2)return!1}return!0}};let i=new f;return i.put(G.VERSION.toString(),new c(6,Ne.VERSION)),i.put(G.PROCESSING_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new c(2,0).withValidator(e)),i.put(G.SALE_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.TARGETED_ADVERTISING_OPT_OUT.toString(),new c(2,0).withValidator(e)),i.put(G.SENSITIVE_DATA_PROCESSING.toString(),new Y(2,[0,0,0,0,0,0,0,0]).withValidator(s)),i.put(G.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new c(2,0).withValidator(e)),i.put(G.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_COVERED_TRANSACTION.toString(),new c(2,1).withValidator(t)),i.put(G.MSPA_OPT_OUT_OPTION_MODE.toString(),new c(2,0).withValidator(e)),i.put(G.MSPA_SERVICE_PROVIDER_MODE.toString(),new c(2,0).withValidator(e)),i}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnCoreSegment '"+e+"'")}}}var nd=Object.defineProperty,sd=(n,e,t)=>e in n?nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Si=(n,e,t)=>sd(n,typeof e!="symbol"?e+"":e,t);class id extends C{constructor(e){super(),Si(this,"base64UrlEncoder",F.getInstance()),Si(this,"bitStringEncoder",m.getInstance()),e&&this.decode(e)}getFieldNames(){return Xl}initializeFields(){let e=new f;return e.put(G.GPC_SEGMENT_TYPE.toString(),new c(2,1)),e.put(G.GPC_SEGMENT_INCLUDED.toString(),new j(!0)),e.put(G.GPC.toString(),new j(!1)),e}encodeSegment(e){let t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){(e==null||e.length===0)&&this.fields.reset(t);try{let s=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(s,this.getFieldNames(),t)}catch{throw new p("Unable to decode UsTnGpcSegment '"+e+"'")}}}var rd=Object.defineProperty,od=(n,e,t)=>e in n?rd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ss=(n,e,t)=>od(n,typeof e!="symbol"?e+"":e,t);const Bt=class Cn extends ee{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Cn.ID}getName(){return Cn.NAME}getVersion(){return Cn.VERSION}initializeSegments(){let e=[];return e.push(new td),e.push(new id),e}decodeSection(e){let t=this.initializeSegments();if(e!=null&&e.length!==0){let s=e.split(".");s.length>0&&t[0].decode(s[0]),s.length>1?(t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!0),t[1].decode(s[1])):t[1].setFieldValue(G.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(G.GPC_SEGMENT_INCLUDED)===!0&&t.push(e[1].encode())),t.join(".")}};ss(Bt,"ID",22),ss(Bt,"VERSION",1),ss(Bt,"NAME","ustn");let Ne=Bt;var ad=Object.defineProperty,cd=(n,e,t)=>e in n?ad(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pi=(n,e,t)=>cd(n,typeof e!="symbol"?e+"":e,t);class X{}pi(X,"SECTION_ID_NAME_MAP",new Map([[J.ID,J.NAME],[Ie.ID,Ie.NAME],[Ae.ID,Ae.NAME],[ie.ID,ie.NAME],[ae.ID,ae.NAME],[ce.ID,ce.NAME],[le.ID,le.NAME],[de.ID,de.NAME],[Ee.ID,Ee.NAME],[ue.ID,ue.NAME],[Se.ID,Se.NAME],[Ce.ID,Ce.NAME],[pe.ID,pe.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Oe.ID,Oe.NAME],[Ne.ID,Ne.NAME]])),pi(X,"SECTION_ORDER",[J.NAME,Ie.NAME,Ae.NAME,ie.NAME,ae.NAME,ce.NAME,le.NAME,de.NAME,Ee.NAME,ue.NAME,Se.NAME,Ce.NAME,pe.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Oe.NAME,Ne.NAME]);var ld=Object.defineProperty,dd=(n,e,t)=>e in n?ld(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Kt=(n,e,t)=>dd(n,typeof e!="symbol"?e+"":e,t);class hi{constructor(e){Kt(this,"sections",new Map),Kt(this,"encodedString",null),Kt(this,"decoded",!0),Kt(this,"dirty",!1),e&&this.decode(e)}setFieldValue(e,t,s){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===Ie.NAME?(i=new Ie,this.sections.set(Ie.NAME,i)):e===J.NAME?(i=new J,this.sections.set(J.NAME,i)):e===Ae.NAME?(i=new Ae,this.sections.set(Ae.NAME,i)):e===ie.NAME?(i=new ie,this.sections.set(ie.NAME,i)):e===ae.NAME?(i=new ae,this.sections.set(ae.NAME,i)):e===ce.NAME?(i=new ce,this.sections.set(ce.NAME,i)):e===le.NAME?(i=new le,this.sections.set(le.NAME,i)):e===de.NAME?(i=new de,this.sections.set(de.NAME,i)):e===Ee.NAME?(i=new Ee,this.sections.set(Ee.NAME,i)):e===ue.NAME?(i=new ue,this.sections.set(ue.NAME,i)):e===Se.NAME?(i=new Se,this.sections.set(Se.NAME,i)):e===Ce.NAME?(i=new Ce,this.sections.set(Ce.NAME,i)):e===pe.NAME?(i=new pe,this.sections.set(pe.NAME,i)):e===he.NAME?(i=new he,this.sections.set(he.NAME,i)):e===_e.NAME?(i=new _e,this.sections.set(_e.NAME,i)):e===ge.NAME?(i=new ge,this.sections.set(ge.NAME,i)):e===Te.NAME?(i=new Te,this.sections.set(Te.NAME,i)):e===Oe.NAME?(i=new Oe,this.sections.set(Oe.NAME,i)):e===Ne.NAME&&(i=new Ne,this.sections.set(Ne.NAME,i)),i)i.setFieldValue(t,s),this.dirty=!0,i.setIsDirty(!0);else throw new lt(e+"."+t+" not found")}setFieldValueBySectionId(e,t,s){this.setFieldValue(X.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(X.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).hasField(t):!1}hasFieldBySectionId(e,t){return this.hasField(X.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(X.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(X.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=new qe;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e=[];for(let t=0;t<X.SECTION_ORDER.length;t++){let s=X.SECTION_ORDER[t];if(this.sections.has(s)){let i=this.sections.get(s);e.push(i.getId())}}return e}encodeModel(e){let t=[],s=[];for(let r=0;r<X.SECTION_ORDER.length;r++){let o=X.SECTION_ORDER[r];if(e.has(o)){let a=e.get(o);t.push(a.encode()),s.push(a.getId())}}let i=new qe;return i.setFieldValue("SectionIds",s),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||e.length==0||e.startsWith("DB")){let t=e.split("~"),s=new Map;if(t[0].startsWith("D")){let i=new qe(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new p("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let r=0;r<i.length;r++){if(t[r+1].trim()==="")throw new p("Unable to decode '"+e+"'. Section "+(r+1)+" is blank.");if(i[r]===Ie.ID){let o=new Ie(t[r+1]);s.set(Ie.NAME,o)}else if(i[r]===J.ID){let o=new J(t[r+1]);s.set(J.NAME,o)}else if(i[r]===Ae.ID){let o=new Ae(t[r+1]);s.set(Ae.NAME,o)}else if(i[r]===ie.ID){let o=new ie(t[r+1]);s.set(ie.NAME,o)}else if(i[r]===ae.ID){let o=new ae(t[r+1]);s.set(ae.NAME,o)}else if(i[r]===ce.ID){let o=new ce(t[r+1]);s.set(ce.NAME,o)}else if(i[r]===le.ID){let o=new le(t[r+1]);s.set(le.NAME,o)}else if(i[r]===de.ID){let o=new de(t[r+1]);s.set(de.NAME,o)}else if(i[r]===Ee.ID){let o=new Ee(t[r+1]);s.set(Ee.NAME,o)}else if(i[r]===ue.ID){let o=new ue(t[r+1]);s.set(ue.NAME,o)}else if(i[r]===Se.ID){let o=new Se(t[r+1]);s.set(Se.NAME,o)}else if(i[r]===Ce.ID){let o=new Ce(t[r+1]);s.set(Ce.NAME,o)}else if(i[r]===pe.ID){let o=new pe(t[r+1]);s.set(pe.NAME,o)}else if(i[r]===he.ID){let o=new he(t[r+1]);s.set(he.NAME,o)}else if(i[r]===_e.ID){let o=new _e(t[r+1]);s.set(_e.NAME,o)}else if(i[r]===ge.ID){let o=new ge(t[r+1]);s.set(ge.NAME,o)}else if(i[r]===Te.ID){let o=new Te(t[r+1]);s.set(Te.NAME,o)}else if(i[r]===Oe.ID){let o=new Oe(t[r+1]);s.set(Oe.NAME,o)}else if(i[r]===Ne.ID){let o=new Ne(t[r+1]);s.set(Ne.NAME,o)}}}return s}else if(e.startsWith("C")){let t=new Map,s=new J(e);return t.set(J.NAME,s),new qe().setFieldValue(Ge.SECTION_IDS,[2]),t.set(qe.NAME,s),t}else throw new p("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(X.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let s=null;this.sections.has(e)?s=this.sections.get(e):e===Ie.NAME?(s=new Ie,this.sections.set(Ie.NAME,s)):e===J.NAME?(s=new J,this.sections.set(J.NAME,s)):e===Ae.NAME?(s=new Ae,this.sections.set(Ae.NAME,s)):e===ie.NAME?(s=new ie,this.sections.set(ie.NAME,s)):e===ae.NAME?(s=new ae,this.sections.set(ae.NAME,s)):e===ce.NAME?(s=new ce,this.sections.set(ce.NAME,s)):e===le.NAME?(s=new le,this.sections.set(le.NAME,s)):e===de.NAME?(s=new de,this.sections.set(de.NAME,s)):e===Ee.NAME?(s=new Ee,this.sections.set(Ee.NAME,s)):e===ue.NAME?(s=new ue,this.sections.set(ue.NAME,s)):e===Se.NAME?(s=new Se,this.sections.set(Se.NAME,s)):e===Ce.NAME?(s=new Ce,this.sections.set(Ce.NAME,s)):e===pe.NAME?(s=new pe,this.sections.set(pe.NAME,s)):e===he.NAME?(s=new he,this.sections.set(he.NAME,s)):e===_e.NAME?(s=new _e,this.sections.set(_e.NAME,s)):e===ge.NAME?(s=new ge,this.sections.set(ge.NAME,s)):e===Te.NAME?(s=new Te,this.sections.set(Te.NAME,s)):e===Oe.NAME?(s=new Oe,this.sections.set(Oe.NAME,s)):e===Ne.NAME&&(s=new Ne,this.sections.set(Ne.NAME,s)),s&&(s.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(X.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<X.SECTION_ORDER.length;t++){let s=X.SECTION_ORDER[t];this.sections.has(s)&&(e[s]=this.sections.get(s).toObj())}return e}encode(){return(this.encodedString==null||this.encodedString.length===0||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}var Ed=Object.defineProperty,ud=(n,e,t)=>e in n?Ed(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ve=(n,e,t)=>ud(n,typeof e!="symbol"?e+"":e,t);class Sd{constructor(){ve(this,"gppVersion","1.1"),ve(this,"supportedAPIs",[]),ve(this,"eventQueue",new Ur(this)),ve(this,"cmpStatus",it.LOADING),ve(this,"cmpDisplayStatus",ke.HIDDEN),ve(this,"signalStatus",be.NOT_READY),ve(this,"applicableSections",[]),ve(this,"gppModel",new hi),ve(this,"cmpId"),ve(this,"cmpVersion"),ve(this,"eventStatus")}reset(){this.eventQueue.clear(),this.cmpStatus=it.LOADING,this.cmpDisplayStatus=ke.HIDDEN,this.signalStatus=be.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new hi,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}class is{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let u=a.response;if(typeof u=="string")try{u=JSON.parse(u)}catch{}r(u)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class Yt extends Error{constructor(e){super(e),this.name="GVLError"}}var pd=Object.defineProperty,hd=(n,e,t)=>e in n?pd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_d=(n,e,t)=>hd(n,typeof e!="symbol"?e+"":e,t);const _i=class Pn{has(e){return Pn.langSet.has(e)}forEach(e){Pn.langSet.forEach(e)}get size(){return Pn.langSet.size}};_d(_i,"langSet",new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]));let gd=_i;var Td=Object.defineProperty,Od=(n,e,t)=>e in n?Td(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,q=(n,e,t)=>Od(n,typeof e!="symbol"?e+"":e,t),gi=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ti=class mn{constructor(){q(this,"vendors"),q(this,"consentLanguages",new gd),q(this,"gvlSpecificationVersion"),q(this,"vendorListVersion"),q(this,"tcfPolicyVersion"),q(this,"lastUpdated"),q(this,"purposes"),q(this,"specialPurposes"),q(this,"features"),q(this,"specialFeatures"),q(this,"stacks"),q(this,"dataCategories"),q(this,"language",mn.DEFAULT_LANGUAGE),q(this,"vendorIds"),q(this,"ready",!1),q(this,"fullVendorList"),q(this,"byPurposeVendorMap"),q(this,"bySpecialPurposeVendorMap"),q(this,"byFeatureVendorMap"),q(this,"bySpecialFeatureVendorMap"),q(this,"baseUrl"),q(this,"languageFilename","purposes-[LANG].json")}static fromVendorList(e){let t=new mn;return t.populate(e),t}static fromUrl(e){return gi(this,null,function*(){let t=e.baseUrl;if(!t||t.length===0)throw new Yt("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new Yt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&t[t.length-1]!=="/"&&(t+="/");let s=new mn;if(s.baseUrl=t,e.languageFilename?s.languageFilename=e.languageFilename:s.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let r=t+i.replace("[VERSION]",String(e.version));s.populate(yield is.fetch(r))}else{let i=e.latestFilename;i||(i="vendor-list.json");let r=t+i;s.populate(yield is.fetch(r))}return s})}changeLanguage(e){return gi(this,null,function*(){const t=e.toUpperCase();if(this.consentLanguages.has(t)){if(t!==this.language){this.language=t;const s=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(yield is.fetch(s))}catch(i){throw new Yt("unable to load language: "+i.message)}}}else throw new Yt(`unsupported language ${e}`)})}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors=e.reduce((t,s)=>{const i=this.vendors[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes&&i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.impConsPurposes&&i.impConsPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].impCons.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};q(Ti,"DEFAULT_LANGUAGE","EN");let Oi=Ti;var Nd=Object.defineProperty,Id=(n,e,t)=>e in n?Nd(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ni=(n,e,t)=>Id(n,typeof e!="symbol"?e+"":e,t),Ad=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});class Cd{constructor(e,t,s){Ni(this,"callResponder"),Ni(this,"cmpApiContext"),this.cmpApiContext=new Sd,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new Rr(this.cmpApiContext,s)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(X.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(X.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,s){this.cmpApiContext.gppModel.setFieldValue(e,t,s)}setFieldValueBySectionId(e,t,s){this.setFieldValue(X.SECTION_ID_NAME_MAP.get(e),t,s)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(X.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(X.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(X.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(X.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return Oi.fromVendorList(e)}getGvlFromUrl(e){return Ad(this,null,function*(){return Oi.fromUrl(e)})}}const Pd=/^(?:([a-z]{2})(-[a-z0-9]{1,3})?|(eea))$/i;var md=Object.defineProperty,fd=(n,e,t)=>e in n?md(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rs=(n,e,t)=>fd(n,typeof e!="symbol"?e+"":e,t);class Ii{constructor(e,t,s){rs(this,"consentPreference"),rs(this,"notice"),rs(this,"noticeHistoryId"),this.notice=e,this.consentPreference=t,this.noticeHistoryId=s}}var Ai;(n=>{(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFgdprApplies||(n.IABTCFgdprApplies={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFPurposeOneTreatment||(n.IABTCFPurposeOneTreatment={})),(e=>(e[e._0=0]="_0",e[e._1=1]="_1"))(n.IABTCFUseNonStandardTexts||(n.IABTCFUseNonStandardTexts={}))})(Ai||(Ai={}));var wd=(n=>(n.GPP_US_NATIONAL="gpp_us_national",n.GPP_US_STATE="gpp_us_state",n))(wd||{}),Dd=(n=>(n.FRONTEND="frontend",n.SYSTEM_WIDE="system_wide",n.NOT_APPLICABLE="not_applicable",n))(Dd||{}),Ci=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.NOTICE_ONLY="notice_only",n))(Ci||{}),Fe=(n=>(n.OPT_IN="opt_in",n.OPT_OUT="opt_out",n.ACKNOWLEDGE="acknowledge",n.TCF="tcf",n))(Fe||{}),Et=(n=>(n.OVERLAY="overlay",n.BANNER_AND_MODAL="banner_and_modal",n.MODAL="modal",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.HEADLESS="headless",n))(Et||{}),bd=(n=>(n.ALWAYS_ENABLED="always_enabled",n.ENABLED_WHERE_REQUIRED="enabled_where_required",n.ALWAYS_DISABLED="always_disabled",n))(bd||{}),Vd=(n=>(n.OPTIONS="options",n.EXPERIENCE_TRANSLATION="language",n))(Vd||{}),vd=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.TERTIARY="tertiary",n))(vd||{}),Rd=(n=>(n.ACKNOWLEDGE="acknowledge",n.OPT_IN_OPT_OUT="opt_in_opt_out",n))(Rd||{}),Pi=(n=>(n.BUTTON="button",n.REJECT="reject",n.ACCEPT="accept",n.SCRIPT="script",n.SAVE="save",n.DISMISS="dismiss",n.GPC="gpc",n.INDIVIDUAL_NOTICE="individual_notice",n.ACKNOWLEDGE="acknowledge",n))(Pi||{}),Md=(n=>(n.privacy_center="privacy_center",n.overlay="overlay",n.api="api",n))(Md||{}),yd=(n=>(n.NONE="none",n.APPLIED="applied",n.OVERRIDDEN="overridden",n))(yd||{}),Ud=(n=>(n.OVERLAY="overlay",n.MODAL="modal",n.BANNER="banner",n.PRIVACY_CENTER="privacy_center",n.TCF_OVERLAY="tcf_overlay",n.TCF_BANNER="tcf_banner",n))(Ud||{});const Ld=(n,e)=>!!Object.keys(e).includes(n.notice_key),mi=n=>!n||n===Fe.OPT_OUT?!1:n===Fe.OPT_IN?!0:n===Fe.ACKNOWLEDGE,zt=(n,e)=>n?e===Ci.NOTICE_ONLY?Fe.ACKNOWLEDGE:Fe.OPT_IN:Fe.OPT_OUT,ut=n=>!n||typeof n!="object"?!1:Object.keys(n).length===0||"id"in n,fi=n=>!!(n&&n.every(e=>e.default_preference===Fe.OPT_IN)),Gd=n=>n?n.location&&Pd.test(n.location)?n.location.replace("-","_").toLowerCase():n.country&&n.region?`${n.country.toLowerCase()}_${n.region.toLowerCase()}`:null:null,Fd=(n,e,t)=>{var s,i,r,o,a,l;return((s=n.experience_config)==null?void 0:s.component)===Et.TCF_OVERLAY?(i=n.meta)!=null&&i.version_hash?n.meta.version_hash!==e.tcf_version_hash:!0:((r=n.experience_config)==null?void 0:r.component)===Et.MODAL||((o=n.experience_config)==null?void 0:o.component)===Et.HEADLESS||!((a=n?.privacy_notices)!=null&&a.length)?!1:t?!((l=n.privacy_notices)!=null&&l.every(d=>Ld(d,t))):!0},xd=(n,e)=>n.map(t=>{var s;const i=zt(e.includes(t.notice.notice_key),t.notice.consent_mechanism);return new Ii(t.notice,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wt={exports:{}};/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */Wt.exports,function(n,e){(function(t){var s=e,i=n&&n.exports==s&&n,r=typeof os=="object"&&os;(r.global===r||r.window===r)&&(t=r);var o=function(A){this.message=A};o.prototype=new Error,o.prototype.name="InvalidCharacterError";var a=function(A){throw new o(A)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=/[\t\n\f\r ]/g,S=function(A){A=String(A).replace(d,"");var W=A.length;W%4==0&&(A=A.replace(/==?$/,""),W=A.length),(W%4==1||/[^+a-zA-Z0-9/]/.test(A))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var k=0,H,Z,me="",Qe=-1;++Qe<W;)Z=l.indexOf(A.charAt(Qe)),H=k%4?H*64+Z:Z,k++%4&&(me+=String.fromCharCode(255&H>>(-2*k&6)));return me},_=function(A){A=String(A),/[^\0-\xFF]/.test(A)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var W=A.length%3,k="",H=-1,Z,me,Qe,fe,hr=A.length-W;++H<hr;)Z=A.charCodeAt(H)<<16,me=A.charCodeAt(++H)<<8,Qe=A.charCodeAt(++H),fe=Z+me+Qe,k+=l.charAt(fe>>18&63)+l.charAt(fe>>12&63)+l.charAt(fe>>6&63)+l.charAt(fe&63);return W==2?(Z=A.charCodeAt(H)<<8,me=A.charCodeAt(++H),fe=Z+me,k+=l.charAt(fe>>10)+l.charAt(fe>>4&63)+l.charAt(fe<<2&63)+"="):W==1&&(fe=A.charCodeAt(H),k+=l.charAt(fe>>2)+l.charAt(fe<<4&63)+"=="),k},u={encode:_,decode:S,version:"1.0.0"};if(s&&!s.nodeType)if(i)i.exports=u;else for(var N in u)u.hasOwnProperty(N)&&(s[N]=u[N]);else t.base64=u})(os)}(Wt,Wt.exports);var wi=Wt.exports;/*! js-cookie v3.0.5 | MIT */function Qt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)n[s]=t[s]}return n}var $d={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function as(n,e){function t(i,r,o){if(!(typeof document>"u")){o=Qt({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in o)o[l]&&(a+="; "+l,o[l]!==!0&&(a+="="+o[l].split(";")[0]));return document.cookie=i+"="+n.write(r,i)+a}}function s(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var r=document.cookie?document.cookie.split("; "):[],o={},a=0;a<r.length;a++){var l=r[a].split("="),d=l.slice(1).join("=");try{var S=decodeURIComponent(l[0]);if(o[S]=n.read(d,S),i===S)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:s,remove:function(i,r){t(i,"",Qt({},r,{expires:-1}))},withAttributes:function(i){return as(this.converter,Qt({},this.attributes,i))},withConverter:function(i){return as(Qt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var jd=as($d,{path:"/"});let qt;const Hd=new Uint8Array(16);function kd(){if(!qt&&(qt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qt(Hd)}const oe=[];for(let n=0;n<256;++n)oe.push((n+256).toString(16).slice(1));function Bd(n,e=0){return oe[n[e+0]]+oe[n[e+1]]+oe[n[e+2]]+oe[n[e+3]]+"-"+oe[n[e+4]]+oe[n[e+5]]+"-"+oe[n[e+6]]+oe[n[e+7]]+"-"+oe[n[e+8]]+oe[n[e+9]]+"-"+oe[n[e+10]]+oe[n[e+11]]+oe[n[e+12]]+oe[n[e+13]]+oe[n[e+14]]+oe[n[e+15]]}const Kd=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Di={randomUUID:Kd};function Yd(n,e,t){if(Di.randomUUID&&!e&&!n)return Di.randomUUID();n=n||{};const s=n.random||(n.rng||kd)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(let i=0;i<16;++i)e[t+i]=s[i];return e}return Bd(s)}var zd=(n=>(n.CONSENT="Consent",n.CONTRACT="Contract",n.LEGAL_OBLIGATIONS="Legal obligations",n.VITAL_INTERESTS="Vital interests",n.PUBLIC_INTEREST="Public interest",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(zd||{}),cs=(n=>(n.CONSENT="Consent",n.LEGITIMATE_INTERESTS="Legitimate interests",n))(cs||{});const ls=407,St=",",Wd=[{experienceKey:"tcf_purpose_consents",tcfModelKey:"purposeConsents",enabledIdsKey:"purposesConsent"},{experienceKey:"tcf_purpose_legitimate_interests",tcfModelKey:"purposeLegitimateInterests",enabledIdsKey:"purposesLegint"},{experienceKey:"tcf_special_features",tcfModelKey:"specialFeatureOptins",enabledIdsKey:"specialFeatures"},{experienceKey:"tcf_vendor_consents",tcfModelKey:"vendorConsents",enabledIdsKey:"vendorsConsent"},{experienceKey:"tcf_vendor_legitimate_interests",tcfModelKey:"vendorLegitimateInterests",enabledIdsKey:"vendorsLegint"}],Qd=[{cookieKey:"system_consent_preferences",experienceKey:"tcf_system_consents"},{cookieKey:"system_legitimate_interests_preferences",experienceKey:"tcf_system_legitimate_interests"}];Wd.filter(({experienceKey:n})=>n!=="tcf_features"&&n!=="tcf_special_purposes").map(n=>n.experienceKey),cs.CONSENT.toString(),cs.LEGITIMATE_INTERESTS.toString();const qd={purposesConsent:[],customPurposesConsent:[],purposesLegint:[],specialPurposes:[],features:[],specialFeatures:[],vendorsConsent:[],vendorsLegint:[]},bi="fides_consent",Jd=365,Jt=jd.withConverter({read(n){return decodeURIComponent(n)},write(n){return encodeURIComponent(n)}}),Xd=()=>Yd();Xd();const Zd=n=>Jt.get(n),eE=()=>{const n=Zd(bi);if(n)try{return JSON.parse(n)}catch{try{return JSON.parse(wi.decode(n))}catch{return}}},Vi=(n,e=!1)=>{if(typeof document>"u")return;const t=new Date().toISOString();n.fides_meta.updatedAt=t;let s=JSON.stringify(n);e&&(s=wi.encode(s));const i=window.location.hostname.split(".");let r="";for(let o=1;o<=i.length;o+=1)if(r=i.slice(-o).join("."),Jt.set(bi,s,{path:"/",domain:r,expires:Jd})){const a=eE();if(a&&a.fides_meta.updatedAt===n.fides_meta.updatedAt)break}},tE=n=>{const e={};return Qd.forEach(({cookieKey:t})=>{var s;const i=(s=n[t])!=null?s:[];e[t]=Object.fromEntries(i.map(r=>[r.id,mi(r.preference)]))}),e},nE=(n,e=!0)=>{n.forEach(t=>{var s;if(Jt.remove(t.name,{path:(s=t.path)!=null?s:"/",domain:t.domain}),e){const{hostname:i}=window.location;Jt.remove(t.name,{domain:`.${i}`})}})},sE=n=>{const e=new Map(n.map(({notice:t,consentPreference:s})=>[t.notice_key,mi(s)]));return Object.fromEntries(e)};var iE=(n=>(n.GVL="gvl",n.AC="gacp",n))(iE||{});const Be=n=>{const e=n.split(".");return e.length===1?{source:void 0,id:e[0]}:{source:e[0],id:e[1]}},Xt=(n,e)=>{if(!e)return;const{source:t,id:s}=Be(n);if(t==="gvl"||t===void 0)return e.vendors[s]},rE=n=>Be(n).source==="gacp",oE=n=>{const{tcf_vendor_relationships:e=[]}=n;return e.map(t=>t.id).filter(t=>Xt(t,n.gvl)).map(t=>+Be(t).id)},aE=n=>{const e=[...n.tcf_vendor_consent_ids||[],...n.tcf_vendor_legitimate_interest_ids||[]];return[...new Set(e)].filter(t=>Xt(t,n.gvl)).map(t=>+Be(t).id)},cE=n=>{if(!n)return{tc:"",ac:"",gpp:""};const[e="",t="",s=""]=n.split(St);return e?{tc:e,ac:t,gpp:s}:{tc:"",ac:"",gpp:s}},vi=n=>{var e;const t=n.getGppString();return window.Fides.options.tcfEnabled?[...((e=window.Fides.fides_string)==null?void 0:e.split(St))||[],"",""].slice(0,2).concat(t||"").join(St):`,${t?`,${t}`:""}`},lE=1,Xe={us:{name:ie.NAME,id:ie.ID},us_ca:{name:ae.NAME,id:ae.ID},us_co:{name:le.NAME,id:le.ID},us_ct:{name:Ee.NAME,id:Ee.ID},us_ut:{name:de.NAME,id:de.ID},us_va:{name:ce.NAME,id:ce.ID},us_de:{name:he.NAME,id:he.ID},us_fl:{name:ue.NAME,id:ue.ID},us_ia:{name:_e.NAME,id:_e.ID},us_mt:{name:Se.NAME,id:Se.ID},us_ne:{name:ge.NAME,id:ge.ID},us_nh:{name:Te.NAME,id:Te.ID},us_nj:{name:Oe.NAME,id:Oe.ID},us_tn:{name:Ne.NAME,id:Ne.ID},us_tx:{name:pe.NAME,id:pe.ID}};function Ri(n,e){return n.toLowerCase().replaceAll("_","-")===e.toLowerCase().replaceAll("_","-")}var dE=Object.defineProperty,EE=Object.defineProperties,uE=Object.getOwnPropertyDescriptors,Mi=Object.getOwnPropertySymbols,SE=Object.prototype.hasOwnProperty,pE=Object.prototype.propertyIsEnumerable,yi=(n,e,t)=>e in n?dE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ui=(n,e)=>{for(var t in e||(e={}))SE.call(e,t)&&yi(n,t,e[t]);if(Mi)for(var t of Mi(e))pE.call(e,t)&&yi(n,t,e[t]);return n},Li=(n,e)=>EE(n,uE(e)),hE=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())}),_E=(n=>(n.PRIVACY_EXPERIENCE="/privacy-experience",n.PRIVACY_PREFERENCES="/privacy-preferences",n.GVL_TRANSLATIONS="/privacy-experience/gvl/translations",n.NOTICES_SERVED="/notices-served",n))(_E||{});const gE={method:"PATCH",mode:"cors",headers:{"Content-Type":"application/json"}},TE="Fides.js",OE=(n,e,t,s,i)=>hE(void 0,null,function*(){var r;if((r=t.apiOptions)!=null&&r.savePreferencesFn){try{yield t.apiOptions.savePreferencesFn(n,s.consent,s.fides_string,i)}catch(l){return Promise.reject(l)}return Promise.resolve()}const o=Li(Ui({},gE),{body:JSON.stringify(Li(Ui({},e),{source:TE}))});return(yield fetch(`${t.fidesApiUrl}/privacy-preferences`,o)).ok,Promise.resolve()});var NE=Object.defineProperty,IE=Object.defineProperties,AE=Object.getOwnPropertyDescriptors,Gi=Object.getOwnPropertySymbols,CE=Object.prototype.hasOwnProperty,PE=Object.prototype.propertyIsEnumerable,Fi=(n,e,t)=>e in n?NE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xi=(n,e)=>{for(var t in e||(e={}))CE.call(e,t)&&Fi(n,t,e[t]);if(Gi)for(var t of Gi(e))PE.call(e,t)&&Fi(n,t,e[t]);return n},mE=(n,e)=>IE(n,AE(e));const $i=(n,e,t,s)=>{var i;if(typeof window<"u"&&typeof CustomEvent<"u"){const r=xi({consentMethod:e?.fides_meta.consentMethod},s),o=(i=performance?.mark)==null?void 0:i.call(performance,n),a=o?.startTime,l=new CustomEvent(n,{detail:mE(xi({},e),{debug:t,extraDetails:r,timestamp:a}),bubbles:!0});window.dispatchEvent(l)}};var fE=Object.defineProperty,ji=Object.getOwnPropertySymbols,wE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Hi=(n,e,t)=>e in n?fE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bE=(n,e)=>{for(var t in e||(e={}))wE.call(e,t)&&Hi(n,t,e[t]);if(ji)for(var t of ji(e))DE.call(e,t)&&Hi(n,t,e[t]);return n},ki=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});function VE(n,e,t,s,i,r,o,a,l,d){return ki(this,null,function*(){const S=(r||[]).map(u=>({preference:u.consentPreference,privacy_notice_history_id:u.noticeHistoryId||""})),_=bE({browser_identity:e.identity,preferences:S,privacy_experience_config_history_id:i,user_geography:a,method:s,served_notice_history_id:l,property_id:d},o??[]);yield OE(s,_,n,e,t)})}const vE=n=>ki(void 0,[n],function*({consentPreferencesToSave:e,privacyExperienceConfigHistoryId:t,experience:s,consentMethod:i,options:r,userLocationString:o,cookie:a,servedNoticeHistoryId:l,tcf:d,updateCookie:S,propertyId:_}){const u=yield S(a);if(Object.assign(a,u),Object.assign(a.fides_meta,{consentMethod:i}),$i("FidesUpdating",a,r.debug),window.Fides.consent=a.consent,window.Fides.fides_string=a.fides_string,window.Fides.tcf_consent=a.tcf_consent,Vi(a,r.base64Cookie),window.Fides.saved_consent=a.consent,!r.fidesDisableSaveApi)try{yield VE(r,a,s,i,t,e,d,o,l,_)}catch{}e&&e.filter(N=>N.consentPreference===Fe.OPT_OUT).forEach(N=>{var A,W;(A=N.notice)!=null&&A.cookies&&nE(N.notice.cookies,(W=s.experience_config)==null?void 0:W.auto_subdomain_cookie_deletion)}),$i("FidesUpdated",a,r.debug)});class Ke extends Error{constructor(e){super(e),this.name="DecodingError"}}class xe extends Error{constructor(e){super(e),this.name="EncodingError"}}class pt extends Error{constructor(e){super(e),this.name="GVLError"}}class $e extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class ds{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new xe("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let i=0;i<e.length;i+=this.BASIS)s+=this.DICT[parseInt(e.substr(i,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new Ke("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const i=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-i.length)+i}return t}}class je{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SR-LATN","SR-CYRL","SV","TL","TR","UK","ZH"]);has(e){return je.langSet.has(e)}parseLanguage(e){e=e.toUpperCase();const t=e.split("-")[0];if(e.length>=2&&t.length==2){if(je.langSet.has(e))return e;if(je.langSet.has(t))return t;const s=t+"-"+t;if(je.langSet.has(s))return s;for(const i of je.langSet)if(i.indexOf(e)!==-1||i.indexOf(t)!==-1)return i}throw new Error(`unsupported language ${e}`)}forEach(e){je.langSet.forEach(e)}get size(){return je.langSet.size}}class E{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class ht{clone(){const e=new this.constructor;return Object.keys(this).forEach(s=>{const i=this.deepClone(this[s]);i!==void 0&&(e[s]=i)}),e}deepClone(e){const t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){const s=[];for(const i of e)s.push(this.deepClone(i));return e instanceof Array?s:new e.constructor(s)}else{const s={};for(const i in e)e.hasOwnProperty(i)&&(s[i]=this.deepClone(e[i]));return s}}}}var Ue;(function(n){n[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"})(Ue||(Ue={}));class We extends ht{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new We;if(t.length!==2)throw new $e("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${We.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===Ue.NOT_ALLOWED||this.restrictionType===Ue.REQUIRE_CONSENT||this.restrictionType===Ue.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class Bi extends ht{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let i=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[s];if(r)if(e===Ue.NOT_ALLOWED)i=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case Ue.REQUIRE_CONSENT:i=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case Ue.REQUIRE_LI:i=r.flexiblePurposes.includes(t)&&r.purposes.includes(t);break}else i=!1;else i=!1}return i}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,i=t[t.length-1],r=[...Array(i).keys()].map(o=>o+1);if(!this.has(s))this.map.set(s,new Set(r)),this.bitLength=0;else for(let o=1;o<=i;o++)this.map.get(s).add(o)}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const s=new Set;this.map.forEach(i=>{i.forEach(r=>{s.add(r)})}),t=Array.from(s)}return t.sort((s,i)=>s-i)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(i=>{i.purposeId===t&&(s===void 0||s>i.restrictionType)&&(s=i.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const i=this.getRestrictions(e);for(let r=0;r<i.length&&!s;r++)s=t.isSameAs(i[r]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,i)=>{e?s.has(e)&&t.push(We.unHash(i)):t.push(We.unHash(i))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(We.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,i=this.map.get(s);i&&(i.delete(e),i.size==0&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{const i=We.unHash(s);Array.from(t).forEach(o=>{this.isOkToHave(i.restrictionType,i.purposeId,o)||t.delete(o)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}}var Ki;(function(n){n.COOKIE="cookie",n.WEB="web",n.APP="app"})(Ki||(Ki={}));var z;(function(n){n.CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"})(z||(z={}));class Yi{static ID_TO_KEY=[z.CORE,z.VENDORS_DISCLOSED,z.VENDORS_ALLOWED,z.PUBLISHER_TC];static KEY_TO_ID={[z.CORE]:0,[z.VENDORS_DISCLOSED]:1,[z.VENDORS_ALLOWED]:2,[z.PUBLISHER_TC]:3}}class Pe extends ht{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let i=Number.isInteger(parseInt(s,10));return i=i&&this.isValidNumber(e[s].id),i=i&&e[s].name!==void 0,i}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new $e("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class g{static[E.cmpId]=12;static[E.cmpVersion]=12;static[E.consentLanguage]=12;static[E.consentScreen]=6;static[E.created]=36;static[E.isServiceSpecific]=1;static[E.lastUpdated]=36;static[E.policyVersion]=6;static[E.publisherCountryCode]=12;static[E.publisherLegitimateInterests]=24;static[E.publisherConsents]=24;static[E.purposeConsents]=24;static[E.purposeLegitimateInterests]=24;static[E.purposeOneTreatment]=1;static[E.specialFeatureOptins]=12;static[E.useNonStandardTexts]=1;static[E.vendorListVersion]=12;static[E.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class Le{static encode(e){return String(Number(e))}static decode(e){return e==="1"}}class P{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new xe(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new Ke("invalid bit length");return parseInt(e,2)}}class zi{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new Ke("invalid bit length");const s=new Date;return s.setTime(P.decode(e,t)*100),s}}class Ye{static encode(e,t){let s="";for(let i=1;i<=t;i++)s+=Le.encode(e.has(i));return s}static decode(e,t){if(e.length!==t)throw new Ke("bitfield encoding length mismatch");const s=new Pe;for(let i=1;i<=t;i++)Le.decode(e[i-1])&&s.set(i);return s.bitLength=e.length,s}}class Wi{static encode(e,t){e=e.toUpperCase();const s=65,i=e.charCodeAt(0)-s,r=e.charCodeAt(1)-s;if(i<0||i>25||r<0||r>25)throw new xe(`invalid language code: ${e}`);if(t%2===1)throw new xe(`numBits must be even, ${t} is not valid`);t=t/2;const o=P.encode(i,t),a=P.encode(r,t);return o+a}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){const r=e.length/2,o=P.decode(e.slice(0,r),r)+65,a=P.decode(e.slice(r),r)+65;s=String.fromCharCode(o)+String.fromCharCode(a)}else throw new Ke("invalid bit length for language");return s}}class RE{static encode(e){let t=P.encode(e.numRestrictions,g.numRestrictions);if(!e.isEmpty()){const s=(i,r)=>{for(let o=i+1;o<=r;o++)if(e.gvl.vendorIds.has(o))return o;return i};e.getRestrictions().forEach(i=>{t+=P.encode(i.purposeId,g.purposeId),t+=P.encode(i.restrictionType,g.restrictionType);const r=e.getVendors(i),o=r.length;let a=0,l=0,d="";for(let S=0;S<o;S++){const _=r[S];if(l===0&&(a++,l=_),S===o-1||r[S+1]>s(_,r[o-1])){const u=_!==l;d+=Le.encode(u),d+=P.encode(l,g.vendorId),u&&(d+=P.encode(_,g.vendorId)),l=0}}t+=P.encode(a,g.numEntries),t+=d})}return t}static decode(e){let t=0;const s=new Bi,i=P.decode(e.substr(t,g.numRestrictions),g.numRestrictions);t+=g.numRestrictions;for(let r=0;r<i;r++){const o=P.decode(e.substr(t,g.purposeId),g.purposeId);t+=g.purposeId;const a=P.decode(e.substr(t,g.restrictionType),g.restrictionType);t+=g.restrictionType;const l=new We(o,a),d=P.decode(e.substr(t,g.numEntries),g.numEntries);t+=g.numEntries;for(let S=0;S<d;S++){const _=Le.decode(e.substr(t,g.anyBoolean));t+=g.anyBoolean;const u=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,_){const N=P.decode(e.substr(t,g.vendorId),g.vendorId);if(t+=g.vendorId,N<u)throw new Ke(`Invalid RangeEntry: endVendorId ${N} is less than ${u}`);for(let A=u;A<=N;A++)s.add(A,l)}else s.add(u,l)}}return s.bitLength=t,s}}var _t;(function(n){n[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"})(_t||(_t={}));class gt{static encode(e){const t=[];let s=[],i=P.encode(e.maxId,g.maxId),r="",o;const a=g.maxId+g.encodingType,l=a+e.maxId,d=g.vendorId*2+g.singleOrRange+g.numEntries;let S=a+g.numEntries;return e.forEach((_,u)=>{r+=Le.encode(_),o=e.maxId>d&&S<l,o&&_&&(e.has(u+1)?s.length===0&&(s.push(u),S+=g.singleOrRange,S+=g.vendorId):(s.push(u),S+=g.vendorId,t.push(s),s=[]))}),o?(i+=String(_t.RANGE),i+=this.buildRangeEncoding(t)):(i+=String(_t.FIELD),i+=r),i}static decode(e,t){let s,i=0;const r=P.decode(e.substr(i,g.maxId),g.maxId);i+=g.maxId;const o=P.decode(e.charAt(i),g.encodingType);if(i+=g.encodingType,o===_t.RANGE){if(s=new Pe,t===1){if(e.substr(i,1)==="1")throw new Ke("Unable to decode default consent=1");i++}const a=P.decode(e.substr(i,g.numEntries),g.numEntries);i+=g.numEntries;for(let l=0;l<a;l++){const d=Le.decode(e.charAt(i));i+=g.singleOrRange;const S=P.decode(e.substr(i,g.vendorId),g.vendorId);if(i+=g.vendorId,d){const _=P.decode(e.substr(i,g.vendorId),g.vendorId);i+=g.vendorId;for(let u=S;u<=_;u++)s.set(u)}else s.set(S)}}else{const a=e.substr(i,r);i+=r,s=Ye.decode(a,r)}return s.bitLength=i,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,g.numEntries);return e.forEach(i=>{const r=i.length===1;s+=Le.encode(!r),s+=P.encode(i[0],g.vendorId),r||(s+=P.encode(i[1],g.vendorId))}),s}}function Qi(){return{[E.version]:P,[E.created]:zi,[E.lastUpdated]:zi,[E.cmpId]:P,[E.cmpVersion]:P,[E.consentScreen]:P,[E.consentLanguage]:Wi,[E.vendorListVersion]:P,[E.policyVersion]:P,[E.isServiceSpecific]:Le,[E.useNonStandardTexts]:Le,[E.specialFeatureOptins]:Ye,[E.purposeConsents]:Ye,[E.purposeLegitimateInterests]:Ye,[E.purposeOneTreatment]:Le,[E.publisherCountryCode]:Wi,[E.vendorConsents]:gt,[E.vendorLegitimateInterests]:gt,[E.publisherRestrictions]:RE,segmentType:P,[E.vendorsDisclosed]:gt,[E.vendorsAllowed]:gt,[E.publisherConsents]:Ye,[E.publisherLegitimateInterests]:Ye,[E.numCustomPurposes]:P,[E.publisherCustomConsents]:Ye,[E.publisherCustomLegitimateInterests]:Ye}}class ME{1={[z.CORE]:[E.version,E.created,E.lastUpdated,E.cmpId,E.cmpVersion,E.consentScreen,E.consentLanguage,E.vendorListVersion,E.purposeConsents,E.vendorConsents]};2={[z.CORE]:[E.version,E.created,E.lastUpdated,E.cmpId,E.cmpVersion,E.consentScreen,E.consentLanguage,E.vendorListVersion,E.policyVersion,E.isServiceSpecific,E.useNonStandardTexts,E.specialFeatureOptins,E.purposeConsents,E.purposeLegitimateInterests,E.purposeOneTreatment,E.publisherCountryCode,E.vendorConsents,E.vendorLegitimateInterests,E.publisherRestrictions],[z.PUBLISHER_TC]:[E.publisherConsents,E.publisherLegitimateInterests,E.numCustomPurposes,E.publisherCustomConsents,E.publisherCustomLegitimateInterests],[z.VENDORS_ALLOWED]:[E.vendorsAllowed],[z.VENDORS_DISCLOSED]:[E.vendorsDisclosed]}}class yE{1=[z.CORE];2=[z.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(z.PUBLISHER_TC);else{const s=!!(t&&t.isForVendors);(!s||e[E.supportOOB]===!0)&&this[2].push(z.VENDORS_DISCLOSED),s&&(e[E.supportOOB]&&e[E.vendorsAllowed].size>0&&this[2].push(z.VENDORS_ALLOWED),this[2].push(z.PUBLISHER_TC))}}}class qi{static fieldSequence=new ME;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new xe(`Unable to encode version: ${e.version}, segment: ${t}`)}let i="";t!==z.CORE&&(i=P.encode(Yi.KEY_TO_ID[t],g.segmentType));const r=Qi();return s.forEach(o=>{const a=e[o],l=r[o];let d=g[o];d===void 0&&this.isPublisherCustom(o)&&(d=Number(e[E.numCustomPurposes]));try{i+=l.encode(a,d)}catch(S){throw new xe(`Error encoding ${t}->${o}: ${S.message}`)}}),ds.encode(i)}static decode(e,t,s){const i=ds.decode(e);let r=0;s===z.CORE&&(t.version=P.decode(i.substr(r,g[E.version]),g[E.version])),s!==z.CORE&&(r+=g.segmentType);const o=this.fieldSequence[String(t.version)][s],a=Qi();return o.forEach(l=>{const d=a[l];let S=g[l];if(S===void 0&&this.isPublisherCustom(l)&&(S=Number(t[E.numCustomPurposes])),S!==0){const _=i.substr(r,S);if(d===gt?t[l]=d.decode(_,t.version):t[l]=d.decode(_,S),Number.isInteger(S))r+=S;else if(Number.isInteger(t[l].bitLength))r+=t[l].bitLength;else throw new Ke(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}}class UE{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((i,r)=>{i.forEach((o,a)=>{if(o){const l=t.vendors[a];if(!l||l.deletedDate)i.unset(a);else if(l[r].length===0&&!(r==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0))if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)i.unset(a);else{const d=e.publisherRestrictions.getRestrictions(a);let S=!1;for(let _=0,u=d.length;_<u&&!S;_++)S=d[_].restrictionType===Ue.REQUIRE_CONSENT&&r==="purposes"||d[_].restrictionType===Ue.REQUIRE_LI&&r==="legIntPurposes";S||i.unset(a)}else i.unset(a)}})}),e.vendorsDisclosed.set(t.vendors),e}];static process(e,t){const s=e.gvl;if(!s)throw new xe("Unable to encode TCModel without a GVL");if(!s.isReady)throw new xe("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");e=e.clone(),e.consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const i=e.version-1;if(!this.processor[i])throw new xe(`Invalid version: ${e.version}`);return this.processor[i](e,s)}}class LE{static absCall(e,t,s,i){return new Promise((r,o)=>{const a=new XMLHttpRequest,l=()=>{if(a.readyState==XMLHttpRequest.DONE)if(a.status>=200&&a.status<300){let u=a.response;if(typeof u=="string")try{u=JSON.parse(u)}catch{}r(u)}else o(new Error(`HTTP Status: ${a.status} response type: ${a.responseType}`))},d=()=>{o(new Error("error"))},S=()=>{o(new Error("aborted"))},_=()=>{o(new Error("Timeout "+i+"ms "+e))};a.withCredentials=s,a.addEventListener("load",l),a.addEventListener("error",d),a.addEventListener("abort",S),t===null?a.open("GET",e,!0):a.open("POST",e,!0),a.responseType="json",a.timeout=i,a.ontimeout=_,a.send(t)})}static post(e,t,s=!1,i=0){return this.absCall(e,JSON.stringify(t),s,i)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class I extends ht{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new je;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new pt("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e){super();let t=I.baseUrl;if(this.lang_=I.DEFAULT_LANGUAGE,this.cacheLang_=I.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!t)throw new pt("must specify GVL.baseUrl before loading GVL json");if(e>0){const s=e;I.CACHE.has(s)?(this.populate(I.CACHE.get(s)),this.readyPromise=Promise.resolve()):(t+=I.versionedFilename.replace("[VERSION]",String(s)),this.readyPromise=this.fetchJson(t))}else I.CACHE.has(I.LATEST_CACHE_KEY)?(this.populate(I.CACHE.get(I.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(t+I.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e==null&&I.LANGUAGE_CACHE.size>0?(I.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(I.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(I.CACHE.delete(e),t=!0):e===void 0&&(I.CACHE=new Map,t=!0),t}cacheLanguage(){I.LANGUAGE_CACHE.has(this.cacheLang_)||I.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await LE.fetch(e))}catch(t){throw new pt(t.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=I.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=I.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=I.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=I.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=I.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=I.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{...typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(t=>({langId:t.langId,privacy:t.privacy,...t.legIntClaim?{legIntClaim:t.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},...typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{},...e.usesNonCookieAccess!==void 0?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=I.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=I.consentLanguages.parseLanguage(e)}catch(i){throw new pt("Error during parsing the language: "+i.message)}const s=e.toUpperCase();if(!(t.toLowerCase()===I.DEFAULT_LANGUAGE.toLowerCase()&&!I.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,I.LANGUAGE_CACHE.has(s)){const i=I.LANGUAGE_CACHE.get(s);for(const r in i)i.hasOwnProperty(r)&&(this[r]=i[r])}else{const i=I.baseUrl+I.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(i),this.cacheLang_=s,this.cacheLanguage()}catch(r){throw new pt("unable to load language: "+r.message)}}}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&I.CACHE.set(I.LATEST_CACHE_KEY,this.getJson()),I.CACHE.has(this.vendorListVersion)||I.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{const i=this.vendors_[String(s)];return i&&i.deletedDate===void 0&&(i.purposes.forEach(r=>{this.byPurposeVendorMap[String(r)].consent.add(s)}),i.specialPurposes.forEach(r=>{this.bySpecialPurposeVendorMap[String(r)].add(s)}),i.legIntPurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].legInt.add(s)}),i.flexiblePurposes&&i.flexiblePurposes.forEach(r=>{this.byPurposeVendorMap[String(r)].flexible.add(s)}),i.features.forEach(r=>{this.byFeatureVendorMap[String(r)].add(s)}),i.specialFeatures.forEach(r=>{this.bySpecialFeatureVendorMap[String(r)].add(s)}),t[s]=i),t},{})}getFilteredVendors(e,t,s,i){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const a={};return e==="purpose"&&s?o=this["by"+r+"VendorMap"][String(t)][s]:o=this["by"+(i?"Special":"")+r+"VendorMap"][String(t)],o.forEach(l=>{a[String(l)]=this.vendors[String(l)]}),a}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new I(this.getJson());return this.lang_!==I.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}}class Ji extends ht{static consentLanguages=I.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=4;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new Pe;purposeConsents=new Pe;purposeLegitimateInterests=new Pe;publisherConsents=new Pe;publisherLegitimateInterests=new Pe;publisherCustomConsents=new Pe;publisherCustomLegitimateInterests=new Pe;customPurposes;vendorConsents=new Pe;vendorLegitimateInterests=new Pe;vendorsDisclosed=new Pe;vendorsAllowed=new Pe;publisherRestrictions=new Bi;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){I.isInstanceOf(e)||(e=new I(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new $e("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new $e("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new $e("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new $e("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new $e("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new $e("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){const t=Object.keys(this.customPurposes).sort((s,i)=>Number(s)-Number(i));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new $e("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class GE{static encode(e,t){let s="",i;return e=UE.process(e,t),Array.isArray(t?.segments)?i=t.segments:i=new yE(e,t)[""+e.version],i.forEach((r,o)=>{let a="";o<i.length-1&&(a="."),s+=qi.encode(e,r)+a}),s}static decode(e,t){const s=e.split("."),i=s.length;t||(t=new Ji);for(let r=0;r<i;r++){const o=s[r],l=ds.decode(o.charAt(0)).substr(0,g.segmentType),d=Yi.ID_TO_KEY[P.decode(l,g.segmentType).toString()];qi.decode(o,t,d)}return t}}var ze;(function(n){n.PING="ping",n.GET_TC_DATA="getTCData",n.GET_IN_APP_TC_DATA="getInAppTCData",n.GET_VENDOR_LIST="getVendorList",n.ADD_EVENT_LISTENER="addEventListener",n.REMOVE_EVENT_LISTENER="removeEventListener"})(ze||(ze={}));var Zt;(function(n){n.STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"})(Zt||(Zt={}));var en;(function(n){n.VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"})(en||(en={}));var Xi;(function(n){n.TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"})(Xi||(Xi={}));class tn{listenerId;callback;next;param;success=!0;constructor(e,t,s,i){Object.assign(this,{callback:e,listenerId:s,param:t,next:i});try{this.respond()}catch{this.invokeCallback(null)}}invokeCallback(e){const t=e!==null;typeof this.next=="function"?this.callback(this.next,e,t):this.callback(e,t)}}class nn extends tn{respond(){this.throwIfParamInvalid(),this.invokeCallback(new er(this.param,this.listenerId))}throwIfParamInvalid(){if(this.param!==void 0&&(!Array.isArray(this.param)||!this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class FE{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new nn(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class re{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new FE;static cmpStatus=Zt.LOADING;static disabled=!1;static displayStatus=en.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=Zt.LOADING,this.disabled=!1,this.displayStatus=en.HIDDEN,this.eventQueue.clear()}}class Zi{cmpId=re.cmpId;cmpVersion=re.cmpVersion;gdprApplies=re.gdprApplies;tcfPolicyVersion=re.tcfPolicyVersion}class er extends Zi{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=re.eventStatus,this.cmpStatus=re.cmpStatus,this.listenerId=t,re.gdprApplies){const s=re.tcModel;this.tcString=re.tcString,this.isServiceSpecific=s.isServiceSpecific,this.useNonStandardTexts=s.useNonStandardTexts,this.purposeOneTreatment=s.purposeOneTreatment,this.publisherCC=s.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(s.vendorsAllowed,e),disclosedVendors:this.createVectorField(s.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(s.purposeConsents),legitimateInterests:this.createVectorField(s.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(s.vendorConsents,e),legitimateInterests:this.createVectorField(s.vendorLegitimateInterests,e)},this.specialFeatureOptins=this.createVectorField(s.specialFeatureOptins),this.publisher={consents:this.createVectorField(s.publisherConsents),legitimateInterests:this.createVectorField(s.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(s.publisherCustomConsents),legitimateInterests:this.createVectorField(s.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(s.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let i=1;i<=s;i++){const r=i.toString();e.getRestrictions(i).forEach(o=>{const a=o.purposeId.toString();t[a]||(t[a]={}),t[a][r]=o.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((s,i)=>(s[String(i)]=e.has(Number(i)),s),{}):[...e].reduce((s,i)=>(s[i[0].toString(10)]=i[1],s),{})}}class xE extends er{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((t,s)=>(t+=s[1]?"1":"0",t),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(i=>{t[i.purposeId.toString()]="_".repeat(s)});for(let i=0;i<s;i++){const r=i+1;e.getRestrictions(r).forEach(o=>{const a=o.restrictionType.toString(),l=o.purposeId.toString(),d=t[l].substr(0,i),S=t[l].substr(i+1);t[l]=d+a+S})}}return t}}class $E extends Zi{cmpLoaded=!0;cmpStatus=re.cmpStatus;displayStatus=re.displayStatus;apiVersion=String(re.apiVersion);gvlVersion;constructor(){super(),re.tcModel&&re.tcModel.vendorListVersion&&(this.gvlVersion=+re.tcModel.vendorListVersion)}}class jE extends tn{respond(){this.invokeCallback(new $E)}}class HE extends nn{respond(){this.throwIfParamInvalid(),this.invokeCallback(new xE(this.param))}}class kE extends tn{respond(){const e=re.tcModel,t=e.vendorListVersion;let s;this.param===void 0&&(this.param=t),this.param===t&&e.gvl?s=e.gvl:s=new I(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class BE extends nn{respond(){this.listenerId=re.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class KE extends tn{respond(){this.invokeCallback(re.eventQueue.remove(this.param))}}class $u{static[ze.PING]=jE;static[ze.GET_TC_DATA]=nn;static[ze.GET_IN_APP_TC_DATA]=HE;static[ze.GET_VENDOR_LIST]=kE;static[ze.ADD_EVENT_LISTENER]=BE;static[ze.REMOVE_EVENT_LISTENER]=KE}const YE=n=>{if(!window.Fides.options.fidesTcfGdprApplies)return null;const{fides_string:e}=n.detail;if(e){const[t]=e.split(St);return t.split(".")[0]}return e??""};var zE=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const WE=1,tr=[1,3,4,5,6],QE=1,qE=({tcStringPreferences:n})=>{const e=[...n.vendorsConsent,...n.vendorsLegint].filter(rE).map(t=>Be(t).id).sort((t,s)=>Number(t)-Number(s)).join(".");return`${QE}~${e}`},JE=n=>zE(void 0,[n],function*({experience:e,tcStringPreferences:t}){let s="";try{const i=new Ji(new I(e.gvl));yield i.gvl.readyPromise,i.cmpId=ls,i.cmpVersion=WE,i.consentScreen=1,i.isServiceSpecific=!0,i.supportOOB=!1;const r=e.minimal_tcf?aE(e):oE(e);if(i.gvl.narrowVendorsTo(r),t){t.vendorsConsent.forEach(a=>{if(Xt(a,e.gvl)){const{id:l}=Be(a);i.vendorConsents.set(+l)}}),t.vendorsLegint.forEach(a=>{var l,d;if(e.minimal_tcf)(l=e.tcf_vendor_legitimate_interest_ids)==null||l.forEach(S=>{const{id:_}=Be(S);i.vendorLegitimateInterests.set(+_)});else if(Xt(a,e.gvl)){const S=(d=e.tcf_vendor_legitimate_interests)==null?void 0:d.filter(N=>N.id===a)[0],_=S?.purpose_legitimate_interests;let u=!1;if(_&&(_.map(N=>N.id).filter(N=>tr.includes(N)).length&&(u=!0),!u)){const{id:N}=Be(a);i.vendorLegitimateInterests.set(+N)}}}),t.purposesConsent.forEach(a=>{i.purposeConsents.set(+a)}),t.purposesLegint.forEach(a=>{const l=+a;tr.includes(l)||i.purposeLegitimateInterests.set(l)}),t.specialFeatures.forEach(a=>{i.specialFeatureOptins.set(+a)}),s=GE.encode(i,{segments:[z.CORE]});const o=qE({tcStringPreferences:t});s=`${s}${St}${o}`}}catch(i){return console.error("Unable to instantiate GVL: ",i),Promise.resolve("")}return Promise.resolve(s)});var XE=Object.defineProperty,ZE=Object.defineProperties,eu=Object.getOwnPropertyDescriptors,nr=Object.getOwnPropertySymbols,tu=Object.prototype.hasOwnProperty,nu=Object.prototype.propertyIsEnumerable,sr=(n,e,t)=>e in n?XE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,su=(n,e)=>{for(var t in e||(e={}))tu.call(e,t)&&sr(n,t,e[t]);if(nr)for(var t of nr(e))nu.call(e,t)&&sr(n,t,e[t]);return n},iu=(n,e)=>ZE(n,eu(e)),ru=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});const Ze=({modelList:n,enabledIds:e})=>n?n.map(t=>{const s=zt(e.includes(`${t.id}`));return{id:t.id,preference:s}}):[],et=n=>n!=null&&n.length?n.map(e=>{const t=zt(!0);let s=e;return Number.isNaN(parseInt(e,10))||(s=parseInt(e,10)),{id:s,preference:t}}):[],ou=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consents)!=null&&a.map(l=>l.id).includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interests)!=null&&a.map(l=>l.id).includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:Ze({modelList:n.tcf_purpose_consents,enabledIds:e.purposesConsent}),purpose_legitimate_interests_preferences:Ze({modelList:n.tcf_purpose_legitimate_interests,enabledIds:e.purposesLegint}),special_feature_preferences:Ze({modelList:n.tcf_special_features,enabledIds:e.specialFeatures}),vendor_consent_preferences:Ze({modelList:n.tcf_vendor_consents,enabledIds:s}),vendor_legitimate_interests_preferences:Ze({modelList:n.tcf_vendor_legitimate_interests,enabledIds:r}),system_consent_preferences:Ze({modelList:n.tcf_system_consents,enabledIds:t}),system_legitimate_interests_preferences:Ze({modelList:n.tcf_system_legitimate_interests,enabledIds:i})}},au=({experience:n,enabledIds:e})=>{const t=[],s=[],i=[],r=[];return e.vendorsConsent.forEach(o=>{var a;(a=n.tcf_system_consent_ids)!=null&&a.includes(o)?t.push(o):s.push(o)}),e.vendorsLegint.forEach(o=>{var a;(a=n.tcf_system_legitimate_interest_ids)!=null&&a.includes(o)?i.push(o):r.push(o)}),{purpose_consent_preferences:et(e.purposesConsent),purpose_legitimate_interests_preferences:et(e.purposesLegint),special_feature_preferences:et(e.specialFeatures),vendor_consent_preferences:et(s),vendor_legitimate_interests_preferences:et(r),system_consent_preferences:et(t),system_legitimate_interests_preferences:et(i)}},cu=(n,e,t,s,i)=>ru(void 0,null,function*(){var r;const o=yield JE({tcStringPreferences:t,experience:s}),a=iu(su({},n),{fides_string:o,tcf_consent:tE(e),tcf_version_hash:(r=s.meta)==null?void 0:r.version_hash});return i&&(a.consent=sE(i)),a}),lu=(n,e)=>!n||!e?[]:n.map(t=>{var s;const i=zt(e.includes(t.id),t.consent_mechanism);return new Ii(t,i,(s=t.bestTranslation)==null?void 0:s.privacy_notice_history_id)});var De=(n=>(n.NATIONAL="national",n.STATE="state",n.ALL="all",n))(De||{});const tt="us",ir=({cmpApi:n,sectionName:e,gppSettings:t})=>{t&&[{gppSettingField:t.mspa_covered_transactions,cmpApiField:O.MSPA_COVERED_TRANSACTION},{gppSettingField:t.mspa_covered_transactions&&t.mspa_opt_out_option_mode,cmpApiField:O.MSPA_OPT_OUT_OPTION_MODE},{gppSettingField:t.mspa_covered_transactions&&t.mspa_service_provider_mode,cmpApiField:O.MSPA_SERVICE_PROVIDER_MODE}].forEach(({gppSettingField:s,cmpApiField:i})=>{const r=i===O.MSPA_COVERED_TRANSACTION;let o=2;!t.mspa_covered_transactions&&!r?o=0:s&&(o=1),n.setFieldValue(e,i,o)})},du=n=>n?.toLowerCase().startsWith("us"),Es=({experienceRegion:n,usApproach:e})=>du(n)&&e===De.NATIONAL?tt:n,rr=({cmpApi:n,experience:e})=>{const t=new Set,{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=Es({experienceRegion:i,usApproach:o}),l=Xe[a];return!l&&o===De.ALL&&(a=tt,l=Xe[a]),!l||a===tt&&o===De.STATE?[]:(t.add(l),s.forEach(d=>{var S;const{gpp_field_mapping:_}=d,u=(S=_?.find(N=>N.region===a))==null?void 0:S.notice;u&&u.forEach(N=>{n.setFieldValue(l.name,N,1)})}),ir({cmpApi:n,sectionName:l.name,gppSettings:r}),Array.from(t))},or=({cmpApi:n,cookie:e,experience:t})=>{const s=new Set,{privacy_notices:i=[],region:r,gpp_settings:o}=t,a=o?.us_approach;let l=Es({experienceRegion:r,usApproach:a}),d=Xe[l];if(!d&&a===De.ALL&&(l=tt,d=Xe[l]),!d||l===tt&&a===De.STATE)return[];s.add(d);const{consent:S}=e;return Object.keys(S).forEach(_=>{var u;const N=i?.find(W=>W.notice_key===_),A=S[_];if(N){const{gpp_field_mapping:W}=N,k=(u=W?.find(H=>H.region===l))==null?void 0:u.mechanism;k&&k.forEach(H=>{let Z=H.not_available;A===!1?Z=H.opt_out:A&&(Z=H.not_opt_out);let me=+Z;Z.length>1&&(me=Z.split("").map(Qe=>+Qe)),n.setFieldValue(d.name,H.field,me)})}}),ir({cmpApi:n,sectionName:d.name,gppSettings:o}),Array.from(s)};var Eu=Object.defineProperty,uu=Object.defineProperties,Su=Object.getOwnPropertyDescriptors,ar=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,hu=Object.prototype.propertyIsEnumerable,cr=(n,e,t)=>e in n?Eu(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,lr=(n,e)=>{for(var t in e||(e={}))pu.call(e,t)&&cr(n,t,e[t]);if(ar)for(var t of ar(e))hu.call(e,t)&&cr(n,t,e[t]);return n},dr=(n,e)=>uu(n,Su(e));const _u=[1,3,4,5,6],gu=({cmpApi:n,experience:e})=>{const t={},{privacy_notices:s=[],region:i,gpp_settings:r}=e,o=r?.us_approach;let a=Es({experienceRegion:i,usApproach:o}),l=Xe[a];return!l&&o===De.ALL&&(a=tt,l=Xe[a]),!l||a===tt&&o===De.STATE||s.forEach(d=>{var S;const{notice_key:_,gpp_field_mapping:u}=d,N=(S=u?.find(A=>A.region===a))==null?void 0:S.mechanism;if(N){const A=N.some(W=>{const k=n.getFieldValue(l.name,W.field),H=Array.isArray(k)?k.join(""):String(k);return H===W.opt_out?!0:(W.not_opt_out,!1)});A!==void 0&&(t[_]=!A)}}),t},Tu=({cmpApi:n,experience:e})=>{var t,s,i,r;const o=qd,a=n.getSection(J.NAME);if(!a)return o;const l=a.PurposeConsents.map((u,N)=>u?(N+1).toString():null).filter(u=>u!==null),d=a.PurposeLegitimateInterests.map((u,N)=>u?(N+1).toString():null).filter(u=>u!==null),S=a.VendorConsents.map(u=>`gvl.${u}`),_=a.VendorLegitimateInterests.map(u=>`gvl.${u}`);return o.purposesConsent=l,o.purposesLegint=d.filter(u=>!_u.includes(parseInt(u,10))),o.vendorsConsent=S,o.vendorsLegint=_,o.specialFeatures=a.SpecialFeatureOptins.map((u,N)=>u?(N+1).toString():null).filter(u=>u!==null),"tcf_special_purposes"in e?(o.specialPurposes=((t=e.tcf_special_purposes)==null?void 0:t.map(u=>u.id.toString()))||[],o.features=((s=e.tcf_features)==null?void 0:s.map(u=>u.id.toString()))||[]):"tcf_special_purpose_ids"in e&&(o.specialPurposes=((i=e.tcf_special_purpose_ids)==null?void 0:i.map(u=>u.toString()))||[],o.features=((r=e.tcf_feature_ids)==null?void 0:r.map(u=>u.toString()))||[]),o.customPurposesConsent=[],o},Ou=({fidesString:n,cmpApi:e})=>{if(!n||!e)return;const{options:t,cookie:s,geolocation:i,locale:r,config:o}=window.Fides,a=window.Fides.experience;if(!a||!a.experience_config||!a.privacy_notices)return;const l=a.experience_config.component===Et.TCF_OVERLAY,{gpp:d}=cE(n),S=Gd(i),_=a.experience_config.translations.find(k=>Ri(k.language,r));if(!_)return;e.setGppString(d),e.setSignalStatus(be.READY);const u=a.privacy_notices.map(k=>({notice:k,bestTranslation:k.translations.find(H=>Ri(H.language,r))||null}));let N,A,W;if(l){const k=Tu({cmpApi:e,experience:a});W=lu(u.map(({notice:H,bestTranslation:Z})=>dr(lr({},H),{bestTranslation:Z})),k.customPurposesConsent),A=a.minimal_tcf?au({experience:a,enabledIds:k}):ou({experience:a,enabledIds:k}),N=H=>cu(H,A,k,a)}else{const k=gu({cmpApi:e,experience:a}),H=Object.entries(k).filter(([Z,me])=>me).map(([Z])=>Z);W=xd(u,H),N=Z=>Promise.resolve(dr(lr({},Z),{consent:k}))}vE({consentPreferencesToSave:W,privacyExperienceConfigHistoryId:_.privacy_experience_config_history_id,experience:a,consentMethod:Pi.SCRIPT,options:t,userLocationString:S||void 0,cookie:s,propertyId:o?.propertyId,tcf:A,updateCookie:N})},Er="__gppLocator",ur=n=>{if(!window.frames[n])if(window.document.body){const e=window.document.createElement("iframe");e.style.cssText="display:none",e.name=n,window.document.body.appendChild(e)}else setTimeout(()=>ur(n),5)},Nu=n=>{let e=window,t;for(;e;){try{if(e.frames[n]){t=e;break}}catch{}if(e===window.top)break;e=e.parent}return t},Iu=n=>typeof n=="object"&&n!=null&&"__gppCall"in n,Au=()=>{const n=[],e=[];let t;const s=(r,o,a,l)=>{if(r==="queue")return n;if(r==="events")return e;const d={gppVersion:"1.1",cmpStatus:it.STUB,cmpDisplayStatus:ke.HIDDEN,signalStatus:be.NOT_READY,supportedAPIs:[],cmpId:0,sectionList:[],applicableSections:[0],gppString:"",parsedSections:{}};if(r==="ping")o(d,!0);else if(r==="addEventListener"){t||(t=0),t+=1;const S=t;e.push({id:S,callback:o,parameter:a}),o({eventName:"listenerRegistered",listenerId:S,data:!0,pingData:d},!0)}else if(r==="removeEventListener"){let S=!1;for(let _=0;_<e.length;_++)if(e[_].id===a){e.splice(_,1),S=!0;break}o({eventName:"listenerRemoved",listenerId:a,data:S,pingData:d},!0)}else r==="hasSection"?o(!1,!0):r==="getSection"||r==="getField"?o(null,!0):n.push([].slice.apply([r,o,a,l]));return null},i=r=>{const o=typeof r.data=="string";let a={};if(o)try{a=JSON.parse(r.data)}catch{a={}}else a=r.data;if(!Iu(a))return null;if(a.__gppCall&&window.__gpp){const l=a.__gppCall;window.__gpp(l.command,(d,S)=>{const _={__gppReturn:{returnValue:d,success:S,callId:l.callId}};r&&r.source&&r.source.postMessage&&r.source.postMessage(o?JSON.stringify(_):_,"*")},"parameter"in l?l.parameter:void 0,"version"in l?l.version:"1.1")}return null};Nu(Er)||(ur(Er),window.__gpp=s,window.addEventListener("message",i,!1))},Sr=(n,e,t)=>n?e?!0:!!(t&&Object.entries(n).some(([s,i])=>s in t.map(r=>r.notice_key)&&i!==void 0)):!1,pr=(n,e)=>{if(!ut(window.Fides.experience))return!1;const{gpp_settings:t}=window.Fides.experience;if(!window.Fides.options.tcfEnabled||!(t!=null&&t.enable_tcfeu_string))return!1;const s=YE(n);return s?(e.setFieldValueBySectionId(J.ID,"CmpId",ls),e.setSectionStringById(J.ID,s),!0):!1},Cu=()=>{const n=[];if(ut(window.Fides.experience)){const{gpp_settings:e}=window.Fides.experience;e&&e.enabled&&(window.Fides.options.tcfEnabled&&e.enable_tcfeu_string&&n.push(`${J.ID}:${J.NAME}`),(e.us_approach===De.NATIONAL||e.us_approach===De.ALL)&&n.push(`${ie.ID}:${ie.NAME}`),(e.us_approach===De.STATE||e.us_approach===De.ALL)&&Object.values(Xe).forEach(t=>{t.id!==ie.ID&&n.push(`${t.id}:${t.name}`)}))}return n},Pu=()=>{Au();const n=new Cd(ls,lE);n.setCmpStatus(it.LOADED),window.addEventListener("FidesInitialized",e=>{var t;const{experience:s,saved_consent:i,options:r}=window.Fides,o=Cu();if(n.setSupportedAPIs(o),!ut(s))return;const{fidesString:a}=r;if(a&&Ou({fidesString:a,cmpApi:n}),!a&&(!Fd(s,e.detail,i)||!r.tcfEnabled&&fi(s.privacy_notices)&&!Sr(i,e.detail.fides_string,s.privacy_notices))){const l=pr(e,n);l&&n.setApplicableSections([J.ID]);const d=rr({cmpApi:n,experience:s}),S=or({cmpApi:n,cookie:e.detail,experience:s});S.length&&n.setApplicableSections(S.map(u=>u.id)),!l&&!d.length&&!S.length&&n.setApplicableSections([-1]),n.setSignalStatus(be.READY);const _=vi(n);window.Fides.fides_string=_}window.Fides.options.debug&&typeof window?.__gpp=="function"&&((t=window?.__gpp)==null||t.call(window,"ping",l=>{}))}),window.addEventListener("FidesUIShown",e=>{const{experience:t,saved_consent:s,options:i}=window.Fides;if(ut(t)){!i.tcfEnabled&&fi(t.privacy_notices)&&!Sr(s,e.detail.fides_string,t.privacy_notices)?n.setSignalStatus(be.READY):n.setSignalStatus(be.NOT_READY),n.setCmpDisplayStatus(ke.VISIBLE);const r=rr({cmpApi:n,experience:t});r.length&&(n.setApplicableSections(r.map(o=>o.id)),r.forEach(o=>{n.fireSectionChange(o.name)}))}}),window.addEventListener("FidesModalClosed",e=>{e.detail.extraDetails&&e.detail.extraDetails.saved===!1&&(n.setCmpDisplayStatus(ke.HIDDEN),n.setSignalStatus(be.READY))}),window.addEventListener("FidesUpdated",e=>{if(n.setCmpDisplayStatus(ke.HIDDEN),pr(e,n)&&(n.setApplicableSections([J.ID]),n.fireSectionChange("tcfeuv2")),ut(window.Fides.experience)){const t=or({cmpApi:n,cookie:e.detail,experience:window.Fides.experience});t.length&&(n.setApplicableSections(t.map(i=>i.id)),t.forEach(i=>{n.fireSectionChange(i.name)}));const s=vi(n);window.Fides.cookie&&(window.Fides.fides_string=s,window.Fides.cookie.fides_string=s,Vi(window.Fides.cookie,window.Fides.options.base64Cookie))}n.setSignalStatus(be.READY)})};window.addEventListener("FidesInitializing",n=>{var e;(e=n.detail.extraDetails)!=null&&e.gppEnabled&&Pu()});