/*! amazon-dtb-javascript-api - apstag - v7.42.00 - 2019-10-31 20:50:57 */
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=19)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="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};function o(e){var t=e.length,r=void 0,n=void 0;for(e=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);twindow.innerHeight&&(r=200),d.style="background: #eaeded;z-index: 2147483647;bottom: 0;position: fixed !important;display: block !important;left: 0;right: 0;height: "+r+"px;",l.style="cursor: row-resize;height: 2px;position: absolute;top: 0;left: 0;right: 0;background-color: RGBA(0,0,0,0);",d.appendChild(l),f.frameBorder=0,f.marginHeight=0,f.marginWidth=0,f.topMargin=0,f.leftMargin=0,f.scrolling="no",f.allowTransparency=!0,f.id="apstag-debug-iframe",f.src="about:blank",f.style="display: block; width: 100%; height: "+r+"px;",d.appendChild(f),document.body.appendChild(d),f.contentDocument.open(),f.contentDocument.write(t),f.contentDocument.close(),l.addEventListener("mousedown",S)}function b(e){var t=window.innerHeight-e.clientY;return t<200&&(t=200),d.style.height=t+"px",f.style.height=t+"px",t}function h(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1}function S(){(p=document.createElement("div")).style="position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 9999999999;",d.appendChild(p),window.addEventListener("mouseup",v),window.addEventListener("mousemove",y)}function y(e){return b(e),h(e)}function v(e){null!==p&&(d.removeChild(p),p=null),window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",v);var t=b(e);return(0,o.hasLocalStorage)()&&window.localStorage.setItem(i.DEBUG_CONSOLE_HEIGHT_KEY,t),h(e)}function E(){if(!(0,o.hasLocalStorage)())return[];var e=window.localStorage.getItem(i.DEBUG_LOCAL_STORAGE_KEY);null===e||"false"===e?e="[]":"true"===e&&(e='["fake_bids"]');var t=void 0;try{t=JSON.parse(e)}catch(e){}return(0,o.isArray)(t)||(t=[]),t.filter(function(e){return-1!==i.VALID_DEBUG_MODES.indexOf(e)})}function O(e){return(0,o.inArray)(E(),e)}function I(e,t){if(!(0,o.hasLocalStorage)())return!1;if(-1===i.VALID_DEBUG_MODES.indexOf(e))return!1;var r=E();return t&&-1===r.indexOf(e)?r.push(e):t||(r=r.filter(function(t){return t!==e})),0===r.length?window.localStorage.removeItem(i.DEBUG_LOCAL_STORAGE_KEY):window.localStorage.setItem(i.DEBUG_LOCAL_STORAGE_KEY,JSON.stringify(r)),A(),!0}var D=[];function A(){try{E().filter(function(e){return-1===D.indexOf(e)}).forEach(function(e){(0,c.reportError)(new Error("Debug method enabled: "+e),"__error-debug-mode-"+e+"__",!0),D.push(e)})}catch(e){(0,c.reportError)(e,"__error-debug-pixeled__",!0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pixels=t.pixelQueue=void 0,t.sendPixel=l,t.noBidCacheIdPixel=function(e){return l(d()+"p/PH/"+u(e))},t.bidCacheIdPixel=function(e,t){return l(""+d()+e+"/"+u(t))},t.sendPixels=function(){s||(s=!0,a.forEach(l))},t.resetSendPixels=function(){s=!1,t.pixels=c=[],t.pixelQueue=a=[]};var n=r(1),o=r(2),i=r(4),a=t.pixelQueue=[],s=!1,c=t.pixels=[];function u(e){e._tl="aps-tag";var t=JSON.stringify(e);return t=t.replace(/\\.{1}/g,""),encodeURIComponent(t)}function d(){var e=o.store.getState(),t=e.cfg.PIXEL_PATH,r=e.hosts.DEFAULT_AAX_PIXEL_HOST;return""+n.PROTOCOL+r+t}function l(e){if(s){var t=new Image;return t.src=e,c.push(t),t}return a.push(e),e}!0===(0,i.getDebugValue)("exposePixels")&&(window.apstagPixelQueue=a,window.apstagPixelsSent=c)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAmpAmznBidValue=function(e){return"string"==typeof e?e.split("_").pop():""},t.checkAllPossibleBidCacheIds=function(e,t,r){return e.amzniid===t||e[r+"amzniid"]===t||e.amzniid_sp===t},t.isAAXPunt=function(e){return!(0,o.safeObjectHasProp)(e,"slots")},t.getCurrentUrl=function(e){var t=(0,n.getDebugValue)("url");if(null!==t)return encodeURIComponent(t);var r=void 0;try{r=e.top.location.href}catch(e){r=null}if(null===r||!r||void 0===r){r="";try{e.top!==e.self&&(r=e.document.referrer)}catch(e){}}return encodeURIComponent(r)},t.getReferrerUrl=function(e){var t="",r=void 0;try{try{r=e.top.document.referrer}catch(t){r=e.document.referrer}t=encodeURIComponent(r)}catch(t){(0,i.reportError)(t,"__error-getPageReferrerURL__")}return t},t.getApsFirstPartyCookies=function(){var e={cookiesParams:""};return(0,o.getCookieParts)().forEach(function(t){if(t[0]in a.FIRST_PARTY_COOKIE_KEYS)switch(t[0]){case"aps_ext_917":e.fb=t[1];break;case a.RB_AID_COOKIE_KEY:e.cookiesParams+="&"+a.FIRST_PARTY_COOKIE_KEYS[a.RB_AID_COOKIE_KEY].urlParam+"="+a.RB_MAGIC_NUMBER_FOR_AID_PRESENT;break;default:e.cookiesParams+="&"+a.FIRST_PARTY_COOKIE_KEYS[t[0]].urlParam+"="+t[1]}}),e.fb||s.store.getState().sync917||s.store.dispatch({type:"SET_SYNC_917",value:!0}),e},t.getBlockedBidders=function(e){var t=s.store.getState().config.blockedBidders;return(0,o.safeObjectHasProp)(e,"blockedBidders")&&(0,o.isArray)(e.blockedBidders)&&(t=e.blockedBidders),(0,o.isArray)(t)&&(t=JSON.stringify(t)),t},t.getCfgVersion=function(){if(!(0,o.hasLocalStorage)())return a.NO_LOCAL_STORAGE_SUPPORT_MAGIC_NUMBER_FOR_AAX;var e=s.store.getState();return(0,o.safeObjectHasProp)(e,"cfg")&&(0,o.safeObjectHasProp)(e.cfg,"v")?e.cfg.v:null},t.getDisplayAdServerSlots=function(e){var t=[];try{e.hasAdServerObjectLoaded()&&(t=e.getSlots())}catch(e){(0,i.reportError)(e,"getDisplayAdServerSlots")}return t};var n=r(4),o=r(0),i=r(3),a=r(1),s=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.xhrGet=function(e){var t=e.url,r=e.onload,o=e.onerror,i=void 0===o?null:o,a=e.ontimeout,s=void 0===a?null:a,c=e.withCredentials,u=void 0===c?null:c;try{var d=new window.XMLHttpRequest;d.onload=r.bind(null,d),null!==i&&(d.onerror=i),null!==s&&(d.ontimeout=s),null!==u&&(d.withCredentials=u),d.open("GET",t),d.send(null)}catch(e){(0,n.reportError)(e,"__xhrGet__")}},t.loadScriptTag=function(e,t){var r=2Et.MINIMUM_BID_TIMEOUT)return t}catch(e){return(0,It.reportError)(e,"__error-getValidMilliseconds__",!0),!1}return!1}function p(e){return!bt.store.getState().experiments.chunkRequests||0===bt.store.getState().bidReqs[e.split("-")[0]].networkReqs.filter(function(e){return e.inFlight}).length}function g(e,t){!bt.store.getState().bidReqs[e[0]].hasCallbackExecuted&&p(e[0])&&(bt.store.dispatch({type:"RECORD_CALLBACK",fid:e[0]}),t())}function m(e){bt.store.getState().experiments.chunkRequests&&bt.store.dispatch({type:"RECORD_NETWORK_EXCHANGE",fid:e[0],timestamp:Date.now(),exchangeType:"response",networkID:e[1]})}function _(r,n,e){var o=e.split("-"),t={url:r,withCredentials:!0};try{t.onload=function(e){m(o);var t=e.responseText;(0,Rt.isRenderBiddingGetBidsRequest)(r)&&(t=(0,Rt.injectCBForGetBids)(r,t)),eval(t),g(o,n)},t.onerror=function(){m(o),g(o,n)},(0,Tt.xhrGet)(t)}catch(e){(0,It.reportError)(e,"__error-xhrBid__",!0),m(o),g(o,n)}}function S(e){var t=new Date;return t.setTime(t.getTime()+1e3*e),t.toGMTString()}function b(e){if(e[Et.AAX_RESP_REMAP_COOKIE_KEY])try{e[Et.AAX_RESP_REMAP_COOKIE_KEY].forEach(function(e){document.cookie=e.k+"="+e.v+";expires="+(-1!==e.exp?S(e.exp):(0,ht.getUTCStringForDate)(365))+";path=/;"})}catch(e){(0,It.reportError)(e,"__error-setFirstPartyCookies__")}}function y(e){(0,ht.safeObjectHasProp)(e,"cb")&&(bt.store.dispatch({type:"RECORD_AAX_RESPONSE_PROP",bidReqID:e.cb,key:"resTs",value:Date.now()}),bt.store.dispatch({type:"RECORD_AAX_RESPONSE_PROP",bidReqID:e.cb,key:"perf",value:(0,Ot.getResourcePerformanceObject)(window,e.cb)})),(0,ht.safeObjectHasProp)(e,"cfg")&&bt.store.dispatch({type:"SET_CFG",cfg:e.cfg}),f.addTimer("br"),f.set("brs",(0,yt.isAAXPunt)(e)?"0":"1"),(0,ht.safeObjectHasProp)(e,"rm")&&f.schedule(e.to,e.id),ce(e)}function h(e){if(d(e),b(e),(0,ht.safeObjectHasProp)(e,"cfg")&&localStorage.setItem(Et.CFG_LOCAL_STORAGE_KEY,JSON.stringify(e.cfg)),(0,ht.safeObjectHasProp)(e,"st")&&e.st.includes(917)&&bt.store.getState().sync917){bt.store.dispatch({type:"SET_SYNC_917",value:!1});try{k()}catch(e){(0,It.reportError)(e,"__error-doFbSync__")}}v(e),(0,yt.isAAXPunt)(e)||(0,Dt.sendPixels)()}function v(e){if((0,ht.safeObjectHasProp)(e,"fp")){var t=e.fp;(0,ht.safeObjectHasProp)(t,"length")&&t.forEach(function(e){var t=e.d?e.d:0;setTimeout(function(){(0,Dt.sendPixel)(e.s)},t)})}}function E(e,t){function r(t){if(!n){try{e(t),o&&clearTimeout(o)}catch(t){(0,It.reportError)(t,"__error-wrapCallback__",!0)}n=!0}}var n=!1,o=null;return o=setTimeout(r.bind(null,!0),t||bt.store.getState().cfg.DEFAULT_TIMEOUT),r.bind(null,!1)}function O(){bt.store.getState().Q.forEach(function(e){"i"===e[0]?window.apstag.init.apply(null,e[1]):window.apstag.fetchBids.apply(null,e[1])})}function A(e){var t=bt.store.getState().config;return(0,ht.safeObjectHasProp)(t,"pubID")&&(0,ht.safeObjectHasProp)(e,"pubID")&&t.pubID!==e.pubID&&(0,It.reportError)(new Error("`apstag.init` was called multiple times with different pubIDs ("+t.pubID+" then "+e.pubID+")"),"__error-init-multiple-calls__",!0),bt.store.dispatch({type:"SET_GDPR_CONFIG",config:null}),bt.store.dispatch({type:"SET_CONFIG",config:e,defaultCmpTimeout:bt.store.getState().cfg.GDPR_CMP_TIMEOUT}),"success"}function D(){var e=bt.store.getState();return(0,ht.safeObjectHasProp)(e,"config")&&(0,ht.safeObjectHasProp)(e.config,"deals")&&!0===e.config.deals||wt.displayAdServer.needNewBidObject}function I(e){var t=e.slotID;(0,ht.safeObjectHasProp)(e,"mediaType")&&"video"===e.mediaType||wt.displayAdServer.hasAdServerObjectLoaded()&&wt.displayAdServer.isCommandQueueDefined()&&(wt.displayAdServer.hasAdServerObjectLoaded()?T(t)&&M(e):wt.displayAdServer.cmdQueuePush(function(){I(e)}))}function T(e){var t;try{t=(0,yt.getDisplayAdServerSlots)(wt.displayAdServer).filter(function(t){return wt.displayAdServer.getSlotElementId(t)===e})[0]}catch(t){(0,It.reportError)(t,"__error-getAdServerSlot__")}return t}function P(e){try{var t=bt.store.getState().targetingKeys[e];if(wt.displayAdServer.hasAdServerObjectLoaded()&&(0,ht.isArray)(t)){var r=T(e);t.forEach(function(e){0t.rqTs?e:t}))}})}catch(e){(0,It.reportError)(e,"__error-getCurrentSlotBids__")}return e}function L(e,t){return(0,ht.isArray)(bt.store.getState().targetingKeys[e])?t?["amzniid_sp"]:bt.store.getState().targetingKeys[e].filter(function(e){return-1apstag Test Creative":"")+"amzniid - "+e.bidID+" | amznbid: "+e.pp+" | size: "+e.sizes.join("x")+"
";r.src="javascript:'"+o+"'"}else r.src=K(e);e.isAmp?(n.doc=e.doc,n.amzniid=e.bidID,n.slotID="amp",e.isSf&&(0,At.is1x1Creative)(window)&&(0,At.expandSf)(e.sizes,window)):(n=j(e.bidID,e.isSharedPMP).slotBid).doc=e.doc,q(e.doc,r),e.viewabilityParams=e.viewabilityParams||{states:{}},(e.viewabilityParams.iframe=r).onload=function(){e.viewabilityParams.states.iframeLoaded=!0,t&&t()}}catch(e){(0,It.reportError)(e,"__error-loadAdIntoUnfriendlyIframe__",!0)}}function W(e,t){var r,n=e.states,o=e.doc,i=e.bidID,a=e.iframe;Me(n)||(n.shouldRunViewability=!1,(0,ht.safeObjectHasProp)(window,"amzncsm")?r=window.amzncsm:(0,ht.safeObjectHasProp)(o.defaultView,"amzncsm")&&(r=o.defaultView.amzncsm),r&&(0,ht.safeObjectHasProp)(r,"rmD")&&(r.host=(0,vt.getDebugValue)("host",bt.store.getState().hosts.DEFAULT_AAX_PIXEL_HOST),r.rmD(a,i,o.defaultView,o,null,t)))}function $(e){var t=e.map(se),r={};return Object.keys(bt.store.getState().slotBids).forEach(function(e){var n=bt.store.getState().slotBids[e].filter(function(e){return e.bidState===Et.BID_STATES.new})[0];n&&(0,ht.inArray)(t,e)&&(r[e]=n,bt.store.dispatch({type:"BID_STATE_CHANGE",slotID:e,_targetingSetID:n._targetingSetID,bidState:Et.BID_STATES.exposed}))}),r}function Z(e,t){var r="0x0";return D()?{slotID:e,size:r,mediaType:"banner",targeting:{amznbid:t,amzniid:"",amznp:t,amznsz:r},helpers:{targetingKeys:["amznbid","amzniid","amznp","amznsz"]}}:{slotID:e,amzniid:"",amznbid:t,amznp:t,amznsz:r,size:r}}function ee(e,t){var r="";return e.targeting.forEach(function(t){r+="&"+t+"="+e[t]}),!0===t&&(r=encodeURIComponent(r)),r}function te(e,t,r){var n,o=t.slots.filter(Ue).map(se),i=e.map(se);return n=r?o.map(function(e){return Z(e,Et.SLOT_STATES.bidInFlight)}):o.reduce(function(e,t){return(0,ht.inArray)(i,t)||e.push(Z(t,Et.SLOT_STATES.noBid)),e},[]),e.concat(n)}function re(e,t){return function(r){var n=$(t.slots),o=Object.keys(n),i=[];r&&(bt.store.dispatch({type:"RECORD_AAX_RESPONSE_PROP",bidReqID:t.bidReqID,key:"timedOutAt",value:Date.now()}),bt.store.getState().experiments.chunkRequests&&bt.store.dispatch({type:"RECORD_TIMEOUT",fid:t.bidReqID,timeOut:Date.now()})),o.forEach(function(e){if((0,ht.safeObjectHasProp)(n,e)){var t=n[e],r={};if(D())t.meta.forEach(function(e){r[e]=t[e]}),r.targeting={},t.targeting.forEach(function(e){r.targeting[e]=t[e]}),r.helpers={targetingKeys:t.targeting,qsParams:ee.bind(null,t,!1),encodedQsParams:ee.bind(null,t,!0)};else if((0,ht.safeObjectHasProp)(t,"amznbid")){if((0,ht.safeObjectHasProp)(t,"amznp")||(t.amznp=""),r={amzniid:t.amzniid,amznbid:t.amznbid,amznp:t.amznp,slotID:e},(0,ht.safeObjectHasProp)(t,"size")&&(r.size=t.size,r.amznsz=t.amznsz),"video"===t.mediaType){r.mediaType="video";var o="";t.amznbid?o+="&amzniid="+t.amzniid+"&amznbid="+t.amznbid+"&amznp="+t.amznp:(r.amznbid="",r.amzniid=""),t.r_amznbid?(r.r_amznbid=t.r_amznbid,r.r_amzniid=t.r_amzniid,r.r_amznp=t.r_amznp,o+="&r_amzniid="+t.r_amzniid+"&r_amznbid="+t.r_amznbid+"&r_amznp="+t.r_amznp):(r.r_amznbid="",r.r_amzniid="",r.r_amznp=""),r.qsParams=o,r.encodedQsParams=encodeURIComponent(o)}}else r=Z(t.slotID,Et.SLOT_STATES.noBid);i.push(r)}}),wt.displayAdServer.isSupported&&(i=te(i,t,r)),wt.displayAdServer.appendTargeting(i),e(i,{fromTimeout:r})}}function ne(e,t){try{var r;(r=e.defaultView&&e.defaultView.frameElement?e.defaultView.frameElement:window.frameElement).width=t[0],r.height=t[1]}catch(e){(0,It.reportError)(e,"__error-resizeIframe__")}}function oe(e){return e[0]+"x"+e[1]}function ie(e){return 1===e.length?oe(e[0]):oe(e[Math.floor(e.length*Math.random())])}function ae(e,t){var r,n=(0,vt.getDebugValue)("host",bt.store.getState().hosts.DEFAULT_AAX_BID_HOST),o=(0,yt.getCurrentUrl)(window),i=e.bidReqID,a=(0,ht.getWindowDimensions)(window),s=(0,vt.getDebugValue)("testBidTimeout",200);bt.store.dispatch({type:"RECORD_AAX_REQUEST",data:{bidConfig:e,timeout:s,bidReqID:i,ws:a,url:o,rqTs:Date.now()}}),r=e.slots.map(function(e){var t={slotID:e.slotID,amzniid:Et.MOCKBID.amzniid+"-"+(0,ht.getRand)(),amznbid:Et.MOCKBID.amznbid,amznp:Et.MOCKBID.amznp,crid:Et.MOCKBID.crid+"-"+(0,ht.getRand)()};if((0,ht.safeObjectHasProp)(e,"sizes")){var r=ie(e.sizes);t.size=r,t.amznsz=r}else"video"===e.mediaType&&(t.mediaType="video",t.amznbid="v_"+t.amznbid);if(D()){t.mediaType="banner",t.meta=["slotID","mediaType","size"],t.amznbid_sp=Et.MOCKBID.amznbid+"SP",t.amznp_sp=Et.MOCKBID.amznp+"SP",t.amznsz_sp=t.size;var n="testDeal"+(0,ht.getRand)()+"_"+t.size,o="testDealImpression-"+(0,ht.getRand)();t.amzndeal_sp=n,t.amzndeals=[n],t[n+"amzniid"]=o,t.amzniid_sp=o,t.targeting=["amzniid","amznbid","amznp","amznsz","amzniid_sp","amznbid_sp","amznp_sp","amznsz_sp","amzndeal_sp","amzndeals",n+"amzniid"]}return t}),setTimeout(function(){window.apstag.bids({slots:r,host:n,status:"ok",cb:i}),t(!0)},s)}function se(e){return e.slotID}function ce(e){var t=bt.store.getState().AAXReqs.filter(function(t){return t.bidReqID===e.cb})[0];if(t&&t.bidConfig&&t.bidConfig.slots){var r=t.bidConfig.slots.filter(Ue).map(function(e){return e.slotID}),n=(0,ht.safeObjectHasProp)(e,"slots")?e.slots.map(function(e){return e.slotID}):[],o=r.filter(function(e){return!(0,ht.inArray)(n,e)});bt.store.dispatch({type:"NO_BID_ON_ADSERVER_SLOTS",slotIDs:o}),wt.displayAdServer.hasAdServerObjectLoaded()?le():wt.displayAdServer.isCommandQueueDefined()&&wt.displayAdServer.cmdQueuePush(function(){le()})}}function ue(e){return(0,ht.inArray)(bt.store.getState().AAXReqs.filter(function(e){return!e.resTs}).map(function(e){return e.bidConfig.slots}).reduce(function(e,t){return e.concat(t)},[]).map(se),e)}function de(e){var t=wt.displayAdServer.getTargeting("amznbid",e);return 0=i.length&&i.slice(i.length-1)[0].ts>a.slice(i.length-1)[0].ts?1===e[r].fetchWithIID.filter(function(e){return e===n.amzniid}).length?o.state=1:o.state=4:-1!==e[r].fetchWithIID.indexOf(n.amzniid)?o.state=3:o.state=2:o.state=0,1===o.state||2===o.state){var s=bt.store.getState().AAXReqs.filter(function(e){return e.bidReqID===n.bidReqID})[0].resTs,c=Te(s,e[r].fetchedAt,2===o.state);c&&(0,ht.safeObjectHasProp)(c,"ts")&&(o.delta=s-c.ts)}t.push(o)})}),t}function Te(e,t,r){var n=t.map(function(t){var n=e-t.ts;return r?0<=n?n:null:n<=0?-n:null});return t[Pe(n)]}function Pe(e){for(var t,r,n,o=0;o