/*! For license information please see frontend.min.js.LICENSE.txt */ !function(){function t(r){return t="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(r)}function r(){"use strict";r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:k(t,e,c)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};l(L,u,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(I([])));E&&E!==o&&i.call(E,u)&&(L=E);var S=x.prototype=w.prototype=Object.create(L);function O(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function j(r,e){function n(o,a,c,u){var s=p(r[o],r,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==t(l)&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(l).then((function(t){f.value=t,c(f)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=T(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?m:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}!function(t,e,o){var i,a=function(){var t=n(r().mark((function t(n){var i,a;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=n.querySelector(".ginput_recaptchav3 .gfield_recaptcha_response"))&&!i.value.length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.execute(o.site_key,{action:"submit"});case 5:(a=t.sent).length&&"string"==typeof a&&(i.value=a);case 7:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();i=!1,document.addEventListener("gform/postRender",(function(e){i||(i=!0,t.utils.addAsyncFilter("gform/ajax/pre_ajax_validation",function(){var t=n(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a(e.form);case 2:return t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}()),t.utils.addAsyncFilter("gform/submission/pre_submission",function(){var e=n(r().mark((function e(n){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.submissionType!==t.submission.SUBMISSION_TYPE_SUBMIT&&n.submissionType!==t.submission.SUBMISSION_TYPE_NEXT||n.abort){r.next=4;break}return r.next=4,a(n.form);case 4:return r.abrupt("return",n);case 5:case"end":return r.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()))}))}(gform,grecaptcha,gforms_recaptcha_recaptcha_strings)}();; !function(){"use strict";var e=window.wp.i18n,t={};function n(){return t}function a(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function i(e){o(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===r(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function u(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var s={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function d(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var l={date:d({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:d({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:d({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},m={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function h(e){return function(t,n){var a;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):r;a=e.formattingValues[o]||e.formattingValues[r]}else{var i=e.defaultWidth,u=null!=n&&n.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[i]}return a[e.argumentCallback?e.argumentCallback(t):t]}}var f={ordinalNumber:function(e,t){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:h({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:h({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:h({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:h({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:h({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function c(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;var i,u=o[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(g.matchPattern);if(!n)return null;var a=n[0],r=e.match(g.parsePattern);if(!r)return null;var o=g.valueCallback?g.valueCallback(r[0]):r[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(a.length)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},y={code:"en-US",formatDistance:function(e,t,n){var a,r=s[e];return a="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},formatLong:l,formatRelative:function(e,t,n,a){return m[e]},localize:f,match:v,options:{weekStartsOn:0,firstWeekContainsDate:1}},b=6e4,w=1440,p=30*w,M=365*w;function S(e,t){return o(1,arguments),function(e,t,r){var s,d,l;o(2,arguments);var m=n(),h=null!==(s=null!==(d=null==r?void 0:r.locale)&&void 0!==d?d:m.locale)&&void 0!==s?s:y;if(!h.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var f=function(e,t){o(2,arguments);var n=i(e),a=i(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}(e,t);if(isNaN(f))throw new RangeError("Invalid time value");var c,g,v=u(u({},r),{addSuffix:Boolean(null==r?void 0:r.addSuffix),comparison:f});f>0?(c=i(t),g=i(e)):(c=i(e),g=i(t));var S,W=String(null!==(l=null==r?void 0:r.roundingMethod)&&void 0!==l?l:"round");if("floor"===W)S=Math.floor;else if("ceil"===W)S=Math.ceil;else{if("round"!==W)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");S=Math.round}var P,D=g.getTime()-c.getTime(),k=D/b,x=(D-(a(g)-a(c)))/b,j=null==r?void 0:r.unit;if("second"===(P=j?String(j):k<1?"second":k<60?"minute":k time"),P=()=>W.forEach((t=>{var n;const a=t,u=null!==(n=t.getAttribute("datetime"))&&void 0!==n?n:"";if(!u)return;const s=new Date(u);(function(e){if(o(1,arguments),!function(e){return o(1,arguments),e instanceof Date||"object"===r(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=i(e);return!isNaN(Number(t))})(s)&&(a.textContent=(t=>{let n=S(t,{addSuffix:!0,roundingMethod:"floor"});return n.includes("second")?(0,e.__)("Just now","mediaco"):((n.includes("month")||n.includes("year"))&&(n=S(t,{addSuffix:!0,roundingMethod:"floor",unit:"day"})),n.replace(/^(\d+)(\s([a-z])[a-z]+)/,"$1$3"))})(s))}));P(),setInterval(P,6e4)}();; /*! This file is auto-generated */ !function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.7",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},qn=Pn(r),r=Pn(An(r)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,t,r,e,u){return e instanceof t?(e=En(n.prototype),o(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,o){function i(){for(var n=0,t=o.length,r=Array(t),e=0;e= self.timeLimit ); } ) ); }, onTick: function() { var idsOverLimit, self = this; if ( ! this.isViewportActive ) { return; } _.each( this.idsVisible, function( elementId ) { if ( 'undefined' === typeof self.idsViewTime[ elementId ] ) { self.idsViewTime[ elementId ] = 0; } self.idsViewTime[ elementId ] += 1; } ); idsOverLimit = this.idsOverLimit(); if ( idsOverLimit.length ) { _.each( idsOverLimit, function( elementId ) { self.idsViewTime[ elementId ] = 0; } ); this.onLimitCallback( idsOverLimit ); } }, onIntersecting: function( entries ) { let self = this; _.each( entries, function( entry ) { if ( entry.isIntersecting && entry.intersectionRatio >= 0.5 ) { if ( -1 === self.idsVisible.indexOf( entry.target.id ) ) { self.idsVisible.push( entry.target.id ); } } else { self.idsVisible = _.without( self.idsVisible, entry.target.id ); } } ); } }; ; /* global ioneAdsConfig, ioneViewTimeTracker */ ( function () { /** * Asynchronously load a script by url. * * @param {string} url Url to load. */ const loadScript = function ( url ) { const script = document.createElement( 'script' ); script.src = url; script.type = 'text/javascript'; script.async = true; document.body.appendChild( script ); }; /** * Amazon A9 bootstrap. */ const loadAPS = function () { ! function (a9, a, p, s, t, A, g) {if (a[a9]) return;function q(c, r) {a[a9]._Q.push([c, r])}a[a9] = {init: function () {q("i", arguments)},fetchBids: function () {q("f", arguments)},setDisplayBids: function () {},targetingKeys: function () {return []},_Q: []};A = p.createElement(s);A.async = !0;A.src = t;g = p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A, g)}("apstag", window, document, "script", "//c.amazon-adsystem.com/aax2/apstag.js"); }; /** * OpenWrap bootstrap. */ const loadPWT = function () { const purl = window.location.href; const url = '//ads.pubmatic.com/AdServer/js/pwt/161483/7379'; let profileVersionId = ''; if ( purl.indexOf( 'pwtv=' ) > 0 ) { const regexp = /pwtv=(.*?)(&|$)/g; const matches = regexp.exec( purl ); if ( matches.length >= 2 && matches[ 1 ].length > 0 ) { profileVersionId = '/' + matches[ 1 ]; } } const wtads = document.createElement( 'script' ); wtads.async = true; wtads.type = 'text/javascript'; wtads.src = url + profileVersionId + '/pwt.js'; const node = document.getElementsByTagName( 'script' )[ 0 ]; node.parentNode.insertBefore( wtads, node ); }; const timeout = setTimeout( () => { loadScript( 'https://securepubads.g.doubleclick.net/tag/js/gpt.js', true ); window.PWT = null; }, 500 ); window.PWT = { jsLoaded() { clearTimeout( timeout ); loadScript( 'https://securepubads.g.doubleclick.net/tag/js/gpt.js', true ); }, }; loadPWT(); loadAPS(); } )(); var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var ioneAdLoader = { apstagHasInitialized: false, apsPromise: function ( slots ) { if ( this.getQueryVars().hasOwnProperty( 'disableaps' ) ) { console.log( 'A9 DISABLED' ); // eslint-disable-line return; } let self = this; if ( ! this.apstagHasInitialized ) { apstag.init( { pubID: 'f699d784-7fb8-4b13-8909-93bdd4636914', adServer: 'googletag' } ); this.apstagHasInitialized = true; } return new Promise( ( resolve, reject ) => { const a9Slots = []; slots.forEach( function ( item ) { var slot = { slotID: item.getSlotElementId(), slotName: item.getAdUnitPath(), pos: item.getTargeting( 'pos' ) }; var config = self.findConfigByPos( slot.pos ); // At this point, the config should exist. But let's test anyway. if ( null === config ) { return; } slot.sizes = self.isMobile() ? config.sizes.mobile : config.sizes.desktop; if ( slot.sizes.length > 0 ) { a9Slots.push( slot ); } } ); if ( a9Slots.length > 0 ) { apstag.fetchBids( { slots: a9Slots, timeout: 600 }, function ( bids ) { apstag.setDisplayBids(); resolve(); } ); } else { resolve(); } } ); }, /** * Calls bids from OpenWrap. * * @param {Slot[]} slots Array of GPT ad slots to fetch bids for. See https://developers.google.com/publisher-tag/reference#googletag.Slot. * @param {number} timeout Timeout before the request is skipped. * @return {Promise} An openwrap promise when bids are back. */ openWrapPromise: function ( slots, timeout = 2000 ) { if ( 'undefined' === typeof window.PWT ) { return false; } return new Promise( ( resolve ) => { const failSafe = setTimeout( () => { resolve(); }, timeout ); const PWT = window.PWT; PWT.requestBids( PWT.generateConfForGPT( slots ), function ( adUnitsArray ) { PWT.addKeyValuePairsToGPTSlots( adUnitsArray ); PWT.ow_BidsReceived = true; clearTimeout( failSafe ); resolve(); } ); } ); }, getQueryVars: function () { let string = window.location.href; const vars = {}; if ( string.search( /\?/i ) === -1 ) return []; // Store GET params as vars[] const hashes = string.slice( string.indexOf( '?' ) + 1 ).split( '&' ); for( var i = 0; i < hashes.length; i++ ) { const hash = hashes[ i ].split('='); vars[ hash[ 0 ] ] = hash[ 1 ]; } return vars; }, isMobile: function () { return window.innerWidth < ioneAdsConfig.desktopBreakPoint[ 0 ]; }, findConfigByPos: function ( pos ) { const ad = ioneAdsConfig.adConfig.filter( _ad => _ad.targeting.pos === pos ); if ( ad.length > 0 ) { return ad[ 0 ]; } return null; }, refreshAds: function ( slots ) { if ( slots && slots.length > 0 ) { Promise.all( [ this.apsPromise( slots ), this.openWrapPromise( slots ) ] ).then( () => { googletag.pubads().refresh( slots, { changeCorrelator: false } ); } ); } }, viewableTimeObserver: new ioneViewTimeTracker( parseInt( ioneAdsConfig.viewableRefreshInterval ), ( elementIds ) => { const adSlots = ioneAdLoader.adSlots.filter( ( adSlot ) => -1 !== elementIds.indexOf( adSlot.getSlotElementId() ) ); adSlots.forEach( ( adSlot ) => { adSlot.setTargeting( 'refresh', 'yes' ); } ); ioneAdLoader.refreshAds( adSlots ); } ), adSlots: [], init: function () { if ( this.getQueryVars().hasOwnProperty( 'disablegpt' ) ) { console.log( 'GPT DISABLED' ); // eslint-disable-line return; } const self = this; googletag.cmd.push( function () { if ( ! ioneAdsConfig.adConfig ) { console.error( 'ADS NOT CONFIGURED' ); // eslint-disable-line return; } for ( const key in ioneAdsConfig.targeting ) { googletag.pubads().setTargeting( key, ioneAdsConfig.targeting[ key ] ); } googletag.pubads().disableInitialLoad(); googletag.pubads().enableAsyncRendering(); googletag.pubads().enableSingleRequest(); googletag.enableServices(); const divs = document.querySelectorAll( 'div.ione-ad' ); divs.forEach( function ( div, index ) { let adUnit; if ( ! div.dataset.hasOwnProperty( 'pos' ) ) { return; } const config = self.findConfigByPos( div.dataset.pos ); if ( null === config ) { return; } div.id = 'ione-ad-' + index; if ( self.isMobile() ) { adUnit = ioneAdsConfig.baseMobileAdUnit; } else { adUnit = ioneAdsConfig.baseDesktopAdUnit; } if ( config.adUnit ) { adUnit = config.adUnit; } const thisMap = googletag.sizeMapping( ) .addSize( ioneAdsConfig.desktopBreakPoint, config.sizes.desktop ) .addSize( [ 0, 0 ], config.sizes.mobile ) .build(); const slot = googletag.defineSlot( adUnit, [ 1, 1 ], div.id ); slot.setCollapseEmptyDiv( true, false ).addService( googletag.pubads() ); for ( const key in config.targeting ) { slot.setTargeting( key, config.targeting[ key ] ); } slot.defineSizeMapping( thisMap ); self.adSlots.push( slot ); self.viewableTimeObserver.observe( div ); } ); self.refreshAds( self.adSlots ); if ( ! self.getQueryVars().hasOwnProperty( 'disablerefresh' ) && ioneAdsConfig.viewableRefreshInterval > 5 ) { self.viewableTimeObserver.init(); } else { console.log( 'AD REFRESH DISABLED' ); // eslint-disable-line } } ); console.log( `iOne ad network started. Version ${ ioneAdsConfig.pluginVersion }` ); // eslint-disable-line } }; ioneAdLoader.init(); ; var disqus_shortname = countVars.disqusShortname; (function () { var nodes = document.getElementsByTagName('span'); for (var i = 0, url; i < nodes.length; i++) { if (nodes[i].className.indexOf('dsq-postid') != -1 && nodes[i].parentNode.tagName == 'A') { nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('data-dsqidentifier')); url = nodes[i].parentNode.href.split('#', 1); if (url.length == 1) { url = url[0]; } else { url = url[1]; } nodes[i].parentNode.href = url + '#disqus_thread'; } } var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = 'https://' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }()); ;