PageSourceSearch

https://hangsmart.com/cdn/shopifycloud/checkout-web/assets/c1/2acfb1ce.BZmP3s_0.js

js hangsmart.com collected 2026-10-05 11:33:11 UTC 8,321 bytes, 1 lines download raw bytes

1import{T as e,q as n,I as a,t as r,u as t,o as i,n as o,S as c,k as s,h as l}from"./2c1ab0fe.XVnTovwp.js";import{aE as u,k as p,i as d,L as v,ci as h,d as g,H as m,S as y,cB as f,cC as k,f as b,cD as P,M as S,B as C,cE as T,cF as _,C as B}from"./164ad2e3.hrg71Gqs.js";import{a as A,bY as E,aA as x,y as w,z as D}from"./f67abd2c.DYpmk7mw.js";import{S as I}from"./54bf0ebb.CtxtVex-.js";import"./d0bb51ec.Bel_y502.js";import"./app.Bke-0Cv3.js";import"./60a453ce.Al5ISuVm.js";import"./e12db40c.D-IRYT_x.js";import"./9dba8418.C8BcPjk_.js";const M="privacy-consent-banner",L="privacy_preferences_modal",q="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 j(){const{client:a,consentManager:r,userEvents:t,router:i,shop:o,source:c}=A(),s=i.currentUrl.value,{domain:l,storefrontDomains:u}=o,p="true"===s.searchParams.get("previewPrivacyBanner"),d=c.checkoutSessionIdentifier,v=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:d,isStorefrontReferrer:v}})},[p,r,l,a.cookies,s.pathname,d,v,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:d,isStorefrontReferrer:v}})},[p,l,a.cookies,s.pathname,d,v,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:d,isStorefrontReferrer:v}})},[p,l,a.cookies,s.pathname,d,v,t])}}const z={id:"76113fc688fe950e2e09d64b5b10df17007abf25436339310e6aeb706bdf5e30",type:"query",name:"PrivacyBannerSettings",source:""},N=u(({graphql:{coreGraphql:e}},{privacyBannerSettingsSignal:n})=>{const t=e.query(z,{cache:!1}),i=a(()=>t.data.value?.privacyBannerSettings);return r(()=>{i.value&&(n.value=i.value)}),{error:t.error,loading:t.loading,settings:i}}),R=(e,n)=>{n?console.debug(n):e?console.error("Set consent error: ",e):console.error("Set consent error: unknown")},V=async({givenConsent:e,token:n,consentManager:a})=>{await a.setTrackingConsent({analytics:e,marketing:e,preferences:e,storefrontAccessToken:n},R)};function U(e){function a(){p(M),p(L)}const r=i(!1),s=i(!1),l=i(!1),u=i(!0),{hideOverlay:p}=h(),{emitPrivacyBannerInteractionEvent:d}=j(),{consentManager:v}=A(),T=async({analytics:n,marketing:a,preferences:t})=>{o(()=>{r.value=n,s.value=a,l.value=t}),await v.setTrackingConsent({analytics:n,marketing:a,preferences:t,storefrontAccessToken:e.consentTrackingApiToken},R)},_=n(()=>{d(O.LeavePreferences),u.value=!0},[d,u]),B=n(()=>{if(u.value){const{analytics:e,marketing:n,preferences:a}=v.currentVisitorConsent.value;o(()=>{r.value="yes"===e,s.value="yes"===n,l.value="yes"===a,u.value=!1})}},[r,v,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(g,{blockSize:"base"}),t(m,{level:3,children:e?.bulletPoints?.title}),t(y,{gap:"base",padding:"small-300 none small-300 none",children:t(f,{children:n.map((e,n)=>t(k,{children:t(b,{children:e})},n))})})]}):null})(),x=t(y,{children:[t(m,{level:3,children:e.introTitle}),t(b,{children:e.introText}),E]}),w=t(y,{gap:"base",children:[t(P,{checked:!0,disabled:!0,label:e.purposes.essentialName,details:e.purposes.essentialDesc}),t(P,{checked:l.value,onChange:e=>{l.value=e},label:e.purposes.preferencesName,details:e.purposes.preferencesDesc}),t(P,{checked:s.value,onChange:e=>{s.value=e},label:e.purposes.marketingName,details:e.purposes.marketingDesc}),t(P,{checked:r.value,onChange:e=>{r.value=e},label:e.purposes.performanceName,details:e.purposes.performanceDesc})]});return t(S,{id:L,heading:e.title||"",primaryAction:t(C,{variant:"primary",onClick:()=>{T({analytics:r.value,marketing:s.value,preferences:l.value}
1),d(O.Save),a()},children:e.buttonSaveText}),secondaryActions:t(c,{children:[t(C,{onClick:()=>{T({analytics:!0,marketing:!0,preferences:!0}),d(O.AcceptAll),a()},children:e.buttonAcceptText}),t(C,{onClick:()=>{T({analytics:!1,marketing:!1,preferences:!1}),d(O.DeclineAll),a()},children:e.buttonDeclineText})]}),size:"large",onHide:_,onShow:B,children:t(y,{gap:"base",children:[x,w]})})}const F=u(({graphql:{coreGraphql:e},router:n},{isCheckoutEditor:t,privacyBannerSettingsSignal:i,showPrivacySheet:o})=>{const c=a(()=>"true"===n.currentUrl.value.searchParams.get("previewPrivacyBanner")),s=e.query(z,{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,checkout:{negotiator:a}}=A(),{emitPrivacyBannerInteractionEvent:r}=j(),{privacyBannerSettingsSignal:i}=a.context,{footer:{content:{typography:o}={}}={}}=p(),c=n(()=>{r(O.ManagePreferences)},[r]),{settings:s,loading:l,error:u}=E(N,{privacyBannerSettingsSignal:i});if(l.value||!s.value?.enabled)return null;if(u.value)return console.error("Error fetching consent banner data",u.value),null;const h=e.translate("shop_policies.cookie_preferences"),g=t(v,{display:"block",onClick:c,commandFor:L,"aria-haspopup":"dialog",children:h});return o?t(d,{size:o.size,color:o.color,type:"bold"===o.weight?"strong":void 0,children:g}):g},PrivacyPreferences:function(){const{checkout:{negotiator:e}}=A(),{privacyBannerSettingsSignal:n}=e.context,a=n.value;return a?.enabled?t(U,{...a.preferences,consentTrackingApiToken:a.consentTrackingApiToken||void 0}):null},PrivacySheet:function(){const{emitPrivacyBannerInteractionEvent:e,emitPrivacyBannerRenderEvent:a,emitPrivacyBannerInitializedEvent:r}=j();r();const{consentManager:i,embed:o,shop:u,checkout:{negotiator:p}}=A(),{localPolicies:d}=w(),g=_(),m=function(){const{consentManager:e}=A(),n=T();return s(()=>!!n.value&&function(e){const n=e.currentVisitorConsent.value;return n.analytics===x.NO_VALUE&&n.marketing===x.NO_VALUE&&n.preferences===x.NO_VALUE}(e))}(),{hideOverlay:y}=h(),{privacyBannerSettingsSignal:f}=p.context,{settings:k,loading:P,error:S,hidden:z}=E(F,{isCheckoutEditor:g,privacyBannerSettingsSignal:f,showPrivacySheet:m}),N=n(()=>{e(O.CloseCheckoutBanner)},[e]),R=n(()=>{e(O.PrivacyPolicyView)},[e]),U=n(()=>{e(O.ManagePreferences)},[e]);if(l(()=>{!P.value&&m.value&&!S.value&&k.value?.showBannerOnCheckout&&a()},[a,P.value,m.value,S.value,k.value]),z.value)return null;if(S.value||!k.value)return console.error("Error fetching consent banner data",S.value),null;const{title:H,text:G,policyLinkUrl:Y,policyLinkText:J,buttonAcceptText:K,buttonDeclineText:Q,buttonPrefsOpenText:W}=k.value,X=k.value.consentTrackingApiToken||void 0,Z=Y.includes("/policies/"),$=Z&&D(o?.embedder),ee=Y.split("/").pop()||"privacy-policy",ne={...d.find(e=>e.handle===ee)??{shopName:u.name,shopId:u.id,handle:ee,url:Y,squareLogo:u.brandSettings?.squareLogo},name:J};return t(c,{children:[t(I,{defaultOpen:!0,id:M,heading:H||"",onHide:N,primaryAction:t(c,{children:[t(C,{onClick:()=>{V({givenConsent:!0,token:X,consentManager:i}),e(O.Accept),y(M)},children:K}),t(C,{onClick:()=>{V({givenConsent:!1,token:X,consentManager:i}),e(O.Decline),y(M)},children:Q})]}),secondaryActions:t(v,{textDecoration:"none",onClick:U,commandFor:L,"aria-haspopup":"dialog",children:W}),children:t(b,{tone:"info",type:"small",children:[G,t(v,{href:Z?void 0:Y,target:Z?void 0:"_blank",onClick:()=>{R(),$&&o?.client?.windowOpenRequest(Y)},...$&&{"aria-haspopup":"dialog"},...Z&&!$&&{commandFor:q},children:J})]})}),Z&&!$&&t(B,{defaultPolicy:ne,id:q},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.