(function(shopify) { (()=>{var ye=Object.defineProperty,ve=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;var le=(t,_,p)=>_ in t?ye(t,_,{enumerable:!0,configurable:!0,writable:!0,value:p}):t[_]=p,C=(t,_)=>{for(var p in _||(_={}))be.call(_,p)&&le(t,p,_[p]);if(se)for(var p of se(_))Re.call(_,p)&&le(t,p,_[p]);return t},j=(t,_)=>ve(t,Ae(_));var _e="WebPixel::Render";var x=t=>shopify.extend(_e,t);var de=!1;function Te(){for(let t of Object.values(ce))t.enabled=t.percent>Math.random()*100}function A(t){return de||(de=!0,Te()),ce[t].enabled}var ce={0:{percent:0,enabled:!1},1:{percent:0,enabled:!1},2:{percent:0,enabled:!1},3:{percent:0,enabled:!1},4:{percent:100,enabled:!1},5:{percent:0,enabled:!1},6:{percent:0,enabled:!1}};var Ce="developer_id.dYmNjMT",N="dNzYwYj";function pe(t){let _=t.init.customerPrivacy;if(_===void 0||_.marketingAllowed||_.analyticsProcessingAllowed)ue(t,_);else{let p=!1;t.customerPrivacy.subscribe("visitorConsentCollected",y=>{let v=y.customerPrivacy;!p&&(v.marketingAllowed||v.analyticsProcessingAllowed)&&(ue(t,v),p=!0)})}}function ue(t,_){var $,K,V,X,Z,J,Q,h,k,ee,te,ne;let p=window.dataLayer=window.dataLayer||[],y=JSON.parse(t.settings.config),v=[];if(A(4))if(y.google_tag_ids&&y.google_tag_ids.length>0){let e=y.google_tag_ids;v.push(...e)}else v.push(y.pixel_id);else v.push(y.pixel_id);let r=window.gtag=window.gtag||function(){p.push(arguments)};_&&(r("consent","default",fe(_)),r("set",Ee(_))),A(3)?O(t)&&(r("set",{ignore_referrer:"true"}),r("policy","detect_click_events",()=>!1),r("policy","detect_element_visibility_events",()=>!1),r("policy","detect_history_change_events",()=>!1),r("policy","detect_link_click_events",()=>!1),r("policy","detect_timer_events",()=>!1),r("policy","detect_youtube_activity_events",()=>!1),r("policy","detect_scroll_events",()=>!1),r("policy","detect_form_submit_events",()=>!1),r("policy","detect_form_interaction_events",()=>!1)):(O(t)&&r("set",{ignore_referrer:"true"}),r("policy","detect_click_events",()=>!1),r("policy","detect_element_visibility_events",()=>!1),r("policy","detect_history_change_events",()=>!1),r("policy","detect_link_click_events",()=>!1),r("policy","detect_timer_events",()=>!1),r("policy","detect_youtube_activity_events",()=>!1),r("policy","detect_scroll_events",()=>!1),r("policy","detect_form_submit_events",()=>!1),r("policy","detect_form_interaction_events",()=>!1)),r("policy","internal_sw_allowed",()=>!1),r("set",Ce,!0),r("js",new Date);let H={send_page_view:!1};O(t)&&(H.ignore_referrer="true");for(let e of v){let n=document.createElement("script");n.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.body.appendChild(n),r("config",e,H)}let R=y.gtag_events,T=e=>{var n;return"shopify_"+(y.target_country||"US")+"_"+String((n=e==null?void 0:e.product)==null?void 0:n.id)+"_"+String(e==null?void 0:e.id)},F=e=>{let n=e==null?void 0:e.title;return["default","title","default title",""].includes(String(n).toLowerCase())?null:n},B=e=>{var l,u;let n=(l=e==null?void 0:e.subtotalPrice)==null?void 0:l.amount;if(!A(1))return{value:n};let s=((u=e==null?void 0:e.discountsAmount)==null?void 0:u.amount)||0;return{value:n&&s?n-s:n,discount:s}},q=(e,n)=>n?`${e} - ${n}`:e,me=(e,n)=>{var s;if(e==="/search"){let l=(s=document.querySelector("link[rel='canonical']"))==null?void 0:s.getAttribute("href");if(l)return l}return n},ge=(e,n,s)=>e&&e.endsWith("thank_you")?q(n,s):n,W=e=>{var n,s,l,u,c,f,m;return{email:e==null?void 0:e.email,phone_number:e==null?void 0:e.phone,address:{first_name:(n=e==null?void 0:e.billingAddress)==null?void 0:n.firstName,last_name:(s=e==null?void 0:e.billingAddress)==null?void 0:s.lastName,street:(l=e==null?void 0:e.billingAddress)==null?void 0:l.address1,city:(u=e==null?void 0:e.billingAddress)==null?void 0:u.city,region:(c=e==null?void 0:e.billingAddress)==null?void 0:c.province,postal_code:(f=e==null?void 0:e.billingAddress)==null?void 0:f.zip,country:(m=e==null?void 0:e.billingAddress)==null?void 0:m.country}}},Y={email:(V=(K=($=t.init)==null?void 0:$.data)==null?void 0:K.customer)==null?void 0:V.email,phone_number:(J=(Z=(X=t.init)==null?void 0:X.data)==null?void 0:Z.customer)==null?void 0:J.phone,address:{first_name:(k=(h=(Q=t.init)==null?void 0:Q.data)==null?void 0:h.customer)==null?void 0:k.firstName,last_name:(ne=(te=(ee=t.init)==null?void 0:ee.data)==null?void 0:te.customer)==null?void 0:ne.lastName}};t.analytics.subscribe("page_viewed",e=>{var s,l,u,c,f,m,i,d;let n=R.find(g=>g.type==="page_view");if(n&&n.action_label){let g=(u=(l=(s=e.context)==null?void 0:s.window)==null?void 0:l.location)==null?void 0:u.pathname,a=C({send_to:w(n.action_label),developer_id:{[N]:!0},page_path:g,page_title:Ne((f=(c=e.context)==null?void 0:c.document)==null?void 0:f.title,g),page_location:me(g,(d=(i=(m=e.context)==null?void 0:m.window)==null?void 0:i.location)==null?void 0:d.href),user_data:Y},!A(6)&&O(t)&&{ignore_referrer:"true"});r("event","page_view",a)}}),t.analytics.subscribe("product_viewed",e=>{var s,l,u,c,f,m;let n=R.find(i=>i.type==="view_item");if(n&&n.action_label){let i=(s=e.data)==null?void 0:s.productVariant;r("event","view_item",{send_to:w(n.action_label),developer_id:{[N]:!0},ecomm_prodid:[T(i)],ecomm_totalvalue:(l=i==null?void 0:i.price)==null?void 0:l.amount,ecomm_pagetype:"product",items:[{id:T(i),name:q((u=i==null?void 0:i.product)==null?void 0:u.title,F(i)),brand:(c=i==null?void 0:i.product)==null?void 0:c.vendor,category:(f=i==null?void 0:i.product)==null?void 0:f.type,price:(m=i==null?void 0:i.price)==null?void 0:m.amount,variant:F(i)}],user_data:Y})}}),t.analytics.subscribe("product_added_to_cart",e=>{var s,l,u,c,f,m,i,d,g,a,b;let n=R.find(o=>o.type==="add_to_cart");if(n&&n.action_label){let o=(s=e.data)==null?void 0:s.cartLine,E=o==null?void 0:o.merchandise;r("event","add_to_cart",{send_to:w(n.action_label),developer_id:{[N]:!0},ecomm_prodid:[T(o==null?void 0:o.merchandise)],ecomm_totalvalue:(u=(l=o==null?void 0:o.cost)==null?void 0:l.totalAmount)==null?void 0:u.amount,ecomm_pagetype:"cart",value:(f=(c=o==null?void 0:o.cost)==null?void 0:c.totalAmount)==null?void 0:f.amount,currency:((i=(m=o==null?void 0:o.cost)==null?void 0:m.totalAmount)==null?void 0:i.currencyCode)||"USD",items:[{id:T(E),name:q((d=E==null?void 0:E.product)==null?void 0:d.title,F(E)),brand:(g=E==null?void 0:E.product)==null?void 0:g.vendor,category:(a=E==null?void 0:E.product)==null?void 0:a.type,price:(b=E==null?void 0:E.price)==null?void 0:b.amount,quantity:o==null?void 0:o.quantity,variant:F(E)}],user_data:Y})}}),t.analytics.subscribe("checkout_completed",e=>{var s,l,u,c,f,m,i,d,g;let n=R.find(a=>a.type==="purchase");if(n&&n.action_label){let a=(s=e.data)==null?void 0:s.checkout,b=C(j(C({send_to:w(n.action_label),developer_id:{[N]:!0},transaction_id:(l=a==null?void 0:a.order)==null?void 0:l.id},B(a)),{currency:((u=a==null?void 0:a.subtotalPrice)==null?void 0:u.currencyCode)||"USD",tax:(c=a==null?void 0:a.totalTax)==null?void 0:c.amount,shipping:(m=(f=a==null?void 0:a.shippingLine)==null?void 0:f.price)==null?void 0:m.amount,items:(i=a==null?void 0:a.lineItems)==null?void 0:i.map(o=>{var E,P,U,I,S,D,G,L,M,z,ae,re,ie,oe;return{id:T(o.variant),name:ge((U=(P=(E=e.context)==null?void 0:E.window)==null?void 0:P.location)==null?void 0:U.pathname,(S=(I=o.variant)==null?void 0:I.product)==null?void 0:S.title,F(o.variant)),brand:(G=(D=o.variant)==null?void 0:D.product)==null?void 0:G.vendor,category:(M=(L=o.variant)==null?void 0:L.product)==null?void 0:M.type,coupon:(re=(ae=(z=o.discountAllocations)==null?void 0:z[0])==null?void 0:ae.discountApplication)==null?void 0:re.title,price:(oe=(ie=o.variant)==null?void 0:ie.price)==null?void 0:oe.amount,quantity:o.quantity,variant:F(o.variant)}}),user_data:W(a)}),!A(6)&&O(t)&&{ignore_referrer:"true"});A(2)&&(b.new_customer=(g=(d=a==null?void 0:a.order)==null?void 0:d.customer)==null?void 0:g.isFirstOrder),r("event","purchase",b)}}),t.analytics.subscribe("checkout_started",e=>{var s,l,u,c,f,m,i;let n=R.find(d=>d.type==="begin_checkout");if(n&&n.action_label){let d=(s=e.data)==null?void 0:s.checkout,g=C(j(C({send_to:w(n.action_label),developer_id:{[N]:!0},ecomm_prodid:(l=d==null?void 0:d.lineItems)==null?void 0:l.map(a=>T(a.variant)),ecomm_totalvalue:(u=d==null?void 0:d.subtotalPrice)==null?void 0:u.amount,ecomm_pagetype:"cart"},B(d)),{currency:((c=d==null?void 0:d.subtotalPrice)==null?void 0:c.currencyCode)||"USD",coupon:(m=(f=d==null?void 0:d.discountApplications)==null?void 0:f[0])==null?void 0:m.title,items:(i=d==null?void 0:d.lineItems)==null?void 0:i.map(a=>{var b,o,E,P,U,I,S,D,G,L,M,z;return{id:T(a.variant),name:(o=(b=a.variant)==null?void 0:b.product)==null?void 0:o.title,brand:(P=(E=a.variant)==null?void 0:E.product)==null?void 0:P.vendor,category:(I=(U=a.variant)==null?void 0:U.product)==null?void 0:I.type,coupon:(G=(D=(S=a.discountAllocations)==null?void 0:S[0])==null?void 0:D.discountApplication)==null?void 0:G.title,price:(M=(L=a.variant)==null?void 0:L.price)==null?void 0:M.amount,quantity:a.quantity,variant:(z=a.variant)==null?void 0:z.title}}),user_data:W(d)}),!A(6)&&O(t)&&{ignore_referrer:"true"});r("event","begin_checkout",g)}}),t.analytics.subscribe("search_submitted",e=>{var s,l;let n=R.find(u=>u.type==="search");n&&n.action_label&&r("event","search",{send_to:w(n.action_label),developer_id:{[N]:!0},search_term:(l=(s=e.data)==null?void 0:s.searchResult)==null?void 0:l.query,user_data:Y})}),t.analytics.subscribe("payment_info_submitted",e=>{var s,l,u;let n=R.find(c=>c.type==="add_payment_info");if(n&&n.action_label){let c=(s=e.data)==null?void 0:s.checkout,f=C({send_to:w(n.action_label),developer_id:{[N]:!0},currency:((l=c==null?void 0:c.totalPrice)==null?void 0:l.currencyCode)||"USD",total:(u=c==null?void 0:c.totalPrice)==null?void 0:u.amount,user_data:W(c)},!A(6)&&O(t)&&{ignore_referrer:"true"});r("event","add_payment_info",f)}}),t.customerPrivacy.subscribe("visitorConsentCollected",e=>{let n=e.customerPrivacy;r("consent","update",fe(n)),r("set",Ee(n))})}function Ee(t){return{restricted_data_processing:!t.saleOfDataAllowed}}function fe(t){return{ad_storage:t.marketingAllowed?"granted":"denied",ad_user_data:t.marketingAllowed?"granted":"denied",ad_personalization:t.marketingAllowed?"granted":"denied",analytics_storage:t.analyticsProcessingAllowed?"granted":"denied"}}function O(t){var _;return((_=t==null?void 0:t._pixelInfo)==null?void 0:_.surfaceNext)==="checkout"}function w(t){return A(5)?["default",...t]:t}function Ne(t,_){if(!_)return t;let p=[["/information","Checkout - Contact Information"],["/shipping","Checkout - Shipping"],["/payment","Checkout - Payment"],["/review","Checkout - Review"],["/processing","Checkout - Processing"],["/thank-you","Checkout - Receipt"],["/stock-problems","Checkout - Stock problems"],["/error","Checkout - Error"]];for(let[y,v]of p)if(_.endsWith(y))return v;return/^\/checkouts\/[A-Za-z0-9]+\/[A-Za-z0-9]+$/.test(_)?"Checkout - Contact Information":t}x(pe);})(); })(self.webPixelsManager.createShopifyExtend('523174124', 'app'));