PageSourceSearch

https://toughenoughtowearpink.com/cdn/shopifycloud/checkout-web/assets/c1/2acfb1ce.Ijr4U99n.js

js toughenoughtowearpink.com collected 2026-10-02 10:37:37 UTC 8,328 bytes, 1 lines download raw bytes

1import{T as e,s as n,G as a,j as r,u as t,q as i,n as o,S as c,t as s,m as l}from"./2c1ab0fe.GMbxnz74.js";import{a2 as u,o as p,L as v,c7 as d,b as h,H as g,c as m,cv as y,cw as f,P as k,cx as b,bz as P,l as S,cy as C,cz as T,ci as _}from"./164ad2e3.BbIvMjRY.js";import{S as B,aW as A,aa as E,cj as x,cp as w,bE as D}from"./4c290a1e.C6TDJ9Fn.js";import{S as I}from"./54bf0ebb.BA0O2evN.js";import{C as M}from"./app.CepNJbvh.js";import"./9f047e05.CCJUgz_L.js";import"./0a7dffce.DfUtZWCu.js";import"./5fda1420.KYpufQ--.js";import"./60a453ce.CkhHeRBc.js";import"./21cc90a2.DAzJmttM.js";import"./bb728e1c.iawBHR84.js";const j="privacy-consent-banner",q="privacy_preferences_modal",L="privacy-policy-modal";var O=(e=>(e.Accept="accept",e.Decline="decline",e.AcceptAll="accept_all",e.DeclineAll="decline_all",e.ManagePreferences="manage_preferences",e.Save="save",e.LeavePreferences="leave_preferences",e.PrivacyPolicyView="privacy_policy_view",e.CloseCheckoutBanner="close_checkout_banner",e))(O||{});function z(){const{client:a,consentManager:r,userEvents:t,router:i,shop:o,source:c}=B(),s=i.currentUrl.value,{domain:l,storefrontDomains:u}=o,p="true"===s.searchParams.get("previewPrivacyBanner"),v=c.checkoutSessionIdentifier,d=e(()=>{const e=document.referrer;return u.some(n=>e.includes(n))},[u]);return{emitPrivacyBannerInteractionEvent:n(e=>{p||t.monorailEvent({schemaId:"privacy_banner_interact/1.3",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,visitorRegion:r.getRegion.value,interactionType:e,checkoutSessionIdentifier:v,isStorefrontReferrer:d}})},[p,r,l,a.cookies,s.pathname,v,d,t]),emitPrivacyBannerRenderEvent:n(()=>{p||t.monorailEvent({schemaId:"privacy_banner_render/1.2",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,checkoutSessionIdentifier:v,isStorefrontReferrer:d}})},[p,l,a.cookies,s.pathname,v,d,t]),emitPrivacyBannerInitializedEvent:n(()=>{p||t.monorailEvent({schemaId:"privacy_banner_initialized/1.1",payload:{shopPermanentDomain:l,sessionToken:a.cookies.get("_shopify_y")||"0",regulation:"CMP",path:s.pathname,checkoutSessionIdentifier:v,isStorefrontReferrer:d}})},[p,l,a.cookies,s.pathname,v,d,t])}}const N={id:"76113fc688fe950e2e09d64b5b10df17007abf25436339310e6aeb706bdf5e30",type:"query",name:"PrivacyBannerSettings",source:""},R=A(({graphql:{coreGraphql:e}},{privacyBannerSettingsSignal:n})=>{const t=e.query(N,{cache:!1}),i=a(()=>t.data.value?.privacyBannerSettings);return r(()=>{i.value&&(n.value=i.value)}),{error:t.error,loading:t.loading,settings:i}}),V=(e,n)=>{n?console.debug(n):e?console.error("Set consent error: ",e):console.error("Set consent error: unknown")},U=async({givenConsent:e,token:n,consentManager:a})=>{await a.setTrackingConsent({analytics:e,marketing:e,preferences:e,storefrontAccessToken:n},V)};function F(e){function a(){p(j),p(q)}const r=i(!1),s=i(!1),l=i(!1),u=i(!0),{hideOverlay:p}=d(),{emitPrivacyBannerInteractionEvent:v}=z(),{consentManager:C}=B(),T=async({analytics:n,marketing:a,preferences:t})=>{o(()=>{r.value=n,s.value=a,l.value=t}),await C.setTrackingConsent({analytics:n,marketing:a,preferences:t,storefrontAccessToken:e.consentTrackingApiToken},V)},_=n(()=>{v(O.LeavePreferences),u.value=!0},[v,u]),A=n(()=>{if(u.value){const{analytics:e,marketing:n,preferences:a}=C.currentVisitorConsent.value;o(()=>{r.value="yes"===e,s.value="yes"===n,l.value="yes"===a,u.value=!1})}},[r,C,u,s,l]),E=(()=>{const n=[e.bulletPoints?.firstText,e.bulletPoints?.secondText,e.bulletPoints?.thirdText].filter(e=>"string"==typeof e);return e.bulletPoints?.enabled&&n.length>0?t(c,{children:[t(h,{blockSize:"base"}),t(g,{level:3,children:e?.bulletPoints?.title}),t(m,{gap:"base",padding:"small-300 none small-300 none",children:t(y,{children:n.map((e,n)=>t(f,{children:t(k,{children:e})},n))})})]}):null})(),x=t(m,{children:[t(g,{level:3,children:e.introTitle}),t(k,{children:e.introText}),E]}),w=t(m,{gap:"base",children:[t(b,{checked:!0,disabled:!0,label:e.purposes.essentialName,details:e.purposes.essentialDesc}),t(b,{checked:l.value,onChange:e=>{l.value=e},label:e.purposes.preferencesName,details:e.purposes.preferencesDesc}),t(b,{checked:s.value,onChange:e=>{s.value=e},label:e.purposes.marketingName,details:e.purposes.marketingDesc}),t(b,{checked:r.value,onChange:e=>{r.value=e},label:e.purposes.performanceName,details:e.purposes.performanceDesc})]});return t(P,{id:q,heading:e.title||"",primaryAction:t(S,{variant:"primary",onClick:()=>{T({analytics:r.value,marketing:s.value,preferences:l.value}),v(O.Save),a()},children:e.buttonSaveText}),secondaryActions:t(c,{children:[t(S,{onClick:()=>{T({analytics:!0,marketing:!0,preferences:!0}),v(O.AcceptAll),a()},children:e.buttonAcceptText}),t(S,{onClick:()=>{T({analytics:!1,marketing:!1,preferences:!1}),v(O.DeclineAll),a()},children:e.buttonDeclineText})]}),size:"large",onHide:_,onShow:A,children:t(m,{gap:"base",children:[x,w]})})}const G=A(({graphql:{coreGraphql:e},router:n},{isCheckoutEditor:t,privacyBannerSettingsSignal:i,showPrivacySheet:o})=>{const c=a(()=>"true"===n.currentUrl.value.searchParams.get("previewPrivacyBanner")),s=e.query(N,{cache:!1,skip:()=>!o.value&&!c.value||t}),l=a(()=>s.data.value?.privacyBannerSettings);return r(()=>{l.value&&(i.value=l.value)}),{error:s.error,hidden:a(()=>s.loading.value||t||(!o.value||!l.value?.showBannerOnCheckout)&&!c.value),loading:s.loading,settings:l}}),H={PrivacyPreferencesFooterLink:function(){const{i18n:e}=B(),{emitPrivacyBannerInteractionEvent:a}=z(),{privacyBannerSettingsSignal:r}=E().context,{footer:{content:{typography:i}={}}={}}=u(),o=n(()=>{a(O.ManagePreferences)},[a]),{settings:c,loading:s,error:l}=x(R,{privacyBannerSettingsSignal:r});if(s.value||!c.value?.enabled)return null;if(l.value)return console.error("Error fetching consent banner data",l.value),null;const d=e.translate("shop_policies.cookie_preferences"),h=t(v,{display:"block",onClick:o,commandFor:q,"aria-haspopup":"dialog",children:d});return i?t(p,{size:i.size,color:i.color,type:"bold"===i.weight?"strong":void 0,children:h}):h},PrivacyPreferences:function(){const{privacyBannerSettingsSignal:e}=E().context,n=e.value;return n?.enabled?t(F,{...n.preferences,consentTrackingApiToken:n.consentTrackingApiToken||void 0}):null},PrivacySheet:function(){const{emitPrivacyBannerInteractionEvent:e,emitPrivacyBannerRenderEvent:a,emitPrivacyBannerInitializedEvent:r}=z();r();const{consentManager:i,embed:o,shop:u}=B(),{localPolicies:p}=w(),h=T(),g=function(){const{consentManager:e}=B(),n=C();return s(()=>!!n.value&&function(e){const n=e.currentVisitorConsent.value;return n.analytics===M.NO_VALUE&&n.marketing===M.NO_VALUE&&n.preferences===M.NO_VALUE}(e))}(),{hideOverlay:m}=d(),{privacyBannerSettingsSignal:y}=E().context,{settings:f,loading:b,error:P,hidden:A}=x(G,{isCheckoutEditor:h,privacyBannerSettingsSignal:y,showPrivacySheet:g}),N=n(()=>{e(O.CloseCheckoutBanner)},[e]),R=n(()=>{e(O.PrivacyPolicyView)},[e]),V=n(()=>{e(O.ManagePreferences)},[e]);if(l(()=>{!b.value&&g.value&&!P.value&&f.value?.showBannerOnCheckout&&a()},[a,b.value,g.value,P.value,f.value]),A.value)return null;if(P.value||!f.value)return console.error("Error fetching consent banner data",P.value),null;const{title:F,text:H,policyLinkUrl:W,policyLinkText:Z,buttonAcceptText:J,buttonDeclineText:K,buttonPrefsOpenText:Q}=f.value,X=f.value.consentTrackingApiToken||void 0,Y=W.includes("/policies/"),$=Y&&D(o?.embedder),ee=W.split("/").pop()||"privacy-policy",ne={...p.find(e=>e.handle===ee)??{shopName:u.name,shopId:u.id,handle:ee,url:W,squareLogo:u.brandSettings?.squareLogo},name:Z};return t(c,{children:[t(I,{defaultOpen:!0,id:j,heading:F||"",onHide:N,primaryAction:t(c,{children:[t(S,{onClick:()=>{U({givenConsent:!0,token:X,consentManager:i}),e(O.Accept),m(j)},children:J}),t(S,{onClick:()=>{U({givenConsent:!1,token:X,consentManager:i}),e(O.Decline),m(j)},children:K})]}),secondaryActions:t(v,{textDecoration:"none",onClick:V,commandFor:q,"aria-haspopup":"dialog",children:Q}),children:t(k,{tone:"info",type:"small",children:[H,t(v,{href:Y?void 0:W,target:Y?void 0:"_blank",onClick:()=>{R(),$&&o?.client?.windowOpenRequest(W)},...$&&{"aria-haspopup":"dialog"},...Y&&!$&&{commandFor:L},children:Z})]})}),Y&&!$&&t(_,{defaultPolicy:ne,id:L},ee)]})}};export{H as deferredPrivacyComponents};

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