PageSourceSearch

https://www.covesmart.com/component---src-pages-thanks-order-confirmation-index-tsx-30949b8f3a4f7dfb59dd.js

js covesmart.com collected 2026-09-24 10:37:31 UTC 36,675 bytes, 2 lines download raw bytes

1try{let o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new o.Error).stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="ec44afaa-bbbc-438d-9521-7de652abcc01",o._sentryDebugIdIdentifier="sentry-dbid-ec44afaa-bbbc-438d-9521-7de652abcc01")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"7512e854bc7d102819fda93c84186ff7bcff5bff"};(self.webpackChunk_covesmart_website=self.webpackChunk_covesmart_website||[]).push([[8988],{19264:function(o,e,n){n.d(e,{A:function(){return u}});var t=n(22447),a=n(527),i=n(13862);const d={3:["Smoke CO 1","Smoke CO 2","Smoke CO 3","Smoke CO 4","Smoke CO 5","Back Smoke CO","Basement Smoke CO","Bedroom Smoke CO","Den Smoke CO","Downstairs Smoke CO","Family Room Smoke CO","Front Smoke CO","Hallway Smoke CO","Living Room Smoke CO","Upstairs Smoke CO"],4:["Smoke 1","Smoke 2","Smoke 3","Smoke 4","Smoke 5","Back Smoke","Basement Smoke","Bedroom Smoke","Den Smoke","Downstairs Smoke","Family Room Smoke","Front Smoke","Hallway Smoke","Living Room Smoke","Upstairs Smoke"],5:["Glass 1","Glass 2","Glass 3","Glass 4","Glass 5","Back Glass","Basement Glass","Bedroom Glass","Bedroom Glass 1","Bedroom Glass 2","Bedroom Glass 3","Bedroom Glass 4","Bedroom Glass 5","Den Glass","Dining Room Glass","Downstairs Glass","Family Room Glass","Front Glass","Garage Glass","Hall Glass","Kitchen Glass","Living Room Glass","Master Bedroom Glass","Office Glass","Side Glass","Sunroom Glass","Upstairs Glass"],7:["Panic Button 1","Panic Button 2","Panic Button 3","Panic Button 4","Panic Button 5","Panic Button 6","Panic Button 7","Panic Button 8","Panic Button 9","Panic Button 10","Panic Button 11","Panic Button 12","Panic Button 13","Panic Button 14","Panic Button 15","Panic Button 16","Panic Button 17","Panic Button 18"],11:["Yard Sign"],13:["CO 1","CO 2","CO 3","CO 4","CO 5","Back CO","Basement CO","Bedroom CO","Den CO","Downstairs CO","Family Room CO","Front CO","Hallway CO","Living Room CO","Upstairs CO"],64:["Flood 1","Flood 2","Flood 3","Flood 4","Flood 5","Basement Flood 1","Basement Flood 2","Basement Flood 3","Basement Flood 4","Basement Flood 5","Bathroom Sink Flood 1","Bathroom Sink Flood 2","Bathroom Sink Flood 3","Bathroom Sink Flood 4","Bathroom Sink Flood 5","Bathroom Flood 1","Bathroom Flood 2","Bathroom Flood 3","Bathroom Flood 4","Bathroom Flood 5","Kitchen Flood 1","Kitchen Flood 2","Kitchen Flood 3","Kitchen Flood 4","Kitchen Flood 5","Kitchen Sink Flood 1","Kitchen Sink Flood 2","Kitchen Sink Flood 3","Kitchen Sink Flood 4","Kitchen Sink Flood 5","Laundry Room Flood","Master Bath Flood 1","Master Bath Flood 2","Master Bath Flood 3","Master Bath Flood 4","Master Bath Flood 5","Shed Flood","Storage Room Flood","Utility Room Flood","Water Heater Flood"],81:["Door 1","Door 2","Door 3","Door 4","Door 5","Door 6","Door 7","Door 8","Door 9","Front Door","Back Door","Garage Door","Side Door","Basement Door","Bedroom Door","Den Door","Driveway Door","Kitchen Door","Laundry Room Door","Living Room Door","Master Bed Door","Patio Door","Shed Door","Shop Door","Sliding Door","Utility Door"],82:["Window 1","Window 2","Window 3","Window 4","Window 5","Window 6","Window 7","Window 8","Window 9","Back Window 1","Back Window 2","Back Window 3","Back Window 4","Back Window 5","Basement Window 1","Basement Window 2","Basement Window 3","Basement Window 4","Basement Window 5","Bathroom Window 1","Bathroom Window 2","Bathroom Window 3","Bathroom Window 4","Bathroom Window 5","Bedroom Window 1","Bedroom Window 2","Bedroom Window 3","Bedroom Window 4","Bedroom Window 5","Child's Room Window 1","Child's Room Window 2","Child's Room Window 3","Child's Room Window 4","Child's Room Window 5","Den Window 1","Den Window 2","Den Window 3","Den Window 4","Den Window 5","Dining Room Window 1","Dining Room Window 2","Dining Room Window 3","Dining Room Window 4","Dining Room Window 5","Family Room Window 1","Family Room Window 2","Family Room Window 3","Family Room Window 4","Family Room Window 5","Front Window 1","Front Window 2","Front Window 3","Front Window 4","Front Window 5","Garage Window 1","Garage Window 2","Garage Window 3","Garage Window 4","Garage Window 5","Kitchen Window 1","Kitchen Window 2","Kitchen Window 3","Kitchen Window 4","Kitchen Window 5","Laundry Window 1","Laundry Window 2","Laundry Window 3","Laundry Window 4","Laundry Window 5","Living Room Window 1","Living Room Window 2","Living Room Window 3","Living Room Window 4","Living Room Window 5","Master Bed Window 1","Master Bed Window 2","Master Bed Window 3","Master Bed Window 4","Master Bed Window 5","Office Window 1","Office Window 2","Office Window 3","Office Window 4","Office Window 5","Side Window 1","Side Window 2","Side Window 3","Side Window 4","Side Window 5","Spare Room Window 1","Spare Room Window 2","Spare Room Window 3","Spare Room Window 4","Spare Room Window 5"],83:["Motion 1","Motion 2","Motion 3","Motion 4","Motion 5","Back Motion","Bedroom Motion","Den Motion","Dining Room Motion","Downstairs Motion","Family Room Motion","Front Motion","Garage Motion","Hallway Motion","
1Living Room Motion","Master Bed Motion","Office Motion","Shop Motion","Side Motion","Upstairs Motion"],84:["Remote 1","Remote 2","Remote 3","Remote 4","Remote 5","Remote 6","Remote 7","Remote 8","Remote 9","Remote 10","Remote 11","Remote 12","Remote 13","Remote 14","Remote 15","Remote 16","Remote 17","Remote 18"],88:["Flood 1","Flood 2","Flood 3","Flood 4","Flood 5","Basement Flood 1","Basement Flood 2","Basement Flood 3","Basement Flood 4","Basement Flood 5","Bathroom Sink Flood 1","Bathroom Sink Flood 2","Bathroom Sink Flood 3","Bathroom Sink Flood 4","Bathroom Sink Flood 5","Bathroom Flood 1","Bathroom Flood 2","Bathroom Flood 3","Bathroom Flood 4","Bathroom Flood 5","Kitchen Flood 1","Kitchen Flood 2","Kitchen Flood 3","Kitchen Flood 4","Kitchen Flood 5","Kitchen Sink Flood 1","Kitchen Sink Flood 2","Kitchen Sink Flood 3","Kitchen Sink Flood 4","Kitchen Sink Flood 5","Laundry Room Flood","Master Bath Flood 1","Master Bath Flood 2","Master Bath Flood 3","Master Bath Flood 4","Master Bath Flood 5","Shed Flood","Storage Room Flood","Utility Room Flood","Water Heater Flood"],106:["YI Indoor Camera"],200:["Window Stickers"]};var r={3:["Back Smoke CO","Basement Smoke CO","Bedroom Smoke CO","Den Smoke CO","Downstairs Smoke CO","Family Room Smoke CO","Front Smoke CO","Hallway Smoke CO","Living Room Smoke CO","Upstairs Smoke CO","Smoke CO 1","Smoke CO 2","Smoke CO 3","Smoke CO 4","Smoke CO 5"],4:["Back Smoke","Basement Smoke","Bedroom Smoke","Den Smoke","Downstairs Smoke","Family Room Smoke","Front Smoke","Hallway Smoke","Living Room Smoke","Upstairs Smoke","Smoke 1","Smoke 2","Smoke 3","Smoke 4","Smoke 5"],5:["Back Glass","Basement Glass","Bedroom Glass 1","Bedroom Glass 2","Bedroom Glass 3","Bedroom Glass 4","Bedroom Glass 5","Den Glass","Dining Room Glass","Downstairs Glass","Family Room Glass","Front Glass","Garage Glass","Hall Glass","Kitchen Glass","Living Room Glass","Master Bedroom Glass","Office Glass","Side Glass","Sunroom Glass","Upstairs Glass","Glass 1","Glass 2","Glass 3","Glass 4","Glass 5"],7:["Panic Button 1","Panic Button 2","Panic Button 3","Panic Button 4","Panic Button 5","Panic Button 6","Panic Button 7","Panic Button 8","Panic Button 9","Panic Button 10","Panic Button 11","Panic Button 12","Panic Button 13","Panic Button 14","Panic Button 15","Panic Button 16","Panic Button 17","Panic Button 18"],11:["Yard Sign"],13:["Back CO","Basement CO","Bedroom CO","Den CO","Downstairs CO","Family Room CO","Front CO","Hallway CO","Living Room CO","Upstairs CO","CO 1","CO 2","CO 3","CO 4","CO 5"],64:["Basement Flood 1","Basement Flood 2","Basement Flood 3","Basement Flood 4","Basement Flood 5","Bathroom Sink Flood 1","Bathroom Sink Flood 2","Bathroom Sink Flood 3","Bathroom Sink Flood 4","Bathroom Sink Flood 5","Bathroom Flood 1","Bathroom Flood 2","Bathroom Flood 3","Bathroom Flood 4","Bathroom Flood 5","Kitchen Flood 1","Kitchen Flood 2","Kitchen Flood 3","Kitchen Flood 4","Kitchen Flood 5","Kitchen Sink Flood 1","Kitchen Sink Flood 2","Kitchen Sink Flood 3","Kitchen Sink Flood 4","Kitchen Sink Flood 5","Laundry Room Flood","Master Bath Flood 1","Master Bath Flood 2","Master Bath Flood 3","Master Bath Flood 4","Master Bath Flood 5","Shed Flood","Storage Room Flood","Utility Room Flood","Water Heater Flood","Flood 1","Flood 2","Flood 3","Flood 4","Flood 5"],81:["Front Door","Back Door","Garage Door","Side Door","Basement Door","Bedroom Door","Den Door","Driveway Door","Kitchen Door","Laundry Room Door","Living Room Door","Master Bed Door","Patio Door","Shed Door","Shop Door","Sliding Door","Utility Door","Door 1","Door 2","Door 3","Door 4","Door 5","Door 6","Door 7","Door 8","Door 9"],82:["Back Window 1","Back Window 2","Back Window 3","Back Window 4","Back Window 5","Basement Window 1","Basement Window 2","Basement Window 3","Basement Window 4","Basement Window 5","Bathroom Window 1","Bathroom Window 2","Bathroom Window 3","Bathroom Window 4","Bathroom Window 5","Bedroom Window 1","Bedroom Window 2","Bedroom Window 3","Bedroom Window 4","Bedroom Window 5","Child's Room Window 1","Child's Room Window 2","Child's Room Window 3","Child's Room Window 4","Child's Room Window 5","Den Window 1","Den Window 2","Den Window 3","Den Window 4","Den Window 5","Dining Room Window 1","Dining Room Window 2","Dining Room Window 3","Dining Room Window 4","Dining Room Window 5","Family Room Window 1","Family Room Window 2","Family Room Window 3","Family Room Window 4","Family Room Window 5","Front Window 1","Front Window 2","Front Window 3","Front Window 4","Front Window 5","Garage Window 1","Garage Window 2","Garage Window 3","Garage Window 4","Garage Window 5","Kitchen Window 1","Kitchen Window 2","Kitchen Window 3","Kitchen Window 4","Kitchen Window 5","Laundry Window 1","Laundry Window 2","Laundry Window 3","Laundry Window 4","Laundry Window 5","Living Room Window 1","Living Room Window 2","Living Room Window 3","Living Room Window 4","Living Room Window 5","Master Bed Window 1","Master Bed Window 2","Master Bed Window 3","Master Bed Window 4","Master Bed Window 5","Office Window 1","Office Window 2","Office Window 3","Office Window 4","Office Window 5","Side Window 1","Side Window 2","Side Window 3","Side Window 4","Side Window 5","Spare Room Window 1","Spare Room Window 2","Spare Room Window 3","Spare Room Window 4","Spare Room Window 5","Window 1","Window 2","Window 3","Window 4","Window 5","Window 6","Window 7","Window 8","Window 9"],83:["Back Motion","Bedroom Motion","Den Motion","Dining Room Motion","Downstairs Motion","Family Room Motion","Front Motion","Garage Motion","Hallway Motion","
1Living Room Motion","Master Bed Motion","Office Motion","Shop Motion","Side Motion","Upstairs Motion","Motion 1","Motion 2","Motion 3","Motion 4","Motion 5"],84:["Remote 1","Remote 2","Remote 3","Remote 4","Remote 5","Remote 6","Remote 7","Remote 8","Remote 9","Remote 10","Remote 11","Remote 12","Remote 13","Remote 14","Remote 15","Remote 16","Remote 17","Remote 18"],88:["Basement Flood 1","Basement Flood 2","Basement Flood 3","Basement Flood 4","Basement Flood 5","Bathroom Sink Flood 1","Bathroom Sink Flood 2","Bathroom Sink Flood 3","Bathroom Sink Flood 4","Bathroom Sink Flood 5","Bathroom Flood 1","Bathroom Flood 2","Bathroom Flood 3","Bathroom Flood 4","Bathroom Flood 5","Kitchen Flood 1","Kitchen Flood 2","Kitchen Flood 3","Kitchen Flood 4","Kitchen Flood 5","Kitchen Sink Flood 1","Kitchen Sink Flood 2","Kitchen Sink Flood 3","Kitchen Sink Flood 4","Kitchen Sink Flood 5","Laundry Room Flood","Master Bath Flood 1","Master Bath Flood 2","Master Bath Flood 3","Master Bath Flood 4","Master Bath Flood 5","Shed Flood","Storage Room Flood","Utility Room Flood","Water Heater Flood","Flood 1","Flood 2","Flood 3","Flood 4","Flood 5"],106:["YI Indoor Camera"],200:["Window Stickers"]},s=n(54380);const l=["CP-MED-345-1","CP-KEY-345-1"],c=[84,7],m={3:"Smoke CO",4:"Smoke Detector",5:"Glass Break Detector",7:"Panic Button",11:"Yard Sign",13:"CO Detector",64:"Flood Sensor",81:"Door Sensor",82:"Window Sensor",83:"Motion Detector",84:"Key Remote",88:"Flood Sensor",106:"Yi Camera",200:"Window Sticker"};var u=o=>{let{values:e,handleChange:n,state:u}=o;const{data:h}=(0,i.SC)(),p=(0,t.U)("(max-width: 575px)",{defaultValue:!0,initializeWithValue:!1}),w=null==h?void 0:h.equipment,f=Array.isArray(w)?w:w&&"object"==typeof w?Object.values(w):[],v=[];for(let t=0;t<f.length;t+=1){const o=f[t],i=r[o.pandoId];if(i&&!(i.length<=1))for(let t=0;t<(o.qty||0);t+=1){var b;const r=`select${o.pandoId}${t}`,h=u[r],w=i.filter((n=>{if(h&&n===h)return!0;const a=parseInt(n.replace(/\D/g,""),10),i=e[o.pandoId]||[],d=i.includes(n),r=1===a,s=n.replace(/[0-9]/g,"");let l=0;const c=i[t];if(!Number.isNaN(a)){const o=i.filter((o=>o.replace(/[0-9]/g,"")===s));void 0!==c&&c.replace(/[0-9]/g,"")!==s&&(l=`${s}${o.length+1}`)}return!d&&r||Number.isNaN(a)&&!d||n===l})).map((o=>({name:o,label:o,key:o,value:o})));v.push((0,s.Y)("div",{className:"mb-cove-25 sm:py-cove-25 m-0 mx-2 mt-0 flex min-h-[48px] w-[unset] flex-wrap items-center justify-between border-b-0 border-[#dedfe1] p-0 last-of-type:border-0 sm:m-0 sm:w-full sm:border-b",children:l.includes(o.sku)||c.includes(o.pandoId)?(0,s.FD)(s.FK,{children:[(0,s.Y)("span",{className:"text-cove-navy-blue last-of-type:pt-cove-5 w-1/2 flex-[unset] text-sm font-medium first-of-type:w-[45%] last-of-type:w-full last-of-type:min-w-[190px] last-of-type:pl-0 sm:flex-1",children:m[o.pandoId]}),!p&&(0,s.Y)("span",{className:"text-cove-navy-blue last-of-type:pt-cove-5 w-1/2 flex-[unset] flex-grow text-sm font-medium first-of-type:w-[45%] last-of-type:w-full last-of-type:min-w-[190px] last-of-type:pl-0 sm:flex-1"}),(0,s.Y)("span",{children:null===(b=d[o.pandoId])||void 0===b?void 0:b[t]})]}):(0,s.FD)(s.FK,{children:[(0,s.Y)("span",{className:"text-cove-navy-blue last-of-type:pt-cove-5 w-1/2 flex-[unset] text-sm font-medium first-of-type:w-[45%] last-of-type:w-full last-of-type:min-w-[190px] last-of-type:pl-0 sm:flex-1",children:m[o.pandoId]}),(0,s.Y)("span",{className:"text-cove-navy-blue last-of-type:pt-cove-5 w-1/2 flex-[unset] text-sm font-medium first-of-type:w-[45%] last-of-type:w-full last-of-type:min-w-[190px] last-of-type:pl-0 sm:flex-1",children:(0,s.Y)(a.A,{name:r,value:null!=h?h:"",placeholder:"Select name",onChange:e=>n(o.pandoId,e,r),align:"start",fullWidth:!0,className:"min-h-[40px]",children:w.map((o=>(0,s.Y)(a.A.Option,{value:o.value,children:o.label},o.key)))})})]})},`${o.pandoId}-${t}`))}}return(0,s.Y)(s.FK,{children:v})}},9002:function(o,e,n){n.r(e),n.d(e,{Head:function(){return g}});var t=n(64619),a=n(64428),i=n(95097),d=n(24145),r=n(73279),s=n(28781),l=n(67071),c=n(13862),m=n(21461),u=n(14670),h=n(64681),p=n(59406),w=n(96691),f=n(14041),v=n(19264),b=n(98758),B=n(9425),y=n(53668),F=n(54380);const g=o=>{let{data:e}=o;return(0,F.Y)(l.A,{seo:null==e?void 0:e.datoCmsSeo})};e.default=()=>{var o;const{0:e,1:n}=(0,f.useState)({sensors:{},submitting:!1,status:"",verbalPassword:"",passVerbalPassword:!1}),l=(0,f.useRef)(null),g=(0,c.SC)(),S=(0,a._$)(),W=(0,m.o$)();(0,f.useEffect)((()=>{u.x.removeItem("payment");const o=u.x.getItem("GTIN"),e=JSON.parse(u.x.getItem("ORDER"));if(e){var t,a,i,d,r,c,m,w,f,v,b,B,F,g,S,W,R,k,C,D,x,M,O,I,N,L,P,G,T,U,K,A,Y,E,$,_,j,q,V,H;const Q=document.createElement("script");Q.type="text/javascript",Q.async=!0,Q.innerHTML=`\n      window.renderOptIn = function() {\
1n        window.gapi.load('surveyoptin', function() {\n          window.gapi.surveyoptin.render({\n            // REQUIRED FIELDS\n            merchant_id: 123852215,\n            order_id: ${null!==(t=null==e?void 0:e.orderNumber)&&void 0!==t?t:null},\n            email: '${null!==(a=null==e||null===(i=e.customer1)||void 0===i?void 0:i.email)&&void 0!==a?a:""}',\n            delivery_country: 'US',\n            estimated_delivery_date: '${(0,h.GP)((0,p.f)(new Date,5),"yyyy-MM-dd")}',\n            products: [{gtin: '${o}'}]\n          })\n        })\n      }\n    `;const z=document.createElement("script");z.src="https://apis.google.com/js/platform.js?onload=renderOptIn",z.type="text/javascript",z.async=!0,z.defer=!0;const J=document.createElement("script");J.type="text/javascript",J.async=!0,J.innerHTML=`\n      try {\n        window["friendbuyAPI"].push([\n          "track",\n          "purchase",\n          {\n            id: "${null!==(d=null==e?void 0:e.orderNumber)&&void 0!==d?d:""}",\n            amount: ${null!==(r=null==e||null===(c=e.totals)||void 0===c?void 0:c.orderTotalWithTax)&&void 0!==r?r:0},\n            currency: "USD",\n            customer: {\n              email: "${null!==(m=null==e||null===(w=e.customer1)||void 0===w?void 0:w.email)&&void 0!==m?m:""}",\n              name: "${null!==(f=null==e||null===(v=e.customer1)||void 0===v?void 0:v.firstName)&&void 0!==f?f:""} ${null!==(b=null==e||null===(B=e.customer1)||void 0===B?void 0:B.lastName)&&void 0!==b?b:""}",\n              id: "${null!==(F=null==e?void 0:e.accountId)&&void 0!==F?F:""}",\n            }\n          },\n        ]);\n      } catch (error) {\n        console.error("Error making Friendbuy API call:", error);\n      }\n    `;const X=document.createElement("script");X.type="text/javascript",X.async=!0,X.innerHTML=`\n      (function (j) {\n        var l='tvscientific-pix-o-7efc12a2-5dda-4d1b-adf6-6bd9bd423322', s, d, w, e = encodeURIComponent, d = document, w = \n        window.location, p = d.createElement("IMG");\n        s = w.protocol + '//tvspix.com/t.png?t=' + (new Date()).getTime() + '&l=' + l + '&u3=' + e(w.href) + '&u1=complete_purchase&u2=' + j.orderAmount + '&u4=' + e(j.orderId) + '&u5=' + e(j.lastTouchChannel) ;\n        p.setAttribute("src", s); p.setAttribute("height", "0"); p.setAttribute("width", "0"); p.setAttribute("alt", ""); p.style.display = 'none'; p.style.position = 'fixed'; d.body.appendChild(p);\n      })({\n        orderId: "${null!==(g=null==e?void 0:e.orderNumber)&&void 0!==g?g:""}", \t//required\n        orderAmount: "${null!==(S=null==e||null===(W=e.totals)||void 0===W?void 0:W.orderTotalWithTax)&&void 0!==S?S:0}", \t//required\n        lastTouchChannel: ""       //optional\n      })\n    `;const Z=document.createElement("script");Z.type="text/javascript",Z.async=!0,Z.innerHTML=`\n        var rm_trans = {\n          \n          affiliateConfig: {ranMID: "53863", discountType: "item", includeStatus: "false"},\n          orderid : "${null!==(R=null==e?void 0:e.orderNumber)&&void 0!==R?R:""}",\n          currency: "USD",\n          customerStatus: "New",\n          conversionType: "Sale",\n          customerID: "${null!==(k=null==e?void 0:e.accountId)&&void 0!==k?k:""}",\n          discountCode: "${null!==(C=null==e||null===(D=e.couponCodes)||void 0===D?void 0:D[0])&&void 0!==C?C:""}",\n          discountAmount: "${(null!==(x=null==e||null===(M=e.totals)||void 0===M?void 0:M.orderRetailTotal)&&void 0!==x?x:0)-(null!==(O=null==e||null===(I=e.totals)||void 0===I?void 0:I.orderTotalWithTax)&&void 0!==O?O:0)}",\n          taxAmount: "${null!==(N=null==e||null===(L=e.totals)||void 0===L?void 0:L.orderTotalTax)&&void 0!==N?N:0}",\n          \n          lineitems : ${JSON.stringify(Object.values(null!==(P=null==e?void 0:e.cartProducts)&&void 0!==P?P:{}).map((o=>({quantity:o.qty,unitPrice:o.price,SKU:o.sku,productName:o.name}))))}\n        };\n\n        /*Do not edit any information beneath this line*/\n\t!function(a,b,c){\n    var d=a.rakutenDataLayerName||"DataLayer";a[d]=a[d]||{},a[d].events=a[d].events||{},a[d].events.SPIVersion="3.4.1",a[d].Sale=a[d].Sale||{},a[d].Sale.Basket=a[d].Sale.Basket||{},c.Ready=a[d].Sale.Basket.Ready&&a[d].Sale.Basket.Ready+1||1,a[d].Sale.Basket=c;\n    var e=function(a){for(var c,d=a+"=",e=b.cookie.split(";"),f=0;f<e.length;f++){for(c=e[f];" "==c.charAt(0);)c=c.substring(1,c.length);if(0==c.indexOf(d))return c.substring(d.length,c.length)}return""},f=function(a){var b=a||"",c={};if(a||(b=e("rmStore")),b){for(;b!==decodeURIComponent(b);)b=decodeURIComponent(b);for(var d=b.split("|"),f=0;f<d.length;f++)c[d[f].split(":")[0]]=d[f].split(":")[1]}return c},g={};g=f();var h=function(a,b,c,d){c=c||"",d=d||{};var e=g[a||""],f=d[b||""],h=d.ignoreCookie||!1;e=h?0:e;var i=e||f||c;return i=("string"!=typeof i||"false"!==i.toLowerCase())&&i,i},k=function(a,c,d,e,f){var g=b.createElement(a),h=-1<b.location.protocol.indexOf("s")?"https:":"http:";
1for(var i in c=c.replace("https:",h),g.src=c,e=e||{},"script"==a?e.type=e.type||"text/javascript":(e.style="display:none;","img"==a&&(e.alt="",e.height="1",e.width="1")),e)e.hasOwnProperty(i)&&g.setAttribute(i,e[i]);var j=b.getElementsByTagName(d);j=j.length?j[0]:b.getElementsByTagName("script")[0].parentElement,f&&(g.onload=f,g.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&f()}),j.appendChild(g)},l=function(a){var b=new Date,c=b.getUTCFullYear()+("0"+(b.getUTCMonth()+1)).slice(-2)+("0"+b.getUTCDate()).slice(-2)+("0"+b.getUTCHours()).slice(-2)+("0"+b.getUTCMinutes()).slice(-2);return"NoOID_"+(a?a+"_":"")+Math.round(1e5*Math.random())+"_"+c},m=function(){var b=a[d]&&a[d].Sale&&a[d].Sale.Basket?a[d].Sale.Basket:{},c=c||b.affiliateConfig||{},f=h("amid","ranMID","",c)||b.ranMID;if(!f)return!1;var g="undefined"==typeof c.allowCommission||"false"!==c.allowCommission;if(!g)return!1;if(!b.orderid&&!(b.lineitems&&b.lineitems.length))return!1;var m=h("adn","domain","track.linksynergy.com",c),o=h("atm","tagType","pixel",c),p=h("adr","discountType","order",c),q=h("acs","includeStatus","false",c),r=h("arto","removeOrderTax","false",c),s=h("artp","removeTaxFromProducts","false",c),t=h("artd","removeTaxFromDiscount","false",c),u=h("atr","taxRate",b.taxRate||0,c),v=h("ald","land",!1,{})||(c.land&&!0===c.land?e("ranLandDateTime"):c.land)||!1,w=h("atrv","tr",!1,{})||(c.tr&&!0===c.tr?e("ranSiteID"):c.tr)||!1,x=h("acv","centValues","true",c),y=h("ancc","nonCentCurrencies","JPY",c);u=Math.abs(+u);var z=(100+u)/100,A=b.orderid||l(f);A=encodeURIComponent(A);var B=b.currency||"";B=encodeURIComponent(B.toUpperCase());var C=!1;if(B&&y){y=(y+"").split(",");for(var D=0;D<y.length;D++)y[D]==B&&(C=!0)}var F=function(a){return C&&(a=Math.round(a)),x&&"false"!==x?(a*=100,a=Math.round(a)):a=Math.round(100*a)/100,a+""},G=b.taxAmount?Math.abs(+b.taxAmount):0,H=b.discountAmount?Math.abs(+b.discountAmount):0,I=b.discountAmountLessTax?Math.abs(+b.discountAmountLessTax):0;!I&&H&&t&&u&&(I=H/z),I=I||H;var J="ep";"mop"===o&&(J="eventnvppixel");var K=(b.customerStatus||"")+"",L="";K&&(q&&"EXISTING"==K.toUpperCase()||q&&"RETURNING"==K.toUpperCase())&&(L="R_");for(var M=[],N=0,O=0;O<(b.lineitems?b.lineitems.length:0);O++)if(b.lineitems[O]){var P=!1,Q=a.JSON?JSON.parse(JSON.stringify(b.lineitems[O])):b.lineitems[O],R=+Q.quantity||0,S=+Q.unitPrice||0,T=+Q.unitPriceLessTax,U=T||S||0;s&&u&&!T&&(U/=z);for(var V,W=R*U,X=0;X<M.length;X++)V=M[X],V.SKU===Q.SKU&&(P=!0,V.quantity+=R,V.totalValue+=W);P||(Q.quantity=R,Q.totalValue=W,M.push(Q)),N+=W}for(var Y="",Z="",$="",_="",aa={},O=0;O<M.length;O++){var Q=M[O],ba=encodeURIComponent(Q.SKU),ca=Q.totalValue,R=Q.quantity,da=encodeURIComponent(Q.productName)||"";"item"===p.toLowerCase()&&I&&(ca-=I*ca/N);var ea=Q.optionalData;for(var fa in ea)ea.hasOwnProperty(fa)&&(aa[fa]=aa[fa]||"",aa[fa]+=encodeURIComponent(ea[fa])+"|");Y+=L+ba+"|",Z+=R+"|",$+=F(ca)+"|",_+=L+da+"|"}Y=Y.slice(0,-1),Z=Z.slice(0,-1),$=$.slice(0,-1),_=_.slice(0,-1),I&&(I=F(I)),G&&(G=F(G)),I&&"order"===p.toLowerCase()&&(Y+="|"+L+"DISCOUNT",_+="|"+L+"DISCOUNT",Z+="|0",$+="|-"+I),r&&G&&(Y+="|"+L+"ORDERTAX",Z+="|0",$+="|-"+G,_+="|"+L+"ORDERTAX");var ga="https://"+m+"/"+J+"?mid="+f;ga+="&ord="+A,ga+=v?"&land="+v:"",ga+=w?"&tr="+w:"",ga+="&cur="+B,ga+="&skulist="+Y,ga+="&qlist="+Z,ga+="&amtlist="+$,ga+="&img=1",ga+="&spi="+a[d].events.SPIVersion,I&&"item"===p.toLowerCase()&&(ga+="&discount="+I);var ea=b.optionalData||{};for(var fa in b.discountCode&&(ea.coupon=b.discountCode),b.customerStatus&&(ea.custstatus=b.customerStatus),b.customerID&&(ea.custid=b.customerID),I&&(ea.disamt=I),ea)ea.hasOwnProperty(fa)&&(ga+="&"+encodeURIComponent(fa)+"="+encodeURIComponent(ea[fa]));for(var fa in aa)aa.hasOwnProperty(fa)&&(ga+="&"+encodeURIComponent(fa)+"list="+aa[fa].slice(0,-1),I&&"order"===p.toLowerCase()&&(ga+="|"),G&&r&&(ga+="|"));ga+="&namelist="+_;if(8000<ga.length){for(var ha=8000;0<ha;)if("&"==ga.charAt(ha)){ga=ga.slice(0,ha);break}else ha--;ga+="&trunc=true"}k("img",ga,"body")},n=function(){var b=a[d]&&a[d].Sale&&a[d].Sale.Basket?a[d].Sale.Basket:{}
1,c=c||b.displayConfig||{},e=h("dmid","rdMID","",c);if(!e)return!1;if(!b.orderid&&!b.conversionType)return!1;var f=h("dtm","tagType","js",c),g=h("ddn","domain","tags.rd.linksynergy.com",c),j=h("dis","includeStatus","false",c),m=h("dcomm","allowCommission","notset",c),n=h("duup","useUnitPrice","false",c),o=h("drtp","removeTaxFromProducts","false",c),p=h("drtd","removeTaxFromDiscount","false",c),q=h("dtr","taxRate",b.taxRate||0,c),r="";"true"===m||!0===m||"1"===m||1===m?r="1":("false"===m||!1===m||"0"===m||0===m)&&(r="0"),f="js"===f||"if"===f||"img"===f?f:"js";var s="script";"if"===f?s="iframe":"img"===f&&(s="img"),("true"===n||!0===n||"1"===n||1===n)&&(n=!0);var t=(b.customerStatus||"")+"",u="";t&&j&&("EXISTING"==t.toUpperCase()||"RETURNING"==t.toUpperCase())&&(u="R_");var v=b.orderid;v||(v=l((b.conversionType+"").toLowerCase()+"_"+e)),v=encodeURIComponent(u+v);var w=encodeURIComponent(b.currency||""),x=0,y="";q=Math.abs(+q);var z=(100+q)/100,A=b.discountAmount?Math.abs(+b.discountAmount):0,B=b.discountAmountLessTax?Math.abs(+b.discountAmountLessTax):0;!B&&A&&p&&q&&(B=A/z),B=B||A,B=isNaN(B)?0:B;for(var C=0;C<(b.lineitems?b.lineitems.length:0);C++)if(b.lineitems[C]){var D=+b.lineitems[C].quantity,E=+b.lineitems[C].unitPriceLessTax*D;(!E||n)&&(o&&q?E=+b.lineitems[C].unitPrice/z*D:E=+b.lineitems[C].unitPrice*D),E=isNaN(E)?0:E,x+=E,y+=encodeURIComponent(b.lineitems[C].SKU)+","}x=Math.round(100*(x-B))/100,y=y.slice(0,-1);var F="https://"+g+"/"+f+"/"+e;F+="/?pt="+"conv",F+="&orderNumber="+v,F+="&spi="+a[d].events.SPIVersion,x&&(F+="&price="+x),w&&(F+="&cur="+w),r&&(F+="&tvalid="+r),y&&(F+="&prodID="+y),k(s,F,"body")},o=function(){var b=a[d]&&a[d].Sale&&a[d].Sale.Basket?a[d].Sale.Basket:{},c=b.searchConfig||{},e=1024,f=encodeURIComponent("...TRUNCATED"),g=h("smid","rsMID","",c);if(!g)return!1;var j=h("said","accountID","113",c),m=h("sclid","clickID","",c),n=encodeURIComponent(h("sct","conversionType",b.conversionType&&"sale"!==(b.conversionType+"").toLowerCase()?b.conversionType:"conv",c));k("script","https://services.xg4ken.com/js/kenshoo.js?cid="+g,"body",null,function(){var a={};if(a.conversionType=n,a.revenue=0,a.currency=encodeURIComponent(b.currency||"USD"),a.orderId=encodeURIComponent(b.orderid||l(n)),a.promoCode=encodeURIComponent(b.discountCode||""),m&&(a.ken_gclid=encodeURIComponent(m)),a.discountAmount=+(b.discountAmount||0),a.discountAmount=isNaN(a.discountAmount)?0:Math.abs(a.discountAmount),a.customerStatus=encodeURIComponent(b.customerStatus||""),a.productIDList="",a.productNameList="",b.lineitems&&b.lineitems.length){for(var c=0;c<b.lineitems.length;c++)b.lineitems[c]&&(a.revenue+=+(b.lineitems[c].unitPrice||0)*+b.lineitems[c].quantity,a.productIDList+=(b.lineitems[c].SKU||"NA")+",",a.productNameList+=(b.lineitems[c].productName||"NA")+",");a.revenue=Math.round(100*(a.revenue-a.discountAmount))/100,a.productIDList=encodeURIComponent(a.productIDList.slice(0,-1)),a.productNameList=encodeURIComponent(a.productNameList.slice(0,-1)),a.productIDList.length>e&&(a.productIDList=a.productIDList.substring(0,e-f.length)+f),a.productNameList.length>e&&(a.productNameList=a.productNameList.substring(0,e-f.length)+f)}kenshoo.trackConversion(j,g,a)})};a[d].SPI={readRMCookie:e,processRMStoreCookie:f,readRMStoreValue:h,sRAN:m,sDisplay:n,sSearch:o,addElement:k,rmStore:g},m(),n(),o()\n}(window,document,rm_trans);\n    `;const oo=document.createElement("script");if(oo.type="text/javascript",oo.async=!0,oo.innerHTML="\n      !function(e,n){var t,p;e.ndp||((t=e.ndp=function(){\n    t.handleRequest?t.handleRequest.apply(t,arguments):t.queue.push(arguments)\n    }).queue=[],t.v=1,(p=n.createElement(e=\"script\")).async=!0,\n    p.src=\"https://ads.nextdoor.com/public/pixel/ndp.js?id=b617d251-2d32-4607-a5d3-de9b3b2f6f9d\",\n    (n=n.getElementsByTagName(e)[0]).parentNode.insertBefore(p,n))\n    }(window,document);\n    ndp('init','b617d251-2d32-4607-a5d3-de9b3b2f6f9d', {});\n    ndp('track','PURCHASE');\n      ",l.current){l.current.appendChild(J),l.current.appendChild(X),l.current.appendChild(Z),l.current.appendChild(oo);const o=u.x.getItem("verbalPassword")||"";o&&n((o=>({...o,passVerbalPassword:!0}))),n((e=>({...e,verbalPassword:o}))),u.x.removeItem("verbalPassword")}const eo=null==e?void 0:e.planSku,no=(100*(null!==(G=s.D4[eo])&&void 0!==G?G:0)+100*(null!==(T=null==e||null===(U=e.totals)||void 0===U?void 0:U.orderTotalWithTax)&&void 0!==T?T:0))/100,to=Object.entries((null==e?void 0:e.cartProducts)||{}).map((o=>{let[e,n]=o;return{name:n.name,id:e,price:n.price,quantity:n.qty}})),ao={email:null==e||null===(K=e.customer1)||void 0===K?void 0:K.email,name:`${null==e||null===(A=e.customer1)||void 0===A?void 0:A.firstName} ${null==e||null===(Y=e.customer1)||void 0===Y?void 0:Y.lastName}`,checkout_id:null==e?void 0:e.cartId,order_id:null==e?void 0:e.orderNumber,accountId:null==e?void 0:e.accountId,total:null==e||null===(E=e.totals)||void 0===E?void 0:E.orderTotalWithTax,orderTotal:null==e||null===($=e.totals)||void 0===$?void 0:$.orderTotal,isPremium:null==e?void 0:e.isPremium,
1isValue:null==e?void 0:e.isValue,plan:"Value "+(null!=e&&e.isPremium?"Premium":null!=e&&e.isValue?"Plus":"Basic"),value:no,currency:"USD",eventModel:{transaction_id:null==e?void 0:e.orderNumber},ecommerce:{purchase:{actionField:{id:null==e?void 0:e.orderNumber,affiliation:"www.covesmart.com",revenue:Number(no.toFixed(2)),tax:Number(null!==(_=null==e||null===(j=e.totals)||void 0===j?void 0:j.orderTotalTax)&&void 0!==_?_:0).toFixed(2),shipping:0,coupon:null==e||null===(q=e.couponCodes)||void 0===q?void 0:q.join(","),coupons:null==e?void 0:e.couponCodes},products:to},value:null==e||null===(V=e.totals)||void 0===V?void 0:V.orderTotalWithTax}};y.A.track("order-confirmation",ao,{}),null===(H=window.posthog)||void 0===H||H.capture("order-confirmation",ao)}}),[]);const R=async function(o){if(void 0===o&&(o=!0),o){n((o=>({...o,submitting:!0})));const{orderNumber:o,equipment:a}=g.data,i={orderNumber:o,equipment:a.reduce(((o,n)=>{const t=e.sensors[n.pandoId];return t&&(o[n.sku]={locations:t}),o}),{})};try{await(0,B.ue)(i),W.track("name_sensors"),(0,w.navigate)(`/thanks/order-summary${"undefined"!=typeof window&&window.location.search||""}`)}catch(t){console.log("error",t)}n((o=>({...o,submitting:!0})))}else W.track("skip_name_sensors"),(0,w.navigate)(`/thanks/order-summary${"undefined"!=typeof window&&window.location.search||""}`)},k=o=>o.match(/^[A-Za-z0-9 ]+$/),C=()=>{const o=document.querySelector('[class^="orderConfirmation-module--verbal"]'),e=0===document.body.scrollTop?document.documentElement:document.body;o&&(e.scrollTop=o.offsetTop+o.scrollHeight/2)},D="complete"===e.status,x="error"===e.status,M="loading"===e.status;return(0,F.FD)(b.A,{isMinimal:!0,minimalFooter:!0,children:[(0,F.Y)("div",{ref:l,className:"mb-cove-137 px-cove-10 flex w-full flex-col items-center",children:(0,F.FD)("div",{className:"w-full max-w-md",children:[(0,F.Y)("h1",{className:"mb-cove-15 mt-cove-50 pr-cove-15 text-h1 text-cove-navy-blue w-full text-left sm:pr-0 sm:text-center",children:"Order Complete."}),(0,F.Y)("p",{className:"mb-cove-25 text-cove-dark-grey sm:mb-cove-50 w-full text-left sm:text-center",children:"We have sent you an email confirmation of your order!"}),(0,F.Y)(r.Ay,{cart:{...S,...null===(o=g.data)||void 0===o?void 0:o.cart},useOrder:!0,expandEquipmentDetails:!0}),e.passVerbalPassword?(0,F.Y)("div",{className:"my-cove-25 flex flex-col items-center"}):(0,F.FD)("div",{className:"my-cove-50 flex flex-col items-center",children:[(0,F.Y)("h2",{className:"mb-cove-15 text-h2 text-cove-navy-blue w-full text-left sm:text-center",children:"Create A Verbal Password"}),(0,F.FD)("p",{className:"mb-cove-25 text-cove-dark-grey sm:mb-cove-50 w-full text-left sm:text-center",children:["We’ll use your verbal password to confirm your identity when we speak with you. ",(0,F.Y)("br",{})," ",(0,F.Y)("i",{className:"font-light",children:"No special characters. Must be 3 to 24 characters long."})]}),!D&&(0,F.Y)("div",{className:"w-[290px]",children:(0,F.Y)(i.A,{name:"verbalPassword",className:"font-light",onChange:o=>(o=>{const t={verbalPassword:o,status:e.status};"error"===e.status&&o.length>=3&&(t.status="false"),n((o=>({...o,...t})))})(o.target.value),maxLength:24,placeholder:"Verbal password",error:x&&e.verbalPassword.length<3?"Must be at least 3 characters.":x&&e.verbalPassword.length>24?"Cannot be more than 24 characters.":x&&!k(e.verbalPassword)?"Must only contain letters, numbers, and spaces.":"",type:"text"})}),D&&(0,F.Y)("p",{className:"text-cove-green w-full text-center text-base font-normal",children:"Your verbal password has been updated!"}),(0,F.Y)("div",{className:"mt-cove-25",children:(0,F.Y)(d.A,{loading:M,disabled:D,onClick:()=>async function(o){void 0===o&&(o=!0),n((o=>({...o,status:"loading"})));const{orderNumber:t}=g.data,{verbalPassword:a}=e;if(a.length<3||a.length>24||!k(a))n((o=>({...o,status:"error"})));else{o&&C();try{await(0,B.VK)({orderNumber:t,verbalPassword:a})}catch(i){console.log("error",i),n((o=>({...o,status:"error"})))}n((o=>({...o,status:"complete"})))}}(),children:"Save and Continue"})})]}),(0,F.Y)("h2",{className:"mb-cove-15 text-h2 text-cove-navy-blue w-full text-left sm:text-center "+(e.passVerbalPassword?"mt-cove-50":""),children:"Customize your sensor names."}),(0,F.FD)("p",{className:"mb-cove-25 text-cove-dark-grey sm:mb-cove-50 w-full text-left sm:text-center",children:["Name your sensors and we will customize your system for you before we ship it. ",(0,F.Y)("br",{}),"Custom names are limited to 40 characters (including letters, numbers, and spaces). ",(0,F.Y)("br",{}),(0,F.Y)("i",{className:"font-light",children:"Optional But Recommended"})]}),(0,F.FD)("div",{className:"mb-cove-5 border-cove-dove py-cove-25 sm:px-cove-50 sm:py-cove-50 md:px-cove-75 relative border-none px-0 sm:border",children:[(0,F.FD)("div",{className:"border-cove-dove hidden h-[48px] w-full items-center justify-between border-b-[2px] sm:flex",children:[(0,F.Y)("p",{className:"w-1/2 text-lg font-bold",children:"Sensor Type"}),(0,F.Y)("p",{className:"w-1/2 flex-grow text-lg font-bold"}),(0,F.Y)("p",{className:"w-1/2 text-lg font-bold ",children:"Name"})]}),(0,F.Y)(v.A,{handleChange:(o,a,i)=>{const d=(0,t.A)(e.sensors[o]||[]),r=e[i];r&&d.indexOf(r)>-1?d.splice(d.indexOf(r),1,a):a&&d.push(a),n((e=>({...e,sensors:{...e.sensors,[o]:d},[i]:a})))},state:e,values:e.sensors}),(0,F.FD)("div",{className:"sm:py-cove-25 flex w-full flex-col items-center p-0",children:[(0,F.Y)(d.A,{variant:"outlined",onClick:()=>R(),disabled:e.submitting,loading:e.submitting,children:"Update Sensor Names"}),(0,F.Y)("button",{className:"mt-cove-50 text-cove-blue cursor-pointer bg-transparent p-0 text-base leading-[16
1px] underline",onClick:()=>R(!1),children:"No thanks, I’ll update my sensors later."})]})]})]})}),(0,F.Y)("img",{height:"1",width:"1",alt:"",src:"https://s.amazon-adsystem.com/iui3?d=forester-did&ex-fargs=%3Fid%3D2a97812b-63aa-9b13-c42c-9ef3bf004c22%26type%3D54%26m%3D1&ex-fch=416613&ex-src=https://covesmart.com&ex-hargs=v%3D1.0%3Bc%3D3392704130001%3Bp%3D2A97812B-63AA-9B13-C42C-9EF3BF004C22"})]})}},22447:function(o,e,n){n.d(e,{U:function(){return d}});var t=n(14041);const a="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,i="undefined"==typeof window;function d(o,e){let{defaultValue:n=!1,initializeWithValue:d=!0}=void 0===e?{}:e;const r=o=>i?n:window.matchMedia(o).matches,{0:s,1:l}=(0,t.useState)((()=>d?r(o):n));function c(){l(r(o))}return a((()=>{const e=window.matchMedia(o);return c(),e.addListener?e.addListener(c):e.addEventListener("change",c),()=>{e.removeListener?e.removeListener(c):e.removeEventListener("change",c)}}),[o]),s}},59406:function(o,e,n){n.d(e,{f:function(){return i}});var t=n(22509),a=n(78989);function i(o,e){const n=(0,t.a)(o);return isNaN(e)?(0,a.w)(o,NaN):e?(n.setDate(n.getDate()+e),n):n}}}]);
2//# sourceMappingURL=component---src-pages-thanks-order-confirmation-index-tsx-30949b8f3a4f7dfb59dd.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.