csync-eu.smartadserver.com Open in urlscan Pro
2a02:26f0:e300::5f64:9229  Public Scan

URL: https://csync-eu.smartadserver.com/3519/CookieSync.min.js
Submission: On August 29 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);throw(f=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",f}c=n[i]={exports:{}},e[i][0].call(c.exports,function(r){return o(e[i][1][r]||r)},c,c.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){var __values=this&&this.__values||function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Cloneable=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.Cloneable=void 0,e.prototype.clone=function(){var e=this,r=new this.constructor;return Object.keys(this).forEach(function(t){var n=e.deepClone(e[t]);void 0!==n&&(r[t]=n)}),r},e.prototype.deepClone=function(e){var r,t,n=typeof e;if("number"==n||"string"==n||"boolean"==n)return e;if(null!==e&&"object"==n){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){var o=[];try{for(var i=__values(e),l=i.next();!l.done;l=i.next()){var a=l.value;o.push(this.deepClone(a))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(t=i.return)&&t.call(i)}finally{if(r)throw r.error}}return e instanceof Array?o:new e.constructor(o)}var f,u={};for(f in e)e.hasOwnProperty(f)&&(u[f]=this.deepClone(e[f]));return u}},e);function e(){}exports.Cloneable=Cloneable},{}],2:[function(require,module,exports){var e,__extends=this&&this.__extends||(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r=r||Promise)(function(s,o){function i(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,a)}u((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var r,n,s,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(s=2&o[0]?n.return:o[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;switch(n=0,(o=s?[2&o[0],s.value]:o)[0]){case 0:case 1:s=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((s=0<(s=i.trys).length&&s[s.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3]))i.label=o[1];else if(6===o[0]&&i.label<s[1])i.label=s[1],s=o;else{if(!(s&&i.label<s[2])){s[2]&&i.ops.pop(),i.trys.pop();continue}i.label=s[2],i.ops.push(o)}}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Cloneable_js_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.GVL=void 0,require("./Cloneable.js")),index_js_1=require("./errors/index.js"),Json_js_1=require("./Json.js"),index_js_2=require("./model/index.js"),require=function(e){function t(r){var n=e.call(this)||this,s=(n.isReady_=!1,n.isLatest=!1,t.baseUrl);if(n.lang_=t.DEFAULT_LANGUAGE,n.isVendorList(r))n.populate(r),n.readyPromise=Promise.resolve();else{if(!s)throw new index_js_1.GVLError("must specify GVL.baseUrl before loading GVL json");0<r?t.CACHE.has(r=r)?(n.populate(t.CACHE.get(r)),n.readyPromise=Promise.resolve()):(s+=t.versionedFilename.replace("[VERSION]",String(r)),n.readyPromise=n.fetchJson(s)):t.CACHE.has(t.LATEST_CACHE_KEY)?(n.populate(t.CACHE.get(t.LATEST_CACHE_KEY)),n.readyPromise=Promise.resolve()):(n.isLatest=!0,n.readyPromise=n.fetchJson(s+t.latestFilename))}return n}return __extends(t,e),Object.defineProperty(t,"baseUrl",{get:function(){return this.baseUrl_},set:function(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new index_js_1.GVLError("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");0<e.length&&"/"!==e[e.length-1]&&(e+="/"),this.baseUrl_=e},enumerable:!1,configurable:!0}),t.emptyLanguageCache=function(e){var r=!1;return void 0===e&&0<t.LANGUAGE_CACHE.size?(t.LANGUAGE_CACHE=new Map,r=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(t.LANGUAGE_CACHE.delete(e.toUpperCase()),r=!0),r},t.emptyCache=function(e){var r=!1;return Number.isInteger(e)&&0<=e?(t.CACHE.delete(e),r=!0):void 0===e&&(t.CACHE=new Map,r=!0),r},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 __awaiter(this,void 0,void 0,function(){var t,r;return __generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=this.populate,[4,Json_js_1.Json.fetch(e)];case 1:return t.apply(this,[n.sent()]),[3,3];case 2:throw r=n.sent(),new index_js_1.GVLError(r.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 __awaiter(this,void 0,void 0,function(){var n,s,o,r;return __generator(this,function(a){switch(a.label){case 0:if(r=e.toUpperCase(),!t.consentLanguages.has(r))return[3,6];if(r!==this.lang_){if(this.lang_=r,!t.LANGUAGE_CACHE.has(r))return[3,1];for(s in n=t.LANGUAGE_CACHE.get(r))n.hasOwnProperty(s)&&(this[s]=n[s])}return[3,5];case 1:o=t.baseUrl+t.languageFilename.replace("[LANG]",e),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.fetchJson(o)];case 3:return a.sent(),this.cacheLanguage(),[3,5];case 4:throw r=a.sent(),new index_js_1.GVLError("unable to load language: "+r.message);case 5:return[3,7];case 6:throw new index_js_1.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,r){var n=t.vendors_[String(r)];return n&&void 0===n.deletedDate&&(n.purposes.forEach(function(e){t.byPurposeVendorMap[String(e)].consent.add(r)}),n.specialPurposes.forEach(function(e){t.bySpecialPurposeVendorMap[String(e)].add(r)}),n.legIntPurposes.forEach(function(e){t.byPurposeVendorMap[String(e)].legInt.add(r)}),n.flexiblePurposes&&n.flexiblePurposes.forEach(function(e){t.byPurposeVendorMap[String(e)].flexible.add(r)}),n.features.forEach(function(e){t.byFeatureVendorMap[String(e)].add(r)}),n.specialFeatures.forEach(function(e){t.bySpecialFeatureVendorMap[String(e)].add(r)}),e[r]=n),e},{})},t.prototype.getFilteredVendors=function(e,t,r,n){var s=this,o=e.charAt(0).toUpperCase()+e.slice(1),i={};return("purpose"===e&&r?this["by"+o+"VendorMap"][String(t)][r]:this["by"+(n?"Special":"")+o+"VendorMap"][String(t)]).forEach(function(e){i[String(e)]=s.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 index_js_2.ConsentLanguages,t.latestFilename="vendor-list.json",t.versionedFilename="archives/vendor-list-v[VERSION].json",t.languageFilename="purposes-[LANG].json",t}(Cloneable_js_1.Cloneable);exports.GVL=require},{"./Cloneable.js":1,"./Json.js":3,"./errors/index.js":30,"./model/index.js":55}],3:[function(require,module,exports){function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Json=void 0,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(200<=i.status&&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 this.absCall(e,null,t=void 0===t?!1:t,n=void 0===n?0:n)},exports.Json=e},{}],4:[function(require,module,exports){var e,__extends=this&&this.__extends||(e=function(t,n){return(e=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])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}),Cloneable_js_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.TCModel=void 0,require("./Cloneable.js")),index_js_1=require("./errors/index.js"),GVL_js_1=require("./GVL.js"),index_js_2=require("./model/index.js"),require=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 index_js_2.Vector,n.purposeConsents=new index_js_2.Vector,n.purposeLegitimateInterests=new index_js_2.Vector,n.publisherConsents=new index_js_2.Vector,n.publisherLegitimateInterests=new index_js_2.Vector,n.publisherCustomConsents=new index_js_2.Vector,n.publisherCustomLegitimateInterests=new index_js_2.Vector,n.vendorConsents=new index_js_2.Vector,n.vendorLegitimateInterests=new index_js_2.Vector,n.vendorsDisclosed=new index_js_2.Vector,n.vendorsAllowed=new index_js_2.Vector,n.publisherRestrictions=new index_js_2.PurposeRestrictionVector,t&&(n.gvl=t),n.updated(),n}return __extends(t,e),Object.defineProperty(t.prototype,"gvl",{get:function(){return this.gvl_},set:function(e){GVL_js_1.GVL.isInstanceOf(e)||(e=new GVL_js_1.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)&&1<e))throw new index_js_1.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)&&-1<e))throw new index_js_1.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)&&-1<e))throw new index_js_1.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 index_js_1.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 index_js_1.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 index_js_1.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 t,e=this.numCustomPurposes_;return"object"==typeof this.customPurposes&&(t=Object.keys(this.customPurposes).sort(function(e,t){return Number(e)-Number(t)}),e=parseInt(t.pop(),10)),e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new index_js_1.TCModelError("numCustomPurposes",e)},enumerable:!1,configurable:!0}),t.prototype.updated=function(){var e=new Date,e=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=e,this.lastUpdated=e},t.consentLanguages=GVL_js_1.GVL.consentLanguages,t}(Cloneable_js_1.Cloneable);exports.TCModel=require},{"./Cloneable.js":1,"./GVL.js":2,"./errors/index.js":30,"./model/index.js":55}],5:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.TCString=void 0;var index_js_1=require("./encoder/index.js"),index_js_2=require("./model/index.js"),IntEncoder_js_1=require("./encoder/field/IntEncoder.js"),TCModel_js_1=require("./TCModel.js");function e(){}e.encode=function(e,n){var r,t="";return e=index_js_1.SemanticPreEncoder.process(e,n),(r=Array.isArray(null==n?void 0:n.segments)?n.segments:new index_js_1.SegmentSequence(e,n)[""+e.version]).forEach(function(n,d){var s="";d<r.length-1&&(s="."),t+=index_js_1.SegmentEncoder.encode(e,n)+s}),t},e.decode=function(e,n){var r=e.split("."),t=r.length;n=n||new TCModel_js_1.TCModel;for(var d=0;d<t;d++){var s=r[d],i=index_js_1.Base64Url.decode(s.charAt(0)).substr(0,index_js_1.BitLength.segmentType),i=index_js_2.SegmentIDs.ID_TO_KEY[IntEncoder_js_1.IntEncoder.decode(i,index_js_1.BitLength.segmentType).toString()];index_js_1.SegmentEncoder.decode(s,n,i)}return n},exports.TCString=e},{"./TCModel.js":4,"./encoder/field/IntEncoder.js":15,"./encoder/index.js":21,"./model/index.js":55}],6:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Base64Url=void 0;var index_js_1=require("../errors/index.js");function e(){}e.encode=function(e){if(!/^[0-1]+$/.test(e))throw new index_js_1.EncodingError("Invalid bitField");var r=e.length%this.LCM;e+=r?"0".repeat(this.LCM-r):"";for(var t="",n=0;n<e.length;n+=this.BASIS)t+=this.DICT[parseInt(e.substr(n,this.BASIS),2)];return t},e.decode=function(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new index_js_1.DecodingError("Invalidly encoded Base64URL string");for(var r="",t=0;t<e.length;t++){var n=this.REVERSE_DICT.get(e[t]).toString(2);r+="0".repeat(this.BASIS-n.length)+n}return r},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,exports.Base64Url=e},{"../errors/index.js":30}],7:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.BitLength=void 0;var s,i,n,d,t,r,_,o,l,p,x,u,j,a,c,F,g,require=require("../model/index.js");function e(){}s=require.Fields.cmpId,i=require.Fields.cmpVersion,n=require.Fields.consentLanguage,d=require.Fields.consentScreen,t=require.Fields.created,r=require.Fields.isServiceSpecific,_=require.Fields.lastUpdated,o=require.Fields.policyVersion,l=require.Fields.publisherCountryCode,p=require.Fields.publisherLegitimateInterests,x=require.Fields.publisherConsents,u=require.Fields.purposeConsents,j=require.Fields.purposeLegitimateInterests,a=require.Fields.purposeOneTreatment,c=require.Fields.specialFeatureOptins,F=require.Fields.useNonStandardStacks,g=require.Fields.vendorListVersion,require=require.Fields.version,e[s]=12,e[i]=12,e[n]=12,e[d]=6,e[t]=36,e[r]=1,e[_]=36,e[o]=6,e[l]=12,e[p]=24,e[x]=24,e[u]=24,e[j]=24,e[a]=1,e[c]=12,e[F]=1,e[g]=12,e[require]=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,exports.BitLength=e},{"../model/index.js":55}],8:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0})},{}],9:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SegmentEncoder=void 0;var Base64Url_js_1=require("./Base64Url.js"),BitLength_js_1=require("./BitLength.js"),index_js_1=require("./field/index.js"),index_js_2=require("./sequence/index.js"),index_js_3=require("../errors/index.js"),Fields_js_1=require("../model/Fields.js"),index_js_4=require("../model/index.js"),require=(e.encode=function(e,n){var s,i=this;try{s=this.fieldSequence[String(e.version)][n]}catch(s){throw new index_js_3.EncodingError("Unable to encode version: ".concat(e.version,", segment: ").concat(n))}var r="",t=(n!==index_js_4.Segment.CORE&&(r=index_js_1.IntEncoder.encode(index_js_4.SegmentIDs.KEY_TO_ID[n],BitLength_js_1.BitLength.segmentType)),(0,index_js_1.FieldEncoderMap)());return s.forEach(function(s){var d=e[s],o=t[s],_=BitLength_js_1.BitLength[s];void 0===_&&i.isPublisherCustom(s)&&(_=Number(e[Fields_js_1.Fields.numCustomPurposes]));try{r+=o.encode(d,_)}catch(e){throw new index_js_3.EncodingError("Error encoding ".concat(n,"->").concat(s,": ").concat(e.message))}}),Base64Url_js_1.Base64Url.encode(r)},e.decode=function(e,n,s){var i=this,r=Base64Url_js_1.Base64Url.decode(e),t=0,e=(s===index_js_4.Segment.CORE&&(n.version=index_js_1.IntEncoder.decode(r.substr(t,BitLength_js_1.BitLength[Fields_js_1.Fields.version]),BitLength_js_1.BitLength[Fields_js_1.Fields.version])),s!==index_js_4.Segment.CORE&&(t+=BitLength_js_1.BitLength.segmentType),this.fieldSequence[String(n.version)][s]),o=(0,index_js_1.FieldEncoderMap)();return e.forEach(function(e){var s=o[e],d=BitLength_js_1.BitLength[e];if(0!==(d=void 0===d&&i.isPublisherCustom(e)?Number(n[Fields_js_1.Fields.numCustomPurposes]):d)){var _=r.substr(t,d);if(s===index_js_1.VendorVectorEncoder?n[e]=s.decode(_,n.version):n[e]=s.decode(_,d),Number.isInteger(d))t+=d;else{if(!Number.isInteger(n[e].bitLength))throw new index_js_3.DecodingError(e);t+=n[e].bitLength}}}),n},e.isPublisherCustom=function(e){return 0===e.indexOf("publisherCustom")},e.fieldSequence=new index_js_2.FieldSequence,e);function e(){}exports.SegmentEncoder=require},{"../errors/index.js":30,"../model/Fields.js":36,"../model/index.js":55,"./Base64Url.js":6,"./BitLength.js":7,"./field/index.js":20,"./sequence/index.js":25}],10:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SemanticPreEncoder=void 0;var index_js_1=require("../errors/index.js"),index_js_2=require("../model/index.js");function e(){}e.process=function(e,r){var s=e.gvl;if(!s)throw new index_js_1.EncodingError("Unable to encode TCModel without a GVL");if(!s.isReady)throw new index_js_1.EncodingError("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=s.language.toUpperCase(),0<(null==r?void 0:r.version)&&(null==r?void 0:r.version)<=this.processor.length?e.version=r.version:e.version=this.processor.length;r=e.version-1;if(this.processor[r])return this.processor[r](e,s);throw new index_js_1.EncodingError("Invalid version: ".concat(e.version))},e.processor=[function(e){return e},function(e,r){e.publisherRestrictions.gvl=r,e.purposeLegitimateInterests.unset(1);var s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach(function(s,n){s.forEach(function(o,t){if(o){o=r.vendors[t];if(!o||o.deletedDate)s.unset(t);else if(0===o[n].length&&!("legIntPurposes"===n&&0===o.purposes.length&&0===o.legIntPurposes.length&&0<o.specialPurposes.length))if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)s.unset(t);else{for(var c=e.publisherRestrictions.getRestrictions(t),l=!1,d=0,u=c.length;d<u&&!l;d++)l=c[d].restrictionType===index_js_2.RestrictionType.REQUIRE_CONSENT&&"purposes"===n||c[d].restrictionType===index_js_2.RestrictionType.REQUIRE_LI&&"legIntPurposes"===n;l||s.unset(t)}else s.unset(t)}})}),e.vendorsDisclosed.set(r.vendors),e}],exports.SemanticPreEncoder=e},{"../errors/index.js":30,"../model/index.js":55}],11:[function(require,module,exports){function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BooleanEncoder=void 0,e.encode=function(e){return String(Number(e))},e.decode=function(e){return"1"===e},exports.BooleanEncoder=e},{}],12:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.DateEncoder=void 0;var IntEncoder_js_1=require("./IntEncoder.js"),index_js_1=require("../../errors/index.js");function e(){}e.encode=function(e,n){return IntEncoder_js_1.IntEncoder.encode(Math.round(e.getTime()/100),n)},e.decode=function(e,n){if(n!==e.length)throw new index_js_1.DecodingError("invalid bit length");var r=new Date;return r.setTime(100*IntEncoder_js_1.IntEncoder.decode(e,n)),r},exports.DateEncoder=e},{"../../errors/index.js":30,"./IntEncoder.js":15}],13:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldEncoderMap=void 0;var index_js_1=require("../../model/index.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),DateEncoder_js_1=require("./DateEncoder.js"),FixedVectorEncoder_js_1=require("./FixedVectorEncoder.js"),IntEncoder_js_1=require("./IntEncoder.js"),LangEncoder_js_1=require("./LangEncoder.js"),PurposeRestrictionVectorEncoder_js_1=require("./PurposeRestrictionVectorEncoder.js"),VendorVectorEncoder_js_1=require("./VendorVectorEncoder.js");exports.FieldEncoderMap=function(){var e;return(e={})[index_js_1.Fields.version]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.created]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.lastUpdated]=DateEncoder_js_1.DateEncoder,e[index_js_1.Fields.cmpId]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.cmpVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentScreen]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.consentLanguage]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorListVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.policyVersion]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.isServiceSpecific]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.useNonStandardStacks]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.specialFeatureOptins]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.purposeOneTreatment]=BooleanEncoder_js_1.BooleanEncoder,e[index_js_1.Fields.publisherCountryCode]=LangEncoder_js_1.LangEncoder,e[index_js_1.Fields.vendorConsents]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorLegitimateInterests]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherRestrictions]=PurposeRestrictionVectorEncoder_js_1.PurposeRestrictionVectorEncoder,e.segmentType=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.vendorsDisclosed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.vendorsAllowed]=VendorVectorEncoder_js_1.VendorVectorEncoder,e[index_js_1.Fields.publisherConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.numCustomPurposes]=IntEncoder_js_1.IntEncoder,e[index_js_1.Fields.publisherCustomConsents]=FixedVectorEncoder_js_1.FixedVectorEncoder,e[index_js_1.Fields.publisherCustomLegitimateInterests]=FixedVectorEncoder_js_1.FixedVectorEncoder,e}},{"../../model/index.js":55,"./BooleanEncoder.js":11,"./DateEncoder.js":12,"./FixedVectorEncoder.js":14,"./IntEncoder.js":15,"./LangEncoder.js":16,"./PurposeRestrictionVectorEncoder.js":17,"./VendorVectorEncoder.js":19}],14:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.FixedVectorEncoder=void 0;var BooleanEncoder_js_1=require("./BooleanEncoder.js"),index_js_1=require("../../errors/index.js"),index_js_2=require("../../model/index.js");function e(){}e.encode=function(e,o){for(var n="",r=1;r<=o;r++)n+=BooleanEncoder_js_1.BooleanEncoder.encode(e.has(r));return n},e.decode=function(e,o){if(e.length!==o)throw new index_js_1.DecodingError("bitfield encoding length mismatch");for(var n=new index_js_2.Vector,r=1;r<=o;r++)BooleanEncoder_js_1.BooleanEncoder.decode(e[r-1])&&n.set(r);return n.bitLength=e.length,n},exports.FixedVectorEncoder=e},{"../../errors/index.js":30,"../../model/index.js":55,"./BooleanEncoder.js":11}],15:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.IntEncoder=void 0;var index_js_1=require("../../errors/index.js");function e(){}e.encode=function(e,n){var t;if((t=(e="string"==typeof e?parseInt(e,10):e).toString(2)).length>n||e<0)throw new index_js_1.EncodingError("".concat(e," too large to encode into ").concat(n));return t=t.length<n?"0".repeat(n-t.length)+t:t},e.decode=function(e,n){if(n!==e.length)throw new index_js_1.DecodingError("invalid bit length");return parseInt(e,2)},exports.IntEncoder=e},{"../../errors/index.js":30}],16:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.LangEncoder=void 0;var IntEncoder_js_1=require("./IntEncoder.js"),index_js_1=require("../../errors/index.js");function e(){}e.encode=function(e,n){var r=(e=e.toUpperCase()).charCodeAt(0)-65,o=e.charCodeAt(1)-65;if(r<0||25<r||o<0||25<o)throw new index_js_1.EncodingError("invalid language code: ".concat(e));if(n%2==1)throw new index_js_1.EncodingError("numBits must be even, ".concat(n," is not valid"));return IntEncoder_js_1.IntEncoder.encode(r,n/=2)+IntEncoder_js_1.IntEncoder.encode(o,n)},e.decode=function(e,n){if(n!==e.length||e.length%2)throw new index_js_1.DecodingError("invalid bit length for language");var n=e.length/2,o=IntEncoder_js_1.IntEncoder.decode(e.slice(0,n),n)+65,e=IntEncoder_js_1.IntEncoder.decode(e.slice(n),n)+65;return String.fromCharCode(o)+String.fromCharCode(e)},exports.LangEncoder=e},{"../../errors/index.js":30,"./IntEncoder.js":15}],17:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVectorEncoder=void 0;var BitLength_js_1=require("../BitLength.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),index_js_1=require("../../errors/index.js"),IntEncoder_js_1=require("./IntEncoder.js"),index_js_2=require("../../model/index.js");function e(){}e.encode=function(e){var n=IntEncoder_js_1.IntEncoder.encode(e.numRestrictions,BitLength_js_1.BitLength.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach(function(t){n=(n+=IntEncoder_js_1.IntEncoder.encode(t.purposeId,BitLength_js_1.BitLength.purposeId))+IntEncoder_js_1.IntEncoder.encode(t.restrictionType,BitLength_js_1.BitLength.restrictionType);for(var r=e.getVendors(t),o=r.length,i=0,s=0,d="",c=0;c<o;c++)!function(n){var t=r[n],_=(0===s&&(i++,s=t),r[o-1]),c=e.gvl.vendorIds;(n===o-1||r[n+1]>function(e){for(;++e<=_&&!c.has(e););return e}(t))&&(n=!(t===s),d=(d+=BooleanEncoder_js_1.BooleanEncoder.encode(n))+IntEncoder_js_1.IntEncoder.encode(s,BitLength_js_1.BitLength.vendorId),n&&(d+=IntEncoder_js_1.IntEncoder.encode(t,BitLength_js_1.BitLength.vendorId)),s=0)}(c);n=(n+=IntEncoder_js_1.IntEncoder.encode(i,BitLength_js_1.BitLength.numEntries))+d}),n},e.decode=function(e){var n=0,t=new index_js_2.PurposeRestrictionVector,r=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.numRestrictions),BitLength_js_1.BitLength.numRestrictions);n+=BitLength_js_1.BitLength.numRestrictions;for(var o=0;o<r;o++){var i=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.purposeId),BitLength_js_1.BitLength.purposeId),s=(n+=BitLength_js_1.BitLength.purposeId,IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.restrictionType),BitLength_js_1.BitLength.restrictionType)),d=(n+=BitLength_js_1.BitLength.restrictionType,new index_js_2.PurposeRestriction(i,s)),_=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.numEntries),BitLength_js_1.BitLength.numEntries);n+=BitLength_js_1.BitLength.numEntries;for(var c=0;c<_;c++){var B=BooleanEncoder_js_1.BooleanEncoder.decode(e.substr(n,BitLength_js_1.BitLength.anyBoolean)),g=(n+=BitLength_js_1.BitLength.anyBoolean,IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId));if(n+=BitLength_js_1.BitLength.vendorId,B){var h=IntEncoder_js_1.IntEncoder.decode(e.substr(n,BitLength_js_1.BitLength.vendorId),BitLength_js_1.BitLength.vendorId);if(n+=BitLength_js_1.BitLength.vendorId,h<g)throw new index_js_1.DecodingError("Invalid RangeEntry: endVendorId ".concat(h," is less than ").concat(g));for(var L=g;L<=h;L++)t.add(L,d)}else t.add(g,d)}}return t.bitLength=n,t},exports.PurposeRestrictionVectorEncoder=e},{"../../errors/index.js":30,"../../model/index.js":55,"../BitLength.js":7,"./BooleanEncoder.js":11,"./IntEncoder.js":15}],18:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.VectorEncodingType=void 0,(exports=exports.VectorEncodingType||(exports.VectorEncodingType={}))[exports.FIELD=0]="FIELD",exports[exports.RANGE=1]="RANGE"},{}],19:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.VendorVectorEncoder=void 0;var index_js_1=require("../../model/index.js"),index_js_2=require("../index.js"),IntEncoder_js_1=require("./IntEncoder.js"),BooleanEncoder_js_1=require("./BooleanEncoder.js"),FixedVectorEncoder_js_1=require("./FixedVectorEncoder.js"),VectorEncodingType_js_1=require("./VectorEncodingType.js"),index_js_3=require("../../errors/index.js");function e(){}e.encode=function(e){var n,d=[],r=[],t=IntEncoder_js_1.IntEncoder.encode(e.maxId,index_js_2.BitLength.maxId),o="",i=index_js_2.BitLength.maxId+index_js_2.BitLength.encodingType,_=i+e.maxId,s=2*index_js_2.BitLength.vendorId+index_js_2.BitLength.singleOrRange+index_js_2.BitLength.numEntries,c=i+index_js_2.BitLength.numEntries;return e.forEach(function(t,i){o+=BooleanEncoder_js_1.BooleanEncoder.encode(t),(n=e.maxId>s&&c<_)&&t&&(e.has(i+1)?0===r.length&&(r.push(i),c=(c+=index_js_2.BitLength.singleOrRange)+index_js_2.BitLength.vendorId):(r.push(i),c+=index_js_2.BitLength.vendorId,d.push(r),r=[]))}),n?t=(t+=String(VectorEncodingType_js_1.VectorEncodingType.RANGE))+this.buildRangeEncoding(d):t=(t+=String(VectorEncodingType_js_1.VectorEncodingType.FIELD))+o,t},e.decode=function(e,n){var d,r=0,t=IntEncoder_js_1.IntEncoder.decode(e.substr(r,index_js_2.BitLength.maxId),index_js_2.BitLength.maxId),o=(r+=index_js_2.BitLength.maxId,IntEncoder_js_1.IntEncoder.decode(e.charAt(r),index_js_2.BitLength.encodingType));if(r+=index_js_2.BitLength.encodingType,o===VectorEncodingType_js_1.VectorEncodingType.RANGE){if(d=new index_js_1.Vector,1===n){if("1"===e.substr(r,1))throw new index_js_3.DecodingError("Unable to decode default consent=1");r++}var i=IntEncoder_js_1.IntEncoder.decode(e.substr(r,index_js_2.BitLength.numEntries),index_js_2.BitLength.numEntries);r+=index_js_2.BitLength.numEntries;for(var _=0;_<i;_++){var s=BooleanEncoder_js_1.BooleanEncoder.decode(e.charAt(r)),c=(r+=index_js_2.BitLength.singleOrRange,IntEncoder_js_1.IntEncoder.decode(e.substr(r,index_js_2.BitLength.vendorId),index_js_2.BitLength.vendorId));if(r+=index_js_2.BitLength.vendorId,s){var j=IntEncoder_js_1.IntEncoder.decode(e.substr(r,index_js_2.BitLength.vendorId),index_js_2.BitLength.vendorId);r+=index_js_2.BitLength.vendorId;for(var E=c;E<=j;E++)d.set(E)}else d.set(c)}}else{o=e.substr(r,t);r+=t,d=FixedVectorEncoder_js_1.FixedVectorEncoder.decode(o,t)}return d.bitLength=r,d},e.buildRangeEncoding=function(e){var n=e.length,d=IntEncoder_js_1.IntEncoder.encode(n,index_js_2.BitLength.numEntries);return e.forEach(function(e){var n=1===e.length;d=(d+=BooleanEncoder_js_1.BooleanEncoder.encode(!n))+IntEncoder_js_1.IntEncoder.encode(e[0],index_js_2.BitLength.vendorId),n||(d+=IntEncoder_js_1.IntEncoder.encode(e[1],index_js_2.BitLength.vendorId))}),d},exports.VendorVectorEncoder=e},{"../../errors/index.js":30,"../../model/index.js":55,"../index.js":21,"./BooleanEncoder.js":11,"./FixedVectorEncoder.js":14,"./IntEncoder.js":15,"./VectorEncodingType.js":18}],20:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t),Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,o){e[o=void 0===o?t:o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./BooleanEncoder.js"),exports),__exportStar(require("./DateEncoder.js"),exports),__exportStar(require("./FieldEncoderMap.js"),exports),__exportStar(require("./FixedVectorEncoder.js"),exports),__exportStar(require("./IntEncoder.js"),exports),__exportStar(require("./LangEncoder.js"),exports),__exportStar(require("./PurposeRestrictionVectorEncoder.js"),exports),__exportStar(require("./VectorEncodingType.js"),exports),__exportStar(require("./VendorVectorEncoder.js"),exports)},{"./BooleanEncoder.js":11,"./DateEncoder.js":12,"./FieldEncoderMap.js":13,"./FixedVectorEncoder.js":14,"./IntEncoder.js":15,"./LangEncoder.js":16,"./PurposeRestrictionVectorEncoder.js":17,"./VectorEncodingType.js":18,"./VendorVectorEncoder.js":19}],21:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,i){e[i=void 0===i?t:i]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./Base64Url.js"),exports),__exportStar(require("./BitLength.js"),exports),__exportStar(require("./EncodingOptions.js"),exports),__exportStar(require("./SegmentEncoder.js"),exports),__exportStar(require("./SemanticPreEncoder.js"),exports),__exportStar(require("./field/index.js"),exports),__exportStar(require("./sequence/index.js"),exports)},{"./Base64Url.js":6,"./BitLength.js":7,"./EncodingOptions.js":8,"./SegmentEncoder.js":9,"./SemanticPreEncoder.js":10,"./field/index.js":20,"./sequence/index.js":25}],22:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldSequence=void 0;var index_js_1=require("../../model/index.js");exports.FieldSequence=function(){var e;this[1]=((e={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.purposeConsents,index_js_1.Fields.vendorConsents],e),this[2]=((e={})[index_js_1.Segment.CORE]=[index_js_1.Fields.version,index_js_1.Fields.created,index_js_1.Fields.lastUpdated,index_js_1.Fields.cmpId,index_js_1.Fields.cmpVersion,index_js_1.Fields.consentScreen,index_js_1.Fields.consentLanguage,index_js_1.Fields.vendorListVersion,index_js_1.Fields.policyVersion,index_js_1.Fields.isServiceSpecific,index_js_1.Fields.useNonStandardStacks,index_js_1.Fields.specialFeatureOptins,index_js_1.Fields.purposeConsents,index_js_1.Fields.purposeLegitimateInterests,index_js_1.Fields.purposeOneTreatment,index_js_1.Fields.publisherCountryCode,index_js_1.Fields.vendorConsents,index_js_1.Fields.vendorLegitimateInterests,index_js_1.Fields.publisherRestrictions],e[index_js_1.Segment.PUBLISHER_TC]=[index_js_1.Fields.publisherConsents,index_js_1.Fields.publisherLegitimateInterests,index_js_1.Fields.numCustomPurposes,index_js_1.Fields.publisherCustomConsents,index_js_1.Fields.publisherCustomLegitimateInterests],e[index_js_1.Segment.VENDORS_ALLOWED]=[index_js_1.Fields.vendorsAllowed],e[index_js_1.Segment.VENDORS_DISCLOSED]=[index_js_1.Fields.vendorsDisclosed],e)}},{"../../model/index.js":55}],23:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SegmentSequence=void 0;var index_js_1=require("../../model/index.js");exports.SegmentSequence=function(e,s){this[1]=[index_js_1.Segment.CORE],this[2]=[index_js_1.Segment.CORE],2===e.version&&(e.isServiceSpecific?this[2].push(index_js_1.Segment.PUBLISHER_TC):((s=!(!s||!s.isForVendors))&&!0!==e[index_js_1.Fields.supportOOB]||this[2].push(index_js_1.Segment.VENDORS_DISCLOSED),s&&(e[index_js_1.Fields.supportOOB]&&0<e[index_js_1.Fields.vendorsAllowed].size&&this[2].push(index_js_1.Segment.VENDORS_ALLOWED),this[2].push(index_js_1.Segment.PUBLISHER_TC))))}},{"../../model/index.js":55}],24:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],25:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./FieldSequence.js"),exports),__exportStar(require("./SegmentSequence.js"),exports),__exportStar(require("./SequenceVersionMap.js"),exports)},{"./FieldSequence.js":22,"./SegmentSequence.js":23,"./SequenceVersionMap.js":24}],26:[function(require,module,exports){var r,__extends=this&&this.__extends||(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,t){r.__proto__=t}:function(r,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}))(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),DecodingError=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.DecodingError=void 0,function(r){function t(t){t=r.call(this,t)||this;return t.name="DecodingError",t}return __extends(t,r),t}(Error));exports.DecodingError=DecodingError},{}],27:[function(require,module,exports){var r,__extends=this&&this.__extends||(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,t){r.__proto__=t}:function(r,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}))(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}),EncodingError=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.EncodingError=void 0,function(r){function t(t){t=r.call(this,t)||this;return t.name="EncodingError",t}return __extends(t,r),t}(Error));exports.EncodingError=EncodingError},{}],28:[function(require,module,exports){var r,__extends=this&&this.__extends||(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,t){r.__proto__=t}:function(r,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}))(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),GVLError=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.GVLError=void 0,function(r){function t(t){t=r.call(this,t)||this;return t.name="GVLError",t}return __extends(t,r),t}(Error));exports.GVLError=GVLError},{}],29:[function(require,module,exports){var r,__extends=this&&this.__extends||(r=function(t,o){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(r,t){r.__proto__=t}:function(r,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}))(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}r(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}),TCModelError=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.TCModelError=void 0,function(r){function t(t,o,e){void 0===e&&(e="");o=r.call(this,"invalid value ".concat(o," passed for ").concat(t," ").concat(e))||this;return o.name="TCModelError",o}return __extends(t,r),t}(Error));exports.TCModelError=TCModelError},{}],30:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(r,e,t,o){void 0===o&&(o=t),Object.defineProperty(r,o,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,o){r[o=void 0===o?t:o]=e[t]}),__exportStar=this&&this.__exportStar||function(r,e){for(var t in r)"default"===t||Object.prototype.hasOwnProperty.call(e,t)||__createBinding(e,r,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./DecodingError.js"),exports),__exportStar(require("./EncodingError.js"),exports),__exportStar(require("./GVLError.js"),exports),__exportStar(require("./TCModelError.js"),exports)},{"./DecodingError.js":26,"./EncodingError.js":27,"./GVLError.js":28,"./TCModelError.js":29}],31:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t),Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,o){e[o=void 0===o?t:o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./encoder/index.js"),exports),__exportStar(require("./errors/index.js"),exports),__exportStar(require("./model/index.js"),exports),__exportStar(require("./Cloneable.js"),exports),__exportStar(require("./GVL.js"),exports),__exportStar(require("./Json.js"),exports),__exportStar(require("./TCModel.js"),exports),__exportStar(require("./TCString.js"),exports)},{"./Cloneable.js":1,"./GVL.js":2,"./Json.js":3,"./TCModel.js":4,"./TCString.js":5,"./encoder/index.js":21,"./errors/index.js":30,"./model/index.js":55}],32:[function(require,module,exports){var t,__extends=this&&this.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}))(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)});Object.defineProperty(exports,"__esModule",{value:!0}),exports.BinarySearchTree=void 0;require=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.root=null,e}return __extends(e,t),e.prototype.getRoot=function(){return this.root},e.prototype.isEmpty=function(){return!this.root},e.prototype.add=function(t){var e,r={value:t,left:null,right:null};if(this.isEmpty())this.root=r;else for(e=this.root;;)if(t<e.value){if(null===e.left){e.left=r;break}e=e.left}else{if(!(t>e.value))break;if(null===e.right){e.right=r;break}e=e.right}},e.prototype.get=function(){for(var t=[],e=this.root;e;)if(e.left){for(var r=e.left;r.right&&r.right!=e;)r=r.right;e=r.right==e?(r.right=null,t.push(e.value),e.right):(r.right=e).left}else t.push(e.value),e=e.right;return t},e.prototype.contains=function(t){for(var e=!1,r=this.root;r;){if(r.value===t){e=!0;break}t>r.value?r=r.right:t<r.value&&(r=r.left)}return e},e.prototype.min=function(t){var e;for(void 0===t&&(t=this.root);t;)t=t.left||(e=t.value,null);return e},e.prototype.max=function(t){var e;for(void 0===t&&(t=this.root);t;)t=t.right||(e=t.value,null);return e},e.prototype.remove=function(t,e){void 0===e&&(e=this.root);for(var i,r=null,o="left";e;)t<e.value?(e=(r=e).left,o="left"):t>e.value?(e=(r=e).right,o="right"):(e.left||e.right?e.left?e.right?(i=this.min(e.right),this.remove(i,e.right),e.value=i):r?r[o]=e.left:this.root=e.left:r?r[o]=e.right:this.root=e.right:r?r[o]=null:this.root=null,e=null)},e.build=function(t){var r,o,i,l;return t&&0!==t.length?(1===t.length?(r=new e).add(t[0]):(o=t.length>>1,(r=new e).add(t[o]),(i=r.getRoot())&&(1+o<t.length&&(l=e.build(t.slice(1+o)),i.right=l?l.getRoot():null),0<o-1)&&(l=e.build(t.slice(0,o-1)),i.left=l?l.getRoot():null)),r):null},e}(require("../Cloneable.js").Cloneable);exports.BinarySearchTree=require},{"../Cloneable.js":1}],33:[function(require,module,exports){function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConsentLanguages=void 0,e.prototype.has=function(n){return e.langSet.has(n)},e.prototype.forEach=function(n){e.langSet.forEach(n)},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"]),exports.ConsentLanguages=e},{}],34:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],35:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.DeviceDisclosureStorageAccessType=void 0,(exports=exports.DeviceDisclosureStorageAccessType||(exports.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",exports.WEB="web",exports.APP="app"},{}],36:[function(require,module,exports){function e(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Fields=void 0,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",exports.Fields=e},{}],37:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],38:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],39:[function(require,module,exports){var e,__extends=this&&this.__extends||(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),Cloneable_js_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestriction=void 0,require("../Cloneable.js")),index_js_1=require("../errors/index.js"),RestrictionType_js_1=require("./RestrictionType.js"),require=function(e){function t(t,r){var o=e.call(this)||this;return void 0!==t&&(o.purposeId=t),void 0!==r&&(o.restrictionType=r),o}return __extends(t,e),t.unHash=function(e){var r=e.split(this.hashSeparator),o=new t;if(2!==r.length)throw new index_js_1.TCModelError("hash",e);return o.purposeId=parseInt(r[0],10),o.restrictionType=parseInt(r[1],10),o},Object.defineProperty(t.prototype,"hash",{get:function(){if(this.isValid())return"".concat(this.purposeId).concat(t.hashSeparator).concat(this.restrictionType);throw new Error("cannot hash invalid PurposeRestriction")},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)&&0<this.purposeId&&(this.restrictionType===RestrictionType_js_1.RestrictionType.NOT_ALLOWED||this.restrictionType===RestrictionType_js_1.RestrictionType.REQUIRE_CONSENT||this.restrictionType===RestrictionType_js_1.RestrictionType.REQUIRE_LI)},t.prototype.isSameAs=function(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType},t.hashSeparator="-",t}(Cloneable_js_1.Cloneable);exports.PurposeRestriction=require},{"../Cloneable.js":1,"../errors/index.js":30,"./RestrictionType.js":41}],40:[function(require,module,exports){var e,__extends=this&&this.__extends||(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),__values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&o>=e.length?void 0:e)&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(o=i.next()).done;)s.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return s},__spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||((o=o||Array.prototype.slice.call(t,0,n))[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},PurposeRestriction_js_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.PurposeRestrictionVector=void 0,require("./PurposeRestriction.js")),BinarySearchTree_js_1=require("./BinarySearchTree.js"),RestrictionType_js_1=require("./RestrictionType.js"),require=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.bitLength=0,t.map=new Map,t}return __extends(t,e),t.prototype.has=function(e){return this.map.has(e)},t.prototype.isOkToHave=function(e,t,r){var o,n=!0;if(null!=(o=this.gvl)&&o.vendors){var i=this.gvl.vendors[r];if(i)if(e===RestrictionType_js_1.RestrictionType.NOT_ALLOWED)n=i.legIntPurposes.includes(t)||i.purposes.includes(t);else if(i.flexiblePurposes.length)switch(e){case RestrictionType_js_1.RestrictionType.REQUIRE_CONSENT:n=i.flexiblePurposes.includes(t)&&i.legIntPurposes.includes(t);break;case RestrictionType_js_1.RestrictionType.REQUIRE_LI:n=i.flexiblePurposes.includes(t)&&i.purposes.includes(t)}else n=!1;else n=!1}return n},t.prototype.add=function(e,t){this.isOkToHave(t.restrictionType,t.purposeId,e)&&(t=t.hash,this.has(t)||(this.map.set(t,new BinarySearchTree_js_1.BinarySearchTree),this.bitLength=0),this.map.get(t).add(e))},t.prototype.restrictPurposeToLegalBasis=function(e){for(var t=this.gvl.vendorIds,r=e.hash,o=function(){var e,r,o;try{for(var n=__values(t),i=n.next();!i.done;i=n.next())o=i.value}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return o}(),n=__spreadArray([],__read(Array(o).keys()),!1).map(function(e){return e+1}),i=1;i<=o;i++)this.has(r)||(this.map.set(r,BinarySearchTree_js_1.BinarySearchTree.build(n)),this.bitLength=0),this.map.get(r).add(i)},t.prototype.getVendors=function(e){var o,t=[];return e?(e=e.hash,this.has(e)&&(t=this.map.get(e).get())):(o=new Set,this.map.forEach(function(e){e.get().forEach(function(e){o.add(e)})}),t=Array.from(o)),t},t.prototype.getRestrictionType=function(e,t){var r;return this.getRestrictions(e).forEach(function(e){e.purposeId===t&&(void 0===r||r>e.restrictionType)&&(r=e.restrictionType)}),r},t.prototype.vendorHasRestriction=function(e,t){for(var r=!1,o=this.getRestrictions(e),n=0;n<o.length&&!r;n++)r=t.isSameAs(o[n]);return r},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(r,o){e&&!r.contains(e)||t.push(PurposeRestriction_js_1.PurposeRestriction.unHash(o))}),t},t.prototype.getPurposes=function(){var e=new Set;return this.map.forEach(function(t,r){e.add(PurposeRestriction_js_1.PurposeRestriction.unHash(r).purposeId)}),Array.from(e)},t.prototype.remove=function(e,t){var t=t.hash,o=this.map.get(t);o&&(o.remove(e),o.isEmpty())&&(this.map.delete(t),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,r){var o=PurposeRestriction_js_1.PurposeRestriction.unHash(r);e.get().forEach(function(r){t.isOkToHave(o.restrictionType,o.purposeId,r)||e.remove(r)})}))},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}(require("../Cloneable.js").Cloneable);exports.PurposeRestrictionVector=require},{"../Cloneable.js":1,"./BinarySearchTree.js":32,"./PurposeRestriction.js":39,"./RestrictionType.js":41}],41:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.RestrictionType=void 0,(exports=exports.RestrictionType||(exports.RestrictionType={}))[exports.NOT_ALLOWED=0]="NOT_ALLOWED",exports[exports.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",exports[exports.REQUIRE_LI=2]="REQUIRE_LI"},{}],42:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Segment=void 0,(exports=exports.Segment||(exports.Segment={})).CORE="core",exports.VENDORS_DISCLOSED="vendorsDisclosed",exports.VENDORS_ALLOWED="vendorsAllowed",exports.PUBLISHER_TC="publisherTC"},{}],43:[function(require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SegmentIDs=void 0;var _a,require=require("./Segment.js"),require=(e.ID_TO_KEY=[require.Segment.CORE,require.Segment.VENDORS_DISCLOSED,require.Segment.VENDORS_ALLOWED,require.Segment.PUBLISHER_TC],e.KEY_TO_ID=((_a={})[require.Segment.CORE]=0,_a[require.Segment.VENDORS_DISCLOSED]=1,_a[require.Segment.VENDORS_ALLOWED]=2,_a[require.Segment.PUBLISHER_TC]=3,_a),e);function e(){}exports.SegmentIDs=require},{"./Segment.js":42}],44:[function(require,module,exports){var t,__extends=this&&this.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}))(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),__generator=this&&this.__generator||function(t,e){var r,n,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,(i=o?[2&i[0],o.value]:i)[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=0<(o=s.trys).length&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3]))s.label=i[1];else if(6===i[0]&&s.label<o[1])s.label=o[1],o=i;else{if(!(o&&s.label<o[2])){o[2]&&s.ops.pop(),s.trys.pop();continue}s.label=o[2],s.ops.push(i)}}i=e.call(t,s)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Cloneable_js_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.Vector=void 0,require("../Cloneable.js")),index_js_1=require("../errors/index.js"),require=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.bitLength=0,e.maxId_=0,e.set_=new Set,e}return __extends(e,t),e.prototype[Symbol.iterator]=function(){var t;return __generator(this,function(e){switch(e.label){case 0:t=1,e.label=1;case 1:return t<=this.maxId?[4,[t,this.has(t)]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},e.prototype.values=function(){return this.set_.values()},Object.defineProperty(e.prototype,"maxId",{get:function(){return this.maxId_},enumerable:!1,configurable:!0}),e.prototype.has=function(t){return this.set_.has(t)},e.prototype.unset=function(t){var e=this;Array.isArray(t)?t.forEach(function(t){return e.unset(t)}):"object"==typeof t?this.unset(Object.keys(t).map(function(t){return Number(t)})):(this.set_.delete(Number(t)),this.bitLength=0,t===this.maxId&&(this.maxId_=0,this.set_.forEach(function(t){e.maxId_=Math.max(e.maxId,t)})))},e.prototype.isIntMap=function(t){var e=this,r="object"==typeof t;return r&&Object.keys(t).every(function(r){var n=Number.isInteger(parseInt(r,10));return(n=n&&e.isValidNumber(t[r].id))&&void 0!==t[r].name})},e.prototype.isValidNumber=function(t){return 0<parseInt(t,10)},e.prototype.isSet=function(t){var e=!1;return e=t instanceof Set?Array.from(t).every(this.isValidNumber):e},e.prototype.set=function(t){var e=this;if(Array.isArray(t))t.forEach(function(t){return e.set(t)});else if(this.isSet(t))this.set(Array.from(t));else if(this.isIntMap(t))this.set(Object.keys(t).map(function(t){return Number(t)}));else{if(!this.isValidNumber(t))throw new index_js_1.TCModelError("set()",t,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(t),this.maxId_=Math.max(this.maxId,t),this.bitLength=0}},e.prototype.empty=function(){this.set_=new Set},e.prototype.forEach=function(t){for(var e=1;e<=this.maxId;e++)t(this.has(e),e)},Object.defineProperty(e.prototype,"size",{get:function(){return this.set_.size},enumerable:!1,configurable:!0}),e.prototype.setAll=function(t){this.set(t)},e}(Cloneable_js_1.Cloneable);exports.Vector=require},{"../Cloneable.js":1,"../errors/index.js":30}],45:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],46:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],47:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],48:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],49:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],50:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],51:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],52:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],53:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{dup:8}],54:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t),Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,o){e[o=void 0===o?t:o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./ByPurposeVendorMap.js"),exports),__exportStar(require("./Declarations.js"),exports),__exportStar(require("./Feature.js"),exports),__exportStar(require("./GVLMapItem.js"),exports),__exportStar(require("./IDSetMap.js"),exports),__exportStar(require("./Purpose.js"),exports),__exportStar(require("./Stack.js"),exports),__exportStar(require("./Vendor.js"),exports),__exportStar(require("./VendorList.js"),exports)},{"./ByPurposeVendorMap.js":45,"./Declarations.js":46,"./Feature.js":47,"./GVLMapItem.js":48,"./IDSetMap.js":49,"./Purpose.js":50,"./Stack.js":51,"./Vendor.js":52,"./VendorList.js":53}],55:[function(require,module,exports){var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t),Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,o){e[o=void 0===o?t:o]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./BinarySearchTree.js"),exports),__exportStar(require("./ConsentLanguages.js"),exports),__exportStar(require("./Fields.js"),exports),__exportStar(require("./IntMap.js"),exports),__exportStar(require("./KeyMap.js"),exports),__exportStar(require("./PurposeRestriction.js"),exports),__exportStar(require("./PurposeRestrictionVector.js"),exports),__exportStar(require("./DeviceDisclosureStorageAccessType.js"),exports),__exportStar(require("./DeviceDisclosure.js"),exports),__exportStar(require("./RestrictionType.js"),exports),__exportStar(require("./Segment.js"),exports),__exportStar(require("./SegmentIDs.js"),exports),__exportStar(require("./Vector.js"),exports),__exportStar(require("./gvl/index.js"),exports)},{"./BinarySearchTree.js":32,"./ConsentLanguages.js":33,"./DeviceDisclosure.js":34,"./DeviceDisclosureStorageAccessType.js":35,"./Fields.js":36,"./IntMap.js":37,"./KeyMap.js":38,"./PurposeRestriction.js":39,"./PurposeRestrictionVector.js":40,"./RestrictionType.js":41,"./Segment.js":42,"./SegmentIDs.js":43,"./Vector.js":44,"./gvl/index.js":54}],56:[function(require,module,exports){var TCString=require("@iabtcf/core").TCString;window.DEBUG=!0,window.sasCookieSync=window.sasCookieSync||function(window,document){return{protocol:(window.location.protocol||"").replace(":",""),cookies:{},qs:{},cmpObj:null,init:function(){this.cookies=this.parseCookies(document.cookie),this.qs=this.parseQueryString(window.location.search.slice(1))},parseQueryString:function(str){for(var a=str.split("&"),qs={},i=0;i<a.length;++i){var p=a[i].split("=");2==p.length&&(qs[p[0]]=decodeURIComponent(p[1].replace(/\+/g," ")))}return qs},getIntFromParsedQueryString:function(qs,key){qs=parseInt(qs[key],10);return isNaN(qs)||qs<0?0:qs},getBoolFromParsedQueryString:function(qs,key){return"true"===(qs[key]||"").toLowerCase()},parseValues:function(params,splitter1,splitter2){for(var ret={},list=params.split(splitter1),i=0;i<list.length;i++){var cell=list[i],e=cell.indexOf(splitter2),name=cell.substring(0,e),cell=cell.substring(e+1);ret[name]=decodeURIComponent(cell)}return ret},parseCookies:function(cookies){return cookies?this.parseValues(cookies,"; ","="):{}},removeKnownPools:function(poolData,cookiez){if(this.doesCookieExists(cookiez,"csync"))for(var csync=cookiez.csync.split("|"),j=0;j<csync.length;j++){var cell=csync[j],poolIdi=cell.indexOf(":");0<poolIdi&&delete poolData[cell.substring(0,poolIdi)]}},removeRefreshedAndUnknownPools:function(poolData,cookiez){for(var p in poolsToRefresh=cookiez.rpools.split("|"),poolData)poolsToRefresh.includes(p)||delete poolData[p]},shouldRefreshCsync:function(cookiez){return this.doesCookieExists(cookiez,"rpools")},doesCookieExists:function(cookiez,cookie_name){return null!=cookiez&&!!cookiez[cookie_name]},getNwId:function(){return this.getIntFromParsedQueryString(this.qs,"nwid")},getDcId:function(){return this.getIntFromParsedQueryString(this.qs,"dcid")},getPoolIdsFromQuery:function(){if(null==this.qs.poolids)return null;var idx,poolIds=[],poolIdsStr=(this.qs.poolids||"").split(",");for(idx in poolIdsStr){var poolId=parseInt(poolIdsStr[idx])||0;0<poolId&&poolIds.push(poolId)}return poolIds},getLocalStorageItemSafely:function(itemName){return void 0!==window.localStorage?window.localStorage.getItem(itemName):null},getGdprAppliesFromQuery:function(){return this.qs.gdpr?1==this.getIntFromParsedQueryString(this.qs,"gdpr")||this.getBoolFromParsedQueryString(this.qs,"gdpr"):null},getGdprConsent:function(){var queryConsent=this.getGdprConsentFromQuery();return queryConsent||this.getLocalStorageItemSafely("sas_euconsent_v2")||null},getGdprConsentFromQuery:function(){return this.qs.gdpr_consent||this.qs.gdprc||""},getRules:function(pools,consentString){var i,rules=[],consent=null;try{consent=consentString?TCString.decode(consentString):null}catch(e){}for(i in pools)pools[i].gdprRule,rules.push(null==consent?null==pools[i].gdprRule||0==pools[i].gdprRule:consent.vendorConsents.has(45)&&consent.vendorConsents.has(pools[i].vendorId));return rules},selectPools:function(poolData,dcId,poolIds){var idx,pools=[];for(idx in poolIds){var pool=(poolData[poolIds[idx]]||{})[dcId];pool&&pools.push(pool)}return pools.sort(function(a,b){return b.priority-a.priority})},selectAllPools:function(poolData,dcId){var p,pool,pools=[];for(p in poolData)dcId?(pool=poolData[p][dcId])&&pools.push(pool):pools.push(poolData[p]);return pools.sort(function(a,b){return b.priority-a.priority})},createImg:function(src,tag_attributes){var i=new Image;return i.src=src,i.height=1,i.width=1,null!=tag_attributes&&this.populateTagAttributes(i,tag_attributes),i},createScript:function(src,tag_attributes){var s=document.createElement("SCRIPT");return s.src=src,s.type="text/javascript",s.async=!0,null!=tag_attributes&&this.populateTagAttributes(s,tag_attributes),null!=document.body&&document.body.appendChild(s),s},createIFrm:function(src,tag_attributes){var ifrm=document.createElement("IFRAME");return ifrm.src=src,ifrm.scrolling="no",ifrm.frameBorder=0,ifrm.width=0,ifrm.height=0,ifrm.style.margin=0,ifrm.style.padding=0,ifrm.style.display="none",ifrm.style.width="0px",ifrm.style.height="0px",null!=tag_attributes&&this.populateTagAttributes(ifrm,tag_attributes),null!=document.body&&document.body.appendChild(ifrm),ifrm},populateTagAttributes:function(elt,tags){for(var key in tags)tags.hasOwnProperty(key)&&(elt.dataset[tags[key].attributeName]=tags[key].attributeValue)},fireCSync:function(){null==this.getGdprAppliesFromQuery()?"function"==typeof SasIabApi&&(this.cmpObj=new SasIabApi({name:"CMP V2",version:2,apiFunctionName:"__tcfapi",getConsentFunction:"addEventListener",sasCookieName:"sas_euconsent_v2",sasAddtlCookieName:"sas_addtl_euconsent_v2",consentObjectConsentDataName:"tcString",consentObjectAdditionalConsentDataName:"addtlConsent",apiLocator:"__tcfapiLocator",sentMessage:"__tcfapiCall",postMessageReturnObjectName:"__tcfapiReturn"},this.fireCSync2.bind(this)),this.cmpObj.searchApi()):this.fireCSync2()},fireCSync2:function(){var dcId=this.getDcId(),poolData=window.poolData,poolIds=this.getPoolIdsFromQuery(),gdpr={applies:this.getGdprAppliesFromQuery()||null!=this.cmpObj&&this.cmpObj.gdprApplies,consent:this.getGdprConsent()},pools=[],pools=null==poolIds?(this.shouldRefreshCsync(this.cookies)?this.removeRefreshedAndUnknownPools(poolData,this.cookies):this.removeKnownPools(poolData,this.cookies),this.selectAllPools(poolData,dcId)):this.selectPools(poolData,dcId,poolIds),rules=this.getRules(pools,gdpr.consent);pools.length;for(var idx=0;idx<pools.length;idx++)if(!gdpr.applies||rules[idx]){var pool=pools[idx],src=pool[this.protocol];if(src){var tag_attributes=pool.tag_attributes,type=pool.type;switch(pool.isGdprSupported&&(src=(src+=src.indexOf("?")<0?"?":"&")+"gdpr="+(gdpr.applies?"1":"0")+"&gdpr_consent="+(gdpr.consent||"")),type){case 0:this.createImg(src,tag_attributes);break;case 1:this.createScript(src,tag_attributes);break;case 2:this.createIFrm(src,tag_attributes)}}}}}}(window,document),sasCookieSync.init()},{"@iabtcf/core":31}]},{},[56]);