!function(){"use strict";var e=e=>new Promise(((t,r)=>{const n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e.url),e.integrity&&n.setAttribute("integrity",e.integrity),e.async&&n.setAttribute("async",e.async.toString()),e.defer&&n.setAttribute("defer",e.defer.toString()),e.crossOrigin&&n.setAttribute("crossorigin",e.crossOrigin),n.onload=t,n.onerror=r,document.head.appendChild(n)}));var t=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();var r=e=>{try{return JSON.parse(e),!0}catch(e){return!1}};var n=e=>window.webkit&&window.webkit.messageHandlers&&e.ios in window.webkit.messageHandlers&&"function"==typeof window.webkit.messageHandlers[e.ios].postMessage?"ios":e.android in window?"android":"";var a=e=>"object"===t(e)?{...e}:"array"===t(e)?[...e]:e;const i=(e,r)=>{if("object"!==t(e))return e;const n={},a=Object.keys(e),s=Object.keys(r);for(let o=0,c=a.length;o-1?r[c]:c;if("object"===t(u))n[l]=i({...u},r);else if("array"===t(u)){n[l]=[...u];for(let e=0,t=u.length;e-1&&e%1==0&&e<=U},F=P,G=V;var x=function(e){return null!=e&&G(e.length)&&!F(e)},q=9007199254740991,k=/^(?:0|[1-9]\d*)$/;var B=function(e,t){var r=typeof e;return!!(t=null==t?q:t)&&("number"==r||"symbol"!=r&&k.test(e))&&e>-1&&e%1==0&&ethis._prefix?e.slice(1):e))),Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(this._listeners)))),e}get parent(){return this._parent}set parent(e){this._parent=e}constructor(){this._prefix=z,this._listeners=new Y,this._listenerCount=0,this._parent=void 0}has(e){if("symbol"==typeof e)return Object.getOwnPropertySymbols(this._listeners).includes(e);const t=this._prefix?`${this._prefix}${e}`:e;return Object.keys(this._listeners).includes(t)}on(e,t,r){return Q(this,e,t,r)}once(e,t,r){return Q(this,e,t,r,!0)}off(e,t,r,n=!1){const a=this._prefix?`${this._prefix}${e}`:e;if(!this.has(e))return this;const i=this._listeners[a];if(!t||i.length<=1)return J(this,a),this;const s=i.findIndex((e=>e.handler===t&&e.context===(r||this)&&e.once===n));return s>-1&&i.splice(s,1),this}clear(e){const t=this._prefix?`${this._prefix}${e}`:e;return this.has(e)?J(this,t):(this._listeners=new Y,this._listenerCount=0),this}emit(e,...t){const r=this._prefix?`${this._prefix}${e}`:e;if(this.has(e)||this.has(Z.EVENT_CONFIG.ALL_EVENTS_KEY)){let n=this._listeners[r];if(this.has(Z.EVENT_CONFIG.ALL_EVENTS_KEY)){n=[...n=n||[],...this._listeners[Z.EVENT_CONFIG.ALL_EVENTS_KEY]]}for(let e=n.length;e>=0;e-=1){const a=n[e];if(a){const{handler:e,once:n,context:i}=a;n&&this.off(r,e,i,n),e.call(i,...t)}}return X(this,e,...t),!0}return X(this,e,...t),!1}all(e,t){return Q(this,Z.EVENT_CONFIG.ALL_EVENTS_KEY,e,t)}none(e,t){return this.off(Z.EVENT_CONFIG.ALL_EVENTS_KEY,e,t)}}Z.EVENT_CONFIG={ALL_EVENTS_KEY:"~ALL_EVENTS~"};var W=function(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r{const a=["namespace","module","method","message"][t],i=r[e[a]-1];return i&&(n[a]=i.text,i.children&&i.children.length)?Ht(e,t+1,i.children,n):n};class Qt{get level(){return Object.keys(Qt.TYPES)[this.type-1].toLowerCase()}get plainData(){return{createdAt:new Date(this.createdAt).toJSON(),level:this.level,namespace:this.namespace,module:this.module,method:this.method,message:this.message,internalMessage:this.internalMessage}}constructor(e,t,r,n,a,i=undefined){this.type=e,this.namespace=t,this.module=r,this.method=n,this.message=a,this.internalMessage=i,this.createdAt=Date.now()}includes(e){return!!this.internalMessage&&this.internalMessage.includes(e)}toJSON(e=!1){const{plainData:t}=this;return JSON.stringify(e?s(t,Qt.SHORTNAME_MAPPING):t)}prettify(e,t,r={abbreviate:!1,prefix:void 0,delimiter:" | "}){if(!0===Yt(Qt.FORMATS).includes(e)){const{plainData:n}=this,a={...n,...Ht(n,0,t)};if(e===Qt.FORMATS.JSON)return JSON.stringify(r.abbreviate?s(a,Qt.SHORTNAME_MAPPING):a);let i=[];return i=i.concat(qt(a).map((([e,t])=>`${e.toUpperCase()}:${t}`))),r.prefix&&i.push(r.prefix),i.reverse().join(r.delimiter)}return""}}Qt.TYPES=Object.defineProperties({},{INFO:{value:1,enumerable:!0},WARNING:{value:2,enumerable:!0},ERROR:{value:3,enumerable:!0},FATAL:{value:4,enumerable:!0}}),Qt.FORMATS=Object.defineProperties({},{JSON:{value:1,enumerable:!0},LOG:{value:2,enumerable:!0}}),Qt.fromJSON=e=>{const t=JSON.parse(e);if(t.level&&void 0===t.type){const[,e]=qt(Qt.TYPES).find((([e])=>e.toLowerCase()===t.level));t.type=e}const{type:r,namespace:n,module:a,method:i,message:s,internalMessage:o}=t;return new Qt(r,n,a,i,s,o)},Qt.SHORTNAME_MAPPING={level:"lv",type:"tp",namespace:"ns",module:"md",method:"mt",message:"ms",internalMessage:"im",createdAt:"ca"};var Jt=Qt;class Xt{get size(){return this.items.length}constructor(e){this.items=[];for(let t=0,r=e.length;t{try{const{options:n}=e;e.pending=!0;const a=Array.from(t),i=a.slice(1,a.length),s=a[0];let o,c=((e,t)=>{const{options:r,facades:n}=e;if(r.multiTenancy){const e="number"==typeof t[0]?t[0]:r.defaultTenant;return n.get(e)}return n.get(0)})(e,i);c||(c=((e,t)=>{const{facadeFactory:r,options:n}=e,a=r(e);if(n.multiTenancy){const r="number"==typeof t[0]?t[0]:n.defaultTenant;e.facades.set(r,a)}else e.facades.set(0,a);return a})(e,i)),o=!0===n.multiTenancy&&"number"==typeof i[0]?i.slice(1,i.length):i;const u=c[s](...o);!0===(r=u,Boolean(r&&"function"==typeof r.then))?u.then((t=>e.emit("executed",t))).catch((t=>e.emit("error",t))):e.emit("executed",s,u)}catch(t){e.emit("error",t)}var r};class Wt extends Z{constructor(e=undefined,t={},r=[]){super(),this.pending=!1,this.failed=!1,this.queue=new Xt(r),this.facades=new Map,this.facadeFactory=e,this.options={mode:1,multiTenancy:!1,continueOnError:!0,logging:!1,defaultTenant:1,onError:void 0,onExecuted:void 0,...t},this.on("executed",(e=>((e,t)=>{const{options:r}=e;r.onExecuted&&"function"==typeof r.onExecuted&&r.onExecuted(t),e.pending=!1,e.failed=!1,r.mode===Wt.MODE.AUTO&&e.dequeue()})(this,e))),this.on("error",(e=>((e,t)=>{const{options:r}=e;r.logging&&console.error(t),r.onError&&"function"==typeof r.onError&&r.onError(t),e.pending=!1,e.failed=!0,!0===r.continueOnError&&r.mode===Wt.MODE.AUTO&&e.dequeue()})(this,e))),this.queue.size>0&&this.options.mode===Wt.MODE.AUTO&&this.dequeue()}flush(){this.queue.flush()}addFacadeFactory(e){this.facadeFactory=e,this.queue.size>0&&this.options.mode===Wt.MODE.AUTO&&this.dequeue()}removeFacadeFactory(){this.facadeFactory=void 0,this.facades.clear()}dequeue(){if(!0===this.pending)setTimeout((()=>this.dequeue()),10);else{if(this.queue.size>0&&(!1===this.failed||!0===this.options.continueOnError)&&this.facadeFactory&&"function"==typeof this.facadeFactory){const e=this.queue.dequeue();Zt(this,e)}}}enqueue(...e){1===e.length&&"string"!=typeof e[0]?this.queue.enqueue(e[0]):this.queue.enqueue(e),this.options.mode===Wt.MODE.AUTO&&this.dequeue()}push(...e){this.enqueue(...e)}}Wt.MODE=Object.defineProperties({},{AUTO:{value:1,enumerable:!0},MANUAL:{value:2,enumerable:!0}});var Kt={};({get exports(){return Kt},set exports(e){Kt=e}}).exports=xt;var er=c(Kt);var tr=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function rr(e,t,r,n,a){return new Jt(e,t,r,n,a)}const nr=(e,t)=>{const r=er(e),n=[];for(let e=0,a=t.length;ee===a.name||e===a.abbreviation));let s;i&&(s=i[1]),n.push({...a,value:s})}return n};class ar extends Z{constructor(e){super(),this.moduleId=2,this.commands=e,this.parameters=void 0}parse(e,...t){const n=this.commands.find((t=>t.name===e||t.abbreviation===e));return n?(this.command=n,this.parameters=((e,t)=>{let n=[];const{parameters:a}=e;for(let o=0,c=a.length;o["requiredIf"].includes(e),cr=(e,t)=>{const{rules:r,value:n}=e,a=[];for(let i=0,s=r.length;it.name===e.sibling));a.push({name:s,assertion:o(n,r.value)})}else a.push({name:s,assertion:o(n)})}return a},ur=(e,t,r)=>{let n=!1;e.parameters[t].assertions=[];for(let a=0,i=r.length;a0?(this.valid=(e=>{for(let t=0,r=e.parameters.length;t0&&(this.data=((e,t)=>{const r={};for(let n=0,a=e.length;n-1},zr=Vr;var Yr=function(e,t){var r=this.__data__,n=zr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr=Pr,Qr=xr,Jr=kr,Xr=$r,Zr=Yr;function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},Pn=Cn,Un=W,Vn=mt,Fn=Ln,Gn=Math.min;var xn=function(e,t,r){for(var n=r?Pn:jn,a=e[0].length,i=e.length,s=i,o=Array(i),c=1/0,u=[];s--;){var l=e[s];s&&t&&(l=Un(l,Vn(t))),c=Gn(l.length,c),o[s]=!r&&(t||a>=120&&l.length>=120)?new Mn(s&&l):void 0}l=e[0];var d=-1,h=o[0];e:for(;++d0){if(++t>=Kn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},na=ra(Wn),aa=qn,ia=zn,sa=na;var oa=function(e,t){return sa(ia(e,t,aa),e+"")},ca=x,ua=$;var la=function(e){return ua(e)&&ca(e)};var da=W,ha=xn,fa=function(e){return la(e)?e:[]},ma=oa((function(e){var t=da(e,fa);return t.length&&t[0]===e[0]?ha(t):[]}));var Ea=e=>"array"===tr(e)?!!e.length:null!=e&&!Number.isNaN(e)&&(!1===e||(e instanceof Date?!Number.isNaN(e.getTime()):"object"===tr(e)?!!Object.keys(e).length:!!String(e).length));var pa=e=>t=>!Ea(t)||null!==t.toString().match(e);var va=(e,t)=>r=>!Ea(r)||(!/\s/.test(r)||r instanceof Date)&&e<=+r&&t>=+r;var _a=e=>"array"===tr(e)?e.length:"object"===tr(e)?Object.keys(e).length:String(e).length;var Oa=e=>t=>!Ea(t)||_a(t)<=e;var ga=e=>t=>!Ea(t)||_a(t)>=e;var ya=pa(/^\d*(\.\d+)?$/);var Sa=e=>t=>!Ea(t)||e.indexOf(t)>-1;var ba=e=>t=>!Ea(t)||tr(t)===e;function Ia(e,t){return(...r)=>e(...r)||t()}class Ta extends Z{constructor(e,t,r={maxExecutionBeforeStop:3,fillParameters:!1}){super(),this.moduleId=4,this.history=new Map,this.stats={},this.data={},this.commandQueue=e,this.commandSerializer=new fr(t),this.options=r}process(e,...t){try{let r;const n=this.commandSerializer.commands.find((t=>t.name===e||t.abbreviation===e));if(n){const{abbreviation:a,name:i}=n;if(void 0===this.stats[a]&&(this.stats[a]=0),this.options.fillParameters&&!1===Ea(t)&&this.data[a])return r={command:i,parameters:this.data[a]},this.emit(Ta.EVENTS.PROCESSING_SUCCEEDED,r),r;const{valid:s,stop:o}=((e,t,r,n)=>{let a=!0,i=!1;if(e.dependencies&&e.dependencies.length>0){const s=Array.from(t.keys());a=ma(s,e.dependencies).length===e.dependencies.length,i=r[e.abbreviation]>n}return{stop:i,valid:a}})(n,this.history,this.stats,this.options.maxExecutionBeforeStop);if(!0===s&&!1===o)if(this.commandSerializer.reset().parse(e,...t).validate(),this.commandSerializer.valid){r=this.commandSerializer.serialize().result();const e="function"==typeof n.id?n.id(r.parameters):n.id;this.history.set(e,{parameters:t,createdAt:Date.now()}),this.stats[a]=0,this.data[a]=r.parameters,this.emit(Ta.EVENTS.PROCESSING_SUCCEEDED,r)}else this.stats[a]+=1,this.emit(Ta.EVENTS.PROCESSING_FAILED,this.commandSerializer.lastAssertion);else!1===s&&!1===o?(this.stats[a]+=this.stats[a]+1,this.commandQueue.enqueue(e,...t),this.emit(Ta.EVENTS.PROCESSING_REQUEUED,new Jt(Jt.TYPES.WARNING,1,this.moduleId,1,1))):this.emit(Ta.EVENTS.PROCESSING_FAILED,new Jt(Jt.TYPES.FATAL,1,this.moduleId,1,2))}return r}catch(e){const t=new Jt(Jt.TYPES.FATAL,1,this.moduleId,1,3,e.message);return void this.emit(Ta.EVENTS.PROCESSING_FAILED,t)}}getCommandParameters(e){const t=this.commandSerializer.commands.find((t=>t.name===e||t.abbreviation===e));if(t)return this.data[t.abbreviation]}reset(){this.commandSerializer.reset(),this.stats={},this.history=new Map,this.data={}}}Ta.EVENTS={PROCESSING_SUCCEEDED:"PROCESSING_SUCCEEDED",PROCESSING_FAILED:"PROCESSING_FAILED",PROCESSING_REQUEUED:"PROCESSING_REQUEUED"};var Aa=Ta;var Na=e=>({name:"appSite",abbreviation:"as",sibling:"hybrid",rules:e});var Ra=e=>({name:"code",abbreviation:"cp",rules:e});var Da=e=>({name:"comment",abbreviation:"co",rules:e});var wa=e=>({name:"consentString",abbreviation:"ct",rules:e});var Ca=e=>({name:"country",abbreviation:"cn",rules:e});var La=e=>({name:"debug",abbreviation:"dg",rules:e});var Ma=e=>({name:"distributionChannel",abbreviation:"dc",rules:e});var ja=e=>({name:"domainServiceName",abbreviation:"dn",rules:e});var Pa=e=>({name:"event",abbreviation:"ev",rules:e});var Ua=e=>({name:"hybrid",abbreviation:"hy",rules:e});var Va=e=>({name:"hybridToken",abbreviation:"ht",rules:e});var Fa=e=>({name:"mediaTypes",abbreviation:"mt",rules:e});var Ga=e=>({name:"methods",abbreviation:"mh",rules:e});var xa=e=>({name:"mode",abbreviation:"mo",rules:e});var qa=e=>({name:"multiIdentifier",abbreviation:"mi",rules:e});var ka=e=>({name:"panelIdentifier",abbreviation:"pid",rules:e,sibling:"panelVendorId"});var Ba=e=>({name:"panelVendorId",abbreviation:"pvd",rules:e,sibling:"panelIdentifier"});var $a=e=>({name:"pixelType",abbreviation:"pt",rules:e});var za=e=>({name:"site",abbreviation:"st",rules:e});var Ya=e=>({name:"surveyType",abbreviation:"sv",rules:e});var Ha=e=>({name:"tenant",abbreviation:"ta",rules:e});var Qa=e=>({name:"thirdPartyModule",abbreviation:"3p",rules:e});var Ja=(e,t,r)=>n=>e(n)||[t,n,rr(2,...r)];var Xa=(e,t)=>({name:e,assert:t});var Za=pa(/^[a-zA-Z0-9_]*$/);var Wa=[Xa("required",Ja(Ea,void 0,[1,1,5,1])),Xa("typeOf",Ia(ba("string"),(()=>rr(4,1,1,5,2)))),Xa("siteIdentifier",Ia(Za,(()=>rr(4,1,1,5,3)))),Xa("min",Ia(ga(3),(()=>rr(4,1,1,5,4)))),Xa("max",Ia(Oa(15),(()=>rr(4,1,1,5,5))))];function Ka(e,t){return r=>Ea(r)||[e,r,rr(2,...t)]}var ei=(e,t,r)=>n=>"string"!==tr(n)||!Ea(n)||[n.replace(e,t),n,rr(2,...r)];var ti=(e,t)=>r=>{if(Ea(r)&&!1===Oa(e)(r)){let n;return n="number"===tr(r)?((e,t)=>{let r=e.toString();return r=r.slice(0,t),parseInt(r,10)})(r,e):"array"===tr(r)||"string"===tr(r)?r.slice(0,e):"object"===tr(r)?((e,t)=>{const r=Object.keys(e),n={};for(let a=0,i=t;apa(new RegExp(`^([0-9a-fA-F]{2})([0-9a-fA-F]{${4*e}})$`,"g"));var oi=(e=!0)=>{const t=[Xa("required",Ia(Ea,(()=>rr(4,1,1,8,1)))),Xa("typeOf",Ia(ba("string"),(()=>rr(4,1,1,8,2)))),Xa("consentString",Ia(si(2),(()=>rr(4,1,1,8,3))))];return!1===e&&t.splice(0,1),t};var ci=Sa(["de","at"]);var ui=[Xa("defaultValue",Ka("de",[1,1,9,1])),Xa("typeOf",Ja(ba("string"),"de",[1,1,9,2])),Xa("enum",Ja(ci,"de",[1,1,9,3]))];var li=[Xa("defaultValue",Ka(!1,[1,1,10,1])),Xa("typeOf",Ia(ba("boolean"),(()=>rr(4,1,1,10,2))))];var di=Sa(["web","hyb","ctv"]);var hi=[Xa("defaultValue",Ka("web",[1,1,1,11,1])),Xa("typeOf",Ja(ba("string"),"web",[1,1,11,2])),Xa("enum",Ja(di,"web",[1,1,11,3]))];var fi=[Xa("required",Ia(Ea,(()=>rr(4,1,1,12,1)))),Xa("typeof",Ia(ba("string"),(()=>rr(4,1,1,12,2)))),Xa("regex",Ia(pa(/^(data-)([a-f0-9]{10})\.([a-zA-Z0-9][a-zA-Z0-9-_]{0,63})(?:\.([a-z]{2,63}))?\.([a-z]{2,63})$/g),(()=>rr(4,1,1,12,3))))];var mi=Sa(["inst","init","open","clse","play","resm","stop","fowa","bakw","recd","paus","forg","bakg","dele","refr","kill","view","alve","fini","mute","aforg","abakg","aclse","sple","scvl","serr","spyr","smdr","sfpl","sfqt","ssqt","stqt","soqt","sofc","scfc","scqt","splr","spli","sprs","spre","smrs","smre","sors","sore","sack","sapl","sapa","snsp"]);var Ei=[Xa("required",Ia(Ea,(()=>rr(4,1,1,13,1)))),Xa("typeof",Ia(ba("string"),(()=>rr(4,1,1,13,2)))),Xa("eventEnum",Ia(mi,(()=>rr(4,1,1,13,3))))];var pi=[Xa("defaultValue",Ka(!0,[1,1,14,1])),Xa("typeOf",Ia(ba("boolean"),(()=>rr(4,1,1,14,2))))];var vi=[Xa("required",Ia(Ea,(()=>rr(4,1,1,24,1)))),Xa("typeOf",Ia(ba("string"),(()=>rr(4,1,1,24,2))))];var _i=Sa(["debug","hybrid"]);var Oi=[Xa("required",Ia(Ea,(()=>rr(4,1,1,19,1)))),Xa("typeof",Ia(ba("string"),(()=>rr(4,1,1,19,2)))),Xa("enum",Ia(_i,(()=>rr(4,1,1,19,3))))];var gi=[Xa("required",Ia(Ea,(()=>rr(4,1,1,28,1)))),Xa("typeof",Ia(ba("string"),(()=>rr(4,1,1,28,2))))];const yi=(e,t)=>!e||Ea(t);var Si=e=>(t,r)=>{if("function"!==tr(e))return yi(t,r);const n=e(t);return yi(n,r)};var bi=[Xa("requiredIf",Ia(Si(),(()=>rr(4,1,1,29,1)))),Xa("typeOf",Ja(ba("string"),void 0,[1,1,29,2]))];var Ii=[Xa("requiredIf",Ia(Si(),(()=>rr(4,1,1,30,1)))),Xa("typeOf",Ja(ba("number"),0,[2,1,30,2]))];var Ti=Sa(["cp","sp","xp"]);var Ai=[Xa("defaultValue",Ka("cp",[1,1,20,1])),Xa("typeOf",Ja(ba("string"),"cp",[1,1,20,2])),Xa("enum",Ja(Ti,"cp",[1,1,20,3]))];var Ni=[Xa("required",Ia(Ea,(()=>rr(4,1,1,26,1)))),Xa("typeOf",Ia(ba("string"),(()=>rr(4,1,1,26,2)))),Xa("siteIdentifier",Ia(Za,(()=>rr(4,1,1,26,3)))),Xa("min",Ia(ga(3),(()=>rr(4,1,1,26,4)))),Xa("max",Ia(Oa(15),(()=>rr(4,1,1,26,5))))];var Ri=Sa(["in","mo"]);var Di=[Xa("defaultValue",Ka("in",[1,1,21,1])),Xa("typeOf",Ja(ba("string"),"in",[1,1,21,2])),Xa("enum",Ja(Ri,"in",[1,1,21,3]))];var wi=[Xa("typeOf",Ia(ba(ya),(()=>rr(4,1,1,22,1)))),Xa("between",Ia(va(1,4),(()=>rr(4,1,1,22,1))))];var Ci=Sa(ni);var Li=[Xa("required",Ia(Ea,(()=>rr(4,1,1,23,1)))),Xa("typeof",Ia(ba("string"),(()=>rr(4,1,1,23,2)))),Xa("enum",Ia(Ci,(()=>rr(4,1,1,23,3))))];var Mi=[Xa("defaultValue",Ka(1,[1,1,17,1])),Xa("typeOf",Ja(ba("number"),1,[1,1,17,2])),Xa("max",Ja(va(1,7),1,[1,1,17,3]))];var ji=[Xa("defaultValue",Ka(1,[1,1,18,1])),Xa("typeOf",Ja(ba("number"),1,[1,1,18,2])),Xa("max",Ja(va(1,5),1,[1,1,18,3]))];var Pi={id:1,name:"configure",abbreviation:"cf",parameters:[[Na(Wa),wa(oi(!1)),Ca(ui),La(li),Ma(hi),ja(fi),Ua(pi),Fa(Mi),Ga(ji),ka(bi),Ba(Ii),za(Ni),Ha(wi)]],options:{allowJSON:!0}};var Ui={id:3,name:"event",abbreviation:"ev",dependencies:[1,2],parameters:[Pa(Ei)],options:{allowJSON:!1}};var Vi={id:4,name:"hybrid",abbreviation:"hy",parameters:[[Ca(ui),La(li),ja(fi),za(Ni),Va(vi)]],options:{allowJSON:!0}};var Fi=(e,...t)=>r=>e(r)?t:void 0;var Gi=[Pi,{id:2,name:"pageview",abbreviation:"pv",dependencies:[1],parameters:[[Ra(ai),Da(ii),$a(Ai),Ha(wi)]],options:{allowJSON:!0}},Vi,Ui,{id:5,name:"setMode",abbreviation:"sm",parameters:[xa(Oi)],options:{allowJSON:!1}},{id:6,name:"setMultiIdentifier",abbreviation:"smi",parameters:[qa(gi)],options:{allowJSON:!1}},{id:e=>ni.indexOf(e.thirdPartyModule)+7,name:"thirdPartyModules",abbreviation:"3p",dependencies:[1,2],parameters:[Qa(Li),Fi((e=>"qds"===e[0]),Ya(Di))],options:{allowJSON:!1}}],xi="object"==typeof global&&global&&global.Object===Object&&global,qi="object"==typeof self&&self&&self.Object===Object&&self,ki=xi||qi||Function("return this")(),Bi=ki.Symbol,$i=Object.prototype,zi=$i.hasOwnProperty,Yi=$i.toString,Hi=Bi?Bi.toStringTag:void 0;var Qi=Object.prototype.toString;var Ji="[object Null]",Xi="[object Undefined]",Zi=Bi?Bi.toStringTag:void 0;function Wi(e){return null==e?void 0===e?Xi:Ji:Zi&&Zi in Object(e)?function(e){var t=zi.call(e,Hi),r=e[Hi];try{e[Hi]=void 0;var n=!0}catch(e){}var a=Yi.call(e);return n&&(t?e[Hi]=r:delete e[Hi]),a}(e):function(e){return Qi.call(e)}(e)}function Ki(e){return null!=e&&"object"==typeof e}var es="[object Symbol]";function ts(e){return"symbol"==typeof e||Ki(e)&&Wi(e)==es}function rs(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r0){if(++ks>=Fs)return arguments[0]}else ks=0;return qs.apply(void 0,arguments)}),Qs=Hs;function Js(e){return e!=e}function Xs(e,t){return!!(null==e?0:e.length)&&function(e,t,r){return t==t?function(e,t,r){for(var n=r-1,a=e.length;++n-1}var Zs=Math.max;function Ws(e,t){return Qs(function(e,t,r){return t=Zs(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Zs(n.length-t,0),s=Array(i);++a-1&&e%1==0&&e<=Ks}(e.length)&&!As(e)}var to="[object Arguments]";function ro(e){return Ki(e)&&Wi(e)==to}var no=Object.prototype,ao=no.hasOwnProperty,io=no.propertyIsEnumerable,so=ro(function(){return arguments}())?ro:function(e){return Ki(e)&&ao.call(e,"callee")&&!io.call(e,"callee")},oo=so;function co(e){return function(t){return e(t)}}var uo=Vs(Object,"create");var lo="__lodash_hash_undefined__",ho=Object.prototype.hasOwnProperty;var fo=Object.prototype.hasOwnProperty;var mo="__lodash_hash_undefined__";function Eo(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},_o.prototype.set=function(e,t){var r=this.__data__,n=po(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var Oo=Vs(ki,"Map");function go(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function yo(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t0&&r(o)?t>1?Ao(o,t-1,r,n,a):bo(a,o):n||(a[a.length]=o)}return a}function No(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n=120&&l.length>=120)?new zo(s&&l):void 0}l=e[0];var d=-1,h=o[0];e:for(;++dec)return r;do{t%2&&(r+=e),(t=tc(t/2))&&(e+=e)}while(t);return r}var nc,ac=(nc="length",function(e){return null==e?void 0:e[nc]}),ic="\\ud800-\\udfff",sc="["+ic+"]",oc="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cc="\\ud83c[\\udffb-\\udfff]",uc="[^"+ic+"]",lc="(?:\\ud83c[\\udde6-\\uddff]){2}",dc="[\\ud800-\\udbff][\\udc00-\\udfff]",hc="(?:"+oc+"|"+cc+")"+"?",fc="[\\ufe0e\\ufe0f]?",mc=fc+hc+("(?:\\u200d(?:"+[uc,lc,dc].join("|")+")"+fc+hc+")*"),Ec="(?:"+[uc+oc+"?",oc,lc,dc,sc].join("|")+")",pc=RegExp(cc+"(?="+cc+")|"+Ec+mc,"g");function vc(e){return Do(e)?function(e){for(var t=pc.lastIndex=0;pc.test(e);)++t;return t}(e):ac(e)}var _c=Math.ceil;function Oc(e,t){var r=(t=void 0===t?" ":os(t)).length;if(r<2)return r?rc(t,e):t;var n=rc(t,_c(e/vc(t)));return Do(t)?No(ko(n),0,e).join(""):n.slice(0,e)}function gc(e,t,r){e=So(e);var n=(t=gs(t))?vc(e):0;return t&&n=bc){var u=t?null:Sc(e);if(u)return Ho(u);s=!1,a=Yo,c=new zo}else c=t?[]:o;e:for(;++ne.core?Tc(Object.keys(e.core.purpose.consents).filter((t=>!0===e.core.purpose.consents[t])).map((e=>+e)),Object.keys(e.core.purpose.legitimateInterests).filter((t=>!0===e.core.purpose.legitimateInterests[t])).map((e=>+e))).concat(Object.keys(e.core.specialFeatureOptins).filter((t=>!0===e.core.specialFeatureOptins[t])).map((e=>+e+10))):Tc(Object.keys(e.purpose.consents).filter((t=>!0===e.purpose.consents[t])).map((e=>+e)),Object.keys(e.purpose.legitimateInterests).filter((t=>!0===e.purpose.legitimateInterests[t])).map((e=>+e))).concat(Object.keys(e.specialFeatureOptins).filter((t=>!0===e.specialFeatureOptins[t])).map((e=>+e+10)));var Nc=(e,t)=>{const r=((e,t)=>e.core?Ko(Tc(Object.keys(e.core.vendorConsents).filter((t=>!0===e.core.vendorConsents[t])).map((e=>+e)),Object.keys(e.core.vendorLegitimateInterests).filter((t=>!0===e.core.vendorLegitimateInterests[t])).map((e=>+e))),t):Ko(Tc(Object.keys(e.vendor.consents).filter((t=>!0===e.vendor.consents[t])).map((e=>+e)),Object.keys(e.vendor.legitimateInterests).filter((t=>!0===e.vendor.legitimateInterests[t])).map((e=>+e))),t))(e,t),n=[];for(let a=0,i=t.length;ae.map((e=>2**(e-1))).reduce(((e,t)=>e+t),0);class Dc{constructor(e,t,r){Object.defineProperties(this,{type:{value:e,writable:!1,enumerable:!0,configurable:!1},value:{value:t,writeable:!1,enumerable:!0,configurable:!1},vendors:{value:r,writeable:!1,enumerable:!0,configurable:!1}})}check(e,t){const r=this.vendors.indexOf(e),n=Array.isArray(t)?t:[t];if(r>-1){let e=Rc(n);if(r{const{category:t,validated:r}=e;if(!r){if(!t||!Object.values(jc.CATEGORIES).includes(t))throw new Jt(4,1,3,1,1);e.validated=!0}};class jc extends Z{constructor(){super(),this.moduleId=3,this.data=void 0}setItem(e,t,r){try{Mc(r);const{category:n}=r;void 0===this.data&&(this.data={global:{},measurement:{},sensor:{},feature:{},plugins:{},thirdPartyPlugins:{},tcf:{},bundleLoaded:{},version:{}}),this.data[n][e]=t,this.emit(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,n,e),{key:e,value:t,category:n})}catch(e){throw new Jt(4,1,this.moduleId,2,1,e instanceof Jt?e:e.message)}}setItems(e,t,r){Mc(r);for(let n=0,a=e.length;n{if(t.tcf){const{value:r}=e.manager.dataLayer.getItem("consentString",{category:"tcf"});r instanceof wc&&t.queue.queue.items.forEach(((e,n)=>{"configure"===e[0]&&(e[1].consentString=r.toString(16),t.queue.queue.items[n]=e)}))}},Uc=(e,t,r)=>{if(t.tcf){const{value:t}=e.manager.dataLayer.getItem("consentString",{category:"tcf"});t instanceof wc&&(r.consentString=t.toString(16))}return r},Vc=(e,r,n)=>"object"===t(r)?Object.keys(r).reduce(((t,a)=>(n.parameterBlacklist&&n.parameterBlacklist[e]&&n.parameterBlacklist[e].includes(a)||(t[a]=r[a]),t)),{}):r;class Fc extends Z{constructor(e,t){super(),this.moduleId=2,this.manager=e,this.defaultModules=t.map((e=>e.name)),this.modules=new Map(t.map((e=>[e.name,{...e,queue:new Wt(void 0,{mode:Wt.MODE.MANUAL}),active:!1,tcf:!!e.tcf}]))),this.manager.dataLayer.on(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,jc.CATEGORIES.TCF,"consentString"),(()=>{this.handleConsentChanged()}))}addModule(e,t){if(this.modules.has(e)){const e=new Jt(3,1,this.moduleId,3,1);this.emit(Fc.EVENTS.ADD_MODULE,e)}else this.modules.set(e,{...t,queue:new Wt(void 0,{mode:Wt.MODE.MANUAL}),active:!1})}addFacade(e,t){const r=this.modules.get(e);r.queue.addFacadeFactory(t),this.modules.set(e,r)}removeFacade(e){const t=this.modules.get(e);t.queue.removeFacadeFactory(),this.modules.set(e,t)}activate(e){const t=this.modules.get(e);Pc(this,t),t.active=!0,t.queue.options.mode=Wt.MODE.AUTO,t.queue.dequeue(),this.modules.set(e,t)}deactivate(e){const t=this.modules.get(e);t.active=!1,t.queue.options.mode=Wt.MODE.MANUAL,t.queue.flush(),this.modules.set(e,t)}enqueue(e,t={}){try{this.modules.forEach(((r,n)=>{if(-1===this.defaultModules.indexOf(n))return;let i=a(t);i=Vc(e,t,r),"configure"===e&&(i=Uc(this,r,i)),r.queue.enqueue(e,i)}))}catch(e){const t=new Jt(3,1,this.moduleId,1,1,e);throw this.emit(Fc.EVENTS.ENQUEUE_ERROR,t),t}}enqueueToSingleModule(e,t,r={}){try{const n=this.modules.get(e);if(n){let e=a(r);e=Vc(t,r,n),"configure"===t&&(e=Uc(this,n,e)),n.queue.enqueue(t,e)}}catch(e){const t=new Jt(3,1,this.moduleId,4,1,e);throw this.emit(Fc.EVENTS.ENQUEUE_ERROR,t),t}}dequeue(){try{this.modules.forEach(((e,t)=>{-1!==this.defaultModules.indexOf(t)&&e.queue.dequeue()}))}catch(e){const t=new Jt(3,1,this.moduleId,2,1,e);throw this.emit(Fc.EVENTS.ENQUEUE_ERROR,t),t}}handleConsentChanged(){try{this.modules.forEach((e=>{Pc(this,e)}))}catch(e){const t=new Jt(Jt.TYPES.ERROR,3,this.moduleId,5,2,e.message);this.emit(Fc.EVENTS.EXECUTION_ERROR,t)}}}Fc.EVENTS={MODULE_NOT_LOADED:"MODULE_NOT_LOADED",QUEUE_CREATION_ERROR:"QUEUE_CREATION_ERROR",QUEUE_DOES_NOT_EXIST:"QUEUE_DOES_NOT_EXIST",ENQUEUE_ERROR:"ENQUEUE_ERROR",DEQUEUE_ERROR:"DEQUEUE_ERROR",ADD_MODULE:"ADD_MODULE",EXECUTION_ERROR:"EXECUTION_ERROR"};const Gc={ALL:1,IOMB_ONLY:2,IOMP_ONLY:3};var xc={sensors:{iomb:{bit:1,cdn:{host:()=>"dsn",path:({ecmaVersion:e,variant:t,version:r})=>`/iomb/${r}/sensor/manager/${t}/${e}/bundle.js`},parameterBlacklist:{configure:["panelIdentifier","panelVendorId"]}},iomp:{bit:4,tcf:{consent:[1,8],vendor:730},cdn:{host:({country:e})=>"at"===e?"script-at.iocnt.net":"script.ioam.de",path:({ecmaVersion:e,variant:t,version:r})=>`/sensor/${r}/manager/${t}/${e}/bundle.js`},parameterBlacklist:{configure:[]}}},modules:{qds:{cdn:{host:({country:e})=>"at"===e?"script-at.iocnt.net":"script.ioam.de",path:({ecmaVersion:e,version:t})=>`/3p/qds/${t}/manager/base/${e}/bundle.js`},tcf:{consent:[1,9],vendor:785},parameterBlacklist:{configure:["panelIdentifier","panelVendorId"]}}},tcf:{vendors:[730,785],frequency:100,max:10,wait:5e3,events:["tcloaded","useractioncomplete"]},cdn:["dsn","script.ioam.de"],hybrid:{performSiteCheck:!1,apiKeys:e=>"at"===e?{ios:"IOMbOEWAHybridMessageHandler",android:"IOMbOEWAHybridBridge"}:{ios:"IOMbHybridMessageHandler",android:"IOMbHybridBridge"}},metaTags:{loading:"iomm_config_loading"}};const qc=1,kc=2,Bc=3,$c=e=>xc.sensors[e]?{name:e,...xc.sensors[e]}:xc.modules[e]?{name:e,...xc.modules[e]}:null;var zc=(e=qc)=>{const t=[];return e!==qc&&e!==kc||Object.keys(xc.sensors).forEach((e=>{t.push({name:e,...xc.sensors[e]})})),e!==qc&&e!==Bc||Object.keys(xc.modules).forEach((e=>{t.push({name:e,...xc.modules[e]})})),t};const Yc={iomb:"IOMb",iomp:"IOMp",qds:"IOMp3pQds"};class Hc extends Z{constructor(e,t,r=xc){if(super(),this.moduleId=4,void 0===e)throw new Jt(4,1,this.moduleId,1,1);this.dataLayer=e,this.manager=t,this.settings=r}load(t,r,n=!1){return new Promise(((a,i)=>{try{const s={category:jc.CATEGORIES.SENSOR},o=this.dataLayer.getItem(r,s);if(o&&void 0===o.value){const o={url:t},{value:c="async"}=this.dataLayer.getItem("loading",{category:jc.CATEGORIES.GLOBAL});o[c]=c,r!==Hc.BUNDLE_VARIANTS.IOMP&&r!==Hc.BUNDLE_VARIANTS.QDS&&(o.crossOrigin="anonymous"),e(o).then((()=>{const e=Yc[r],t=window[e];t?(n||delete window[e],this.dataLayer.setItem(r,"function"==typeof t?t:()=>t,s),a()):i(new Jt(3,1,this.moduleId,2,2))})).catch((e=>{i(new Jt(3,1,this.moduleId,2,1,e.message))}))}else a()}catch(e){i(new Jt(3,1,this.moduleId,2,3,e.message))}}))}generateSensorUrl(e){const t=$c(e.sensorVariant);if(void 0===e.sensorVariant||void 0===t)throw new Jt(3,1,this.moduleId,3,1);const r=this.dataLayer.getItem("country",{category:jc.CATEGORIES.GLOBAL}).value;let a="base";const i=this.settings.hybrid.apiKeys;e.sensorVariant!==Hc.BUNDLE_VARIANTS.IOMB&&e.sensorVariant!==Hc.BUNDLE_VARIANTS.IOMP||!function(e,t,r=Gc.ALL){const{value:a}=e.dataLayer.getItem("hybrid",{category:"global"}),i=n(t),s=Object.keys(t),o=e.commandProcessor.history.has(6)||e.commandProcessor.commandQueue.queue.items.findIndex((([e])=>"smi"===e||"setMultiIdentifier"===e))>-1;return r===Gc.IOMB_ONLY?!0===a&&s.includes(i):r===Gc.IOMP_ONLY?!0===a&&o:!0===a&&(s.includes(i)||o)}(this.manager,i(r),Gc.IOMB_ONLY)||(a="hybrid");const{value:s}=this.dataLayer.getItem(t.name,{category:jc.CATEGORIES.VERSION});let o=(0,t.cdn.host)({country:r});"dsn"===o&&(o=this.dataLayer.getItem("domainServiceName",{category:jc.CATEGORIES.GLOBAL}).value);const c={ecmaVersion:window[window.IOMmGlobalObject].esm?"es6":"es5",variant:a,version:s||"latest"};return`//${o}${(0,t.cdn.path)(c)}`}generateModuleUrl(e){const t=$c(e.moduleVariant);if(void 0===e.moduleVariant||void 0===t)throw new Jt(3,1,this.moduleId,4,1);const{value:r}=this.dataLayer.getItem(t.name,{category:jc.CATEGORIES.VERSION});let n=(0,t.cdn.host)({country:this.dataLayer.getItem("country",{category:jc.CATEGORIES.GLOBAL}).value});"dsn"===n&&(n=this.dataLayer.getItem("domainServiceName",{category:jc.CATEGORIES.GLOBAL}).value);const a={ecmaVersion:window[window.IOMmGlobalObject].esm?"es6":"es5",version:r||"latest"};return`//${n}${(0,t.cdn.path)(a)}`}}Hc.BUNDLE_VARIANTS={IOMB:"iomb",IOMP:"iomp",QDS:"qds"},Hc.LOADING_METHODS={ASYNC:"async",DEFER:"defer"},Hc.LOADING_STATUS={LOADING:1,LOADED:2,LOADING_FAILED:3};const Qc=e=>{window.__tcfapi("removeEventListener",2,(()=>{}),e)},Jc=(e,t)=>{e&&e.listenerId>=0&&(t.stopPolling?Qc(e.listenerId):t.tcfApiListenerIds.push(e.listenerId))},Xc=e=>(t,r)=>{try{if(Jc(t,e),e.stopPolling)return;let n;r&&e.settings.tcf.events.includes(t.eventStatus)&&!0===t.gdprApplies?(n=e.convert(t),e.emit(Wc.EVENTS.TCF_DATA_PROCESSED),window.__tcfapi("removeEventListener",2,(()=>{}),t.listenerId)):(n=wc.create(e.vendors,[[0],[0]],wc.TYPES.TCF2X),e.emit(Wc.EVENTS.TCF_DATA_CANNOT_BE_PROCESSED)),e.dataLayer.setItem("consentString",n,{category:jc.CATEGORIES.TCF})}catch(t){const r=new Jt(Jt.TYPES.ERROR,3,6,1,1,t.message);e.emit(Wc.EVENTS.TCF_DATA_PROCESSING_ERROR,r)}},Zc=e=>{e.stopPolling||(window.__tcfapi&&"function"==typeof window.__tcfapi?(window.__tcfapi("addEventListener",2,Xc(e)),window.__tcfapi("addEventListener",2,(e=>(t,r)=>{Jc(t,e),e.stopPolling||r&&"cmpuishown"===t.eventStatus&&window.__tcfapi("addEventListener",2,Xc(e))})(e))):(e.numberOfTries{Zc(e)}),e.numberOfTries{Qc(e)})),this.stopPolling=!0}catch(e){const t=new Jt(Jt.TYPES.ERROR,3,this.moduleId,6,1,e.message);throw this.emit(Wc.EVENTS.TCF_API_CANNOT_STOP,t),t}}}Wc.EVENTS={TCF_DATA_PROCESSED:"TCF_DATA_PROCESSED",TCF_DATA_CANNOT_BE_PROCESSED:"TCF_DATA_CANNOT_BE_PROCESSED",TCF_API_NOT_ACCESSIBLE:"TCF_API_NOT_ACCESSIBLE",TCF_DATA_PROCESSING_ERROR:"TC_DATA_PROCESSING_ERROR",TCF_API_CANNOT_STOP:"TCF_API_CANNOT_STOP"};var Kc=e=>{try{e.handledBfCache||(window.addEventListener("pageshow",(t=>{if(!0===t.persisted){const t=e.dataLayer.getItems(["code","comment","pixelType"],{category:"measurement"}).reduce(((e,{key:t,value:r})=>(e[t]=r,e)),{});setTimeout((()=>{e.command("pageview",t)}),0)}})),e.handledBfCache=!0)}catch(t){e.emit("EXECUTION_ERROR",t)}};var eu=(e,t)=>{try{const r=new wc(wc.TYPES.NONE,parseInt(e.substring(2),16),t.settings.tcf.vendors);if(r.toString(16)!==`00${e.substring(2)}`){throw new Jt(Jt.TYPES.ERROR,3,1,3,1)}return t.tcfProcessor.stop(),r}catch(e){return t.emit("MANUAL_CONSENT_ERROR",e),null}};var tu=(e,t)=>{e!==Hc.LOADING_METHODS.ASYNC&&e!==Hc.LOADING_METHODS.DEFER||t.dataLayer.setItem("loading",e,{category:jc.CATEGORIES.GLOBAL})};var ru=(e,t,r)=>{const n=t.toLowerCase().replace("v.","").replace("v","");if(n.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)){if(e.includes("iomm_config_version_sensor")){zc(kc).forEach((t=>{e.toLowerCase()===`iomm_config_version_sensor_${t.name}`&&r.dataLayer.setItem(t.name,n,{category:jc.CATEGORIES.VERSION})}))}if(e.includes("iomm_config_version_3p")||e.includes("iomm_config_version_ext")){zc(Bc).forEach((n=>{e.toLowerCase()!==`iomm_config_version_3p_${n.name}`&&e.toLowerCase()!==`iomm_config_version_ext_${n.name}`||r.dataLayer.setItem(n.name,t,{category:jc.CATEGORIES.VERSION})}))}}};var nu=e=>{try{document.querySelectorAll("meta").forEach((t=>{const r=t.getAttribute("name"),n=t.getAttribute("content");r&&n&&(r===e.settings.metaTags.loading&&tu(n,e),r.includes("iomm_config_version")&&ru(r,n,e))}))}catch(t){const r=new Jt(Jt.TYPES.ERROR,3,1,4,1,t.message);e.emit("EXECUTION_ERROR",r)}};const au=(e,t)=>{try{const{value:r}=t.dataLayer.getItem("methods",{category:jc.CATEGORIES.GLOBAL});e.filter((e=>void 0===e.bit||(r&e.bit)===e.bit)).forEach((e=>{let r=!e.tcf;const n=t.dataLayer.getItem(e.name,{category:jc.CATEGORIES.SENSOR});if(e.tcf){const{value:a}=t.dataLayer.getItem("consentString",{category:jc.CATEGORIES.TCF});a&&a instanceof wc?(r=a.check(e.tcf.vendor,e.tcf.consent),r?(n.value||t.commandDispatcher.activate(e.name),t.dataLayer.on(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,jc.CATEGORIES.TCF,"consentString"),(()=>{iu([e],t)}))):t.dataLayer.once(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,jc.CATEGORIES.TCF,"consentString"),(()=>{au([e],t)}))):t.dataLayer.once(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,jc.CATEGORIES.TCF,"consentString"),(()=>{au([e],t)}),e.name)}else t.commandDispatcher.activate(e.name);if(n.value)t.commandDispatcher.addFacade(e.name,n.value);else if(r){let r;t.dataLayer.once(jc.generateDataMutationEventName(jc.MUTATION_EVENTS.SET,jc.CATEGORIES.SENSOR,e.name),(()=>{au([e],t)})),r=Object.keys(t.settings.sensors).includes(e.name)?t.bundleLoader.generateSensorUrl({sensorVariant:e.name}):t.bundleLoader.generateModuleUrl({moduleVariant:e.name});const{value:n}=t.dataLayer.getItem(e.name,{category:jc.CATEGORIES.BUNDLE_LOADED});n||(t.dataLayer.setItem(e.name,Hc.LOADING_STATUS.LOADING,{category:jc.CATEGORIES.BUNDLE_LOADED}),t.bundleLoader.load(r,e.name,e.cdn.static).then((()=>{t.dataLayer.setItem(e.name,Hc.LOADING_STATUS.LOADED,{category:jc.CATEGORIES.BUNDLE_LOADED})})).catch((r=>{t.emit("EXECUTION_ERROR",r),t.dataLayer.setItem(e.name,Hc.LOADING_STATUS.LOADING_FAILED,{category:jc.CATEGORIES.BUNDLE_LOADED})})))}}))}catch(e){t.emit("EXECUTION_ERROR",e)}},iu=(e,t)=>{try{e.filter((e=>{const{value:r}=t.dataLayer.getItem("methods",{category:jc.CATEGORIES.GLOBAL});return void 0===e.bit||(r&e.bit)===e.bit})).forEach((e=>{const{value:r}=t.dataLayer.getItem("consentString",{category:jc.CATEGORIES.TCF});if(r&&r instanceof wc){if(!1===r.check(e.tcf.vendor,e.tcf.consent))t.commandDispatcher.removeFacade(e.name),t.commandDispatcher.deactivate(e.name);else{const r=t.dataLayer.getItem(e.name,{category:jc.CATEGORIES.SENSOR});r&&r.value?(t.commandDispatcher.addFacade(e.name,r.value),t.commandDispatcher.activate(e.name)):au([e],t)}}}))}catch(e){t.emit("EXECUTION_ERROR",e)}};class su extends Z{constructor(e,t=xc){super(),this.moduleId=1,this.commandQueue=e,this.commandProcessor=new Aa(e,Gi,{fillParameters:!0,maxExecutionBeforeStop:3}),this.dataLayer=new jc,this.commandDispatcher=new Fc(this,zc(kc)),this.settings=t,this.bundleLoader=new Hc(this.dataLayer,this,this.settings),this.tcfProcessor=new Wc(this.settings.tcf.vendors,this.dataLayer,this.settings),this.skipExecution=!1,this.handledBfCache=!1,this.tcfProcessor.process(),nu(this)}command(e,...t){try{this.commandProcessor.commandSerializer.reset();const r=this.commandProcessor.process(e,...t);if(r&&r.parameters){switch(e){case su.COMMANDS.CONFIGURE:if(r.parameters.consentString){const e=eu(r.parameters.consentString,this);e&&e instanceof wc&&(r.parameters.consentString=e.toString(16),this.dataLayer.setItem("consentString",e,{category:jc.CATEGORIES.TCF})),null===e&&delete r.parameters.consentString}this.dataLayer.setItems(Object.keys(r.parameters),Object.values(r.parameters),{category:jc.CATEGORIES.GLOBAL}),au(zc(kc),this);break;case su.COMMANDS.PAGEVIEW:this.dataLayer.deleteItem("event",{category:jc.CATEGORIES.MEASUREMENT}),this.dataLayer.setItems(Object.keys(r.parameters),Object.values(r.parameters),{category:jc.CATEGORIES.MEASUREMENT}),Kc(this);break;case su.COMMANDS.THIRD_PARTY_MODULES:$c(r.parameters.thirdPartyModule)&&((e,t)=>{try{const r=$c(e.thirdPartyModule),{surveyType:n}=e;t.commandDispatcher.addModule(r.name,r);const[{value:a},{value:i}]=t.dataLayer.getItems(["site","country"],{category:jc.CATEGORIES.GLOBAL}),[{value:s},{value:o}]=t.dataLayer.getItems(["code","pixelType"],{category:jc.CATEGORIES.MEASUREMENT}),c={st:a,cn:i,cp:s,pt:o,sv:n};t.commandDispatcher.enqueueToSingleModule(r.name,"configure",c),au([r],t)}catch(e){t.emit(su.EVENTS.EXECUTION_ERROR,e)}})(r.parameters,this),this.skipExecution=!0;break;case su.COMMANDS.EVENT:this.dataLayer.setItem("event",r.parameters.event,{category:jc.CATEGORIES.MEASUREMENT});break;case su.COMMANDS.SET_MULTI_IDENTIFIER:this.dataLayer.setItem("multiIdentifier",r.parameters.multiIdentifier,{category:jc.CATEGORIES.GLOBAL}),this.commandDispatcher.enqueueToSingleModule(Hc.BUNDLE_VARIANTS.IOMP,su.COMMANDS.SET_MULTI_IDENTIFIER,r.parameters.multiIdentifier),this.skipExecution=!0}return!1===this.skipExecution&&this.commandDispatcher.enqueue(e,r.parameters),void(this.skipExecution=!1)}throw new Jt(Jt.TYPES.FATAL,3,1,1,1,this.commandProcessor.commandSerializer.lastAssertion)}catch(e){throw e instanceof Jt?e:new Jt(Jt.TYPES.FATAL,3,1,1,2,e.message)}}}function ou(e){const t=new su(e);return{cf(...e){t.command(su.COMMANDS.CONFIGURE,...e)},configure(...e){t.command(su.COMMANDS.CONFIGURE,...e)},pv(...e){t.command(su.COMMANDS.PAGEVIEW,...e)},pageview(...e){t.command(su.COMMANDS.PAGEVIEW,...e)},sm(...e){t.command(su.COMMANDS.SET_MODE,...e)},setMode(...e){t.command(su.COMMANDS.SET_MODE,...e)},"3p"(...e){t.command(su.COMMANDS.THIRD_PARTY_MODULES,...e)},thirdPartyModules(...e){t.command(su.COMMANDS.THIRD_PARTY_MODULES,...e)},event(...e){t.command(su.COMMANDS.EVENT,...e)},ev(...e){t.command(su.COMMANDS.EVENT,...e)},hybrid(...e){t.command(su.COMMANDS.HYBRID,...e)},hy(...e){t.command(su.COMMANDS.HYBRID,...e)},smi(...e){t.command(su.COMMANDS.SET_MULTI_IDENTIFIER,...e)},setMultiIdentifier(...e){t.command(su.COMMANDS.SET_MULTI_IDENTIFIER,...e)}}}su.COMMANDS={CONFIGURE:"configure",PAGEVIEW:"pageview",HYBRID:"hybrid",EVENT:"event",SET_MODE:"setMode",THIRD_PARTY_MODULES:"thirdPartyModules",SET_MULTI_IDENTIFIER:"setMultiIdentifier"},su.MODULES={QDS:"qds"},su.EVENTS={COMMAND_DOES_NOT_EXIST:"COMMAND_DOES_NOT_EXIST",EXECUTION_ERROR:"EXECUTION_ERROR",MANUAL_CONSENT_ERROR:"MANUAL_CONSENT_ERROR"};const cu="IOMmGlobalObject"in window?window.IOMmGlobalObject:window.IOMmGlobalObject="IOMm",uu=window[cu]||(window[cu]=(...e)=>{(window[cu].q=window[cu].q||[]).push(...e)});uu.version="1.9.1",window.iom||(window.iom={},window.iom.smi=window.iom.setMultiIdentifier=e=>uu("setMultiIdentifier",e)),uu.q=new Wt(ou,{multiTenancy:!0},uu.q),uu.create=ou}();