window.__attn_loaded_via_cloudflare = true;
!function(){'use strict';function e(t){return e='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},e(t)}var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&'function'==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function r(e,t,n,r){return new(n||(n=Promise))((function(t,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function o(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,o)}c((r=r.apply(e,[])).next())}))}function i(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},'function'==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError('Generator is already executing.');for(;a&&(a=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function a(e,t,n){for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}const o='attn-waitlist-trigger-btn',c='attn-waitlist-trigger',u='attn-waitlist-eligibility',s='data-bis-opt-ins';function d(){return document.getElementById(o)}function l(e,t){const n=d()??function(){const e=document.createElement('button');return e.id=o,e.type='button',e}(),{text:r,classList:i,alignment:a,enrolledText:c}=e.settings;n.innerText=r,n.setAttribute('data-enabled-text',r),n.setAttribute('data-disabled-text',c),n.setAttribute('data-signup-complete',`${t}`),n.classList.add(...i.split(','));const u=f();return u&&(u.style.textAlign=a),n}function v(e){const t=e.getAttribute('data-disabled-text');t&&(e.disabled=!0,e.innerText=t)}function f(){return document.getElementById(c)}function p(){return document.getElementById(u)}function m(e){e.removeAttribute('data-product-id'),e.removeAttribute('data-variant-id'),e.style.display='none'}function g({productId:e,variantId:t}){return`${e}:${t}`}function y(){const e=f();return e?e.getAttribute(s)?.split(',')??[]:[]}const h='attn-inline-price-trigger-btn',_='attn-inline-price-trigger';function E(){return document.getElementById(h)}function C(e){const t=E()??function(){const e=document.createElement('button');return e.id=h,e.type='button',e}(),{beforeOfferText:n,offer:r,afterOfferText:i,classList:a,alignment:o}=e.settings,c=I();c&&(c.style.textAlign=o);let u='Get it for a discount if you sign up for texts';const s=c?.getAttribute('data-product-price');if(s&&!isNaN(Number(s))){u=[n,function(e,t){const n=t.replace(/\W/g,'');if(t.includes('%')){const t=(e*(1-Number(n)/100)).toFixed(2);return t.endsWith('00')?['$',Math.round(Number(t))].join(''):['$',t].join('')}return t.includes('$')?['$',e-Number(n)].join(''):t}(Number(s),r),i].join(' ')}return t.innerText=u,t.setAttribute('data-enabled-text',u),t.classList.add(...a.split(',')),t}function I(){return document.getElementById(_)}function w(e){e.removeAttribute('data-product-price'),e.style.display='none'}var T=(e=>(e.TagCoreLoaded='attn.tag-core.loaded',e.TagCreativesLoaded='attn.tag-creatives.loaded',e.FetchCreativesStart='attn.fetch-creatives.start',e.FetchCreativesEnd='attn.fetch-creatives.end',e))(T||{});function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,'default')?e.default:e}var A,S={exports:{}};A=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function a(t,n,a){if('undefined'!=typeof document){'number'==typeof(a=e({path:'/'},i.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():'';try{var o=JSON.stringify(n);/^[\{\[]/.test(o)&&(n=o)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c='';for(var u in a)a[u]&&(c+='; '+u,!0!==a[u]&&(c+='='+a[u].split(';')[0]));return document.cookie=t+'='+n+c}}function o(e,n){if('undefined'!=typeof document){for(var i={},a=document.cookie?document.cookie.split('; '):[],o=0;o<a.length;o++){var c=a[o].split('='),u=c.slice(1).join('=');n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var s=t(c[0]);if(u=(r.read||r)(u,s)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(i[s]=u,e===s)break}catch(e){}}return e?i[e]:i}}return i.set=a,i.get=function(e){return o(e,!1)},i.getJSON=function(e){return o(e,!0)},i.remove=function(t,n){a(t,'',e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},S.exports=A();const O=b(S.exports);function L(e){return O.get(e)}window.__attentive_cfg?.cxd;const N=390;function P(e,t,n){const r={secure:window.location.protocol.includes('https'),...n,expires:k(n?.expires)},i=function(e){const t=e.replace(/^www\./,''),n=t.split('.');if(n.length>=3){const e=n.slice(-2).join('.');if(['co.uk','com.au','co.nz','co.za','com.br','com.mx','co.jp','co.in','co.il','co.kr','uk.com','myshopify.com','gap.com','vercel.app'].includes(e))return'.'+n.slice(-3).join('.')}return n.length>=2?'.'+n.slice(-2).join('.'):'.'+t}(window.location.hostname);return r.domain=i,R(e),O.set(e,t,r)}function R(e,t){O.remove(e,t)}function k(e){if(!e)return N;if(e instanceof Date){return e<new Date(Date.now()+864e5*N)?e:N}return Math.min(N,e)}const D='2026.02.3',B='https://events.attentivemobile.com/e',x='https://events.attentivemobile.com/ct-ev',M='c47c05f7e5',U='0',F='1',H='2',j='3',V='6',G='9',q='10',Y='11',$='12',K='fb',W='ga',J='t0',X='np',z='spp',Z='wct',Q='mgt',ee='gtag',te='jlda',ne='ds',re='mv',ie='vv',ae='x',oe='i',ce='r',ue='m',se='trg',de='enr',le='trn',ve='id',fe='pth',pe='pt',me='es',ge='mp',ye='ev',he='ep',_e='e2p',Ee='a',Ce='mu',Ie='mt',we='rgx',Te='tms',be='csk',Ae='s',Se='ws',Oe='atr',Le='prop',Ne='ro',Pe='cnd',Re='qp',ke='vidc',De='esit',Be='cs',xe='c',Me='ceid',Ue='m',Fe='cb',He='t',je='lt',Ve='pd',Ge='r',qe='v',Ye='u',$e='mfbc',Ke='mfbp',We='meid',Je='mcns',Xe='frid',ze='fvid',Ze='fcds',Qe='tag',et='tc',tt='ane',nt='sqp',rt='evs',it='idc',at='sbc',ot='dae',ct='swp',ut='swpe',st='swpl',dt='swet',lt='swpm',vt='swpmpid',ft='bctu',pt='eat',mt='ses',gt='@_@',yt='vid',ht='ust',_t='tga',Et='pd',Ct='snd',It='cu',wt='c',Tt='v',bt='d',At='p',St='e',Ot='o',Lt='oc',Nt='t',Pt='r',Rt='l',kt='s',Dt='pl',Bt='idn',xt='sa',Mt=['Add to cart','Add to Bag','Buy Now','Add','#addToCart','#add-to-cart','#AddToCart','Order Now','Buy it now','.product__add-to-cart','[name="add"]','[data-label="Add to Cart"]','[data-add-to-cart]','#addToCartBtn','[value="Add to Bag"]','[value="Add to Cart"]','[value="Add to Order"]'],Ut=[['2','3','4','5'],['C0002','C0003','C0004','C0005']],Ft='emc',Ht='mpid';var jt=(e=>(e.Click='click',e.DataLayer='datalayer',e.OrderConfirmedPage='order confirmed page',e))(jt||{}),Vt=(e=>(e.OrderConfirmedIdentifiers='order confirmed identifiers',e))(Vt||{}),Gt=(e=>(e.ADD_TO_CART_TRIGGER='AddToCartTrigger',e.DATA_LAYER_FOR_ADD_TO_CART='DataLayerForAddToCart',e.DATA_LAYER_FOR_ALL_EVENTS='DataLayerForAllEvents',e.DATA_LAYER_FOR_PRODUCT_VIEW='DataLayerForProductView',e.DATA_LAYER_FOR_PURCHASE='DataLayerForPurchase',e.SORT_ACTION_TRIGGER='SortActionTrigger',e))(Gt||{});jt.Click,Gt.ADD_TO_CART_TRIGGER,Gt.SORT_ACTION_TRIGGER,jt.DataLayer,Gt.DATA_LAYER_FOR_ADD_TO_CART,Gt.DATA_LAYER_FOR_ALL_EVENTS,Gt.DATA_LAYER_FOR_PRODUCT_VIEW,Gt.DATA_LAYER_FOR_PURCHASE,jt.OrderConfirmedPage,Vt.OrderConfirmedIdentifiers;const qt='co',Yt='uo',$t='ma',Kt='in';function Wt(e){return null!=e&&'object'==typeof e&&null!=e.val}function Jt(e){return Object.entries(e).reduce(((e,[t,n])=>(Wt(n)?Wt(n)&&!n[Kt]&&e.push(`${t}=${encodeURIComponent(n.val)}`):'object'==typeof n&&null!=n?e.push(`${t}=${encodeURIComponent(JSON.stringify(n))}`):'string'!=typeof n&&'number'!=typeof n&&'boolean'!=typeof n||e.push(`${t}=${encodeURIComponent(n)}`),e)),[]).join('&')}const Xt={};function zt(e,t){const n={errorCode:e,message:t.message,name:t.name,errorStack:t.stack};if(Xt[e]&&Xt[e].message===t.message&&Xt[e].name===t.name)return null;Xt[e]=n;const r=Jt({...n,[He]:St,[qe]:D}),i=`${B}?${r}`,a=new Image(1,1);return a.src=i,a}const Zt={ometria:'omID',listrak:'eKey'},Qt=0,en=1,tn=2,nn=6,rn=7,an=8,on=9,cn=10,un=11,sn=12,dn=13,ln='edgetag_user_id',vn='__attn_eat_id';function fn(e=[]){const t={vendor:Qt,id:window.ShopifyAnalytics?.meta?.page?.customerId??null},n={vendor:en,id:new URLSearchParams(window.location.search).get('utm_klaviyo_id')??null};let r=null,i=null;try{const e=new URLSearchParams(window.location.search);r=e.get('SubKey')??e.get('sfmc_sub')??e.get('sfmc_id')??e.get('sfmc_s')??null,i=e.get('cordial_id')??null}catch(e){DEBUG}const a={vendor:cn,id:r},o={vendor:un,id:i},c=[t,n,{vendor:tn,id:L('__attentive_client_user_id')??null},{vendor:rn,id:window.triggermail?.persist?.read_prop('distinct_id')??L('__attentive_bluecore_id')??null},{vendor:an,id:L('_shopify_y')??null},{vendor:on,id:L('__cq_uuid')??null},a,o,{vendor:sn,id:L(vn)??null}];try{const e=new URLSearchParams(window.location.search);Object.entries(Zt).forEach((([t,n])=>{const r=e.get(n);r&&c.push({vendor:dn,id:r,name:t})}))}catch(e){DEBUG}const u=L('__attentive_custom_ids');if(u){JSON.parse(u).forEach((e=>{c.push({vendor:nn,name:e.name,id:e.value})}))}const s={vendor:nn,id:window.edgetag?.('getUserId')??null,name:ln};s.id&&c.push(s);const d=c.filter((t=>t.id&&e.includes(t.vendor)));return d.length?d:null}const pn=/[\s|()-]/g,mn=/^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/,gn=/^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?#(\d{4}|\d{3}))?$/,yn=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:+))/,hn=/[^.\d]/g,_n=/\.(.*?\d*)/g,En=/^[.,]|[.,]$|\s/g,Cn=(e,t=!1)=>{if('string'!=typeof e)return e;const n=e.replace(pn,''),r=mn.test(n),i=gn.test(n);return r?n:i?function(e){return'0'===e[0]?e.substring(1):'+44'===e.substring(0,3)?e.substring(3):e}(n):t?null:e.replace(hn,'')},In=e=>{const t=wn(e);return yn.test(t)?e:null},wn=e=>e.replace(En,''),Tn=e=>{if('string'!=typeof e)return e;let t=e.replace(hn,'');const n=t.indexOf('.');return n>=0&&(t=t.substring(0,n+3)),t},bn=e=>'string'!=typeof e?e:e.replace(hn,'').replace(_n,''),An=e=>'string'!=typeof e?e:e.replace('\n','').trim(),Sn=e=>{if('string'!=typeof e)return e;const t=e.indexOf('#');return(-1===t?e:e.substring(t+1)).trim()},On=e=>{try{return new URL(function(e){/(^\/\/).*/.test(e)&&(e='https:'+e);return e}(e)).href}catch{return e}};function Ln(e){return(t,n,r)=>{const i=e[n.type];'function'==typeof i&&i(t,n,r)}}const Nn=function(){const e='_-_';try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}(),Pn=function(){const e='_-_';try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function Rn(){let e=Date.now()+performance.now();return'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g,(t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),('x'===t?n:3&n|8).toString(16)}))}function kn(e){return/^[0-9a-fA-F]{32}$/.test(e)}const Dn={shopify:{evaluateEligibility:function(e){try{const{variantId:t}=e,n=function(){try{const e=p()?.innerHTML;return JSON.parse(e||'')}catch(e){return}}();return!!n?.[t]}catch(e){return!1}}},base:{evaluateEligibility:function(e){try{return null!==document.querySelector('.attn-oos')}catch(e){return!1}}}};var Bn=(e=>(e.ActionButton='ActionButton',e.AgeGating='AgeGating',e.Background='Background',e.BubbleStyles='BubbleStyles',e.CheckoutProduct='CheckoutProduct',e.CloseIcon='CloseIcon',e.CompleteYourSignupSVG='CompleteYourSignupSVG',e.Countdown='Countdown',e.DismissButton='DismissButton',e.OptionalEmailButton='OptionalEmailButton',e.Image='Image',e.Input='Input',e.LegalText='LegalText',e.Logo='Logo',e.SuccessPhoneSVG='SuccessPhoneSVG',e.TextHeader='TextHeader',e.MobileExperience='MobileExperience',e.OfferWheel='OfferWheel',e.BubbleIcon='BubbleIcon',e.PrimaryCTA='PrimaryCTA',e.SMSPrefilledText='SMSPrefilledText',e.CustomCSS='CustomCSS',e.AttributeInputs='AttributeInputs',e.PageTimeout='PageTimeout',e.FeatureFlagCondition='FeatureFlagCondition',e.CustomAlreadySubscribedError='CustomAlreadySubscribedError',e.LandingPageURL='LandingPageURL',e.PageTimeoutRedirectButton='PageTimeoutRedirectButton',e.PreEngagementConsentButton='PreEngagementConsentButton',e.PreEngagementDenyButton='PreEngagementDenyButton',e.ProductHighlight='ProductHighlight',e.QrCodeSignup='QrCodeSignup',e))(Bn||{}),xn=(e=>(e.INFO='INFO',e.WARNING='WARNING',e))(xn||{}),Mn=(e=>(e.PLAIN='PLAIN',e.BLOCK='BLOCK',e.BOLD='BOLD',e))(Mn||{}),Un=(e=>(e.EST='America/New_York',e.CST='America/Chicago',e.MST='America/Denver',e.PST='America/Los_Angeles',e.GMT='Europe/London',e.NST='America/St_Johns',e.AST='America/Halifax',e.AWT='Australia/Perth',e.ACWT='Australia/Eucla',e.ACT='Australia/Darwin',e.AETB='Australia/Brisbane',e.AET='Australia/Sydney',e.LHT='Australia/Lord_Howe',e.CEST='Europe/Paris',e.AZOST='Atlantic/Azores',e.ACT1='America/Rio_Branco',e.AMT='America/Manaus',e.BRT='America/Sao_Paulo',e.FNT='America/Noronha',e.PT='America/Tijuana',e.MT='America/Hermosillo',e.CT='America/Mexico_City',e.ET='America/Cancun',e.NZDT='Pacific/Auckland',e))(Un||{}),Fn=(e=>(e.enUS='en-US',e.enCA='en-CA',e.enGB='en-GB',e.enAU='en-AU',e.enNZ='en-NZ',e.enFR='en-FR',e.enBE='en-BE',e.enBR='en-BR',e.enCH='en-CH',e.enDE='en-DE',e.enDK='en-DK',e.enES='en-ES',e.enIT='en-IT',e.enMX='en-MX',e.enNL='en-NL',e.enNO='en-NO',e.enPL='en-PL',e.enPT='en-PT',e.enSE='en-SE',e.frFR='fr-FR',e.frBE='fr-BE',e.frCA='fr-CA',e.frCH='fr-CH',e.enIE='en-IE',e.itIT='it-IT',e.nlNL='nl-NL',e.ptPT='pt-PT',e.ptBR='pt-BR',e.esES='es-ES',e.esMX='es-MX',e.svSE='sv-SE',e.deDE='de-DE',e.nlBE='nl-BE',e.deCH='de-CH',e.plPL='pl-PL',e.noNO='no-NO',e.daDK='da-DK',e))(Fn||{});function Hn(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function jn(e,t){if(t.length<e)throw new TypeError(e+' argument'+(e>1?'s':'')+' required, but only '+t.length+' present')}function Vn(t){jn(1,arguments);var n=Object.prototype.toString.call(t);return t instanceof Date||'object'===e(t)&&'[object Date]'===n?new Date(t.getTime()):'number'==typeof t||'[object Number]'===n?new Date(t):new Date(NaN)}function Gn(t,n){if(jn(2,arguments),!n||'object'!==e(n))return new Date(NaN);var r=n.years?Hn(n.years):0,i=n.months?Hn(n.months):0,a=n.weeks?Hn(n.weeks):0,o=n.days?Hn(n.days):0,c=n.hours?Hn(n.hours):0,u=n.minutes?Hn(n.minutes):0,s=n.seconds?Hn(n.seconds):0,d=Vn(t),l=i||r?function(e,t){jn(2,arguments);var n=Vn(e),r=Hn(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),a=new Date(n.getTime());return a.setMonth(n.getMonth()+r+1,0),i>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),i),n)}(d,i+12*r):d,v=o||a?function(e,t){jn(2,arguments);var n=Vn(e),r=Hn(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(l,o+7*a):l,f=1e3*(s+60*(u+60*c));return new Date(v.getTime()+f)}var qn=(e=>(e.SMS='sms',e.EMAIL='email',e.AGE_GATE='age_gate',e.METADATA_TEXT='metadata_text',e))(qn||{}),Yn=(e=>(e.PARTIAL='partial',e.FULLSCREEN='fullscreen',e))(Yn||{});Fn.enGB,Fn.enFR,Fn.enBE,Fn.enCH,Fn.enDE,Fn.enDK,Fn.enES,Fn.enIT,Fn.enNL,Fn.enNO,Fn.enPL,Fn.enPT,Fn.enSE,Fn.frFR,Fn.frBE,Fn.frCA,Fn.frCH,Fn.enIE,Fn.itIT,Fn.nlNL,Fn.ptPT,Fn.ptBR,Fn.esES,Fn.svSE,Fn.deDE,Fn.nlBE,Fn.deCH,Fn.plPL,Fn.noNO,Fn.daDK;const $n={backgroundColor:'#000000',fontColor:'#FFFFFF'},Kn={legal:'0.625rem'};var Wn=(e=>(e.visitor='RELATIVE',e.global='ABSOLUTE',e))(Wn||{}),Jn=(e=>(e.DAYS='DAYS',e.HOURS='HOURS',e.MINUTES='MINUTES',e.SECONDS='SECONDS',e))(Jn||{});Un.EST;var Xn=(e=>(e.DESKTOP='DESKTOP',e.ON_SITE='ON_SITE',e.LANDING_PAGE='LANDING_PAGE',e.LEGAL='LEGAL',e.INTEGRATION='INTEGRATION',e.TEXT_TO_JOIN='TEXT_TO_JOIN',e.MANUAL_UPLOAD='MANUAL_UPLOAD',e))(Xn||{}),zn=(e=>(e.DYNAMIC='DYNAMIC',e.CONVERSATIONAL='CONVERSATIONAL',e.PRIVACY='PRIVACY',e.TERMS='TERMS',e.COUPON_DISPLAY_SCREEN='COUPON_DISPLAY_SCREEN',e.NO_SHOW='NO_SHOW',e.SHOPIFY_CHECKOUT='SHOPIFY_CHECKOUT',e.SHOPIFY_CHECKOUT_TRANSACTIONAL='SHOPIFY_CHECKOUT_TRANSACTIONAL',e.SHOPIFY_CHECKOUT_EMAIL='SHOPIFY_CHECKOUT_EMAIL',e.UNSUBSCRIBE='UNSUBSCRIBE',e.RECHARGE_CHECKOUT='RECHARGE_CHECKOUT',e.RECHARGE_CHECKOUT_TRANSACTIONAL='RECHARGE_CHECKOUT_TRANSACTIONAL',e.AFFILIATE_ENDPOINT='AFFILIATE_ENDPOINT',e.OFFER_DISPLAY='OFFER_DISPLAY',e.PREFERENCE_COLLECTION='PREFERENCE_COLLECTION',e.CODE='CODE',e.LANDING_PAGE='LANDING_PAGE',e.MOBILE_APP='MOBILE_APP',e.FULL_SCREEN='FULL_SCREEN',e.EMAIL_FULL_SCREEN='EMAIL_FULL_SCREEN',e.BUBBLE_FULL_SCREEN='BUBBLE_FULL_SCREEN',e.EMAIL_BUBBLE_FULL_SCREEN='EMAIL_BUBBLE_FULL_SCREEN',e.PARTIAL='PARTIAL',e.EMAIL_PARTIAL='EMAIL_PARTIAL',e.BUBBLE_PARTIAL='BUBBLE_PARTIAL',e.EMAIL_BUBBLE_PARTIAL='EMAIL_BUBBLE_PARTIAL',e.BUBBLE='BUBBLE',e.LIGHTBOX='LIGHTBOX',e.LIGHTBOX_BUBBLE='LIGHTBOX_BUBBLE',e.EMAIL_LIGHTBOX='EMAIL_LIGHTBOX',e.EMAIL_WIZARD='EMAIL_WIZARD',e.MANUAL_ENTRY='MANUAL_ENTRY',e.PRODUCT_DISPLAY='PRODUCT_DISPLAY',e))(zn||{}),Zn=(e=>(e.LEFT='left',e.CENTER='center',e.RIGHT='right',e.JUSTIFY='justify',e))(Zn||{});Mn.BLOCK,xn.WARNING;var Qn=(e=>(e.OPEN='OPEN',e.IMPRESSION='IMPRESSION',e.LEAD='LEAD',e.EMAIL_LEAD='EMAIL_LEAD',e.CLOSE='CLOSE',e.EXPAND='EXPAND',e.SHRINK='SHRINK',e.DETECT_EXIT_INTENT='DETECT_EXIT_INTENT',e.SET_COOKIE='SET_COOKIE',e.RESIZE_FRAME='RESIZE_FRAME',e.CREATIVE_PAGE_VIEW='CREATIVE_PAGE_VIEW',e.ADD_TO_CART='ADD_TO_CART',e))(Qn||{}),er=(e=>(e.GOOGLE_ANALYTICS_4='GOOGLE_ANALYTICS_4',e.GOOGLE_ANALYTICS='GOOGLE_ANALYTICS',e.FACEBOOK_PIXEL='FACEBOOK_PIXEL',e.NORTHBEAM_PIXEL='NORTHBEAM_PIXEL',e.DATALAYER_PUSH='DATALAYER_PUSH',e))(er||{});er.GOOGLE_ANALYTICS_4,er.GOOGLE_ANALYTICS,er.FACEBOOK_PIXEL,er.NORTHBEAM_PIXEL,er.DATALAYER_PUSH,er.GOOGLE_ANALYTICS_4,er.GOOGLE_ANALYTICS,er.FACEBOOK_PIXEL,er.NORTHBEAM_PIXEL,er.DATALAYER_PUSH;const tr={[er.GOOGLE_ANALYTICS_4]:{[Qn.IMPRESSION]:{name:'impression',reportPageType:!1},[Qn.EMAIL_LEAD]:{name:'submitEmail',reportEmail:!1,reportPageType:!1},[Qn.LEAD]:{name:'submitSMS',reportPageType:!1},[Qn.CLOSE]:{name:'close',reportPageType:!1},[Qn.EXPAND]:{name:'expand',reportPageType:!1}},[er.GOOGLE_ANALYTICS]:{[Qn.IMPRESSION]:{name:'impression'},[Qn.EMAIL_LEAD]:{name:'submitEmail',reportEmail:!1},[Qn.LEAD]:{name:'submitSMS'},[Qn.CLOSE]:{name:'close'},[Qn.EXPAND]:{name:'expand'}},[er.FACEBOOK_PIXEL]:{[Qn.IMPRESSION]:{name:'ViewContent'},[Qn.EMAIL_LEAD]:{name:'Contact',reportEmail:!1},[Qn.LEAD]:{name:'Lead'},[Qn.CLOSE]:{name:'Close'},[Qn.EXPAND]:{name:'Expand'}},[er.NORTHBEAM_PIXEL]:{[Qn.EMAIL_LEAD]:{name:'submitEmail',reportEmail:!0},[Qn.LEAD]:{name:'submitSMS',reportPhone:!0}},[er.DATALAYER_PUSH]:{[Qn.IMPRESSION]:{name:'impression'},[Qn.EMAIL_LEAD]:{name:'submitEmail',reportEmail:!1},[Qn.LEAD]:{name:'submitSMS'},[Qn.CLOSE]:{name:'close'},[Qn.EXPAND]:{name:'expand'}}};function nr(e){const t={enabled:!1,id:'',reportCreative:!0,eventOptions:tr[e]};if(e===er.GOOGLE_ANALYTICS)t.eventCategory='Attentive';return t}for(const e in er)nr(e);var rr=(e=>(e.BUBBLE='bubble',e.FIELD_CAPTURE='field_capture',e.SUCCESS='success',e.COUPON='coupon',e.EMAIL_GATE='email_gate',e.SPIN_TO_WIN='spin_to_win',e.OFFER_WHEEL='offer_wheel',e.EXISTING_SUBSCRIBER='existing_subscriber',e.LIVE_SMS='live_sms',e.PREVIEW_TOOLTIP='preview_tooltip',e.UNSUBSCRIBE='unsubscribe',e.PRE_ENGAGEMENT='pre_engagement',e.MYSTERY_OFFER='mystery_offer',e.EXISTING_SUBSCRIBER_EXPERIMENT='existing_subscriber_experiment',e.SCRATCH_OFF='scratch_off',e.PREFERENCE_COLLECTION='preference_collection',e))(rr||{});var ir=(e=>(e.LEFT='left',e.RIGHT='right',e))(ir||{}),ar=(e=>(e.TOP='top',e.BOTTOM='bottom',e))(ar||{});Bn.BubbleStyles;const or={color:$n.fontColor,backgroundColor:$n.backgroundColor,backgroundOpacity:'100%',transparentBackground:!1,size:Kn.legal,font:0,alignment:Zn.JUSTIFY};((e,t)=>{const n=[];if(void 0===e.active||e.active){const r={v:2,styles:{color:e.textConfig?.color,backgroundColor:e.textConfig?.backgroundColor,backgroundOpacity:e.textConfig?.backgroundOpacity,transparentBackground:e.textConfig?.transparentBackground,fontSize:e.textConfig?.size,font:e.textConfig?.font,textAlign:e.textConfig?.alignment??Zn.JUSTIFY,marginTop:e?.marginTop,marginBottom:e?.marginBottom},content:{customContent:e.content?.customContent,optionalLink:e.content?.optionalLink},placement:Boolean(!e.displayBelowInputs)||t?'below-headers':'below-inputs'};e.checkbox?.active&&(r.checkbox={border:e.checkbox?.border,checkColor:e.checkbox?.checkColor,icon:e.checkbox?.icon,active:!0}),n.push(r)}if(e.content?.additionalLegalText){const t={v:2,styles:{color:e.additionalLegalTextConfig?.color||e.textConfig?.color,backgroundColor:e.additionalLegalTextConfig?.backgroundColor||e.textConfig?.backgroundColor,backgroundOpacity:e.additionalLegalTextConfig?.backgroundOpacity||e.textConfig?.backgroundOpacity,transparentBackground:e.additionalLegalTextConfig?.transparentBackground??e.textConfig?.transparentBackground,fontSize:e.additionalLegalTextConfig?.size||e.textConfig?.size,font:e.additionalLegalTextConfig?.font||e.textConfig?.font,textAlign:(e.additionalLegalTextConfig?.alignment||e.textConfig?.alignment)??Zn.JUSTIFY},placement:'below-buttons',content:{customContent:e.content?.additionalLegalText}};n.push(t)}return n})({textConfig:or,content:{},additionalLegalTextConfig:or},!0)[0];rr.LIVE_SMS,qn.SMS;const cr=e=>e.subType===zn.CONVERSATIONAL&&(e.type===Xn.ON_SITE||e.type===Xn.DESKTOP),ur=['immediately','delay','scroll','exitIntent','backInStock','pdpPrice','addToCart'],sr=['overlay','support','embedded'],dr=e=>!!e&&e.includes('TEXT');var lr=(e=>(e.SOURCE='source',e.CAMPAIGN='campaign',e.CONTENT='content',e.MEDIUM='medium',e.TERM='term',e))(lr||{});function vr(e,t,n={}){const{leading:r=!1,trailing:i=!0,maxWait:a}=n;let o,c,u,s=0,d=0;function l(t){const n=c||[];return c=void 0,d=t,u=e(...n),u}function v(e){const n=e-s;return 0===s||n>=t||n<0||void 0!==a&&e-d>=a}function f(){const e=Date.now();if(v(e))return p(e);o=setTimeout(f,function(e){const n=e-d,r=t-(e-s);return void 0===a?r:Math.min(r,a-n)}(e))}function p(e){return o&&clearTimeout(o),o=void 0,i&&c?l(e):(c=void 0,u)}function m(...e){const n=Date.now(),i=v(n);return c=e,s=n,i?o?(clearTimeout(o),o=setTimeout(f,t),l(s)):(d=a=s,o=setTimeout(f,t),r?l(a):u):(void 0===o&&(o=setTimeout(f,t)),u);var a}return m.cancel=function(){o&&clearTimeout(o),s=0,d=0,c=void 0,o=void 0},m.flush=function(){return o?p(Date.now()):u},m}function fr(e,t,n){if(e===t)return!0;if((void 0===e||void 0===t||null===e||null===t)&&(e||t))return!1;const r=e?.constructor.name,i=t?.constructor.name;if(r!==i)return!1;if('Array'===r){if(e.length!==t.length)return!1;let n=!0;for(let r=0;r<e.length;r++)if(!fr(e[r],t[r])){n=!1;break}return n}if('Object'===r){let n=!0;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i=0;i<r.length;i++)if(!fr(e[r[i]],t[r[i]])){n=!1;break}return n}return e===t}function pr(e){return'ct'in e&&'canvas'===e.ct}const mr='__attentive_email_creativeFilter';var gr=(e=>(e.OVERLAY_DATA='OVERLAY_DATA',e.EXIT_INTENT='EXIT_INTENT',e))(gr||{});const yr=e=>{const t=new Date;return t.setTime(t.getTime()+1e3*e),t},hr=()=>yr(1800),_r=window;class Er{MAX_AGE;MAX_AGE_DAYS;userId;__attentive_domain;constructor(){const e=_r.__attentive_cfg&&_r.__attentive_cfg.gdpr;this.MAX_AGE=e?33696e3:189216e4,this.MAX_AGE_DAYS=Math.round(this.MAX_AGE/86400),this.userId=null,this.__attentive_domain=_r.__attentive_domain}getId(){return this.userId||this.setId(),this.userId}rotateId(){this.userId=null,R('__attentive_id'),R('__attentive_cco'),this.setId()}getCookie=e=>document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${e}\\s*=\\s*([^;]*).*$)|^.*$`),'$1');createImg=e=>{new Image(1,1).src=`https://${this.__attentive_domain}${e}`};setId=()=>{const e='__attentive_cco',{getQueryParam:t,getCookie:n,createImg:r}=this,i=n('__attentive_id'),a=n(e),o=t('attn-vid')||t('visitorId'),c=t('attn-sid')||t('subscriberId'),u=t('attn-eid')||t('externalId'),s=t('altid'),d=Boolean(i),l=this.userId;let v=!1;if(a)try{const e=new Date(Number(a)+1e3*this.MAX_AGE),t=new Date;e.valueOf()-t.valueOf()<2592e6&&(v=!0)}catch(e){}d||null==o?i&&o?(this.userId=i,o!==i&&r(`/sv?qid=${o}&cid=${i}`)):Pn&&null!==localStorage.getItem('__attentive_id')?(this.userId=localStorage.getItem('__attentive_id'),localStorage.removeItem('__attentive_id')):this.userId=!i&&!o||v?Rn():i:this.userId=o,c?r(`/sv?sid=${c}&cid=${this.userId}`):s?r(u?`/sv?altid=${s}&seid=${u}&cid=${this.userId}`:`/sv?altid=${s}&cid=${this.userId}`):u?r(`/sv?seid=${u}&cid=${this.userId}`):i&&v&&r(`/sv?qid=${i}&cid=${this.userId}`),l!==this.userId&&this.userId&&P('__attentive_id',this.userId,{expires:this.MAX_AGE_DAYS}),a&&!v||P(e,String(Date.now()),{expires:this.MAX_AGE_DAYS})};getQueryParam=e=>{const{queryParams:t}=this;return t(_r.location.search,e)||t(_r.location.hash,e)};queryParams(e,t){let n=null;return e.substring(1).split('&').forEach((e=>{const r=e.split('=');r[0]===t&&(n=r[1])})),n}}const Cr={klaviyo:()=>window._learnq&&window._learnq.isIdentified,bouncex:()=>window.bouncex&&window.bouncex.var},Ir={klaviyo:()=>window._learnq&&window._learnq.isIdentified&&window._learnq.isIdentified instanceof Function&&window._learnq.isIdentified(),bouncex:()=>Boolean(window.bouncex&&window.bouncex.vars)&&window.bouncex.vars.email_submitted_attentive};function wr(e){for(const t in e)void 0===e[t]&&delete e[t];return e}const Tr=_r.__attentive_cfg&&_r.__attentive_cfg.esms&&_r.__attentive_cfg.esms in Cr,br=Tr&&Cr[_r.__attentive_cfg.esms],Ar=Tr&&Ir[_r.__attentive_cfg.esms],Sr=Tr&&br instanceof Function&&Ar instanceof Function,Or=async()=>{if(Sr){const e=async()=>await new Promise((e=>{const t=setInterval((()=>{if(br()){clearInterval(t);const n=mr,r=!!Ar();P(n,JSON.stringify(r),{expires:hr()}),e()}}),200);setTimeout((()=>{clearInterval(t),e()}),3e3)}));await e()}},Lr=e=>-1!==document.cookie.indexOf(e),Nr=e=>{return(e=>{if(!e){if(L('__attentive_iss'))return!0;if(window.location.search.includes('externalId='))return P('__attentive_iss','true',{expires:hr()}),!0}return!1})(e.ENABLE_SUBSCRIBER_CREATIVES)||!(!(n=e.REQUIRED_COOKIE)||n.every(Lr))||(e=>{if(e){const{key:t,value:n}=e,r=L(t);return void 0!==n?r===n:void 0!==r}return!1})(e.DISALLOWED_COOKIES)||!!(t=e.DISALLOWED_PROPERTIES)&&t()||!!e.SHOULD_BLOCK_PWA_DISPLAY_MODE&&window.matchMedia('(display-mode: standalone)').matches||((e,t)=>{if(window.innerWidth>=760?Boolean(e):Boolean(t))return 0===document.cookie.replace(/(?:(?:^|.*;\s*)__attentive_id\s*=\s*([^;]*).*$)|^.*$/,'$1').length;return!1})(e.BOUNCE_X_DESKTOP_CUSTOMER,e.BOUNCE_X_CUSTOMER);var t,n},Pr=e=>new Promise((t=>setTimeout(t,e))),Rr=async e=>{if(e){const{thirdPartyVariable:t,timeout:n}=e,r=n||1e3;await(async(e,t)=>{for(;!e();)await Pr(t)})(t,r)}};var kr=(e=>(e[e.SHOW=0]='SHOW',e[e.DO_NOT_SHOW=1]='DO_NOT_SHOW',e[e.HIDE_INITIAL=2]='HIDE_INITIAL',e))(kr||{});const Dr=(e,t,n)=>!1!==e&&t!==rr.BUBBLE&&n!==Yn.PARTIAL,Br='aria-hidden',xr=new Map;let Mr=!1;function Ur(e){if('attentive_overlay'===e.id)return!0;const t=e.tagName.toUpperCase();return'META'===t||('SCRIPT'===t||('STYLE'===t||('LINK'===t||('INPUT'===t?'hidden'===e.type:'NOSCRIPT'===t))))}function Fr(){for(const[e,t]of Array.from(xr.entries()))Ur(e)||t.processed||(t.processed=!0,e.setAttribute(Br,'true'))}function Hr(){for(const[e,t]of Array.from(xr.entries()))Ur(e)||t.processed&&(t.processed=!1,t.ariaHidden?e.setAttribute(Br,t.ariaHidden):e.removeAttribute(Br))}const jr=()=>{Mr=!1,Hr()};const Vr=new MutationObserver((e=>{for(const t of e)if('attributes'===t.type){const e=t.target;if('true'===e.getAttribute(Br))continue;xr.delete(e)}const t=Array.from(document?.body?.children??[]);!function(e){for(const t of e)xr.has(t)||xr.set(t,{ariaHidden:t.getAttribute(Br),processed:!1});Mr?Fr():Hr()}(t),function(e){for(const t of e)Vr.observe(t,{attributeFilter:[Br]})}(t)}));try{document&&Vr.observe(document.body,{childList:!0})}catch(e){}const Gr=()=>/Safari/.test(navigator.userAgent),qr=(e,t)=>e.slice(0,t.length)===t,Yr=()=>{const e={};return document.cookie.split('; ').forEach((t=>{if(qr(t,'__attentive')){const[n,...r]=t.split('=');e[n]=r.join('')}})),e},$r=(e,t)=>{if(t.innerHeight>=t.documentHeight)return!0;const n=(e=>Math.abs(e.top)/(e.documentHeight-e.innerHeight)*100)(t),r=e.value;return r&&n+1>=r},Kr=e=>!!e?.exitIntent?.enabled,Wr=(e,t,n)=>{const r=(e=>e.find((e=>'type'in e&&e.type===rr.BUBBLE)))(e);if(void 0===r)return!1;const i=t&&parseInt(t),a='fields'in r?r?.fields:void 0,o=parseInt(a?.showBubblePV||'');if(void 0===a?.showBubblePV||!i||!n)return!0;const c=i&&n&&Math.abs(i-parseInt(n))+1;return Boolean(c&&c>=o)},Jr=e=>{if(!e?.length)return!1;const t=e&&e.find((e=>e.type===rr.BUBBLE)),n=t&&t.fields;return!!(n&&n.countdownSection&&n.countdownSection.active)},Xr=(e,t)=>{let n=new Date;switch(e){case Jn.DAYS:n=Gn(n,{days:Number(t)});break;case Jn.HOURS:n=Gn(n,{hours:Number(t)});break;case Jn.MINUTES:n=Gn(n,{minutes:Number(t)});break;case Jn.SECONDS:n=Gn(n,{seconds:Number(t)})}return n.toISOString()},zr=e=>{const t='__attentive_timer';if(!L(t)&&e?.enabled&&e?.type===Wn.visitor&&e?.durationUnit&&e?.durationValue){P(t,Xr(e.durationUnit,e.durationValue))}},Zr=()=>/iPhone|iPad|iPod/.test(navigator.userAgent),Qr=window.matchMedia('(max-width: 480px)'),ei=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,ti=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i,ni=/android|ipad|playbook|silk/i,ri={nokia:/nokia|lumia/},ii={genericTab:/tablet/};const ai=window,oi=()=>{const e=ai?.attn_d0x0b_cfg;if(e){const t=atob(e);return JSON.parse(t).bctu}},ci=(e='default')=>{const t={default:_r.__attentive_cfg&&_r.__attentive_cfg.zi,disable:_r.__attentive_cfg&&_r.__attentive_cfg.zd,enable:_r.__attentive_cfg&&_r.__attentive_cfg.ze};return _r.__attentive_cfg&&t[e]},ui=(e,t)=>{const n=document.createElement('div');return n.style.position='fixed',n.style.left='0',n.style.bottom='0',n.style.width='100vw',n.style.height='0',n.style.setProperty('z-index',(e=>{if(e&&e.shouldApplyZIndex&&e.zIndex)return String(e.zIndex);return ci('default')||'9223372036854775807'})(t.CONDITIONAL_Z_INDEX_MAP)||null),n.style.setProperty('color-scheme','none'),n.id=e,n},si=e=>!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&'hidden'!==_r.getComputedStyle(e).visibility,di=e=>{const t=e||document.documentElement;return{top:t.scrollTop||document.body.scrollTop||window.pageYOffset,documentHeight:t.scrollHeight||document.body.scrollHeight,innerHeight:window.innerHeight}},li='__attn_exit_intent_triggered',vi=()=>void 0!==L(li),fi=()=>{const e=new Date(Date.now()+36e5);P(li,'true',{expires:e})},pi=(e,t)=>{const n=r=>{r.clientY>50||(t(),e.removeEventListener('mousemove',n))},r=setTimeout((()=>{e.addEventListener('mousemove',n)}),3e3);return()=>{e.removeEventListener('mousemove',n),clearTimeout(r)}},mi=(e,t,n)=>Math.abs(e)/(t-n)*100,gi=(e,t,n)=>{let r,i=0;n&&(r=e.querySelector(n)??void 0);const a=vr((()=>{const{top:n,documentHeight:o,innerHeight:c}=di(r);mi(n,o,c)>50&&(0===n&&(i=0),n>i?i=n:mi(n-i,o,c)>3&&(t(),e.removeEventListener('touchmove',a)))}),o=120,{leading:!0,trailing:!0,maxWait:o,...c});var o,c;return e.addEventListener('touchmove',a),()=>e.removeEventListener('touchmove',a)},yi=()=>{const e=(()=>{const e=performance.getEntriesByType('resource').filter((e=>'script'===e.initiatorType&&e.name.includes('dtag.js'))).sort(((e,t)=>e.startTime-t.startTime));if(e.length>0){const t=e[0];return{start:t.fetchStart,end:t.responseEnd}}})(),t=(()=>{const e=performance.getEntriesByType('mark');return{tagLoaded:e.find((e=>e.name===T.TagCoreLoaded)),tagCreativesLoaded:e.find((e=>e.name===T.TagCreativesLoaded))}})(),n={dtagStart:e?.start,dtagEnd:e?.end,tagLoaded:t.tagLoaded?.startTime,tagCreativesLoaded:t.tagCreativesLoaded?.startTime};if(!(()=>{const e=_r.__attentive_cfg&&_r.__attentive_cfg.lt&&('1'===_r.__attentive_cfg.lt||'2'===_r.__attentive_cfg.lt);return Boolean(e||Sr)})()){const e=performance.getEntriesByName(T.FetchCreativesStart,'mark'),t=performance.getEntriesByName(T.FetchCreativesEnd,'mark');if(e.length>1||t.length>1)return{};e.length>0&&(n.fetchCreativesStart=e[0].startTime),t.length>0&&(n.fetchCreativesEnd=t[0].startTime)}return n},hi=()=>{const e=_r.__attentive_domain;if(Pn&&e){const t=_r.localStorage.getItem('attn_pdp');if(t){const n=JSON.parse(atob(t));if(n[e])return!0===Array.isArray(n[e])?n[e]:[n[e]]}}},_i=function(e){e.preventDefault(),e.stopPropagation()},{toggleScrollLock:Ei,getCurrentValue:Ci}=(()=>{let e,t=!1;return{toggleScrollLock:n=>{if(t=n,n){if(!e){e=window.pageYOffset;try{const t=parseInt(getComputedStyle(document.body).height,10)-(e+window.visualViewport.height);t<0&&window.scrollBy({top:t})}catch{}}document.body.style.overflow='hidden',document.body.style.position='absolute',document.body.style.top=-e+'px',document.body.style.left='0',document.body.style.right='0',document.body.style.bottom='0',document.body.style.height='unset',document.documentElement.style.overflow='hidden',document.documentElement.style.position='absolute',document.documentElement.style.top='0',document.documentElement.style.left='0',document.documentElement.style.right='0',document.documentElement.style.bottom='0'}else document.body.style.removeProperty('overflow'),document.body.style.removeProperty('position'),document.body.style.removeProperty('top'),document.body.style.removeProperty('left'),document.body.style.removeProperty('right'),document.body.style.removeProperty('bottom'),document.body.style.removeProperty('height'),document.documentElement.style.removeProperty('overflow'),document.documentElement.style.removeProperty('position'),document.documentElement.style.removeProperty('top'),document.documentElement.style.removeProperty('left'),document.documentElement.style.removeProperty('right'),document.documentElement.style.removeProperty('bottom'),void 0!==e&&e>=0&&(window.scrollTo({top:e,behavior:'instant'}),e=void 0)},getCurrentValue:()=>t}})();function Ii(e,t){e.ENABLE_SCROLLING_NO_STYLING||(e.ENABLE_SCROLLING_CUSTOM_STYLING_NO_SCROLL_LOCK?e.ENABLE_SCROLLING_CUSTOM_STYLING_NO_SCROLL_LOCK():Ci()&&(Ei(!1),t.style.setProperty('z-index',ci('enable')||'9223372036854775807','important'),e.ENABLE_SCROLLING_CUSTOM_STYLING_WITH_SCROLL_LOCK&&e.ENABLE_SCROLLING_CUSTOM_STYLING_WITH_SCROLL_LOCK())),document.body.removeEventListener('touchmove',_i)}const wi=async(e,t)=>{if(window.Shopify?.routes?.root){const n={items:[{id:e,quantity:t}]};try{if((await fetch(`${window.Shopify?.routes?.root||'/'}cart/add.js`,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(n)})).ok)return'success'}catch(e){}}};function Ti(e,t,n){const{action:r,thirdPartyAnalytics:i}=e,a=i&&i[t];if(!a||!a.enabled)return;const o=a.eventOptions?.[r],c=o?.name||tr[t]?.[Qn[r]]?.name;if(void 0===c)return;const u=a.reportCreative&&'creativeId'in e?e.creativeId:void 0,s=o&&'reportEmail'in o&&o.reportEmail&&'email'in e?e.email:void 0,d='email'in e?e.email:void 0,l='phone'in e?e.phone:void 0,v='closeType'in e?e.closeType:void 0,f=o&&'reportPageType'in o&&o.reportPageType,p=r===Qn.IMPRESSION&&f&&'pageType'in e?e.pageType:f&&'impressionPageType'in e?e.impressionPageType:void 0;if(t===er.GOOGLE_ANALYTICS_4){const e={source:'Attentive',creative_id:u,creative_type:p,email:s};if(_r.gtag){const t=n.GA4_CUSTOM_EVENT_FORMATTING;_r.gtag('event',c,wr(t?t(e):e))}else _r.dataLayer&&_r.dataLayer.push(wr({...e,event:c}))}t===er.FACEBOOK_PIXEL&&_r.fbq&&_r.fbq('track',c,wr({creativeId:u,email:s,closeType:v})),t===er.NORTHBEAM_PIXEL&&_r.Northbeam&&(r===Qn.EMAIL_LEAD&&d?_r.Northbeam.fireEmailCaptureEvent(d,'Attentive'):r===Qn.LEAD&&l&&_r.Northbeam.fireCustomGoal(`phone_capture: ${l}`,{})),t===er.DATALAYER_PUSH&&(_r.dataLayer=_r.dataLayer||[],_r.dataLayer.push(wr({event:c,source:'Attentive',creative_id:u,email:s})))}const bi='__attentive_vf';function Ai(){return L(bi)}const Si={marketing:{overlayElementID:'attentive_overlay',creativeContainerID:'attentive_creative',creativeContainerTitle:'Sign Up via Text for Offers',useCustomEventHandling:!0},'live-sms':{overlayElementID:'attentive_live_sms_overlay',creativeContainerID:'attentive_live_sms_creative',creativeContainerTitle:'Get real-time support via SMS',useCustomEventHandling:!1},backInStock:{overlayElementID:'attentive_overlay',creativeContainerID:'attentive_creative',creativeContainerTitle:'Sign Up via Text for Offers',useCustomEventHandling:!0},topBar:{overlayElementID:'attentive_top_bar_overlay',creativeContainerID:'attentive_top_bar_creative',creativeContainerTitle:'Sign Up via Text for Offers',useCustomEventHandling:!0},pdpPrice:{overlayElementID:'attentive_pdp_price_overlay',creativeContainerID:'attentive_pdp_price_creative',creativeContainerTitle:'Sign Up via Text for Offers',useCustomEventHandling:!0}};class Oi{clientConfig;userId;lastElementInFocus=null;email=null;creativeContainer;overlayElement;loaded=!1;shouldResetIFrame;initialBottom=0;requireRepaintOnOpen=!1;shouldDisableScroll=!1;attentiveConfig;#e;useCustomEventHandling=!1;windowEvent;onLoadFunction;constructor(e,t,n,r,i,a){this.clientConfig=e,this.useCustomEventHandling=a,this.userId=t;const o=ui(n,e),c=((e,t,n)=>{const r=document.createElement('iframe');r.style.width='100%',r.style.height='0',r.style.position='absolute',r.style.bottom='0',r.style.opacity='0',r.style.transition='opacity 500ms',r.style.border='0',r.style.overflow='hidden',r.style.visibility='hidden',r.allowTransparency='true',r.referrerPolicy='origin',r.id=e,r.allow='clipboard-write';const i=n.IFRAME_CLASS;i&&i(r);const a=_r?.__attentive_cfg?.iframeTitle;return r.title=a||t,r})(r,i,e);var u;o.appendChild(c),this.creativeContainer=c,this.overlayElement=o,this.shouldResetIFrame=Zr()&&Gr()&&!!document.querySelector('meta[name=apple-itunes-app]'),this.shouldResetIFrame&&(this.creativeContainer.style.transition='opacity 500ms, bottom 150ms ease-in-out',this.handleIFramePlacement()),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.orientationChangeHandler=this.orientationChangeHandler.bind(this),this.refocusEventListener=this.refocusEventListener.bind(this),this.windowEvent=(u=this.clientConfig?.CUSTOM_WINDOW_EVENTS,u&&document.querySelector(u)||_r)}creativeEventHandler=async e=>{if(e.data&&Object.prototype.hasOwnProperty.call(e.data,'__attentive')){const t=e.data.__attentive;if(t.creativeId!==this.attentiveConfig?.trackingParams?.creativeId)return;const n=e.ports;!function(e,t){const n=e.thirdPartyAnalytics;for(const r in n){const i=n[r];i?.enabled&&Ti(e,r,t)}}(t,this.clientConfig);let r=!1;const i=this.attentiveConfig?.trackingParams.creativeId,a=this.attentiveConfig?.trackingParams?.countdownTimerFilter,o=d(),c=E();switch(t.action){case Qn.OPEN:r=Dr(this.clientConfig.ada,t.pageType,t.layout),r&&(Mr=!0,Fr()),this.useCustomEventHandling&&this.clientConfig.CUSTOM_OPEN_EVENTS&&this.clientConfig.CUSTOM_OPEN_EVENTS(t),this.openCreative(t);break;case Qn.CLOSE:this.creativeContainer.style.opacity='0',r=Dr(this.clientConfig.ada),setTimeout((()=>{this.hide(i),this.resetFocusOnCreativeClose()}),500),r&&jr(),this.useCustomEventHandling&&this.clientConfig.CUSTOM_CLOSE_EVENTS&&this.clientConfig.CUSTOM_CLOSE_EVENTS(t),t.shouldSetViewFatigueCookie&&(Ai()||P(bi,'true',{expires:yr(86400)}));break;case Qn.LEAD:o&&(o.setAttribute('data-signup-complete','true'),v(o)),c&&(c.setAttribute('data-signup-complete','true'),w(c)),this.useCustomEventHandling&&await(async(e,t)=>{e.CUSTOM_LEAD_EVENTS&&await e.CUSTOM_LEAD_EVENTS(t)})(this.clientConfig,t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.sdj&&function({phone:e,creativeId:t}){try{window.sd&&(window.sd.identify('',{phone_number:e}),window.sd.track('registration',{phone_number:e,properties:{creativeId:t}}))}catch(e){}}(t),n?.length&&n[0]&&n[0].postMessage('custom logic completed'),(({phone:e})=>{ai?.edgetag&&oi()&&e&&ai.edgetag('user','phone',e)})(t);break;case Qn.ADD_TO_CART:n?.length&&n[0]&&n[0].postMessage({message:'success'===await wi(t.variantId,t.quantity)?'success':'failure',variantId:t.variantId});break;case Qn.IMPRESSION:this.useCustomEventHandling&&this.clientConfig.CUSTOM_IMPRESSION_EVENTS&&this.clientConfig.CUSTOM_IMPRESSION_EVENTS(t),this.forwardEmail(t);break;case Qn.EMAIL_LEAD:this.useCustomEventHandling&&this.clientConfig.CUSTOM_EMAIL_LEAD_EVENTS&&this.clientConfig.CUSTOM_EMAIL_LEAD_EVENTS(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.klv&&(({email:e})=>{window._learnq&&window._learnq.push(['identify',{$email:e}])})(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.wpm&&function({email:e}){window.postMessage({func:'wrPush',message:e},'*')}(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.ges&&window.geq&&window.geq.suppress(),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.oma&&(({email:e})=>{window.ometria&&window.ometria.identify&&window.ometria.identify(e)})(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.lcses&&function({email:e}){try{window.localStorage.setItem('_attn_',JSON.stringify({email:e}))}catch(e){}}(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.sdes&&function({email:e,creativeId:t}){try{window.sd&&(window.sd.identify('',{email:e}),window.sd.track('registration',{email:e,properties:{creativeId:t}}))}catch(e){}}(t),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.sthru&&(({email:e})=>{window.Sailthru&&window.Sailthru.integration&&e&&window.Sailthru.integration('userSignUp',{email:e,source:'Attentive'})})(t),(({email:e})=>{ai?.edgetag&&oi()&&e&&ai.edgetag('user','email',e)})(t);break;case Qn.EXPAND:this.useCustomEventHandling&&this.clientConfig.CUSTOM_EXPAND_EVENTS&&this.clientConfig.CUSTOM_EXPAND_EVENTS(t),a&&(zr(a),this.sendMessageToCreative(gr.OVERLAY_DATA,{overlayData:this.getOverlayData()}));break;case Qn.SHRINK:r=Dr(this.clientConfig.ada),r&&jr(),this.useCustomEventHandling&&this.clientConfig.CUSTOM_SHRINK_EVENTS&&this.clientConfig.CUSTOM_SHRINK_EVENTS(t);break;case Qn.DETECT_EXIT_INTENT:Zr()&&Gr()&&(this.requireRepaintOnOpen=!0),this.detectExitIntent(t,a);break;case Qn.SET_COOKIE:(({cookieName:e,cookieValue:t,cookieAttributes:n=[]})=>{const r=[`${qr(e,'__attentive')?'':'__attentive'}${e}=${t}`,'path=/',...n].join('; ');document.cookie=r})(t);break;case Qn.RESIZE_FRAME:this.applyStylesToIFrame(t.style),this.resetIFrame(t.style?.bottom??'0');break;case Qn.CREATIVE_PAGE_VIEW:this.useCustomEventHandling&&this.clientConfig.CUSTOM_CREATIVE_PAGE_VIEW_EVENTS&&this.clientConfig.CUSTOM_CREATIVE_PAGE_VIEW_EVENTS(t)}}};orientationChangeHandler(e){e.matches||this.hide()}focus(){this.clientConfig.CUSTOM_SKIP_FOCUS||this.creativeContainer.focus()}refocusEventListener(){this.attentiveConfig?.creativeConfig?.type===Xn.DESKTOP&&this.shouldDisableScroll&&_r.setTimeout((()=>{this.focus()}))}openCreative=e=>{var t,n,r;this.clientConfig.CUSTOM_DISABLE_OPEN_CREATIVE&&this.clientConfig.CUSTOM_DISABLE_OPEN_CREATIVE()||(!this.loaded&&function(){const{userAgent:e}=window.navigator,{width:t}=window.screen,n=new RegExp(ri.nokia),r=new RegExp(ii.genericTab),i=new RegExp(ei),a=new RegExp(ti),o=new RegExp(ni);return!r.test(e)&&!(!n.test(e)&&(i.test(e)||a.test(e.substr(0,4))?t>480:(o.test(e),1)))}()&&Qr.addListener(this.orientationChangeHandler),this.shouldDisableScroll=e.pageType!==rr.BUBBLE&&e.layout!==Yn.PARTIAL,_r.removeEventListener('focus',this.refocusEventListener),_r.addEventListener('focus',this.refocusEventListener),this.applyStylesToIFrame(e.style),this.creativeContainer.style.opacity='1',this.creativeContainer.style.visibility='visible',this.shouldDisableScroll?(t=this.clientConfig,n=this.overlayElement,t.DISABLE_SCROLLING_NO_STYLING||(t.DISABLE_SCROLLING_CUSTOM_STYLING_NO_SCROLL_LOCK?t.DISABLE_SCROLLING_CUSTOM_STYLING_NO_SCROLL_LOCK():(Ei(!0),n.style.setProperty('z-index',ci('disable')||'9223372036854775807','important'),t.DISABLE_SCROLLING_CUSTOM_STYLING_WITH_SCROLL_LOCK&&t.DISABLE_SCROLLING_CUSTOM_STYLING_WITH_SCROLL_LOCK())),document.body.addEventListener('touchmove',_i)):Ii(this.clientConfig,this.overlayElement),this.requireRepaintOnOpen&&(r=this.overlayElement,setTimeout((()=>{'fixed'===r.style.position&&(r.style.position='relative',r.offsetHeight,r.style.position='fixed')}),100)),this.resetIFrame(e.style?.bottom??'0'),e.pageType!==rr.BUBBLE&&this.focus())};applyStylesToIFrame=e=>{const t=this.clientConfig.IFRAME_CLASS;!t?.(this.creativeContainer)&&e&&Object.assign(this.creativeContainer.style,e)};resetIFrame=e=>{this.shouldResetIFrame&&(this.initialBottom=parseInt(e,10)||0,_r.addEventListener('resize',this.handleIFramePlacement),this.windowEvent.addEventListener('scroll',this.handleIFramePlacement),this.handleIFramePlacement())};handleIFramePlacement=()=>{_r.innerHeight<document.documentElement.clientHeight||(this.creativeContainer.style.bottom=`${this.initialBottom}`),this.postFrameHandler()};handleADACompliance=()=>{this.clientConfig.ADA_COMPLIANT&&(_r.addEventListener('keydown',(e=>27===e.keyCode&&this.hide()),!1),this.lastElementInFocus=document.activeElement)};resetFocusOnCreativeClose=()=>{if(this.clientConfig.ADA_COMPLIANT)if(this.lastElementInFocus&&'body'!==this.lastElementInFocus.nodeName.toLowerCase()&&si(this.lastElementInFocus))this.lastElementInFocus.focus();else if(this.clientConfig.ADA_REFOCUS_ELEMENT_SELECTOR){const e=document.querySelector(this.clientConfig.ADA_REFOCUS_ELEMENT_SELECTOR);e?e.focus():document.body.focus()}else{const e=document.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');for(const t of e)if(si(t)){t.focus();break}}};postFrameHandler=vr((()=>{const e=Math.floor(this.creativeContainer.getBoundingClientRect().bottom)-_r.innerHeight;this.creativeContainer.clientHeight>=document.body.clientHeight?this.creativeContainer.style.bottom='0':e>0&&(this.creativeContainer.style.bottom=`${e+this.initialBottom}px`)}),250);setEmail(e){this.email=e}load(e){_r.attnOverlayLoaded=!0;const t=this.clientConfig.TOP_BAR_CONTAINER_TARGET&&this.clientConfig.TOP_BAR_CONTAINER_TARGET(e.attentiveConfig.trackingParams.creativeId),n=this.clientConfig.CONTAINER_TARGET_OVERLAY&&this.clientConfig.CONTAINER_TARGET_OVERLAY(e.attentiveConfig.trackingParams.creativeId);t?t.appendChild(this.creativeContainer):n?n.appendChild(this.overlayElement):document?.body?.appendChild(this.overlayElement),this.loaded=!0}show(e){this.handleADACompliance(),this.loaded||this.load(e),this.populateIframeContent(e),_r.addEventListener('resize',this.sendOverlayDataToCreative)}generateOnLoadFunction=e=>()=>{const{attentiveConfig:t}=e;this.#e=new MessageChannel,this.creativeContainer.contentWindow?.postMessage('__attentiveInit','*',[this.#e.port2]),this.sendAttentiveConfigToCreative(t)};populateIframeContent=async e=>{const{creativeRendererIndexURL:t,attentiveConfig:n}=e;this.creativeContainer.src=t,this.iframeLoaded(),this.attentiveConfig=n,this.onLoadFunction&&this.creativeContainer.removeEventListener('load',this.onLoadFunction),this.onLoadFunction=this.generateOnLoadFunction(e),this.creativeContainer.addEventListener('load',this.onLoadFunction,{once:!0})};getOverlayData=()=>({vendorIDs:fn([Qt,en,tn,nn,rn]),clientWidth:document.documentElement.clientWidth,performanceMetrics:yi(),attentiveCookies:Yr(),productViewData:hi()});sendMessageToCreative=(e,t)=>{this.creativeContainer&&this.creativeContainer.contentWindow&&this.creativeContainer.contentWindow.postMessage({__attentive:{type:e,data:t}},'*')};sendOverlayDataToCreative=vr((()=>{this.sendMessageToCreative(gr.OVERLAY_DATA,{overlayData:this.getOverlayData()})}),250);sendAttentiveConfigToCreative=e=>{if(!this.#e)return;const t={__attentiveConfig:{...e,overlayData:this.getOverlayData()}};this.#e.port1.postMessage(t)};sendTriggeredExitIntentToCreative=e=>{vi()||(e&&(zr(e),this.sendMessageToCreative(gr.OVERLAY_DATA,{overlayData:this.getOverlayData()})),fi(),this.sendMessageToCreative(gr.EXIT_INTENT,{hasTriggeredExitIntent:!0}))};detectExitIntent=(e,t)=>{const{creativeType:n,isBubbleCreative:r}=e;r&&(vi()||(n===Xn.DESKTOP?pi(document,(()=>this.sendTriggeredExitIntentToCreative(t))):n===Xn.ON_SITE&&gi(document,(()=>this.sendTriggeredExitIntentToCreative(t)),this.clientConfig.CUSTOM_EXIT_INTENT_SCROLL_ELEMENT_SELECTOR||'')))};iframeLoaded(){(e=>{if(e.ANNOUNCE_ADA_POPUP&&-1!==document.cookie.indexOf('attn_ada_test')){const e=document.querySelector('.attentiveButton');e&&e.click()}})(this.clientConfig),_r&&_r.getComputedStyle&&'center'===_r.getComputedStyle(this.overlayElement).textAlign&&(this.overlayElement.style.textAlign='left')}hide(e){if(e&&this.attentiveConfig?.trackingParams.creativeId&&e!==this.attentiveConfig?.trackingParams.creativeId)return;const t=this.clientConfig.TOP_BAR_CONTAINER_TARGET&&e&&this.clientConfig.TOP_BAR_CONTAINER_TARGET(e);t?t.removeChild(this.creativeContainer):this.overlayElement.parentNode&&this.overlayElement.parentNode.removeChild(this.overlayElement),this.creativeContainer.src='',this.creativeContainer.style.visibility='hidden',this.clientConfig.ENABLE_SCROLL_BLACKLIST_SITE||Ii(this.clientConfig,this.overlayElement),Qr.removeListener(this.orientationChangeHandler),_r.removeEventListener('resize',this.sendOverlayDataToCreative),_r.removeEventListener('focus',this.refocusEventListener),this.loaded=!1}forwardEmail(e){this.email&&(async e=>{const{domain:t=window.__attentive_domain,creativeId:n,email:r,visitorId:i,impressionPageType:a}=e,o=`https://${t}/track`,c={};r&&(c.email=r);const u=new URLSearchParams;u.append('s','1'),u.append('a','CLICK'),u.append('id',i),a&&u.append('pt',a),n&&u.append('c',n);const s=L('_attn_bopd_');s&&u.append('abs',s);const d=fn([Qt,en,tn,nn,rn]);d&&u.append('cui',JSON.stringify(d)),fetch(`${o}?${u}`,{method:'POST',body:JSON.stringify(c)})})({email:this.email,creativeId:e.creativeId,visitorId:`${this.userId}`,impressionPageType:e.pageType})}}const Li='__attn_atc_triggered',Ni=({pageView:e,pageviewRuleLowerBound:t,bubbleMultiPage:n,bubbleCanvasPage:r})=>{const i=parseInt(e);let a=0;if(n){const e=n.fields;a=parseInt(e.showBubblePV||'')}r&&(a=parseInt(r.showBubblePV||''));return Math.abs(i-parseInt(t))+1>=a},Pi=e=>{const{firstPageDisplayed:t,pageview:n,pageviewRuleLowerBound:r}=e.trackingParams;let i=e.creativeConfig,a=!1;if(e.creativeConfig?.subType===zn.DYNAMIC)if(pr(e.creativeConfig)){const o=Object.values(e.creativeConfig.pages).find((e=>'type'in e&&e.type===rr.BUBBLE));if(o)if(t){if(!('BUBBLE'===t)&&o.nextPage){const t=e.creativeConfig,n=o.id,r=o.nextPage;delete t.pages[n],t.firstPageId=r,a=!0,i=t}}else{if(!!!Ai()&&n&&r){const{configWithSkippedBubblePage:t,hasSkippedBubblePage:c}=(({pageView:e,pageviewRuleLowerBound:t,creativeConfig:n,bubblePage:r})=>{const i=n,a=Ni({pageView:e,pageviewRuleLowerBound:t,bubbleCanvasPage:r});if(!a&&r.nextPage){const e=r.id,t=r.nextPage;delete i.pages[e],i.firstPageId=t}return{configWithSkippedBubblePage:i,hasSkippedBubblePage:!a}})({pageView:n,pageviewRuleLowerBound:r,creativeConfig:e.creativeConfig,bubblePage:o});a=c,i=t}}}else{const o=e.creativeConfig.pages.find((e=>e.type===rr.BUBBLE));if(o)if(t){if(!('BUBBLE'===t)){const t=e.creativeConfig;t.pages=t.pages.filter((e=>e.type!==rr.BUBBLE)),a=!0,i=t}}else{if(!!!Ai()&&n&&r){const{configWithSkippedBubblePage:t,hasSkippedBubblePage:c}=(({pageView:e,pageviewRuleLowerBound:t,creativeConfig:n,bubblePage:r})=>{const i=n,a=Ni({pageView:e,pageviewRuleLowerBound:t,bubbleMultiPage:r});return a||(i.pages=i.pages.filter((e=>e.type!==rr.BUBBLE))),{configWithSkippedBubblePage:i,hasSkippedBubblePage:!a}})({pageView:n,pageviewRuleLowerBound:r,creativeConfig:e.creativeConfig,bubblePage:o});a=c,i=t}}}return{filteredCreativePagesConfig:i,skippedBubblePage:a}},Ri=(e,t,n,r)=>{const{overlayElementID:i,creativeContainerID:a,creativeContainerTitle:o,useCustomEventHandling:c}=Si[r];let u,d,p=-1,m=[];const h=new Oi(e,t.getId(),i,a,o,c),E=e=>{const t=parseInt(e.attentiveConfig.trackingParams.creativeId,10);n.registerCreativeMessageHandler(t,h.creativeEventHandler),h.show(e)},I=e=>{const t=parseInt(e.attentiveConfig.trackingParams.creativeId,10);n.registerCreativeMessageHandler(t,h.creativeEventHandler),h.load(e),p=t},T=e=>{const n=e.attentiveConfig.creativeConfig;if('customTrigger'in n&&'backInStock'===n.customTrigger?.type){const r=document.getElementById('attn-waitlist-trigger');if(r){const i=dr(e.attentiveConfig.trackingParams.subscriberChannels),a=l(n.customTrigger,i);a.onclick=async()=>{const n=r.getAttribute('data-product-id'),o=r.getAttribute('data-variant-id');if(n&&o){const r=new URLSearchParams;r.append('c',e.attentiveConfig.trackingParams.creativeId),r.append('id',t.getId()??''),await fetch(`https://${_r.__attentive_domain}/user-input-collection?${r.toString()}`,{method:'POST',body:JSON.stringify({waitlistEnrollment:{productId:n,variantId:o}})}),function({productId:e,variantId:t}){const n=f();if(n&&e&&t){const r=g({productId:e,variantId:t}),i=y();i.includes(r)||i.push(r),n.setAttribute(s,i.join(','))}}({productId:n,variantId:o});const c='true'===a.getAttribute('data-signup-complete');i||c?v(a):(I(e),E(e))}},r.appendChild(a)}}},b=(t,r={})=>{const i=(a=t,JSON.parse(JSON.stringify(a)));var a;const{email:o,hideInitialView:c,skipLoadingRestrictions:s,previouslyLoaded:l,trigger:v='immediately',initiator:f}=r,g=parseInt(i.attentiveConfig.trackingParams.creativeId,10);(()=>{const e=h.attentiveConfig?.trackingParams?.creativeId;e&&n.unregisterCreativeMessageHandler(parseInt(e,10))})();const{attentiveConfig:y}=i,{filteredCreativePagesConfig:b,skippedBubblePage:A}=Pi(y);if(y.creativeConfig=b,y.creativeParams.skippedBubblePage=A,y.creativeParams.displayTrigger=v,y.creativeParams.initiator=f,y.creativeParams.adblockerStatus=L('_attn_bopd_'),void 0!==o&&h.setEmail(o),s)return l?void E(i):(I(i),void(p===g&&E(i)));const S=async()=>{const t=await(async e=>(await Promise.all([Or(),Rr(e.SHOULD_DELAY_OVERLAY_THIRDPARTY)]),_r.__attentive_cfg&&'1'===_r.__attentive_cfg.lt?1:_r.__attentive_cfg&&'2'===_r.__attentive_cfg.lt?_r.attnOverlayHidden?1:2:Nr(e)?1:0))(e);t!==kr.DO_NOT_SHOW&&(I(i),p!==g||c||E(i))},O=()=>{const t=i.attentiveConfig.displayRules,n={immediately:()=>{S()},delay:()=>{const e=(e=>{if(e?.delay?.enabled&&Number(e.delay.value))return e?.delay})(t),n=setTimeout(S,1e3*(e?.value??0));m.push((()=>clearTimeout(n)))},scroll:()=>{const n=(e=>{if(e?.scroll?.enabled&&Number(e.scroll.value)>-1)return e?.scroll})(t);if(Number(n?.value)>-1){const t=()=>{const r=e?.CUSTOM_WINDOW_EVENTS&&document.querySelector(e.CUSTOM_WINDOW_EVENTS)||void 0,i=di(r);(0===n?.value||n&&i&&$r(n,i))&&(S(),_r.removeEventListener('scroll',t))};_r.addEventListener('scroll',t),t(),m.push((()=>_r.removeEventListener('scroll',t)))}},exitIntent:()=>{const n=Kr(t),r=i.attentiveConfig.trackingParams.countdownTimerFilter;if(n){const t=i.attentiveConfig.creativeConfig,{pageview:n,pageviewRuleLowerBound:a}=i.attentiveConfig.trackingParams,{type:o}=t;let c=!1,u=!1;if(pr(t)){const e=Object.values(t.pages).find((e=>'type'in e&&e.type===rr.BUBBLE));e&&(c=((e,t,n)=>{const r=t&&parseInt(t),i=parseInt(e.showBubblePV);if(!r||!n)return!0;const a=r&&n&&Math.abs(r-parseInt(n))+1;return Boolean(a&&a>=i)})(e,n,a))}else c=Wr(t.pages,n,a),u=Jr(t.pages);const s=()=>{if(fi(),r?.enabled&&r.type===Wn.visitor)return zr(r),void S();S()};if(c)u&&r&&r?.enabled&&r?.type===Wn.visitor&&zr(r),S();else{if(vi())return;if(o===Xn.DESKTOP){const e=pi(document,s);m.push(e)}if(o===Xn.ON_SITE){const t=gi(document,s,e.CUSTOM_EXIT_INTENT_SCROLL_ELEMENT_SELECTOR||'');m.push(t)}}}},backInStock:()=>{d=i,T(i)},pdpPrice:()=>{const e=i.attentiveConfig.creativeConfig;if('customTrigger'in e&&'pdpPrice'===e.customTrigger?.type){const t=document.getElementById(_);if(t){const n=C(e.customTrigger);n.onclick=async()=>{dr(i.attentiveConfig.trackingParams.subscriberChannels)||'true'===n.getAttribute('data-signup-complete')?w(n):(I(i),E(i))},t.appendChild(n)}}},addToCart:()=>{u=i}};i.attentiveConfig.creativeConfig&&!pr(i.attentiveConfig.creativeConfig)&&((e,t,n)=>{const r=Kr(t),i=e.attentiveConfig.trackingParams.countdownTimerFilter,a=Jr(n);if(!r&&i?.enabled&&i?.type===Wn.visitor){const{pageview:t,pageviewRuleLowerBound:r}=e.attentiveConfig.trackingParams;n&&t&&r&&Wr(n,t,r)?a&&zr(i):zr(i)}})(i,t,i.attentiveConfig.creativeConfig.pages);return n[v](),{triggerAddToCartCreative:n.addToCart}},N=e.SHOULD_DELAY_OVERLAY_CUSTOM;if(N)return void N(O);const{triggerAddToCartCreative:P}=O();return{triggerAddToCartCreative:P}};return{showCreative:b,showCreatives:(e,t)=>{ur.forEach((n=>{const r=e[n];r&&b(r,{...t,trigger:n})}))},hideCreatives:()=>{h.hide(),m.forEach((e=>e())),m=[]},triggerAddToCartCreative:()=>{const e=u;if(!e)return;let t='page',n=0;const r=e.attentiveConfig.displayRules?.addToCart,{trackingParams:i}=e.attentiveConfig;if(r?.enabled&&r.config&&r.config.firstPage&&r.config.frequency?(t=r.config.frequency,n=parseInt(r.config.firstPage,10)):i.aiCreativeRules&&(t='session',n=8),'session'===t&&void 0!==L(Li))return;if(i.pageview&&parseInt(i.pageview,10)<n)return;e.attentiveConfig.trackingParams.firstPageDisplayed='FIELD_CAPTURE';const{attentiveConfig:a}=e,{filteredCreativePagesConfig:o,skippedBubblePage:c}=Pi(a);a.creativeConfig=o,a.creativeParams.skippedBubblePage=c,I(e),E(e),u=void 0,(()=>{const e=new Date(Date.now()+18e5);P(Li,'true',{expires:e})})()},reattachWaitlistButton:()=>{d&&T(d)}}},ki=()=>{const e=new Map,t=t=>{if(!(n=t).data||!Object.prototype.hasOwnProperty.call(n.data,'__attentive'))return;var n;const{data:{__attentive:{creativeId:r}}}=t,i=e.get(parseInt(r,10));i&&i(t)};window.removeEventListener('message',t),window.addEventListener('message',t);return{registerCreativeMessageHandler:(t,n)=>{e.set(t,n)},unregisterCreativeMessageHandler:t=>{e.delete(t)},removeEventListener:()=>{window.removeEventListener('message',t)}}},Di=async e=>{if(e){const{interval:t,conditionCheck:n,maxTime:r}=e;await(async(e,t,n)=>{const r=n?Xr(Jn.SECONDS,n):null;for(;(!r||(new Date).toISOString()<=r)&&!e();)await Pr(t)})(n,t,r)}};const Bi=async e=>{const t=await(n=e,new Promise((e=>{setTimeout((()=>{const t=document.createElement('script');t.type='text/javascript',t.src=`https://cdn.attn.tv/growth-tag-assets/client-configs/${n}.js`,t.setAttribute('async','true'),t.onload=()=>{const t=_r.__attentive_client_cfg;return e(t||null)},t.onerror=()=>e(null),((document.getElementsByTagName('head')||[null])[0]||document.getElementsByTagName('script')[0].parentNode).appendChild(t)}))})));var n;return t||{}},xi=async()=>{const e=(()=>{const e={},t=_r?.attn_d0x0b_cfg;if(t){const n=atob(t),r=JSON.parse(n);e.creativesConfig=r.cc,e.externalCompanyId=r.ceid}return e})();return{...e.externalCompanyId?await Bi(e.externalCompanyId):{},...e.creativesConfig}},Mi='__attentive_ss_referrer',Ui='ORGANIC',Fi=()=>{const e=L(Mi)??null;if(e)return e;const t=document.referrer||Ui;return P(Mi,t,{expires:hr()}),t};function Hi(e){if(!e.includes('?'))return{};return e.slice(e.indexOf('?')+1).split('&').reduce(((e,t)=>{const[n,r]=t.split('=');return e[n]=r,e}),{})}function ji(e){const t=Hi(location.search);return t[e]?t[e]:null}const Vi='utm_',Gi='__attentive_utm_param_',qi=()=>{const e={};for(const t of Object.values(lr)){const n=L(`${Gi}${t}`);n&&(e[t]=n)}return e},Yi=(e,t)=>{const n={};Array.isArray(e.cook)&&e.cook.forEach((e=>{const t=L(e);void 0!==t&&(n[e]=t)}));return{cookies:n,utmParams:qi(),productIds:(()=>{const e=localStorage.getItem('attn_pdp');if(e)try{const t=JSON.parse(atob(e)),n=Object.values(t)[0];return n.map((e=>parseInt(e.sku))).filter((e=>!isNaN(e)))}catch(e){}})(),pd:(()=>{const e={adblocked:1,browser:2,unknown:3}[L('_attn_bopd_')];if(e)return e})(),...t!==Ui&&{referrer:t}}},$i='__attentive_pv';function Ki(){const e=parseInt(L($i)??'',10);return e||0}const Wi=e=>{let t;e&&(t=e());const n=(()=>{if(Tr){const e=L(mr);return!!e&&'false'!==e}})();return n&&(t=n),Boolean(t)},Ji=e=>{try{if(e)return e()}catch{return}},Xi=e=>{let t;if(e.app)t=(()=>{try{return new URLSearchParams(window.location.search).get('debug')}catch(e){return null}})();else if(e.DEBUG_PASSWORD)return t},zi=e=>{const{customFilterParam:t,anonymousId:n,creativeID:r,clientConfig:i,userId:a,targets:o,triggers:c}=e,u=new URLSearchParams;u.append('v','2026.02.3'),u.append('r',window.top.document.referrer),u.append('id',`${a}`),u.append('pv',`${Ki()}`),u.append('l',window.top.document.location.href);const{deviceWidth:s,deviceHeight:d}=(e=>{let t=window.innerWidth,n=window.innerHeight;if(e){const{width:r,height:i}=e();t=r,n=i}return{deviceWidth:t,deviceHeight:n}})(i.CUSTOM_DEVICE_SIZE);u.append('w',`${s}`),u.append('h',`${d}`);const l=Fi();l&&u.append('ss_ref',`${l}`);const v=((e,t)=>{let n;return t&&(n=t()),n=e||n,n})(n,i.ANON_ID_PARAMS);v&&u.append('a',v);const f=((e,t)=>{let n;return t&&(n=t()),n=e||n,n&&'string'==typeof n&&(n=n.replace(/"/g,'')),n})(t,i.GET_CREATIVE_FILTER_PARAM);f&&u.append('s',`${f}`);const p=Wi(i.GET_EMAIL_CREATIVE_FILTER_PARAM);p&&u.append('hasEmail',`${p}`),r&&u.append('force_show_creative',`${r}`);const m=ji('ignore_filters');m&&u.append('ignore_filters',m);const g=(()=>{const e=L('__attentive_timer');if(e&&new Date>new Date(e))return!0;return!1})();g&&u.append('rct_exp',`${g}`),o&&o.forEach((e=>{u.append('ta',e)})),c&&c.forEach((e=>{u.append('tr',e)}));const y=ji('attn-eid')||ji('externalId');y&&u.append('seid',y);const h=ji('altid');h&&u.append('altid',h);const _=Xi(i);return _&&u.append('debug',_),u.append('f','3'),u},Zi=e=>decodeURIComponent((e||'').replace(/\+/g,' ')),Qi=e=>{switch(e.triggerType){case'immediately':return{immediately:{enabled:!0}};case'delay':return{delay:{enabled:!0,value:e.seconds}};case'scroll':return{scroll:{enabled:!0,value:e.depth}};case'exitIntent':return{exitIntent:{enabled:!0}};case'backInStock':return{backInStock:{enabled:!0}};case'pdpPrice':return{pdpPrice:{enabled:!0}};case'addToCart':return{addToCart:{enabled:!0,config:{frequency:'page-view'===e.frequency?'page':'session',firstPage:'0'}}};default:return(e=>{throw new Error('Not all trigger types are handled')})()}},ea=(e,t)=>{const n={},r=_r.__attentive_domain||'',i=e=>{const i=Qi(e.renderingFields.displayTrigger),a=((e,t,n,r)=>({creativeConfig:e.creativeConfig&&JSON.parse(e.creativeConfig),companyMetadata:{companyName:Zi(e.companyName),displayName:Zi(e.displayName),companyUrl:e.companyUrl,customerPrivacyLink:e.privacyLink,customerTermsLink:e.customerTermsLink,attentivePrivacyLink:e.attentivePrivacyLink,attentiveTermsLink:e.termsLink,allAttentiveTermsLinks:e.allAttentiveTermsLinks||{},emailAddress:e.emailAddress,companyAddress:e.companyAddress,country:e.country,language:e.language,companyPhone:e.companyPhone},displayRules:r,creativeParams:{showEmail:e.showEmail?'true':'false'},prefill:e.prefillEmail?{email:e.prefillEmail}:void 0,trackingParams:{attnDomain:t,attentiveAPI:e.attentiveAPI,impressionId:e.impressionId,creativeId:e.creativeId,creativeName:e.creativeConfig&&JSON.parse(e.creativeConfig)?.base?.fields?.creativeName,userId:e.userId,isSubscriber:e.isSubscriber,hasEmail:Wi(n.GET_EMAIL_CREATIVE_FILTER_PARAM),userEmail:Ji(n.GET_EMAIL_CREATIVE_PARAM),subscriberChannels:e.subscriberChannels,companyExternalId:e.encodedCompanyExternalId,sourceUrl:e.sourceUrl,environment:e.environment,anonymousId:e.anonymousId,encodedSubscriberExternalId:e.encodedSubscriberExternalId,templateId:'string'==typeof e.templateId?parseInt(e.templateId,10):void 0,pageview:'null'===e.pageview?void 0:e.pageview,pageviewRuleLowerBound:'null'===e.pageviewRuleLowerBound?void 0:e.pageviewRuleLowerBound,countdownTimerFilter:e.countdownTimerFilter,productVariants:e.productVariants,firstPageDisplayed:e.firstPageDisplayed,aiCreativeRules:e.aiCreativeRules},deciders:e.deciders||{},overrides:{}}))(e.renderingFields,r,t,i),o=ur.filter((e=>a.displayRules&&a.displayRules[e]?.enabled));o.length||o.push('immediately');const c=(e=>cr(e.creativeConfig)?'support':['63206','441976'].includes(e.trackingParams.creativeId)?'embedded':'overlay')(a),u=n[c]??{};o.forEach((t=>{u[t]={attentiveConfig:a,creativeRendererIndexURL:e.contentUrl}})),n[c]=u};if((e=>'renderingFields'in e)(e))i(e);else if((e=>'creatives'in e)(e)){const{creatives:{marketing:t,'live-sms':n,topBar:r}}=e;t&&t.length>0&&i(t[0]),n&&n.length>0&&i(n[0]),r&&r.length>0&&i(r[0])}else sr.forEach((t=>{const n=e.targets[t];n&&ur.forEach((e=>{const t=n[e];t&&i(t)}))}));return n},ta=(e,t)=>{const n=JSON.parse(JSON.stringify(e)),r=Object.values(n.pages).find((e=>'type'in e&&e.type===rr.BUBBLE));if(r){const e=r.styles;void 0===e.bottom&&void 0!==e.top||((e,t)=>{switch(t){case ir.LEFT:e.left&&(e.right='5px',e.left=void 0);break;case ir.RIGHT:e.right&&(e.left='5px',e.right=void 0)}})(e,t)}return n},na=(e,t)=>{const n=JSON.parse(JSON.stringify(e)),r=n.pages.find((e=>'type'in e&&e.type===rr.BUBBLE));if(r){const e=r.fields.position,n=r.fields.verticalPosition;void 0!==n&&n!==ar.BOTTOM||e!==t||(r.fields.position=e===ir.LEFT?ir.RIGHT:ir.LEFT)}return n},ra=e=>{const t=e.support,n=e.overlay,r=e.embedded;if(!t||!n)return e;const i=(e=>ur.map((t=>{const n=e[t]?.attentiveConfig?.creativeConfig;return n&&cr(n)?n.base.fields.position:null})).find((e=>null!==e)))(t);return i?(ur.forEach((e=>{const t=n[e];if(!t)return;const{creativeConfig:r}=t.attentiveConfig;r&&!cr(r)&&(pr(r)?t.attentiveConfig.creativeConfig=ta(r,i):t.attentiveConfig.creativeConfig=na(r,i),n[e]=t)})),{support:t,overlay:n,embedded:r}):e},ia=async(e,t)=>{try{const n=Fi(),r=await fetch(e,{method:'POST',body:JSON.stringify({...Yi(t,n)})});if('https://creatives.attn.tv'===window.location.origin&&(t.app?await(async e=>{try{const t=await e.json(),n={status:e.status,body:t};window.postMessage(n,'https://creatives.attn.tv')}catch(e){}})(r.clone()):t.ON_FETCH_CREATIVES&&await t.ON_FETCH_CREATIVES(r.clone())),200!==r.status)return{};return((e,t)=>{const n=ea(e,t);return ra(n)})(await r.json(),t)}catch{return{}}},aa=async(e,t={})=>{const n=(r={clientConfig:e,creativeID:t.creativeID??null,customFilterParam:t.customFilterParam??null,userId:t.userID??null,anonymousId:t.anonymousID??null,triggers:t.triggers,targets:t.targets},`https://${_r.__attentive_domain}/unrenderedCreative?${zi(r).toString()}`);var r;return ia(n,e)},oa='__attentive_dv';function ca(e){const t=new Date;t.setTime(t.getTime()+60*e*60*1e3),P(oa,'1',{expires:t})}function ua(e){try{void 0===L(oa)&&async function(e){return fetch(`https://${_r.__attentive_domain}/d?attn_vid=${e.getId()}`).then((e=>e.text()))}(e).then((t=>{t.includes('true')&&e.rotateId(),ca(24)})).catch((()=>{ca(2)}))}catch(e){ca(2)}}const sa=async()=>{performance.mark(T.TagCreativesLoaded);const e=new Er;ua(e),(e=>{const t=Hi(e),n=Object.values(lr);for(const e of Object.keys(t)){const r=e.toLocaleLowerCase(),i=r.substring(4);qr(r,Vi)&&n.includes(i)&&P(`${Gi}${i}`,t[e],{expires:new Date(Date.now()+18e5)})}})(_r.location.search);const t=await xi();(e=>{if(e){const{cookieKey:t,cookiePersistTimeInSeconds:n,getCookieValue:r}=e,i=r();void 0!==i&&P(t,i,{expires:yr(n)})}})(t.SET_GENERIC_COOKIE),((e,t)=>{if(e&&t){const{key:e,value:n}=t;P(e,n??'true',{expires:hr()})}})(t.SHOULD_BLOCK_WITH_COOKIES,t.DISALLOWED_COOKIES),(e=>{if(e){const t=e.cookieKey||'__attentive_creativeFilter',n=e.getCookieValue();void 0!==n&&P(t,n,{expires:hr()})}})(t.SET_CREATIVE_FILTER_SESSION_COOKIE),(e=>{if(e){const t=e();t&&P('__attentive_client_user_id',t)}})(t.ATTENTIVE_CLIENT_USER_ID);let n={};var r;r=t.ON_TAG_INITIALIZATION,r?.();const i=ki(),a=Ri(t,e,i,'marketing'),o=Ri(t,e,i,'live-sms'),c=Ri(t,e,i,'topBar'),u=async(e={},r={})=>{performance.mark(T.FetchCreativesStart);const i=await aa(t,e);performance.mark(T.FetchCreativesEnd);const{overlay:u,support:s,embedded:d}=i;u?a.showCreatives(u,r):'2'===_r.__attentive_cfg?.lt&&n.overlay&&a.showCreatives(n.overlay,r),s&&o.showCreatives(s,{skipLoadingRestrictions:!0}),d&&c.showCreatives(d,{skipLoadingRestrictions:!0}),n=i},s=()=>{a.hideCreatives()},d=async()=>{!function(){const e=Ki();P($i,`${e+1}`,{expires:hr()})}(),s();const n=(e=>{const t={userID:e.getId()};if(location.href.includes('attn_creative_id=')){const{attn_creative_id:e}=Hi(location.href);t.creativeID=parseInt(e,10)}return t.targets=[],t.triggers=[],t})(e),r={email:null,initiator:'attn',skipLoadingRestrictions:Boolean(n.creativeID)||_r.attn_mobile_app,hideInitialView:'2'===_r.__attentive_cfg?.lt};await Di(t.SHOULD_DELAY_CREATIVES_FETCH),u(n,r)};((e={})=>{_r.__attentive?_r.__attentive={..._r.__attentive,...e}:_r.__attentive=e})({show:d,hide:s,trigger:async(t,r,i,a,o)=>{const c={customFilterParam:t,anonymousID:r,creativeID:a,userID:e.getId(),targets:['overlay'],triggers:['standard']},s={email:i,hideInitialView:Boolean(o),skipLoadingRestrictions:!0,previouslyLoaded:'2'===_r.__attentive_cfg?.lt&&!!n,initiator:'sdk'};u(c,s)}}),d();return{triggerAddToCartCreative:()=>{a.triggerAddToCartCreative()},reattachWaitlistButton:()=>{a.reattachWaitlistButton()}}},da=()=>{let e,t,n=!1,r=!1;const i=async()=>{if(!n){n=!0;const{triggerAddToCartCreative:r,reattachWaitlistButton:i}=await sa();e=r,t=i}};return Ln({[gt]:(e,t)=>{const n=f();n&&'none'!==n.style.display&&m(n);const{clientConfiguration:a}=t.data;r=!0===a.cc?.pcve;!e||e&&!e[Ye]||i()},[yt]:()=>{i()},[Et]:(e,{data:t,meta:n})=>{let i;i=t.items&&Array.isArray(t.items)&&t.items.length>0&&'object'==typeof t.items[0]?t.items[0]:t;const{sku:a,subProductId:o,price:c,cartCurrency:u,image:s,name:d,productId:l}=i;if(r&&Pn&&n?.dataType===bt&&d&&c&&s&&(a||l)){const e={name:d,image:s,price:c,sku:a||l,cartCurrency:u,variantId:o,location:_r.location.href},t=_r.__attentive_domain,n=_r.localStorage.getItem('attn_pdp');let r={};if(n){r=JSON.parse(atob(n))}if(t){let n=(!0===Array.isArray(r[t])?r[t]:[]).filter((t=>t.sku!==e.sku));n.unshift(e),n.length>3&&(n=n.slice(0,3)),r[t]=n,_r.localStorage.setItem('attn_pdp',btoa(JSON.stringify(r)))}}const v=I();if(v){v.getAttribute('data-product-price')||void 0===c||(p=`${c}`,(f=v).setAttribute('data-product-price',p),f.style.display='block');const e=E();e&&!0===e.disabled&&function(e){const t=e.getAttribute('data-enabled-text');t&&(e.disabled=!1,e.innerText=t)}(e)}var f,p},[Ct]:(n,{data:r,meta:i})=>{i?.dataType===wt&&'function'==typeof e&&e();const{sku:a,subProductId:o,productId:c}=r,u=f();if(u&&i?.dataType===bt){const{evaluateEligibility:e}=Dn[p()?'shopify':'base'];if((a||c)&&o&&e({variantId:`${o}`})){let e=d();const n=(s={productId:`${a||c}`,variantId:`${o}`},'true'===d()?.getAttribute('data-signup-complete')&&y().includes(g(s)));!e&&t&&(t(),e=d()),!e||u.getAttribute('data-product-id')===`${a||c}`&&u.getAttribute('data-variant-id')===`${o}`||!0!==e.disabled||n?e&&n&&v(e):function(e){const t=e.getAttribute('data-enabled-text');t&&(e.disabled=!1,e.innerText=t)}(e),function(e,t,n){e.setAttribute('data-product-id',t),e.setAttribute('data-variant-id',n),e.style.display='block'}(u,`${a||c}`,`${o}`)}else m(u)}var s}})};function la(e){return function(t,n){return{type:e,data:t,meta:n}}}const va=la(gt),fa=la(_t),pa=la(yt),ma=la(ht),ga=la('uc'),ya=la('cd'),ha=la(Et),_a=la(Ct),Ea=la('imp');function Ca(e){var t,n;return e&&{name:e.name,category:e.category,image:e.productImage,price:null===(t=e.price)||void 0===t?void 0:t.value,currency:null===(n=e.price)||void 0===n?void 0:n.currency,quantity:e.quantity?String(e.quantity):'',productId:e.productId,subProductId:e.productVariantId}}function Ia(e){return e&&{items:e.map(Ca)}}function wa(e){return e&&{phone:e.phone,email:e.email}}function Ta(e){return e&&{cartId:e.cartId,cartCoupon:e.cartCoupon}}var ba='_attn_';function Aa(){var e;try{var n=null;if(Nn){var r=sessionStorage.getItem(ba);n=r?JSON.parse(r):null}var i=function(e){if(!e)throw new Error(j);try{return JSON.parse(atob(e))}catch(t){try{return JSON.parse(e)}catch(e){throw new Error(j)}}}(L(ba)),a=i?Object.keys(i).reduce((function(e,t){var n=JSON.parse(i[t]);return e[t]=function(e){if(!e)return!0;const t=24*e[$t]*60*60*1e3;return e[qt]+t<Date.now()}(n)?null:n,e}),{}):null;e=t(t({},n),a)}catch(e){throw new Error(j)}return e}function Sa(e){try{Nn&&sessionStorage.setItem(ba,JSON.stringify(e));var t=Object.keys(e).reduce((function(t,n){return Wt(e[n])&&(t[n]=JSON.stringify(e[n])),t}),{});return P(ba,btoa(JSON.stringify(t)),{sameSite:'strict',expires:3650}),e}catch(e){throw new Error(H)}}function Oa(e){var t,n;if(e.data.clientConfiguration[pt])return(t={})[qt]=Date.now(),t[Yt]=Date.now(),t[$t]=3650,t[Kt]=!0,t.val=null!==(n=e.data.clientConfiguration[pt])&&void 0!==n?n:'',t}function La(e,n){var r,i,a,o,c,u,s,d;function l(n,r){var i,a,o,c=Date.now(),u=e[n];return(i={})[n]=t(((a={})[qt]=Wt(u)?u[qt]:c,a[Yt]=c,a[$t]=3650,a[Kt]=!1,a),r),o=i,t(t({},e),o)}switch(n.type){case gt:try{var v=function(e){var n,r,i,a,o=Aa(),c=Oa(e);return t(t(t(t(((n={})[Tt]=0,n[Ve]='',n[Ye]=null,n[tt]=null,n),o),((r={})[xe]=e.data.clientConfiguration.company,r[Me]=e.data.clientConfiguration.ceid,r)),Na(e.data.clientConfiguration)),((i={})[ft]=null!==(a=e.data.clientConfiguration[ft])&&void 0!==a?a:'',i[pt]=c,i[je]=(new Date).getTime(),i[mt]=null,i))}(n);return(null===(u=window.__attentive_cfg)||void 0===u?void 0:u.cxd)&&function(e){P('__attentive_domain',e.data.clientConfiguration.company,{expires:7}),P('__attentive_ceid',e.data.clientConfiguration.ceid,{expires:7})}(n),Sa(v)}catch(e){Nn&&sessionStorage.removeItem(ba),R(ba);var f=Oa(n);return Sa(t(t(((r={})[Tt]=0,r[Ve]=window.location.href,r[Ye]=null,r[tt]=null,r[xe]=n.data.clientConfiguration.company,r[Me]=n.data.clientConfiguration.ceid,r),Na(n.data.clientConfiguration)),((i={})[ft]=null!==(s=n.data.clientConfiguration[ft])&&void 0!==s?s:'',i[pt]=f,i[je]=(new Date).getTime(),i[mt]=null,i)))}case yt:return Sa(l(Ye,((a={val:n.data.id})[$t]=n.data.maxAge,a)));case ht:return Sa(t(t({},e),n.data));case _t:return Sa(l(tt,((o={val:n.data.on||!1})[$t]=n.data.maxAge||365,o[Kt]=!0,o)));case Ct:return window.location.href===e[Ve]&&(null===(d=n.meta)||void 0===d?void 0:d.dataType)!==Tt?e:Sa(t(t({},e),((c={})[Ve]=window.location.href,c[Tt]='number'==typeof e[Tt]?e[Tt]+1:1,c)));default:return e}}function Na(e){var t,n,r,i,a,o=e[ut],c=null===(n=e[ct])||void 0===n?void 0:n[st],u=null===(r=e[ct])||void 0===r?void 0:r[dt],s=null===(i=e[it])||void 0===i?void 0:i[Ft],d=null===(a=e[it])||void 0===a?void 0:a[Ht],l=((t={})[ut]='',t[st]=null!=c&&c,t[dt]=null!=u&&u,t[lt]=null!=s&&s,t[vt]=null!=d?d:void 0,t);return o&&(l[ut]=Object.entries(o).reduce((function(e,t){var n=t[0];return t[1]?''.concat(e).concat(n,','):e}),'').slice(0,-1)),l}var Pa,Ra,ka=!1,Da=!1;function Ba(e){var n=e.clientConfiguration,r=e.services,i=void 0===r?[]:r;if(ka)return Ra;function a(e){if(e&&e.type)if(Da)queueMicrotask((function(){return a(e)}));else{Da=!0;try{var t={dispatch:a};Pa=La(Pa,e);for(var n=0,r=i;n<r.length;n++){(0,r[n])(Pa,e,t)}}catch(e){zt(U,e)}finally{Da=!1}}}return a(va({clientConfiguration:n})),Ra=function(e){function n(n){return function(r){var i,a,o={};switch(n){case bt:o=r?t(t({},Ia(r.items)),wa(r.user)):null;break;case wt:o=r?t(t(t({},Ia(r.items)),Ta(r.cart)),wa(r.user)):null;break;case At:o=r?t(t(t(t({},Ia(r.items)),Ta(r.cart)),(a=r.order)&&{orderId:a.orderId}),wa(r.user)):null;break;case It:o=r?t(t(t({},Ta(r.cart)),{products:null===(i=Ia(r.items))||void 0===i?void 0:i.items}),wa(r.user)):null}e(ha(o||{},{source:ue,dataType:n}))}}var r,i={version:D,analytics:{enable:function(t){return e(fa({on:!0,maxAge:(null==t?void 0:t.expires)||365}))},disable:function(){return e(fa({on:!1}))},track:function(e,t){var n={page_view:i.analytics.pageView,product_view:i.analytics.productView,add_to_cart:i.analytics.addToCart,purchase:i.analytics.purchase,identify:i.analytics.identify};n[e]&&n[e](t)},addToCart:n(wt),pageView:n(Tt),productView:n(bt),purchase:n(At),identify:(r=Bt,function(t){var n={phone:null==t?void 0:t.phone,email:null==t?void 0:t.email};(null==t?void 0:t.externalIdentifiers)&&P('__attentive_custom_ids',JSON.stringify(null==t?void 0:t.externalIdentifiers)),e(ha(n||{},{source:ue,dataType:r}))}),cartUpdated:n(It)}};return window.dataLayer&&window.__attentive_cfg&&'1'===window.__attentive_cfg.gtm&&window.dataLayer.push({event:'attentive_loaded'}),i}(a),ka=!0,Ra}function xa(){return{[pe]:te,[ge]:{availabilities:'availabilities',catalogFields:'catalogFields'}}}const Ma={create:xa,explain:function(e){if(e[pe]!==te)throw new Error('incorrect enricher configuration type');const t=e[ge];return{type:'JSON+LD Availability Enricher',desc:['collects availability and catalog data from script[type="application/ld+json] where "type" is "Product" or "ProductGroup".',...Object.entries(t).map((([e,t])=>`• reads "${e}" from "${t}" property`))]}},mappings:{product:{availabilities:'availabilities',catalogFields:'catalogFields'}}};function Ua(e){const t=e[pt]&&''!==e[pt];return window.__attn_loaded_via_cloudflare&&t}function Fa(e){var t;return(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.source)===ue}Ma.explain(Ma.create());var Ha='timeout',ja='cancelled';function Va(e,t,n,r){var i;void 0===t&&(t=1e4),void 0===n&&(n=250),void 0===r&&(r=!0);var a=Number(new Date)+t,o=!1,c=n,u=new Promise((function t(u,s){if(o)return s({reason:ja});var d=e();d?u({result:d}):Number(new Date)<a?(i&&clearTimeout(i),i=setTimeout(t,c,u,s),r&&(c=Math.min(c+n/4,1e3))):s({reason:Ha})}));return u.cancel=function(){o||(o=!0)},u}var Ga='b',qa='a',Ya='e',$a='u',Ka='t';function Wa(e){return r(this,0,void 0,(function(){var t;return i(this,(function(n){return t=[],[2,new Promise((function(n){var r=!1,i=function(e){if(!r)return r=!0,n(function(e){switch(e){case Ya:return'error';case Ga:return'browser';case qa:return'none';case $a:case Ka:return'unknown'}}(e))};try{var a=new XMLHttpRequest;a.timeout=1e3;var o=performance.now()+a.timeout;a.onreadystatechange=function(){if(t.push(a.readyState),4===a.readyState){if(200===a.status)return i(qa);if(0===a.status||a.responseURL!==e)return performance.now()>=o?i(Ka):i(Ga);i($a)}},a.ontimeout=function(){i(Ka)},a.open('HEAD',e,!0),a.send(null)}catch(e){i(Ya)}}))]}))}))}var Ja,Xa='_attn_bopd_',za=null;function Za(){if(null!=Ja)return Promise.resolve(Ja);var e=L(Xa);return void 0!==e?(Ja=e,Promise.resolve(e)):za||new Promise((function(e){var t=setTimeout((function(){e('unknown')}),1e3),n=setInterval((function(){null!=Ja&&(clearTimeout(t),clearInterval(n),e(Ja))}),50)}))}var Qa=function(e){return'[object Object]'===Object.prototype.toString.call(e)};function eo(e,t){if(void 0===t&&(t=[]),'function'==typeof e)return null;if(Qa(e)){if(t.indexOf(e)>=0)return null;t.push(e);for(var n={},r=0,i=Object.entries(e);r<i.length;r++){var a=i[r],o=a[0],c=a[1];n[o]=eo(c,t)}return n}return Array.isArray(e)?e.map((function(e){return eo(e,t)})):e}var to=function(e,t){var n;return(null===(n=t.querySelector(e))||void 0===n?void 0:n.textContent)||null},no=function(e,t,n){var r;return e||n instanceof Document?e&&(null===(r=n.querySelector(e))||void 0===r?void 0:r.getAttribute(t))||null:n.getAttribute(t)||null},ro=function(e,t,n){var r=n.querySelector(e);if(r&&t in r){var i=r[t];if(null!=i)return''.concat(i)}return null};function io(e,t){return Object.entries(e).reduce((function(e,n){var r=n[0],i=n[1];return e[r]=function(e,t){var n=null;if('string'==typeof(n='string'==typeof e[Le]?ro(e[Ae],e[Le],t):'string'==typeof e[Oe]?no(e[Ae],e[Oe],t):to(e[Ae],t))){n=n.replace(/\n\t/g,'').trim();var r=new RegExp(e[we]||'.*'),i=n.match(r);n=i?i[0]:n}return n}(i,t),e}),{})}var ao={prop:function(e,t){return t[e.target]},idx:function(e,t){if(!(e.key<0))return e.target&&t[e.target]?t[e.target][Number(e.key)]:t[Number(e.key)];if(e.target)return t[e.target][t[e.target].length+e.key];if(Array.isArray(t))return t[t.length+e.key]},exists:function(e,t){if(Array.isArray(t[e.target]))return t[e.target].find((function(t){return null!=(null==t?void 0:t[e.key])||Array.isArray(t)&&(null==t?void 0:t.includes(e.key))}))},eq:function(e,t){return Array.isArray(t[e.target])?t[e.target].find((function(t){return t[e.key]===e.val})):'object'==typeof t[e.target]&&t[e.target][e.key]===e.val?t[e.target]:void 0}};function oo(e,t){var n=function(e){for(var t=[],n=e.split(''),r='.',i='<',a='>',o=!1,c='',u=0,s=n;u<s.length;u++){var d=s[u];d!==i?d!==a?d!==r||o?null!=d&&(c+=d):(t.push(c),c=''):o=!1:o=!0}return t.push(c),t}(e);return function(e){var r=t||null;return'object'!=typeof e?r:n.reduce((function(e,t){if(e){var n=(a=/\[.*\]/.test(i=t),o=i.match(/\[(.*)\]/),c=i.match(/\["(.*)"\]/),u=i.match(/\[(-?\d*)\]/),s=i.match(/\[(\w*)="(.*)"\]/),d=a?i.slice(0,i.indexOf('[')):i,null!=u&&u[1]?{type:'idx',target:d,key:Number(u[1])}:s&&s[1]&&s[2]?{type:'eq',target:d,key:s[1],val:s[2]}:c?{type:'exists',target:d,key:c[1]}:a&&Array.isArray(o)?{type:'exists',target:d,key:o[1]}:{type:'prop',target:d});return ao[n.type](n,e)||r}var i,a,o,c,u,s,d;return r}),e)}}var co=function(e,t){var n;return null===(n=t.querySelector(e))||void 0===n?void 0:n.innerHTML},uo=function(e,t){var n;return null===(n=t.querySelector(e))||void 0===n?void 0:n.textContent},so=function(e,t,n){var r;return e||n instanceof Document?e?null===(r=n.querySelector(e))||void 0===r?void 0:r.getAttribute(t):void 0:n.getAttribute(t)},lo=function(e,t,n){var r=n.querySelector(e);if(r&&t in r){var i=r[t];if(null!=i)return''.concat(i)}};function vo(e,t){for(var n={},r=0,i=Object.keys(e);r<i.length;r++){var a=i[r],o=e[a];n[a]=po(o,t)}return n}function fo(e,t){if('string'==typeof e){e=e.replace(/\n\t/g,'').trim();var n=new RegExp(t),r=e.match(n);return e=r?r[0]:e}}function po(e,t){var n=null;if('string'==typeof e[Le])n=lo(e[Ae],e[Le],t);else{if('string'!=typeof e[Oe]){var r=uo(e[Ae],t),i=fo(r,e[we]||'.*');if(!r||r===i){var a=co(e[Ae],t),o=fo(a,e[we]||'.*');if(a&&a!==o)return o}return n=i}n=so(e[Ae],e[Oe],t)}return fo(n,e[we]||'.*')}var mo=[];var go=512,yo=new Set(['ergobaby.attn.tv','ergobaby-us.attn.tv']);function ho(e){return e?'object'==typeof e&&!Array.isArray(e)&&'@graph'in e?e['@graph']||[]:Array.isArray(e)?e:[e]:[]}function _o(e){for(var t=e.toLowerCase(),n=0,r=Object.entries({instock:'InStock',outofstock:'OutOfStock',backorder:'BackOrder',discontinued:'Discontinued',limitedavailability:'LimitedAvailability',instoreonly:'InStoreOnly',madetoorder:'MadeToOrder',onlineonly:'OnlineOnly',preorder:'PreOrder',presale:'PreSale',reserved:'Reserved',soldout:'SoldOut'});n<r.length;n++){var i=r[n],a=i[0],o=i[1];if(t.includes(a))return o}return'InStock'}var Eo='attntv_mstore_';function Co(e){var t=L(Eo+e);return t?t.split(':')[0]:null}function Io(e){return function(t){return document.querySelector('meta['.concat(e,'="').concat(t,'"]'))}}function wo(e){if(!e.includes('?'))return{};var t=e.slice(e.indexOf('?')+1);return t?t.split('&').reduce((function(e,t){var n=t.split('='),r=n[0],i=n[1];return e[r]=i,e}),{}):{}}function To(e){return e&&Number.isInteger(e)?String((e/100).toFixed(2)):null}var bo=function(e){var n,r,i,a;e||(e=function(){var e,t,n;if(Oo()){var r=null!==(t=null===(e=window.ShopifyAnalytics)||void 0===e?void 0:e.meta)&&void 0!==t?t:{},i=r.selectedVariantId,a=r.product,o=r.currency,c=void 0;if(i||(l=null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.href,v='variant',i=wo(l)[v]||null||''),a){var u=a.id,s=a.variants,d=a.type;return s&&'string'==typeof i&&i.length>0?c=s.find((function(e){return String(e.id)===i})):s&&s.length>0&&(c=s[0]),{id:u,type:d,selectedVariantId:i,selectedVariant:c||void 0,currency:o}}}var l,v;return null}());var o=function(){var e;if(function(){var e;return Boolean(null===(e=window.Shopify)||void 0===e?void 0:e.checkout)}())return null===(e=window.Shopify)||void 0===e?void 0:e.checkout}(),c={};if(null!=e&&(c={currency:e.currency,category:e.type,sku:String(e.id),subProductId:e.selectedVariantId},null!=e.selectedVariant)){var u=e.selectedVariant,s=u.id,d=u.price,l=u.name;c=t(t({},c),{name:l,price:To(d),subProductId:String(s)})}return null!=o&&(c=t({uid:String(o.customer_id),orderId:String(o.order_id),cartTotal:o.total_price,email:o.email,phone:null===(n=o.billing_address)||void 0===n?void 0:n.phone,cartCoupon:null===(r=null==o?void 0:o.discount)||void 0===r?void 0:r.code,cartDiscount:null===(i=null==o?void 0:o.discount)||void 0===i?void 0:i.amount,cartCurrency:null==o?void 0:o.currency,items:null===(a=o.line_items)||void 0===a?void 0:a.map((function(e){return{name:e.title,price:e.price,quantity:String(e.quantity),image:e.image_url,sku:e.product_id,subProductId:e.variant_id}}))},c)),c};var Ao=function(){var e,t;if(Oo()){var n=(null!==(t=null===(e=window.ShopifyAnalytics)||void 0===e?void 0:e.meta)&&void 0!==t?t:{}).product;if(n){var r=n.variants;if(r&&r.length>0)return r}}return[]},So=function(e){return e.find((function(e){return!!e}))};function Oo(){return Boolean(oo('ShopifyAnalytics.meta.product')(window))}var Lo;function No(){var e,t,n,r=Boolean(oo('attn_product')(window))?window.attn_product:void 0,i=function(){if(Boolean(oo('attn_order')(window)))return window.attn_order}(),a={};return null!=r&&(a={currency:null===(e=r.price)||void 0===e?void 0:e.currency,category:r.category,sku:r.productId,subProductId:r.productVariantId,name:r.name,image:r.productImage,quantity:r.quantity,price:null===(t=r.price)||void 0===t?void 0:t.value}),null!=i&&(a={cartTotal:i.orderTotal,email:i.email,phone:i.phone,orderId:i.orderId,items:null===(n=i.products)||void 0===n?void 0:n.map((function(e){return{sku:e.id,image:e.image,name:e.name,subProductId:e.variantId,price:e.price,quantity:e.quantity}}))}),a}var Po=((Lo={}).jld=function(e){var t=e[ge],n=document.querySelectorAll('script[type="application/ld+json"]');if(n.length>0){var r={};return Array.from(n).some((function(e){var t;try{var n=JSON.parse(e.innerHTML);if(n&&'product'===(null===(t=n['@type'])||void 0===t?void 0:t.toLowerCase()))return r=n,!0}catch(e){}return!1})),Object.keys(t).reduce((function(e,n){var i=t[n];if('string'==typeof i){var a=r[i];a&&('object'!=typeof a?e[n]=a:'object'==typeof a&&a[n]&&(e[n]=a[n]))}return e}),{})}return{}},Lo[te]=function(e){var n=document.querySelectorAll('script[type="application/ld+json"]'),r=0;if(0===n.length)return{};var i={},o=[],c=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var i=r[n];try{for(var a=ho(JSON.parse(i.innerHTML)),o=0,c=a;o<c.length;o++){var u=c[o];if('BreadcrumbList'===u['@type']&&'itemListElement'in u){var s=u.itemListElement;if(Array.isArray(s)){var d=S(s);d&&t.add(d)}}}}catch(e){}}return Array.from(t)}(Array.from(n));Array.from(n).forEach((function(e){try{var t=JSON.parse(e.innerHTML);if(!t)return;ho(t).forEach((function(e){var t,n=null===(t=e['@type'])||void 0===t?void 0:t.toLowerCase();if('product'===n||'productgroup'===n){o.push({schema:e});var a=function(e){var t={};function n(e){if(e.offers)for(var n=e.sku?String(e.sku):void 0,i=0,a=Array.isArray(e.offers)?e.offers:[e.offers];i<a.length;i++){var o=a[i];if(o.availability){r++;var c=o.sku?String(o.sku):void 0;c?t[c]=_o(o.availability):n?t[n]=_o(o.availability):t['']=_o(o.availability)}}}if('ProductGroup'===e['@type']){if(Array.isArray(e.hasVariant))for(var i=0,a=e.hasVariant;i<a.length;i++){n(a[i])}}else n(e);return t}(e);Object.assign(i,a)}})),r>1&&i['']&&delete i['']}catch(e){}}));var u={availabilities:JSON.stringify(function(e){var t=Object.keys(e);if(t.length<=50)return e;for(var n=t.sort((function(){return Math.random()-.5})).slice(0,50),r={},i=0,a=n;i<a.length;i++){var o=a[i];r[o]=e[o]}return r}(i))},s=window.__attentive_domain;if(!s||!yo.has(s))return u;for(var d=function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],a=I(i.schema);t[a]||(t[a]=[]),t[a].push(i)}return t}(o),l={},v=0,f=Object.entries(d);v<f.length;v++){var p=f[v],m=p[0],g=p[1];try{var y=E(g,c);y&&(l[m]=y)}catch(e){}}var h=Object.keys(l);if(h.length>0){var _=h.find((function(e){return''!==e}))||h[0];u.catalogFields=JSON.stringify(l[_])}return u;function E(e,t){var n=e.find((function(e){return function(e){var t=!!(e.name&&'string'==typeof e.name&&e.name.trim().length>0);if(!t)return!1;return!0}(e.schema)}));if(!n)return null;var r=n.schema,i=r.name||'',a=r.description||'';i.length>go&&(i=i.slice(0,go)),a.length>go&&(a=a.slice(0,go));for(var o={productId:I(r),name:i,description:a,images:T(r.image||void 0),categories:A(r,t),brand:b(r.brand||void 0),variants:{}},c=[],u=0,s=e;u<s.length;u++){var d=s[u];'ProductGroup'===d.schema['@type']?Array.isArray(d.schema.hasVariant)&&c.push.apply(c,d.schema.hasVariant):c.push(d.schema)}for(var l=new Set,v=0,f=c;v<f.length;v++){var p=f[v],m=w(p);m&&(l.has(m)||(C(p,o),l.add(m)))}return o}function C(e,t){var n=w(e);if(null!=n){var r;(r=!e.sku?t.name:e.name||t.name).length>go&&(r=r.slice(0,go));var i=e.description||'';i.length>go&&(i=i.slice(0,go));var a={name:r,description:i,price:0,availability:'InStock'};if(e.offers){var o=function(e,t){return e.find((function(e){return e.sku===t}))||e[0]||null}(Array.isArray(e.offers)?e.offers:[e.offers],n);o&&(o.price&&(a.price=function(e){if('number'==typeof e)return e;var t=parseFloat(String(e).replace(/[^\d.-]/g,''));return isNaN(t)?0:t}(o.price)),o.availability&&(a.availability=_o(o.availability)))}t.variants[n]=a}}function I(e){return String(e.productID||e.sku||'')}function w(e){if(e.offers){var t=(Array.isArray(e.offers)?e.offers:[e.offers]).find((function(e){return e.sku}));if(null==t?void 0:t.sku)return String(t.sku)}return e.sku?String(e.sku):e.gtin?String(e.gtin):''}function T(e){return e?(Array.isArray(e)?e:[e]).filter((function(e){return'string'==typeof e&&e.trim().length>0})):[]}function b(e){if(e)return'string'==typeof e?e:'object'==typeof e&&e.name?e.name:void 0}function A(e,t){var n=[];if(e.category){var r=Array.isArray(e.category)?e.category:[e.category];n.push.apply(n,r.map((function(e){return String(e)})))}return n.push.apply(n,t),a([],new Set(n))}function S(e){return e.map((function(e){var n=e.name;return!n&&e.item&&'object'==typeof e.item&&e.item.name&&(n=e.item.name),t(t({},e),{name:n})})).filter((function(e){return e&&e.name&&!function(e){if('string'!=typeof e)return!1;var t=e.toLowerCase();if('home'===t||'homepage'===t)return!0;return!1}(e.name)})).sort((function(e,t){return(e.position||0)-(t.position||0)})).map((function(e){return e.name})).join(' > ')}},Lo.met=function(e){for(var n={},r=Object.entries(t({},e[ge])),i=Io('property'),a=Io('name'),o=Io('itemprop'),c=0,u=r;c<u.length;c++){var s=u[c],d=s[0],l=s[1];if('string'==typeof l){var v=i(l)||a(l)||o(l);v&&(n[d]=v.getAttribute('content'))}}return n},Lo.shp=function(e,t){var n;return(null==e?void 0:e[ke])&&(n=function(e,t){var n=[],r=Ao();return null==e||e.forEach((function(e){var i=(0,Po[e[pe]])(e,t),a=function(e,t){return t.find((function(t){return String(t.id)===e}))}(null==i?void 0:i.subProductId,r);a&&n.push(a)})),n.push(r[0]),function(e){var t,n;if(Oo()){var r=null!==(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.meta)&&void 0!==n?n:{},i=r.product,a=r.currency;if(i)return{id:i.id,type:i.type,selectedVariantId:''.concat((null==e?void 0:e.id)||''),selectedVariant:e||void 0,currency:a}}return null}(So(n))}(e[ke],t)),bo(n)},Lo.ltc=function(){return{email:Co('email'),phone:Co('phone'),cartCoupon:Co('cartCoupon')}},Lo.dsp=function(e,t){var n,r=e[ge],i=e.cs;if(null!=i&&e[be]){var a=document.querySelectorAll(i),o=Array.from(a).map((function(e){return vo(r,e)}));return(n={})[e[be]||'']=o,n}return t&&t.trigger&&t.trigger[Ne]?vo(r,t.trigger[Ne]):vo(r,document)},Lo.wsp=function(e){var t,n=e[ge];return t=e[Ne]?oo(e[Ne]||'')(window):window,Object.entries(n).reduce((function(e,n){var r=n[0],i=n[1];return e[r]=oo(i||'',null)(t),e}),{})},Lo.dls=function(e,t){var n;if(!window.dataLayer||!Array.isArray(window.dataLayer))return{};var r={},i=((n={})[It]=[],n[bt]=['viewitem','viewcontent'],n[wt]=['addtocart'],n[At]=['purchase'],n[Lt]=[],n.i=[],n[Bt]=[],n);if((null==t?void 0:t.dataType)&&t.dataType in i){var a=i[t.dataType],o=window.dataLayer.find((function(e){if(function(e){return'object'==typeof e}(e)&&'string'==typeof(null==e?void 0:e.event)){var t=e.event.toLowerCase().replace(/[^a-z]/gi,'');return a.includes(t)&&!mo.includes(e)}return!1}));o&&(mo.push(o),r='object'==typeof(null==o?void 0:o.ecommerce)?o.ecommerce:o)}return r},Lo.wce=No,Lo.cmps=function(e,t){for(var n,r={},i=0,a=Object.entries(e[ge]||{});i<a.length;i++){var o=a[i],c=o[0],u=o[1];if(u)for(var s=0,d=u;s<d.length;s++){var l=d[s],v=null;if('dsp'===l[pe]){var f=document,p=null===(n=null==t?void 0:t.trigger)||void 0===n?void 0:n[Ne];if('string'==typeof p){var m=document.querySelector(p);null!=m&&(f=null!=m?m:document)}else p instanceof HTMLElement&&(f=p);v=po(l,f)}else'wsp'===l[pe]?v=oo(l[Se],null)(window):'qpsp'===l[pe]&&(v=new URLSearchParams(location.search).get(l[Re]));if(v){r[c]=v;break}}}return r},Lo.crt=function(e){var t=e.pf,n=e.rs,r=e.ps,i=document.querySelector(n);return i?function(e,t,n){var r=n.querySelectorAll(t);return{items:Array.from(r).map((function(t){return io(e,t)}))}}(t,r,i):{}},Lo);var Ro=function(e,t){var n=t&&t[ge]||{},r=a(a([],['availabilities','cartCoupon','cartDiscount','cartTotal','catalogFields','category','currency','email','image','items','name','orderId','phone','price','productId','quantity','sku','subProductId','uid']),Object.keys(n)),i=['*'];return'object'==typeof e.enr&&i.push.apply(i,Object.keys(e.enr)),function(e){for(var t={},a=0,o=r;a<o.length;a++)for(var c=o[a],u=0,s=n[c]||i;u<s.length;u++){var d=s[u];'*'!==d||t[c]||(t[c]=null==e?void 0:e.trigger[c]),e[d]&&e[d][c]&&!t[c]&&(t[c]=e[d][c])}if(e.trigger)for(var l=0,v=Object.keys(e.trigger);l<v.length;l++){t[c=v[l]]||(t[c]=null==e?void 0:e.trigger[c])}for(var f=0,p=r;f<p.length;f++){t[c=p[f]]||delete t[c]}return t}};function ko(e){var t=e.split('.');return function(e){var n={};if('object'==typeof e){for(var r=0,i=t;r<i.length;r++){var a=i[r];n=e[a]?e[a]:e}return n}}}function Do(e,t){var n,r,i=null;if(Array.isArray(t))i=t.map((function(t){return Do(e,t)}));else if(null!==t&&'object'==typeof t&&e[ge]){for(var a=0,o=Object.keys(t);a<o.length;a++){var c=o[a];e[ge][c]&&t[c]&&(t[c]=(n=e[ge][c],r=t[c],n.reduce(Bo,r)))}i=t}return i}function Bo(e,t){switch(t.type){case ce:return function(e,t){for(var n=t,r=0,i=e.cfg;r<i.length;r++){var a=i[r];n=n.replace(new RegExp(a[0],'g'),a[1])}return n}(t,e);case oe:return function(e,t){for(var n=t,r=0,i=e.cfg;r<i.length;r++){var a=i[r],o=a[0],c=a[1];if(o>=0)n=n.slice(0,o)+c+n.slice(o);else if(-1===o)n=n.slice(o+1)+c;else{var u=n.slice(0,n.length+o),s=n.slice(o);n=u+c+s}}return n}(t,e);case ae:return function(e,t){for(var n=t,r=0,i=e.cfg;r<i.length;r++){var a=i[r];n=n.slice(a[0],a[1])}return n}(t,e);default:return e}}function xo(e,n,r){var i=(e||Object.keys(n[le]||{})).reduce((function(e,i){var a,o,c=null===(a=n[le])||void 0===a?void 0:a[i];if(!c)return e;switch(c[pe]){case re:var u=function(e){function n(t){return Object.keys(e[ge]).reduce((function(t,n){if(null==n?void 0:n.includes('.')){var r=e[ge][n],i=oo(n)(t);i&&(t[r]=i)}else if(null==t?void 0:t[n]){if((r=e[ge][n])===n)return t;t[r]=t[n],delete t[n]}return t}),t)}var r=e[fe];return function(e){return r.reduce((function(e,t){if(e[t])e[t]=n(e[t]);else if(t.includes('.')){var r=oo(t,null)(e);Array.isArray(r)&&r.forEach((function(e){e&&n(e)}))}return e}),t({},e))}}(c);return e=u(r);case ie:u=(o=c,function(e){for(var t=0,n=o[fe];t<n.length;t++){var r=n[t];if(r.includes('.')){var i=Do(o,oo(r)(e));ko(r)(i)}else e[r]=Do(o,oo(r)(e))}return e});return e=u(r);default:return e}}),t({},r)),a=(e||Object.keys(n[le]||{})).reduce((function(e,t){var i,a=null===(i=n[le])||void 0===i?void 0:i[t];if(!a)return e;if(a[pe]===ne){var o=Ro(n,a);return e.transformed=o(r),e}return e}),t({},i));return a}function Mo(e,n,r){var i,a;if((null===(i=n.meta)||void 0===i?void 0:i.dataType)===Dt)return n.data;if((null===(a=n.meta)||void 0===a?void 0:a.dataType)===bt){if(e&&e[de])Object.values(e[de]).some((function(e){return e[pe]===te}))||(e[de].jlda=xa());if(r&&r[de])Object.values(r[de]).some((function(e){return e===te}))||r[de].push('jlda')}var o,c=r||{},u=function(t){var n=eo(t);return xo(c[le],e,n)}((o={trigger:n.data},function(e,n,r,i){var a=(e||Object.keys(n.enr||{})).reduce((function(e,a){var o,c=null===(o=n[de])||void 0===o?void 0:o[a];if(!c)return e;var u=c[pe],s=Po[u];return s&&(r[a]=s(c,i)),t(t({},e),r)}),r);return a}(c[de],e,o,n.meta))),s=u.trigger;return u.transformed||s}var Uo=12e4;function Fo(e,t){return r(this,0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return[4,Va((function(){var e;return Boolean(null===(e=window.ShopifyAnalytics)||void 0===e?void 0:e.meta)}),Uo).catch((function(){}))];case 1:return i.sent(),'product'===oo('ShopifyAnalytics.meta.page.pageType')(window)&&(n=bt,r=bo(),a=function(r){return t(ya(r,{trigger:{id:e[ve]},source:z,dataType:n}))},r&&a(r)),[2]}}))}))}function Ho(e,t){return'*'===e||(new RegExp(e).test(t||'')||(null==t?void 0:t.includes(e))||!1)}var jo='[0-9]+\\/checkouts\\/\\w+\\/thank_you';function Vo(e,t){return r(this,0,void 0,(function(){var n,r,a;return i(this,(function(i){return('thank_you'===oo('Shopify.Checkout.step')(window)||Ho(jo,window.location.href))&&(n=At,r=bo(),a=function(r){return t(ya(r,{trigger:{id:e[ve]},source:z,dataType:n}))},r&&a(r)),[2]}))}))}function Go(e,t){var n=function(e){var t=Object.entries(e);return function(e,n){for(var r=n[0],i=n[1],a=0,o=t;a<o.length;a++){var c=o[a],u=c[0],s=c[1];if(s===r)e[u]=Ko(i);else if(Array.isArray(s)&&s.includes(r)){if(Object.keys(e).includes(u)&&null!=e[u])return e;e[u]=Ko(i)}else'string'==typeof s&&qo.test(s)&&new RegExp(Yo(s)).test(r)&&(e[u]=Ko(i))}return e}}(e);return function(e){return Object.entries(e).reduce(n,{})}}var qo=/^\/.*\/$/;function Yo(e){return e.substring(1,e.length-1)}var $o=/^\[.*\]$/;function Ko(e){if(!$o.test(e))return e;try{return JSON.parse(e)}catch(t){return e}}var Wo=function(e){return function(t){return Ho(e,t.name)}};function Jo(e){var t=e.pluginConfig,n=t[he],r=t[_e],i=Object.entries(r).reduce((function(e,t){var n=t[0],r=t[1];return r&&(e[r]=n),e}),{});return function(e){var r=wo(decodeURIComponent(e.name)),a=r[n],o=i[a];if(o){var c=function(e,t){var n=e[ye],r=n[Ee],i=t in n?n[t]:r,a=e[ge],o=null!=i?i[ge]:null;return null!=o&&o in a?Go(a[o]):function(){}}(t,o)(r);if(c)return ya(c,{source:t[me],trigger:{id:t[ve]},dataType:o})}return null}}function Xo(e){return{type:X,parse:Jo({pluginConfig:e}),shouldParse:Wo(e[Ce])}}var zo=function(e){return Array.isArray(e)?e:[e]},Zo=function(e){return Object.entries(e).reduce((function(e,t){var n=t[0],r=t[1];return r&&zo(r).forEach((function(t){return e[t.toLowerCase()]=n})),e}),{})},Qo=function(e){return Object.entries(e||{}).reduce((function(e,t){var n=t[0],r=t[1];return r&&zo(r).forEach((function(t){return e[t]=n})),e}),{})};var ec=function(e,t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r];if(Object.prototype.hasOwnProperty.call(t,a)){var o=t[a];if(Array.isArray(o)||'object'==typeof o)return zo(o)}}for(var c=[JSON.parse(JSON.stringify(e)||'{}')];c.length>0;){var u=c.shift();if('object'==typeof u&&null!==u){var s=Object.keys(u).find((function(e){return n.includes(e)}));if(s){var d=u[s];if(delete u[s],Array.isArray(d))return d;if('object'==typeof d&&null!==d)return[d]}else for(var a in u)c.push(u[a])}}return[]},tc=function(e,t,n){var r={};return t.forEach((function(t){var i=n[t]||t;if(null==t?void 0:t.includes('.')){var a=oo(t)(e);a&&(r[i]=a)}else(null==e?void 0:e[t])&&(r[i]=null==e?void 0:e[t])})),r};function nc(e){var n=e.pluginConfig,r={category:['item_category'],image:['imageUrl'],name:['title','item_name','productName'],price:['variantPrice','productPrice'],currency:['variantCurrency','productCurrency','currencyCode'],quantity:['orderQuantity'],productId:['id','item_id','product_id'],subProductId:['variantSku','variantId','variant_id','subproduct_id'],cartCoupon:['purchase.actionField.coupon'],cartTotal:['purchase.actionField.subtotal','purchase.actionField.subtotalWithShipping'],cartCurrency:['currency'],orderId:['transaction_id','order_id']},i=n[_e],a=zo(n[be]),o=Zo(i),c=function(e){var t=[];t.push.apply(t,Object.keys(e));for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],a=zo(e[i]);t.push.apply(t,a)}return t}(n[ge]||r),u=Qo(n[ge]||r),s={};return function(){var e,r=null;return Array.isArray(window.dataLayer)?(null===(e=window.dataLayer)||void 0===e||e.forEach((function(e){var i,d,l=null==e?void 0:e['gtm.uniqueEventId'];if(!l||!Object.prototype.hasOwnProperty.call(s,l)){s[l]='processed';var v=(null==e?void 0:e.event)||(null==e?void 0:e[1])||'cannot process';if('string'==typeof v){'ecommerce'===(null==v?void 0:v.toLowerCase())&&(v=(null===(i=null==e?void 0:e.eventDescription)||void 0===i?void 0:i.toLowerCase())||(null===(d=null==e?void 0:e.eventName)||void 0===d?void 0:d.toLowerCase())||'cannot process');var f,p=(null==v?void 0:v.toLowerCase())||'',m=o[p]||o[null==p?void 0:p.replace(/ /g,'_')];if(!m){var g=null==e?void 0:e.eventAction;if('string'==typeof g){var y=(null==g?void 0:g.toLowerCase())||'';m=o[y]||o[null==y?void 0:y.replace(/ /g,'_')]}}if(m){'event'===(null==e?void 0:e[0])?f=null==e?void 0:e[2]:(null==e?void 0:e.ecommerce)?f=null==e?void 0:e.ecommerce:(null==e?void 0:e.ecommerceGA4)?f=null==e?void 0:e.ecommerceGA4:(null==e?void 0:e[''.concat(v,'Data')])&&(f=null==e?void 0:e[''.concat(v,'Data')]);var h=ec(f,e,a);h.length;var _=tc(t(t({},f),e),c,u),E=h.map((function(e){return tc(e,c,u)}));_=t(m!==At?t({},E[0]):{items:E},_),r=ya(_,{source:n[me],trigger:{id:n[ve]},dataType:m})}}}})),r||null):null}}var rc={category:'pr\\dca',currency:'^cu$',name:'pr\\dnm',orderId:'^ti$',cartTotal:'^tr$',price:'pr\\dpr',quantity:'pr\\dqt',sku:'pr\\did'};function ic(e){var n=e.pluginConfig,r=n[he],i=n[_e],a=Object.entries(i).reduce((function(e,t){var n=t[0],r=t[1];return r&&(Array.isArray(r)?r.forEach((function(t){return e[t.toLowerCase()]=n})):e[r.toLowerCase()]=n),e}),{});return function(e){var i,o,c,u,s,d,l,v=wo(decodeURIComponent(e.name));if('string'==typeof r)c=null===(i=v[r])||void 0===i?void 0:i.toLowerCase(),u=a[c];else if(Array.isArray(r))for(var f=0,p=r;f<p.length;f++){var m=p[f];if(v[m]&&(c=null===(o=v[m])||void 0===o?void 0:o.toLowerCase(),u=a[c]))break}if(u){if(!n[ye][Ee]&&!(u in n[ye]))return null;var g=rc;n[ge]&&(g=t(t({},g),n[ge]));var y=(s=g,d=v,l={},Object.entries(s).forEach((function(e){var t=e[0],n=e[1];l[t]||(l[t]=[]),Object.entries(d).forEach((function(e){var r=e[0],i=e[1];new RegExp(n,'i').test(r)&&l[t].push(i)}))})),l),h=function(e){var n={},r=[];Object.entries(e).forEach((function(e){var t=e[0],i=e[1];1===i.length?n[t]=i[0]:i.forEach((function(e,n){e&&(r[n]||(r[n]={}),r[n][t]=e)}))})),r.length?r.forEach((function(e,i){r[i]=t(t({},e),n)})):r.push(t({},n));return r}(y),_=void 0;if(h&&(_=u===At?{items:h}:t({},h[0])),_)return ya(_,{source:n[me],trigger:{id:n[ve]},dataType:u})}return null}}function ac(e,t){var n,r,i,a;void 0===t&&(t=0);var o=3&e.length,c=e.length-o,u=3432918353,s=461845907;for(n=t,a=0;a<c;)i=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24,++a,n=27492+(65535&(r=5*(65535&(n=(n^=i=(65535&(i=(i=(65535&i)*u+(((i>>>16)*u&65535)<<16)&4294967295)<<15|i>>>17))*s+(((i>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(r>>>16)&65535)<<16);switch(i=0,o){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:n^=i=(65535&(i=(i=(65535&(i^=255&e.charCodeAt(a)))*u+(((i>>>16)*u&65535)<<16)&4294967295)<<15|i>>>17))*s+(((i>>>16)*s&65535)<<16)&4294967295}return n^=e.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}function oc(e){var t=document.querySelectorAll('button.tocart');function n(){var n=!1;t.forEach((function(e){var t,r;n=n||'Added'===(null===(r=null===(t=null==e?void 0:e.attributes)||void 0===t?void 0:t.getNamedItem('title'))||void 0===r?void 0:r.value)})),n&&e()}t.forEach((function(e){new MutationObserver(n).observe(e,{attributes:!0})}))}function cc(e){try{fetch('/attentivemobile/cart/get').then((function(e){return e.json()})).then((function(t){var n,r,i,a=t,o=vc(),c=String(ac(JSON.stringify(t)));if(a.entity_id&&(null===(n=o.get(a.entity_id))||void 0===n?void 0:n.cartHash)!==c){for(var u=pc(a.attentive_cart_items),s=null===(r=o.get(a.entity_id))||void 0===r?void 0:r.cart,d=[],l=[],v=function(n){var r=function(e){var t={};return t.productId=e.product_id,t.quantity=e.qty,t}(n);if(d.push(r),'configurable'!==n.product_type){var i=mc(n,a.attentive_cart_items,a,u);i.currency=t.quote_currency_code,i.cartCurrency=i.currency,l.push(i),(!s||(null==s?void 0:s.filter((function(e){return fr(e,r)})).length)<1)&&e(_a(i,{dataType:wt,source:Q}))}},f=0,p=null!==(i=a.attentive_cart_items)&&void 0!==i?i:[];f<p.length;f++){v(p[f])}var m={};m.items=l,m.products=m.items,m.uid=String(a.customer_id),m.cartTotal=a.grand_total,m.cartCoupon=a.coupon_code,m.email=a.customer_email,e(_a(m,{dataType:It,source:Q})),o.set(a.entity_id,{cartHash:c,cart:d}),fc(o)}})).catch((function(e){return zt(Y,e)}))}catch(e){zt(Y,e)}}function uc(e,t,n){var r=new Map,i=document.querySelectorAll('div.swatch-attribute');function a(e){try{e.forEach((function(){var e,a;i.forEach((function(e){var t=e.attributes.getNamedItem('data-attribute-code'),n=e.attributes.getNamedItem('data-option-selected');t&&n&&r.set(t.value,n.value)}));var o=!0;if(r.forEach((function(e){o=o&&null!==e})),o){var c=null!==(a=null===(e=null==t?void 0:t.attentive_variants)||void 0===e?void 0:e.filter((function(e){var t=!0;return r.forEach((function(n,r){t=t&&e[r]===n})),t})))&&void 0!==a?a:[];if(!(c.length<1)){var u=c[0];n(u)}}}))}catch(e){zt(Y,e)}}i.forEach((function(e){try{var t=e.attributes.getNamedItem('data-attribute-code');t&&r.set(t.value,null),new MutationObserver(a).observe(e,{attributes:!0})}catch(e){zt(Y,e)}}))}function sc(e,t){return r(this,0,void 0,(function(){var n,r,a,o,c,u,s,d,l,v,f,p,m;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,fetch('/attentivemobile/store/get')];case 1:return[4,i.sent().json()];case 2:return n=i.sent(),r=document.getElementById('attnProductInfo'),(a=null===(p=null==r?void 0:r.attributes)||void 0===p?void 0:p.getNamedItem('data-product-info'))?(o=atob(a.value.trim()),'configurable'!==(c=JSON.parse(o)).type_id?((d={}).productId=c.entity_id,d.subProductId=c.entity_id,d.sku=d.productId,d.name=c.name,l=null==n?void 0:n.attentive_secure_base_media_url,v=null==c?void 0:c.small_image,l&&v&&(d.image=l+'catalog/product'+v),t(ya(d,{trigger:{id:e[ve]},dataType:bt,source:Q})),[2]):(u=null!==(m=null==c?void 0:c.attentive_variants)&&void 0!==m?m:[]).length<1?[2]:(s=u[0],(d={}).productId=c.entity_id,d.subProductId=s.entity_id,d.sku=d.productId,d.name=s.name,l=null==n?void 0:n.attentive_secure_base_media_url,v=null==s?void 0:s.small_image,l&&v&&(d.image=l+'catalog/product'+v),t(ya(d,{trigger:{id:e[ve]},dataType:bt,source:Q})),uc(n,c,(function(r){return i=r,a=n,(o={}).productId=c.entity_id,o.subProductId=i.entity_id,o.sku=o.productId,o.image=a.attentive_secure_base_media_url+'catalog/product'+i.small_image,o.name=i.name,void t(ya(o,{trigger:{id:e[ve]},dataType:bt,source:Q}));var i,a,o})),[3,4])):[2];case 3:return f=i.sent(),zt(Y,f),[3,4];case 4:return[2]}}))}))}function dc(e,t){return r(this,0,void 0,(function(){return i(this,(function(n){try{!function(e,t){fetch('/attentivemobile/order/get').then((function(e){return e.json()})).then((function(n){return function(e,t,n){var r,i,a,o;try{for(var c=[],u=pc(e.attentive_order_items),s=0,d=null!==(i=null===(r=null==e?void 0:e.attentive_order_items)||void 0===r?void 0:r.filter((function(e){return'configurable'!==e.product_type})))&&void 0!==i?i:[];s<d.length;s++){var l=d[s],v=mc(l,e.attentive_order_items,e,u);v.currency=e.order_currency_code,v.cartCurrency=v.currency,v.orderId=e.entity_id,v.quantity=l.qty_ordered,v.phone=null===(a=null==e?void 0:e.attentive_order_billing_address)||void 0===a?void 0:a.telephone,c.push(v)}var f={};f.items=c,f.email=e.customer_email,f.phone=null===(o=null==e?void 0:e.attentive_order_billing_address)||void 0===o?void 0:o.telephone,f.uid=String(e.customer_id),f.cartTotal=e.grand_total,f.cartCoupon=e.coupon_code,n(ya(f,{trigger:{id:t[ve]},dataType:At,source:Q}));var p=vc();e.quote_id&&p.delete(e.quote_id),fc(p)}catch(e){zt(Y,e)}}(n,e,t)})).catch((function(e){return zt(Y,e)}))}(e,t)}catch(e){zt($,e)}return[2]}))}))}var lc='attn_magento_cart';function vc(){var e,t,n=null!==(e=sessionStorage.getItem(lc))&&void 0!==e?e:'{}';try{t=JSON.parse(n)}catch(e){t={}}return new Map(Object.entries(t))}function fc(e){sessionStorage.setItem(lc,JSON.stringify(Object.fromEntries(e.entries())))}function pc(e){var t,n;void 0===e&&(e=[]);for(var r=new Map,i=0,a=e;i<a.length;i++){var o=a[i];if('configurable'===(null==o?void 0:o.product_type)&&(null==o?void 0:o.product_id))for(var c=0,u=Object.entries(null!==(n=null===(t=null==o?void 0:o.attentive_product)||void 0===t?void 0:t.attentive_configurable_product_links)&&void 0!==n?n:[]);c<u.length;c++){var s=u[c];s[0];var d=s[1];r.set(d,o.product_id)}}return r}function mc(e,t,n,r){var i,a;void 0===t&&(t=[]);var o={},c=e.product_id?r.get(e.product_id):void 0;if(c){o.productId=c;var u=t.filter((function(t){return t.product_id===c&&t.sku===e.sku}));u.length>0&&(o.quantity=u[0].qty,o.price=u[0].price)}else o.productId=e.product_id,o.quantity=e.qty;var s=null===(i=n.attentive_store)||void 0===i?void 0:i.attentive_secure_base_media_url,d=null===(a=e.attentive_product)||void 0===a?void 0:a.small_image;return s&&d&&(o.image=s+'catalog/product'+d),o.subProductId=e.product_id,o.sku=o.productId,o.name=e.name,o.email=n.customer_email,o.uid=String(n.customer_id),o.cartTotal=n.grand_total,o.cartCoupon=n.coupon_code,o}function gc(){return Boolean(Boolean(window.ShopifyAnalytics)||Boolean(window.Shopify))}var yc,hc=1e3;function _c(e){return r(this,0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=Date.now(),yc&&t-yc<1500?[2]:(e===Ac&&(yc=Date.now()),[4,fetch('/cart.json')]);case 1:if(!(n=r.sent()).ok)throw new Error(n.statusText);return[4,n.json()];case 2:return[2,r.sent()]}}))}))}var Ec='attn_cart',Cc='attn_cart_items';function Ic(e){return sessionStorage.getItem(e)}function wc(e,t){sessionStorage.setItem(e,t)}function Tc(e){return''.concat(e.id,':').concat(e.variant_id,':').concat(e.quantity)}function bc(e,t){var n=e.items.map(Tc);wc(Ec,t),wc(Cc,JSON.stringify(n))}var Ac=2;function Sc(e,t,n){return void 0===t&&(t='USD'),void 0===n&&(n=!0),{category:e.product_type,image:e.image,name:e.product_title||e.title,productId:e.product_id,quantity:String(e.quantity),price:n?To(e.price):String(e.price),subProductId:e.variant_id,currency:t}}function Oc(e,t){return{products:e.items.map((function(n){return Sc(n,e.currency,t)})),cartId:e.token,cartTotal:t?To(e.total_price):String(e.total_price),cartCurrency:e.currency}}function Lc(e,t){return r(this,0,void 0,(function(){var n,r,a,o,c,u,s,d,l,v,f;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,_c(t)];case 1:if(!(n=i.sent()))return[2];if(0===n.items.length&&t===Ac)return function(e){var t=bo();t&&Object.keys(t).length>0&&e(_a(t,{dataType:wt,source:z}))}(e),[2];if(r=function(){var e;return JSON.parse(null!==(e=Ic(Cc))&&void 0!==e?e:'[]')}(),a=Oc(n,!1),o=JSON.stringify(n.items),c=Ic(Ec),u=String(ac(o)),s=c!==u,!c)return bc(n,u),[2];if(r&&s){for(bc(n,u),d=0,l=n.items;d<l.length;d++)v=l[d],r.includes(Tc(v))||e(_a(Sc(v,n.currency),{dataType:wt,source:z}));e(_a(a,{dataType:It,source:z}))}return[3,3];case 2:return f=i.sent(),zt(G,f),[3,3];case 3:return[2]}}))}))}function Nc(e,t){return document.addEventListener('pointerup',(function(n){var r=n.target,i=(e[Ie]||Mt).some((function(e){var t,i=null;try{t=document.querySelectorAll(e),i=function(e,t){var n=function(e){return'function'==typeof e.composedPath?e.composedPath():[]}(e),r=Array.from(t);return 0===r.length?null:r.find((function(e){return n.includes(e)}))||null}(n,t)}catch(e){}var a=null==r?void 0:r.textContent;if(a&&a.length>1e4)return!1;var o=a?a.toLowerCase().replace(/\n\t/g,'').trim():'',c=e.toLowerCase();return!(!i&&o!==c)}));i&&setTimeout(Lc,hc,t,Ac)}),!0)}var Pc,Rc,kc=12e4;function Dc(e,t){return r(this,0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,Va((function(){var e;return Boolean(null===(e=window.ShopifyAnalytics)||void 0===e?void 0:e.meta)}),kc).catch((function(){}))];case 1:return n.sent(),'product'===oo('ShopifyAnalytics.meta.page.pageType')(window)?(Pc&&clearInterval(Pc),Pc=window.setInterval((function(){var n,r=function(){var e=document.querySelector('[name=id]');if(e&&'value'in e)return e.value}();r&&r!==Rc&&(Rc=r,t(ya({},{trigger:(n={id:e[ve]},n[De]=!0,n),source:z,dataType:bt})))}),500),[2]):[2]}}))}))}var Bc='attn_cart',xc='attn_cart_items';function Mc(e){return sessionStorage.getItem(e)}function Uc(e,t){sessionStorage.setItem(e,t)}function Fc(e){return{image:e.image,name:e.name,productId:String(e.product_id),quantity:String(e.quantity),price:e.price,subProductId:String(e.variation_id)}}function Hc(e){return r(this,0,void 0,(function(){var t,n,r,a,o,c,u,s,d,l,v,f;return i(this,(function(i){if(!Boolean(oo('woocommerce_params')(window)))return[2];try{if(!(t=window.attn_cart))return[2];if(n=null===(v=window.attn_cart)||void 0===v?void 0:v.products,r=JSON.stringify(n),a=Mc(Bc),o=String(ac(r)),c=n?function(e){return Object.keys(e).map((function(t){return''.concat(e[t].product_id,':').concat(e[t].variation_id,':').concat(e[t].quantity)}))}(n):null,o===a)return[2];if(u=JSON.parse(null!==(f=Mc(xc))&&void 0!==f?f:'[]'),Uc(xc,JSON.stringify(c)),Uc(Bc,o),t&&n){if(s=function(e){var t=e.products;return{products:Object.keys(t).map((function(e){return Fc(t[e])})),cartTotal:e.cartTotal}}(t),d=void 0,u.length!==Object.keys(n).length)for(l in n)u.includes(''.concat(n[l].product_id,':').concat(n[l].variation_id,':').concat(n[l].quantity))||(d=Fc(n[l]));d&&e(_a(d,{dataType:wt,source:Z})),e(_a(s,{dataType:It,source:Z}))}}catch(e){zt(q,e)}return[2]}))}))}function jc(e){return function(e){return e[pe]===X}(e)||function(e){return e[pe]===K}(e)||function(e){return e[pe]===W}(e)||function(e){return e[pe]===ee}(e)}function Vc(e,t,n){for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.shouldParse(t)){var o=a.parse(t);o&&n(o)}}}var Gc,qc,Yc=['view_item','enhanceEcom productView','Viewed Product','Product Details','Product Viewed','product detail view','Product Details Viewed','Product Detail Views','Product Details View','product detail','pdp view','Product Page','detail','detailView','dl_view_item','triggerProductDetail','product-detail-view','productDetail','productViewed','bva_view_item'],$c=['add_to_cart','enhanceEcom addToCart','add','Added Product','Adding To A Shopping Cart','Add To Bag','add to wishlist','add to cart quickview','add to cart standard','Add To Cart','Added Product','Cart Item Added','Product Add To Cart','Ecommerce:Items Added to Cart','addToCart','dl_add_to_cart','product add to cart','bva_add_to_cart','productAdd','product_added'],Kc=['purchase','enhanceEcom purchase','Completed Order','sale','transaction','checkout order completed','ordercomplete','onepagecheckout','ecommerce: purchase','ecommerce:purchase','order_completed','order_complete','purchase_complete','bva_purchase','dl_purchase'],Wc={category:['item_category'],image:['imageUrl','imageURL','imageurl'],name:['title','item_name','productName'],price:['variantPrice','productPrice'],currency:['variantCurrency','productCurrency','currencyCode'],quantity:['orderQuantity'],productId:['id','item_id','product_id'],subProductId:['shopify_variant_id','variantSku','variantId','variant_id','subproduct_id'],cartCoupon:['purchase.actionField.coupon'],cartTotal:['purchase.actionField.subtotal','purchase.actionField.subtotalWithShipping'],cartCurrency:['currency'],orderId:['order_id','orderNumber','order_number','transaction_id','transactionId','purchase.actionField.id']},Jc=function(e,t){return zo(e||[]).concat(zo(t||[]))};function Xc(e,t){var n,r;return t?e:((n={})[ve]=e.id,n[pe]=ee,n[ge]=Wc,n[me]=ee,n[be]=['products','items'],n[Ce]='/collect?',n[he]='ea',n[_e]=((r={})[bt]=Jc(Yc,e[_e][bt]),r[wt]=Jc($c,e[_e][wt]),r[At]=Jc(Kc,e[_e][At]),r),n[ye]=function(e){var t,n,r,i,a,o={};e.ev[Ee]&&Object.assign(o,(t={},t[Ee]=e.ev[Ee],t));e.ev[bt]&&Object.assign(o,(n={},n[bt]=e.ev[bt],n));e.ev[wt]&&Object.assign(o,((r={})[wt]=e.ev[wt],r));e.ev[Ot]&&Object.assign(o,((i={})[Ot]=e.ev[Ot],i));e.ev[At]&&Object.assign(o,((a={})[At]=e.ev[At],a));return o}(e),n)}function zc(e){var t,n,r=((t={})[ve]=e.id,t[pe]=W,t[ge]={},t[me]=W,t[Ce]='/collect?',t[he]=['pa','ea'],t[_e]=((n={})[bt]=['Viewed Product','Product Details','Product Viewed','product detail view','Product Details Viewed','Product Detail Views','Product Details View','product detail','pdp view','Product Page','view_item','detail'],n[wt]=['add','Added Product','Adding To A Shopping Cart','Add To Bag','add to wishlist','add to cart quickview','add to cart standard','Add To Cart','Added Product','Cart Item Added','Product Add To Cart','Ecommerce:Items Added to Cart','addToCart','add_to_cart'],n[At]=['purchase','Completed Order','sale','transaction','checkout order completed','ordercomplete','onepagecheckout','ecommerce:purchase','Order Completed'],n),t[ye]=function(e){var t,n,r,i,a,o={};e.ev[Ee]&&Object.assign(o,(t={},t[Ee]=e.ev[Ee],t));e.ev[bt]&&Object.assign(o,(n={},n[bt]=e.ev[bt],n));e.ev[wt]&&Object.assign(o,((r={})[wt]=e.ev[wt],r));e.ev[Ot]&&Object.assign(o,((i={})[Ot]=e.ev[Ot],i));e.ev[At]&&Object.assign(o,((a={})[At]=e.ev[At],a));return o}(e),t);return Xc(r)}var Zc=((Gc={})[W]=function(e){return{type:W,parse:ic({pluginConfig:e}),shouldParse:(t=e[Ce],function(e){return Ho(t,e.name)})};var t},Gc[K]=function(e){var n,r,i=Xo(t(t({},e),((n={})[pe]=X,n[me]=K,n[Ce]='^https://www.facebook.com/tr',n[he]='ev',n[_e]=((r={})[bt]='ViewContent',r[wt]='AddToCart',r[At]='Purchase',r),n)));return{type:K,parse:i.parse,shouldParse:i.shouldParse}},Gc[X]=Xo,Gc[ee]=function(e){return{type:ee,parse:nc({pluginConfig:e}),shouldParse:(t=e[Ce],function(e){return Ho(t,e.name)})};var t},Gc),Qc=((qc={})[z]=function(e,t){return r(this,0,void 0,(function(){return i(this,(function(n){return gc()?((null==e?void 0:e.eatc)||(Lc(t,1),function(e){var t=!1;new PerformanceObserver((function(n){for(var r=0,i=n.getEntries();r<i.length;r++){var a=i[r];if(t)return;if(a.name.includes('https://www.facebook.com/tr')&&'AddToCart'===(o=wo(decodeURIComponent(a.name))).ev&&(t=!0,setTimeout((function(){return Lc(e,Ac)}),hc)),a.name.includes('https://www.google-analytics.com/collect')){var o,c=['add','Added Product','Adding To A Shopping Cart','Add To Bag','add to wishlist','add to cart quickview','add to cart standard','Add To Cart','Added Product','Cart Item Added','Product Add To Cart','Ecommerce:Items Added to Cart','addToCart','add_to_cart'];('string'==typeof(o=wo(decodeURIComponent(a.name))).ea&&c.includes(o.ea)||'string'==typeof o.pa&&c.includes(o.pa))&&(t=!0,setTimeout((function(){return Lc(e,Ac)}),hc))}}})).observe({entryTypes:['resource']})}(t),Nc(e,t)),Fo(e,t),e[De]&&Dc(e,t),Vo(e,t),[2]):[2]}))}))},qc[J]=function(e,t){var n,r=Ho(e[Ce],window.location.href),i=e[Ie].length>0,a=function(){return t(ya({},{trigger:{id:e[ve]},source:J,dataType:e.t}))};r&&(i?(null===(n=e[Ie])||void 0===n?void 0:n.filter((function(e){return document.querySelector(e)})).length)&&setTimeout(a,e[Te]):setTimeout(a,e[Te]))},qc.oe=function(e,t){var n=e[Ne],r=document;document.addEventListener(e.de,(function(i){var a;if(Ho(e[Ce],window.location.href)){var o=i.target;n&&(r=null!==(a=o.closest(n))&&void 0!==a?a:r),e[Ie].some((function(a){var c,u,s=null;try{u=r.querySelectorAll(a),s=function(e,t){var n=function(e){return'function'==typeof e.composedPath?e.composedPath():[]}(e),r=Array.from(t);return 0===r.length?null:r.find((function(e){return n.includes(e)}))||null}(i,u)}catch(e){}var d=null==o?void 0:o.textContent,l=d?d.toLowerCase().replace(/\n\t/g,'').trim():'',v=a.toLowerCase();if(s||l===v){var f={source:'oe',trigger:{id:e[ve]},dataType:e.t},p=ya({},f);if(!n)return t(p),!0;var m=i.target.closest(n);if(m&&(null===(c=null==p?void 0:p.meta)||void 0===c?void 0:c.trigger))return p.meta.trigger[Ne]=m,t(p),!0}return!1}))}}),!0)},qc[Z]=function(e,t){return r(this,0,void 0,(function(){var n,r,a,o,c,u;return i(this,(function(i){switch(i.label){case 0:return Hc(t),n='\\/checkout\\/order-received\\/|\\/order-confirmed\\/',[4,Va((function(){return Boolean(window.attn_product||window.attn_order)}),12e4).catch((function(){}))];case 1:return i.sent(),r=Ho(n,window.location.href)&&Boolean(oo('attn_order')(window)),a=Boolean(oo('attn_product')(window)),(a||r)&&(o=a?bt:At,c=No(),u=function(n){return t(ya(n,{trigger:{id:e[ve]},source:Z,dataType:o}))},c&&u(c)),[2]}}))}))},qc[Q]=function(e,t){return r(this,0,void 0,(function(){return i(this,(function(n){return document.getElementById('attentiveMagentoPage')?(document.getElementById('attnProductInfo')&&sc(e,t),document.getElementById('attnOrderInfo')?dc(e,t):function(e,t){r(this,0,void 0,(function(){return i(this,(function(e){try{oc((function(){cc(t)})),cc(t)}catch(e){zt(Y,e)}return[2]}))}))}(0,t),[2]):[2]}))}))},qc);function eu(e,t,n){var r=[],i=e[se]||[],a=/iPad|iPhone|iPod/.test(navigator.userAgent);i.forEach((function(e){var i=e.pt;if(a&&i===K){var o=zc(e);r.push(Zc[o.pt](o))}else if(i===W){var c=Xc(e,null==n?void 0:n.ua);r.push(Zc[c.pt](c))}else i in Zc&&jc(e)?r.push(Zc[i](e)):i in Qc&&Qc[i](e,t)})),function(e,t){if(0!==e.length){var n=0;if(!performance.getEntries||!performance.setResourceTimingBufferSize)throw new Error(F);performance.setResourceTimingBufferSize(600);try{'PerformanceObserver'in window?(r(),new PerformanceObserver((function(n){for(var r=0,i=n.getEntries();r<i.length;r++){var a=i[r];Vc(e,a,t)}})).observe({entryTypes:['resource']})):window.setInterval((function(){r()}),250)}catch(e){zt(V,e)}}function r(){for(var r=0,i=window.performance.getEntries();r<i.length;r++){var a=i[r];a.startTime>n&&Vc(e,a,t),n=a.startTime}}}(r,t)}function tu(e,t){(e[se]||[]).forEach((function(e){var n=e.pt;n===J&&Qc[J](e,t),n===z&&function(e,t){r(this,0,void 0,(function(){return i(this,(function(n){return Fo(e,t),Vo(e,t),[2]}))}))}(e,t),n===Z&&Qc[Z](e,t),n===Q&&Qc[Q](e,t)}))}function nu(e){var n,r,i=[];if(function(e){var t;return Boolean((null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.dataType)&&[Tt,At,wt,bt,Bt,It,Dt,xt].includes(e.meta.dataType))}(e)){var a=e.data;if(a&&Array.isArray(null==a?void 0:a.items)?a.items.forEach((function(n){var r;delete(r='object'==typeof n?t(t({},e.data),n):t({productId:n},e.data)).items,i.push({type:e.type,data:r,meta:e.meta})})):e&&e.type&&i.push(e),(null===(n=e.meta)||void 0===n?void 0:n.dataType)===At){var o=function(e){for(var t=0,n=0,r=e;n<r.length;n++){var i=r[n].data;if(i.cartTotal&&!isNaN(Number(i.cartTotal)))return i.cartTotal;var a=Number(Tn(i.price||'0')),o=Number(bn(i.quantity||'1')||'1');isNaN(o)||isNaN(a)?isNaN(a)||(t+=a):t+=a*o}return String(t)}(i);i.forEach((function(e){return e.data.cartTotal=o}));var c=i.map((function(e){return e.data})),u=null===(r=c.find((function(e){return void 0!==e.orderId})))||void 0===r?void 0:r.orderId;i.push({type:e.type,data:{uid:a.uid,phone:a.phone,email:a.email,orderId:u,products:c},meta:t(t({},e.meta),{dataType:Lt})})}}return i}function ru(e,t){var n;void 0===t&&(t='every');var r=((n={})[Ae]=function(e){if(e.type===Ae){var t=document.querySelector(e[Ae]);return e[Oe]?Boolean(null==t?void 0:t.getAttribute(e[Oe]||'')):Boolean(t)}},n[Se]=function(e){if(e.type===Se)return Boolean(oo(e[Se])(window))},n[Ce]=function(e){if(e.type===Ce)return Ho(e[Ce],window.location.href)},n[Re]=function(e){if(e.type===Re)return Boolean(new URLSearchParams(window.location.search).get(e[Re]))},n);if(!Array.isArray(e))return!0;return e[t]((function(e){return r[e.type]&&r[e.type](e)}))}var iu='attn_oid',au=new Map;function ou(e){return!!function(e){return function(e){var t;try{if((null===(t=e.meta)||void 0===t?void 0:t.dataType)===At&&e.data.orderId){var n=localStorage.getItem(iu);return String(e.data.orderId)===n}}catch(e){return zt(j,e),!1}}(e)||function(e){var t=2e3,n=uu(e);if(!n)return!1;var r=au.get(n);if(!r)return!1;var i=Date.now()-r.lastSeen<t;if(n===bt)return i&&function(e,t){var n=cu(t),r=cu(e);if(n.size!==r.size)return!1;for(var i=Array.from(r.entries()),a=0;a<i.length;a++){var o=i[a],c=o[0];if(o[1]!==n.get(c))return!1}return!0}(e.data,r.event.data);return i}(e)}(e)||(function(e){var t;if(!e.data)return;var n=uu(e);n&&au.set(n,{lastSeen:Date.now(),event:e});if((null===(t=e.meta)||void 0===t?void 0:t.dataType)===At&&e.data.orderId)try{localStorage.setItem(iu,String(e.data.orderId))}catch(e){zt(H,e)}}(e),!1)}function cu(e){var t=new Map;function n(e){var n,r,i,a=null!==(r=null!==(n=e.productId)&&void 0!==n?n:e.sku)&&void 0!==r?r:null;a&&t.set(a,null!==(i=e.subProductId)&&void 0!==i?i:null)}return n(e),e.items&&Array.isArray(e.items)&&e.items.forEach((function(e){'string'!=typeof e?n(e):t.set(e,null)})),t}function uu(e){var t;return null===(t=e.meta)||void 0===t?void 0:t.dataType}var su=navigator.userAgent.includes('Safari')&&!navigator.userAgent.includes('Chrome');function du(e){var t='onpagehide'in window&&!su?'pagehide':'beforeunload';window.addEventListener(t,e)}var lu=function(){var e,t,n,a=!0,o=((e={})[gt]=function(e,o,c){var u,s,d,l=c.dispatch;(t=o.data.clientConfiguration,n=t.ap,window.edgetag||Ua(t))&&((null===(u=t.gen)||void 0===u?void 0:u.dpd)||function(e){r(this,0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return void 0!==Ja&&'unknown'!==Ja?[2]:void 0!==(t=L(Xa))&&'unknown'!==t?(Ja=t,[2]):za?[2]:[4,za=Wa(e)];case 1:return n=r.sent(),Ja=n,P(Xa,n),za=null,[2]}}))}))}('https://cdn.attn.tv/'.concat(t.company,'/dtag.js')));t[et]&&(a=Boolean(null===(s=e[tt])||void 0===s?void 0:s.val)),(null===(d=t.cc)||void 0===d?void 0:d.dap)||function(e){var t=window.location,n=t.href,r=t.pathname;setInterval((function(){var t={href:n!==window.location.href,pathname:r!==window.location.pathname};(t.href||t.pathname)&&(n=window.location.href,r=window.location.pathname,e(ga(t)))}),500)}(l),n&&eu(n,l,t),a&&l(ha({},{dataType:Tt,source:'a'}))},e.uc=function(e,t,r){var i,o=r.dispatch;n&&tu(n,o),(null===(i=t.data)||void 0===i?void 0:i.pathname)&&a&&o(ha({},{dataType:Tt,source:'a'}))},e[_t]=function(e,t){a=!!t.data.on},e.cd=function(e,r,i){var o,c,u,s=i.dispatch;if(Fa(r)||(null===(o=r.meta)||void 0===o?void 0:o.dataType)===Dt)s(ha(r.data,r.meta));else if(n&&a){(null===(c=r.meta)||void 0===c?void 0:c.dataType)===wt&&gc()&&!t.dase&&Lc(s,Ac);var d=null===(u=null==r?void 0:r.meta)||void 0===u?void 0:u.trigger,l=(n[se]||[]).find((function(e){return e[ve]===(null==d?void 0:d.id)})),v=function(e){var t=function(e,t){var n,r,i=null;if(jc(e)){if(jc(e)){var a=e[ye][Ee],o=e[ye],c=((n={})[bt]=o[bt]||a,n[wt]=o[wt]||a,n[At]=o[At]||a,n),u=null===(r=null==t?void 0:t.meta)||void 0===r?void 0:r.dataType;i=u?c[u]:null}}else i=e.pl||{};return i}(e,r);if(t){var i=function(){if(n&&t){var e=Mo(n,r,t);s(ha(e,r.meta))}},a=e.wf;if(function(e){return null!=e&&'object'==typeof e}(a)){var o=null==a?void 0:a[Te],c=null==a?void 0:a[Pe],u=c&&Va((function(){return ru(c)}),o);u&&(du(u.cancel),u.then(i).catch((function(e){var t=e.reason;t!==Ha&&t!==ja||i()})))}else i()}else s(_a(r.data,r.meta))};if(l)if(ru(l[Pe]||[],l.cndt))v(l);else if(l.asn){var f=l[Pe],p=f&&Va((function(){return ru(f)}),2e4);p&&(du(p.cancel),p.then((function(){return v(l)})).catch((function(e){e.reason})))}}},e[Et]=function(e,n,r){var i,o=r.dispatch;if(Fa(n)||a){if(ou(n)&&!t.disdedupe)return;if(!0===t.sactcu&&Fa(n)&&(null===(i=n.meta)||void 0===i?void 0:i.dataType)===wt&&_c(Ac).then((function(e){if(e){var t=Oc(e,!1);t&&o(_a(t,{dataType:It,source:'a'}))}})),function(e){var t;return(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.dataType)===It}(n))o(_a(n.data,n.meta));else!function(e,t){if(e.length>0)for(;e.length;){var n=e.shift();n&&n.meta&&t(n.data,n.meta)}}(nu(n),(function(e,t){return o(_a(e,t))}))}},e);return Ln(o)};const vu=(e,t)=>{const n=(e=>{const t=e.data.items||e.data.products;return Array.isArray(t)?t:void 0!==e.data.sku||void 0!==e.data.subProductId||void 0!==e.data.productId?[{...e.data}]:[]})(t),r=(e=>e.map((e=>'string'==typeof e?e:e.sku||e.subProductId||e.productId)))(n),i=(e=>e.map((e=>'string'==typeof e?{id:e,quantity:1}:{id:e.sku||e.subProductId||e.productId,quantity:e.quantity||1,...e})))(n),a=((e,t)=>{const n=parseFloat(t||'0');return!n||isNaN(n)?e.reduce(((e,t)=>{if('string'==typeof t)return e;const n=parseFloat(t.price||'0'),r=isNaN(n)?0:n,i=parseFloat(t.quantity||'1');return e+r*(isNaN(i)?1:i)}),0):n})(n,t.data.cartTotal),o=t.data.currency||t.data.cartCurrency||n[0]?.currency||n[0]?.cartCurrency;switch(e){case'PageView':return{};case'ViewContent':case'AddToCart':return{content_ids:r,content_type:'product',contents:i,currency:o,value:a};case'Purchase':return{content_ids:r,content_type:'product',contents:i,currency:o,value:a,num_items:n.length};default:return}},fu={[Tt]:'PageView',[bt]:'ViewContent',[wt]:'AddToCart',[Lt]:'Purchase',i:void 0,[Dt]:void 0,[Bt]:void 0,[It]:void 0,[At]:void 0,[xt]:void 0},pu=e=>{(()=>{const e=function(...t){e.callMethod?e.callMethod.apply(null,t):e.queue.push(t)};e.push=e,e.queue=[],e.loaded=!1,e.version='2.0',window.fbq=e,window._fbq=e})(),(()=>{const e=document.createElement('script');e.async=!0,e.src='https://connect.facebook.net/en_US/fbevents.js',document.head.appendChild(e)})(),window.fbq?.('init',e)},mu=['gift-card','giftcard','gift_card','search','agentEmail'],gu=['button'],yu=(e,t)=>{(e.phone||e.email)&&(e.email&&function(e,t){const n=t+':0';try{P('attntv_mstore_'+e,n,{secure:window.location.protocol.includes('https')})}catch(e){zt(H,e)}}('email',e.email),t(_a(e,{dataType:Bt,source:e.source||'UNKNOWN_EVENT_SOURCE'})))};function hu(e,t){return Object.values(e.attributes).some((e=>t.some((t=>e.value.toLowerCase().includes(t.toLowerCase())))))}function _u(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,(e=>!function(e){return e instanceof HTMLInputElement}(e)||function(e){return e.matches('input:is([type=password], [type=submit], [autocomplete^="cc-"], [type=hidden])')}(e)||function(e){return hu(e,mu)}(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT))}function Eu(e){const t={},n=_u(e);for(;n.nextNode();){const e=n.currentNode;!t.phone&&Cn(e.value.replace(/^\+?1/,''),!0)?t.phone=e.value:!t.email&&In(e.value)&&(t.email=e.value)}return t}const Cu=e=>t=>{const n=t instanceof KeyboardEvent,r=t.target instanceof HTMLElement,i=n&&'enter'===t.key.toLowerCase();if(!n||!r||!i)return;if(!t.target.matches('input')&&!function(e){const t=_u(e);for(;t.nextNode();)if('input'===t.currentNode.tagName.toLowerCase())return!0;return!1}(t.target))return;const a=t.target.closest('form');if(!a)return;const o=Eu(a);yu({...o,source:'ENTER_KEY_SCRAPER_EVENT_SOURCE'},e)};function Iu(e,t){const n=e.ido?.idos;if('off'===n?.type)return()=>{};const r=(e=>t=>{const n=t instanceof FocusEvent,r=t.target instanceof HTMLInputElement,i=r&&t.target.matches('input:is([type=password], [type=submit], [autocomplete^="cc-"], [type=hidden])'),a=r&&hu(t.target,mu);if(!n||!r||i||a)return;const o={phone:Cn(t.target.value.replace(/^1/,''),!0)||void 0,email:In(t.target.value)||void 0};yu({...o,source:'FOCUS_OUT_SCRAPER_EVENT_SOURCE'},e)})(t);document.addEventListener('focusout',r);if(!(e[it]?.esx??!1))return()=>{document.removeEventListener('focusout',r)};const i=Cu(t),a=(e=>t=>{const n=t.target,r=t instanceof MouseEvent,i=n instanceof HTMLElement,a=i&&gu.some((e=>n.matches(e)));if(!r||!i||!a)return;const o=Eu(document.body);yu({...o,source:'BUTTON_CLICK_SCRAPER_EVENT_SOURCE'},e)})(t);return document.addEventListener('keydown',i),document.addEventListener('mousedown',a),()=>{document.removeEventListener('focusout',r),document.removeEventListener('keydown',i),document.removeEventListener('mousedown',a)}}let wu=()=>{};const Tu=()=>{let e,t,n=!1;return Ln({[gt]:(r,i,{dispatch:a})=>{e=i.data.clientConfiguration,n=e[it]?.[Ft]??!1,t=e[it]?.[Ht]??void 0,wu(),wu=Iu(e,a),((e,t)=>{const n=L('__attentive_id'),r=e?.[Ye]?.val;if(n&&kn(n)&&r&&kn(r)&&r===n)return P('__attentive_id',n,{expires:21900}),r;if(window.attn_mobile_app&&n&&kn(n))return t(pa({id:n,maxAge:21900})),n;const i=Rn();P('__attentive_id',i,{expires:21900}),t(pa({id:i,maxAge:21900}))})(r,a),n?(((e,t)=>{const n=L('_fbc'),r=L('_fbp');if(e[$e]&&e[Ke]&&n===e[$e]&&r===e[Ke])return;t(ma({[Je]:!0,[$e]:n,[Ke]:r}))})(r,a),t&&a(Ea({pixelId:t}))):a(ma({[$e]:void 0,[Ke]:void 0,[Je]:void 0}))},[Ct]:(e,r)=>{if(n){const n=(e=>{if(!e.meta)return;const t=Rn();return e.meta.metaEventId=t,t})(r);n&&e[Je]&&t&&((e,t)=>{if(!e.meta)return;const n=fu[e.meta.dataType];if(!n)return;const r=vu(n,e);r&&'function'==typeof window.fbq&&window.fbq('track',n,r,{eventID:t})})(r,n)}},imp:(e,t)=>{n&&e[Je]&&t.data.pixelId&&pu(t.data.pixelId)}})};var bu=function(){var e;return Ln(((e={})[gt]=function(e,t,n){n.dispatch;var r=L('__attentive_session_id');P('__attentive_session_id',r?String(r):r=Rn(),{expires:1/48}),e&&mt in e&&(e[mt]=r)},e))};function Au(e,t){var n,r;return null!=(null===(n=t.meta)||void 0===n?void 0:n.dataType)&&null!=e[ot]&&e[ot][null===(r=t.meta)||void 0===r?void 0:r.dataType]}function Su(e){return e.split('?')[0]}const Ou='_svDataLayer';var Lu,Nu=new Set(['michaelkors','ariat','ballarddesigns','coldwatercreek','dxl','garnethill','softsurroundings']);function Pu(e,t){Array.isArray(t)&&(t=t.join(','));var n={phone:Cn,price:Tn,quantity:bn,email:wn,cartTotal:Tn,orderId:Sn,image:On};return n[e]&&(t=n[e](t)),'string'==typeof t&&(t=An(t)),t}function Ru(e){var t=Object.keys(e.data).reduce((function(t,n){var r=e.data[n];if(''!==r&&('number'==typeof r||'string'==typeof r)){var i=Pu(n,r);t[n]=i}return t}),{});for(var n in e.data)if('products'!==n&&'items'!==n||!Array.isArray(e.data[n]))t[n]=Hu(n,e.data[n]);else{var r=Object(e.data)[n].map((function(e){var t={};for(var n in e){var r=Hu(n,e[n]);null!=r&&(t[n]=r)}return ju(t),t}));t[n]=JSON.stringify(r)}return ju(t),function(e,t){var n,r;(null===(n=e.meta)||void 0===n?void 0:n.dataType)!==At&&(null===(r=e.meta)||void 0===r?void 0:r.dataType)!==It||t.cartCurrency||t.currency&&(t.cartCurrency=t.currency)}(e,t),t}function ku(e,t,n){return r(this,0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return(r=Bu(e,t,n)).sourceType='sst',[4,Za()];case 1:return a=i.sent(),r.adblockerStatus=a||'unknown',[2,r]}}))}))}function Du(e){var t,n,r;if(r=e,!Nu.has(r))return null;var i=window[Ou],a=null!==(n=null===(t=null==i?void 0:i.trackIdentityDataLayer)||void 0===t?void 0:t.data)&&void 0!==n?n:i;if(!a||'object'!=typeof a)return null;var o='string'==typeof a.hmid?a.hmid:null,c=null!=a.confidence_score?Number(a.confidence_score):null,u='email_enc'in a&&null!=a.email_enc||'email_sha256_hashed'in a&&null!=a.email_sha256_hashed||'email_sha256'in a&&null!=a.email_sha256;return o||null!=c||u?{hmid:o,confidenceScore:c,hasEmail:u}:null}function Bu(e,n,r){var i,a=function(e,t){var n,r,i,a=D+'_'+M;return{visitorId:null!==(r=Hu(Ye,null===(n=e[Ye])||void 0===n?void 0:n.val))&&void 0!==r?r:'',version:a,attentiveDomain:null!==(i=Hu(xe,e[xe]))&&void 0!==i?i:'',sourceType:'ct',locationHref:(null==t?void 0:t[nt])?Su(window.location.href):window.location.href,referrer:document.referrer,sessionId:e[mt]}}(e,r),o=function(e){switch(e){case Lt:return'Purchase';case wt:return'AddToCart';case bt:return'ProductView';case Tt:return'PageView';case Bt:return'UserIdentifierCollected';case It:return'CartUpdated';case xt:return'SortAction';case Dt:return'PageLeave';case Pt:return'RemoveFromCart';case Nt:return'CartView';case kt:return'SearchSubmit';case Rt:return'CollectionView';default:throw new Error('Unsupported event type: '.concat(e))}}(null===(i=n.meta)||void 0===i?void 0:i.dataType),c=function(e){var t={},n=Hu('email',e.email);n&&(t.encryptedEmail=xu(n));var r=Hu('phone',e.phone);r&&(t.encryptedPhone=xu(r));var i=function(){var e=fn(Object.keys(Mu).map(Number));if(!e)return[];var t=[];return e.forEach((function(e){var n=e.vendor,r=e.id,i=e.name;if(r)if(n===nn&&i){var a={idType:o=i===ln?'EdgetagId':'CustomId',value:r};i!==ln&&(a.name=i),t.push(a)}else if(n===dn)t.push({idType:Mu[n],value:r,name:i});else{var o;(o=Mu[n])&&t.push({idType:o,value:r})}})),t}();i.length>0&&(t.otherIdentifiers=i);return t}(n.data),u=function(e,t){var n,r,i,a,o,c,u,s,d,l,v,f,p,m,g,y,h,_,E=null===(n=e.products)||void 0===n?void 0:n[0];switch(t){case'Purchase':return{eventType:'Purchase',orderId:Hu('orderId',e.orderId),currency:null!==(r=Hu('currency',null==E?void 0:E.currency))&&void 0!==r?r:Hu('currency',null==E?void 0:E.cartCurrency),orderTotal:Hu('cartTotal',null==E?void 0:E.cartTotal),cart:{cartTotal:Hu('cartTotal',null==E?void 0:E.cartTotal),cartCoupon:Hu('cartCoupon',null!==(i=e.cartCoupon)&&void 0!==i?i:null==E?void 0:E.cartCoupon),cartDiscount:Hu('cartDiscount',null!==(a=e.cartDiscount)&&void 0!==a?a:null==E?void 0:E.cartDiscount),cartId:Hu('cartId',null!==(o=e.cartId)&&void 0!==o?o:null==E?void 0:E.cartId)},products:Uu(null!==(c=e.items)&&void 0!==c?c:e.products)};case'AddToCart':return{eventType:'AddToCart',product:Fu(e),currency:null!==(u=Hu('currency',e.currency))&&void 0!==u?u:Hu('currency',e.cartCurrency)};case'ProductView':return{eventType:'ProductView',product:Fu(e),currency:null!==(s=Hu('currency',e.currency))&&void 0!==s?s:Hu('currency',e.cartCurrency)};case'RemoveFromCart':return{eventType:'RemoveFromCart',product:Fu(e)};case'CartUpdated':return{eventType:'CartUpdated',currency:null!==(v=null!==(l=null!==(d=Hu('currency',e.currency))&&void 0!==d?d:Hu('currency',e.cartCurrency))&&void 0!==l?l:Hu('currency',null==E?void 0:E.currency))&&void 0!==v?v:Hu('currency',null==E?void 0:E.cartCurrency),cart:{cartTotal:Hu('cartTotal',e.cartTotal),cartCoupon:Hu('cartCoupon',null!==(f=e.cartCoupon)&&void 0!==f?f:null==E?void 0:E.cartCoupon),cartDiscount:Hu('cartDiscount',e.cartDiscount),cartId:Hu('cartId',e.cartId)},products:Uu(null!==(p=e.items)&&void 0!==p?p:e.products)};case'CartView':return{eventType:'CartView',currency:null!==(m=Hu('currency',e.currency))&&void 0!==m?m:Hu('currency',e.cartCurrency),cart:{cartTotal:Hu('cartTotal',e.cartTotal),cartCoupon:Hu('cartCoupon',null!==(g=e.cartCoupon)&&void 0!==g?g:null==E?void 0:E.cartCoupon),cartDiscount:Hu('cartDiscount',e.cartDiscount),cartId:Hu('cartId',e.cartId)},products:Uu(null!==(y=e.items)&&void 0!==y?y:e.products)};case'SortAction':return{eventType:'SortAction',sortBy:Hu('sortBy',e.sortBy),direction:'desc'===Hu('direction',e.direction)?'desc':'asc'};case'PageLeave':return{eventType:'PageLeave',timeOnPage:Hu('timeOnPage',e.timeOnPage),scrollDepth:Hu('scrollDepth',e.scrollDepth)};case'CollectionView':return{eventType:'CollectionView',collectionId:Hu('collectionId',e.collectionId),collectionTitle:Hu('collectionTitle',e.collectionTitle),products:Uu(null!==(h=e.items)&&void 0!==h?h:e.products)};case'SearchSubmit':return{eventType:'SearchSubmit',searchQuery:Hu('searchQuery',e.searchQuery),products:Uu(null!==(_=e.items)&&void 0!==_?_:e.products)};case'MobileCustomEvent':return{eventType:'MobileCustomEvent',customProperties:e.customProperties||{}};case'PageView':return{eventType:'PageView'};case'UserIdentifierCollected':return{eventType:'UserIdentifierCollected'};default:return{eventType:t}}}(n.data,o),s=function(e,t,n,r){var i={};if('ProductView'===n){var a=Hu('catalogFields',e.data.catalogFields);a&&(i.productCatalog={catalogFields:a})}var o=function(e,t,n){var r,i,a,o,c,u,s={};(null===(r=e.meta)||void 0===r?void 0:r.metaEventId)&&(s.META_EVENT_ID=e.meta.metaEventId);(null===(i=e.meta)||void 0===i?void 0:i.fingerprintRequestId)&&(null===(a=e.meta)||void 0===a?void 0:a.fingerprintVisitorId)&&(s.FPDC_REQUEST_ID=e.meta.fingerprintRequestId,s.FPDC_VISITOR_ID=e.meta.fingerprintVisitorId,void 0!==e.meta.fingerprintConfidenceScore&&(s.FPDC_CONFIDENCE_SCORE=String(e.meta.fingerprintConfidenceScore)));t[$e]&&(s.META_CLICK_ID=t[$e]);t[Ke]&&(s.META_BROWSER_ID=t[Ke]);null!=t[Je]&&(s.META_HAS_CONSENTED=String(t[Je]));'FOCUS_OUT_SCRAPER_EVENT_SOURCE'!==(null===(o=e.meta)||void 0===o?void 0:o.source)&&'BUTTON_CLICK_SCRAPER_EVENT_SOURCE'!==(null===(c=e.meta)||void 0===c?void 0:c.source)&&'ENTER_KEY_SCRAPER_EVENT_SOURCE'!==(null===(u=e.meta)||void 0===u?void 0:u.source)||(s.identifiersSource=e.meta.source);n&&(n.hmid&&(s.MERKURY_HMID=n.hmid),null!=n.confidenceScore&&(s.MERKURY_CONFIDENCE_SCORE=n.confidenceScore),s.MERKURY_HAS_EMAIL=n.hasEmail);return s}(e,t,r);Object.keys(o).length>0&&(i.identity=o);return i}(n,e,o,Du(e[xe]));return t(t({},a),{eventType:o,identifiers:c,eventMetadata:u,genericMetadata:s})}function xu(e){var t=(new TextEncoder).encode(e),n=Array.from(t,(function(e){return String.fromCharCode(e)})).join('');return btoa(n)}var Mu=((Lu={})[Qt]='ShopifyId',Lu[en]='KlaviyoId',Lu[tn]='ClientUserId',Lu[nn]='CustomId',Lu[rn]='BluecoreId',Lu[an]='ShopifyY',Lu[on]='SalesforceId',Lu[cn]='SalesforceMcId',Lu[un]='CordialId',Lu[sn]='AttnEatId',Lu[dn]='GenericClickId',Lu);function Uu(e){if(Array.isArray(e))return e.map((function(e){return Fu(e)}))}function Fu(e){var t,n;if(!e)return{};var r,i,a,o=Hu('category',e.category),c=(r=e.quantity,i=Hu('quantity',r),a=''===i||void 0===i?1:Number(i),Number.isInteger(a)?a:1);return{productId:null!==(t=Hu('productId',e.sku))&&void 0!==t?t:Hu('productId',e.productId),variantId:Hu('variantId',e.subProductId),name:Hu('name',e.name),variantName:Hu('variantName',e.variantName),imageUrl:Hu('image',e.image),categories:o?[o]:void 0,price:Hu('price',e.price),quantity:c,productUrl:null!==(n=Hu('productUrl',e.productUrl))&&void 0!==n?n:Hu('productUrl',e.url)}}function Hu(e,t){if(''!==t&&('number'==typeof t||'string'==typeof t))return Pu(e,t)}function ju(e){e.sku?e.productId=e.sku:e.productId&&(e.sku=e.productId)}var Vu=new Set(['shapermint','landsend','westcoastkidsca','goggles4u','goggles4u-gb','goggles4u-ca','catholiccompany','directtoolsoutlet','zgallerie','sportrx','naromas','wetsuitoutlet-gb']);function Gu(e,t,n){var r=function(e,t,n){return Bu(e,t,n)}(e,t,n);return qu(r,x)}function qu(e,t){var n;try{if(e&&'function'==typeof(null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.sendBeacon)){var r=new URLSearchParams;return r.set('d',JSON.stringify(e)),navigator.sendBeacon(t,r)}return!1}catch(e){return!1}}function Yu(e){return function(a,o){var c;if(!Fa(o)&&Au(e,o))return'';var u,s=function(e,t){var n,r,i=D+'_'+M;return ac((null===(n=e[Ye])||void 0===n?void 0:n.val)+t.meta.dataType+i+document.referrer+e[xe]+`${(r=new Date).getUTCFullYear()}-${r.getUTCMonth()+1}-${r.getUTCDate()}-${r.getUTCHours()}-${r.getUTCMinutes()}`)}(a,o),d=function(e,r,i,a){var o,c,u=Ru(r);if(!(null===(c=r.meta)||void 0===c?void 0:c.dataType))return null;var s=JSON.stringify(t({source:r.meta.source},u)),d=D+'_'+M,l=e,v=ut;l[v];var f=st;l[f];var p=dt;l[p];var m=ft;l[m];var g=pt;l[g];var y=n(l,[v+'',f+'',p+'',m+'',g+'']),h={};r.meta&&r.meta.fingerprintRequestId&&r.meta.fingerprintVisitorId&&(h[Xe]=r.meta.fingerprintRequestId,h[ze]=r.meta.fingerprintVisitorId,h[Ze]=r.meta.fingerprintConfidenceScore);var _={};r.meta&&r.meta.metaEventId&&(_[We]=r.meta.metaEventId);var E=t(t(t(t({},y),h),_),((o={})[Qe]='modern',o[Be]=i,o[qe]=d,o[He]=r.meta.dataType,o[Ge]=document.referrer,o[Ve]=a?Su(window.location.href):window.location.href,o[Ue]=s,o[Fe]=(new Date).getTime(),o[rt]=fn([Qt,en,tn,nn,rn,an,on,cn,un,dn]),o));return'?'.concat(Jt(E))}(a,o,s,null==e?void 0:e[nt]),l=!1;if(d){var v=B+d;if('function'==typeof(null===(c=null===window||void 0===window?void 0:window.navigator)||void 0===c?void 0:c.sendBeacon))try{var f=a[xe];return u=f,Vu.has(u)&&(l=navigator.sendBeacon(v)),f&&(Ua(e)?function(e,t,n){return r(this,0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return[4,ku(e,t,n)];case 1:return r=i.sent(),a=''.concat(n[pt],'/sst-ev'),[2,qu(r,a)]}}))}))}(a,o,e).catch((function(e){})):Gu(a,o,e)),v}catch(e){}return l||(new Image(1,1).src=v),v}return''}}var $u=function(e,t){var n,r,i,a,o,c;return e.push({id:(null===(n=t.productId)||void 0===n?void 0:n.toString())||(null===(r=t.sku)||void 0===r?void 0:r.toString()),quantity:t.quantity?parseInt(t.quantity):void 0,item_price:t.price?parseFloat(t.price):void 0,variantId:null===(i=t.subProductId)||void 0===i?void 0:i.toString(),title:null===(a=t.name)||void 0===a?void 0:a.toString(),category:null===(o=t.category)||void 0===o?void 0:o.toString(),image:null===(c=t.image)||void 0===c?void 0:c.toString(),type:'product'}),e},Ku=function(e){return{cartId:e.cartId||void 0,cartCoupon:e.cartCoupon||void 0,cartCurrency:e.cartCurrency||void 0,cartDiscount:e.cartDiscount||void 0}},Wu=function(e){return Array.isArray(e)?e.reduce($u,[]):'object'==typeof e?Object.values(e).reduce($u,[]):void 0};function Ju(e){var r,i,a,o=null===(r=e[it])||void 0===r?void 0:r[Ft],c={},u=null===(i=e[it])||void 0===i?void 0:i.efj,s=null===(a=e[it])||void 0===a?void 0:a.esc,d=!1,l=function(n,r,i,a){var c,l,v,f,p;if(window.edgetag&&(d||(d=function(e){if(!window.edgetag||!e[ft])return!1;var t={edgeURL:e[ft]};return e[et]||(t.disableConsentCheck=!0),window.edgetag('init',t),!0}(e)),a)){var m={};o&&(m=t(t({},m),((c={})[We]=null===(v=i.meta)||void 0===v?void 0:v.metaEventId,c[Je]=r[Je],c[$e]=r[$e],c[Ke]=r[Ke],c))),u&&i.meta&&(m=t(t({},m),((l={})[Xe]=i.meta.fingerprintRequestId,l[ze]=i.meta.fingerprintVisitorId,l[Ze]=i.meta.fingerprintConfidenceScore,l))),s&&(null===(f=i.meta)||void 0===f?void 0:f.dataType)===Tt&&(m=t(t({},m),{cookies:document.cookie})),(null===(p=i.meta)||void 0===p?void 0:p.dataType)===bt&&i.data&&'availabilities'in i.data&&(m=t(t({},m),{availabilities:i.data.availabilities})),Object.keys(m).length>0&&(a.customJson=JSON.stringify(m)),a&&r[mt]&&(a.sessionId=r[mt]),window.edgetag('tag',n,a,{},{destination:e[ft]})}};return function(r,i){var a;if(window.edgetag&&(Fa(i)||!Au(e,i))&&(i.data.blotoutExternalIds=function(e){if(null!==e){var t=null==e?void 0:e.filter((function(e){return e.name!==ln}));if(t&&t.length>0){var n={};return null==t||t.forEach((function(e){e.vendor===tn?n.clientUserId=e.id||'':e.vendor===nn?n[e.name||'customId']=e.id||'':n[e.vendor]=e.id||''})),n}}}(fn([Qt,en,tn,nn,rn,an,on])),null===(a=i.meta)||void 0===a?void 0:a.dataType)){if(i.meta.dataType!==Bt){var o=i.data,u=o.email,s=o.phone;if(u){var d=In(u);d&&window.edgetag('user','email',d)}if(s){var v=Cn(s.replace(/^1/,''),!0);v&&window.edgetag('user','phone',v)}}switch(i.meta.dataType){case wt:return void l('AddToCart',r,i,function(e){return{currency:e.data.currency||e.data.cartCurrency||void 0,contents:$u([],t(t({},e.data),{quantity:'1'})),customIdentifiers:e.data.blotoutExternalIds}}(i));case Tt:return void l('PageView',r,i,function(e){var t={customIdentifiers:e.data.blotoutExternalIds};return t.customIdentifiers?t:{}}(i));case bt:return void l('ViewContent',r,i,function(e){return{currency:e.data.currency||e.data.cartCurrency||void 0,contents:$u([],t(t({},e.data),{quantity:'1'})),customIdentifiers:e.data.blotoutExternalIds}}(i));case At:return void l('Purchase',r,i,function(e){if(e.data.orderId)return{currency:e.data.currency||e.data.cartCurrency||void 0,contents:$u([],t(t({},e.data),{quantity:'1'})),value:e.data.cartTotal?parseFloat(e.data.cartTotal):void 0,orderId:e.data.orderId,eventId:e.data.orderId,cart:Ku(e.data),customIdentifiers:e.data.blotoutExternalIds}}(i));case It:return void l('CartUpdated',r,i,function(e){var t;if(e.data.products){var n=Wu(e.data.products),r=Ku(e.data),i=Array.isArray(e.data.products)?null===(t=e.data.products.find((function(e){return e.currency})))||void 0===t?void 0:t.currency:void 0;if(n)return{currency:e.data.currency||e.data.cartCurrency||i||void 0,contents:n,cart:r,customIdentifiers:e.data.blotoutExternalIds}}}(i));case Lt:return void l('OrderConfirmed',r,i,function(e){if(e.data.products&&e.data.orderId){var t=Wu(e.data.products);if(t)return{currency:e.data.currency||e.data.cartCurrency||void 0,contents:t,orderId:e.data.orderId,eventId:e.data.orderId,cart:Ku(e.data),customIdentifiers:e.data.blotoutExternalIds}}}(i));case Dt:return void l('PageLeave',r,i,function(e){return{customIdentifiers:e.data.blotoutExternalIds,scrollDepth:Number(e.data.scrollDepth),timeSpent:Number(e.data.timeSpent)}}(i));case'i':case Bt:var f=i.data,p=(s=f.phone,u=f.email,n(f,['phone','email']));return s&&window.edgetag('user','phone',s),u&&window.edgetag('user','email',u),void(c=t(t({},c),p));default:return}}}}var Xu=function(){var e=function(){var e=L('OptanonConsent');if(e){var t=new URLSearchParams(e),n=Object.fromEntries(t);if(n.groups){var r=n.groups.split(',').reduce((function(e,t){var n=t.split(':'),r=n[0],i=n[1];return e[r]=i,e}),{});return r}}}();if(e)return{getMetaConsent:function(){return function(e){return 0===Object.keys(e).length||Ut.every((function(t){return t.every((function(t){return!(t in e)||'0'!==e[t]}))}))}(e)}}},zu=function(e){var t=Xu();if(t)return t;var n=function(){if(window.Shopify&&window.Shopify.customerPrivacy)return{getMetaConsent:function(){var e,t,n,r;try{var i=null===(t=null===(e=window.Shopify)||void 0===e?void 0:e.customerPrivacy)||void 0===t?void 0:t.marketingAllowed(),a=null===(r=null===(n=window.Shopify)||void 0===n?void 0:n.customerPrivacy)||void 0===r?void 0:r.saleOfDataAllowed();return Boolean(i&&a)}catch(e){return!0}}}}();return n||void 0},Zu=function(e,t){var n,r=zu();if(r){var i=((n={})[Je]=function(e,t){var n;if(null===(n=t[it])||void 0===n?void 0:n[Ft])return e.getMetaConsent()}(r,e),n);Object.values(i).every((function(e){return void 0===e}))||t(ma(i))}};r(void 0,0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(null===(e=window.Shopify)||void 0===e?void 0:e.customerPrivacy)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,new Promise((function(e,t){var n,r;null===(r=null===(n=window.Shopify)||void 0===n?void 0:n.loadFeatures)||void 0===r||r.call(n,[{name:'consent-tracking-api',version:'0.1'}],(function(n){if(n)return t(n);e()}))}))];case 2:return t.sent(),[3,4];case 3:return t.sent(),[2];case 4:return[2]}}))}));var Qu=function(){var e,t,n=((e={})[gt]=function(e,n,r){var i,a=r.dispatch;(null===(i=(t=n.data.clientConfiguration)[it])||void 0===i?void 0:i[Ft])&&Zu(t,a)},e[_t]=function(e,n){n.data.on&&function(e,t){t.data.on&&window.edgetag&&e[ft]&&window.edgetag('consent',{all:!0})}(t,n)},e);return Ln(n)},es=function(e){var t=localStorage.getItem('attn_load_collect');null===t&&(t=(Math.random()<e).toString());if(localStorage.setItem('attn_load_collect',t),'true'===t){var n=document.createElement('script'),r=''.concat('https://cdn.attn.tv/tag','/').concat(D,'/collector.js');n.src=r,n.async=!0,document.body.appendChild(n)}};function ts(){var e;if(null!=window.attn_d0x0b_evt&&window.attn_d0x0b_evt.length>0){var t=null===(e=window.attentive)||void 0===e?void 0:e.analytics;if(!t)return;for(var n=0,r=window.attn_d0x0b_evt;n<r.length;n++){var i=r[n],a=i.func,o=i.args;'object'==typeof t&&'function'==typeof t[a]&&t[a].apply(null,o)}}}var ns=function(){!0!==window.attn_tag_initialized&&function(e){r(this,0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:document.removeEventListener('DOMContentLoaded',ns),performance.mark(T.TagCoreLoaded),window.attn_tag_initialized=!0,i.label=1;case 1:return i.trys.push([1,3,,4]),t=JSON.parse(atob(e)),(n=t.vu)&&n.length>0&&!n.some((function(e){return window.location.hostname.endsWith(e)}))?[2]:[4,rs(t)];case 2:return i.sent()&&((r=[]).push(Tu()),r.push(lu()),r.push(function(){var e,t,n,r,i=!1,a=[],o=function(e,o,c){i?window.edgetag&&t[ft]?n(e,o):r(e,o):a.push([e,o,c])};return Ln(((e={})[gt]=function(e,c){t=c.data.clientConfiguration,n=Ju(t),r=Yu(t),i=!0,a.forEach((function(e){o.apply(void 0,e)})),a=[]},e[Ct]=o,e))}()),r.push(Qu()),r.push(function(){var e,t;return Ln(((e={})[gt]=function(e,n){var r,i=null===(r=null==(t=n.data.clientConfiguration)?void 0:t.tac)||void 0===r?void 0:r.p;i&&i>0&&es(i)},e))}()),r.push(bu()),r.push(da()),window.attentive=Ba({clientConfiguration:t,services:r}),queueMicrotask(ts)),[3,4];case 3:return zt('8',i.sent()),[3,4];case 4:return[2]}}))}))}(window.attn_d0x0b_cfg)};function rs(e){return new Promise((function(t,n){if(e[at]&&e[et]){if(is('enable'))return void t(!0);var r=function(){is('enable')&&(window.removeEventListener('attn_queued_sdk_event',r),t(!0))};window.addEventListener('attn_queued_sdk_event',r)}else t(!0)}))}function is(e){var t;return null===(t=null===window||void 0===window?void 0:window.attn_d0x0b_evt)||void 0===t?void 0:t.find((function(t){return t.func===e}))}window.attn_d0x0b_cfg&&('loading'===document.readyState?document.addEventListener('DOMContentLoaded',ns):ns())}();
