@shopify/hydrogen 2026.4.3 → 2026.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- 'use strict';var react=require('react'),reactRouter=require('react-router'),jsxRuntime=require('react/jsx-runtime'),hydrogenReact=require('@shopify/hydrogen-react'),loadScript=require('@shopify/hydrogen-react/load-script'),graphqlClient=require('@shopify/graphql-client'),cookie=require('worktop/cookie'),gs=require('content-security-policy-builder');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var gs__default=/*#__PURE__*/_interopDefault(gs);var mn=Object.defineProperty;var wr=(e,t)=>()=>(e&&(t=e(e=0)),t);var xr=(e,t)=>{for(var r in t)mn(e,r,{get:t[r],enumerable:true});};var Qo={};xr(Qo,{VIRTUAL_ROUTES_DIR:()=>Be,VIRTUAL_ROUTES_DIR_PARTS:()=>Go,VIRTUAL_ROUTES_ROUTES_DIR_PARTS:()=>Qe,createVirtualRoutesPath:()=>Bo,getVirtualRoutesV3:()=>Is});function Bo(e,t,r){let o=new URL("../",e),n=t.reduce((s,i)=>new URL(`${i}/`,s),o),a=new URL(r,n).pathname.replace(/^\/[a-zA-Z]:\//,"/");return decodeURIComponent(a)}function Ge(e,t){return Bo((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)),e,t)}async function Is(){return {routes:[{id:`${Be}/graphiql`,path:"graphiql",file:Ge(Qe,"graphiql.jsx"),index:false},{id:`${Be}/subrequest-profiler`,path:"subrequest-profiler",file:Ge(Qe,"subrequest-profiler.jsx"),index:false},{id:`${Be}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,path:".well-known/appspecific/com.chrome.devtools.json",file:Ge(Qe,"[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx"),index:false},{id:`${Be}/index`,path:"",file:Ge(Qe,"index.jsx"),index:true}],layout:{file:Ge(Go,"layout.jsx")}}}var Be,Qe,Go;var un={};xr(un,{default:()=>sn,logSeoTags:()=>cn});function sn({headTags:e}){return cn(e),null}function cn(e){console.log(" "),console.log("%cSEO Meta Tags",`${si}`),console.log(" "),e.forEach(t=>{if(t.tag==="script"){if(console.log("%c\u2022 JSON LD ",Ir),t.children)try{console.table(JSON.parse(t.children),["name","content"]);}catch{console.log(t.children);}}else {if(console.log(`%c\u2022 ${t.tag} `,Ir),t.children)if(typeof t.children=="string")console.log(`\u21B3 ${t.children}`);else try{Object.entries(JSON.parse(t.children)).map(([r,o])=>console.log(`\u21B3 ${o}`));}catch{console.log(t.children);}if(t.props.property==="og:image:url"){let r=t.props.content;ii(r).then(o=>{let n=`font-size: 400px; padding: 10px; background: white url(${o}) no-repeat center; background-size: contain;`;console.log("%c\u2022 Share image preview",Ir),console.log("%c ",n),console.log(`\u21B3 ${r}`);}).catch(o=>{console.error(o);});}Object.entries(t.props).map(([r,o])=>{console.log(`\u21B3 ${r} \u2192 ${o}`);});}console.log(" ");});}async function ii(e){let o=await(await(await fetch(e)).blob()).arrayBuffer();return `data:image/png;base64,${ci(o)}`}function ci(e){let t="",r=new Uint8Array(e),o=r.byteLength;for(let n=0;n<o;n++)t+=String.fromCharCode(r[n]);return btoa(t)}var Ir,si,dn=wr(()=>{Ir="text-transform: uppercase;",si="text-transform: uppercase; font-weight: bold; text-transform: uppercase;font-weight: bold";});function me(e){let{type:t,data:r={},customData:o}=e,n=reactRouter.useLocation(),{publish:a,cart:s,prevCart:i,shop:c,customData:u}=Z(),d=n.pathname+n.search,y={...r,customData:{...u,...o},cart:s,prevCart:i,shop:c};return react.useEffect(()=>{c?.shopId&&(y={...y,url:window.location.href},a(t,y));},[a,d,c?.shopId]),null}function Dr(e){return jsxRuntime.jsx(me,{...e,type:"page_viewed"})}function Or(e){return jsxRuntime.jsx(me,{...e,type:"product_viewed"})}function _r(e){return jsxRuntime.jsx(me,{...e,type:"collection_viewed"})}function Ur(e){return jsxRuntime.jsx(me,{...e,type:"cart_viewed"})}function Lr(e){return jsxRuntime.jsx(me,{...e,type:"search_viewed"})}function kr(e){return jsxRuntime.jsx(me,{...e})}var G={PAGE_VIEWED:"page_viewed",PRODUCT_VIEWED:"product_viewed",COLLECTION_VIEWED:"collection_viewed",CART_VIEWED:"cart_viewed",SEARCH_VIEWED:"search_viewed",CART_UPDATED:"cart_updated",PRODUCT_ADD_TO_CART:"product_added_to_cart",PRODUCT_REMOVED_FROM_CART:"product_removed_from_cart",CUSTOM_EVENT:"custom_"};var Ee="Custom-Storefront-Request-Group-ID",be="X-Shopify-Storefront-Access-Token",Pt="X-SDK-Variant",vt="X-SDK-Variant-Source",It="X-SDK-Version",Ye="X-Shopify-Client-IP",ge="X-Shopify-Client-IP-Sig",Je="_sfapi_proxy",ze="_server_tracking";function hn(e){return Object.entries(e).map(([t,r])=>r?`${t};desc=${r}`:void 0).filter(Boolean).join(", ")}function we(e,t){let r=typeof t=="string"?t:hn(t);r&&e.headers.append("Server-Timing",r);}var An=["_y","_s","_cmp"];function Vr(e){let t={};if(!e)return t;let r=new RegExp(`\\b(${An.join("|")});desc="?([^",]+)"?`,"g"),o;for(;(o=r.exec(e))!==null;)t[o[1]]=o[2];return t}function Nr(e){if(typeof window>"u")return false;try{return !!window.performance.getEntriesByType("navigation")[0]?.serverTiming?.some(r=>r.name===e)}catch{return false}}function Mr(){return Nr(Je)}function Fr(){return Nr(ze)}var In="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.2/consent-tracking-api.js",En="https://cdn.shopify.com/shopifycloud/privacy-banner/storefront-banner.js";function bt(e){console.error(`[h2:error:useCustomerPrivacy] Unable to setup Customer Privacy API: Missing consent.${e} configuration.`);}function wt(e){let{withPrivacyBanner:t=false,onVisitorConsentCollected:r,onReady:o,checkoutDomain:n,storefrontAccessToken:a,country:s,locale:i,sameDomainForStorefrontApi:c}=e,u=react.useMemo(()=>c??Mr(),[c]),d=react.useMemo(()=>u&&!Fr(),[u]),y=hydrogenReact.useShopifyCookies({fetchTrackingValues:d,storefrontAccessToken:a,ignoreDeprecatedCookies:true}),m=react.useMemo(hydrogenReact.getTrackingValues,[y]),{revalidate:C}=reactRouter.useRevalidator();loadScript.useLoadScript(t?En:In,{attributes:{id:"customer-privacy-api"}});let{observing:p,setLoaded:l,apisLoaded:S}=wn({withPrivacyBanner:t}),f=react.useMemo(()=>{n||bt("checkoutDomain"),a||bt("storefrontAccessToken"),(a.startsWith("shpat_")||a.length!==32)&&console.error("[h2:error:useCustomerPrivacy] It looks like you passed a private access token, make sure to use the public token");let h=xn(n);return {checkoutRootDomain:u&&typeof window<"u"?window.location.host:n,storefrontRootDomain:h?"."+h:void 0,storefrontAccessToken:a,country:s,locale:i}},[bt,n,a,s,i]);react.useEffect(()=>{let h=T=>{let g=hydrogenReact.getTrackingValues();if((m.visitToken!==g.visitToken||m.uniqueToken!==g.uniqueToken)&&C().catch(()=>{console.warn("[h2:warn:useCustomerPrivacy] Revalidation failed after consent change.");}),r){let v=se();if(v?.shouldShowBanner()){let R=v.currentVisitorConsent();if(R&&R.marketing===""&&R.analytics===""&&R.preferences==="")return}r(T.detail);}};return document.addEventListener("visitorConsentCollected",h),()=>{document.removeEventListener("visitorConsentCollected",h);}},[r]),react.useEffect(()=>{if(!t||p.current.privacyBanner)return;p.current.privacyBanner=true;let h=window.privacyBanner||void 0;Object.defineProperty(window,"privacyBanner",{configurable:true,get(){return h},set(g){typeof g=="object"&&g!==null&&"showPreferences"in g&&"loadBanner"in g&&(h=qr({privacyBanner:g,config:f}),l.privacyBanner());}});},[t,f,qr,l.privacyBanner]),react.useEffect(()=>{if(p.current.customerPrivacy)return;p.current.customerPrivacy=true;let h=null,T=null,g=window.Shopify||void 0;Object.defineProperty(window,"Shopify",{configurable:true,get(){return g},set(v){typeof v=="object"&&v!==null&&Object.keys(v).length===0&&(g=v,h={backendConsentEnabled:true},Object.defineProperty(window.Shopify,"customerPrivacy",{configurable:true,get(){return T??h},set(R){if(typeof R=="object"&&R!==null&&"setTrackingConsent"in R){let U=R;T={...U,setTrackingConsent:$r({customerPrivacy:U,config:f})},g={...g,customerPrivacy:T},l.customerPrivacy();}}}));}});},[f,$r,l.customerPrivacy]),react.useEffect(()=>{if(!S||!y)return;let h=se();if(h&&!h.cachedConsent){let T=hydrogenReact.getTrackingValues();T.consent&&(h.cachedConsent=T.consent);}if(t){let T=xe();T&&T.loadBanner(f);}bn(),o?.();},[S,y]);let P={customerPrivacy:se()};return t&&(P.privacyBanner=xe()),P}var Hr=false;function bn(){if(Hr)return;Hr=true;let e=new CustomEvent("shopifyCustomerPrivacyApiLoaded");document.dispatchEvent(e);}function wn({withPrivacyBanner:e}){let t=react.useRef({customerPrivacy:false,privacyBanner:false}),[r,o]=react.useState(e?[false,false]:[false]),n=r.every(Boolean);return {observing:t,setLoaded:{customerPrivacy:()=>{o(e?s=>[true,s[1]]:()=>[true]);},privacyBanner:()=>{e&&o(s=>[s[0],true]);}},apisLoaded:n}}function xn(e){if(typeof window>"u")return;let t=window.location.host,r=e.split(".").reverse(),o=t.split(".").reverse(),n=[];return r.forEach((a,s)=>{a===o[s]&&n.push(a);}),n.reverse().join(".")||void 0}function $r({customerPrivacy:e,config:t}){let r=e.setTrackingConsent,{locale:o,country:n,...a}=t;function s(i,c){r({...a,headlessStorefront:true,...i},c);}return s}function qr({privacyBanner:e,config:t}){let r=e.loadBanner,o=e.showPreferences;function n(s){if(typeof s=="object"){r({...t,...s});return}r(t);}function a(s){if(typeof s=="object"){o({...t,...s});return}o(t);}return {loadBanner:n,showPreferences:a}}function se(){try{let e=window.Shopify?.customerPrivacy;return e&&"setTrackingConsent"in e?e:null}catch{return null}}function xe(){try{return window&&window?.privacyBanner?window.privacyBanner:null}catch{return null}}var Gr="2026.4.3";function kn(){let e=se();if(!e)throw new Error("Shopify Customer Privacy API not available. Must be used within a useEffect. Make sure to load the Shopify Customer Privacy API with useCustomerPrivacy() or <AnalyticsProvider>.");return e}function Qr({consent:e,onReady:t,domain:r}){let{subscribe:o,register:n,canTrack:a}=Z(),[s,i]=react.useState(false),[c,u]=react.useState(false),[d,y]=react.useState(""),m=react.useRef(false),{checkoutDomain:C,storefrontAccessToken:p,language:l}=e,{ready:S}=n("Internal_Shopify_Analytics");wt({...e,locale:l,checkoutDomain:C||"mock.shop",storefrontAccessToken:p||"abcdefghijklmnopqrstuvwxyz123456",onReady:()=>!e.withPrivacyBanner&&u(true),onVisitorConsentCollected:P=>{try{y(JSON.stringify(P));}catch{}u(true);}});let f=react.useMemo(()=>c?a():true,[c,a,d]);return hydrogenReact.useShopifyCookies({hasUserConsent:f,domain:r,checkoutDomain:C,fetchTrackingValues:false,ignoreDeprecatedCookies:!c}),react.useEffect(()=>{m.current||(m.current=true,o(G.PAGE_VIEWED,Nn),o(G.PRODUCT_VIEWED,Mn),o(G.COLLECTION_VIEWED,Fn),o(G.SEARCH_VIEWED,Hn),o(G.PRODUCT_ADD_TO_CART,$n),i(true));},[o]),react.useEffect(()=>{s&&c&&(S(),t());},[s,c,t]),null}function et(e){console.error(`[h2:error:ShopifyAnalytics] Unable to send Shopify analytics: Missing shop.${e} configuration.`);}function _e(e){let t=kn(),r=t.analyticsProcessingAllowed();if(!e?.shop?.shopId){et("shopId");return}if(!e?.shop?.acceptedLanguage){et("acceptedLanguage");return}if(!e?.shop?.currency){et("currency");return}if(!e?.shop?.hydrogenSubchannelId){et("hydrogenSubchannelId");return}return {shopifySalesChannel:"hydrogen",assetVersionId:Gr,...e.shop,hasUserConsent:r,...hydrogenReact.getClientBrowserParameters(),analyticsAllowed:t.analyticsProcessingAllowed(),marketingAllowed:t.marketingAllowed(),saleOfDataAllowed:t.saleOfDataAllowed(),ccpaEnforced:!t.saleOfDataAllowed(),gdprEnforced:!(t.marketingAllowed()&&t.analyticsProcessingAllowed())}}function Vn(e,t){if(t===null)return;let r=_e(e);return r?{...r,cartId:t.id}:void 0}var ie={};function Nn(e){let t=_e(e);t&&(hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PAGE_VIEW_2,payload:{...t,...ie}}),ie={});}function Mn(e){let t=_e(e);if(t&&Wr({type:"product",products:e.products})){let r=Dt(e.products);ie={pageType:hydrogenReact.AnalyticsPageType.product,resourceId:r[0].productGid},t={...t,...ie,products:Dt(e.products)},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PRODUCT_VIEW,payload:t});}}function Fn(e){let t=_e(e);t&&(ie={pageType:hydrogenReact.AnalyticsPageType.collection,resourceId:e.collection.id},t={...t,...ie,collectionHandle:e.collection.handle,collectionId:e.collection.id},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.COLLECTION_VIEW,payload:t}));}function Hn(e){let t=_e(e);t&&(ie={pageType:hydrogenReact.AnalyticsPageType.search},t={...t,...ie,searchString:e.searchTerm},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.SEARCH_VIEW,payload:t}));}function $n(e){let{cart:t,currentLine:r}=e,o=Vn(e,t);!o||!r?.id||qn({matchedLine:r,eventPayload:o});}function qn({matchedLine:e,eventPayload:t}){let r={id:e.merchandise.product.id,variantId:e.merchandise.id,title:e.merchandise.product.title,variantTitle:e.merchandise.title,vendor:e.merchandise.product.vendor,price:e.merchandise.price.amount,quantity:e.quantity,productType:e.merchandise.product.productType,sku:e.merchandise.sku};Wr({type:"cart",products:[r]})&&hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.ADD_TO_CART,payload:{...t,products:Dt([r])}});}function pe(e,t,r,o){if(e==="cart"){let n=`${r?"merchandise":"merchandise.product"}.${t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up cart analytics events because the \`cart.lines[].${n}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartLine on CartLine\` is defined and make sure \`${n}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L25-L56.`);}else {let n=`${o||t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up product view analytics events because the \`${n}\` is missing from your \`<Analytics.ProductView>\`. Make sure \`${n}\` is part of your products data prop. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/routes/products.%24handle.tsx#L159-L165.`);}}function Wr({type:e,products:t}){return !t||t.length===0?(pe(e,"",false,"data.products"),false):(t.forEach(r=>{if(!r.id)return pe(e,"id",false),false;if(!r.title)return pe(e,"title",false),false;if(!r.price)return pe(e,"price.amount",true,"price"),false;if(!r.vendor)return pe(e,"vendor",false),false;if(!r.variantId)return pe(e,"id",true,"variantId"),false;if(!r.variantTitle)return pe(e,"title",true,"variantTitle"),false}),true)}function Dt(e){return e.map(t=>{let r={productGid:t.id,variantGid:t.variantId,name:t.title,variantName:t.variantTitle,brand:t.vendor,price:t.price,quantity:t.quantity||1,category:t.productType};return t.sku&&(r.sku=t.sku),t.productType&&(r.category=t.productType),r})}function Yr(e){console.error(`[h2:error:CartAnalytics] Can't set up cart analytics events because the \`cart.${e}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartApiQuery on Cart\` is defined and make sure \`${e}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L59.`);}function Jr({cart:e,setCarts:t}){let{publish:r,shop:o,customData:n,canTrack:a,cart:s,prevCart:i}=Z(),c=react.useRef(null);return react.useEffect(()=>{if(e)return Promise.resolve(e).then(u=>{if(u&&u.lines){if(!u.id){Yr("id");return}if(!u.updatedAt){Yr("updatedAt");return}}t(({cart:d,prevCart:y})=>u?.updatedAt!==d?.updatedAt?{cart:u,prevCart:d}:{cart:d,prevCart:y});}),()=>{}},[t,e]),react.useEffect(()=>{if(!s||!s?.updatedAt||s?.updatedAt===i?.updatedAt)return;let u;try{u=JSON.parse(localStorage.getItem("cartLastUpdatedAt")||"");}catch{u=null;}if(s.id===u?.id&&s.updatedAt===u?.updatedAt)return;let d={eventTimestamp:Date.now(),cart:s,prevCart:i,shop:o,customData:n};if(s.updatedAt===c.current)return;c.current=s.updatedAt,r("cart_updated",d),localStorage.setItem("cartLastUpdatedAt",JSON.stringify({id:s.id,updatedAt:s.updatedAt}));let y=i?.lines?hydrogenReact.flattenConnection(i?.lines):[],m=s.lines?hydrogenReact.flattenConnection(s.lines):[];y?.forEach(C=>{let p=m.filter(l=>C.id===l.id);if(p?.length===1){let l=p[0];C.quantity<l.quantity?r("product_added_to_cart",{...d,prevLine:C,currentLine:l}):C.quantity>l.quantity&&r("product_removed_from_cart",{...d,prevLine:C,currentLine:l});}else r("product_removed_from_cart",{...d,prevLine:C});}),m?.forEach(C=>{let p=y.filter(l=>C.id===l.id);(!p||p.length===0)&&r("product_added_to_cart",{...d,currentLine:C});});},[s,i,r,o,n,a]),null}var Kn="https://cdn.shopify.com/shopifycloud/perf-kit/shopify-perf-kit-spa.min.js";function zr({shop:e}){let t=react.useRef(false),{subscribe:r,register:o}=Z(),{ready:n}=o("Internal_Shopify_Perf_Kit"),a=hydrogenReact.useLoadScript(Kn,{attributes:{id:"perfkit","data-application":"hydrogen","data-shop-id":hydrogenReact.parseGid(e.shopId).id.toString(),"data-storefront-id":e.hydrogenSubchannelId,"data-monorail-region":"global","data-spa-mode":"true","data-resource-timing-sampling-rate":"100"}});return react.useEffect(()=>{a!=="done"||t.current||(t.current=true,r(G.PAGE_VIEWED,()=>{window.PerfKit?.navigate();}),r(G.PRODUCT_VIEWED,()=>{window.PerfKit?.setPageType("product");}),r(G.COLLECTION_VIEWED,()=>{window.PerfKit?.setPageType("collection");}),r(G.SEARCH_VIEWED,()=>{window.PerfKit?.setPageType("search");}),r(G.CART_VIEWED,()=>{window.PerfKit?.setPageType("cart");}),n());},[r,n,a]),null}var Xr=new Set,ee=e=>{Xr.has(e)||(console.warn(e),Xr.add(e));},Zr=new Set,_t=e=>{Zr.has(e)||(console.error(new Error(e)),Zr.add(e));};var Zn={canTrack:()=>false,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},ao=react.createContext(Zn),rt=new Map,Le={};function so(){return Object.values(Le).every(Boolean)}function eo(e,t){rt.has(e)||rt.set(e,new Map),rt.get(e)?.set(t.toString(),t);}var ot=new Map;function to(e,t){if(!so()){ot.set(e,t);return}io(e,t);}function io(e,t){(rt.get(e)??new Map).forEach((r,o)=>{try{r(t);}catch(n){typeof n=="object"&&n instanceof Error?console.error("Analytics publish error",n.message,o,n.stack):console.error("Analytics publish error",n,o);}});}function ro(e){return Le.hasOwnProperty(e)||(Le[e]=false),{ready:()=>{Le[e]=true,so()&&ot.size>0&&(ot.forEach((t,r)=>{io(r,t);}),ot.clear());}}}function oo(){try{return window.Shopify.customerPrivacy?.analyticsProcessingAllowed?.()??!1}catch{}return false}function no(e,t){return `[h2:error:Analytics.Provider] - ${e} is required. Make sure ${t} is defined in your environment variables. See https://h2o.fyi/analytics/consent to learn how to setup environment variables in the Shopify admin.`}function ea({canTrack:e,cart:t,children:r,consent:o,customData:n={},shop:a=null,cookieDomain:s}){let{shop:i}=ta(a),[c,u]=react.useState(!!e),[d,y]=react.useState(false),[m,C]=react.useState({cart:null,prevCart:null}),[p,l]=react.useState(e?()=>e:()=>oo);if(i)if(/\/68817551382$/.test(i.shopId))ee("[h2:error:Analytics.Provider] - Mock shop is used. Analytics will not work properly.");else {if(!o.checkoutDomain){let f=no("consent.checkoutDomain","PUBLIC_CHECKOUT_DOMAIN");_t(f);}if(!o.storefrontAccessToken){let f=no("consent.storefrontAccessToken","PUBLIC_STOREFRONT_API_TOKEN");_t(f);}o?.country||(o.country="US"),o?.language||(o.language="EN"),o.withPrivacyBanner===void 0&&(o.withPrivacyBanner=false);}let S=react.useMemo(()=>({canTrack:p,...m,customData:n,publish:p()?to:()=>{},shop:i,subscribe:eo,register:ro,customerPrivacy:se(),privacyBanner:xe()}),[c,p,m,m.cart?.updatedAt,m.prevCart,to,eo,n,i,ro,JSON.stringify(Le),se,xe]);return jsxRuntime.jsxs(ao.Provider,{value:S,children:[r,!!i&&jsxRuntime.jsx(Dr,{}),!!i&&!!t&&jsxRuntime.jsx(Jr,{cart:t,setCarts:C}),!!i&&jsxRuntime.jsx(Qr,{consent:o,onReady:()=>{u(true),l(e?()=>e:()=>oo),y(true);},domain:s}),!!i&&d&&jsxRuntime.jsx(zr,{shop:i})]})}function Z(){let e=react.useContext(ao);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of <AnalyticsProvider/>");return e}function ta(e){let[t,r]=react.useState(null);return react.useEffect(()=>(Promise.resolve(e).then(r),()=>{}),[r,e]),{shop:t}}async function ra({storefront:e,publicStorefrontId:t="0"}){return e.query(oa,{cache:e.CacheLong()}).then(({shop:r,localization:o})=>({shopId:r.id,acceptedLanguage:o.language.isoCode,currency:o.country.currency.isoCode,hydrogenSubchannelId:t}))}var oa=`#graphql
1
+ 'use strict';var react=require('react'),reactRouter=require('react-router'),jsxRuntime=require('react/jsx-runtime'),hydrogenReact=require('@shopify/hydrogen-react'),loadScript=require('@shopify/hydrogen-react/load-script'),graphqlClient=require('@shopify/graphql-client'),cookie=require('worktop/cookie'),gs=require('content-security-policy-builder');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var gs__default=/*#__PURE__*/_interopDefault(gs);var mn=Object.defineProperty;var wr=(e,t)=>()=>(e&&(t=e(e=0)),t);var xr=(e,t)=>{for(var r in t)mn(e,r,{get:t[r],enumerable:true});};var Qo={};xr(Qo,{VIRTUAL_ROUTES_DIR:()=>Be,VIRTUAL_ROUTES_DIR_PARTS:()=>Go,VIRTUAL_ROUTES_ROUTES_DIR_PARTS:()=>Qe,createVirtualRoutesPath:()=>Bo,getVirtualRoutesV3:()=>Is});function Bo(e,t,r){let o=new URL("../",e),n=t.reduce((s,i)=>new URL(`${i}/`,s),o),a=new URL(r,n).pathname.replace(/^\/[a-zA-Z]:\//,"/");return decodeURIComponent(a)}function Ge(e,t){return Bo((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)),e,t)}async function Is(){return {routes:[{id:`${Be}/graphiql`,path:"graphiql",file:Ge(Qe,"graphiql.jsx"),index:false},{id:`${Be}/subrequest-profiler`,path:"subrequest-profiler",file:Ge(Qe,"subrequest-profiler.jsx"),index:false},{id:`${Be}/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json`,path:".well-known/appspecific/com.chrome.devtools.json",file:Ge(Qe,"[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx"),index:false},{id:`${Be}/index`,path:"",file:Ge(Qe,"index.jsx"),index:true}],layout:{file:Ge(Go,"layout.jsx")}}}var Be,Qe,Go;var un={};xr(un,{default:()=>sn,logSeoTags:()=>cn});function sn({headTags:e}){return cn(e),null}function cn(e){console.log(" "),console.log("%cSEO Meta Tags",`${si}`),console.log(" "),e.forEach(t=>{if(t.tag==="script"){if(console.log("%c\u2022 JSON LD ",Ir),t.children)try{console.table(JSON.parse(t.children),["name","content"]);}catch{console.log(t.children);}}else {if(console.log(`%c\u2022 ${t.tag} `,Ir),t.children)if(typeof t.children=="string")console.log(`\u21B3 ${t.children}`);else try{Object.entries(JSON.parse(t.children)).map(([r,o])=>console.log(`\u21B3 ${o}`));}catch{console.log(t.children);}if(t.props.property==="og:image:url"){let r=t.props.content;ii(r).then(o=>{let n=`font-size: 400px; padding: 10px; background: white url(${o}) no-repeat center; background-size: contain;`;console.log("%c\u2022 Share image preview",Ir),console.log("%c ",n),console.log(`\u21B3 ${r}`);}).catch(o=>{console.error(o);});}Object.entries(t.props).map(([r,o])=>{console.log(`\u21B3 ${r} \u2192 ${o}`);});}console.log(" ");});}async function ii(e){let o=await(await(await fetch(e)).blob()).arrayBuffer();return `data:image/png;base64,${ci(o)}`}function ci(e){let t="",r=new Uint8Array(e),o=r.byteLength;for(let n=0;n<o;n++)t+=String.fromCharCode(r[n]);return btoa(t)}var Ir,si,dn=wr(()=>{Ir="text-transform: uppercase;",si="text-transform: uppercase; font-weight: bold; text-transform: uppercase;font-weight: bold";});function me(e){let{type:t,data:r={},customData:o}=e,n=reactRouter.useLocation(),{publish:a,cart:s,prevCart:i,shop:c,customData:u}=Z(),d=n.pathname+n.search,y={...r,customData:{...u,...o},cart:s,prevCart:i,shop:c};return react.useEffect(()=>{c?.shopId&&(y={...y,url:window.location.href},a(t,y));},[a,d,c?.shopId]),null}function Dr(e){return jsxRuntime.jsx(me,{...e,type:"page_viewed"})}function Or(e){return jsxRuntime.jsx(me,{...e,type:"product_viewed"})}function _r(e){return jsxRuntime.jsx(me,{...e,type:"collection_viewed"})}function Ur(e){return jsxRuntime.jsx(me,{...e,type:"cart_viewed"})}function Lr(e){return jsxRuntime.jsx(me,{...e,type:"search_viewed"})}function kr(e){return jsxRuntime.jsx(me,{...e})}var G={PAGE_VIEWED:"page_viewed",PRODUCT_VIEWED:"product_viewed",COLLECTION_VIEWED:"collection_viewed",CART_VIEWED:"cart_viewed",SEARCH_VIEWED:"search_viewed",CART_UPDATED:"cart_updated",PRODUCT_ADD_TO_CART:"product_added_to_cart",PRODUCT_REMOVED_FROM_CART:"product_removed_from_cart",CUSTOM_EVENT:"custom_"};var Ee="Custom-Storefront-Request-Group-ID",be="X-Shopify-Storefront-Access-Token",Pt="X-SDK-Variant",vt="X-SDK-Variant-Source",It="X-SDK-Version",Ye="X-Shopify-Client-IP",ge="X-Shopify-Client-IP-Sig",Je="_sfapi_proxy",ze="_server_tracking";function hn(e){return Object.entries(e).map(([t,r])=>r?`${t};desc=${r}`:void 0).filter(Boolean).join(", ")}function we(e,t){let r=typeof t=="string"?t:hn(t);r&&e.headers.append("Server-Timing",r);}var An=["_y","_s","_cmp"];function Vr(e){let t={};if(!e)return t;let r=new RegExp(`\\b(${An.join("|")});desc="?([^",]+)"?`,"g"),o;for(;(o=r.exec(e))!==null;)t[o[1]]=o[2];return t}function Nr(e){if(typeof window>"u")return false;try{return !!window.performance.getEntriesByType("navigation")[0]?.serverTiming?.some(r=>r.name===e)}catch{return false}}function Mr(){return Nr(Je)}function Fr(){return Nr(ze)}var In="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.2/consent-tracking-api.js",En="https://cdn.shopify.com/shopifycloud/privacy-banner/storefront-banner.js";function bt(e){console.error(`[h2:error:useCustomerPrivacy] Unable to setup Customer Privacy API: Missing consent.${e} configuration.`);}function wt(e){let{withPrivacyBanner:t=false,onVisitorConsentCollected:r,onReady:o,checkoutDomain:n,storefrontAccessToken:a,country:s,locale:i,sameDomainForStorefrontApi:c}=e,u=react.useMemo(()=>c??Mr(),[c]),d=react.useMemo(()=>u&&!Fr(),[u]),y=hydrogenReact.useShopifyCookies({fetchTrackingValues:d,storefrontAccessToken:a,ignoreDeprecatedCookies:true}),m=react.useMemo(hydrogenReact.getTrackingValues,[y]),{revalidate:C}=reactRouter.useRevalidator();loadScript.useLoadScript(t?En:In,{attributes:{id:"customer-privacy-api"}});let{observing:p,setLoaded:l,apisLoaded:S}=wn({withPrivacyBanner:t}),f=react.useMemo(()=>{n||bt("checkoutDomain"),a||bt("storefrontAccessToken"),(a.startsWith("shpat_")||a.length!==32)&&console.error("[h2:error:useCustomerPrivacy] It looks like you passed a private access token, make sure to use the public token");let h=xn(n);return {checkoutRootDomain:u&&typeof window<"u"?window.location.host:n,storefrontRootDomain:h?"."+h:void 0,storefrontAccessToken:a,country:s,locale:i}},[bt,n,a,s,i]);react.useEffect(()=>{let h=T=>{let g=hydrogenReact.getTrackingValues();if((m.visitToken!==g.visitToken||m.uniqueToken!==g.uniqueToken)&&C().catch(()=>{console.warn("[h2:warn:useCustomerPrivacy] Revalidation failed after consent change.");}),r){let v=se();if(v?.shouldShowBanner()){let R=v.currentVisitorConsent();if(R&&R.marketing===""&&R.analytics===""&&R.preferences==="")return}r(T.detail);}};return document.addEventListener("visitorConsentCollected",h),()=>{document.removeEventListener("visitorConsentCollected",h);}},[r]),react.useEffect(()=>{if(!t||p.current.privacyBanner)return;p.current.privacyBanner=true;let h=window.privacyBanner||void 0;Object.defineProperty(window,"privacyBanner",{configurable:true,get(){return h},set(g){typeof g=="object"&&g!==null&&"showPreferences"in g&&"loadBanner"in g&&(h=qr({privacyBanner:g,config:f}),l.privacyBanner());}});},[t,f,qr,l.privacyBanner]),react.useEffect(()=>{if(p.current.customerPrivacy)return;p.current.customerPrivacy=true;let h=null,T=null,g=window.Shopify||void 0;Object.defineProperty(window,"Shopify",{configurable:true,get(){return g},set(v){typeof v=="object"&&v!==null&&Object.keys(v).length===0&&(g=v,h={backendConsentEnabled:true},Object.defineProperty(window.Shopify,"customerPrivacy",{configurable:true,get(){return T??h},set(R){if(typeof R=="object"&&R!==null&&"setTrackingConsent"in R){let U=R;T={...U,setTrackingConsent:$r({customerPrivacy:U,config:f})},g={...g,customerPrivacy:T},l.customerPrivacy();}}}));}});},[f,$r,l.customerPrivacy]),react.useEffect(()=>{if(!S||!y)return;let h=se();if(h&&!h.cachedConsent){let T=hydrogenReact.getTrackingValues();T.consent&&(h.cachedConsent=T.consent);}if(t){let T=xe();T&&T.loadBanner(f);}bn(),o?.();},[S,y]);let P={customerPrivacy:se()};return t&&(P.privacyBanner=xe()),P}var Hr=false;function bn(){if(Hr)return;Hr=true;let e=new CustomEvent("shopifyCustomerPrivacyApiLoaded");document.dispatchEvent(e);}function wn({withPrivacyBanner:e}){let t=react.useRef({customerPrivacy:false,privacyBanner:false}),[r,o]=react.useState(e?[false,false]:[false]),n=r.every(Boolean);return {observing:t,setLoaded:{customerPrivacy:()=>{o(e?s=>[true,s[1]]:()=>[true]);},privacyBanner:()=>{e&&o(s=>[s[0],true]);}},apisLoaded:n}}function xn(e){if(typeof window>"u")return;let t=window.location.host,r=e.split(".").reverse(),o=t.split(".").reverse(),n=[];return r.forEach((a,s)=>{a===o[s]&&n.push(a);}),n.reverse().join(".")||void 0}function $r({customerPrivacy:e,config:t}){let r=e.setTrackingConsent,{locale:o,country:n,...a}=t;function s(i,c){r({...a,headlessStorefront:true,...i},c);}return s}function qr({privacyBanner:e,config:t}){let r=e.loadBanner,o=e.showPreferences;function n(s){if(typeof s=="object"){r({...t,...s});return}r(t);}function a(s){if(typeof s=="object"){o({...t,...s});return}o(t);}return {loadBanner:n,showPreferences:a}}function se(){try{let e=window.Shopify?.customerPrivacy;return e&&"setTrackingConsent"in e?e:null}catch{return null}}function xe(){try{return window&&window?.privacyBanner?window.privacyBanner:null}catch{return null}}var Gr="2026.4.4";function kn(){let e=se();if(!e)throw new Error("Shopify Customer Privacy API not available. Must be used within a useEffect. Make sure to load the Shopify Customer Privacy API with useCustomerPrivacy() or <AnalyticsProvider>.");return e}function Qr({consent:e,onReady:t,domain:r}){let{subscribe:o,register:n,canTrack:a}=Z(),[s,i]=react.useState(false),[c,u]=react.useState(false),[d,y]=react.useState(""),m=react.useRef(false),{checkoutDomain:C,storefrontAccessToken:p,language:l}=e,{ready:S}=n("Internal_Shopify_Analytics");wt({...e,locale:l,checkoutDomain:C||"mock.shop",storefrontAccessToken:p||"abcdefghijklmnopqrstuvwxyz123456",onReady:()=>!e.withPrivacyBanner&&u(true),onVisitorConsentCollected:P=>{try{y(JSON.stringify(P));}catch{}u(true);}});let f=react.useMemo(()=>c?a():true,[c,a,d]);return hydrogenReact.useShopifyCookies({hasUserConsent:f,domain:r,checkoutDomain:C,fetchTrackingValues:false,ignoreDeprecatedCookies:!c}),react.useEffect(()=>{m.current||(m.current=true,o(G.PAGE_VIEWED,Nn),o(G.PRODUCT_VIEWED,Mn),o(G.COLLECTION_VIEWED,Fn),o(G.SEARCH_VIEWED,Hn),o(G.PRODUCT_ADD_TO_CART,$n),i(true));},[o]),react.useEffect(()=>{s&&c&&(S(),t());},[s,c,t]),null}function et(e){console.error(`[h2:error:ShopifyAnalytics] Unable to send Shopify analytics: Missing shop.${e} configuration.`);}function _e(e){let t=kn(),r=t.analyticsProcessingAllowed();if(!e?.shop?.shopId){et("shopId");return}if(!e?.shop?.acceptedLanguage){et("acceptedLanguage");return}if(!e?.shop?.currency){et("currency");return}if(!e?.shop?.hydrogenSubchannelId){et("hydrogenSubchannelId");return}return {shopifySalesChannel:"hydrogen",assetVersionId:Gr,...e.shop,hasUserConsent:r,...hydrogenReact.getClientBrowserParameters(),analyticsAllowed:t.analyticsProcessingAllowed(),marketingAllowed:t.marketingAllowed(),saleOfDataAllowed:t.saleOfDataAllowed(),ccpaEnforced:!t.saleOfDataAllowed(),gdprEnforced:!(t.marketingAllowed()&&t.analyticsProcessingAllowed())}}function Vn(e,t){if(t===null)return;let r=_e(e);return r?{...r,cartId:t.id}:void 0}var ie={};function Nn(e){let t=_e(e);t&&(hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PAGE_VIEW_2,payload:{...t,...ie}}),ie={});}function Mn(e){let t=_e(e);if(t&&Wr({type:"product",products:e.products})){let r=Dt(e.products);ie={pageType:hydrogenReact.AnalyticsPageType.product,resourceId:r[0].productGid},t={...t,...ie,products:Dt(e.products)},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.PRODUCT_VIEW,payload:t});}}function Fn(e){let t=_e(e);t&&(ie={pageType:hydrogenReact.AnalyticsPageType.collection,resourceId:e.collection.id},t={...t,...ie,collectionHandle:e.collection.handle,collectionId:e.collection.id},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.COLLECTION_VIEW,payload:t}));}function Hn(e){let t=_e(e);t&&(ie={pageType:hydrogenReact.AnalyticsPageType.search},t={...t,...ie,searchString:e.searchTerm},hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.SEARCH_VIEW,payload:t}));}function $n(e){let{cart:t,currentLine:r}=e,o=Vn(e,t);!o||!r?.id||qn({matchedLine:r,eventPayload:o});}function qn({matchedLine:e,eventPayload:t}){let r={id:e.merchandise.product.id,variantId:e.merchandise.id,title:e.merchandise.product.title,variantTitle:e.merchandise.title,vendor:e.merchandise.product.vendor,price:e.merchandise.price.amount,quantity:e.quantity,productType:e.merchandise.product.productType,sku:e.merchandise.sku};Wr({type:"cart",products:[r]})&&hydrogenReact.sendShopifyAnalytics({eventName:hydrogenReact.AnalyticsEventName.ADD_TO_CART,payload:{...t,products:Dt([r])}});}function pe(e,t,r,o){if(e==="cart"){let n=`${r?"merchandise":"merchandise.product"}.${t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up cart analytics events because the \`cart.lines[].${n}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartLine on CartLine\` is defined and make sure \`${n}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L25-L56.`);}else {let n=`${o||t}`;console.error(`[h2:error:ShopifyAnalytics] Can't set up product view analytics events because the \`${n}\` is missing from your \`<Analytics.ProductView>\`. Make sure \`${n}\` is part of your products data prop. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/routes/products.%24handle.tsx#L159-L165.`);}}function Wr({type:e,products:t}){return !t||t.length===0?(pe(e,"",false,"data.products"),false):(t.forEach(r=>{if(!r.id)return pe(e,"id",false),false;if(!r.title)return pe(e,"title",false),false;if(!r.price)return pe(e,"price.amount",true,"price"),false;if(!r.vendor)return pe(e,"vendor",false),false;if(!r.variantId)return pe(e,"id",true,"variantId"),false;if(!r.variantTitle)return pe(e,"title",true,"variantTitle"),false}),true)}function Dt(e){return e.map(t=>{let r={productGid:t.id,variantGid:t.variantId,name:t.title,variantName:t.variantTitle,brand:t.vendor,price:t.price,quantity:t.quantity||1,category:t.productType};return t.sku&&(r.sku=t.sku),t.productType&&(r.category=t.productType),r})}function Yr(e){console.error(`[h2:error:CartAnalytics] Can't set up cart analytics events because the \`cart.${e}\` value is missing from your GraphQL cart query. In your project, search for where \`fragment CartApiQuery on Cart\` is defined and make sure \`${e}\` is part of your cart query. Check the Hydrogen Skeleton template for reference: https://github.com/Shopify/hydrogen/blob/main/templates/skeleton/app/lib/fragments.ts#L59.`);}function Jr({cart:e,setCarts:t}){let{publish:r,shop:o,customData:n,canTrack:a,cart:s,prevCart:i}=Z(),c=react.useRef(null);return react.useEffect(()=>{if(e)return Promise.resolve(e).then(u=>{if(u&&u.lines){if(!u.id){Yr("id");return}if(!u.updatedAt){Yr("updatedAt");return}}t(({cart:d,prevCart:y})=>u?.updatedAt!==d?.updatedAt?{cart:u,prevCart:d}:{cart:d,prevCart:y});}),()=>{}},[t,e]),react.useEffect(()=>{if(!s||!s?.updatedAt||s?.updatedAt===i?.updatedAt)return;let u;try{u=JSON.parse(localStorage.getItem("cartLastUpdatedAt")||"");}catch{u=null;}if(s.id===u?.id&&s.updatedAt===u?.updatedAt)return;let d={eventTimestamp:Date.now(),cart:s,prevCart:i,shop:o,customData:n};if(s.updatedAt===c.current)return;c.current=s.updatedAt,r("cart_updated",d),localStorage.setItem("cartLastUpdatedAt",JSON.stringify({id:s.id,updatedAt:s.updatedAt}));let y=i?.lines?hydrogenReact.flattenConnection(i?.lines):[],m=s.lines?hydrogenReact.flattenConnection(s.lines):[];y?.forEach(C=>{let p=m.filter(l=>C.id===l.id);if(p?.length===1){let l=p[0];C.quantity<l.quantity?r("product_added_to_cart",{...d,prevLine:C,currentLine:l}):C.quantity>l.quantity&&r("product_removed_from_cart",{...d,prevLine:C,currentLine:l});}else r("product_removed_from_cart",{...d,prevLine:C});}),m?.forEach(C=>{let p=y.filter(l=>C.id===l.id);(!p||p.length===0)&&r("product_added_to_cart",{...d,currentLine:C});});},[s,i,r,o,n,a]),null}var Kn="https://cdn.shopify.com/shopifycloud/perf-kit/shopify-perf-kit-spa.min.js";function zr({shop:e}){let t=react.useRef(false),{subscribe:r,register:o}=Z(),{ready:n}=o("Internal_Shopify_Perf_Kit"),a=hydrogenReact.useLoadScript(Kn,{attributes:{id:"perfkit","data-application":"hydrogen","data-shop-id":hydrogenReact.parseGid(e.shopId).id.toString(),"data-storefront-id":e.hydrogenSubchannelId,"data-monorail-region":"global","data-spa-mode":"true","data-resource-timing-sampling-rate":"10"}});return react.useEffect(()=>{a!=="done"||t.current||(t.current=true,r(G.PAGE_VIEWED,()=>{window.PerfKit?.navigate();}),r(G.PRODUCT_VIEWED,()=>{window.PerfKit?.setPageType("product");}),r(G.COLLECTION_VIEWED,()=>{window.PerfKit?.setPageType("collection");}),r(G.SEARCH_VIEWED,()=>{window.PerfKit?.setPageType("search");}),r(G.CART_VIEWED,()=>{window.PerfKit?.setPageType("cart");}),n());},[r,n,a]),null}var Xr=new Set,ee=e=>{Xr.has(e)||(console.warn(e),Xr.add(e));},Zr=new Set,_t=e=>{Zr.has(e)||(console.error(new Error(e)),Zr.add(e));};var Zn={canTrack:()=>false,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},ao=react.createContext(Zn),rt=new Map,Le={};function so(){return Object.values(Le).every(Boolean)}function eo(e,t){rt.has(e)||rt.set(e,new Map),rt.get(e)?.set(t.toString(),t);}var ot=new Map;function to(e,t){if(!so()){ot.set(e,t);return}io(e,t);}function io(e,t){(rt.get(e)??new Map).forEach((r,o)=>{try{r(t);}catch(n){typeof n=="object"&&n instanceof Error?console.error("Analytics publish error",n.message,o,n.stack):console.error("Analytics publish error",n,o);}});}function ro(e){return Le.hasOwnProperty(e)||(Le[e]=false),{ready:()=>{Le[e]=true,so()&&ot.size>0&&(ot.forEach((t,r)=>{io(r,t);}),ot.clear());}}}function oo(){try{return window.Shopify.customerPrivacy?.analyticsProcessingAllowed?.()??!1}catch{}return false}function no(e,t){return `[h2:error:Analytics.Provider] - ${e} is required. Make sure ${t} is defined in your environment variables. See https://h2o.fyi/analytics/consent to learn how to setup environment variables in the Shopify admin.`}function ea({canTrack:e,cart:t,children:r,consent:o,customData:n={},shop:a=null,cookieDomain:s}){let{shop:i}=ta(a),[c,u]=react.useState(!!e),[d,y]=react.useState(false),[m,C]=react.useState({cart:null,prevCart:null}),[p,l]=react.useState(e?()=>e:()=>oo);if(i)if(/\/68817551382$/.test(i.shopId))ee("[h2:error:Analytics.Provider] - Mock shop is used. Analytics will not work properly.");else {if(!o.checkoutDomain){let f=no("consent.checkoutDomain","PUBLIC_CHECKOUT_DOMAIN");_t(f);}if(!o.storefrontAccessToken){let f=no("consent.storefrontAccessToken","PUBLIC_STOREFRONT_API_TOKEN");_t(f);}o?.country||(o.country="US"),o?.language||(o.language="EN"),o.withPrivacyBanner===void 0&&(o.withPrivacyBanner=false);}let S=react.useMemo(()=>({canTrack:p,...m,customData:n,publish:p()?to:()=>{},shop:i,subscribe:eo,register:ro,customerPrivacy:se(),privacyBanner:xe()}),[c,p,m,m.cart?.updatedAt,m.prevCart,to,eo,n,i,ro,JSON.stringify(Le),se,xe]);return jsxRuntime.jsxs(ao.Provider,{value:S,children:[r,!!i&&jsxRuntime.jsx(Dr,{}),!!i&&!!t&&jsxRuntime.jsx(Jr,{cart:t,setCarts:C}),!!i&&jsxRuntime.jsx(Qr,{consent:o,onReady:()=>{u(true),l(e?()=>e:()=>oo),y(true);},domain:s}),!!i&&d&&jsxRuntime.jsx(zr,{shop:i})]})}function Z(){let e=react.useContext(ao);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of <AnalyticsProvider/>");return e}function ta(e){let[t,r]=react.useState(null);return react.useEffect(()=>(Promise.resolve(e).then(r),()=>{}),[r,e]),{shop:t}}async function ra({storefront:e,publicStorefrontId:t="0"}){return e.query(oa,{cache:e.CacheLong()}).then(({shop:r,localization:o})=>({shopId:r.id,acceptedLanguage:o.language.isoCode,currency:o.country.currency.isoCode,hydrogenSubchannelId:t}))}var oa=`#graphql
2
2
  query ShopData(
3
3
  $country: CountryCode
4
4
  $language: LanguageCode
@@ -20,7 +20,7 @@
20
20
  `,na={CartView:Ur,CollectionView:_r,CustomView:kr,ProductView:Or,Provider:ea,SearchView:Lr};function Y(e,t){return Ut(e.headers,t)}function Ut(e,t){let r=e?.get?.(t)??e?.[t];return typeof r=="string"?r:null}function ce(e){return {requestId:e?Y(e,"request-id"):void 0,purpose:e?Y(e,"purpose"):void 0}}function co(e){return {requestGroupId:Y(e,"request-id"),buyerIp:Y(e,"oxygen-buyer-ip"),buyerIpSig:Y(e,ge),cookie:Y(e,"cookie"),purpose:Y(e,"sec-purpose")||Y(e,"purpose")}}var Lt=/^\/api\/(unstable|2\d{3}-\d{2})\/graphql\.json$/,uo=/^\/api\/mcp$/,nt=e=>{try{return new URL(e,"http://e.c").pathname}catch{return "/"}};function ke(e,t){return t.reduce((r,o)=>{let n=e(o);return n&&r.push([o,n]),r},[])}function he(e,t={}){let r=new Error,o=(n,a="Error")=>{let s=(r.stack??"").split(`
21
21
  `).slice(3+(t.stackOffset??0)).join(`
22
22
  `).replace(/ at loader(\d+) \(/,(i,c)=>i.replace(c,""));return `${a}: ${n}
23
- `+s};return e.then(n=>{if(n?.errors&&Array.isArray(n.errors)){let a=typeof t.logErrors=="function"?t.logErrors:()=>t.logErrors??false;n.errors.forEach(s=>{s&&(s.stack=o(s.message,s.name),a(s)&&console.error(s));});}return n}).catch(n=>{throw n&&(n.stack=o(n.message,n.name)),n})}var J=void 0;var at="public",sa="private",kt="no-store",po={maxAge:"max-age",staleWhileRevalidate:"stale-while-revalidate",sMaxAge:"s-maxage",staleIfError:"stale-if-error"};function Ve(e){let t=[];return Object.keys(e).forEach(r=>{r==="mode"?t.push(e[r]):po[r]&&t.push(`${po[r]}=${e[r]}`);}),t.join(", ")}function Vt(){return {mode:kt}}function Nt(e){if(e?.mode&&e?.mode!==at&&e?.mode!==sa)throw Error("'mode' must be either 'public' or 'private'")}function le(e){return Nt(e),{mode:at,maxAge:1,staleWhileRevalidate:9,...e}}function Mt(e){return Nt(e),{mode:at,maxAge:3600,staleWhileRevalidate:82800,...e}}function Ae(e){return Nt(e),{mode:at,maxAge:1,staleWhileRevalidate:86399,...e}}function Ft(e){return e}function te(e){return String(e).includes("__proto__")?JSON.parse(e,ia):JSON.parse(e)}function ia(e,t){if(e!=="__proto__")return t}function st(e,t){return e&&t?{...e,...t}:e||Ae()}function Ht(e){return Ve(st(e))}async function ca(e,t){if(!e)return;let r=await e.match(t);if(!r){return}return r}async function ua(e,t,r,o){if(!e)return;let n=st(o),a=Ht(st(n,{maxAge:(n.maxAge||0)+(n.staleWhileRevalidate||0)})),s=Ht(st(n));r.headers.set("cache-control",a),r.headers.set("real-cache-control",s),r.headers.set("cache-put-date",String(Date.now())),await e.put(t,r);}async function da(e,t){e&&await e.delete(t);}function pa(e,t){let r=e.headers.get("real-cache-control"),o=0;if(r){let a=r.match(/max-age=(\d*)/);a&&a.length>1&&(o=parseFloat(a[1]));}return [(Date.now()-Number(t))/1e3,o]}function la(e,t){let r=t.headers.get("cache-put-date");if(!r)return false;let[o,n]=pa(t,r),a=o>n;return a}var it={get:ca,set:ua,delete:da,generateDefaultCacheControlHeader:Ht,isStale:la};function Ne(e){return `https://shopify.dev/?${e}`}function ya(e){return e||Ae()}async function lo(e,t){if(!e)return;let r=Ne(t),o=new Request(r),n=await it.get(e,o);if(!n)return;let a=await n.text();try{return [te(a),n]}catch{return [a,n]}}async function yo(e,t,r,o){if(!e)return;let n=Ne(t),a=new Request(n),s=new Response(JSON.stringify(r));await it.set(e,a,s,ya(o));}function fo(e,t){return it.isStale(new Request(Ne(e)),t)}function mo(e){let t=Array.isArray(e)?e:[e],r="";for(let o of t)o!=null&&(typeof o=="object"?r+=JSON.stringify(o):r+=o.toString());return encodeURIComponent(r)}var $t=new Set;async function ct(e,t,{strategy:r=le(),cacheInstance:o,shouldCacheResult:n=()=>true,waitUntil:a,debugInfo:s}){let c=mo([...typeof e=="string"?[e]:e]),y=f=>{({displayName:f.displayName,url:f.response?.url,responseInit:{status:f.response?.status||0,statusText:f.response?.statusText||"",headers:Array.from(f.response?.headers.entries()||[])}});},C=void 0;if(!o||!r||r.mode===kt){let f=await t({addDebugData:y});return f}let p=f=>yo(o,c,{value:f,debugInfo:void 0},r),l=await lo(o,c);if(l&&typeof l[0]!="string"){let[{value:f,debugInfo:P},h]=l;let T=fo(c,h)?"STALE":"HIT";if(!$t.has(c)&&T==="STALE"){$t.add(c);let g=Promise.resolve().then(async()=>{let v=Date.now();try{let R=await t({addDebugData:y});n(R)&&(await p(R),C?.({result:R,cacheStatus:"PUT",overrideStartTime:v}));}catch(R){R.message&&(R.message="SWR in sub-request failed: "+R.message),console.error(R);}finally{$t.delete(c);}});a?.(g);}return f}let S=await t({addDebugData:y});if(n(S)){let f=Promise.resolve().then(async()=>{await p(S);});a?.(f);}return S}var ma=["set-cookie","server-timing"];function Co(e,t){return [e,{status:t.status,statusText:t.statusText,headers:[...t.headers].filter(([r])=>!ma.includes(r.toLowerCase()))}]}function go([e,t]){return [e,new Response(e,t)]}async function ut(e,t,{cacheInstance:r,cache:o,cacheKey:n=[e,t],shouldCacheResponse:a,waitUntil:s,debugInfo:i,streamConfig:c,onRawHeaders:u}){return !o&&(!t.method||t.method==="GET")&&(o=le()),ct(n,async()=>{if(c){let m=null,p=await graphqlClient.createGraphQLClient({url:e,customFetchApi:async(f,P)=>(m=await fetch(f,P),u?.(m.headers),m),headers:t.headers}).requestStream(c.query,{variables:c.variables}),l,S;for await(let f of p){let{data:P,errors:h}=f;l=P,S=h?.graphQLErrors??h;}return m?.ok?Co({data:l,errors:S},m):m}let d=await fetch(e,t);if(u?.(d.headers),!d.ok)return d;let y=await d.text().catch(()=>"");try{y&&(y=te(y));}catch{}return Co(y,d)},{cacheInstance:r,waitUntil:s,strategy:o??null,debugInfo:i,shouldCacheResult:d=>"ok"in d?!1:a(...go(d))}).then(d=>"ok"in d?[null,d]:go(d))}function Ca(e){let{cache:t,waitUntil:r,request:o}=e;return {run:({cacheKey:n,cacheStrategy:a,shouldCacheResult:s},i)=>ct(n,i,{shouldCacheResult:s,strategy:a,cacheInstance:t,waitUntil:r,debugInfo:{...ce(o),stackInfo:J?.()}}),fetch:(n,a,s)=>ut(n,a??{},{waitUntil:r,cacheKey:[n,a],cacheInstance:t,debugInfo:{url:n,...ce(o),stackInfo:J?.(),displayName:s?.displayName},cache:s.cacheStrategy,...s}).then(([i,c])=>({data:i,response:c}))}}var qt=class{#e;constructor(){this.#e=new Map;}add(t){throw new Error("Method not implemented. Use `put` instead.")}addAll(t){throw new Error("Method not implemented. Use `put` instead.")}matchAll(t,r){throw new Error("Method not implemented. Use `match` instead.")}async put(t,r){if(t.method!=="GET")throw new TypeError("Cannot cache response to non-GET request.");if(r.status===206)throw new TypeError("Cannot cache response to a range request (206 Partial Content).");if(r.headers.get("vary")?.includes("*"))throw new TypeError("Cannot cache response with 'Vary: *' header.");this.#e.set(t.url,{body:new Uint8Array(await r.arrayBuffer()),status:r.status,headers:[...r.headers],timestamp:Date.now()});}async match(t){if(t.method!=="GET")return;let r=this.#e.get(t.url);if(!r)return;let{body:o,timestamp:n,...a}=r,s=new Headers(a.headers),i=s.get("cache-control")||s.get("real-cache-control")||"",c=parseInt(i.match(/max-age=(\d+)/)?.[1]||"0",10),u=parseInt(i.match(/stale-while-revalidate=(\d+)/)?.[1]||"0",10),d=(Date.now()-n)/1e3;if(d>c+u){this.#e.delete(t.url);return}let m=d>c;return s.set("cache",m?"STALE":"HIT"),s.set("date",new Date(n).toUTCString()),new Response(o,{status:a.status??200,headers:s})}async delete(t){return this.#e.has(t.url)?(this.#e.delete(t.url),true):false}keys(t){let r=[];for(let o of this.#e.keys())(!t||t.url===o)&&r.push(new Request(o));return Promise.resolve(r)}};var ho="cartFormInput";function re({children:e,action:t,inputs:r,route:o,fetcherKey:n}){let a=reactRouter.useFetcher({key:n});return jsxRuntime.jsxs(a.Form,{action:o||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:ho,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}re.INPUT_NAME=ho;re.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",GiftCardCodesUpdate:"GiftCardCodesUpdate",GiftCardCodesAdd:"GiftCardCodesAdd",GiftCardCodesRemove:"GiftCardCodesRemove",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete",DeliveryAddressesAdd:"DeliveryAddressesAdd",DeliveryAddressesUpdate:"DeliveryAddressesUpdate",DeliveryAddressesRemove:"DeliveryAddressesRemove",DeliveryAddressesReplace:"DeliveryAddressesReplace"};function ha(e){let t={};for(let s of e.entries()){let i=s[0],c=e.getAll(i);t[i]=c.length>1?c:s[1],t[i]==="on"?t[i]=true:t[i]==="off"&&(t[i]=false);}let{cartFormInput:r,...o}=t,{action:n,inputs:a}=r?JSON.parse(String(r)):{};return {action:n,inputs:{...a,...o}}}re.getFormInput=ha;var Gt=e=>{let t=cookie.parse(Ut(e,"Cookie")||"");return ()=>t.cart?`gid://shopify/Cart/${t.cart}`:void 0};var Bt=e=>t=>{let r=new Headers;return r.append("Set-Cookie",cookie.stringify("cart",t.split("/").pop()||"",{path:"/",...e})),r};function dt(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`weak-${Math.random().toString(16).substring(2)}`}var Me="2026.4.3";function Te(e){return e.replace(/\s*#.*$/gm,"").replace(/\s+/gm," ").trim()}var Pa=/(^|}\s)query[\s({]/im,va=/(^|}\s)mutation[\s({]/im;function pt(e,t){if(!Pa.test(e))throw new Error(`[h2:error:${t}] Can only execute queries`)}function lt(e,t){if(!va.test(e))throw new Error(`[h2:error:${t}] Can only execute mutations`)}var ye=class extends Error{locations;path;extensions;constructor(t,r={}){let n=(r.clientOperation?`[h2:error:${r.clientOperation}] `:"")+t+(r.requestId?` - Request ID: ${r.requestId}`:"");super(n),this.name="GraphQLError",this.extensions=r.extensions,this.locations=r.locations,this.path=r.path,this.stack=r.stack||void 0;try{this.cause=JSON.stringify({...typeof r.cause=="object"?r.cause:{},requestId:r.requestId});}catch{r.cause&&(this.cause=r.cause);}}get[Symbol.toStringTag](){return this.name}toString(){let t=`${this.name}: ${this.message}`;if(this.path)try{t+=` | path: ${JSON.stringify(this.path)}`;}catch{}if(this.extensions)try{t+=` | extensions: ${JSON.stringify(this.extensions)}`;}catch{}return t+=`
23
+ `+s};return e.then(n=>{if(n?.errors&&Array.isArray(n.errors)){let a=typeof t.logErrors=="function"?t.logErrors:()=>t.logErrors??false;n.errors.forEach(s=>{s&&(s.stack=o(s.message,s.name),a(s)&&console.error(s));});}return n}).catch(n=>{throw n&&(n.stack=o(n.message,n.name)),n})}var J=void 0;var at="public",sa="private",kt="no-store",po={maxAge:"max-age",staleWhileRevalidate:"stale-while-revalidate",sMaxAge:"s-maxage",staleIfError:"stale-if-error"};function Ve(e){let t=[];return Object.keys(e).forEach(r=>{r==="mode"?t.push(e[r]):po[r]&&t.push(`${po[r]}=${e[r]}`);}),t.join(", ")}function Vt(){return {mode:kt}}function Nt(e){if(e?.mode&&e?.mode!==at&&e?.mode!==sa)throw Error("'mode' must be either 'public' or 'private'")}function le(e){return Nt(e),{mode:at,maxAge:1,staleWhileRevalidate:9,...e}}function Mt(e){return Nt(e),{mode:at,maxAge:3600,staleWhileRevalidate:82800,...e}}function Ae(e){return Nt(e),{mode:at,maxAge:1,staleWhileRevalidate:86399,...e}}function Ft(e){return e}function te(e){return String(e).includes("__proto__")?JSON.parse(e,ia):JSON.parse(e)}function ia(e,t){if(e!=="__proto__")return t}function st(e,t){return e&&t?{...e,...t}:e||Ae()}function Ht(e){return Ve(st(e))}async function ca(e,t){if(!e)return;let r=await e.match(t);if(!r){return}return r}async function ua(e,t,r,o){if(!e)return;let n=st(o),a=Ht(st(n,{maxAge:(n.maxAge||0)+(n.staleWhileRevalidate||0)})),s=Ht(st(n));r.headers.set("cache-control",a),r.headers.set("real-cache-control",s),r.headers.set("cache-put-date",String(Date.now())),await e.put(t,r);}async function da(e,t){e&&await e.delete(t);}function pa(e,t){let r=e.headers.get("real-cache-control"),o=0;if(r){let a=r.match(/max-age=(\d*)/);a&&a.length>1&&(o=parseFloat(a[1]));}return [(Date.now()-Number(t))/1e3,o]}function la(e,t){let r=t.headers.get("cache-put-date");if(!r)return false;let[o,n]=pa(t,r),a=o>n;return a}var it={get:ca,set:ua,delete:da,generateDefaultCacheControlHeader:Ht,isStale:la};function Ne(e){return `https://shopify.dev/?${e}`}function ya(e){return e||Ae()}async function lo(e,t){if(!e)return;let r=Ne(t),o=new Request(r),n=await it.get(e,o);if(!n)return;let a=await n.text();try{return [te(a),n]}catch{return [a,n]}}async function yo(e,t,r,o){if(!e)return;let n=Ne(t),a=new Request(n),s=new Response(JSON.stringify(r));await it.set(e,a,s,ya(o));}function fo(e,t){return it.isStale(new Request(Ne(e)),t)}function mo(e){let t=Array.isArray(e)?e:[e],r="";for(let o of t)o!=null&&(typeof o=="object"?r+=JSON.stringify(o):r+=o.toString());return encodeURIComponent(r)}var $t=new Set;async function ct(e,t,{strategy:r=le(),cacheInstance:o,shouldCacheResult:n=()=>true,waitUntil:a,debugInfo:s}){let c=mo([...typeof e=="string"?[e]:e]),y=f=>{({displayName:f.displayName,url:f.response?.url,responseInit:{status:f.response?.status||0,statusText:f.response?.statusText||"",headers:Array.from(f.response?.headers.entries()||[])}});},C=void 0;if(!o||!r||r.mode===kt){let f=await t({addDebugData:y});return f}let p=f=>yo(o,c,{value:f,debugInfo:void 0},r),l=await lo(o,c);if(l&&typeof l[0]!="string"){let[{value:f,debugInfo:P},h]=l;let T=fo(c,h)?"STALE":"HIT";if(!$t.has(c)&&T==="STALE"){$t.add(c);let g=Promise.resolve().then(async()=>{let v=Date.now();try{let R=await t({addDebugData:y});n(R)&&(await p(R),C?.({result:R,cacheStatus:"PUT",overrideStartTime:v}));}catch(R){R.message&&(R.message="SWR in sub-request failed: "+R.message),console.error(R);}finally{$t.delete(c);}});a?.(g);}return f}let S=await t({addDebugData:y});if(n(S)){let f=Promise.resolve().then(async()=>{await p(S);});a?.(f);}return S}var ma=["set-cookie","server-timing"];function Co(e,t){return [e,{status:t.status,statusText:t.statusText,headers:[...t.headers].filter(([r])=>!ma.includes(r.toLowerCase()))}]}function go([e,t]){return [e,new Response(e,t)]}async function ut(e,t,{cacheInstance:r,cache:o,cacheKey:n=[e,t],shouldCacheResponse:a,waitUntil:s,debugInfo:i,streamConfig:c,onRawHeaders:u}){return !o&&(!t.method||t.method==="GET")&&(o=le()),ct(n,async()=>{if(c){let m=null,p=await graphqlClient.createGraphQLClient({url:e,customFetchApi:async(f,P)=>(m=await fetch(f,P),u?.(m.headers),m),headers:t.headers}).requestStream(c.query,{variables:c.variables}),l,S;for await(let f of p){let{data:P,errors:h}=f;l=P,S=h?.graphQLErrors??h;}return m?.ok?Co({data:l,errors:S},m):m}let d=await fetch(e,t);if(u?.(d.headers),!d.ok)return d;let y=await d.text().catch(()=>"");try{y&&(y=te(y));}catch{}return Co(y,d)},{cacheInstance:r,waitUntil:s,strategy:o??null,debugInfo:i,shouldCacheResult:d=>"ok"in d?!1:a(...go(d))}).then(d=>"ok"in d?[null,d]:go(d))}function Ca(e){let{cache:t,waitUntil:r,request:o}=e;return {run:({cacheKey:n,cacheStrategy:a,shouldCacheResult:s},i)=>ct(n,i,{shouldCacheResult:s,strategy:a,cacheInstance:t,waitUntil:r,debugInfo:{...ce(o),stackInfo:J?.()}}),fetch:(n,a,s)=>ut(n,a??{},{waitUntil:r,cacheKey:[n,a],cacheInstance:t,debugInfo:{url:n,...ce(o),stackInfo:J?.(),displayName:s?.displayName},cache:s.cacheStrategy,...s}).then(([i,c])=>({data:i,response:c}))}}var qt=class{#e;constructor(){this.#e=new Map;}add(t){throw new Error("Method not implemented. Use `put` instead.")}addAll(t){throw new Error("Method not implemented. Use `put` instead.")}matchAll(t,r){throw new Error("Method not implemented. Use `match` instead.")}async put(t,r){if(t.method!=="GET")throw new TypeError("Cannot cache response to non-GET request.");if(r.status===206)throw new TypeError("Cannot cache response to a range request (206 Partial Content).");if(r.headers.get("vary")?.includes("*"))throw new TypeError("Cannot cache response with 'Vary: *' header.");this.#e.set(t.url,{body:new Uint8Array(await r.arrayBuffer()),status:r.status,headers:[...r.headers],timestamp:Date.now()});}async match(t){if(t.method!=="GET")return;let r=this.#e.get(t.url);if(!r)return;let{body:o,timestamp:n,...a}=r,s=new Headers(a.headers),i=s.get("cache-control")||s.get("real-cache-control")||"",c=parseInt(i.match(/max-age=(\d+)/)?.[1]||"0",10),u=parseInt(i.match(/stale-while-revalidate=(\d+)/)?.[1]||"0",10),d=(Date.now()-n)/1e3;if(d>c+u){this.#e.delete(t.url);return}let m=d>c;return s.set("cache",m?"STALE":"HIT"),s.set("date",new Date(n).toUTCString()),new Response(o,{status:a.status??200,headers:s})}async delete(t){return this.#e.has(t.url)?(this.#e.delete(t.url),true):false}keys(t){let r=[];for(let o of this.#e.keys())(!t||t.url===o)&&r.push(new Request(o));return Promise.resolve(r)}};var ho="cartFormInput";function re({children:e,action:t,inputs:r,route:o,fetcherKey:n}){let a=reactRouter.useFetcher({key:n});return jsxRuntime.jsxs(a.Form,{action:o||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:ho,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}re.INPUT_NAME=ho;re.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",GiftCardCodesUpdate:"GiftCardCodesUpdate",GiftCardCodesAdd:"GiftCardCodesAdd",GiftCardCodesRemove:"GiftCardCodesRemove",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete",DeliveryAddressesAdd:"DeliveryAddressesAdd",DeliveryAddressesUpdate:"DeliveryAddressesUpdate",DeliveryAddressesRemove:"DeliveryAddressesRemove",DeliveryAddressesReplace:"DeliveryAddressesReplace"};function ha(e){let t={};for(let s of e.entries()){let i=s[0],c=e.getAll(i);t[i]=c.length>1?c:s[1],t[i]==="on"?t[i]=true:t[i]==="off"&&(t[i]=false);}let{cartFormInput:r,...o}=t,{action:n,inputs:a}=r?JSON.parse(String(r)):{};return {action:n,inputs:{...a,...o}}}re.getFormInput=ha;var Gt=e=>{let t=cookie.parse(Ut(e,"Cookie")||"");return ()=>t.cart?`gid://shopify/Cart/${t.cart}`:void 0};var Bt=e=>t=>{let r=new Headers;return r.append("Set-Cookie",cookie.stringify("cart",t.split("/").pop()||"",{path:"/",...e})),r};function dt(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`weak-${Math.random().toString(16).substring(2)}`}var Me="2026.4.4";function Te(e){return e.replace(/\s*#.*$/gm,"").replace(/\s+/gm," ").trim()}var Pa=/(^|}\s)query[\s({]/im,va=/(^|}\s)mutation[\s({]/im;function pt(e,t){if(!Pa.test(e))throw new Error(`[h2:error:${t}] Can only execute queries`)}function lt(e,t){if(!va.test(e))throw new Error(`[h2:error:${t}] Can only execute mutations`)}var ye=class extends Error{locations;path;extensions;constructor(t,r={}){let n=(r.clientOperation?`[h2:error:${r.clientOperation}] `:"")+t+(r.requestId?` - Request ID: ${r.requestId}`:"");super(n),this.name="GraphQLError",this.extensions=r.extensions,this.locations=r.locations,this.path=r.path,this.stack=r.stack||void 0;try{this.cause=JSON.stringify({...typeof r.cause=="object"?r.cause:{},requestId:r.requestId});}catch{r.cause&&(this.cause=r.cause);}}get[Symbol.toStringTag](){return this.name}toString(){let t=`${this.name}: ${this.message}`;if(this.path)try{t+=` | path: ${JSON.stringify(this.path)}`;}catch{}if(this.extensions)try{t+=` | extensions: ${JSON.stringify(this.extensions)}`;}catch{}return t+=`
24
24
  `,this.stack&&(t+=`${this.stack.slice(this.stack.indexOf(`
25
25
  `)+1)}
26
26
  `),t}toJSON(){return {name:"Error",message:""}}};function Fe({url:e,response:t,errors:r,type:o,query:n,queryVariables:a,ErrorConstructor:s=Error,client:i="storefront"}){let c=(typeof r=="string"?r:r?.map?.(d=>d.message).join(`