(window.webpackJsonp=window.webpackJsonp||[]).push([[178,70],{1398:function(t,e,r){var content=r(1806);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(300).default)("77ed291e",content,!0,{sourceMap:!1})},1805:function(t,e,r){"use strict";r(1398)},1806:function(t,e,r){var n=r(299)((function(i){return i[1]}));n.push([t.i,".c-shortcodeBuyButton{width:50%}@media(max-width: 768px){.c-shortcodeBuyButton{flex:0 0 100%;width:unset}}",""]),n.locals={},t.exports=n},2424:function(t,e,r){"use strict";r.r(e);r(7),r(12);var n=r(2),o=r(3),c=r(8),l=r(9),d=r(5),f=(r(17),r(0)),v=r(847),h=r(15),y=r(872),m=r(909);function O(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(d.a)(t);if(e){var o=Object(d.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(l.a)(this,r)}}var j=new h.b("ShortcodeBuyButton"),k=function(t){Object(c.a)(r,t);var e=O(r);function r(){return Object(n.a)(this,r),e.apply(this,arguments)}return Object(o.a)(r,[{key:"buttonLink",get:function(){var t,e=null;try{e=null===(t=JSON.parse(this.api))||void 0===t?void 0:t.url}catch(t){j.log("Unable to parse monetized url.")}return e||this.buttonUrl||this.rawUrl}}]),r}(v.Vue);Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"api",void 0),Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"buttonText",void 0),Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"buttonUrl",void 0),Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"rawUrl",void 0),Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"id",void 0),Object(f.c)([Object(v.Prop)({default:""}),Object(f.f)("design:type",String)],k.prototype,"contentId",void 0);var w=k=Object(f.c)([Object(v.Component)({components:{CommerceBuyButton:y.default},mixins:[m.a]})],k),P=(r(1805),r(147)),component=Object(P.a)(w,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"c-shortcodeBuyButton g-outer-spacing-bottom-large"},[e("CommerceBuyButton",{attrs:{"button-text":t.buttonText,"button-url":t.buttonLink,"has-offer":!t.useReseller,"content-id":t.contentId,"lead-click-data":t.winningOfferTrackingData,"track-product-viewed":!0,"data-location":"LINKS",section:"commerce-button"}})],1)}),[],!1,null,null,null);e.default=component.exports},851:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));r(25);var n=r(384);function o(t){return{bind:t.bind?function(){return t.bind.apply(t,arguments)}:function(){},componentUpdated:t.componentUpdated?function(){return t.componentUpdated.apply(t,arguments)}:function(){},inserted:t.inserted?function(){return t.inserted.apply(t,arguments)}:function(){},unbind:t.unbind?function(){return t.unbind.apply(t,arguments)}:function(){},update:t.update?function(){return t.update.apply(t,arguments)}:function(){}}}function c(t,e){var r=new e;return Object(n.createDecorator)((function(e){e.directives=(null==e?void 0:e.directives)||{},e.directives[t]=o(r)}))}},852:function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(2),o=r(3),c=(r(7),r(33),r(14),r(575),new(r(15).a)("observer")),l=function(){function t(e,r){if(Object(n.a)(this,t),!window.IntersectionObserver)return c.warn("This browser does not support IntersectionObserver"),this;e.rootMargin=e.rootMargin||"0px",e.singleIntersection=!!e.singleIntersection&&e.singleIntersection,e.triggerOn=e.triggerOn?e.triggerOn:"top";try{return this.create(e,r)}catch(t){return c.error("Failed to construct IntersectionObserver: ".concat(t.toString()),e),this}}return Object(o.a)(t,[{key:"create",value:function(t,e){var r=this;if(c.log("create options",t),this.el=t.el,e)return Array.isArray(this.el)&&(this.lastTriggerPosition=[]),this.observer=new IntersectionObserver((function(n,o){n.forEach((function(n){var o,l,d=!0,data=(null==t?void 0:t.data)||{};if(Array.isArray(r.el)){var f=r.el.findIndex((function(t){return t===(null==n?void 0:n.target)})),v=null===(o=r.lastTriggerPosition)||void 0===o?void 0:o[f];d=void 0===v||v>n.boundingClientRect.y,r.lastTriggerPosition[f]=n.boundingClientRect.y,data=(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l[f])||{}}else d=void 0===r.lastTriggerPosition||r.lastTriggerPosition>n.boundingClientRect.y,r.lastTriggerPosition=n.boundingClientRect.y;var h=d?"down":"up",y=!1;if(c.log(h,n),t.singleIntersection?"top"===t.triggerOn?"down"===h&&n.isIntersecting?y=!0:"up"!==h||n.isIntersecting||(y=!0):"bottom"===t.triggerOn&&("down"!==h||n.isIntersecting?"up"===h&&n.isIntersecting&&(y=!0):y=!0):n.isIntersecting&&(y=!0),y){var m={direction:h,data:data,observer:r,entry:n};c.log(h,n,r),e(m)}}))}),t),this.enable(),this;c.warn("No handler specified on Intersection Observer")}},{key:"enable",value:function(){var t=this;this.observer&&this.el&&(Array.isArray(this.el)?this.el.forEach((function(e){t.observer.observe(e)})):this.observer.observe(this.el))}},{key:"disable",value:function(){var t=this;this.observer&&this.el&&(Array.isArray(this.el)?this.el.forEach((function(e){t.observer.unobserve(e)})):this.observer.unobserve(this.el))}},{key:"destroy",value:function(){this.observer&&this.el&&(this.disable(),this.observer.disconnect(),this.observer=null,this.el=null)}},{key:"refresh",value:function(){this.observer&&this.el&&(this.disable(),this.enable())}}]),t}()},854:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));r(7),r(12);var n=r(8),o=r(9),c=r(5),l=r(2),d=r(3),f=r(385);function v(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(c.a)(t);if(e){var l=Object(c.a)(this).constructor;r=Reflect.construct(n,arguments,l)}else r=n.apply(this,arguments);return Object(o.a)(this,r)}}var h=function(){function t(){Object(l.a)(this,t)}return Object(d.a)(t,[{key:"bind",value:function(t,e,r){var n=this,o=e.arg,c=e.value,l=r.context;this.action=function(){var e,r=l.$track(n.eventType);(e="function"==typeof c?r.create(c):r.with(c).create()).trackingData=f.a.replaceAttributeReferences(t,e.trackingData),e.fire()},t.addEventListener(o||"mousedown",this.action)}},{key:"unbind",value:function(t,e){var r=e.arg;e.value;t.removeEventListener(r||"mousedown",this.action)}}]),t}();function y(t){return function(e){Object(n.a)(o,e);var r=v(o);function o(){return Object(l.a)(this,o),r.apply(this,arguments)}return Object(d.a)(o,[{key:"eventType",get:function(){return t}}]),o}(h)}},861:function(t,e,r){"use strict";r.d(e,"a",(function(){return C}));r(12),r(17),r(13),r(28),r(14),r(29);var n=r(4),o=r(2),c=r(3),l=r(36),d=r(8),f=r(9),v=r(5),h=(r(16),r(7),r(0)),y=r(57),m=r(62),O=r(47),j=r(85),k=r(52);function w(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function P(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(v.a)(t);if(e){var o=Object(v.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(f.a)(this,r)}}var C=function(t){Object(d.a)(r,t);var e=P(r);function r(t){var n;return Object(o.a)(this,r),(n=e.call(this,t)).services=["tagular"],n}return Object(c.a)(r,[{key:"defaults",get:function(){return{"@type":"redventures.ecommerce.v1.ProductClicked"}}},{key:"transform",value:function(data){var base=Object(l.a)(Object(v.a)(r.prototype),"transform",this).call(this,data);if(this.additionalData.tagular=base,data.outboundUrl){var t=data.actionOutcome||this.getLinkActionOutcome(data.outboundUrl);"INTERNALLINK"===t&&data.outboundUrl===k.a.getPath(data.outboundUrl)&&(data.outboundUrl=k.a.liveUrl(data.outboundUrl)),data.actionOutcome=t}return data.customDimensions&&(data.customDimensions=data.customDimensions.filter((function(t){return t.value}))),this.additionalData.tagular=function(t){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:l,n=t;if(t.includes(e)){t=t.replace(/(dtp|mwb)-oo/,"$1");var o=new RegExp(e,"g");return t.replace(o,r[0])}return n},y=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,n=t;if(t.includes(r[0])||t.includes(r[1])){var o=new RegExp("(".concat(r.join("|"),")"),"g");return t.replace(o,e)}return n},m=function(t,e){var r=t;try{c.log("Original commerce URL: ",r);var n=t.includes("amazon.com"),h=t.startsWith("https://amazon")||t.startsWith("https://www.amazon"),y=function(t){var e="dtp";return t.device===o.b.Mobile&&(e="mwb"),e}(e),m=function(t){var e,r,n,o;return(null===(e=t.topicPaths)||void 0===e?void 0:e.includes("home-internet"))?"cb":(null===(r=t.topicPaths)||void 0===r?void 0:r.includes("home-energy-and-utilities"))?"ce":(null===(n=t.topicPaths)||void 0===n?void 0:n.includes("personal-finance"))?"cm":(null===(o=t.topicPaths)||void 0===o?void 0:o.includes("sleep"))?"cs":"cn"}(e),O=m+"-"+l[0]+"-"+y,j=!1;if((t=h?"https://assoc-redirect.amazon.com/g/r/"+t:t).includes("[subid_value]")?(t=t.replace("[subid_value]",O),j=!0):t.includes("subid_value")&&(t=t.replace("subid_value",O),j=!0),t.includes(d)){var k=encodeURIComponent("https://www.cnet.com"+e.canonicalPath);t=t.replace(d,k)}if(t.includes(f)){var w=encodeURIComponent(e.articleName);t=t.replace(f,w)}var P=new URL(t),C=P.searchParams;if(n){var _=l[0]+"|"+e.guid+"|"+y+"|"+m;C.delete("tag"),C.append("tag","cnet-buy-button-20"),C.delete("ascsubtag"),C.append("ascsubtag",_),j=!0}var R=v[P.host];!j&&R&&C.append(R,O);var U=P.toString();return c.log("Modified Commerce URL: ",U),U}catch(e){return c.error("could not construct URL: '".concat(t,"' "),e),r}}},872:function(t,e,r){"use strict";r.r(e),r.d(e,"CommerceBuyButton",(function(){return S}));var n=r(4),o=(r(12),r(2)),c=r(3),l=r(8),d=r(9),f=r(5),v=(r(18),r(7),r(33),r(78),r(14),r(19),r(43),r(50),r(0)),h=r(847),y=r(851),m=r(861),O=r(875),j=r(385),k=r(854),w=r(852),P=(r(30),r(65),r(873),r(124),r(167),r(181)),C=r(15),_=r(871);function R(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(f.a)(t);if(e){var o=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(d.a)(this,r)}}var U=new C.b("commerceUrlModifier"),D=function(t){Object(l.a)(r,t);var e=R(r);function r(){var t;return Object(o.a)(this,r),(t=e.apply(this,arguments)).modifiedCommerceUrl="",t.performanceConsentGranted=!1,t._uuid="",t.stateMappings={articleName:t.$store.getters["tracking/data"].articleTitle,canonicalPath:t.$store.getters["routeHistory/getCurrentPath"],device:t.$store.getters.device,guid:t.$store.getters["tracking/viewGuid"]||"-",topicPaths:t.$store.getters["tracking/dataByKey"]("primaryTopics")},t}return Object(c.a)(r,[{key:"originalUrl",get:function(){return""}},{key:"checkCohesionConsent",value:function(){var t,e;"function"==typeof(null===(t=null===window||void 0===window?void 0:window.cohesion)||void 0===t?void 0:t.consent)?this.performanceConsentGranted=null===(e=window.cohesion.consent("list"))||void 0===e?void 0:e.includes("C0002"):this.performanceConsentGranted=!1}},{key:"injectCorrelationId",value:function(t){var e=this;if(this._uuid=this.performanceConsentGranted?Object(P.v4)().replaceAll("-",""):this.$store.getters["tracking/data"].contentId.replaceAll("-",""),this.modifiedCommerceUrl=Object(_.c)(t,this._uuid),!this.performanceConsentGranted){var r=new RegExp(this._uuid+"-(dtp|mwb)","g");this.modifiedCommerceUrl=this.modifiedCommerceUrl.replace(r,"$&-oo")}U.log("Button click, consent status: ".concat(this.performanceConsentGranted)),setTimeout((function(){return e.resetCommerceUrl(e.modifiedCommerceUrl)}),500)}},{key:"resetCommerceUrl",value:function(t){this.modifiedCommerceUrl=Object(_.d)(t,this._uuid)}},{key:"created",value:function(){this.modifiedCommerceUrl=this.originalUrl}},{key:"beforeMount",value:function(){this.updateModifiedCommerceUrl()}},{key:"mounted",value:function(){var t=this;window.cohesion&&window.cohesion("ready",(function(){window.cohesion("consent:ready",(function(){t.checkCohesionConsent(),U.log("Initial consent: ".concat(t.performanceConsentGranted))})),window.cohesion("consent:changed",(function(){t.checkCohesionConsent(),U.log("Consent changed: ".concat(t.performanceConsentGranted))}))}))}},{key:"updateModifiedCommerceUrl",value:function(){this.originalUrl&&(this.modifiedCommerceUrl=Object(_.b)(this.originalUrl,this.stateMappings))}}]),r}(h.Vue);Object(v.c)([Object(h.Watch)("originalUrl"),Object(v.f)("design:type",Function),Object(v.f)("design:paramtypes",[]),Object(v.f)("design:returntype",void 0)],D.prototype,"updateModifiedCommerceUrl",null);var I=D=Object(v.c)([h.Component],D),x=r(885);function T(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(f.a)(t);if(e){var o=Object(f.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(d.a)(this,r)}}var S=function(t){Object(l.a)(r,t);var e=T(r);function r(){return Object(o.a)(this,r),e.apply(this,arguments)}return Object(c.a)(r,[{key:"linkHref",get:function(){return this.buttonHref}},{key:"buttonHref",get:function(){return this.shouldMonetize?this.modifiedCommerceUrl:this.buttonUrl}},{key:"buttonColor",get:function(){return this.$abtest.isUserInActiveTestAndBucket("btncolor_test","test")?"t-ctaAbcolorTest-lime":"o-button-".concat(this.buttonTheme)}},{key:"buttonClasses",get:function(){return"c-commerceBuyButton o-button ".concat(this.buttonColor," o-button-").concat(this.buttonSize," o-button-smallRound")}},{key:"correlationId",get:function(){return this._uuid}},{key:"formatSubType",get:function(){var t=this.isLink?"in-text link":"in-text button";return this.isImage&&(t=null),this.subtype||t}},{key:"originalUrl",get:function(){return this.buttonUrl}},{key:"leadType",get:function(){return this.hasOffer?"manual":"mlst"}},{key:"formatType",get:function(){var t=this.isLink?"LINK":"BUTTON";return this.isImage&&(t="IMAGE"),t}},{key:"productData",get:function(){var t,e,r,n,o,c,l,d;return{brand:(null===(e=null===(t=this.leadClickData)||void 0===t?void 0:t.productManufacturer)||void 0===e?void 0:e.toString())||(null===(r=this.leadClickData)||void 0===r?void 0:r.brand)||null,category:this.leadType,coupon:(null===(n=this.leadClickData)||void 0===n?void 0:n.coupon)||null,formatSubtype:this.formatSubType,formatType:this.formatType,location:this.$attributeRef.location,name:(null===(o=this.leadClickData)||void 0===o?void 0:o.productName)||null,pageId:this.contentId||null,position:this.$attributeRef.position,price:Number(this.buttonPrice)||0,productId:(null===(c=this.leadClickData)||void 0===c?void 0:c.productId)||null,quantity:1,sku:(null===(l=this.leadClickData)||void 0===l?void 0:l.productSku)||"",text:this.buttonText,upc:(null===(d=this.leadClickData)||void 0===d?void 0:d.productSku)||"",variant:this.variant||this.$attributeRef.section}}},{key:"customDimensionsData",get:function(){var t,e,r,n,o=[{key:"shortcodeId",value:null===(t=this.leadClickData)||void 0===t?void 0:t.shortcodeId},{key:"shortcodeType",value:null===(e=this.leadClickData)||void 0===e?void 0:e.shortcodeType}];if(this.trackProductViewed&&this.allLeadsData){var c=[],l=[];this.allLeadsData.forEach((function(t,e){c=c.concat({key:"rawUrl_".concat(e),value:null==t?void 0:t.rawUrl}),l=l.concat({key:"vendor_".concat(e),value:null==t?void 0:t.resellerName})})),o=o.concat(c,l)}else o=o.concat([{key:"rawUrl",value:(null===(r=this.leadClickData)||void 0===r?void 0:r.rawUrl)||this.buttonUrl},{key:"vendor",value:null===(n=this.leadClickData)||void 0===n?void 0:n.resellerName}]);return o}},{key:"productClickedData",get:function(){return{actionOutcome:"EXTERNALLINK",correlationId:this._uuid,outboundUrl:this.buttonHref,product:this.productData,customDimensions:this.customDimensionsData}}},{key:"productViewedData",get:function(){return{product:this.productData,customDimensions:this.customDimensionsData}}},{key:"isEnabled",get:function(){var t;return!(this.$abtest.isUserInActiveTestAndBucket("bb_super","test")&&!this.isLink&&(null===(t=this.preferredResellers)||void 0===t?void 0:t.some((function(t){return"Best Buy"===t.name})))&&!this.buttonText.includes("Best Buy"))}},{key:"commerceButtonClicked",value:function(){this.$nuxt.$emit("show_mattress_exit_modal")}},{key:"fireProductViewed",value:function(){if(this.trackProductViewed){var t=j.a.replaceAttributeReferences(this.$el,this.productViewedData);this.$track(O.a).with(t).fire()}}},{key:"created",value:function(){var t;this.buttonUrl&&Object(x.c)(this.buttonUrl)?t={cm07:!0}:this.buttonPrice&&!this.isLink&&(t={cm01:!0}),this.$store.dispatch("tracking/setPageComponents",t)}},{key:"mounted",value:function(){var t=this;this.trackProductViewed&&(this.inViewportObserver=new w.a({rootMargin:"0px",el:this.$el,threshold:.5},(function(){t.inViewportObserver.destroy(),t.fireProductViewed()})))}},{key:"beforeDestroy",value:function(){this.inViewportObserver&&this.inViewportObserver.destroy()}}]),r}(h.Vue);Object(v.c)([Object(h.Getter)("tracking/data"),Object(v.f)("design:type",Object)],S.prototype,"data",void 0),Object(v.c)([Object(h.Prop)({default:"",type:String}),Object(v.f)("design:type",String)],S.prototype,"buttonText",void 0),Object(v.c)([Object(h.Prop)({default:"",type:String}),Object(v.f)("design:type",String)],S.prototype,"buttonUrl",void 0),Object(v.c)([Object(h.Prop)({default:"",type:[Number,String]}),Object(v.f)("design:type",Object)],S.prototype,"buttonPrice",void 0),Object(v.c)([Object(h.Prop)({default:"primary",type:String}),Object(v.f)("design:type",String)],S.prototype,"buttonTheme",void 0),Object(v.c)([Object(h.Prop)({default:"medium",type:String}),Object(v.f)("design:type",String)],S.prototype,"buttonSize",void 0),Object(v.c)([Object(h.Prop)({default:!1}),Object(v.f)("design:type",Boolean)],S.prototype,"trackProductViewed",void 0),Object(v.c)([Object(h.Prop)({default:null,type:Boolean}),Object(v.f)("design:type",Boolean)],S.prototype,"isImage",void 0),Object(v.c)([Object(h.Prop)({default:null,type:Boolean}),Object(v.f)("design:type",Boolean)],S.prototype,"isLink",void 0),Object(v.c)([Object(h.Prop)({default:!1,type:Boolean}),Object(v.f)("design:type",Boolean)],S.prototype,"hasOffer",void 0),Object(v.c)([Object(h.Prop)({default:!0}),Object(v.f)("design:type",Boolean)],S.prototype,"shouldMonetize",void 0),Object(v.c)([Object(h.Prop)({default:null}),Object(v.f)("design:type",String)],S.prototype,"subtype",void 0),Object(v.c)([Object(h.Prop)({default:null}),Object(v.f)("design:type",Object)],S.prototype,"leadClickData",void 0),Object(v.c)([Object(h.Prop)({default:null}),Object(v.f)("design:type",Array)],S.prototype,"allLeadsData",void 0),Object(v.c)([Object(h.Prop)({default:""}),Object(v.f)("design:type",String)],S.prototype,"contentId",void 0),Object(v.c)([Object(h.Prop)({default:null}),Object(v.f)("design:type",String)],S.prototype,"variant",void 0),Object(v.c)([Object(h.Prop)({default:null,type:Array}),Object(v.f)("design:type",Array)],S.prototype,"preferredResellers",void 0);var B=S=Object(v.c)([Object(h.Component)({mixins:[I]}),Object(y.a)("track-click",Object(k.a)(m.a))],S),A=(r(891),r(147)),component=Object(A.a)(B,(function(){var t=this,e=t._self._c;t._self._setupProxy;return t.isEnabled?e("a",{directives:[{name:"track-click",rawName:"v-track-click",value:function(e){return e.trackingData=t.productClickedData,e},expression:"(event) => {\n event.trackingData = productClickedData;\n return event;\n }"}],class:Object(n.a)({},t.buttonClasses,!t.isLink),attrs:{href:t.linkHref,rel:"noopener nofollow",target:"_blank"},on:{mousedown:function(e){return t.injectCorrelationId(t.modifiedCommerceUrl)},click:t.commerceButtonClicked}},[t._t("default",(function(){return[t._v(t._s(t.buttonText))]}))],2):t._e()}),[],!1,null,null,null);e.default=component.exports},873:function(t,e,r){r(878)},875:function(t,e,r){"use strict";r.d(e,"a",(function(){return w}));r(12),r(17),r(13),r(28),r(14),r(29);var n=r(4),o=r(2),c=r(3),l=r(36),d=r(8),f=r(9),v=r(5),h=(r(16),r(7),r(0)),y=r(57),m=r(62),O=r(47);function j(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function k(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Object(v.a)(t);if(e){var o=Object(v.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(f.a)(this,r)}}var w=function(t){Object(d.a)(r,t);var e=k(r);function r(t){var n;return Object(o.a)(this,r),(n=e.call(this,t)).services=["tagular"],n}return Object(c.a)(r,[{key:"defaults",get:function(){return{"@type":"redventures.ecommerce.v1.ProductViewed"}}},{key:"transform",value:function(data){var base=Object(l.a)(Object(v.a)(r.prototype),"transform",this).call(this,data);return this.additionalData.tagular=base,data.customDimensions&&(data.customDimensions=data.customDimensions.filter((function(t){return t.value}))),this.additionalData.tagular=function(t){for(var i=1;it.length?-1:""===e?r:C(t,e,r)};n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,c,j,I,x,T,S,B,A=l(this),L=0,M=0,N="";if(!f(t)){if((r=v(t))&&(n=h(l(m(t))),!~C(n,"g")))throw P("`.replaceAll` does not allow non-global regexes");if(c=y(t,w))return o(c,t,A,e);if(k&&r)return _(h(A),t,e)}for(j=h(A),I=h(t),(x=d(e))||(e=h(e)),T=I.length,S=U(1,T),L=D(j,I,0);-1!==L;)B=x?h(e(I,L,j)):O(I,j,L,[],void 0,e),N+=R(j,M,L)+B,M=L+T,L=D(j,I,L+S);return M1&&void 0!==arguments[1]?arguments[1]:{},d={utm_campaign:null!==(e=l.utm_campaign)&&void 0!==e?e:"",utm_content:null!==(r=l.utm_content)&&void 0!==r?r:"",utm_medium:"referral",utm_source:"roadshow",u1:l.correlation_id,ref_url:l.ref_url,referrer_id:null!==(c=l.referrer_id)&&void 0!==c?c:""},f="/roadshow/roadshow-auto-buying-program/";if(t){var v,h=o(t);h&&null!==(v=h.model)&&void 0!==v&&v.cdId?f="https://roadshow.truecar.com/redirect-link.html?linkto=prices-new&chromeMake=".concat(h.make.slug,"&chromeTrimId=").concat(h.model.cdId,"&").concat(n.a.stringifyObject(d)):h&&(f="https://roadshow.truecar.com/prices-new/".concat(h.make.slug,"/").concat(h.model.slug,"-summary/?").concat(n.a.stringifyObject(d)))}return f}function l(){var t,e,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c={utm_campaign:null!==(t=o.utm_campaign)&&void 0!==t?t:"",utm_content:null!==(e=o.utm_content)&&void 0!==e?e:"",utm_medium:"referral",utm_source:"roadshow",u1:o.correlation_id,ref_url:o.ref_url,referrer_id:null!==(r=o.referrer_id)&&void 0!==r?r:""};return"https://roadshow.truecar.com/used-cars-for-sale/?".concat(n.a.stringifyObject(c))}function d(t){return t.includes("roadshow.truecar.com")}},891:function(t,e,r){"use strict";r(865)},892:function(t,e,r){var n=r(299)((function(i){return i[1]}));n.push([t.i,".c-commerceBuyButton{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}",""]),n.locals={},t.exports=n},909:function(t,e,r){"use strict";r(12),r(44),r(53),r(30),r(13),r(39),r(51),r(16),r(28),r(29);var n=r(4),o=r(2),c=r(3),l=r(8),d=r(9),f=r(5),v=(r(17),r(393),r(78),r(19),r(90),r(7),r(33),r(23),r(24),r(212),r(137),r(215),r(14),r(0)),h=r(847),y=r(871);function m(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,r)}return e}function O(t){for(var i=1;i=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}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 o,c=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,o=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)throw o}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i0)}},{key:"hasCreditCardOffer",get:function(){var t,e,r;return!!(null===(r=null===(e=null===(t=this.extraData)||void 0===t?void 0:t.creditCardData)||void 0===e?void 0:e.attributes)||void 0===r?void 0:r.link)}},{key:"monetizedUrl",get:function(){var t;return(null===(t=this.extraData)||void 0===t?void 0:t.monetizedUrl)||null}},{key:"offerUrl",get:function(){var t;return(null===(t=this.extraData)||void 0===t?void 0:t.offerUrl)||null}},{key:"productPrice",get:function(){var t,e;return this.useReseller?(null===(t=this.preferredReseller)||void 0===t?void 0:t.price)/100:Number(null===(e=this.merchantOffer)||void 0===e?void 0:e.offerPrice)}},{key:"resellerName",get:function(){var t,e;return(this.useReseller?null===(t=this.preferredReseller)||void 0===t?void 0:t.name:null===(e=this.merchantOffer)||void 0===e?void 0:e.offerMerchant)||null}},{key:"techProdOfferText",get:function(){var t,e,r;return(null===(r=null===(e=null===(t=this.techProd)||void 0===t?void 0:t.attributes)||void 0===e?void 0:e.find((function(t){return"offer-link-text"===t.slug})))||void 0===r?void 0:r.val.toString())||null}},{key:"techProdOfferUrl",get:function(){var t,e,r;return(null===(r=null===(e=null===(t=this.techProd)||void 0===t?void 0:t.attributes)||void 0===e?void 0:e.find((function(t){return"offer-link-url"===t.slug})))||void 0===r?void 0:r.val.toString())||null}},{key:"productFamily",get:function(){var t,e;return(null===(e=null===(t=this.techProd)||void 0===t?void 0:t.family)||void 0===e?void 0:e[0])||{uuid:"",name:""}}},{key:"promoText",get:function(){var t,e,r=null===(e=null===(t=this.techProd)||void 0===t?void 0:t.attributes)||void 0===e?void 0:e.find((function(t){return"promo-text"===t.slug}));return null==r?void 0:r.val[0]}},{key:"techProd",get:function(){var t;return(null===(t=this.extraData)||void 0===t?void 0:t.techProd)||null}},{key:"usePricing",get:function(){var t;return(null===(t=this.extraData)||void 0===t?void 0:t.usePricing)||!1}},{key:"useReseller",get:function(){return!(!this.hasReseller||!this.techProd||!this.usePricing&&(this.hasMerchantOffer||this.hasOfferLink))}},{key:"allLeadsTrackingData",get:function(){var t,e=[],r=j(this.useReseller?this.preferredResellers:this.merchantOffers);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push({rawUrl:this.useReseller?null==n?void 0:n.url:null==n?void 0:n.rawUrl,resellerName:this.useReseller?null==n?void 0:n.name:null==n?void 0:n.offerMerchant})}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"creditCardOffer",get:function(){var t,e,r,n,o,c,l;try{c=new URL(null===(t=this.merchantOffer)||void 0===t?void 0:t.url)}catch(t){}if(null===(e=null==c?void 0:c.hostname)||void 0===e?void 0:e.endsWith("amazon.com"))return c.href;try{l=new URL(null===(o=null===(n=null===(r=this.extraData)||void 0===r?void 0:r.creditCardData)||void 0===n?void 0:n.attributes)||void 0===o?void 0:o.link)}catch(t){}return l&&"undefined"!=typeof window&&window.cohesion&&window.cohesion("ready",(function(){var t=window._Cohesion,e=l.searchParams;e.append("c_correlation_id",y.a[0]),e.append("c_tenant_id",t.tenantId),e.append("c_anonymous_id",t.anonymousId),e.append("c_session_id",t.sessionId),e.append("c_instance_id",t.instanceId)})),null==l?void 0:l.href}},{key:"winningOfferUrl",get:function(){var t,e;return this.hasCreditCardOffer?this.creditCardOffer:this.techProdOfferUrl?this.techProdOfferUrl:this.useReseller?(null===(t=this.preferredReseller)||void 0===t?void 0:t.url)||null:this.monetizedUrl?this.monetizedUrl:this.hasMerchantOffer?(null===(e=this.merchantOffer)||void 0===e?void 0:e.url)||null:this.offerUrl?this.offerUrl:null}},{key:"winningOfferTrackingData",get:function(){var t=this.useReseller?this.preferredReseller:this.merchantOffer;return this.getLeadTrackingData(t,this.useReseller)}},{key:"shortcodeType",value:function(t){var e={commercelink:"link",commercelinkshortcode:"link",cnetlisticle:"listicle",cross_content_listicle:"x-listicle",commercepromo:"promo",buybutton:"button",reviewcard:"reviewcard"};return e[t]?e[t]:t}},{key:"getLeadTrackingData",value:function(t){var e,r,n,o,c,l,d,f,v,h,y,m,j,k,w,P,C,_,R,U,D,I,x,T,S,B=arguments.length>1&&void 0!==arguments[1]&&arguments[1],data={brand:null==t?void 0:t.offerMerchant,coupon:this.promoText,productCpc:"",productId:(null===(e=this.techProd)||void 0===e?void 0:e.id)||"",productManufacturer:(null===(n=null===(r=this.techProd)||void 0===r?void 0:r.manufacturer)||void 0===n?void 0:n.name)||"",productSeriesId:(null===(o=this.productFamily)||void 0===o?void 0:o.uuid)||"",productSeriesName:(null===(c=this.productFamily)||void 0===c?void 0:c.name)||"",productSku:Array.isArray(null===(d=null===(l=this.techProd)||void 0===l?void 0:l.product)||void 0===d?void 0:d.sku)&&(null===(h=null===(v=null===(f=this.techProd)||void 0===f?void 0:f.product)||void 0===v?void 0:v.sku)||void 0===h?void 0:h.length)>0?null===(j=null===(m=null===(y=this.techProd)||void 0===y?void 0:y.product)||void 0===m?void 0:m.sku)||void 0===j?void 0:j[0]:(null===(w=null===(k=this.techProd)||void 0===k?void 0:k.product)||void 0===w?void 0:w.sku)||"",productSlug:(null===(C=null===(P=this.techProd)||void 0===P?void 0:P.product)||void 0===C?void 0:C.slug)||"",resellerId:"",resellerTtag:"",shortcodeId:(null===(_=this.extraData)||void 0===_?void 0:_.uuid)||"",shortcodeType:this.shortcodeType(null!==(U=null===(R=this.extraData)||void 0===R?void 0:R.shortcodeType)&&void 0!==U?U:"")};return O(O({},data),{},B?{productCpc:t.cpc,productName:null===(I=null===(D=this.techProd)||void 0===D?void 0:D.product)||void 0===I?void 0:I.name,productPrice:Number(t.totalPrice/100)||Number(t.price/100),rawUrl:null==t?void 0:t.url,resellerId:t.id,resellerName:t.name,resellerTtag:t.tTag}:{productName:(null===(T=null===(x=this.techProd)||void 0===x?void 0:x.product)||void 0===T?void 0:T.name)||(null===(S=this.extraData)||void 0===S?void 0:S.hed)||this.hed,productPrice:(null==t?void 0:t.offerPrice)||0,rawUrl:null==t?void 0:t.rawUrl,resellerName:null==t?void 0:t.offerMerchant})}},{key:"getLowestOfferPrice",value:function(t){var e,r,n;if(!Array.isArray(t)||0===t.length)return null;var o=(null===(e=t[0])||void 0===e?void 0:e.totalPrice)||(null===(r=t[0])||void 0===r?void 0:r.price)||(null===(n=t[0])||void 0===n?void 0:n.offerPrice);return t.forEach((function(t){var e=(null==t?void 0:t.totalPrice)||(null==t?void 0:t.price)||(null==t?void 0:t.offerPrice);e