var Strossle=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=17)}([function(t,e,r){"use strict";window.StrossleStorage=window.StrossleStorage||{},e.a={getItem:function(t){return window.StrossleStorage[t]},setItem:function(t,e){window.StrossleStorage[t]=e}}},function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=function(){return window!==window.parent},c=function(t,e){if(!window.URL)return!0;try{0===t.indexOf("//")&&(t=document.location.protocol+t),0===e.indexOf("//")&&(e=document.location.protocol+e);var r=new window.URL(t),n=new window.URL(e);return r.hostname===n.hostname}catch(t){return!0}},s={checkForAdblocker:function(){var t=document.createElement("div");t.className="afs_ads pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links ad-text adSense adBlock adContent adBanner",t.innerHTML="&nbsp;",document.getElementsByTagName("body")[0].appendChild(t);var e=document.getElementsByClassName("afs_ads"),r=!1;return e.length&&0!==e[0].innerHTML.length&&0!==e[0].clientHeight||(r=!0),t.remove(),r},createElementFromString:function(t){var e=document.createElement("div");return e.innerHTML=t.trim(),e.firstChild},loadCSS:function(t){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href",t);var r=document.getElementsByTagName("head");r&&r.length&&r[0].appendChild(e)},loadScript:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement("script");if(o.type="text/javascript",o.src=t,o.async=!0,r&&"object"===i(r)&&Object.entries(r).forEach((function(t){var e=n(t,2),r=e[0],i=e[1];o.setAttribute(r,i)})),"string"==typeof e){var a=document.querySelector(e);a.parentNode.insertBefore(o,a.nextSibling)}else{var c=document.getElementsByTagName("head");c&&c.length&&c[0].appendChild(o)}},applyCSSFromStringToSiteHead:function(t){var e=document.createElement("style"),r=document.getElementsByTagName("head")[0],n=t;e.type="text/css",e.appendChild(document.createTextNode(n)),r.appendChild(e)},wrapPostInATag:function(t,e){var r="_top";c(s.getCurrentBrowserUrl(),e)||(r="_blank");var n=document.createElement("a");return n.href=e,n.target=r,n.innerHTML=t.innerHTML,n.rel="nofollow",t.innerHTML="",t.appendChild(n),t},crawlWindowsToTheTop:function(t){var e,r,n,o=0,i=!1,a=!1;try{t.location.ancestorOrigins&&(e=t.location.ancestorOrigins)}catch(t){}do{var c=r,s=a,u=void 0,l=!1,p=null;a=!1,r=r?r.parent:t;try{u=r.location.href||null}catch(t){l=!0}if(l)if(s)try{n=p=c.context.sourceUrl,i=!0}catch(t){}else{try{var f=c.document.referrer;f&&(p=f)}catch(t){}!p&&e&&e[o-1]&&(p=e[o-1]),p&&!i&&(n=p)}else u&&(n=p=u,i=!1),r.context&&r.context.sourceUrl&&(a=!0);o++}while(r!==t.top&&o<1e3);return n||null},getCurrentBrowserUrl:function(){return a()?s.crawlWindowsToTheTop(window):window.location.href},getCurrentBrowserHostName:function(){var t=window.location.hostname;return a()&&(t=s.getCurrentBrowserUrl().replace(/https?:\/*/,"").split("/")[0].split(":")[0]),t},getCurrentBrowserHostNameWithoutWWW:function(){return s.getCurrentBrowserHostName().replace(/^(www\.)/,"")},getCurrentBrowserDeviceType:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?"mobile":"desktop"},isElementInView:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-e<=n&&r.top+r.height>=0,a=r.left<=o&&r.left+r.width>=0,c=i&&a;return c},getDataAttributeValue:function(t,e){return"string"==typeof t&&(t=document.querySelector(t)),t&&1===t.nodeType?t.getAttribute(e):null},createIframe:function(t){var e=t.doc||document,r=e.createElement("iframe");t.attrs&&Object.assign(r,t.attrs),t.style&&Object.assign(r.style,t.style),t.src&&(r.src=t.src);var n=t.targetSelector||"body",o=e.querySelector(n);return o&&(o.appendChild(r),t.html&&function(e){e.open(),e.write(t.html),e.close()}(r.contentWindow.document)),r}},u=s,l=!1,p=null,f=window,d={};function h(t){var e={};try{e="string"==typeof t.data?JSON.parse(t.data):t.data}catch(t){}var r=e.__tcfapiReturn;r&&"function"==typeof d[r.callId]&&(d[r.callId](r.returnValue,r.success),d[r.callId]=null)}var y,g=function(){if(!l){if(!p)for(;f;){try{if(f.frames.__tcfapiLocator){p=f;break}}catch(t){}if(f===window.top)break;f=f.parent}window.__tcfapi=function(t,e,r,n){if(p){var o=Math.random()+"",i={__tcfapiCall:{command:t,parameter:n,version:e,callId:o}};d[o]=r,p.postMessage(i,"*")}else r({msg:"CMP not found"},!1)},window.addEventListener("message",h,!1),l=!0}},m={getConsentData:function(){var t={gdprApplies:"",gdprConsent:"",strossleConsents:{}};return new Promise((function(e){try{if(!window.hasOwnProperty("__tcfapi")&&function(){try{return window.self!==window.top}catch(t){return!0}}()&&g(),!window.hasOwnProperty("__tcfapi"))return e(t);var r=!1,n=setTimeout((function(){return r=!0,e(t)}),1e4);window.__tcfapi("addEventListener",2,(function(o,i){if(!r){if(!i)return clearTimeout(n),e(t);if(!1===o.gdprApplies||"tcloaded"===o.eventStatus||"useractioncomplete"===o.eventStatus){clearTimeout(n);var a=((o||{}).purpose||{}).consents||{};return(((o||{}).vendor||{}).consents||{})[851]||Object.keys(a).forEach((function(t){return a[t]=!1})),e({gdprApplies:+o.gdprApplies||t.gdprApplies,gdprConsent:o.tcString||t.gdprConsent,strossleConsents:a})}}}))}catch(r){return e(t)}}))}},v=r(0),b=(y=!1,function(t,e){if(!y){y=!0;try{var r="https://ad.360yield.com/user_sync?publisher_id=1983&gdpr=[GDPR]&gdpr_consent=[GDPR_CONSENT]";r&&(r=(r=r.replace("[GDPR]",t)).replace("[GDPR_CONSENT]",e),fetch(r,{credentials:"include"}).then((function(t){if(t.ok)return t.json()})).then((function(t){Array.isArray(t.sync)&&t.sync.forEach((function(t){var e=document.createElement("img");e.src=t.url,e.style.visibility="hidden",document.body.appendChild(e),e.remove()}))})))}catch(t){}}}),w=function(){var t=!1;return function(e,r){if(!t){t=!0;try{var n="https://hb.360yield.com/prebid-universal-creative/load-cookie-tcf.html?pbs=1&gdpr=[GDPR]&gdpr_consent=[GDPR_CONSENT]&publisher_id=1983&bidders=appnexus,outbrain,smartadserver,adf,criteo,ix,rubicon,pubmatic,medianet";n&&(n=(n=n.replace("[GDPR]",e)).replace("[GDPR_CONSENT]",r),u.createIframe({src:n,style:{display:"none",height:"0px",width:"0px",border:"0px"}}))}catch(t){}}}}();function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function x(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){k(i,n,o,a,c,"next",t)}function c(t){k(i,n,o,a,c,"throw",t)}a(void 0)}))}}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function P(t,e,r){return e&&E(t.prototype,e),r&&E(t,r),t}var R=function(){function t(){_(this,t)}var e,r,n;return P(t,[{key:"generateWrapperElement",value:function(t,e){var r=u.createElementFromString(t);return document.querySelector(e).appendChild(r),r}},{key:"generatePostElement",value:function(t,e,r,n,o){if("ad"===t.type&&n)try{var i=btoa(encodeURIComponent(t.url));t.url=o+encodeURIComponent(i)+"&b64=1"}catch(e){t.url=o+t.url}return e.replace(new RegExp("{{([^]+?)}}","g"),(function(e,n){return n.split(".").reduce((function(e,n){return e[n]?e[n]:t[n]?t[n]:"ad"===t.view&&"strossle_house_ad"!==t.ad_provider&&r[n]&&"adLabel"===n||"ad"===t.view&&"strossle_house_ad"===t.ad_provider&&r[n]&&"houseAdLabel"===n?r[n].replace(new RegExp("{{([^]+?)}}","g"),(function(e,r){return t[r]?t[r]:""})):"sprinkleit"===t.view&&r[n]&&"acceleratorLabel"===n||"article"===t.type&&r[n]&&"sameSiteArticleLabel"===n&&"sprinkleit"!==t.view?r[n]:""}),{})}))}},{key:"buildWidgetServerURL",value:(n=x(regeneratorRuntime.mark((function t(e){var r,n,o,i,a,c,s,l=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=l.length>1&&void 0!==l[1]?l[1]:{},n=u.getCurrentBrowserUrl(),o=u.getCurrentBrowserDeviceType(),i=v.a.getItem("strosslePageSessionId"),t.next=6,m.getConsentData();case 6:return r.gdpr=t.sent,t.next=9,this.getWidgetSiteSettings(e);case 9:return a=t.sent,(c=this.isSitePersonalizedTargetingAllowed(a))&&(b(r.gdpr.gdprApplies,r.gdpr.gdprConsent),a.is_pbs_enabled&&w(r.gdpr.gdprApplies,r.gdpr.gdprConsent)),s="".concat(c?"https://widgets.strossle.360yield.com/v1/widgets":"https://widgets.spklw.com/v1/widgets","/").concat(e)+"?url=".concat(encodeURIComponent(n))+"&device=".concat(o)+"&gdpr=".concat(r.gdpr.gdprApplies)+"&gdpr_consent=".concat(r.gdpr.gdprConsent),i&&(s=s.concat("&page-session-id=".concat(i))),r.context&&Array.isArray(r.context)&&r.context.length&&(s=s.concat("&context=".concat(r.context.join(",")))),r.clickUrl&&"string"==typeof r.clickUrl&&(s=s.concat("&click_url=".concat(encodeURIComponent(r.clickUrl)))),t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"getWidgetSiteSettings",value:(r=x(regeneratorRuntime.mark((function t(e){var r,n,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r="".concat(e,":siteSettings"),!(n=v.a.getItem(r))||"object"!==S(n)){t.next=4;break}return t.abrupt("return",n);case 4:return o="".concat("https://widgets.spklw.com/v1/widgets","/").concat(e,"/settings"),t.next=7,fetch(o);case 7:if((i=t.sent).ok){t.next=10;break}return t.abrupt("return",null);case 10:return t.next=12,i.json();case 12:return n=t.sent,v.a.setItem(r,n),t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"getWidgetData",value:(e=x(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,{credentials:"include"});case 2:if((r=t.sent).ok){t.next=5;break}return t.abrupt("return",null);case 5:return t.abrupt("return",r.json());case 6:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})},{key:"isSitePersonalizedTargetingAllowed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.is_device_storage_enabled&&t.is_personalized_ads_enabled}},{key:"loadPlugins",value:function(t){for(var e=0;e<t.length;e++)"css"===t[e].type&&u.loadCSS(t[e].link),"script"===t[e].type&&u.loadScript(t[e].link)}},{key:"appendWidgetHeader",value:function(t,e,r){var n=t.replace(new RegExp("{{headerText}}","g"),e||""),o=u.createElementFromString(n);r.prepend(o)}},{key:"appendWidgetFooter",value:function(t,e){var r=u.createElementFromString(t);e.appendChild(r)}},{key:"appendPostsEnd",value:function(t,e){var r=u.createElementFromString('<div id="strossle-posts-end-'.concat(t,'" style="flex: 0 0 100%; max-width: 100%;"></div>'));e.appendChild(r)}}]),t}(),A=function(){function t(e){_(this,t),this.instanceId=t.generateInstanceId(),this.targetSelector=e,this.privateMethods=new R,this.adBlockerInUse=u.checkForAdblocker(),this.adBlockRedirectUrl="https://widgets.sprinklecontent.com/r/?u="}return P(t,null,[{key:"generateInstanceId",value:function(){return Math.random().toString(36).substr(2,9)}},{key:"getWidgetSiteSettings",value:function(t){return R.prototype.getWidgetSiteSettings(t)}}]),t}(),O=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e.join("&")},I={buildAndSendLoadEvent:function(t){var e=(v.a.getItem("strosslePageSessionId")||"").replace(/\-/g,""),r={widget_id:t,device:u.getCurrentBrowserDeviceType(),session_id:e,url:u.getCurrentBrowserUrl(),origin_type:"widget",event:"load",type:"widget"},n=encodeURIComponent(O(r)),o="".concat("https://bonfire.spklw.com","/?t=bulk&i=").concat(n);fetch(o)},preparePostClickEvent:function(t,e,r){t.addEventListener("click",(function(){if(!t.getAttribute("data-clicked")){t.setAttribute("data-clicked",!0),fetch(e);try{r&&Array.isArray(r)&&(r=r.concat(r.filter(Boolean)))&&r.length>0&&r.forEach((function(e){var r=document.createElement("img");r.src=e,r.style.visibility="hidden",t.appendChild(r),r.remove()}))}catch(t){}}}))}};function j(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var N=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=e.src,n=e.global,o=e.attributes,i=e.selector;this.src=r,this.global=n,this.attributes=o||{},this.selector=i,this.isLoaded=!1}var e,r,n;return e=t,(r=[{key:"loadScript",value:function(){var t=this;return new Promise((function(e,r){var n=document.createElement("script");if(n.type="text/javascript",n.async=!0,n.src=t.src,t.attributes&&"object"===L(t.attributes)&&Object.entries(t.attributes).forEach((function(t){var e=T(t,2),r=e[0],o=e[1];n.setAttribute(r,o)})),t.selector&&"string"==typeof t.selector){var o=document.querySelector(t.selector);o.parentNode.insertBefore(n,o.nextSibling)}else{var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}n.addEventListener("load",(function(){t.isLoaded=!0,e(n)})),n.addEventListener("error",(function(){r(new Error("".concat(t.src," failed to load.")))}))}))}},{key:"load",value:function(){var t=this;return new Promise(function(){var e,r=(e=regeneratorRuntime.mark((function e(r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.isLoaded){e.next=12;break}return e.prev=1,e.next=4,t.loadScript();case 4:r(t.global?window[t.global]:null),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n(e.t0);case 10:e.next=13;break;case 12:r(t.global?window[t.global]:null);case 13:case"end":return e.stop()}}),e,null,[[1,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){j(i,n,o,a,c,"next",t)}function c(t){j(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return r.apply(this,arguments)}}())}}])&&U(e.prototype,r),n&&U(e,n),t}(),W={debug:function(){if(v.a.getItem("debug")){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=console.log).call.apply(t,[console.log].concat(r))}}};function B(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function M(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var H="widget",F="content",z={},q=function(){function t(e,r,n,o,i,a,c,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.impressionTrackerType=e,this.widgetInstanceId=r,this.el=n,this.timer=null,this.hasSent=!1,this.impressionURL=o,this.impressionPixels=i,this.impressionScripts=a,this.isImpressionScriptsInjected=!1,this.impressionTags=c,this.timing=s,this.viewabilityThreshold=.4;var u={root:null,rootMargin:"0px",threshold:[this.viewabilityThreshold]};"on_render"===this.timing?this.fire():(this.observer=new IntersectionObserver(this.handler.bind(this),u),this.observer.observe(n)),this.injectImpressionScripts()}var e,r,n;return e=t,(r=[{key:"handler",value:function(t){try{var e,r=B(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;n&&(this.hasSent||(n.isIntersecting&&n.intersectionRatio>=this.viewabilityThreshold&&null===this.timer&&(this.timer=setTimeout((function(t){t.fire()}),1e3,this)),n.intersectionRatio<this.viewabilityThreshold&&(clearTimeout(this.timer),this.timer=null)))}}catch(t){r.e(t)}finally{r.f()}}catch(t){W.debug("Error running impression tracking handler",t)}}},{key:"fire",value:function(){var t=z[this.widgetInstanceId];this.impressionTrackerType===F&&t&&t.widgetImpressionURL&&!t.isWidgetTracked&&(t.isWidgetTracked=!0,fetch(t.widgetImpressionURL)),this.impressionTrackerType===F&&t&&t.widgetEmptyPostsURL&&!t.isEmptyPostsTracked&&(t.isEmptyPostsTracked=!0,fetch(t.widgetEmptyPostsURL)),fetch(this.impressionURL),this.injectImpressionPixels(),this.injectImpressionTags(),this.hasSent=!0,this.timer=null}},{key:"injectImpressionPixels",value:function(){var t=this;Array.isArray(this.impressionPixels)&&this.impressionPixels.forEach((function(e){var r=document.createElement("img");r.src=e,r.style.visibility="hidden",t.el.appendChild(r),r.remove()}))}},{key:"injectImpressionScripts",value:function(){var t=this;Array.isArray(this.impressionScripts)&&!this.isImpressionScriptsInjected&&(this.isImpressionScriptsInjected=!0,this.impressionScripts.filter(Boolean).forEach((function(e){var r=document.createElement("script");r.src=e,r.type="application/javascript",t.el.appendChild(r)})))}},{key:"injectImpressionTags",value:function(){var t=this;Array.isArray(this.impressionTags)&&this.impressionTags.filter(Boolean).forEach((function(e){var r=document.createRange().createContextualFragment(e);t.el.appendChild(r)}))}}])&&M(e.prototype,r),n&&M(e,n),t}(),G={widgetWillRender:function(t){try{var e,r,n,o,i,a,c=null==t?void 0:t.widgetInstanceId,s=null==t?void 0:t.widgetSelector,u=(null==t||null===(e=t.event)||void 0===e||null===(r=e.data)||void 0===r||null===(n=r.widget)||void 0===n?void 0:n.t_imp)||"",l=(null==t||null===(o=t.event)||void 0===o||null===(i=o.data)||void 0===i||null===(a=i.widget)||void 0===a?void 0:a.t_emp)||"";z[c]||(z[c]={widgetImpressionURL:u,isWidgetTracked:!1,widgetEmptyPostsURL:l,isEmptyPostsTracked:!1,widgetSelector:s,isWidgetEmpty:!0})}catch(t){W.debug("Error running widgetWillRender hook",t)}},widgetDidRender:function(t){var e=null==t?void 0:t.widgetInstanceId,r=z[e];if(r.isWidgetEmpty){var n=document.querySelector(r.widgetSelector);new q(H,e,n,r.widgetEmptyPostsURL)}},contentDidRender:function(t){try{var e,r;if(null!=t&&null!==(e=t.event)&&void 0!==e&&null!==(r=e.data)&&void 0!==r&&r.el){var n,o,i,a,c,s,u,l,p,f=null==t?void 0:t.widgetInstanceId,d=(null==t||null===(n=t.event.data)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.t_imp)||"",h=(null==t||null===(i=t.event.data)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.impression_pixels)||[],y=(null==t||null===(c=t.event.data)||void 0===c||null===(s=c.content)||void 0===s?void 0:s.impression_scripts)||[],g=(null==t||null===(u=t.event.data)||void 0===u||null===(l=u.content)||void 0===l?void 0:l.impression_tags)||[];new q(F,f,t.event.data.el,d,h,y,g,null===(p=t.event.data.content)||void 0===p?void 0:p.ad_impression_timing),z[f].isWidgetEmpty=!1}}catch(t){W.debug("Error running contentDidRender hook",t)}}};function J(t){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function V(t){return function(t){if(Array.isArray(t))return $(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(r),!0).forEach((function(e){K(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function K(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Z(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){X(i,n,o,a,c,"next",t)}function c(t){X(i,n,o,a,c,"throw",t)}a(void 0)}))}}function tt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function et(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rt(t,e){return(rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=it(t);if(e){var o=it(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ot(this,r)}}function ot(t,e){return!e||"object"!==J(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function it(t){return(it=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var at=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rt(t,e)}(h,t);var e,r,n,o,i,a,c,s,l,p,f,d=nt(h);function h(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return tt(this,h),(r=d.call(this,e)).id=t,r.opts=n,r.postCounter=0,r.events=[],r.eventListeners=[],r.plugins=r.opts.plugins&&Array.isArray(r.opts.plugins)?r.opts.plugins:[],r.plugins.unshift(G),r}return e=h,(r=[{key:"pluginEventListener",value:(f=Z(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:W.debug("Plugin event received: %s %o",e,r),t.t0=e,t.next="loadContent"===t.t0?4:9;break;case 4:return t.next=6,this.fetchData();case 6:return(n=t.sent)&&n.content&&this.renderPosts(n.content),t.abrupt("return");case 9:return t.abrupt("return");case 10:case"end":return t.stop()}}),t,this)}))),function(t,e){return f.apply(this,arguments)})},{key:"lifecycleHook",value:(p=Z(regeneratorRuntime.mark((function t(e){var r,n,o,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},this.events.push({name:e,data:r,timestamp:(new Date).toISOString()}),n=[],Array.isArray(this.eventListeners)&&(o=Y(Y({},this.getPluginContext()),{},{event:{name:e,data:r}}),this.eventListeners.forEach((function(t){"function"==typeof t[e]&&n.push(t[e].call(t,o))}))),t.next=6,Promise.all(n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getPluginContext",value:function(){return{emit:this.pluginEventListener.bind(this),widgetInstanceId:this.instanceId,widgetSelector:this.targetSelector,widgetId:this.id}}},{key:"registerPlugin",value:(l=Z(regeneratorRuntime.mark((function t(e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=Z(regeneratorRuntime.mark((function t(n){var o,i,a,c,s,u,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.lifecycleHook("pluginWillLoad",{plugin:e}),!e.link||null===(o=e.type)||void 0===o||!o.startsWith("script:")){t.next=16;break}if(c=null===(a=e.type)||void 0===a?void 0:a.slice("script:".length),window[c]&&"function"!=typeof window[c]){t.next=14;break}return t.prev=4,s=new N({src:e.link,global:c}),t.next=8,s.load();case 8:i=t.sent,t.next=14;break;case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return");case 14:t.next=17;break;case 16:i=function(){return Y({},e)};case 17:return u=Y({options:e.options},r.getPluginContext()),i&&"function"==typeof i&&(l=i.call(i,u),r.eventListeners.push(l)),r.lifecycleHook("pluginDidLoad",{plugin:e}),t.abrupt("return",n());case 21:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(t){return l.apply(this,arguments)})},{key:"loadPluginsAndWait",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return new Promise(function(){var n=Z(regeneratorRuntime.mark((function n(o){var i,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=setTimeout((function(){W.debug("Load plugins took too long"),o()}),r),a=t.map(e.registerPlugin.bind(e)),n.next=4,Promise.all(a);case 4:clearTimeout(i),o();case 6:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}())}},{key:"initialize",value:(s=Z(regeneratorRuntime.mark((function t(){var e,r,n,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=(u.getDataAttributeValue(this.targetSelector,"data-strossle-context")||"").split(",").filter(Boolean),this.opts.context&&Array.isArray(this.opts.context)?this.opts.context=this.opts.context.concat(e):this.opts.context=e,this.opts.context=V(new Set(this.opts.context)),t.prev=4,this.plugins=this.plugins.filter((function(t){var e;return!(null!=t&&null!==(e=t.type)&&void 0!==e&&e.includes("vlyby"))})),this.privateMethods.loadPlugins(this.plugins.filter((function(t){return t.link&&["css","script"].includes(t.type)}))),t.next=9,this.loadPluginsAndWait(this.plugins);case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(4);case 13:if(!this.id){t.next=23;break}return t.prev=14,t.next=17,this.fetchData();case 17:r=t.sent,t.next=23;break;case 20:t.prev=20,t.t1=t.catch(14);case 23:if(r||this.opts.content){t.next=25;break}return t.abrupt("return");case 25:if(n=r&&r.widget&&r.widget.settings?JSON.parse(r.widget.settings):{},this.opts.design&&"object"===J(this.opts.design)&&(n.designSettings=Object.assign({},n.designSettings,this.opts.design)),o=r&&r.content?r.content:{posts:[]},this.opts&&this.opts.content&&this.opts.content.posts&&Array.isArray(this.opts.content.posts)&&(o.posts=this.opts.content.posts),this.widgetSettings=n,!n.plugins||!n.plugins.length){t.next=43;break}if(this.privateMethods.loadPlugins(n.plugins.filter((function(t){return t.link&&["css","script"].includes(t.type)}))),t.prev=32,i=n.plugins.filter((function(t){var e;return t.link&&(null==t||null===(e=t.type)||void 0===e?void 0:e.startsWith("script:"))})),!Array.isArray(i)||!i.length){t.next=37;break}return t.next=37,this.loadPluginsAndWait(i);case 37:t.next=42;break;case 39:t.prev=39,t.t2=t.catch(32),W.debug("Error while loading remote plugins",t.t2);case 42:this.plugins=[].concat(V(this.plugins),V(n.plugins));case 43:return u.applyCSSFromStringToSiteHead(n.designSettings.widgetCSS),t.next=46,this.lifecycleHook("widgetWillRender",{content:o,settings:n,widget:{t_imp:o.t_imp,t_load:o.t_load,t_emp:o.t_emp},metadata:{contentCount:o.posts.length}});case 46:if(!r||!r.html){t.next=51;break}return t.next=49,this.renderHtml(n,o,r.html);case 49:t.next=53;break;case 51:return t.next=53,this.renderRegular(n,o);case 53:return t.next=55,this.lifecycleHook("widgetDidRender");case 55:t.next=60;break;case 57:t.prev=57,t.t3=t.catch(0);case 60:case"end":return t.stop()}}),t,this,[[0,57],[4,11],[14,20],[32,39]])}))),function(){return s.apply(this,arguments)})},{key:"fetchData",value:(c=Z(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.id){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.privateMethods.buildWidgetServerURL(this.id,this.opts);case 4:return e=t.sent,t.next=7,this.privateMethods.getWidgetData(e);case 7:return r=t.sent,t.next=10,this.lifecycleHook("widgetDataLoaded",r);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"renderHtml",value:(a=Z(regeneratorRuntime.mark((function t(e,r,n){var o,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{o=u.createElementFromString(n),document.querySelector(this.targetSelector).appendChild(o),o.querySelectorAll(".strossle-post").forEach((function(t){var e=t.getAttribute("data-id"),r=t.getAttribute("data-type"),n=t.getAttribute("data-link");if("ad"===r&&i.adBlockerInUse)try{var o=btoa(encodeURIComponent(n));n=i.adBlockRedirectUrl+encodeURIComponent(o)+"&b64=1"}catch(t){n=i.adBlockRedirectUrl+n}JSON.parse(t.getAttribute("data-third-party-link")),t.getAttribute("data-track-impression");var a=JSON.parse(t.getAttribute("data-click-pixels")),c=t.getAttribute("data-track-click");I.preparePostClickEvent(t,c,a),u.wrapPostInATag(t,n),"ad"===t.getAttribute("data-type")&&"overlay"===t.getAttribute("data-ad-type")&&i.setupOverlay(e,n,t)})),r.posts.length<1&&this.opts&&this.opts.passbackUrl&&"string"==typeof this.opts.passbackUrl&&u.loadScript(this.opts.passbackUrl,this.targetSelector)}catch(t){}case 1:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return a.apply(this,arguments)})},{key:"renderRegular",value:(i=Z(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.privateMethods.generateWrapperElement(e.designSettings.widgetWrapperTemplate,this.targetSelector),r.posts.length&&(e.designSettings.widgetHeaderTemplate&&this.privateMethods.appendWidgetHeader(e.designSettings.widgetHeaderTemplate,e.designSettings.widgetHeaderText,n),this.privateMethods.appendPostsEnd(this.instanceId,n),e.designSettings.widgetFooterTemplate&&this.privateMethods.appendWidgetFooter(e.designSettings.widgetFooterTemplate,n)),t.next=5,this.renderPosts(r);case 5:r.posts.length<1&&this.opts&&this.opts.passbackUrl&&"string"==typeof this.opts.passbackUrl&&u.loadScript(this.opts.passbackUrl,this.targetSelector),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])}))),function(t,e){return i.apply(this,arguments)})},{key:"renderPosts",value:(o=Z(regeneratorRuntime.mark((function t(e){var r,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.widgetSettings,e.posts.forEach((function(t,e){n.lifecycleHook("contentWillRender",{content:JSON.parse(JSON.stringify(t))});var o=u.createElementFromString(n.privateMethods.generatePostElement(t,r.designSettings.widgetPostTemplate,r.designSettings.contentLabels,n.adBlockerInUse,n.adBlockRedirectUrl));if(t.retouch_mark&&"string"==typeof t.retouch_mark){var i=o.querySelector('[class^="post-image-container-"]');n.applyRetouchMark(i,t.retouch_mark)}if(t.logo&&t.logo.src){var a=o.querySelector('[class^="post-image-container-"]');n.applyLogo(a,t.logo)}var c=u.wrapPostInATag(o,t.url),s=document.getElementById("strossle-posts-end-".concat(n.instanceId));s.parentNode.insertBefore(c,s),I.preparePostClickEvent(c,t.t_click,t.click_pixels),c.addEventListener("click",(function(){n.lifecycleHook("onContentClick",{content:JSON.parse(JSON.stringify(t))})})),"ad"===t.type&&"overlay"===t.ad_type&&n.setupOverlay(t.id,t.url,o),n.lifecycleHook("contentDidRender",{content:JSON.parse(JSON.stringify(t)),el:o})}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"applyRetouchMark",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dark_top_left";if(t&&e){var r="string"==typeof e?e.split(/-|_/):[],n=r.length>0?r[0]:"dark",o=r.length>1?r[1]:"top",i=r.length>2?r[2]:"left",a="https://assets.strossle.com/images/retouch-mark-".concat(n,".png"),c=u.createElementFromString('<div class="retouch-mark"></div>');c.style.position="absolute",c.style.width="15%",c.style.paddingTop="15%",c.style.margin="10px",c.style.boxSizing="border-box",c.style.background="url(".concat(a,")"),c.style.backgroundRepeat="none",c.style.backgroundSize="cover",c.style.zIndex="1000",c.style[o]="0",c.style[i]="0",t.prepend(c)}}},{key:"applyLogo",value:function(t,e){if(t&&e){var r="string"==typeof e.position?e.position.toLowerCase().split(/[-_]/):[],n=r.length>0?r[0]:"bottom",o=r.length>1?r[1]:"right",i=e.size||0,a=["width","height"].includes(e.side)?e.side:"width",c=e.opacity||0,s=document.createElement("img");s.src=e.src,s.style.position="absolute",s.style.zIndex="1001",s.style[n]="0",s.style[o]="0",s.style[a]="".concat(i,"%"),s.style.opacity=c,t.append(s)}}},{key:"setupOverlay",value:function(t,e,r){var n={id:t,url:e};r.firstChild.removeAttribute("target");var o="".concat("https://assets.strossle.com/strossle-widget-sdk/1","/plugins/overlay.js"),i=document.getElementsByTagName("body");i&&i.length&&i[0].addEventListener("strossleOverlay",(function(t){return t.detail.loadOverlay(n,r)})),v.a.getItem("overlayPluginLoaded")||(v.a.setItem("overlayPluginLoaded",!0),u.loadScript(o))}}])&&et(e.prototype,r),n&&et(e,n),h}(A);function ct(t){return(ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function lt(t,e){return(lt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=dt(t);if(e){var o=dt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ft(this,r)}}function ft(t,e){return!e||"object"!==ct(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function dt(t){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ht=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lt(t,e)}(c,t);var e,r,n,o,i,a=pt(c);function c(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,null,t.widgetTargetSelector,{content:t.widgetContent,plugins:t.plugins,design:{widgetHeaderTemplate:t.widgetHeaderTemplate,widgetHeaderText:t.widgetHeaderText,widgetWrapperTemplate:t.widgetWrapperTemplate,widgetPostTemplate:t.widgetPostTemplate,widgetFooterTemplate:t.widgetFooterTemplate,widgetCSS:t.widgetCSS,contentLabels:t.contentLabels}})}return e=c,(r=[{key:"render",value:(o=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.initialize();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0);case 8:case"end":return t.stop()}}),t,this,[[0,5]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){st(i,r,n,a,c,"next",t)}function c(t){st(i,r,n,a,c,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})}])&&ut(e.prototype,r),n&&ut(e,n),c}(at);function yt(t){try{return new URLSearchParams(window.location.search).get(t)||localStorage.getItem(t)}catch(t){}}function gt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gt(i,n,o,a,c,"next",t)}function c(t){gt(i,n,o,a,c,"throw",t)}a(void 0)}))}}var vt="https://cdn.mgid.com/js/azerion/widgets_mapping.json";function bt(t,e){return wt.apply(this,arguments)}function wt(){return(wt=mt(regeneratorRuntime.mark((function t(e,r){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,St(e);case 4:if(n=t.sent){t.next=7;break}return t.abrupt("return");case 7:return(o=document.createElement("div")).dataset.type="_mgwidget",o.dataset.widgetId=n.wId,o.dataset.token=n.token,n.preview&&(o.dataset.preview=!0),r.appendChild(o),Pt(r,n.sId),Rt(),t.abrupt("return",!0);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function St(t){return kt.apply(this,arguments)}function kt(){return(kt=mt(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xt();case 2:if(r=t.sent,!(n=r[e])){t.next=8;break}if(n.preview="true"===yt("_mgid_preview"),!n.migrated&&!n.preview){t.next=8;break}return t.abrupt("return",n);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xt(){return _t.apply(this,arguments)}function _t(){return(_t=mt(regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=sessionStorage.getItem("mgid_mapping"))){t.next=9;break}return t.prev=2,t.abrupt("return",JSON.parse(e));case 6:t.prev=6,t.t0=t.catch(2),sessionStorage.removeItem("mgid_mapping");case 9:return t.prev=9,t.next=12,fetch(vt);case 12:if((r=t.sent).ok){t.next=15;break}throw new Error("Failed to fetch mapping");case 15:return t.next=17,r.json();case 17:return n=t.sent,Array.isArray(n)&&(n=n[0]),n.hasOwnProperty("data")&&(n=n.data),"string"==typeof n&&(n=JSON.parse(n)),sessionStorage.setItem("mgid_mapping",JSON.stringify(n)),t.abrupt("return",n);case 25:return t.prev=25,t.t1=t.catch(9),console.error("Error fetching MGID mapping:",t.t1),t.abrupt("return",{});case 29:case"end":return t.stop()}}),t,null,[[2,6],[9,25]])})))).apply(this,arguments)}var Et={};function Pt(t,e){if(!Et[e]){var r=document.createElement("script");r.src="https://jsc.native.azerion.com/site/"+e+".js",t.appendChild(r),Et[e]=!0}}function Rt(){var t,e;(t=window)[e="_mgq"]=t[e]||[],t[e].push(["_mgc.load"])}function At(t,e,r){return(At=Ot()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&It(o,r.prototype),o}).apply(null,arguments)}function Ot(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function It(t,e){return(It=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jt(t){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tt(t){return function(t){if(Array.isArray(t))return Ct(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ct(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ct(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var Ut={requeue:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];setTimeout((function(){Nt.Queue.apply(Nt,e)}),200)},initializeAndRenderWidgetWhenNearView:function(t,e,r,n){return(o=regeneratorRuntime.mark((function o(){var i,a,c,s,l,p,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=document.querySelector(e)){o.next=3;break}return o.abrupt("return",Ut.requeue.apply(Ut,Tt(r)));case 3:if("object"===jt(r[2])&&void 0!==r[2].pageSessionId&&v.a.setItem("strosslePageSessionId",r[2].pageSessionId),c="true"===yt("force_strossle"),o.t0=!c,!o.t0){o.next=10;break}return o.next=9,bt(t,a);case 9:o.t0=o.sent;case 10:if(!o.t0){o.next=12;break}return o.abrupt("return");case 12:if(!t){o.next=19;break}return I.buildAndSendLoadEvent(t),o.next=16,at.getWidgetSiteSettings(t);case 16:s=o.sent,o.next=20;break;case 19:s={is_lazy_loading_enabled:!0,lazy_loading_value_px:400};case 20:null!==(i=s)&&void 0!==i&&i.is_lazy_loading_enabled?(p=parseInt(null===(l=s)||void 0===l?void 0:l.lazy_loading_value_px),isNaN(p)&&(p=400),f=setInterval((function(){u.isElementInView(a,p)&&(n(),clearInterval(f))}),100)):n();case 21:case"end":return o.stop()}}),o)})),function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){Lt(i,r,n,a,c,"next",t)}function c(t){Lt(i,r,n,a,c,"throw",t)}a(void 0)}))})();var o}},Nt={Queue:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];1===e.length&&1===e.filter((function(t){return t&&"object"===jt(t)})).length?Ut.initializeAndRenderWidgetWhenNearView(null,e[0].widgetTargetSelector,e,(function(){return At(ht,e).render()})):e.length>1&&2===e.filter((function(t){return t&&"string"==typeof t})).length&&Ut.initializeAndRenderWidgetWhenNearView(e[0],e[1],e,(function(){return At(at,e).initialize()}))}};e.a=Nt},,,,function(t,e,r){var n=r(9),o=r(10);t.exports=function(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var c=0;c<16;++c)e[i+c]=a[c];return e||o(a)}},,function(t,e,r){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){"use strict";var r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var p={};function f(){}function d(){}function h(){}var y={};y[i]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&n.call(m,i)&&(y=m);var v=h.prototype=f.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,r){var o;this._invoke=function(i,a){function c(){return new r((function(o,c){!function o(i,a,c,s){var u=l(t[i],t,a);if("throw"!==u.type){var p=u.arg,f=p.value;return f&&"object"===e(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){o("next",t,c,s)}),(function(t){o("throw",t,c,s)})):r.resolve(f).then((function(t){p.value=t,c(p)}),(function(t){return o("throw",t,c,s)}))}s(u.arg)}(i,a,o,c)}))}return o=o?o.then(c,c):c()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=v.constructor=h,h.constructor=d,d.displayName=s(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,c,"GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},b(w.prototype),w.prototype[a]=function(){return this},t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(v),s(v,c,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(8)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);t.exports=function(){return r(n),n}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);t.exports=function(t,e){var n=e||0,o=r;return[o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],"-",o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]],o[t[n++]]].join("")}},,,,,,,function(t,e,r){"use strict";r.r(e);r(7);var n=r(1),o=r(5),i=r.n(o),a=r(0);function c(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var u="strossle";!function(t){if(!t.Strossle){a.a.setItem("strosslePageSessionId",i()()),t[u]||(t[u]=t[u]||function(){([u].q=[u].q||[]).push(arguments)});for(var e=t[u].q||[];e.length;){var r=e.shift();n.a.Queue.apply(n.a,c(r))}t[u]=n.a.Queue}}(window)}]);