// source --> https://pleasehelp.eu/wp-content/plugins/webtoffee-gdpr-cookie-consent/public/modules/iab-tcf/assets/js/script.min.js?ver=2.5.3 
/*! For license information please see script.min.js.LICENSE.txt */
(()=>{"use strict";var e={2131:e=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){for(var e,n,r=[],o=window,s=o;s;){try{if(s.frames.__tcfapiLocator){e=s;break}}catch(e){}if(s===o.top)break;s=s.parent}e||(function e(){var t=o.document,n=!!o.frames.__tcfapiLocator;if(!n)if(t.body){var r=t.createElement("iframe");r.style.cssText="display:none",r.name="__tcfapiLocator",t.body.appendChild(r)}else setTimeout(e,5);return!n}(),o.__tcfapi=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(!t.length)return r;"setGdprApplies"===t[0]?t.length>3&&2===parseInt(t[1],10)&&"boolean"==typeof t[3]&&(n=t[3],"function"==typeof t[2]&&t[2]("set",!0)):"ping"===t[0]?"function"==typeof t[2]&&t[2]({gdprApplies:n,cmpLoaded:!1,cmpStatus:"stub"}):r.push(t)},o.addEventListener("message",(function(e){var n="string"==typeof e.data,r={};if(n)try{r=JSON.parse(e.data)}catch(e){}else r=e.data;var o="object"===t(r)&&null!==r?r.__tcfapiCall:null;o&&window.__tcfapi(o.command,o.version,(function(t,r){var s={__tcfapiReturn:{returnValue:t,success:r,callId:o.callId}};e&&e.source&&e.source.postMessage&&e.source.postMessage(n?JSON.stringify(s):s,"*")}),o.parameter)}),!1))}},9621:function(e,t,n){var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o<s;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.CallResponder=t.API_KEY=void 0;var s=n(1581),i=n(5656),a=n(476),c=n(7629),u=n(3965);t.API_KEY="__tcfapi";var l=function(){function e(e){if(e){var n=s.TCFCommand.ADD_EVENT_LISTENER;if(null==e?void 0:e[n])throw new Error("Built-In Custom Commmand for ".concat(n," not allowed: Use ").concat(s.TCFCommand.GET_TC_DATA," instead"));if(n=s.TCFCommand.REMOVE_EVENT_LISTENER,null==e?void 0:e[n])throw new Error("Built-In Custom Commmand for ".concat(n," not allowed"));(null==e?void 0:e[s.TCFCommand.GET_TC_DATA])&&(e[s.TCFCommand.ADD_EVENT_LISTENER]=e[s.TCFCommand.GET_TC_DATA],e[s.TCFCommand.REMOVE_EVENT_LISTENER]=e[s.TCFCommand.GET_TC_DATA]),this.customCommands=e}try{this.callQueue=window[t.API_KEY]()||[]}catch(e){this.callQueue=[]}finally{window[t.API_KEY]=this.apiCall.bind(this),this.purgeQueuedCalls()}}return e.prototype.apiCall=function(e,t,n){for(var l,p=[],d=3;d<arguments.length;d++)p[d-3]=arguments[d];if("string"!=typeof e)n(null,!1);else if(u.SupportedVersions.has(t)){if("function"!=typeof n)throw new Error("invalid callback function");a.CmpApiModel.disabled?n(new c.Disabled,!1):this.isCustomCommand(e)||this.isBuiltInCommand(e)?this.isCustomCommand(e)&&!this.isBuiltInCommand(e)?(l=this.customCommands)[e].apply(l,o([n],r(p),!1)):e===s.TCFCommand.PING?this.isCustomCommand(e)?new i.CommandMap[e](this.customCommands[e],p[0],null,n):new i.CommandMap[e](n,p[0]):void 0===a.CmpApiModel.tcModel?this.callQueue.push(o([e,t,n],r(p),!1)):this.isCustomCommand(e)&&this.isBuiltInCommand(e)?new i.CommandMap[e](this.customCommands[e],p[0],null,n):new i.CommandMap[e](n,p[0]):n(null,!1)}else n(null,!1)},e.prototype.purgeQueuedCalls=function(){var e=this.callQueue;this.callQueue=[],e.forEach((function(e){window[t.API_KEY].apply(window,o([],r(e),!1))}))},e.prototype.isCustomCommand=function(e){return this.customCommands&&"function"==typeof this.customCommands[e]},e.prototype.isBuiltInCommand=function(e){return void 0!==i.CommandMap[e]},e}();t.CallResponder=l},9089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CmpApi=void 0;var r=n(476),o=n(3619),s=n(9621),i=n(3406),a=function(){function e(e,t,n,o){void 0===n&&(n=!1),this.numUpdates=0,this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),r.CmpApiModel.cmpId=e,r.CmpApiModel.cmpVersion=t,r.CmpApiModel.tcfPolicyVersion=2,this.isServiceSpecific=!!n,this.callResponder=new s.CallResponder(o)}return e.prototype.throwIfInvalidInt=function(e,t,n){if(!("number"==typeof e&&Number.isInteger(e)&&e>=n))throw new Error("Invalid ".concat(t,": ").concat(e))},e.prototype.update=function(e,t){if(void 0===t&&(t=!1),r.CmpApiModel.disabled)throw new Error("CmpApi Disabled");r.CmpApiModel.cmpStatus=o.CmpStatus.LOADED,t?(r.CmpApiModel.displayStatus=o.DisplayStatus.VISIBLE,r.CmpApiModel.eventStatus=o.EventStatus.CMP_UI_SHOWN):void 0===r.CmpApiModel.tcModel?(r.CmpApiModel.displayStatus=o.DisplayStatus.DISABLED,r.CmpApiModel.eventStatus=o.EventStatus.TC_LOADED):(r.CmpApiModel.displayStatus=o.DisplayStatus.HIDDEN,r.CmpApiModel.eventStatus=o.EventStatus.USER_ACTION_COMPLETE),r.CmpApiModel.gdprApplies=null!==e,r.CmpApiModel.gdprApplies?(""===e?(r.CmpApiModel.tcModel=new i.TCModel,r.CmpApiModel.tcModel.cmpId=r.CmpApiModel.cmpId,r.CmpApiModel.tcModel.cmpVersion=r.CmpApiModel.cmpVersion):r.CmpApiModel.tcModel=i.TCString.decode(e),r.CmpApiModel.tcModel.isServiceSpecific=this.isServiceSpecific,r.CmpApiModel.tcfPolicyVersion=Number(r.CmpApiModel.tcModel.policyVersion),r.CmpApiModel.tcString=e):r.CmpApiModel.tcModel=null,0===this.numUpdates?this.callResponder.purgeQueuedCalls():r.CmpApiModel.eventQueue.exec(),this.numUpdates++},e.prototype.disable=function(){r.CmpApiModel.disabled=!0,r.CmpApiModel.cmpStatus=o.CmpStatus.ERROR},e}();t.CmpApi=a},476:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CmpApiModel=void 0;var r=n(3619),o=n(6173),s=function(){function e(){}return e.reset=function(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=r.CmpStatus.LOADING,this.disabled=!1,this.displayStatus=r.DisplayStatus.HIDDEN,this.eventQueue.clear()},e.apiVersion="2",e.eventQueue=new o.EventListenerQueue,e.cmpStatus=r.CmpStatus.LOADING,e.disabled=!1,e.displayStatus=r.DisplayStatus.HIDDEN,e}();t.CmpApiModel=s},3143:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},6173:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EventListenerQueue=void 0;var r=n(5244),o=function(){function e(){this.eventQueue=new Map,this.queueNumber=0}return e.prototype.add=function(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++},e.prototype.remove=function(e){return this.eventQueue.delete(e)},e.prototype.exec=function(){this.eventQueue.forEach((function(e,t){new r.GetTCDataCommand(e.callback,e.param,t,e.next)}))},e.prototype.clear=function(){this.queueNumber=0,this.eventQueue.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this.eventQueue.size},enumerable:!1,configurable:!0}),e}();t.EventListenerQueue=o},3965:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SupportedVersions=void 0;var n=function(){function e(){}return e.has=function(e){return"string"==typeof e&&(e=Number(e)),this.set_.has(e)},e.set_=new Set([0,2,void 0,null]),e}();t.SupportedVersions=n},145:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AddEventListenerCommand=void 0;var s=n(476),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){this.listenerId=s.CmpApiModel.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),e.prototype.respond.call(this)},t}(n(5244).GetTCDataCommand);t.AddEventListenerCommand=i},7110:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Command=void 0;var n=function(){function e(e,t,n,r){this.success=!0,Object.assign(this,{callback:e,listenerId:n,param:t,next:r});try{this.respond()}catch(e){this.invokeCallback(null)}}return e.prototype.invokeCallback=function(e){var t=null!==e;"function"==typeof this.next?this.callback(this.next,e,t):this.callback(e,t)},e}();t.Command=n},4395:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5656:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CommandMap=void 0;var r=n(8785),o=n(5244),s=n(8759),i=n(2947),a=n(145),c=n(6467),u=n(131),l=function(){function e(){}var t,n,l,p,d,h;return t=u.TCFCommand.PING,n=u.TCFCommand.GET_TC_DATA,l=u.TCFCommand.GET_IN_APP_TC_DATA,p=u.TCFCommand.GET_VENDOR_LIST,d=u.TCFCommand.ADD_EVENT_LISTENER,h=u.TCFCommand.REMOVE_EVENT_LISTENER,e[t]=r.PingCommand,e[n]=o.GetTCDataCommand,e[l]=s.GetInAppTCDataCommand,e[p]=i.GetVendorListCommand,e[d]=a.AddEventListenerCommand,e[h]=c.RemoveEventListenerCommand,e}();t.CommandMap=l},8759:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GetInAppTCDataCommand=void 0;var s=n(5244),i=n(2811),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){this.throwIfParamInvalid(),this.invokeCallback(new i.InAppTCData(this.param))},t}(s.GetTCDataCommand);t.GetInAppTCDataCommand=a},5244:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GetTCDataCommand=void 0;var s=n(7110),i=n(2811),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){this.throwIfParamInvalid(),this.invokeCallback(new i.TCData(this.param,this.listenerId))},t.prototype.throwIfParamInvalid=function(){if(!(void 0===this.param||Array.isArray(this.param)&&this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")},t}(s.Command);t.GetTCDataCommand=a},2947:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GetVendorListCommand=void 0;var s=n(476),i=n(7110),a=n(3406),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){var e,t=this,n=s.CmpApiModel.tcModel,r=n.vendorListVersion;void 0===this.param&&(this.param=r),(e=this.param===r&&n.gvl?n.gvl:new a.GVL(this.param)).readyPromise.then((function(){t.invokeCallback(e.getJson())}))},t}(i.Command);t.GetVendorListCommand=c},8785:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PingCommand=void 0;var s=n(2811),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){this.invokeCallback(new s.Ping)},t}(n(7110).Command);t.PingCommand=i},6467:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveEventListenerCommand=void 0;var s=n(476),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.respond=function(){this.invokeCallback(s.CmpApiModel.eventQueue.remove(this.param))},t}(n(7110).Command);t.RemoveEventListenerCommand=i},131:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TCFCommand=void 0,(n=t.TCFCommand||(t.TCFCommand={})).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"},1581:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(131),t),o(n(4395),t)},346:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.API_KEY=void 0,o(n(1581),t),o(n(2811),t),o(n(3619),t),o(n(9089),t),o(n(476),t),o(n(3143),t);var s=n(9621);Object.defineProperty(t,"API_KEY",{enumerable:!0,get:function(){return s.API_KEY}})},7629:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Disabled=void 0;var s=n(8066),i=n(3619),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cmpStatus=i.CmpStatus.ERROR,t}return o(t,e),t}(s.Response);t.Disabled=a},9933:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o<s;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InAppTCData=void 0;var a=function(e){function t(t){var n=e.call(this,t)||this;return delete n.outOfBand,n}return o(t,e),t.prototype.createVectorField=function(e){return i([],s(e),!1).reduce((function(e,t){return e+(t[1]?"1":"0")}),"")},t.prototype.createRestrictions=function(e){var t={};if(e.numRestrictions>0){var n=e.getMaxVendorId();e.getRestrictions().forEach((function(e){t[e.purposeId.toString()]="_".repeat(n)}));for(var r=function(n){var r=n+1;e.getRestrictions(r).forEach((function(e){var r=e.restrictionType.toString(),o=e.purposeId.toString(),s=t[o].substr(0,n),i=t[o].substr(n+1);t[o]=s+r+i}))},o=0;o<n;o++)r(o)}return t},t}(n(2520).TCData);t.InAppTCData=a},9364:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Ping=void 0;var s=n(476),i=function(e){function t(){var t=e.call(this)||this;return t.cmpLoaded=!0,t.cmpStatus=s.CmpApiModel.cmpStatus,t.displayStatus=s.CmpApiModel.displayStatus,t.apiVersion=String(s.CmpApiModel.apiVersion),s.CmpApiModel.tcModel&&s.CmpApiModel.tcModel.vendorListVersion&&(t.gvlVersion=+s.CmpApiModel.tcModel.vendorListVersion),t}return o(t,e),t}(n(8066).Response);t.Ping=i},8066:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Response=void 0;var r=n(476);t.Response=function(){this.cmpId=r.CmpApiModel.cmpId,this.cmpVersion=r.CmpApiModel.cmpVersion,this.gdprApplies=r.CmpApiModel.gdprApplies,this.tcfPolicyVersion=r.CmpApiModel.tcfPolicyVersion}},2520:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o<s;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.TCData=void 0;var a=n(476),c=function(e){function t(t,n){var r=e.call(this)||this;if(r.eventStatus=a.CmpApiModel.eventStatus,r.cmpStatus=a.CmpApiModel.cmpStatus,r.listenerId=n,a.CmpApiModel.gdprApplies){var o=a.CmpApiModel.tcModel;r.tcString=a.CmpApiModel.tcString,r.isServiceSpecific=o.isServiceSpecific,r.useNonStandardStacks=o.useNonStandardStacks,r.purposeOneTreatment=o.purposeOneTreatment,r.publisherCC=o.publisherCountryCode,r.outOfBand={allowedVendors:r.createVectorField(o.vendorsAllowed,t),disclosedVendors:r.createVectorField(o.vendorsDisclosed,t)},r.purpose={consents:r.createVectorField(o.purposeConsents),legitimateInterests:r.createVectorField(o.purposeLegitimateInterests)},r.vendor={consents:r.createVectorField(o.vendorConsents,t),legitimateInterests:r.createVectorField(o.vendorLegitimateInterests,t)},r.specialFeatureOptins=r.createVectorField(o.specialFeatureOptins),r.publisher={consents:r.createVectorField(o.publisherConsents),legitimateInterests:r.createVectorField(o.publisherLegitimateInterests),customPurpose:{consents:r.createVectorField(o.publisherCustomConsents),legitimateInterests:r.createVectorField(o.publisherCustomLegitimateInterests)},restrictions:r.createRestrictions(o.publisherRestrictions)}}return r}return o(t,e),t.prototype.createRestrictions=function(e){var t={};if(e.numRestrictions>0)for(var n=e.getMaxVendorId(),r=function(n){var r=n.toString();e.getRestrictions(n).forEach((function(e){var n=e.purposeId.toString();t[n]||(t[n]={}),t[n][r]=e.restrictionType}))},o=1;o<=n;o++)r(o);return t},t.prototype.createVectorField=function(e,t){return t?t.reduce((function(t,n){return t[String(n)]=e.has(Number(n)),t}),{}):i([],s(e),!1).reduce((function(e,t){return e[t[0].toString(10)]=t[1],e}),{})},t}(n(8066).Response);t.TCData=c},2811:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7629),t),o(n(9933),t),o(n(9364),t),o(n(8066),t),o(n(2520),t)},1865:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CmpStatus=void 0,(n=t.CmpStatus||(t.CmpStatus={})).STUB="stub",n.LOADING="loading",n.LOADED="loaded",n.ERROR="error"},3042:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayStatus=void 0,(n=t.DisplayStatus||(t.DisplayStatus={})).VISIBLE="visible",n.HIDDEN="hidden",n.DISABLED="disabled"},63:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventStatus=void 0,(n=t.EventStatus||(t.EventStatus={})).TC_LOADED="tcloaded",n.CMP_UI_SHOWN="cmpuishown",n.USER_ACTION_COMPLETE="useractioncomplete"},3619:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1865),t),o(n(3042),t),o(n(63),t)},6542:function(e,t){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.Cloneable=void 0;var r=function(){function e(){}return e.prototype.clone=function(){var e=this,t=new this.constructor;return Object.keys(this).forEach((function(n){var r=e.deepClone(e[n]);void 0!==r&&(t[n]=r)})),t},e.prototype.deepClone=function(e){var t,r,o=typeof e;if("number"===o||"string"===o||"boolean"===o)return e;if(null!==e&&"object"===o){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){var s=[];try{for(var i=n(e),a=i.next();!a.done;a=i.next()){var c=a.value;s.push(this.deepClone(c))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return e instanceof Array?s:new e.constructor(s)}var u={};for(var l in e)e.hasOwnProperty(l)&&(u[l]=this.deepClone(e[l]));return u}},e}();t.Cloneable=r},4892:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.GVL=void 0;var a=n(6542),c=n(6468),u=n(5761),l=n(8663),p=function(e){function t(n){var r=e.call(this)||this;r.isReady_=!1,r.isLatest=!1;var o=t.baseUrl;if(r.lang_=t.DEFAULT_LANGUAGE,r.isVendorList(n))r.populate(n),r.readyPromise=Promise.resolve();else{if(!o)throw new c.GVLError("must specify GVL.baseUrl before loading GVL json");if(n>0){var s=n;t.CACHE.has(s)?(r.populate(t.CACHE.get(s)),r.readyPromise=Promise.resolve()):(o+=t.versionedFilename.replace("[VERSION]",String(s)),r.readyPromise=r.fetchJson(o))}else t.CACHE.has(t.LATEST_CACHE_KEY)?(r.populate(t.CACHE.get(t.LATEST_CACHE_KEY)),r.readyPromise=Promise.resolve()):(r.isLatest=!0,r.readyPromise=r.fetchJson(o+t.latestFilename))}return r}return o(t,e),Object.defineProperty(t,"baseUrl",{get:function(){return this.baseUrl_},set:function(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new c.GVLError("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},enumerable:!1,configurable:!0}),t.emptyLanguageCache=function(e){var n=!1;return void 0===e&&t.LANGUAGE_CACHE.size>0?(t.LANGUAGE_CACHE=new Map,n=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(t.LANGUAGE_CACHE.delete(e.toUpperCase()),n=!0),n},t.emptyCache=function(e){var n=!1;return Number.isInteger(e)&&e>=0?(t.CACHE.delete(e),n=!0):void 0===e&&(t.CACHE=new Map,n=!0),n},t.prototype.cacheLanguage=function(){t.LANGUAGE_CACHE.has(this.lang_)||t.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})},t.prototype.fetchJson=function(e){return s(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=this.populate,[4,u.Json.fetch(e)];case 1:return t.apply(this,[r.sent()]),[3,3];case 2:throw n=r.sent(),new c.GVLError(n.message);case 3:return[2]}}))}))},t.prototype.getJson=function(){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,vendors:this.fullVendorList}))},t.prototype.changeLanguage=function(e){return s(this,void 0,void 0,(function(){var n,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:if(n=e.toUpperCase(),!t.consentLanguages.has(n))return[3,6];if(n===this.lang_)return[3,5];if(this.lang_=n,!t.LANGUAGE_CACHE.has(n))return[3,1];for(o in r=t.LANGUAGE_CACHE.get(n))r.hasOwnProperty(o)&&(this[o]=r[o]);return[3,5];case 1:s=t.baseUrl+t.languageFilename.replace("[LANG]",e),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.fetchJson(s)];case 3:return i.sent(),this.cacheLanguage(),[3,5];case 4:throw a=i.sent(),new c.GVLError("unable to load language: "+a.message);case 5:return[3,7];case 6:throw new c.GVLError("unsupported language ".concat(e));case 7:return[2]}}))}))},Object.defineProperty(t.prototype,"language",{get:function(){return this.lang_},enumerable:!1,configurable:!0}),t.prototype.isVendorList=function(e){return void 0!==e&&void 0!==e.vendors},t.prototype.populate=function(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&t.CACHE.set(t.LATEST_CACHE_KEY,this.getJson()),t.CACHE.has(this.vendorListVersion)||t.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()},t.prototype.mapVendors=function(e){var t=this;this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((function(e){t.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((function(e){t.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((function(e){t.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((function(e){t.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((function(e){return+e}))),this.vendorIds=new Set(e),this.vendors_=e.reduce((function(e,n){var r=t.vendors_[String(n)];return r&&void 0===r.deletedDate&&(r.purposes.forEach((function(e){t.byPurposeVendorMap[String(e)].consent.add(n)})),r.specialPurposes.forEach((function(e){t.bySpecialPurposeVendorMap[String(e)].add(n)})),r.legIntPurposes.forEach((function(e){t.byPurposeVendorMap[String(e)].legInt.add(n)})),r.flexiblePurposes&&r.flexiblePurposes.forEach((function(e){t.byPurposeVendorMap[String(e)].flexible.add(n)})),r.features.forEach((function(e){t.byFeatureVendorMap[String(e)].add(n)})),r.specialFeatures.forEach((function(e){t.bySpecialFeatureVendorMap[String(e)].add(n)})),e[n]=r),e}),{})},t.prototype.getFilteredVendors=function(e,t,n,r){var o=this,s=e.charAt(0).toUpperCase()+e.slice(1),i={};return("purpose"===e&&n?this["by"+s+"VendorMap"][String(t)][n]:this["by"+(r?"Special":"")+s+"VendorMap"][String(t)]).forEach((function(e){i[String(e)]=o.vendors[String(e)]})),i},t.prototype.getVendorsWithConsentPurpose=function(e){return this.getFilteredVendors("purpose",e,"consent")},t.prototype.getVendorsWithLegIntPurpose=function(e){return this.getFilteredVendors("purpose",e,"legInt")},t.prototype.getVendorsWithFlexiblePurpose=function(e){return this.getFilteredVendors("purpose",e,"flexible")},t.prototype.getVendorsWithSpecialPurpose=function(e){return this.getFilteredVendors("purpose",e,void 0,!0)},t.prototype.getVendorsWithFeature=function(e){return this.getFilteredVendors("feature",e)},t.prototype.getVendorsWithSpecialFeature=function(e){return this.getFilteredVendors("feature",e,void 0,!0)},Object.defineProperty(t.prototype,"vendors",{get:function(){return this.vendors_},enumerable:!1,configurable:!0}),t.prototype.narrowVendorsTo=function(e){this.mapVendors(e)},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.isReady_},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t(this.getJson());return this.lang_!==t.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e},t.isInstanceOf=function(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo},t.LANGUAGE_CACHE=new Map,t.CACHE=new Map,t.LATEST_CACHE_KEY=0,t.DEFAULT_LANGUAGE="EN",t.consentLanguages=new l.ConsentLanguages,t.latestFilename="vendor-list.json",t.versionedFilename="archives/vendor-list-v[VERSION].json",t.languageFilename="purposes-[LANG].json",t}(a.Cloneable);t.GVL=p},5761:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Json=void 0;var n=function(){function e(){}return e.absCall=function(e,t,n,r){return new Promise((function(o,s){var i=new XMLHttpRequest;i.withCredentials=n,i.addEventListener("load",(function(){if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){var e=i.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}o(e)}else s(new Error("HTTP Status: ".concat(i.status," response type: ").concat(i.responseType)))})),i.addEventListener("error",(function(){s(new Error("error"))})),i.addEventListener("abort",(function(){s(new Error("aborted"))})),null===t?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=r,i.ontimeout=function(){s(new Error("Timeout "+r+"ms "+e))},i.send(t)}))},e.post=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=0),this.absCall(e,JSON.stringify(t),n,r)},e.fetch=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=0),this.absCall(e,null,t,n)},e}();t.Json=n},3769:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TCModel=void 0;var s=n(6542),i=n(6468),a=n(4892),c=n(8663),u=function(e){function t(t){var n=e.call(this)||this;return n.isServiceSpecific_=!1,n.supportOOB_=!0,n.useNonStandardStacks_=!1,n.purposeOneTreatment_=!1,n.publisherCountryCode_="AA",n.version_=2,n.consentScreen_=0,n.policyVersion_=2,n.consentLanguage_="EN",n.cmpId_=0,n.cmpVersion_=0,n.vendorListVersion_=0,n.numCustomPurposes_=0,n.specialFeatureOptins=new c.Vector,n.purposeConsents=new c.Vector,n.purposeLegitimateInterests=new c.Vector,n.publisherConsents=new c.Vector,n.publisherLegitimateInterests=new c.Vector,n.publisherCustomConsents=new c.Vector,n.publisherCustomLegitimateInterests=new c.Vector,n.vendorConsents=new c.Vector,n.vendorLegitimateInterests=new c.Vector,n.vendorsDisclosed=new c.Vector,n.vendorsAllowed=new c.Vector,n.publisherRestrictions=new c.PurposeRestrictionVector,t&&(n.gvl=t),n.updated(),n}return o(t,e),Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){a.GVL.isInstanceOf(e)||(e=new a.GVL(e)),this.gvl_=e,this.publisherRestrictions.gvl=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new i.TCModelError("cmpId",e);this.cmpId_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new i.TCModelError("cmpVersion",e);this.cmpVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new i.TCModelError("consentScreen",e);this.consentScreen_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(e){this.consentLanguage_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(e){if(!/^([A-z]){2}$/.test(e))throw new i.TCModelError("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(e){if((e=Number(e)>>0)<0)throw new i.TCModelError("vendorListVersion",e);this.vendorListVersion_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new i.TCModelError("policyVersion",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.version_},set:function(e){this.version_=parseInt(e,10)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(e){this.isServiceSpecific_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNonStandardStacks",{get:function(){return this.useNonStandardStacks_},set:function(e){this.useNonStandardStacks_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(e){this.supportOOB_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(e){this.purposeOneTreatment_=e},enumerable:!1,configurable:!0}),t.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},t.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},t.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},t.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},t.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},t.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},t.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},t.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},t.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},t.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},t.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},t.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},t.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},t.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},t.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(t.prototype,"numCustomPurposes",{get:function(){var e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var t=Object.keys(this.customPurposes).sort((function(e,t){return Number(e)-Number(t)}));e=parseInt(t.pop(),10)}return e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new i.TCModelError("numCustomPurposes",e)},enumerable:!1,configurable:!0}),t.prototype.updated=function(){var e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t},t.consentLanguages=a.GVL.consentLanguages,t}(s.Cloneable);t.TCModel=u},4566:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TCString=void 0;var r=n(2368),o=n(8663),s=n(6776),i=n(3769),a=function(){function e(){}return e.encode=function(e,t){var n,o="";return e=r.SemanticPreEncoder.process(e,t),(n=Array.isArray(null==t?void 0:t.segments)?t.segments:new r.SegmentSequence(e,t)[""+e.version]).forEach((function(t,s){var i="";s<n.length-1&&(i="."),o+=r.SegmentEncoder.encode(e,t)+i})),o},e.decode=function(e,t){var n=e.split("."),a=n.length;t||(t=new i.TCModel);for(var c=0;c<a;c++){var u=n[c],l=r.Base64Url.decode(u.charAt(0)).substr(0,r.BitLength.segmentType),p=o.SegmentIDs.ID_TO_KEY[s.IntEncoder.decode(l,r.BitLength.segmentType).toString()];r.SegmentEncoder.decode(u,t,p)}return t},e}();t.TCString=a},4952:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Base64Url=void 0;var r=n(6468),o=function(){function e(){}return e.encode=function(e){if(!/^[0-1]+$/.test(e))throw new r.EncodingError("Invalid bitField");var t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";for(var n="",o=0;o<e.length;o+=this.BASIS)n+=this.DICT[parseInt(e.substr(o,this.BASIS),2)];return n},e.decode=function(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new r.DecodingError("Invalidly encoded Base64URL string");for(var t="",n=0;n<e.length;n++){var o=this.REVERSE_DICT.get(e[n]).toString(2);t+="0".repeat(this.BASIS-o.length)+o}return t},e.DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",e.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]]),e.BASIS=6,e.LCM=24,e}();t.Base64Url=o},9093:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitLength=void 0;var r=n(8663),o=function(){function e(){}var t,n,o,s,i,a,c,u,l,p,d,h,f,v,g,m,y,b;return t=r.Fields.cmpId,n=r.Fields.cmpVersion,o=r.Fields.consentLanguage,s=r.Fields.consentScreen,i=r.Fields.created,a=r.Fields.isServiceSpecific,c=r.Fields.lastUpdated,u=r.Fields.policyVersion,l=r.Fields.publisherCountryCode,p=r.Fields.publisherLegitimateInterests,d=r.Fields.publisherConsents,h=r.Fields.purposeConsents,f=r.Fields.purposeLegitimateInterests,v=r.Fields.purposeOneTreatment,g=r.Fields.specialFeatureOptins,m=r.Fields.useNonStandardStacks,y=r.Fields.vendorListVersion,b=r.Fields.version,e[t]=12,e[n]=12,e[o]=12,e[s]=6,e[i]=36,e[a]=1,e[c]=36,e[u]=6,e[l]=12,e[p]=24,e[d]=24,e[h]=24,e[f]=24,e[v]=1,e[g]=12,e[m]=1,e[y]=12,e[b]=6,e.anyBoolean=1,e.encodingType=1,e.maxId=16,e.numCustomPurposes=6,e.numEntries=12,e.numRestrictions=12,e.purposeId=6,e.restrictionType=2,e.segmentType=3,e.singleOrRange=1,e.vendorId=16,e}();t.BitLength=o},4818:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1123:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentEncoder=void 0;var r=n(4952),o=n(9093),s=n(9999),i=n(1148),a=n(6468),c=n(8927),u=n(8663),l=function(){function e(){}return e.encode=function(e,t){var n,i=this;try{n=this.fieldSequence[String(e.version)][t]}catch(n){throw new a.EncodingError("Unable to encode version: ".concat(e.version,", segment: ").concat(t))}var l="";t!==u.Segment.CORE&&(l=s.IntEncoder.encode(u.SegmentIDs.KEY_TO_ID[t],o.BitLength.segmentType));var p=(0,s.FieldEncoderMap)();return n.forEach((function(n){var r=e[n],s=p[n],u=o.BitLength[n];void 0===u&&i.isPublisherCustom(n)&&(u=Number(e[c.Fields.numCustomPurposes]));try{l+=s.encode(r,u)}catch(e){throw new a.EncodingError("Error encoding ".concat(t,"->").concat(n,": ").concat(e.message))}})),r.Base64Url.encode(l)},e.decode=function(e,t,n){var i=this,l=r.Base64Url.decode(e),p=0;n===u.Segment.CORE&&(t.version=s.IntEncoder.decode(l.substr(p,o.BitLength[c.Fields.version]),o.BitLength[c.Fields.version])),n!==u.Segment.CORE&&(p+=o.BitLength.segmentType);var d=this.fieldSequence[String(t.version)][n],h=(0,s.FieldEncoderMap)();return d.forEach((function(e){var n=h[e],r=o.BitLength[e];if(void 0===r&&i.isPublisherCustom(e)&&(r=Number(t[c.Fields.numCustomPurposes])),0!==r){var u=l.substr(p,r);if(n===s.VendorVectorEncoder?t[e]=n.decode(u,t.version):t[e]=n.decode(u,r),Number.isInteger(r))p+=r;else{if(!Number.isInteger(t[e].bitLength))throw new a.DecodingError(e);p+=t[e].bitLength}}})),t},e.isPublisherCustom=function(e){return 0===e.indexOf("publisherCustom")},e.fieldSequence=new i.FieldSequence,e}();t.SegmentEncoder=l},4864:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticPreEncoder=void 0;var r=n(6468),o=n(8663),s=function(){function e(){}return e.process=function(e,t){var n=e.gvl;if(!n)throw new r.EncodingError("Unable to encode TCModel without a GVL");if(!n.isReady)throw new r.EncodingError("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=n.language.toUpperCase(),(null==t?void 0:t.version)>0&&(null==t?void 0:t.version)<=this.processor.length?e.version=t.version:e.version=this.processor.length;var o=e.version-1;if(!this.processor[o])throw new r.EncodingError("Invalid version: ".concat(e.version));return this.processor[o](e,n)},e.processor=[function(e){return e},function(e,t){e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset(1);var n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.forEach((function(n,r){n.forEach((function(s,i){if(s){var a=t.vendors[i];if(!a||a.deletedDate)n.unset(i);else if(0===a[r].length)if("legIntPurposes"===r&&0===a.purposes.length&&0===a.legIntPurposes.length&&a.specialPurposes.length>0);else if(e.isServiceSpecific)if(0===a.flexiblePurposes.length)n.unset(i);else{for(var c=e.publisherRestrictions.getRestrictions(i),u=!1,l=0,p=c.length;l<p&&!u;l++)u=c[l].restrictionType===o.RestrictionType.REQUIRE_CONSENT&&"purposes"===r||c[l].restrictionType===o.RestrictionType.REQUIRE_LI&&"legIntPurposes"===r;u||n.unset(i)}else n.unset(i)}}))})),e.vendorsDisclosed.set(t.vendors),e}],e}();t.SemanticPreEncoder=s},5494:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanEncoder=void 0;var n=function(){function e(){}return e.encode=function(e){return String(Number(e))},e.decode=function(e){return"1"===e},e}();t.BooleanEncoder=n},7116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateEncoder=void 0;var r=n(6776),o=n(6468),s=function(){function e(){}return e.encode=function(e,t){return r.IntEncoder.encode(Math.round(e.getTime()/100),t)},e.decode=function(e,t){if(t!==e.length)throw new o.DecodingError("invalid bit length");var n=new Date;return n.setTime(100*r.IntEncoder.decode(e,t)),n},e}();t.DateEncoder=s},331:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldEncoderMap=void 0;var r=n(8663),o=n(5494),s=n(7116),i=n(1830),a=n(6776),c=n(206),u=n(9148),l=n(5793);t.FieldEncoderMap=function(){var e;return(e={})[r.Fields.version]=a.IntEncoder,e[r.Fields.created]=s.DateEncoder,e[r.Fields.lastUpdated]=s.DateEncoder,e[r.Fields.cmpId]=a.IntEncoder,e[r.Fields.cmpVersion]=a.IntEncoder,e[r.Fields.consentScreen]=a.IntEncoder,e[r.Fields.consentLanguage]=c.LangEncoder,e[r.Fields.vendorListVersion]=a.IntEncoder,e[r.Fields.policyVersion]=a.IntEncoder,e[r.Fields.isServiceSpecific]=o.BooleanEncoder,e[r.Fields.useNonStandardStacks]=o.BooleanEncoder,e[r.Fields.specialFeatureOptins]=i.FixedVectorEncoder,e[r.Fields.purposeConsents]=i.FixedVectorEncoder,e[r.Fields.purposeLegitimateInterests]=i.FixedVectorEncoder,e[r.Fields.purposeOneTreatment]=o.BooleanEncoder,e[r.Fields.publisherCountryCode]=c.LangEncoder,e[r.Fields.vendorConsents]=l.VendorVectorEncoder,e[r.Fields.vendorLegitimateInterests]=l.VendorVectorEncoder,e[r.Fields.publisherRestrictions]=u.PurposeRestrictionVectorEncoder,e.segmentType=a.IntEncoder,e[r.Fields.vendorsDisclosed]=l.VendorVectorEncoder,e[r.Fields.vendorsAllowed]=l.VendorVectorEncoder,e[r.Fields.publisherConsents]=i.FixedVectorEncoder,e[r.Fields.publisherLegitimateInterests]=i.FixedVectorEncoder,e[r.Fields.numCustomPurposes]=a.IntEncoder,e[r.Fields.publisherCustomConsents]=i.FixedVectorEncoder,e[r.Fields.publisherCustomLegitimateInterests]=i.FixedVectorEncoder,e}},1830:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FixedVectorEncoder=void 0;var r=n(5494),o=n(6468),s=n(8663),i=function(){function e(){}return e.encode=function(e,t){for(var n="",o=1;o<=t;o++)n+=r.BooleanEncoder.encode(e.has(o));return n},e.decode=function(e,t){if(e.length!==t)throw new o.DecodingError("bitfield encoding length mismatch");for(var n=new s.Vector,i=1;i<=t;i++)r.BooleanEncoder.decode(e[i-1])&&n.set(i);return n.bitLength=e.length,n},e}();t.FixedVectorEncoder=i},6776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntEncoder=void 0;var r=n(6468),o=function(){function e(){}return e.encode=function(e,t){var n;if("string"==typeof e&&(e=parseInt(e,10)),(n=e.toString(2)).length>t||e<0)throw new r.EncodingError("".concat(e," too large to encode into ").concat(t));return n.length<t&&(n="0".repeat(t-n.length)+n),n},e.decode=function(e,t){if(t!==e.length)throw new r.DecodingError("invalid bit length");return parseInt(e,2)},e}();t.IntEncoder=o},206:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LangEncoder=void 0;var r=n(6776),o=n(6468),s=function(){function e(){}return e.encode=function(e,t){var n=(e=e.toUpperCase()).charCodeAt(0)-65,s=e.charCodeAt(1)-65;if(n<0||n>25||s<0||s>25)throw new o.EncodingError("invalid language code: ".concat(e));if(t%2==1)throw new o.EncodingError("numBits must be even, ".concat(t," is not valid"));return t/=2,r.IntEncoder.encode(n,t)+r.IntEncoder.encode(s,t)},e.decode=function(e,t){if(t!==e.length||e.length%2)throw new o.DecodingError("invalid bit length for language");var n=e.length/2,s=r.IntEncoder.decode(e.slice(0,n),n)+65,i=r.IntEncoder.decode(e.slice(n),n)+65;return String.fromCharCode(s)+String.fromCharCode(i)},e}();t.LangEncoder=s},9148:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PurposeRestrictionVectorEncoder=void 0;var r=n(9093),o=n(5494),s=n(6468),i=n(6776),a=n(8663),c=function(){function e(){}return e.encode=function(e){var t=i.IntEncoder.encode(e.numRestrictions,r.BitLength.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach((function(n){t+=i.IntEncoder.encode(n.purposeId,r.BitLength.purposeId),t+=i.IntEncoder.encode(n.restrictionType,r.BitLength.restrictionType);for(var s=e.getVendors(n),a=s.length,c=0,u=0,l="",p=function(t){var n=s[t];0===u&&(c++,u=n);var p=s[a-1],d=e.gvl.vendorIds;if(t===a-1||s[t+1]>function(e){for(;++e<=p&&!d.has(e););return e}(n)){var h=!(n===u);l+=o.BooleanEncoder.encode(h),l+=i.IntEncoder.encode(u,r.BitLength.vendorId),h&&(l+=i.IntEncoder.encode(n,r.BitLength.vendorId)),u=0}},d=0;d<a;d++)p(d);t+=i.IntEncoder.encode(c,r.BitLength.numEntries),t+=l})),t},e.decode=function(e){var t=0,n=new a.PurposeRestrictionVector,c=i.IntEncoder.decode(e.substr(t,r.BitLength.numRestrictions),r.BitLength.numRestrictions);t+=r.BitLength.numRestrictions;for(var u=0;u<c;u++){var l=i.IntEncoder.decode(e.substr(t,r.BitLength.purposeId),r.BitLength.purposeId);t+=r.BitLength.purposeId;var p=i.IntEncoder.decode(e.substr(t,r.BitLength.restrictionType),r.BitLength.restrictionType);t+=r.BitLength.restrictionType;var d=new a.PurposeRestriction(l,p),h=i.IntEncoder.decode(e.substr(t,r.BitLength.numEntries),r.BitLength.numEntries);t+=r.BitLength.numEntries;for(var f=0;f<h;f++){var v=o.BooleanEncoder.decode(e.substr(t,r.BitLength.anyBoolean));t+=r.BitLength.anyBoolean;var g=i.IntEncoder.decode(e.substr(t,r.BitLength.vendorId),r.BitLength.vendorId);if(t+=r.BitLength.vendorId,v){var m=i.IntEncoder.decode(e.substr(t,r.BitLength.vendorId),r.BitLength.vendorId);if(t+=r.BitLength.vendorId,m<g)throw new s.DecodingError("Invalid RangeEntry: endVendorId ".concat(m," is less than ").concat(g));for(var y=g;y<=m;y++)n.add(y,d)}else n.add(g,d)}}return n.bitLength=t,n},e}();t.PurposeRestrictionVectorEncoder=c},3759:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VectorEncodingType=void 0,(n=t.VectorEncodingType||(t.VectorEncodingType={}))[n.FIELD=0]="FIELD",n[n.RANGE=1]="RANGE"},5793:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VendorVectorEncoder=void 0;var r=n(8663),o=n(2368),s=n(6776),i=n(5494),a=n(1830),c=n(3759),u=n(6468),l=function(){function e(){}return e.encode=function(e){var t,n=[],r=[],a=s.IntEncoder.encode(e.maxId,o.BitLength.maxId),u="",l=o.BitLength.maxId+o.BitLength.encodingType,p=l+e.maxId,d=2*o.BitLength.vendorId+o.BitLength.singleOrRange+o.BitLength.numEntries,h=l+o.BitLength.numEntries;return e.forEach((function(s,a){u+=i.BooleanEncoder.encode(s),(t=e.maxId>d&&h<p)&&s&&(e.has(a+1)?0===r.length&&(r.push(a),h+=o.BitLength.singleOrRange,h+=o.BitLength.vendorId):(r.push(a),h+=o.BitLength.vendorId,n.push(r),r=[]))})),t?(a+=String(c.VectorEncodingType.RANGE),a+=this.buildRangeEncoding(n)):(a+=String(c.VectorEncodingType.FIELD),a+=u),a},e.decode=function(e,t){var n,l=0,p=s.IntEncoder.decode(e.substr(l,o.BitLength.maxId),o.BitLength.maxId);l+=o.BitLength.maxId;var d=s.IntEncoder.decode(e.charAt(l),o.BitLength.encodingType);if(l+=o.BitLength.encodingType,d===c.VectorEncodingType.RANGE){if(n=new r.Vector,1===t){if("1"===e.substr(l,1))throw new u.DecodingError("Unable to decode default consent=1");l++}var h=s.IntEncoder.decode(e.substr(l,o.BitLength.numEntries),o.BitLength.numEntries);l+=o.BitLength.numEntries;for(var f=0;f<h;f++){var v=i.BooleanEncoder.decode(e.charAt(l));l+=o.BitLength.singleOrRange;var g=s.IntEncoder.decode(e.substr(l,o.BitLength.vendorId),o.BitLength.vendorId);if(l+=o.BitLength.vendorId,v){var m=s.IntEncoder.decode(e.substr(l,o.BitLength.vendorId),o.BitLength.vendorId);l+=o.BitLength.vendorId;for(var y=g;y<=m;y++)n.set(y)}else n.set(g)}}else{var b=e.substr(l,p);l+=p,n=a.FixedVectorEncoder.decode(b,p)}return n.bitLength=l,n},e.buildRangeEncoding=function(e){var t=e.length,n=s.IntEncoder.encode(t,o.BitLength.numEntries);return e.forEach((function(e){var t=1===e.length;n+=i.BooleanEncoder.encode(!t),n+=s.IntEncoder.encode(e[0],o.BitLength.vendorId),t||(n+=s.IntEncoder.encode(e[1],o.BitLength.vendorId))})),n},e}();t.VendorVectorEncoder=l},9999:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5494),t),o(n(7116),t),o(n(331),t),o(n(1830),t),o(n(6776),t),o(n(206),t),o(n(9148),t),o(n(3759),t),o(n(5793),t)},2368:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4952),t),o(n(9093),t),o(n(4818),t),o(n(1123),t),o(n(4864),t),o(n(9999),t),o(n(1148),t)},6857:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldSequence=void 0;var r=n(8663);t.FieldSequence=function(){var e,t;this[1]=((e={})[r.Segment.CORE]=[r.Fields.version,r.Fields.created,r.Fields.lastUpdated,r.Fields.cmpId,r.Fields.cmpVersion,r.Fields.consentScreen,r.Fields.consentLanguage,r.Fields.vendorListVersion,r.Fields.purposeConsents,r.Fields.vendorConsents],e),this[2]=((t={})[r.Segment.CORE]=[r.Fields.version,r.Fields.created,r.Fields.lastUpdated,r.Fields.cmpId,r.Fields.cmpVersion,r.Fields.consentScreen,r.Fields.consentLanguage,r.Fields.vendorListVersion,r.Fields.policyVersion,r.Fields.isServiceSpecific,r.Fields.useNonStandardStacks,r.Fields.specialFeatureOptins,r.Fields.purposeConsents,r.Fields.purposeLegitimateInterests,r.Fields.purposeOneTreatment,r.Fields.publisherCountryCode,r.Fields.vendorConsents,r.Fields.vendorLegitimateInterests,r.Fields.publisherRestrictions],t[r.Segment.PUBLISHER_TC]=[r.Fields.publisherConsents,r.Fields.publisherLegitimateInterests,r.Fields.numCustomPurposes,r.Fields.publisherCustomConsents,r.Fields.publisherCustomLegitimateInterests],t[r.Segment.VENDORS_ALLOWED]=[r.Fields.vendorsAllowed],t[r.Segment.VENDORS_DISCLOSED]=[r.Fields.vendorsDisclosed],t)}},912:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentSequence=void 0;var r=n(8663);t.SegmentSequence=function(e,t){if(this[1]=[r.Segment.CORE],this[2]=[r.Segment.CORE],2===e.version)if(e.isServiceSpecific)this[2].push(r.Segment.PUBLISHER_TC);else{var n=!(!t||!t.isForVendors);n&&!0!==e[r.Fields.supportOOB]||this[2].push(r.Segment.VENDORS_DISCLOSED),n&&(e[r.Fields.supportOOB]&&e[r.Fields.vendorsAllowed].size>0&&this[2].push(r.Segment.VENDORS_ALLOWED),this[2].push(r.Segment.PUBLISHER_TC))}}},4020:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},1148:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6857),t),o(n(912),t),o(n(4020),t)},5709:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.DecodingError=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="DecodingError",n}return r(t,e),t}(Error);t.DecodingError=o},9094:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EncodingError=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="EncodingError",n}return r(t,e),t}(Error);t.EncodingError=o},7849:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.GVLError=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="GVLError",n}return r(t,e),t}(Error);t.GVLError=o},6325:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.TCModelError=void 0;var o=function(e){function t(t,n,r){void 0===r&&(r="");var o=e.call(this,"invalid value ".concat(n," passed for ").concat(t," ").concat(r))||this;return o.name="TCModelError",o}return r(t,e),t}(Error);t.TCModelError=o},6468:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5709),t),o(n(9094),t),o(n(7849),t),o(n(6325),t)},3406:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2368),t),o(n(6468),t),o(n(8663),t),o(n(6542),t),o(n(4892),t),o(n(5761),t),o(n(3769),t),o(n(4566),t)},3301:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySearchTree=void 0;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.root=null,t}return o(t,e),t.prototype.getRoot=function(){return this.root},t.prototype.isEmpty=function(){return!this.root},t.prototype.add=function(e){var t,n={value:e,left:null,right:null};if(this.isEmpty())this.root=n;else for(t=this.root;;)if(e<t.value){if(null===t.left){t.left=n;break}t=t.left}else{if(!(e>t.value))break;if(null===t.right){t.right=n;break}t=t.right}},t.prototype.get=function(){for(var e=[],t=this.root;t;)if(t.left){for(var n=t.left;n.right&&n.right!=t;)n=n.right;n.right==t?(n.right=null,e.push(t.value),t=t.right):(n.right=t,t=t.left)}else e.push(t.value),t=t.right;return e},t.prototype.contains=function(e){for(var t=!1,n=this.root;n;){if(n.value===e){t=!0;break}e>n.value?n=n.right:e<n.value&&(n=n.left)}return t},t.prototype.min=function(e){var t;for(void 0===e&&(e=this.root);e;)e.left?e=e.left:(t=e.value,e=null);return t},t.prototype.max=function(e){var t;for(void 0===e&&(e=this.root);e;)e.right?e=e.right:(t=e.value,e=null);return t},t.prototype.remove=function(e,t){void 0===t&&(t=this.root);for(var n=null,r="left";t;)if(e<t.value)n=t,t=t.left,r="left";else if(e>t.value)n=t,t=t.right,r="right";else{if(t.left||t.right)if(t.left)if(t.right){var o=this.min(t.right);this.remove(o,t.right),t.value=o}else n?n[r]=t.left:this.root=t.left;else n?n[r]=t.right:this.root=t.right;else n?n[r]=null:this.root=null;t=null}},t.build=function(e){if(e&&0!==e.length){if(1===e.length)return(n=new t).add(e[0]),n;var n,r=e.length>>1;(n=new t).add(e[r]);var o=n.getRoot();if(o){if(r+1<e.length){var s=t.build(e.slice(r+1));o.right=s?s.getRoot():null}if(r-1>0){var i=t.build(e.slice(0,r-1));o.left=i?i.getRoot():null}}return n}return null},t}(n(6542).Cloneable);t.BinarySearchTree=s},6121:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentLanguages=void 0;var n=function(){function e(){}return e.prototype.has=function(t){return e.langSet.has(t)},e.prototype.forEach=function(t){e.langSet.forEach(t)},Object.defineProperty(e.prototype,"size",{get:function(){return e.langSet.size},enumerable:!1,configurable:!0}),e.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"]),e}();t.ConsentLanguages=n},2183:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4661:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceDisclosureStorageAccessType=void 0,(n=t.DeviceDisclosureStorageAccessType||(t.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",n.WEB="web",n.APP="app"},8927:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=void 0;var n=function(){function e(){}return e.cmpId="cmpId",e.cmpVersion="cmpVersion",e.consentLanguage="consentLanguage",e.consentScreen="consentScreen",e.created="created",e.supportOOB="supportOOB",e.isServiceSpecific="isServiceSpecific",e.lastUpdated="lastUpdated",e.numCustomPurposes="numCustomPurposes",e.policyVersion="policyVersion",e.publisherCountryCode="publisherCountryCode",e.publisherCustomConsents="publisherCustomConsents",e.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",e.publisherLegitimateInterests="publisherLegitimateInterests",e.publisherConsents="publisherConsents",e.publisherRestrictions="publisherRestrictions",e.purposeConsents="purposeConsents",e.purposeLegitimateInterests="purposeLegitimateInterests",e.purposeOneTreatment="purposeOneTreatment",e.specialFeatureOptins="specialFeatureOptins",e.useNonStandardStacks="useNonStandardStacks",e.vendorConsents="vendorConsents",e.vendorLegitimateInterests="vendorLegitimateInterests",e.vendorListVersion="vendorListVersion",e.vendorsAllowed="vendorsAllowed",e.vendorsDisclosed="vendorsDisclosed",e.version="version",e}();t.Fields=n},3263:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},3621:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PurposeRestriction=void 0;var s=n(6542),i=n(6468),a=n(701),c=function(e){function t(t,n){var r=e.call(this)||this;return void 0!==t&&(r.purposeId=t),void 0!==n&&(r.restrictionType=n),r}return o(t,e),t.unHash=function(e){var n=e.split(this.hashSeparator),r=new t;if(2!==n.length)throw new i.TCModelError("hash",e);return r.purposeId=parseInt(n[0],10),r.restrictionType=parseInt(n[1],10),r},Object.defineProperty(t.prototype,"hash",{get:function(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return"".concat(this.purposeId).concat(t.hashSeparator).concat(this.restrictionType)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"purposeId",{get:function(){return this.purposeId_},set:function(e){this.purposeId_=e},enumerable:!1,configurable:!0}),t.prototype.isValid=function(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===a.RestrictionType.NOT_ALLOWED||this.restrictionType===a.RestrictionType.REQUIRE_CONSENT||this.restrictionType===a.RestrictionType.REQUIRE_LI)},t.prototype.isSameAs=function(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType},t.hashSeparator="-",t}(s.Cloneable);t.PurposeRestriction=c},8730:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,s=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}return i},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,s=t.length;o<s;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PurposeRestrictionVector=void 0;var c=n(3621),u=n(3301),l=n(701),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.bitLength=0,t.map=new Map,t}return o(t,e),t.prototype.has=function(e){return this.map.has(e)},t.prototype.isOkToHave=function(e,t,n){var r,o=!0;if(null===(r=this.gvl)||void 0===r?void 0:r.vendors){var s=this.gvl.vendors[n];if(s)if(e===l.RestrictionType.NOT_ALLOWED)o=s.legIntPurposes.includes(t)||s.purposes.includes(t);else if(s.flexiblePurposes.length)switch(e){case l.RestrictionType.REQUIRE_CONSENT:o=s.flexiblePurposes.includes(t)&&s.legIntPurposes.includes(t);break;case l.RestrictionType.REQUIRE_LI:o=s.flexiblePurposes.includes(t)&&s.purposes.includes(t)}else o=!1;else o=!1}return o},t.prototype.add=function(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){var n=t.hash;this.has(n)||(this.map.set(n,new u.BinarySearchTree),this.bitLength=0),this.map.get(n).add(e)}},t.prototype.restrictPurposeToLegalBasis=function(e){for(var t=this.gvl.vendorIds,n=e.hash,r=function(){var e,n,r;try{for(var o=s(t),i=o.next();!i.done;i=o.next())r=i.value}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(),o=a([],i(Array(r).keys()),!1).map((function(e){return e+1})),c=1;c<=r;c++)this.has(n)||(this.map.set(n,u.BinarySearchTree.build(o)),this.bitLength=0),this.map.get(n).add(c)},t.prototype.getVendors=function(e){var t=[];if(e){var n=e.hash;this.has(n)&&(t=this.map.get(n).get())}else{var r=new Set;this.map.forEach((function(e){e.get().forEach((function(e){r.add(e)}))})),t=Array.from(r)}return t},t.prototype.getRestrictionType=function(e,t){var n;return this.getRestrictions(e).forEach((function(e){e.purposeId===t&&(void 0===n||n>e.restrictionType)&&(n=e.restrictionType)})),n},t.prototype.vendorHasRestriction=function(e,t){for(var n=!1,r=this.getRestrictions(e),o=0;o<r.length&&!n;o++)n=t.isSameAs(r[o]);return n},t.prototype.getMaxVendorId=function(){var e=0;return this.map.forEach((function(t){e=Math.max(t.max(),e)})),e},t.prototype.getRestrictions=function(e){var t=[];return this.map.forEach((function(n,r){e?n.contains(e)&&t.push(c.PurposeRestriction.unHash(r)):t.push(c.PurposeRestriction.unHash(r))})),t},t.prototype.getPurposes=function(){var e=new Set;return this.map.forEach((function(t,n){e.add(c.PurposeRestriction.unHash(n).purposeId)})),Array.from(e)},t.prototype.remove=function(e,t){var n=t.hash,r=this.map.get(n);r&&(r.remove(e),r.isEmpty()&&(this.map.delete(n),this.bitLength=0))},Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){var t=this;this.gvl_||(this.gvl_=e,this.map.forEach((function(e,n){var r=c.PurposeRestriction.unHash(n);e.get().forEach((function(n){t.isOkToHave(r.restrictionType,r.purposeId,n)||e.remove(n)}))})))},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.map.size},Object.defineProperty(t.prototype,"numRestrictions",{get:function(){return this.map.size},enumerable:!1,configurable:!0}),t}(n(6542).Cloneable);t.PurposeRestrictionVector=p},701:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictionType=void 0,(n=t.RestrictionType||(t.RestrictionType={}))[n.NOT_ALLOWED=0]="NOT_ALLOWED",n[n.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",n[n.REQUIRE_LI=2]="REQUIRE_LI"},5e3:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Segment=void 0,(n=t.Segment||(t.Segment={})).CORE="core",n.VENDORS_DISCLOSED="vendorsDisclosed",n.VENDORS_ALLOWED="vendorsAllowed",n.PUBLISHER_TC="publisherTC"},4481:(e,t,n)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentIDs=void 0;var o=n(5e3),s=function(){function e(){}return e.ID_TO_KEY=[o.Segment.CORE,o.Segment.VENDORS_DISCLOSED,o.Segment.VENDORS_ALLOWED,o.Segment.PUBLISHER_TC],e.KEY_TO_ID=((r={})[o.Segment.CORE]=0,r[o.Segment.VENDORS_DISCLOSED]=1,r[o.Segment.VENDORS_ALLOWED]=2,r[o.Segment.PUBLISHER_TC]=3,r),e}();t.SegmentIDs=s},6388:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__generator||function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Vector=void 0;var i=n(6542),a=n(6468),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.bitLength=0,t.maxId_=0,t.set_=new Set,t}return o(t,e),t.prototype[Symbol.iterator]=function(){var e;return s(this,(function(t){switch(t.label){case 0:e=1,t.label=1;case 1:return e<=this.maxId?[4,[e,this.has(e)]]:[3,4];case 2:t.sent(),t.label=3;case 3:return e++,[3,1];case 4:return[2]}}))},t.prototype.values=function(){return this.set_.values()},Object.defineProperty(t.prototype,"maxId",{get:function(){return this.maxId_},enumerable:!1,configurable:!0}),t.prototype.has=function(e){return this.set_.has(e)},t.prototype.unset=function(e){var t=this;Array.isArray(e)?e.forEach((function(e){return t.unset(e)})):"object"==typeof e?this.unset(Object.keys(e).map((function(e){return Number(e)}))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach((function(e){t.maxId_=Math.max(t.maxId,e)}))))},t.prototype.isIntMap=function(e){var t=this;return"object"==typeof e&&Object.keys(e).every((function(n){var r=Number.isInteger(parseInt(n,10));return(r=r&&t.isValidNumber(e[n].id))&&void 0!==e[n].name}))},t.prototype.isValidNumber=function(e){return parseInt(e,10)>0},t.prototype.isSet=function(e){var t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t},t.prototype.set=function(e){var t=this;if(Array.isArray(e))e.forEach((function(e){return t.set(e)}));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map((function(e){return Number(e)})));else{if(!this.isValidNumber(e))throw new a.TCModelError("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}},t.prototype.empty=function(){this.set_=new Set},t.prototype.forEach=function(e){for(var t=1;t<=this.maxId;t++)e(this.has(t),t)},Object.defineProperty(t.prototype,"size",{get:function(){return this.set_.size},enumerable:!1,configurable:!0}),t.prototype.setAll=function(e){this.set(e)},t}(i.Cloneable);t.Vector=c},5522:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9255:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4196:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},7128:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5923:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},955:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},5269:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},4537:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},2596:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5522),t),o(n(9255),t),o(n(4196),t),o(n(7128),t),o(n(5923),t),o(n(955),t),o(n(5269),t),o(n(2959),t),o(n(4537),t)},8663:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3301),t),o(n(6121),t),o(n(8927),t),o(n(3263),t),o(n(5708),t),o(n(3621),t),o(n(8730),t),o(n(4661),t),o(n(2183),t),o(n(701),t),o(n(5e3),t),o(n(4481),t),o(n(6388),t),o(n(2596),t)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}(()=>{class e extends Error{constructor(e){super(e),this.name="EncodingError"}}class t extends Error{constructor(e){super(e),this.name="DecodingError"}}class r{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(t){if(!/^[0-1]+$/.test(t))throw new e("Invalid bitField");const n=t.length%this.LCM;t+=n?"0".repeat(this.LCM-n):"";let r="";for(let e=0;e<t.length;e+=this.BASIS)r+=this.DICT[parseInt(t.substr(e,this.BASIS),2)];return r}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new t("Invalidly encoded Base64URL string");let n="";for(let t=0;t<e.length;t++){const r=this.REVERSE_DICT.get(e[t]).toString(2);n+="0".repeat(this.BASIS-r.length)+r}return n}}class o{static 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"]);has(e){return o.langSet.has(e)}forEach(e){o.langSet.forEach(e)}get size(){return o.langSet.size}}class s{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardStacks="useNonStandardStacks";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class i{clone(){const e=new this.constructor;return Object.keys(this).forEach((t=>{const n=this.deepClone(this[t]);void 0!==n&&(e[t]=n)})),e}deepClone(e){const t=typeof e;if("number"===t||"string"===t||"boolean"===t)return e;if(null!==e&&"object"===t){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){const t=[];for(const n of e)t.push(this.deepClone(n));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=this.deepClone(e[n]));return t}}}}class a extends Error{constructor(e,t,n=""){super(`invalid value ${t} passed for ${e} ${n}`),this.name="TCModelError"}}var c,u,l,p;!function(e){e[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"}(c||(c={}));class d extends i{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),void 0!==e&&(this.purposeId=e),void 0!==t&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),n=new d;if(2!==t.length)throw new a("hash",e);return n.purposeId=parseInt(t[0],10),n.restrictionType=parseInt(t[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${d.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===c.NOT_ALLOWED||this.restrictionType===c.REQUIRE_CONSENT||this.restrictionType===c.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class h extends i{root=null;getRoot(){return this.root}isEmpty(){return!this.root}add(e){const t={value:e,left:null,right:null};let n;if(this.isEmpty())this.root=t;else for(n=this.root;;)if(e<n.value){if(null===n.left){n.left=t;break}n=n.left}else{if(!(e>n.value))break;if(null===n.right){n.right=t;break}n=n.right}}get(){const e=[];let t=this.root;for(;t;)if(t.left){let n=t.left;for(;n.right&&n.right!=t;)n=n.right;n.right==t?(n.right=null,e.push(t.value),t=t.right):(n.right=t,t=t.left)}else e.push(t.value),t=t.right;return e}contains(e){let t=!1,n=this.root;for(;n;){if(n.value===e){t=!0;break}e>n.value?n=n.right:e<n.value&&(n=n.left)}return t}min(e=this.root){let t;for(;e;)e.left?e=e.left:(t=e.value,e=null);return t}max(e=this.root){let t;for(;e;)e.right?e=e.right:(t=e.value,e=null);return t}remove(e,t=this.root){let n=null,r="left";for(;t;)if(e<t.value)n=t,t=t.left,r="left";else if(e>t.value)n=t,t=t.right,r="right";else{if(t.left||t.right)if(t.left)if(t.right){const e=this.min(t.right);this.remove(e,t.right),t.value=e}else n?n[r]=t.left:this.root=t.left;else n?n[r]=t.right:this.root=t.right;else n?n[r]=null:this.root=null;t=null}}static build(e){if(e&&0!==e.length){if(1===e.length){const t=new h;return t.add(e[0]),t}{const t=e.length>>1,n=new h;n.add(e[t]);const r=n.getRoot();if(r){if(t+1<e.length){const n=h.build(e.slice(t+1));r.right=n?n.getRoot():null}if(t-1>0){const n=h.build(e.slice(0,t-1));r.left=n?n.getRoot():null}}return n}}return null}}class f extends i{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,n){let r=!0;if(this.gvl?.vendors){const o=this.gvl.vendors[n];if(o)if(e===c.NOT_ALLOWED)r=o.legIntPurposes.includes(t)||o.purposes.includes(t);else if(o.flexiblePurposes.length)switch(e){case c.REQUIRE_CONSENT:r=o.flexiblePurposes.includes(t)&&o.legIntPurposes.includes(t);break;case c.REQUIRE_LI:r=o.flexiblePurposes.includes(t)&&o.purposes.includes(t)}else r=!1;else r=!1}return r}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const n=t.hash;this.has(n)||(this.map.set(n,new h),this.bitLength=0),this.map.get(n).add(e)}}restrictPurposeToLegalBasis(e){const t=this.gvl.vendorIds,n=e.hash,r=function(){let e;for(e of t);return e}(),o=[...Array(r).keys()].map((e=>e+1));for(let e=1;e<=r;e++)this.has(n)||(this.map.set(n,h.build(o)),this.bitLength=0),this.map.get(n).add(e)}getVendors(e){let t=[];if(e){const n=e.hash;this.has(n)&&(t=this.map.get(n).get())}else{const e=new Set;this.map.forEach((t=>{t.get().forEach((t=>{e.add(t)}))})),t=Array.from(e)}return t}getRestrictionType(e,t){let n;return this.getRestrictions(e).forEach((e=>{e.purposeId===t&&(void 0===n||n>e.restrictionType)&&(n=e.restrictionType)})),n}vendorHasRestriction(e,t){let n=!1;const r=this.getRestrictions(e);for(let e=0;e<r.length&&!n;e++)n=t.isSameAs(r[e]);return n}getMaxVendorId(){let e=0;return this.map.forEach((t=>{e=Math.max(t.max(),e)})),e}getRestrictions(e){const t=[];return this.map.forEach(((n,r)=>{e?n.contains(e)&&t.push(d.unHash(r)):t.push(d.unHash(r))})),t}getPurposes(){const e=new Set;return this.map.forEach(((t,n)=>{e.add(d.unHash(n).purposeId)})),Array.from(e)}remove(e,t){const n=t.hash,r=this.map.get(n);r&&(r.remove(e),r.isEmpty()&&(this.map.delete(n),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach(((e,t)=>{const n=d.unHash(t);e.get().forEach((t=>{this.isOkToHave(n.restrictionType,n.purposeId,t)||e.remove(t)}))})))}get gvl(){return this.gvl_}isEmpty(){return 0===this.map.size}get numRestrictions(){return this.map.size}}!function(e){e.COOKIE="cookie",e.WEB="web",e.APP="app"}(u||(u={})),function(e){e.CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"}(l||(l={}));class v{static ID_TO_KEY=[l.CORE,l.VENDORS_DISCLOSED,l.VENDORS_ALLOWED,l.PUBLISHER_TC];static KEY_TO_ID={[l.CORE]:0,[l.VENDORS_DISCLOSED]:1,[l.VENDORS_ALLOWED]:2,[l.PUBLISHER_TC]:3}}class g extends i{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((e=>this.unset(e))):"object"==typeof e?this.unset(Object.keys(e).map((e=>Number(e)))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach((e=>{this.maxId_=Math.max(this.maxId,e)}))))}isIntMap(e){let t="object"==typeof e;return t=t&&Object.keys(e).every((t=>{let n=Number.isInteger(parseInt(t,10));return n=n&&this.isValidNumber(e[t].id),n=n&&void 0!==e[t].name,n})),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((e=>this.set(e)));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map((e=>Number(e))));else{if(!this.isValidNumber(e))throw new a("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}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 m{static[s.cmpId]=12;static[s.cmpVersion]=12;static[s.consentLanguage]=12;static[s.consentScreen]=6;static[s.created]=36;static[s.isServiceSpecific]=1;static[s.lastUpdated]=36;static[s.policyVersion]=6;static[s.publisherCountryCode]=12;static[s.publisherLegitimateInterests]=24;static[s.publisherConsents]=24;static[s.purposeConsents]=24;static[s.purposeLegitimateInterests]=24;static[s.purposeOneTreatment]=1;static[s.specialFeatureOptins]=12;static[s.useNonStandardStacks]=1;static[s.vendorListVersion]=12;static[s.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class y{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class b{static encode(t,n){let r;if("string"==typeof t&&(t=parseInt(t,10)),r=t.toString(2),r.length>n||t<0)throw new e(`${t} too large to encode into ${n}`);return r.length<n&&(r="0".repeat(n-r.length)+r),r}static decode(e,n){if(n!==e.length)throw new t("invalid bit length");return parseInt(e,2)}}class _{static encode(e,t){return b.encode(Math.round(e.getTime()/100),t)}static decode(e,n){if(n!==e.length)throw new t("invalid bit length");const r=new Date;return r.setTime(100*b.decode(e,n)),r}}class E{static encode(e,t){let n="";for(let r=1;r<=t;r++)n+=y.encode(e.has(r));return n}static decode(e,n){if(e.length!==n)throw new t("bitfield encoding length mismatch");const r=new g;for(let t=1;t<=n;t++)y.decode(e[t-1])&&r.set(t);return r.bitLength=e.length,r}}class C{static encode(t,n){const r=(t=t.toUpperCase()).charCodeAt(0)-65,o=t.charCodeAt(1)-65;if(r<0||r>25||o<0||o>25)throw new e(`invalid language code: ${t}`);if(n%2==1)throw new e(`numBits must be even, ${n} is not valid`);return n/=2,b.encode(r,n)+b.encode(o,n)}static decode(e,n){let r;if(n!==e.length||e.length%2)throw new t("invalid bit length for language");{const t=65,n=e.length/2,o=b.decode(e.slice(0,n),n)+t,s=b.decode(e.slice(n),n)+t;r=String.fromCharCode(o)+String.fromCharCode(s)}return r}}class S{static encode(e){let t=b.encode(e.numRestrictions,m.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach((n=>{t+=b.encode(n.purposeId,m.purposeId),t+=b.encode(n.restrictionType,m.restrictionType);const r=e.getVendors(n),o=r.length;let s=0,i=0,a="";for(let t=0;t<o;t++){const n=r[t];0===i&&(s++,i=n);const c=r[o-1],u=e.gvl.vendorIds,l=e=>{for(;++e<=c&&!u.has(e););return e};if(t===o-1||r[t+1]>l(n)){const e=!(n===i);a+=y.encode(e),a+=b.encode(i,m.vendorId),e&&(a+=b.encode(n,m.vendorId)),i=0}}t+=b.encode(s,m.numEntries),t+=a})),t}static decode(e){let n=0;const r=new f,o=b.decode(e.substr(n,m.numRestrictions),m.numRestrictions);n+=m.numRestrictions;for(let s=0;s<o;s++){const o=b.decode(e.substr(n,m.purposeId),m.purposeId);n+=m.purposeId;const s=b.decode(e.substr(n,m.restrictionType),m.restrictionType);n+=m.restrictionType;const i=new d(o,s),a=b.decode(e.substr(n,m.numEntries),m.numEntries);n+=m.numEntries;for(let o=0;o<a;o++){const o=y.decode(e.substr(n,m.anyBoolean));n+=m.anyBoolean;const s=b.decode(e.substr(n,m.vendorId),m.vendorId);if(n+=m.vendorId,o){const o=b.decode(e.substr(n,m.vendorId),m.vendorId);if(n+=m.vendorId,o<s)throw new t(`Invalid RangeEntry: endVendorId ${o} is less than ${s}`);for(let e=s;e<=o;e++)r.add(e,i)}else r.add(s,i)}}return r.bitLength=n,r}}!function(e){e[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"}(p||(p={}));class w{static encode(e){const t=[];let n,r=[],o=b.encode(e.maxId,m.maxId),s="";const i=m.maxId+m.encodingType,a=i+e.maxId,c=2*m.vendorId+m.singleOrRange+m.numEntries;let u=i+m.numEntries;return e.forEach(((o,i)=>{s+=y.encode(o),n=e.maxId>c&&u<a,n&&o&&(e.has(i+1)?0===r.length&&(r.push(i),u+=m.singleOrRange,u+=m.vendorId):(r.push(i),u+=m.vendorId,t.push(r),r=[]))})),n?(o+=String(p.RANGE),o+=this.buildRangeEncoding(t)):(o+=String(p.FIELD),o+=s),o}static decode(e,n){let r,o=0;const s=b.decode(e.substr(o,m.maxId),m.maxId);o+=m.maxId;const i=b.decode(e.charAt(o),m.encodingType);if(o+=m.encodingType,i===p.RANGE){if(r=new g,1===n){if("1"===e.substr(o,1))throw new t("Unable to decode default consent=1");o++}const s=b.decode(e.substr(o,m.numEntries),m.numEntries);o+=m.numEntries;for(let t=0;t<s;t++){const t=y.decode(e.charAt(o));o+=m.singleOrRange;const n=b.decode(e.substr(o,m.vendorId),m.vendorId);if(o+=m.vendorId,t){const t=b.decode(e.substr(o,m.vendorId),m.vendorId);o+=m.vendorId;for(let e=n;e<=t;e++)r.set(e)}else r.set(n)}}else{const t=e.substr(o,s);o+=s,r=E.decode(t,s)}return r.bitLength=o,r}static buildRangeEncoding(e){const t=e.length;let n=b.encode(t,m.numEntries);return e.forEach((e=>{const t=1===e.length;n+=y.encode(!t),n+=b.encode(e[0],m.vendorId),t||(n+=b.encode(e[1],m.vendorId))})),n}}function I(){return{[s.version]:b,[s.created]:_,[s.lastUpdated]:_,[s.cmpId]:b,[s.cmpVersion]:b,[s.consentScreen]:b,[s.consentLanguage]:C,[s.vendorListVersion]:b,[s.policyVersion]:b,[s.isServiceSpecific]:y,[s.useNonStandardStacks]:y,[s.specialFeatureOptins]:E,[s.purposeConsents]:E,[s.purposeLegitimateInterests]:E,[s.purposeOneTreatment]:y,[s.publisherCountryCode]:C,[s.vendorConsents]:w,[s.vendorLegitimateInterests]:w,[s.publisherRestrictions]:S,segmentType:b,[s.vendorsDisclosed]:w,[s.vendorsAllowed]:w,[s.publisherConsents]:E,[s.publisherLegitimateInterests]:E,[s.numCustomPurposes]:b,[s.publisherCustomConsents]:E,[s.publisherCustomLegitimateInterests]:E}}class O{1={[l.CORE]:[s.version,s.created,s.lastUpdated,s.cmpId,s.cmpVersion,s.consentScreen,s.consentLanguage,s.vendorListVersion,s.purposeConsents,s.vendorConsents]};2={[l.CORE]:[s.version,s.created,s.lastUpdated,s.cmpId,s.cmpVersion,s.consentScreen,s.consentLanguage,s.vendorListVersion,s.policyVersion,s.isServiceSpecific,s.useNonStandardStacks,s.specialFeatureOptins,s.purposeConsents,s.purposeLegitimateInterests,s.purposeOneTreatment,s.publisherCountryCode,s.vendorConsents,s.vendorLegitimateInterests,s.publisherRestrictions],[l.PUBLISHER_TC]:[s.publisherConsents,s.publisherLegitimateInterests,s.numCustomPurposes,s.publisherCustomConsents,s.publisherCustomLegitimateInterests],[l.VENDORS_ALLOWED]:[s.vendorsAllowed],[l.VENDORS_DISCLOSED]:[s.vendorsDisclosed]}}class L{1=[l.CORE];2=[l.CORE];constructor(e,t){if(2===e.version)if(e.isServiceSpecific)this[2].push(l.PUBLISHER_TC);else{const n=!(!t||!t.isForVendors);n&&!0!==e[s.supportOOB]||this[2].push(l.VENDORS_DISCLOSED),n&&(e[s.supportOOB]&&e[s.vendorsAllowed].size>0&&this[2].push(l.VENDORS_ALLOWED),this[2].push(l.PUBLISHER_TC))}}}class A{static fieldSequence=new O;static encode(t,n){let o;try{o=this.fieldSequence[String(t.version)][n]}catch(r){throw new e(`Unable to encode version: ${t.version}, segment: ${n}`)}let i="";n!==l.CORE&&(i=b.encode(v.KEY_TO_ID[n],m.segmentType));const a=I();return o.forEach((r=>{const o=t[r],c=a[r];let u=m[r];void 0===u&&this.isPublisherCustom(r)&&(u=Number(t[s.numCustomPurposes]));try{i+=c.encode(o,u)}catch(t){throw new e(`Error encoding ${n}->${r}: ${t.message}`)}})),r.encode(i)}static decode(e,n,o){const i=r.decode(e);let a=0;o===l.CORE&&(n.version=b.decode(i.substr(a,m[s.version]),m[s.version])),o!==l.CORE&&(a+=m.segmentType);const c=this.fieldSequence[String(n.version)][o],u=I();return c.forEach((e=>{const r=u[e];let o=m[e];if(void 0===o&&this.isPublisherCustom(e)&&(o=Number(n[s.numCustomPurposes])),0!==o){const s=i.substr(a,o);if(n[e]=r===w?r.decode(s,n.version):r.decode(s,o),Number.isInteger(o))a+=o;else{if(!Number.isInteger(n[e].bitLength))throw new t(e);a+=n[e].bitLength}}})),n}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}class P{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset(1);const n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.forEach(((n,r)=>{n.forEach(((o,s)=>{if(o){const o=t.vendors[s];if(!o||o.deletedDate)n.unset(s);else if(0===o[r].length)if("legIntPurposes"===r&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0);else if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)n.unset(s);else{const t=e.publisherRestrictions.getRestrictions(s);let o=!1;for(let e=0,n=t.length;e<n&&!o;e++)o=t[e].restrictionType===c.REQUIRE_CONSENT&&"purposes"===r||t[e].restrictionType===c.REQUIRE_LI&&"legIntPurposes"===r;o||n.unset(s)}else n.unset(s)}}))})),e.vendorsDisclosed.set(t.vendors),e}];static process(t,n){const r=t.gvl;if(!r)throw new e("Unable to encode TCModel without a GVL");if(!r.isReady)throw new e("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(t=t.clone()).consentLanguage=r.language.toUpperCase(),n?.version>0&&n?.version<=this.processor.length?t.version=n.version:t.version=this.processor.length;const o=t.version-1;if(!this.processor[o])throw new e(`Invalid version: ${t.version}`);return this.processor[o](t,r)}}class V extends Error{constructor(e){super(e),this.name="GVLError"}}class T{static absCall(e,t,n,r){return new Promise(((o,s)=>{const i=new XMLHttpRequest;i.withCredentials=n,i.addEventListener("load",(()=>{if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){let e=i.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}o(e)}else s(new Error(`HTTP Status: ${i.status} response type: ${i.responseType}`))})),i.addEventListener("error",(()=>{s(new Error("error"))})),i.addEventListener("abort",(()=>{s(new Error("aborted"))})),null===t?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=r,i.ontimeout=()=>{s(new Error("Timeout "+r+"ms "+e))},i.send(t)}))}static post(e,t,n=!1,r=0){return this.absCall(e,JSON.stringify(t),n,r)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}class M extends i{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new o;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new V("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;lang_;isLatest=!1;constructor(e){super();let t=M.baseUrl;if(this.lang_=M.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!t)throw new V("must specify GVL.baseUrl before loading GVL json");if(e>0){const n=e;M.CACHE.has(n)?(this.populate(M.CACHE.get(n)),this.readyPromise=Promise.resolve()):(t+=M.versionedFilename.replace("[VERSION]",String(n)),this.readyPromise=this.fetchJson(t))}else M.CACHE.has(M.LATEST_CACHE_KEY)?(this.populate(M.CACHE.get(M.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(t+M.latestFilename))}}static emptyLanguageCache(e){let t=!1;return void 0===e&&M.LANGUAGE_CACHE.size>0?(M.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(M.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(M.CACHE.delete(e),t=!0):void 0===e&&(M.CACHE=new Map,t=!0),t}cacheLanguage(){M.LANGUAGE_CACHE.has(this.lang_)||M.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})}async fetchJson(e){try{this.populate(await T.fetch(e))}catch(e){throw new V(e.message)}}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,vendors:this.fullVendorList}))}async changeLanguage(e){const t=e.toUpperCase();if(!M.consentLanguages.has(t))throw new V(`unsupported language ${e}`);if(t!==this.lang_)if(this.lang_=t,M.LANGUAGE_CACHE.has(t)){const e=M.LANGUAGE_CACHE.get(t);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const t=M.baseUrl+M.languageFilename.replace("[LANG]",e);try{await this.fetchJson(t),this.cacheLanguage()}catch(e){throw new V("unable to load language: "+e.message)}}}get language(){return this.lang_}isVendorList(e){return void 0!==e&&void 0!==e.vendors}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&M.CACHE.set(M.LATEST_CACHE_KEY,this.getJson()),M.CACHE.has(this.vendorListVersion)||M.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((e=>{this.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((e=>{this.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((e=>{this.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((e=>{this.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((e=>+e))),this.vendorIds=new Set(e),this.vendors_=e.reduce(((e,t)=>{const n=this.vendors_[String(t)];return n&&void 0===n.deletedDate&&(n.purposes.forEach((e=>{this.byPurposeVendorMap[String(e)].consent.add(t)})),n.specialPurposes.forEach((e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)})),n.legIntPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)})),n.flexiblePurposes&&n.flexiblePurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)})),n.features.forEach((e=>{this.byFeatureVendorMap[String(e)].add(t)})),n.specialFeatures.forEach((e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)})),e[t]=n),e}),{})}getFilteredVendors(e,t,n,r){const o=e.charAt(0).toUpperCase()+e.slice(1);let s;const i={};return s="purpose"===e&&n?this["by"+o+"VendorMap"][String(t)][n]:this["by"+(r?"Special":"")+o+"VendorMap"][String(t)],s.forEach((e=>{i[String(e)]=this.vendors[String(e)]})),i}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 M(this.getJson());return this.lang_!==M.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class j extends i{static consentLanguages=M.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardStacks_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=2;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new g;purposeConsents=new g;purposeLegitimateInterests=new g;publisherConsents=new g;publisherLegitimateInterests=new g;publisherCustomConsents=new g;publisherCustomLegitimateInterests=new g;customPurposes;vendorConsents=new g;vendorLegitimateInterests=new g;vendorsDisclosed=new g;vendorsAllowed=new g;publisherRestrictions=new f;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){M.isInstanceOf(e)||(e=new M(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))throw new a("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new a("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new a("consentScreen",e);this.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))throw new a("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=Number(e)>>0)<0)throw new a("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 a("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 useNonStandardStacks(e){this.useNonStandardStacks_=e}get useNonStandardStacks(){return this.useNonStandardStacks_}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("object"==typeof this.customPurposes){const t=Object.keys(this.customPurposes).sort(((e,t)=>Number(e)-Number(t)));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new a("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 R{static encode(e,t){let n,r="";return e=P.process(e,t),n=Array.isArray(t?.segments)?t.segments:new L(e,t)[""+e.version],n.forEach(((t,o)=>{let s="";o<n.length-1&&(s="."),r+=A.encode(e,t)+s})),r}static decode(e,t){const n=e.split("."),o=n.length;t||(t=new j);for(let e=0;e<o;e++){const o=n[e],s=r.decode(o.charAt(0)).substr(0,m.segmentType),i=v.ID_TO_KEY[b.decode(s,m.segmentType).toString()];A.decode(o,t,i)}return t}}var F=n(2131);function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null,o={};return"POST"===t&&n&&(r=JSON.stringify(n),o["Content-Type"]="application/json"),fetch(e,{method:t,headers:o,body:r})}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=B(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw s}}}}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,s,i,a=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){if(e){if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function G(){G=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var s=t&&t.prototype instanceof d?t:d,i=Object.create(s.prototype),a=new I(o||[]);return r(i,"_invoke",{value:E(e,n,a)}),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function h(){}function f(){}var v={};c(v,s,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(O([])));m&&m!==t&&n.call(m,s)&&(v=m);var y=f.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(r,s,i,a){var c=l(e[r],e,s);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==D(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,i,a)}),(function(e){o("throw",e,i,a)})):t.resolve(p).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,a)}))}a(c.arg)}var s;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return s=s?s.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,s){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw s;return{value:void 0,done:!0}}for(n.method=o,n.arg=s;;){var i=n.delegate;if(i){var a=C(i,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function C(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=l(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var s=o.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function O(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=f,r(y,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=c(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(_.prototype),c(_.prototype,i,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,s){void 0===s&&(s=Promise);var i=new _(u(t,n,r,o),s);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),c(y,a,"Generator"),c(y,s,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=O,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],i=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var a=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(a&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=e,i.arg=t,s?(this.method="next",this.next=s.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function H(e,t,n,r,o,s,i){try{var a=e[s](i),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var s=e.apply(t,n);function i(e){H(s,r,o,i,a,"next",e)}function a(e){H(s,r,o,i,a,"throw",e)}i(void 0)}))}}window.cookielawinfo=window.cookielawinfo||{};var W,q=window.cookielawinfo,J=window.iabConfig,K=window.iabTranslations,Y=n(346).CmpApi;function $(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=document.querySelector(e);n&&(n.checked=t)}function z(){document.addEventListener("cli_consent_update",(function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";if("all"===e)q._tcModel.purposeLegitimateInterests.set([2,7,8,9,10,11]),q._tcModel.setAllPurposeConsents(),q._tcModel.setAllSpecialFeatureOptins(),q._tcModel.setAllVendorLegitimateInterests(),q._tcModel.setAllVendorConsents();else if(q._tcModel.unsetAll(),"custom"===e){var t=function(){var e,t,n=k((e=[],t=[],Object.values(q._tcModel.gvl.purposes).forEach((function(n){var r=document.querySelector("#wt-cli-iab-purpose-consents-checkbox-item-".concat(n.id));r&&r.checked&&t.push(n.id);var o=document.querySelector("#wt-cli-iab-purpose-legitimate-interests-checkbox-item-".concat(n.id));o&&o.checked&&e.push(n.id)})),[t,e]),2),r=n[0],o=n[1],s=k(function(){var e=[],t=[];return Object.values(q._tcModel.gvl.specialFeatures).forEach((function(n){var r=document.querySelector("#wt-cli-iab-specialfeature-consents-checkbox-item-".concat(n.id));r&&r.checked&&t.push(n.id);var o=document.querySelector("#wt-cli-iab-specialfeature-consents-checkbox-item-".concat(n.id));o&&o.checked&&e.push(n.id)})),[t,e]}(),1)[0],i=k(function(){var e=[],t=[];return Object.values(q._tcModel.gvl.vendors).forEach((function(n){var r=document.querySelector("#wt-cli-iab-vendor-consents-checkbox-item-".concat(n.id));r&&r.checked&&t.push(n.id);var o=document.querySelector("#wt-cli-iab-vendor-legitimate-interests-checkbox-item-".concat(n.id));o&&o.checked&&e.push(n.id)})),[t,e]}(),2),a=i[0];return[i[1],a,r,o,s]}(),n=k(t,5),r=n[0],o=n[1],s=n[2],i=n[3],a=n[4];q._tcModel.vendorConsents.set(o),q._tcModel.vendorLegitimateInterests.set(r),q._tcModel.purposeLegitimateInterests.set(i),q._tcModel.purposeConsents.set(s),q._tcModel.specialFeatureOptins.set(a)}he("euconsent",se(),CLI_ACCEPT_COOKIE_EXPIRE),ae(),q._cliIABStatusUpdate(!1)}(e.detail.status)}));var e=document.querySelector("#wt-cli-iab-preference-toggle");e&&e.addEventListener("click",de.bind(null))}function X(){return Z.apply(this,arguments)}function Z(){return(Z=Q(G().mark((function e(){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,q._cmpAPI=new Y(404,1,!0),e.next=4,ee();case 4:z(),le(),Object.values(q._tcModel.gvl.purposes).forEach((function(e){var t=ie(q._tcModel.gvl.getVendorsWithConsentPurpose(e.id))+ie(q._tcModel.gvl.getVendorsWithFlexiblePurpose(e.id))+ie(q._tcModel.gvl.getVendorsWithLegIntPurpose(e.id)),n=document.querySelector("#wt-cli-iab-purpose-consents-sub-content-tab-".concat(e.id," .wt-cli-vendors-seek-count"));n&&(n.innerHTML=t)})),Object.values(q._tcModel.gvl.specialPurposes).forEach((function(e){var t=ie(q._tcModel.gvl.getVendorsWithSpecialPurpose(e.id)),n=document.querySelector("#wt-cli-iab-specialpurpose-consents-sub-content-tab-".concat(e.id," .wt-cli-vendors-seek-count"));n&&(n.innerHTML=t)})),Object.values(q._tcModel.gvl.features).forEach((function(e){var t=ie(q._tcModel.gvl.getVendorsWithFeature(e.id)),n=document.querySelector("#wt-cli-iab-feature-consents-sub-content-tab-".concat(e.id," .wt-cli-vendors-seek-count"));n&&(n.innerHTML=t)})),Object.values(q._tcModel.gvl.specialFeatures).forEach((function(e){var t=ie(q._tcModel.gvl.getVendorsWithSpecialFeature(e.id)),n=document.querySelector("#wt-cli-iab-specialfeature-consents-sub-content-tab-".concat(e.id," .wt-cli-vendors-seek-count"));n&&(n.innerHTML=t)})),void 0,t=q._tcModel.gvl.vendors,Object.values(t).forEach((function(e){var t=e.deviceStorageDisclosureUrl;if(t){var n=document.querySelector("#wt-cli-iab-vendor-consents-content-".concat(e.id," .wt-cli-iab-vendor-storage-disclosure-section"));n&&function(e,t,n){var r=document.createElement("button");r.textContent="Show more",r.className="wt-cli-link",e.appendChild(r),r.addEventListener("click",ce.bind(null,e,t))}(n,t,e.id)}})),ae(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0);case 14:case"end":return e.stop()}var t}),e,null,[[0,11]])})))).apply(this,arguments)}function ee(){return te.apply(this,arguments)}function te(){return(te=Q(G().mark((function e(){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!q._tcModel){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ne();case 4:t=e.sent,n=void 0,r=void 0,n=null,(r=function(e){for(var t="".concat("euconsent","="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null}())?(n=R.decode(r)).policyVersion_<t.tcfPolicyVersion?(n=oe(t),he("euconsent",se(),CLI_ACCEPT_COOKIE_EXPIRE)):n.gvl=t:n=oe(t),n.cmpId=404,n.cmpVersion=1,n.isServiceSpecific=!0,q._tcModel=n;case 6:case"end":return e.stop()}var t,n,r}),e)})))).apply(this,arguments)}function ne(){return re.apply(this,arguments)}function re(){return(re=Q(G().mark((function e(){var t;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M.baseUrl=J.baseUrl,M.latestFilename=J.latestFilename,M.languageFilename=J.languageFilename,t=new M,e.next=6,t.readyPromise;case 6:return null!=J&&J.allowedVendors&&t.narrowVendorsTo(J.allowedVendors),e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(e){var t=new j(e);return t.purposeLegitimateInterests.set([2,7,8,9,10,11]),t.setAllVendorLegitimateInterests(),t}function se(){return R.encode(q._tcModel,{segments:[l.CORE,l.PUBLISHER_TC]})}function ie(e){return Object.keys(e).length}function ae(){var e,t=(e={thirdPartySectionChecked:!1,consent:{allowed:[],rejected:[]},legitimateInterest:{allowed:[],rejected:[]}},q._tcModel.vendorConsents.forEach((function(t,n){t?e.consent.allowed.push(n):e.consent.rejected.push(n)})),q._tcModel.vendorLegitimateInterests.forEach((function(t,n){t?e.legitimateInterest.allowed.push(n):e.legitimateInterest.rejected.push(n)})),e.thirdPartySectionChecked=e.consent.allowed.length===ie(q._tcModel.gvl.vendors),e),n=t.consent,r=t.legitimateInterest,o=(t.thirdPartySectionChecked,function(){var e={purposeConsent:{allowed:[],rejected:[]},purposeLegitimateInterest:{allowed:[],rejected:[]},specialFeatures:{allowed:[],rejected:[]},purposeSectionChecked:!1,specialFeaturesSectionChecked:!1};return q._tcModel.purposeConsents.forEach((function(t,n){t?e.purposeConsent.allowed.push(n):e.purposeConsent.rejected.push(n)})),q._tcModel.purposeLegitimateInterests.forEach((function(t,n){t?e.purposeLegitimateInterest.allowed.push(n):e.purposeLegitimateInterest.rejected.push(n)})),q._tcModel.specialFeatureOptins.forEach((function(t,n){t?e.specialFeatures.allowed.push(n):e.specialFeatures.rejected.push(n)})),e.purposeSectionChecked=e.purposeConsent.allowed.length===ie(q._tcModel.gvl.purposes),e.specialFeaturesSectionChecked=e.specialFeatures.allowed.length===ie(q._tcModel.gvl.specialFeatures),e}()),s=o.purposeConsent,i=o.purposeLegitimateInterest,a=o.specialFeatures,c=o.purposeSectionChecked,u=o.specialFeaturesSectionChecked;$("#wt-cli-iab-vendors-consents-checkbox",c);var l,p=N(n.allowed);try{for(p.s();!(l=p.n()).done;){var d=l.value;$("#wt-cli-iab-vendor-consents-checkbox-item-".concat(d))}}catch(e){p.e(e)}finally{p.f()}var h,f=N(n.rejected);try{for(f.s();!(h=f.n()).done;){var v=h.value;$("#wt-cli-iab-vendor-consents-checkbox-item-".concat(v),!1)}}catch(e){f.e(e)}finally{f.f()}var g,m=N(r.allowed);try{for(m.s();!(g=m.n()).done;){var y=g.value;$("#wt-cli-iab-vendor-legitimate-interests-checkbox-item-".concat(y))}}catch(e){m.e(e)}finally{m.f()}var b,_=N(r.rejected);try{for(_.s();!(b=_.n()).done;){var E=b.value;$("#wt-cli-iab-vendor-legitimate-interests-checkbox-item-".concat(E),!1)}}catch(e){_.e(e)}finally{_.f()}$("#wt-cli-iab-purpose-consents-checkbox",c),$("#wt-cli-iab-specialfeature-consents-checkbox",u);var C,S=N(s.allowed);try{for(S.s();!(C=S.n()).done;){var w=C.value;$("#wt-cli-iab-purpose-consents-checkbox-item-".concat(w))}}catch(e){S.e(e)}finally{S.f()}var I,O=N(s.rejected);try{for(O.s();!(I=O.n()).done;){var L=I.value;$("#wt-cli-iab-purpose-consents-checkbox-item-".concat(L),!1)}}catch(e){O.e(e)}finally{O.f()}var A,P=N(i.allowed);try{for(P.s();!(A=P.n()).done;){var V=A.value;$("#wt-cli-iab-purpose-legitimate-interests-checkbox-item-".concat(V))}}catch(e){P.e(e)}finally{P.f()}var T,M=N(i.rejected);try{for(M.s();!(T=M.n()).done;){var j=T.value;$("#wt-cli-iab-purpose-legitimate-interests-checkbox-item-".concat(j),!1)}}catch(e){M.e(e)}finally{M.f()}var R,F=N(a.allowed);try{for(F.s();!(R=F.n()).done;){var x=R.value;$("#wt-cli-iab-specialfeature-consents-checkbox-item-".concat(x))}}catch(e){F.e(e)}finally{F.f()}var D,k=N(a.rejected);try{for(k.s();!(D=k.n()).done;){var B=D.value;$("#wt-cli-iab-specialfeature-consents-checkbox-item-".concat(B),!1)}}catch(e){k.e(e)}finally{k.f()}}function ce(e,t,n){return ue.apply(this,arguments)}function ue(){return(ue=Q(G().mark((function e(t,n,r){var o,s,i,a,c,u;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.preventDefault(),e.prev=1,e.next=4,x(n);case 4:return o=e.sent,e.next=7,o.json();case 7:if((s=e.sent)&&s.disclosures&&s.disclosures.length){e.next=10;break}throw new Error("Invalid disclosures");case 10:i=s.disclosures.map((function(e){return{name:e.identifier,type:e.type,duration:e.maxAgeSeconds?Math.round(e.maxAgeSeconds/86400):0,domain:e.domains||[],purposes:(e.purposes||[]).map((function(e){return q._tcModel.gvl.purposes[e].name}))}})),a=i.map((function(e){var t=["name","type","duration","domain","purposes"].map((function(t){return"<li><div>".concat(K.storageDisclosures.headers[t],"</div><div>").concat("purposes"===t?'<ul class="wt-cli-iab-purposes-list">'.concat(e.purposes.map((function(e){return"<li>".concat(e,"</li>")})).join(""),"</ul>"):"domain"===t?e.domain.join(","):e[t],"</div></li>")})).join("");return'<ul class="wt-cli-iab-cookie-des-table">'.concat(t,"</ul>")})),c='<label class="cli-vendor-sub-title">'.concat(K.storageDisclosures.title,"</label>"),u="".concat(c,'<div class="wt-cli-iab-audit-table">').concat(a.join(""),"</div>"),t.innerHTML=u,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),console.log(e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])})))).apply(this,arguments)}function le(){var e=document.querySelector("#wt-cli-iab-notice-toggle");if(e){var t=e.innerHTML,n=ie(q._tcModel.gvl.vendors);t=t.replace("{{count}}",n),e.innerHTML=t,e.addEventListener("click",pe.bind(null))}}function pe(){CLI.TogglePreference(),de()}function de(){_cliIABShowTab("cli_cookie_vendors");var e=document.querySelector("#wt-cli-iab-vendors-consents[aria-expanded='false']")||null;e&&e.click()}function he(e,t,n){var r="";!0===Boolean(Cli_Data.secure_cookies)&&(r=";secure");var o=""!==Cli_Data.cookieDomain?";domain=".concat(Cli_Data.cookieDomain):"",s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3);var i=";expires=".concat(s.toGMTString());n<1?this.eraseCookie(e,i):document.cookie="".concat(e,"=").concat(t).concat(r).concat(i).concat(o,";path=/")}J.status&&F(),W=Q(G().mark((function e(){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,X();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])}))),"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",W):W()),q._cliIABStatusUpdate=Q(G().mark((function e(){var t,n,r,o=arguments;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>0&&void 0!==o[0]&&o[0],n=o.length>1&&void 0!==o[1]&&o[1],J.status){e.next=4;break}return e.abrupt("return");case 4:if(q._tcModel){e.next=7;break}return e.next=7,ee();case 7:r=J.appliedLaw,q._cmpAPI.update("ccpa"!==r?t&&n?"":se():null,t);case 9:case"end":return e.stop()}}),e)})))})()})();