(function () {(function(c,d){typeof exports=="object"&&typeof module!="undefined"?module.exports=d():typeof define=="function"&&define.amd?define(d):(c=typeof globalThis!="undefined"?globalThis:c||self,c._M_=d())})(this,function(){"use strict";var Me=Object.defineProperty,Le=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var F=(c,d,a)=>d in c?Me(c,d,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[d]=a,ee=(c,d)=>{for(var a in d||(d={}))We.call(d,a)&&F(c,a,d[a]);if(j)for(var a of j(d))Pe.call(d,a)&&F(c,a,d[a]);return c},te=(c,d)=>Le(c,qe(d));var x=(c,d,a)=>(F(c,typeof d!="symbol"?d+"":d,a),a);var z=(c,d,a)=>new Promise((T,I)=>{var h=w=>{try{U(a.next(w))}catch(v){I(v)}},M=w=>{try{U(a.throw(w))}catch(v){I(v)}},U=w=>w.done?T(w.value):Promise.resolve(w.value).then(h,M);U((a=a.apply(c,d)).next())});var c=(t=>(t.BANNER="BANNER",t.NATIVE="NATIVE",t.VIDEO="VIDEO",t))(c||{}),d=(t=>(t.STICKY="sticky",t.PRESTITIAL="prestitial",t.POSTITIAL="postitial",t))(d||{}),a=(t=>(t.STICKY_BANNER="sticky-banner",t.STICKY_NATIVE="sticky-native",t.STICKY_VIDEO="sticky-video",t.PRESTITIAL_BANNER="prestitial-banner",t.PRESTITIAL_NATIVE="prestitial-native",t.PRESTITIAL_VIDEO="prestitial-video",t.POSTITIAL_BANNER="postitial-banner",t.POSTITIAL_NATIVE="postitial-native",t.POSTITIAL_VIDEO="postitial-video",t.HEADER_BANNER="header-banner",t.HEADER_NATIVE="header-native",t.HEADER_VIDEO="header-video",t))(a||{}),T=(t=>(t.LOCAL="local",t.STAGING="staging",t.PRODUCTION="production",t.EDGE="edge",t))(T||{}),I=(t=>(t.AMP="amp",t.Bot="bot",t.Desktop="desktop",t.Mobile="mobile",t.Tablet="tablet",t.Webview="webview",t))(I||{}),h=(t=>(t.Adyoulike="adyoulike",t.Bidule="bidule",t.CriteoCDB="criteo-cdb",t.CriteoPrebidBanner="criteo-prebid-banner",t.CriteoPrebidNative="criteo-prebid-native",t.CriteoPrebidVideo="criteo-prebid-video",t.ImproveDigitalNative="improvedigital-native",t.MagniteBanner="magnite-banner",t.MagniteNative="magnite-native",t.MagniteVideo="magnite-video",t.Outbrain="outbrain",t.PubmaticNative="pubmatic-native",t.RichAudienceBanner="richaudience-banner",t.RichAudienceVideo="richaudience-video",t.SmartBanner="smart-banner",t.SmartNative="smart-native",t.SmartVideo="smart-video",t.SmilewantedBanner="smilewanted-banner",t.SmilewantedVideo="smilewanted-video",t.WmgPubmaticNative="wmg-pubmatic-native",t.XandrBanner="xandr-banner",t.XandrNative="xandr-native",t.XandrVideo="xandr-video",t))(h||{});a.STICKY_BANNER+"",100*85,150*125,300*250*.5625,a.STICKY_NATIVE+"",h.Outbrain+"",h.Adyoulike+"",h.SmartNative+"",h.XandrNative+"",h.MagniteNative+"",h.PubmaticNative+"",h.CriteoPrebidNative+"",h.ImproveDigitalNative+"",a.STICKY_VIDEO+"",a.PRESTITIAL_BANNER+"",100*85,150*125,300*250*.5625,a.PRESTITIAL_NATIVE+"",a.PRESTITIAL_VIDEO+"",a.POSTITIAL_BANNER+"",a.POSTITIAL_NATIVE+"",a.POSTITIAL_VIDEO+"",a.HEADER_BANNER+"",a.HEADER_NATIVE+"",a.HEADER_VIDEO+"",a.STICKY_BANNER+"",a.PRESTITIAL_BANNER+"",a.POSTITIAL_BANNER+"",a.HEADER_BANNER+"";function M(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}/*! load-script2. MIT License. Feross Aboukhadijeh */var U=function(e,i,r){return new Promise((n,s)=>{const o=document.createElement("script");o.async=!0,o.src=e;for(const[f,m]of Object.entries(i||{}))o.setAttribute(f,m);o.onload=()=>{o.onerror=o.onload=null,n(o)},o.onerror=()=>{o.onerror=o.onload=null,s(new Error(`Failed to load ${e}`))},(r||document.head||document.getElementsByTagName("head")[0]).appendChild(o)})};const w=M(U),v=()=>{};function ie(t,e){const i={amp:e.device===I.AMP,ik:e.idempotencyKey,t:e.apiKey};try{const r=new URL(t);return Object.entries(i).forEach(([n,s])=>{s===!0?r.searchParams.set(n,"1"):s&&r.searchParams.set(n,s)}),r.toString()}catch(r){return""}}function H(t="%cmissena-debug:",e="color:#FFF; background-color:red; padding:3px;border-radius:3px;"){const i=A();try{const r=i.localStorage.getItem("__missena_debug")||i.hasOwnProperty("displayMissenaInfo"),n=i.displayMissenaInfo||v;return r?function(){if(arguments.length==3){n(...arguments);return}console.log(t,e,...arguments)}:v}catch(r){return v}}function A(){try{return window.Cypress?window:(window.top.__doNotExist__,window.top)}catch(t){return window}}/*! * uuidv4 function posted by Rasmus Schultz (mindplay-dk) * on https://gist.github.com/jed/982883 */for(var u=[],S=0;S<256;S++)u[S]=(S<16?"0":"")+S.toString(16);function re(){var t=crypto.getRandomValues(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,u[t[0]]+u[t[1]]+u[t[2]]+u[t[3]]+"-"+u[t[4]]+u[t[5]]+"-"+u[t[6]]+u[t[7]]+"-"+u[t[8]]+u[t[9]]+"-"+u[t[10]]+u[t[11]]+u[t[12]]+u[t[13]]+u[t[14]]+u[t[15]]}function X(t,e){var i;typeof t.renderers[e.format]=="function"?((i=t.log)==null||i.call(t,"Renderer finished loading. Rendering: ",t,e),t.renderers[e.format](e),t.shownAds.push(e.meta.requestId||"undefined")):requestAnimationFrame(()=>X(t,e))}function K(t,e){return z(this,null,function*(){var n,s,o;const i=t.window.document,r=i.head||i.getElementsByTagName("head")[0];if(t.shownAds=(n=t.shownAds)!=null?n:[],e.meta.requestId=(s=e.meta.requestId)!=null?s:re(),!t.shownAds.includes(e.meta.requestId)){if(typeof t.renderers[e.format]=="function"){(o=t.log)==null||o.call(t,"Renderer already loaded. Rendering: ",t,e),t.renderers[e.format](e),t.shownAds.push(e.meta.requestId);return}w(`${t.baseUrl}/renderer-${e.format}.js`,{},r).then(()=>{X(t,e)})}})}function ne(t){var e;try{return((e=t.window._pbjsGlobals)!=null?e:[]).reduce((i,r)=>{var n,s;return i||((s=(n=t.window[r])==null?void 0:n.installedModules)==null?void 0:s.includes("fledgeForGpt"))},!1)}catch(i){return!1}}var Y=4294967295;function oe(t,e,i){var r=i/4294967296,n=i;t.setUint32(e,r),t.setUint32(e+4,n)}function G(t,e,i){var r=Math.floor(i/4294967296),n=i;t.setUint32(e,r),t.setUint32(e+4,n)}function se(t,e){var i=t.getInt32(e),r=t.getUint32(e+4);return i*4294967296+r}var L,q,W,R=(typeof process=="undefined"||((L=process==null?void 0:process.env)===null||L===void 0?void 0:L.TEXT_ENCODING)!=="never")&&typeof TextEncoder!="undefined"&&typeof TextDecoder!="undefined";function $(t){for(var e=t.length,i=0,r=0;r=55296&&n<=56319&&r>6&31|192;else{if(o>=55296&&o<=56319&&s>18&7|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128):(e[n++]=o>>12&15|224,e[n++]=o>>6&63|128)}else{e[n++]=o;continue}e[n++]=o&63|128}}var _=R?new TextEncoder:void 0,de=R?typeof process!="undefined"&&((q=process==null?void 0:process.env)===null||q===void 0?void 0:q.TEXT_ENCODING)!=="force"?200:0:Y;function ce(t,e,i){e.set(_.encode(t),i)}function fe(t,e,i){_.encodeInto(t,e.subarray(i))}var ue=_!=null&&_.encodeInto?fe:ce;R&&new TextDecoder,R&&typeof process!="undefined"&&((W=process==null?void 0:process.env)===null||W===void 0||W.TEXT_DECODER);var O=function(){function t(e,i){this.type=e,this.data=i}return t}(),pe=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function r(){this.constructor=e}e.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),he=function(t){pe(e,t);function e(i){var r=t.call(this,i)||this,n=Object.create(e.prototype);return Object.setPrototypeOf(r,n),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:e.name}),r}return e}(Error),le=-1,we=4294967296-1,me=17179869184-1;function ve(t){var e=t.sec,i=t.nsec;if(e>=0&&i>=0&&e<=me)if(i===0&&e<=we){var r=new Uint8Array(4),n=new DataView(r.buffer);return n.setUint32(0,e),r}else{var s=e/4294967296,o=e&4294967295,r=new Uint8Array(8),n=new DataView(r.buffer);return n.setUint32(0,i<<2|s&3),n.setUint32(4,o),r}else{var r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,i),G(n,4,e),r}}function ge(t){var e=t.getTime(),i=Math.floor(e/1e3),r=(e-i*1e3)*1e6,n=Math.floor(r/1e9);return{sec:i+n,nsec:r-n*1e9}}function Ee(t){if(t instanceof Date){var e=ge(t);return ve(e)}else return null}function xe(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:{var i=e.getUint32(0),r=0;return{sec:i,nsec:r}}case 8:{var n=e.getUint32(0),s=e.getUint32(4),i=(n&3)*4294967296+s,r=n>>>2;return{sec:i,nsec:r}}case 12:{var i=se(e,4),r=e.getUint32(0);return{sec:i,nsec:r}}default:throw new he("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(t.length))}}function ye(t){var e=xe(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Te={type:le,encode:Ee,decode:ye},Ie=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Te)}return t.prototype.register=function(e){var i=e.type,r=e.encode,n=e.decode;if(i>=0)this.encoders[i]=r,this.decoders[i]=n;else{var s=1+i;this.builtInEncoders[s]=r,this.builtInDecoders[s]=n}},t.prototype.tryToEncode=function(e,i){for(var r=0;rthis.maxDepth)throw new Error("Too deep objects in depth ".concat(i));e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.encodeObject(e,i)},t.prototype.ensureBufferSizeToWrite=function(e){var i=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},t.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error("Too long string: ".concat(e," bytes in UTF-8"))},t.prototype.encodeString=function(e){var i=5,r=e.length;if(r>de){var n=$(e);this.ensureBufferSizeToWrite(i+n),this.writeStringHeader(n),ue(e,this.bytes,this.pos),this.pos+=n}else{var n=$(e);this.ensureBufferSizeToWrite(i+n),this.writeStringHeader(n),ae(e,this.bytes,this.pos),this.pos+=n}},t.prototype.encodeObject=function(e,i){var r=this.extensionCodec.tryToEncode(e,this.context);if(r!=null)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,i);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,i);else throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)))},t.prototype.encodeBinary=function(e){var i=e.byteLength;if(i<256)this.writeU8(196),this.writeU8(i);else if(i<65536)this.writeU8(197),this.writeU16(i);else if(i<4294967296)this.writeU8(198),this.writeU32(i);else throw new Error("Too large binary: ".concat(i));var r=Ue(e);this.writeU8a(r)},t.prototype.encodeArray=function(e,i){var r=e.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw new Error("Too large array: ".concat(r));for(var n=0,s=e;n1&&(i=1),i=Math.round(i*100)/100,!(Math.random()>i)&&(this.queue.push({event:yield this.enrich(e,i),url:ie(this.url,this.ctx)}),this.window.document.dispatchEvent(new CustomEvent(this.eventNameSpace,{detail:{event:e}})),this.next()))})}next(){const e=this.queue.shift();if(!e)return;const i=Ne(te(ee({},e.event),{from:this.application})),r=new Blob([i],{type:"application/msgpack"});navigator.sendBeacon(e.url,r)}}const Be=H("%cmissena-mosquito:");function Re(t,e){var r;const i=t.native;return i.kind=c.NATIVE,i.commission={type:"cpm",currency:(r=t.currency)!=null?r:"EUR",value:t.cpm},i.ids=e,i}function Oe(t,e,i={}){var n;if(!("mediaType"in e))return e;const r={type:"cpm",currency:(n=e.currency)!=null?n:"EUR",value:e.cpm};switch(e.mediaType){case"video":return{commission:r,kind:c.VIDEO,vastImpUrl:e.vastImpUrl,vastUrl:e.vastUrl,vastXml:e.vastXml,ids:i};case"native":return Re(e,i);case"banner":return{kind:c.BANNER,ad:e.ad,width:e.width,height:e.height,commission:r,ids:i}}}function ke(t,e){const i=A();if(!i.__tcfapi){e();return}i.__tcfapi("addEventListener",2,function(r,n){!n||!["tcloaded","useractioncomplete"].includes(r==null?void 0:r.eventStatus)||(i.__tcfapi("removeEventListener",2,()=>{},r.listenerId),t(r))})}class Ve extends Ce{adsuccess(e){this.log({name:"adsuccess",parameters:{provider:e}})}bidsuccess(e){this.log({name:"bidsuccess",parameters:e})}consent(){ke(e=>{Be({missing_purpose:!e.purpose.consents[1],missing_vendor:!e.vendor.consents[867],tcData:e}),this.log({name:"consent",parameters:{applies:e.gdprApplies,missing_purpose:!e.purpose.consents[1],missing_vendor:!e.vendor.consents[867],string:e.tcString}})},()=>{this.log({name:"consent",parameters:{applies:!1}})})}debug(e){this.log({name:"log",parameters:{label:e}})}timeout(e){e!="missena"&&Math.random()>=.99&&this.log({name:"timeout",parameters:{bidder:e}})}}const k=A();k.__MISSENA__=k.__MISSENA__||{};const b=H();function De(t,e,i,r,n,s){b("renderer called");const o=k.__MISSENA__;o.log=b,o.baseUrl=t,o.window=A(),o.apiKey=n.apiKey,o.device=e,o.environment=i,o.settings=s,o.slots=o.slots||{},o.renderers=o.renderers||{};const p=new Ve({ctx:o,appName:"mosquito"});o.renderFromBid=(f,m,V=d.STICKY)=>{var g,C;const N=`${V}-${f.mediaType}`,y={adUnitCode:f.adUnitCode,provider:m,format:N,settings:(g=r.find(E=>E.name==N))==null?void 0:g.settings,data:Oe(o,f),meta:{requestId:f.requestId},reload:()=>{},remove:()=>{},track:()=>{}};(C=o.slots[f.adUnitCode])==null||C.remove(),o.slots[f.adUnitCode]=y,p.adsuccess(m),K(o,y)},k.renderMissenaNativeAd=(f,m,V)=>{var Z,Q;b("renderMissenaNativeAd called with: ",f,m,V);const N=h.CriteoPrebidNative,y=a.STICKY_NATIVE,g=f.products[0],C="missenanative";var E=m.adUnits.find(l=>l.bids.find(B=>B.bidder==C&&B.params.networkId==V));if(!E){b("adUnit not found");return}const P={type:"cpm",currency:"EUR",value:0};var ze=m.getBidResponsesForAdUnitCode(E.code),D=ze.bids.filter(l=>l.bidderCode==C).reduce((l,B)=>l&&l.requestTimestamp>B.requestTimestamp?l:B);if(!D)return;P.value=D.originalCpm,P.currency=D.currency;const J={adUnitCode:E.code,provider:N,format:y,settings:(Z=r.find(l=>l.name==y))==null?void 0:Z.settings,data:{kind:c.NATIVE,clickUrl:g.click_url,icon:f.advertiser.logo.url,image:g.image.url,price:g.price,privacyLink:f.privacy.optout_click_url,sponsoredBy:f.advertiser.description,title:g.title,impressionTrackers:f.impression_pixels.map(l=>l.url),commission:P},meta:{requestId:D.requestId},reload:()=>{},remove:()=>{},track:()=>{}};(Q=o.slots[E.code])==null||Q.remove(),o.slots[E.code]=J,p.adsuccess(N),b("calling renderer: ",`${t}/renderer-${y}.js`),K(o,J)}}return De}); _M_("https://chat.missena.io","bot","edge",[{"renderer":"sticky-banner","mediaType":"banner","name":"sticky-banner","settings":{"afterDisplay":"","plugins":[],"position":{"desktop":{"bottom":"0px","right":"0px"},"mobile":{"bottom":"148px","right":"0px"}},"triggers":{"desktop":[],"mobile":[],"webview":[]}},"providers":[{"name":"criteo-prebid-banner"}]},{"renderer":"sticky-native","mediaType":"native","name":"sticky-native","settings":{"behavior":{"adyoulike":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"criteo-prebid-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"improvedigital-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"magnite-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"pubmatic-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"smart-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"},"xandr-native":{"countdown":6,"onClick":"redirect","onSwipe":"popup"}},"crossVariant":"bottom_left_big"},"providers":[{"name":"criteo-prebid-native","settings":{"zoneId":1628646}},{"name":"outbrain"}]},{"renderer":"sticky-video","mediaType":"video","name":"sticky-video","settings":{"crossVariant":"bottom_left_big"},"providers":[{"name":"criteo-prebid-video","settings":{"zoneId":1628860}}]}],{"apiKey":"PA-26636457","blockedProviders":["xandr-video","xandr-native","xandr-banner","smart-video"],"floor":0,"floorCurrency":"EUR","passback":"","sentryEnabled":false},{});})();