/*! For license information please see vendor.bc253c21504390f9c492.js.LICENSE.txt */ (self.webpackChunkui=self.webpackChunkui||[]).push([[6],{105:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o{var r=n(98);function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(o),e.exports.strict=r(i),o.proto=o((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))},141:(e,t,n)=>{"use strict";var r=n(24),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&l({inst:o})}),[e,n,t]),a((function(){return c(o)&&l({inst:o}),e((function(){c(o)&&l({inst:o})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},139:(e,t,n)=>{"use strict";var r=n(24),o=n(140),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,u=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c((function(){function e(e){if(!u){if(u=!0,a=e,e=r(e),void 0!==o&&p.hasValue){var t=p.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,u=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var f=a(e,d[0],d[1]);return u((function(){p.hasValue=!0,p.value=f}),[f]),l(f),f}},140:(e,t,n)=>{"use strict";e.exports=n(141)},95:(e,t,n)=>{"use strict";e.exports=n(139)},98:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n{"use strict";n.r(t),n.d(t,{AddToCartButton:()=>xe,AnalyticsEventName:()=>Pe,AnalyticsPageType:()=>Oe,BuyNowButton:()=>et,CartCheckoutButton:()=>tt,CartCost:()=>at,CartLineProvider:()=>ct,CartLineQuantity:()=>lt,CartLineQuantityAdjustButton:()=>dt,CartProvider:()=>ge,ExternalVideo:()=>ht,IMAGE_FRAGMENT:()=>Pt,Image:()=>Ot,MediaFile:()=>Wt,ModelViewer:()=>Yt,Money:()=>it,ProductPrice:()=>Gt,ProductProvider:()=>we,RichText:()=>Jt,SHOPIFY_S:()=>ie,SHOPIFY_STOREFRONT_ID_HEADER:()=>te,SHOPIFY_STOREFRONT_S_HEADER:()=>re,SHOPIFY_STOREFRONT_Y_HEADER:()=>ne,SHOPIFY_Y:()=>oe,ShopPayButton:()=>tn,ShopifyProvider:()=>X,ShopifySalesChannel:()=>Re,Video:()=>Bt,createStorefrontClient:()=>Y,customerAccountApiCustomScalars:()=>ft,decodeEncodedVariant:()=>mt,flattenConnection:()=>U,getAdjacentAndFirstAvailableVariants:()=>_t,getClientBrowserParameters:()=>Ke,getProductOptions:()=>xt,getShopifyCookies:()=>ce,isOptionValueCombinationInEncodedVariant:()=>yt,mapSelectedProductOptionToObject:()=>Ct,parseGid:()=>ke,parseMetafield:()=>Ht,sendShopifyAnalytics:()=>Je,storefrontApiCustomScalars:()=>pt,useCart:()=>me,useCartLine:()=>ut,useLoadScript:()=>zt,useMoney:()=>nt,useProduct:()=>Ie,useSelectedOptionInUrlParam:()=>un,useShop:()=>K,useShopifyCookies:()=>dn});var r,o,i=n(24),a=n(0);function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(o=r||(r={}))[o.NotStarted=0]="NotStarted",o[o.Running=1]="Running",o[o.Stopped=2]="Stopped";var u={type:"xstate.init"};function c(e){return void 0===e?[]:[].concat(e)}function l(e){return{type:"xstate.assign",assignment:e}}function d(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function p(e){return function(t){return e===t}}function f(e){return"string"==typeof e?{type:e}:e}function h(e,t){return{value:e,context:t,actions:[],changed:!1,matches:p(e)}}function v(e,t,n){var r=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](r,n):e.assignment[o]})),r=t,!1}return!0})),r,o]}function y(e,t){void 0===t&&(t={});var n=s(v(c(e.states[e.initial].entry).map((function(e){return d(e,t.actions)})),e.context,u),2),r=n[0],o=n[1],i={config:e,_options:t,initialState:{value:e.initial,actions:r,context:o,matches:p(e.initial)},transition:function(t,n){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,u=a.value,l=a.context,y=f(n),m=e.states[u];if(m.on){var g=c(m.on[y.type]);try{for(var C=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(g),b=C.next();!b.done;b=C.next()){var E=b.value;if(void 0===E)return h(u,l);var w="string"==typeof E?{target:E}:E,I=w.target,S=w.actions,A=void 0===S?[]:S,T=w.cond,_=void 0===T?function(){return!0}:T,x=void 0===I,P=null!=I?I:u,O=e.states[P];if(_(l,y)){var R=s(v((x?c(A):[].concat(m.exit,A,O.entry).filter((function(e){return e}))).map((function(e){return d(e,i._options.actions)})),l,y),3),U=R[0],D=R[1],k=R[2],$=null!=I?I:u;return{value:$,context:D,actions:U,changed:I!==u||U.length>0||k,matches:p($)}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(o=C.return)&&o.call(C)}finally{if(r)throw r.error}}}return h(u,l)}};return i}var m=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};const g=i.useLayoutEffect;var C,b,E,w,I={exports:{}},S={},A={exports:{}},T={};var _=(w||(w=1,I.exports=function(){if(E)return S;E=1;var e=i.default,t=(b||(b=1,A.exports=function(){if(C)return T;C=1;var e=i.default,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var i=t(),u=n({inst:{value:i,getSnapshot:t}}),c=u[0].inst,l=u[1];return o((function(){c.value=i,c.getSnapshot=t,s(c)&&l({inst:c})}),[e,i,t]),r((function(){return s(c)&&l({inst:c}),e((function(){s(c)&&l({inst:c})}))}),[e]),a(i),i};return T.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u,T}()),A.exports),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;return S.useSyncExternalStoreWithSelector=function(e,t,i,c,l){var d=o(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=s((function(){function e(e){if(!a){if(a=!0,r=e,e=c(e),void 0!==l&&p.hasValue){var t=p.value;if(l(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var i=c(e);return void 0!==l&&l(t,i)?t:(r=e,o=i)}var r,o,a=!1,s=void 0===i?null:i;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,i,c,l]);var f=r(e,d[0],d[1]);return a((function(){p.hasValue=!0,p.value=f}),[f]),u(f),f},S}()),I.exports),x=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function P(e){return e}var O=function(e){var t;return e.subscribe((function(e){t=e})).unsubscribe(),t};var R=function(e,t){return!1===t.changed};function U(e){if(!e){const t=`flattenConnection(): needs a 'connection' to flatten, but received '${e??""}' instead.`;return console.error(t+" Returning an empty array"),[]}return"nodes"in e?e.nodes:"edges"in e&&Array.isArray(e.edges)?e.edges.map((e=>{if(!(null==e?void 0:e.node))throw new Error("flattenConnection(): Connection edges must contain nodes");return e.node})):[]}const D=e=>`\n mutation CartLineAdd(\n $cartId: ID!\n $lines: [CartLineInput!]!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,k=e=>`\n mutation CartCreate(\n $input: CartInput!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartCreate(input: $input) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,$=e=>`\n mutation CartLineRemove(\n $cartId: ID!\n $lines: [ID!]!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartLinesRemove(cartId: $cartId, lineIds: $lines) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,L=e=>`\n mutation CartLineUpdate(\n $cartId: ID!\n $lines: [CartLineUpdateInput!]!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,V=e=>`\n mutation CartNoteUpdate(\n $cartId: ID!\n $note: String!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartNoteUpdate(cartId: $cartId, note: $note) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,N=e=>`\n mutation CartBuyerIdentityUpdate(\n $cartId: ID!\n $buyerIdentity: CartBuyerIdentityInput!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,j=e=>`\n mutation CartAttributesUpdate(\n $attributes: [AttributeInput!]!\n $cartId: ID!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartAttributesUpdate(attributes: $attributes, cartId: $cartId) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,F=e=>`\n mutation CartDiscountCodesUpdate(\n $cartId: ID!\n $discountCodes: [String!]\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {\n cart {\n ...CartFragment\n }\n }\n }\n\n ${e}\n`,q=e=>`\n query CartQuery(\n $id: ID!\n $numCartLines: Int = 250\n $country: CountryCode = ZZ\n $language: LanguageCode\n ) @inContext(country: $country, language: $language) {\n cart(id: $id) {\n ...CartFragment\n }\n }\n\n ${e}\n`,M="\n fragment CartFragment on Cart {\n id\n checkoutUrl\n totalQuantity\n buyerIdentity {\n countryCode\n customer {\n id\n email\n firstName\n lastName\n displayName\n }\n email\n phone\n }\n lines(first: $numCartLines) {\n edges {\n node {\n id\n quantity\n attributes {\n key\n value\n }\n cost {\n totalAmount {\n amount\n currencyCode\n }\n compareAtAmountPerQuantity {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n availableForSale\n compareAtPrice {\n ...MoneyFragment\n }\n price {\n ...MoneyFragment\n }\n requiresShipping\n title\n image {\n ...ImageFragment\n }\n product {\n handle\n title\n id\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n }\n cost {\n subtotalAmount {\n ...MoneyFragment\n }\n totalAmount {\n ...MoneyFragment\n }\n totalDutyAmount {\n ...MoneyFragment\n }\n totalTaxAmount {\n ...MoneyFragment\n }\n }\n note\n attributes {\n key\n value\n }\n discountCodes {\n code\n applicable\n }\n }\n\n fragment MoneyFragment on MoneyV2 {\n currencyCode\n amount\n }\n fragment ImageFragment on Image {\n id\n url\n altText\n width\n height\n }\n",z="2025-07",B=e=>e.includes("mock.shop");function Y({storeDomain:e,privateStorefrontToken:t,publicStorefrontToken:n,storefrontApiVersion:r=z,contentType:o}){if(!e)throw new Error(Z+"`storeDomain` is required when creating a new Storefront client in production.");r!==z&&G(`The Storefront API version that you're using is different than the version this build of Hydrogen React is targeting.\nYou may run into unexpected errors if these versions don't match. Received version: "${r}"; expected version "${z}"`);const i=t=>{const n=(null==t?void 0:t.storeDomain)??e;return n.includes("://")?n:`https://${n}`};return{getShopifyDomain:i,getStorefrontApiUrl(e){const t=i(e),n=t+(t.endsWith("/")?"api":"/api");return B(t)?n:`${n}/${(null==e?void 0:e.storefrontApiVersion)??r}/graphql.json`},getPrivateTokenHeaders(n){if(!t&&!(null==n?void 0:n.privateStorefrontToken)&&!B(e))throw new Error(Z+"You did not pass in a `privateStorefrontToken` while using `createStorefrontClient()` or `getPrivateTokenHeaders()`");return{"content-type":"graphql"===((null==n?void 0:n.contentType)??o)?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":r,"Shopify-Storefront-Private-Token":(null==n?void 0:n.privateStorefrontToken)??t??"",...(null==n?void 0:n.buyerIp)?{"Shopify-Storefront-Buyer-IP":n.buyerIp}:{}}},getPublicTokenHeaders(t){if(!n&&!(null==t?void 0:t.publicStorefrontToken)&&!B(e))throw new Error(Z+"You did not pass in a `publicStorefrontToken` while using `createStorefrontClient()` or `getPublicTokenHeaders()`");return W((null==t?void 0:t.contentType)??o??"json",r,(null==t?void 0:t.publicStorefrontToken)??n??"")}}}function W(e,t,n){return{"content-type":"graphql"===e?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":t,"X-Shopify-Storefront-Access-Token":n}}const H=new Set,Z="[h2:error:createStorefrontClient] ",G=(e,t="warn")=>{H.has(e)||(console[t](`[h2:${t}:createStorefrontClient] `+e),H.add(e))},Q={storeDomain:"test",storefrontToken:"abc123",storefrontApiVersion:z,countryIsoCode:"US",languageIsoCode:"EN",getStorefrontApiUrl:()=>"",getPublicTokenHeaders:()=>({}),getShopifyDomain:()=>""},J=(0,i.createContext)(Q);function X({children:e,...t}){if(!(t.countryIsoCode&&t.languageIsoCode&&t.storeDomain&&t.storefrontToken&&t.storefrontApiVersion))throw new Error("Please provide the necessary props to ''");t.storefrontApiVersion!==z&&console.warn(`: This version of Hydrogen React is built for Shopify's Storefront API version ${z}, but it looks like you're using version ${t.storefrontApiVersion}. There may be issues or bugs if you use a mismatched version of Hydrogen React and the Storefront API.`);const n=(0,i.useMemo)((()=>{function e(e){const n=(null==e?void 0:e.storeDomain)??t.storeDomain;return n.includes("://")?n:`https://${n}`}return{...t,getPublicTokenHeaders:e=>W(e.contentType,t.storefrontApiVersion,e.storefrontToken??t.storefrontToken),getShopifyDomain:e,getStorefrontApiUrl(n){const r=e({storeDomain:(null==n?void 0:n.storeDomain)??t.storeDomain});return`${r}${r.endsWith("/")?"":"/"}api/${(null==n?void 0:n.storefrontApiVersion)??t.storefrontApiVersion}/graphql.json`}}}),[t]);return(0,a.jsx)(J.Provider,{value:n,children:e})}function K(){const e=(0,i.useContext)(J);if(!e)throw new Error("'useShop()' must be a descendent of ");return e}const ee="shopifyCartId",te="Shopify-Storefront-Id",ne="Shopify-Storefront-Y",re="Shopify-Storefront-S",oe="_shopify_y",ie="_shopify_s";var ae=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);const se="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function ue(){let e="";try{const t=window.crypto,n=new Uint16Array(31);t.getRandomValues(n);let r=0;e=se.replace(/[x]/g,(e=>{const t=n[r]%16;return r++,("x"===e?t:3&t|8).toString(16)})).toUpperCase()}catch(t){e=se.replace(/[x]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})).toUpperCase()}return`${function(){let e=0,t=0;e=(new Date).getTime()>>>0;try{t=performance.now()>>>0}catch(e){t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}()}-${e}`}function ce(e){const t=function(e){let t,n,r,o,i={},a=0,s=e.split(/;\s*/g);for(;anull==e?void 0:e.cart}),"onCartActionEntry","onCartActionOptimisticUI",e],on:{RESOLVE:{target:(null==t?void 0:t.resolveTarget)||"idle",actions:[l({prevCart:e=>null==e?void 0:e.lastValidCart,cart:(e,t)=>{var n;return null==(n=null==t?void 0:t.payload)?void 0:n.cart},rawCartResult:(e,t)=>{var n;return null==(n=null==t?void 0:t.payload)?void 0:n.rawCartResult},errors:e=>{}})]},ERROR:{target:(null==t?void 0:t.errorTarget)||"error",actions:[l({prevCart:e=>null==e?void 0:e.lastValidCart,cart:e=>null==e?void 0:e.lastValidCart,errors:(e,t)=>{var n;return null==(n=null==t?void 0:t.payload)?void 0:n.errors}})]},CART_COMPLETED:{target:"cartCompleted",actions:l({prevCart:e=>{},cart:e=>{},lastValidCart:e=>{},rawCartResult:e=>{},errors:e=>{}})}},exit:["onCartActionComplete",...(null==t?void 0:t.exitActions)||[]]}}const de={CART_FETCH:{target:"cartFetching"},CART_CREATE:{target:"cartCreating"},CART_SET:{target:"idle",actions:[l({rawCartResult:(e,t)=>t.payload.cart,cart:(e,t)=>he(t.payload.cart)})]}},pe={CARTLINE_ADD:{target:"cartLineAdding"},CARTLINE_UPDATE:{target:"cartLineUpdating"},CARTLINE_REMOVE:{target:"cartLineRemoving"},NOTE_UPDATE:{target:"noteUpdating"},BUYER_IDENTITY_UPDATE:{target:"buyerIdentityUpdating"},CART_ATTRIBUTES_UPDATE:{target:"cartAttributesUpdating"},DISCOUNT_CODES_UPDATE:{target:"discountCodesUpdating"}};function fe({numCartLines:e,onCartActionEntry:t,onCartActionOptimisticUI:n,onCartActionComplete:o,data:a,cartFragment:s,countryCode:c,languageCode:d}){const{cartFetch:h,cartCreate:v,cartLineAdd:C,cartLineUpdate:b,cartLineRemove:E,noteUpdate:w,buyerIdentityUpdate:I,cartAttributesUpdate:S,discountCodesUpdate:A}=function({numCartLines:e,cartFragment:t,countryCode:n="US",languageCode:r="EN"}){const o=function(){const{storefrontId:e,getPublicTokenHeaders:t,getStorefrontApiUrl:n}=K();return(0,i.useCallback)((({query:r,variables:o})=>{const i=t({contentType:"json"});e&&(i[te]=e);const a=ce(document.cookie);return i[ne]=a[oe],i[re]=a[ie],fetch(n(),{method:"POST",headers:i,body:JSON.stringify({query:r.toString(),variables:o})}).then((e=>e.json())).catch((e=>({data:void 0,errors:null==e?void 0:e.toString()})))}),[t,e,n])}(),a=(0,i.useCallback)((i=>o({query:q(t),variables:{id:i,numCartLines:e,country:n,language:r}})),[o,t,e,n,r]),s=(0,i.useCallback)((i=>o({query:k(t),variables:{input:i,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),u=(0,i.useCallback)(((i,a)=>o({query:D(t),variables:{cartId:i,lines:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),c=(0,i.useCallback)(((i,a)=>o({query:L(t),variables:{cartId:i,lines:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),l=(0,i.useCallback)(((i,a)=>o({query:$(t),variables:{cartId:i,lines:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),d=(0,i.useCallback)(((i,a)=>o({query:V(t),variables:{cartId:i,note:a,numCartLines:e,country:n,language:r}})),[o,t,e,n,r]),p=(0,i.useCallback)(((i,a)=>o({query:N(t),variables:{cartId:i,buyerIdentity:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),f=(0,i.useCallback)(((i,a)=>o({query:j(t),variables:{cartId:i,attributes:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]),h=(0,i.useCallback)(((i,a)=>o({query:F(t),variables:{cartId:i,discountCodes:a,numCartLines:e,country:n,language:r}})),[t,n,o,e,r]);return(0,i.useMemo)((()=>({cartFetch:a,cartCreate:s,cartLineAdd:u,cartLineUpdate:c,cartLineRemove:l,noteUpdate:d,buyerIdentityUpdate:p,cartAttributesUpdate:f,discountCodesUpdate:h,cartFragment:t})),[a,s,u,c,l,d,p,f,h,t])}({numCartLines:e,cartFragment:s,countryCode:c,languageCode:d}),T=(0,i.useMemo)((()=>{return y({id:"Cart",initial:(e=a)?"idle":"uninitialized",context:{cart:e&&he(e)},states:{uninitialized:{on:de},cartCompleted:{on:de},initializationError:{on:de},idle:{on:{...de,...pe}},error:{on:{...de,...pe}},cartFetching:le("cartFetchAction",{errorTarget:"initializationError"}),cartCreating:le("cartCreateAction",{errorTarget:"initializationError"}),cartLineRemoving:le("cartLineRemoveAction"),cartLineUpdating:le("cartLineUpdateAction"),cartLineAdding:le("cartLineAddAction"),noteUpdating:le("noteUpdateAction"),buyerIdentityUpdating:le("buyerIdentityUpdateAction"),cartAttributesUpdating:le("cartAttributesUpdateAction"),discountCodesUpdating:le("discountCodesUpdateAction")}});var e}),[a]),[U,M,z]=function(e,t){var n,o,a=(0,i.useRef)(),s=x((n=function(){var n=[],o=function(e){var t=e.initialState,n=r.NotStarted,o=new Set,i={_machine:e,send:function(i){n===r.Running&&(t=e.transition(t,i),m(t,f(i)),o.forEach((function(e){return e(t)})))},subscribe:function(e){return o.add(e),e(t),{unsubscribe:function(){return o.delete(e)}}},start:function(o){if(o){var a="object"==typeof o?o:{context:e.config.context,value:o};t={value:a.value,actions:[],context:a.context,matches:p(a.value)}}else t=e.initialState;return n=r.Running,m(t,u),i},stop:function(){return n=r.Stopped,o.clear(),i},get state(){return t},get status(){return n}};return i}(y(e.config,t||e._options)),i=o.send;return o.send=function(e){o.status!==r.NotStarted?(i(e),a.current=o.state):n.push(e)},[o,n]},(o=i.useRef()).current||(o.current={v:n()}),o.current.v),2),c=s[0],l=s[1];g((function(){t&&(c._machine._options=t)}));var d=function(e){var t=(0,i.useCallback)((function(){return O(e)}),[e]),n=(0,i.useCallback)((function(t){return e.subscribe(t).unsubscribe}),[e]);return[_.useSyncExternalStoreWithSelector(n,t,t,P,R),e.send,e]}(c);return(0,i.useEffect)((function(){return c.start(a.current),l.forEach(c.send),a.current=c.state,function(){c.stop()}}),[]),d}(T,{actions:{cartFetchAction:async(e,t)=>{var n;if("CART_FETCH"!==t.type)return;const{data:r,errors:o}=await h(null==(n=null==t?void 0:t.payload)?void 0:n.cartId),i=ve(t,null==r?void 0:r.cart,o);M(i)},cartCreateAction:async(e,t)=>{var n;if("CART_CREATE"!==t.type)return;const{data:r,errors:o}=await v(null==t?void 0:t.payload),i=ve(t,null==(n=null==r?void 0:r.cartCreate)?void 0:n.cart,o);M(i)},cartLineAddAction:async(e,t)=>{var n,r;if("CARTLINE_ADD"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await C(e.cart.id,t.payload.lines),a=ve(t,null==(r=null==o?void 0:o.cartLinesAdd)?void 0:r.cart,i);M(a)},cartLineUpdateAction:async(e,t)=>{var n,r;if("CARTLINE_UPDATE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await b(e.cart.id,t.payload.lines),a=ve(t,null==(r=null==o?void 0:o.cartLinesUpdate)?void 0:r.cart,i);M(a)},cartLineRemoveAction:async(e,t)=>{var n,r;if("CARTLINE_REMOVE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await E(e.cart.id,t.payload.lines),a=ve(t,null==(r=null==o?void 0:o.cartLinesRemove)?void 0:r.cart,i);M(a)},noteUpdateAction:async(e,t)=>{var n,r;if("NOTE_UPDATE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await w(e.cart.id,t.payload.note),a=ve(t,null==(r=null==o?void 0:o.cartNoteUpdate)?void 0:r.cart,i);M(a)},buyerIdentityUpdateAction:async(e,t)=>{var n,r;if("BUYER_IDENTITY_UPDATE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await I(e.cart.id,t.payload.buyerIdentity),a=ve(t,null==(r=null==o?void 0:o.cartBuyerIdentityUpdate)?void 0:r.cart,i);M(a)},cartAttributesUpdateAction:async(e,t)=>{var n,r;if("CART_ATTRIBUTES_UPDATE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await S(e.cart.id,t.payload.attributes),a=ve(t,null==(r=null==o?void 0:o.cartAttributesUpdate)?void 0:r.cart,i);M(a)},discountCodesUpdateAction:async(e,t)=>{var n,r;if("DISCOUNT_CODES_UPDATE"!==t.type||!(null==(n=null==e?void 0:e.cart)?void 0:n.id))return;const{data:o,errors:i}=await A(e.cart.id,t.payload.discountCodes),a=ve(t,null==(r=null==o?void 0:o.cartDiscountCodesUpdate)?void 0:r.cart,i);M(a)},...t&&{onCartActionEntry:(e,n)=>{(function(e){return"CART_CREATE"===e.type||"CARTLINE_ADD"===e.type||"CARTLINE_UPDATE"===e.type||"CARTLINE_REMOVE"===e.type||"NOTE_UPDATE"===e.type||"BUYER_IDENTITY_UPDATE"===e.type||"CART_ATTRIBUTES_UPDATE"===e.type||"DISCOUNT_CODES_UPDATE"===e.type})(n)&&t(e,n)}},...n&&{onCartActionOptimisticUI:l(((e,t)=>n(e,t)))},...o&&{onCartActionComplete:(e,t)=>{(function(e){return"RESOLVE"===e.type||"ERROR"===e.type||"CART_COMPLETED"===e.type})(t)&&o(e,t)}}}});return(0,i.useMemo)((()=>[U,M,z]),[U,M,z])}function he(e){return{...e,lines:U(null==e?void 0:e.lines),note:e.note??void 0}}function ve(e,t,n){return n?{type:"ERROR",payload:{errors:n,cartActionEvent:e}}:t?{type:"RESOLVE",payload:{cart:he(t),rawCartResult:t,cartActionEvent:e}}:{type:"CART_COMPLETED",payload:{cartActionEvent:e}}}const ye=(0,i.createContext)(null);function me(){const e=(0,i.useContext)(ye);if(!e)throw new Error("Expected a Cart Context, but no Cart Context was found");return e}function ge({children:e,numCartLines:t,onCreate:n,onLineAdd:r,onLineRemove:o,onLineUpdate:s,onNoteUpdate:u,onBuyerIdentityUpdate:c,onAttributesUpdate:l,onDiscountCodesUpdate:d,onCreateComplete:p,onLineAddComplete:f,onLineRemoveComplete:h,onLineUpdateComplete:v,onNoteUpdateComplete:y,onBuyerIdentityUpdateComplete:m,onAttributesUpdateComplete:g,onDiscountCodesUpdateComplete:C,data:b,cartFragment:E=M,customerAccessToken:w,countryCode:I,languageCode:S}){var A,T,_,x,P,O,R;const U=K();if(!U)throw new Error(" needs to be a descendant of ");I=(I??U.countryIsoCode??"US").toUpperCase(),S=(S??U.languageIsoCode??"EN").toUpperCase(),I&&(I=I.toUpperCase());const[D,k]=(0,i.useState)(I),[$,L]=(0,i.useState)(w),V=(0,i.useRef)(!1);D===I&&$===w||(k(I),L(w),V.current=!1);const[N,j]=fe({numCartLines:t,data:b,cartFragment:E,countryCode:I,languageCode:S,onCartActionEntry(e,t){try{switch(t.type){case"CART_CREATE":return null==n?void 0:n();case"CARTLINE_ADD":return null==r?void 0:r();case"CARTLINE_REMOVE":return null==o?void 0:o();case"CARTLINE_UPDATE":return null==s?void 0:s();case"NOTE_UPDATE":return null==u?void 0:u();case"BUYER_IDENTITY_UPDATE":return null==c?void 0:c();case"CART_ATTRIBUTES_UPDATE":return null==l?void 0:l();case"DISCOUNT_CODES_UPDATE":return null==d?void 0:d()}}catch(e){console.error("Cart entry action failed",e)}},onCartActionOptimisticUI(e,t){var n,r,o,i;if(!e.cart)return{...e};switch(t.type){case"CARTLINE_REMOVE":return{...e,cart:{...e.cart,lines:null==(r=null==(n=null==e?void 0:e.cart)?void 0:n.lines)?void 0:r.filter((e=>(null==e?void 0:e.id)&&!t.payload.lines.includes(null==e?void 0:e.id)))}};case"CARTLINE_UPDATE":return{...e,cart:{...e.cart,lines:null==(i=null==(o=null==e?void 0:e.cart)?void 0:o.lines)?void 0:i.map((e=>{const n=t.payload.lines.find((({id:t})=>t===(null==e?void 0:e.id)));return n&&n.quantity?{...e,quantity:n.quantity}:e}))}}}return{...e}},onCartActionComplete(e,t){const n=t.payload.cartActionEvent;try{if("RESOLVE"===t.type)switch(n.type){case"CART_CREATE":return null==p?void 0:p();case"CARTLINE_ADD":return null==f?void 0:f();case"CARTLINE_REMOVE":return null==h?void 0:h();case"CARTLINE_UPDATE":return null==v?void 0:v();case"NOTE_UPDATE":return null==y?void 0:y();case"BUYER_IDENTITY_UPDATE":return function(e,t){var n,r;return!(!t.payload.buyerIdentity.countryCode||(null==(r=null==(n=e.cart)?void 0:n.buyerIdentity)?void 0:r.countryCode)===t.payload.buyerIdentity.countryCode)}(e,n)&&(V.current=!0),null==m?void 0:m();case"CART_ATTRIBUTES_UPDATE":return null==g?void 0:g();case"DISCOUNT_CODES_UPDATE":return null==C?void 0:C()}}catch(e){console.error("onCartActionComplete failed",e)}}}),F=(0,i.useRef)(!1),[q,z]=(0,i.useState)(!1),B=N.matches("cartCompleted"),Y=("idle"===N.value||"error"===N.value||"cartCompleted"===N.value)&&I!==(null==(_=null==(T=null==(A=null==N?void 0:N.context)?void 0:A.cart)?void 0:T.buyerIdentity)?void 0:_.countryCode)&&!N.context.errors,W=(0,i.useRef)(!1);(0,i.useEffect)((()=>{if(!F.current&&!W.current){if(!b&&be("localStorage")){W.current=!0;try{const e=window.localStorage.getItem(ee);e&&j({type:"CART_FETCH",payload:{cartId:e}})}catch(e){console.warn("error fetching cartId"),console.warn(e)}}F.current=!0,z(!0)}}),[b,F,j]),(0,i.useEffect)((()=>{Y&&!V.current&&j({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:{countryCode:I,customerAccessToken:w}}})}),[I,w,Y,V,j]);const H=(0,i.useCallback)((e=>{if(!F.current)return console.warn("Cart isn't ready yet");j(e)}),[j]);(0,i.useEffect)((()=>{var e,t,n;if((null==(t=null==(e=null==N?void 0:N.context)?void 0:e.cart)?void 0:t.id)&&be("localStorage"))try{window.localStorage.setItem(ee,null==(n=N.context.cart)?void 0:n.id)}catch(e){console.warn("Failed to save cartId to localStorage",e)}}),[null==(P=null==(x=null==N?void 0:N.context)?void 0:x.cart)?void 0:P.id]),(0,i.useEffect)((()=>{if(B&&be("localStorage"))try{window.localStorage.removeItem(ee)}catch(e){console.warn("Failed to delete cartId from localStorage",e)}}),[B]);const Z=(0,i.useCallback)((e=>{var t,n;I&&!(null==(t=e.buyerIdentity)?void 0:t.countryCode)&&(null==e.buyerIdentity&&(e.buyerIdentity={}),e.buyerIdentity.countryCode=I),w&&!(null==(n=e.buyerIdentity)?void 0:n.customerAccessToken)&&(null==e.buyerIdentity&&(e.buyerIdentity={}),e.buyerIdentity.customerAccessToken=w),H({type:"CART_CREATE",payload:e})}),[I,w,H]),G=function(e){const[t,n]=(0,i.useTransition)(),[r,o]=(0,i.useState)(e),a=(0,i.useRef)(!1);t&&(a.current=!0);const s=(0,i.useRef)(!1);return!t&&a.current&&(s.current=!0),(0,i.useEffect)((()=>{n((()=>{s.current||o(e)}))}),[e]),s.current?e:r}(N),Q=(0,i.useMemo)((()=>{var e,t,n,r;return{...(null==(e=null==G?void 0:G.context)?void 0:e.cart)??{lines:[],attributes:[]},status:Ce(G.value),error:null==(t=null==G?void 0:G.context)?void 0:t.errors,totalQuantity:(null==(r=null==(n=null==G?void 0:G.context)?void 0:n.cart)?void 0:r.totalQuantity)??0,cartCreate:Z,cartReady:q,linesAdd(e){var t,n;(null==(n=null==(t=null==G?void 0:G.context)?void 0:t.cart)?void 0:n.id)?H({type:"CARTLINE_ADD",payload:{lines:e}}):Z({lines:e})},linesRemove(e){H({type:"CARTLINE_REMOVE",payload:{lines:e}})},linesUpdate(e){H({type:"CARTLINE_UPDATE",payload:{lines:e}})},noteUpdate(e){H({type:"NOTE_UPDATE",payload:{note:e}})},buyerIdentityUpdate(e){H({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:e}})},cartAttributesUpdate(e){H({type:"CART_ATTRIBUTES_UPDATE",payload:{attributes:e}})},discountCodesUpdate(e){H({type:"DISCOUNT_CODES_UPDATE",payload:{discountCodes:e}})},cartFragment:E}}),[Z,q,null==(O=null==G?void 0:G.context)?void 0:O.cart,null==(R=null==G?void 0:G.context)?void 0:R.errors,G.value,E,H]);return(0,a.jsx)(ye.Provider,{value:Q,children:e})}function Ce(e){switch(e){case"uninitialized":case"initializationError":return"uninitialized";case"idle":case"cartCompleted":case"error":return"idle";case"cartFetching":return"fetching";case"cartCreating":return"creating";case"cartLineAdding":case"cartLineRemoving":case"cartLineUpdating":case"noteUpdating":case"buyerIdentityUpdating":case"cartAttributesUpdating":case"discountCodesUpdating":return"updating"}}function be(e){let t;try{t=window[e];const n="__storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(e){return!(!(e instanceof DOMException)||22!==e.code&&1014!==e.code&&"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||!t||0===t.length)}}const Ee=(0,i.createContext)(null);function we({children:e,data:t,initialVariantId:n}){const r=(0,i.useMemo)((()=>U(t.variants??{})),[t.variants]);if(!(o=r)||!Array.isArray(o))throw new Error(" requires 'product.variants.nodes' or 'product.variants.edges'");var o;const s=(0,i.useMemo)((()=>function(e){const t=e.reduce(((e,t)=>{var n;if(!t.selectedOptions)throw new Error("'getOptions' requires 'variant.selectedOptions'");return null==(n=null==t?void 0:t.selectedOptions)||n.forEach((t=>{e[(null==t?void 0:t.name)??""]=e[(null==t?void 0:t.name)??""]||new Set,e[(null==t?void 0:t.name)??""].add((null==t?void 0:t.value)??"")})),e}),{});return Object.keys(t).map((e=>({name:e,values:Array.from(t[e])})))}(r)),[r]),[u,c]=(0,i.useState)((()=>Ae(n,r))),[l,d]=(0,i.useState)((()=>Te(u)));(0,i.useEffect)((()=>{const e=Ae(n,r);c(e),d(Te(e))}),[n,r]);const p=(0,i.useCallback)(((e,t)=>{d((n=>{const o={...n,[e]:t};return c(Se(r,o)),o}))}),[d,r]),f=(0,i.useCallback)(((e,t)=>{const n=Se(r,{...l,[e]:t});return(null==n?void 0:n.availableForSale)??!0}),[l,r]),h=(0,i.useMemo)((()=>U(t.sellingPlanGroups??{}).map((e=>({...e,sellingPlans:U((null==e?void 0:e.sellingPlans)??{})})))),[t.sellingPlanGroups]),[v,y]=(0,i.useState)(void 0),m=(0,i.useMemo)((()=>{var e,t;if(u&&v){if(!(null==(e=u.sellingPlanAllocations)?void 0:e.nodes)&&!(null==(t=u.sellingPlanAllocations)?void 0:t.edges))throw new Error(": You must include 'sellingPlanAllocations.nodes' or 'sellingPlanAllocations.edges' in your variants in order to calculate selectedSellingPlanAllocation");return U(u.sellingPlanAllocations).find((e=>{var t;return(null==(t=null==e?void 0:e.sellingPlan)?void 0:t.id)===v.id}))}}),[u,v]),g=(0,i.useMemo)((()=>({product:t,variants:r,variantsConnection:t.variants,options:s,selectedVariant:u,setSelectedVariant:c,selectedOptions:l,setSelectedOption:p,setSelectedOptions:d,isOptionInStock:f,selectedSellingPlan:v,setSelectedSellingPlan:y,selectedSellingPlanAllocation:m,sellingPlanGroups:h,sellingPlanGroupsConnection:t.sellingPlanGroups})),[t,f,s,l,v,m,u,h,p,r]);return(0,a.jsx)(Ee.Provider,{value:g,children:e})}function Ie(){const e=(0,i.useContext)(Ee);if(!e)throw new Error("'useProduct' must be a child of ");return e}function Se(e,t){var n,r;if(e.length&&(null==(r=null==(n=null==e?void 0:e[0])?void 0:n.selectedOptions)?void 0:r.length)===Object.keys(t).length)return null==e?void 0:e.find((e=>Object.entries(t).every((([t,n])=>{var r;return null==(r=null==e?void 0:e.selectedOptions)?void 0:r.some((e=>(null==e?void 0:e.name)===t&&(null==e?void 0:e.value)===n))}))))}function Ae(e,t){if(e){const n=t.find((t=>(null==t?void 0:t.id)===e));return n||console.warn(" received a 'initialVariantId' prop, but could not actually find a variant with that ID"),n}return null===e?null:void 0===e?t.find((e=>null==e?void 0:e.availableForSale))||t[0]:void 0}function Te(e){return(null==e?void 0:e.selectedOptions)?e.selectedOptions.reduce(((e,t)=>(e[(null==t?void 0:t.name)??""]=(null==t?void 0:t.value)??"",e)),{}):{}}function _e(e){const{as:t,onClick:n,defaultOnClick:r,children:o,buttonRef:s,...u}=e,c=(0,i.useCallback)((e=>{if(n){const t=n(e);if("boolean"==typeof t&&!1===t||(null==e?void 0:e.defaultPrevented))return}null==r||r(e)}),[r,n]),l=t||"button";return(0,a.jsx)(l,{ref:s,onClick:c,...u,children:o})}function xe(e){const[t,n]=(0,i.useState)(!1),{variantId:r,quantity:o=1,attributes:s,sellingPlanId:u,onClick:c,children:l,accessibleAddingToCartLabel:d,...p}=e,{status:f,linesAdd:h}=me(),{selectedVariant:v}=Ie(),y=r??(null==v?void 0:v.id)??"",m=null===r||""===y||null===v||t||p.disabled;(0,i.useEffect)((()=>{t&&"idle"===f&&n(!1)}),[f,t]);const g=(0,i.useCallback)((()=>{n(!0),h([{quantity:o,merchandiseId:y||"",attributes:s,sellingPlanId:u}])}),[h,o,y,s,u]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_e,{...p,disabled:m,onClick:c,defaultOnClick:g,children:l}),d?(0,a.jsx)("p",{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},role:"alert","aria-live":"assertive",children:t?d:null}):null]})}const Pe={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART",PAGE_VIEW_2:"PAGE_VIEW_2",COLLECTION_VIEW:"COLLECTION_VIEW",PRODUCT_VIEW:"PRODUCT_VIEW",SEARCH_VIEW:"SEARCH_VIEW"},Oe={article:"article",blog:"blog",captcha:"captcha",cart:"cart",collection:"collection",customersAccount:"customers/account",customersActivateAccount:"customers/activate_account",customersAddresses:"customers/addresses",customersLogin:"customers/login",customersOrder:"customers/order",customersRegister:"customers/register",customersResetPassword:"customers/reset_password",giftCard:"gift_card",home:"index",listCollections:"list-collections",forbidden:"403",notFound:"404",page:"page",password:"password",product:"product",policy:"policy",search:"search"},Re={hydrogen:"hydrogen",headless:"headless"},Ue={hydrogen:"6167201",headless:"12875497473"};function De(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function ke(e){const t={id:"",resource:null,resourceId:null,search:"",searchParams:new URLSearchParams,hash:""};if("string"!=typeof e)return t;try{const{search:n,searchParams:r,pathname:o,hash:i}=new URL(e),a=o.split("/"),s=a[a.length-1],u=a[a.length-2];if(!s||!u)return t;return{id:`${s}${n}${i}`||"",resource:u??null,resourceId:s||null,search:n,searchParams:r,hash:i}}catch{return t}}function $e(e,t){return"object"!=typeof e?{}:(Object.entries(e).forEach((([e,n])=>{n&&(t[e]=n)})),t)}const Le="trekkie_storefront_page_view/1.4",Ve="myshopify.dev";function Ne(e){const t=e,{id:n,resource:r}=ke(t.resourceId),o=r?r.toLowerCase():void 0;return[De(Le,$e({pageType:t.pageType,customerId:parseInt(ke(t.customerId).id||"0"),resourceType:o,resourceId:parseInt(n)},je(t)))]}function je(e){return{appClientId:e.shopifySalesChannel?Ue[e.shopifySalesChannel]:Ue.headless,isMerchantRequest:Fe(e.url),hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:ue(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(ke(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function Fe(e){if("string"!=typeof e)return!1;const t=new URL(e).hostname;return-1!==t.indexOf(Ve)||"localhost"===t}const qe="2025.7.0",Me="custom_storefront_customer_tracking/1.2",ze="page_rendered",Be="collection_page_rendered",Ye="product_page_rendered",We="product_added_to_cart",He="search_submitted";function Ze(e){return{canonical_url:e.canonicalUrl||e.url,customer_id:parseInt(ke(e.customerId).id||"0")}}function Ge(e){return{source:e.shopifySalesChannel||Re.headless,asset_version_id:e.assetVersionId||qe,hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",is_persistent_cookie:e.hasUserConsent,deprecated_visit_token:e.visitToken,unique_token:e.uniqueToken,event_time:Date.now(),event_id:ue(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(ke(e.shopId).id),currency:e.currency,ccpa_enforced:e.ccpaEnforced||!1,gdpr_enforced:e.gdprEnforced||!1,gdpr_enforced_as_string:e.gdprEnforced?"true":"false",analytics_allowed:e.analyticsAllowed||!1,marketing_allowed:e.marketingAllowed||!1,sale_of_data_allowed:e.saleOfDataAllowed||!1}}function Qe(e){return e?e.map((e=>{const t=$e({variant_gid:e.variantGid,category:e.category,sku:e.sku,product_id:parseInt(ke(e.productGid).id),variant_id:parseInt(ke(e.variantGid).id)},{product_gid:e.productGid,name:e.name,variant:e.variantName||"",brand:e.brand,price:parseFloat(e.price),quantity:Number(e.quantity||0)});return JSON.stringify(t)})):[]}function Je(e,t){const{eventName:n,payload:r}=e;if(!r.hasUserConsent)return Promise.resolve();let o=[];const i=r;return n===Pe.PAGE_VIEW?o=o.concat(Ne(i),function(e){const t=e,n=Ze(t),r=t.pageType,o=[];switch(o.push(De(Me,$e({event_name:ze,...n},Ge(t)))),r){case Oe.collection:o.push(De(Me,$e({event_name:Be,...n,collection_name:t.collectionHandle,collection_id:parseInt(ke(t.collectionId).id)},Ge(t))));break;case Oe.product:o.push(De(Me,$e({event_name:Ye,...n,products:Qe(t.products),total_value:t.totalValue},Ge(t))));break;case Oe.search:o.push(De(Me,$e({event_name:He,...n,search_string:t.searchString},Ge(t))))}return o}(i)):n===Pe.ADD_TO_CART?o=o.concat(function(e){const t=e,n=ke(t.cartId);return[De(Me,$e({event_name:We,customerId:t.customerId,cart_token:(null==n?void 0:n.id)?`${n.id}`:null,total_value:t.totalValue,products:Qe(t.products),customer_id:parseInt(ke(t.customerId).id||"0")},Ge(t)))]}(r)):n===Pe.PAGE_VIEW_2?o=o.concat(Ne(i),function(e){const t=e,n=Ze(t);return[De(Me,$e({event_name:ze,...n},Ge(t)))]}(i)):n===Pe.COLLECTION_VIEW?o=o.concat(function(e){const t=e,n=Ze(t);return[De(Me,$e({event_name:Be,...n,collection_name:t.collectionHandle,collection_id:parseInt(ke(t.collectionId).id)},Ge(t)))]}(i)):n===Pe.PRODUCT_VIEW?o=o.concat(function(e){const t=e,n=Ze(t);return[De(Me,$e({event_name:Ye,...n,products:Qe(t.products),total_value:t.totalValue},Ge(t)))]}(i)):n===Pe.SEARCH_VIEW&&(o=o.concat(function(e){const t=e,n=Ze(t);return[De(Me,$e({event_name:He,...n,search_string:t.searchString},Ge(t)))]}(i))),o.length?function(e,t){if("undefined"!=typeof window&&window.navigator&&/Chrome-Lighthouse/.test(window.navigator.userAgent))return Promise.resolve();const n={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(n)}).then((e=>{if(!e.ok)throw new Error("Response failed");return e.text()})).then((e=>{e&&JSON.parse(e).result.forEach((e=>{200!==e.status&&console.error(Xe,"\n\n",e.message)}))})).catch((e=>{console.error(Xe,e)}))}catch(e){return Promise.resolve()}}(o,t):Promise.resolve()}const Xe="sendShopifyAnalytics request is unsuccessful";function Ke(){if("undefined"==typeof document&&(console.error("getClientBrowserParameters should only be used within the useEffect callback or event handlers"),1))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};const[e,t]=function(){try{let e="PerformanceNavigationTiming",t=function(){try{const e=(null==performance?void 0:performance.getEntriesByType)&&(null==performance?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){const e=window.performance.getEntriesByType("navigation")[0].type;return e&&e.toString()}}catch(e){}}();return t||(t=function(){var e,t;try{if(PerformanceNavigation&&null!==(null==(e=null==performance?void 0:performance.navigation)?void 0:e.type)&&void 0!==(null==(t=null==performance?void 0:performance.navigation)?void 0:t.type)){const e=performance.navigation.type;switch(e){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${e}`}}}catch(e){}}(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch(e){}return["error","error"]}(),n=ce(document.cookie);return{uniqueToken:n[oe],visitToken:n[ie],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function et(e){const{cartCreate:t,checkoutUrl:n}=me(),[r,o]=(0,i.useState)(!1),{quantity:s,variantId:u,sellingPlanId:c,onClick:l,attributes:d,children:p,...f}=e;(0,i.useEffect)((()=>{r&&n&&(window.location.href=n)}),[r,n]);const h=(0,i.useCallback)((()=>{o(!0),t({lines:[{quantity:s??1,merchandiseId:u,attributes:d,sellingPlanId:c}]})}),[t,s,u,d,c]);return(0,a.jsx)(_e,{disabled:r??f.disabled,...f,onClick:l,defaultOnClick:h,children:p})}function tt(e){const[t,n]=(0,i.useState)(!1),{status:r,checkoutUrl:o}=me(),{children:s,...u}=e;return(0,i.useEffect)((()=>{t&&o&&"idle"===r&&(window.location.href=o)}),[t,r,o]),(0,a.jsx)(_e,{...u,disabled:t||u.disabled,onClick:()=>n(!0),children:s})}function nt(e){const{countryIsoCode:t,languageIsoCode:n}=K(),r=n.includes("_")?n.replace("_","-"):`${n}-${t}`;if(!r)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to ''. 'locale' is required for 'useMoney()' to work");const o=parseFloat(e.amount);let a=!0;try{new Intl.NumberFormat(r,{style:"currency",currency:e.currencyCode})}catch(e){e instanceof RangeError&&e.message.includes("currency")&&(a=!1)}const{defaultFormatter:s,nameFormatter:u,narrowSymbolFormatter:c,withoutTrailingZerosFormatter:l,withoutCurrencyFormatter:d,withoutTrailingZerosOrCurrencyFormatter:p}=(0,i.useMemo)((()=>{const t=a?{style:"currency",currency:e.currencyCode}:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2};return{defaultFormatter:ot(r,t),nameFormatter:ot(r,{...t,currencyDisplay:"name"}),narrowSymbolFormatter:ot(r,{...t,currencyDisplay:"narrowSymbol"}),withoutTrailingZerosFormatter:ot(r,{...t,minimumFractionDigits:0,maximumFractionDigits:0}),withoutCurrencyFormatter:ot(r,{minimumFractionDigits:2,maximumFractionDigits:2}),withoutTrailingZerosOrCurrencyFormatter:ot(r,{minimumFractionDigits:0,maximumFractionDigits:0})}}),[e.currencyCode,r,a]),f=e=>"currency"===e.type,h=(0,i.useMemo)((()=>({original:()=>e,currencyCode:()=>e.currencyCode,localizedString:()=>{const t=s().format(o);return a?t:`${t} ${e.currencyCode}`},parts:()=>{const t=s().formatToParts(o);return a||t.push({type:"literal",value:" "},{type:"currency",value:e.currencyCode}),t},withoutTrailingZeros:()=>{const t=o%1==0?l().format(o):s().format(o);return a?t:`${t} ${e.currencyCode}`},withoutTrailingZerosAndCurrency:()=>o%1==0?p().format(o):d().format(o),currencyName:()=>{var t;return(null==(t=u().formatToParts(o).find(f))?void 0:t.value)??e.currencyCode},currencySymbol:()=>{var t;return(null==(t=s().formatToParts(o).find(f))?void 0:t.value)??e.currencyCode},currencyNarrowSymbol:()=>{var e;return(null==(e=c().formatToParts(o).find(f))?void 0:e.value)??""},amount:()=>s().formatToParts(o).filter((e=>["decimal","fraction","group","integer","literal"].includes(e.type))).map((e=>e.value)).join("")})),[e,o,a,u,s,c,d,l,p]);return(0,i.useMemo)((()=>new Proxy(h,{get:(e,t)=>{var n;return null==(n=Reflect.get(e,t))?void 0:n.call(null)}})),[h])}const rt=new Map;function ot(e,t){const n=JSON.stringify([e,t]);return function(){let r=rt.get(n);if(!r){try{r=new Intl.NumberFormat(e,t)}catch(n){if(!(n instanceof RangeError&&n.message.includes("currency")))throw n;{const n={...t};delete n.currency,delete n.currencyDisplay,delete n.currencySign,r=new Intl.NumberFormat(e,n)}}rt.set(n,r)}return r}}function it({data:e,as:t,withoutCurrency:n,withoutTrailingZeros:r,measurement:o,measurementSeparator:i="/",...s}){if("string"!=typeof(u=e).amount||!u.amount||"string"!=typeof u.currencyCode||!u.currencyCode)throw new Error(" needs a valid 'data' prop that has 'amount' and 'currencyCode'");var u;const c=nt(e),l=t??"div";let d=c.localizedString;return(n||r)&&(d=n&&!r?c.amount:!n&&r?c.withoutTrailingZeros:c.withoutTrailingZerosAndCurrency),(0,a.jsxs)(l,{...s,children:[d,o&&o.referenceUnit&&(0,a.jsxs)(a.Fragment,{children:[i,o.referenceUnit]})]})}function at(e){const{cost:t}=me(),{amountType:n="total",children:r,...o}=e;let i;return"total"==n?i=null==t?void 0:t.totalAmount:"subtotal"==n?i=null==t?void 0:t.subtotalAmount:"tax"==n?i=null==t?void 0:t.totalTaxAmount:"duty"==n&&(i=null==t?void 0:t.totalDutyAmount),null==i?null:(0,a.jsx)(it,{...o,data:i,children:r})}const st=(0,i.createContext)(null);function ut(){const e=(0,i.useContext)(st);if(null==e)throw new Error("Expected a cart line context but none was found");return e}function ct({children:e,line:t}){return(0,a.jsx)(st.Provider,{value:t,children:e})}function lt(e){const t=ut(),{as:n,...r}=e,o=n||"span";return(0,a.jsx)(o,{...r,children:t.quantity})}function dt(e){const{status:t,linesRemove:n,linesUpdate:r}=me(),o=ut(),{children:s,adjust:u,onClick:c,...l}=e,d=(0,i.useCallback)((()=>{if("remove"===u)return void n([(null==o?void 0:o.id)??""]);const e="decrease"===u?((null==o?void 0:o.quantity)??0)-1:((null==o?void 0:o.quantity)??0)+1;if(e<=0)return void n([(null==o?void 0:o.id)??""]);const t={id:(null==o?void 0:o.id)??"",quantity:e,attributes:(null==o?void 0:o.attributes)??[]};r([t])}),[u,null==o?void 0:o.attributes,null==o?void 0:o.id,null==o?void 0:o.quantity,n,r]),p=l.disabled;return(0,a.jsx)(_e,{...l,onClick:c,defaultOnClick:d,disabled:void 0!==p?p:"idle"!==t,children:s})}const pt={DateTime:"string",Decimal:"string",HTML:"string",URL:"string",Color:"string",UnsignedInt64:"string"},ft={DateTime:"string",Decimal:"string",HTML:"string",ISO8601DateTime:"string",URL:"string",UnsignedInt64:"string"},ht=(0,i.forwardRef)(((e,t)=>{const{data:n,options:r,id:o=n.id,frameBorder:i="0",allow:s="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:u=!0,loading:c="lazy",...l}=e;if(!n.embedUrl)throw new Error(" requires the 'embedUrl' property");let d=n.embedUrl;if(r){const e=new URL(n.embedUrl);for(const[t,n]of Object.entries(r))void 0!==n&&e.searchParams.set(t,n.toString());d=e.toString()}return(0,a.jsx)("iframe",{...l,id:o??n.embedUrl,title:n.alt??n.id??"external video",frameBorder:i,allow:s,allowFullScreen:u,src:d,loading:c,ref:t})})),vt={OPTION:":",END_OF_PREFIX:",",SEQUENCE_GAP:" ",RANGE:"-"},yt=(()=>{const e=new Map;return function(t,n){var r;if(0===t.length)return!1;if(!e.has(n)){const t=new Set;for(const e of mt(n)){t.add(e.join(","));for(let n=0;ne.replace(/^v1_/,"");function Ct(e){return Object.assign({},...e.map((e=>({[e.name]:e.value}))))}function bt(e){return JSON.stringify(Ct(e))}function Et(e){return Array.isArray(e)?JSON.stringify(Object.assign({},...e.map((e=>({[e.name]:e.value}))))):JSON.stringify(e)}const wt=["options","selectedOrFirstAvailableVariant","adjacentVariants"],It=["handle","encodedVariantExistence","encodedVariantAvailability"];function St(e){return console.error(`[h2:error:getProductOptions] product.${e} is missing. Make sure you query for this field from the Storefront API.`),!1}function At(e,t=!1){var n;let r=!0;const o=Object.keys(e);if((t?[...wt,...It]:wt).forEach((e=>{o.includes(e)||(r=St(e))})),e.options){const o=null==e?void 0:e.options[0];if(t&&!(null==o?void 0:o.name)&&(r=St("options.name")),null==(n=null==e?void 0:e.options[0])?void 0:n.optionValues){let n=e.options[0].optionValues[0];t&&!(null==n?void 0:n.name)&&(r=St("options.optionValues.name")),n=e.options[0].optionValues.filter((e=>!!(null==e?void 0:e.firstSelectableVariant)))[0],(null==n?void 0:n.firstSelectableVariant)&&(r=Tt(n.firstSelectableVariant,"options.optionValues.firstSelectableVariant",r,t))}else r=St("options.optionValues")}return e.selectedOrFirstAvailableVariant&&(r=Tt(e.selectedOrFirstAvailableVariant,"selectedOrFirstAvailableVariant",r,t)),e.adjacentVariants&&e.adjacentVariants[0]&&(r=Tt(e.adjacentVariants[0],"adjacentVariants",r,t)),r?e:{}}function Tt(e,t,n,r){var o;let i=n;if(r&&!(null==(o=e.product)?void 0:o.handle)&&(i=St(`${t}.product.handle`)),e.selectedOptions){const n=e.selectedOptions[0];(null==n?void 0:n.name)||(i=St(`${t}.selectedOptions.name`)),(null==n?void 0:n.value)||(i=St(`${t}.selectedOptions.value`))}else i=St(`${t}.selectedOptions`);return i}function _t(e){const t=At(e);if(!t.options)return[];const n={};t.options.map((e=>{var t;null==(t=e.optionValues)||t.map((e=>{if(e.firstSelectableVariant){const t=bt(e.firstSelectableVariant.selectedOptions);n[t]=e.firstSelectableVariant}}))})),t.adjacentVariants.map((e=>{const t=bt(e.selectedOptions);n[t]=e}));const r=t.selectedOrFirstAvailableVariant;if(r){const e=bt(r.selectedOptions);n[e]=r}return Object.values(n)}function xt(e){const t=At(e,!0);if(!t.options)return[];const{options:n,selectedOrFirstAvailableVariant:r,adjacentVariants:o,encodedVariantExistence:i,encodedVariantAvailability:a,handle:s}=t,u=null==r?void 0:r.selectedOptions.map((e=>e.name)),c=n.filter((e=>u&&u.indexOf(e.name)>=0)),l=function(e){return Object.assign({},...e.map((e=>({[e.name]:Object.assign({},...(null==e?void 0:e.optionValues)?e.optionValues.map(((e,t)=>({[e.name]:t}))):[])}))))}(n),d=function(e){return Object.assign({},...e.map((e=>{const t=Et(e.selectedOptions||[]);return{[t]:e}})))}(r?[r,...o]:o),p=Ct(r?r.selectedOptions:[]),f=c.map(((e,t)=>({...e,optionValues:e.optionValues.map((n=>{var r;const o={...p};o[e.name]=n.name;const u=Et(o||[]),c=function(e,t){return Object.keys(e).map((n=>t[n]?t[n][e[n]]:null)).filter((e=>null!==e))}(o||[],l),f=c.slice(0,t+1),h=yt(f,i||""),v=yt(f,a||""),y=d[u]||n.firstSelectableVariant;let m={};y&&(m=Ct(y.selectedOptions||[]));const g=new URLSearchParams(m),C=(null==(r=null==y?void 0:y.product)?void 0:r.handle)||s;return{...n,variant:y,handle:C,variantUriQuery:g.toString(),selected:p[e.name]===n.name,exists:h,available:v,isDifferentProduct:C!==s}}))})));return f}const Pt="#graphql\n fragment Image on Image {\n altText\n url\n width\n height\n }\n",Ot=i.forwardRef((({alt:e,aspectRatio:t,crop:n="center",data:r,decoding:o="async",height:s="auto",loader:u=kt,loading:c="lazy",sizes:l,src:d,srcSetOptions:p={intervals:15,startingWidth:200,incrementSize:200,placeholderWidth:100},width:f="100%",...h},v)=>{const y=i.useMemo((()=>{const e=(null==r?void 0:r.width)&&(null==r?void 0:r.height)?null==r?void 0:r.width:void 0,t=(null==r?void 0:r.width)&&(null==r?void 0:r.height)?null==r?void 0:r.height:void 0;return{width:e,height:t,unitsMatch:Boolean($t(e,t))}}),[r]),m=i.useMemo((()=>{const n=Lt((f||"100%").toString()),o=`${n.number}${n.unit}`,i=null==s,a=i?null:Lt(s.toString()),u=a?`${a.number}${a.unit}`:"";return{width:o,height:i?"auto":u,src:d||(null==r?void 0:r.url),alt:(null==r?void 0:r.altText)&&!e?null==r?void 0:r.altText:e||"",aspectRatio:t||(y.unitsMatch?[Vt(y.width),Vt(y.height)].join("/"):void 0)}}),[f,s,d,r,e,t,y,null==h?void 0:h.key]),{intervals:g,startingWidth:C,incrementSize:b,placeholderWidth:E}=p,w=i.useMemo((()=>function(e="100%",t,n,r){const o=Array.from({length:t},((e,t)=>t*r+n)),i=Array.from({length:3},((t,n)=>(n+1)*(Vt(e)??0)));return Nt(e)?i:o}(f,g,C,b)),[f,g,C,b]);return Nt(m.width)?(0,a.jsx)(Rt,{aspectRatio:t,crop:n,decoding:o,height:s,imageWidths:w,loader:u,loading:c,normalizedProps:m,passthroughProps:h,ref:v,width:f,data:r}):(0,a.jsx)(Ut,{aspectRatio:t,crop:n,decoding:o,imageWidths:w,loader:u,loading:c,normalizedProps:m,passthroughProps:h,placeholderWidth:E,ref:v,sizes:l,data:r})})),Rt=i.forwardRef((({aspectRatio:e,crop:t,decoding:n,height:r,imageWidths:o,loader:s=kt,loading:u,normalizedProps:c,passthroughProps:l,width:d,data:p},f)=>{const h=i.useMemo((()=>{const n=Vt(d),i=Vt(r),a=e||($t(c.width,c.height)?[n,i].join("/"):c.aspectRatio?c.aspectRatio:void 0),u=void 0===o?void 0:qt(o,a,t,{width:(null==p?void 0:p.width)??void 0,height:(null==p?void 0:p.height)??void 0}),l=i||(a&&n?n*(Ft(a)??1):void 0);return{width:n,aspectRatio:a,height:l,srcSet:jt(c.src,u,s),src:s({src:c.src,width:n,height:l,crop:"auto"===c.height?void 0:t})}}),[e,t,p,r,o,s,c,d]);return(0,a.jsx)("img",{ref:f,alt:c.alt,decoding:n,height:h.height,loading:u,src:h.src,srcSet:h.srcSet,width:h.width,style:{aspectRatio:h.aspectRatio,...l.style},...l})})),Ut=i.forwardRef((({crop:e,decoding:t,imageWidths:n,loader:r=kt,loading:o,normalizedProps:s,passthroughProps:u,placeholderWidth:c,sizes:l,data:d},p)=>{const f=i.useMemo((()=>{const t=void 0===n?void 0:qt(n,s.aspectRatio,e,{width:(null==d?void 0:d.width)??void 0,height:(null==d?void 0:d.height)??void 0}),o=s.aspectRatio&&c?c*(Ft(s.aspectRatio)??1):void 0;return{placeholderHeight:o,srcSet:jt(s.src,t,r),src:r({src:s.src,width:c,height:o,crop:e})}}),[e,d,n,r,s,c]);return(0,a.jsx)("img",{ref:p,alt:s.alt,decoding:t,height:f.placeholderHeight,loading:o,sizes:l,src:f.src,srcSet:f.srcSet,width:c,...u,style:{width:s.width,aspectRatio:s.aspectRatio,...u.style}})})),Dt="https://placeholder.shopify.com";function kt({src:e,width:t,height:n,crop:r}){if(!e)return"";const o=new URL(e,Dt);return t&&o.searchParams.append("width",Math.round(t).toString()),n&&o.searchParams.append("height",Math.round(n).toString()),r&&o.searchParams.append("crop",r),o.href.replace(Dt,"")}function $t(e="100%",t="auto"){return Lt(e.toString()).unit===Lt(t.toString()).unit}function Lt(e){const t=e.replace(/[0-9.]/g,""),n=parseFloat(e.replace(t,""));return{unit:""===t?void 0===n?"auto":"px":t,number:n}}function Vt(e){if(void 0===e)return;const{unit:t,number:n}=Lt(e.toString());switch(t){case"em":case"rem":return 16*n;case"px":case"":return n;default:return}}function Nt(e){return"number"==typeof e||/\d(px|em|rem)$/.test(e)}function jt(e,t,n=kt){return e?0!==(null==t?void 0:t.length)&&t?t.map(((r,o)=>`${n({src:e,width:r.width,height:r.height,crop:r.crop})} ${3===t.length?`${o+1}x`:`${r.width??0}w`}`)).join(", "):e:""}function Ft(e){if(!e)return;const[t,n]=e.split("/");return 1/(Number(t)/Number(n))}function qt(e,t,n="center",r){if(e)return e.map((e=>({width:e,height:t?e*(Ft(t)??1):void 0,crop:n}))).filter((({width:e,height:t})=>!((null==r?void 0:r.width)&&e>r.width||(null==r?void 0:r.height)&&t&&t>r.height)))}const Mt={};function zt(e,t){const[n,r]=(0,i.useState)("loading");return(0,i.useEffect)((()=>{(function(e,t){const n=Mt[e];if(n)return n;const r=new Promise(((n,r)=>{const o=document.createElement("script");(null==t?void 0:t.module)?o.type="module":o.type="text/javascript",o.src=e,o.onload=()=>{n(!0)},o.onerror=()=>{r(!1)},"head"===(null==t?void 0:t.in)?document.head.appendChild(o):document.body.appendChild(o);const i=null==t?void 0:t.attributes;i&&Object.keys(i).forEach((e=>{o.setAttribute(e,i[e])}))}));return Mt[e]=r,r})(e,t).then((()=>r("done"))).catch((()=>r("error")))}),[e]),n}const Bt=(0,i.forwardRef)(((e,t)=>{var n;const{data:r,previewImageOptions:o,id:s=r.id,playsInline:u=!0,controls:c=!0,sourceProps:l={},...d}=e,p=kt({src:(null==(n=r.previewImage)?void 0:n.url)??"",...o});if(!r.sources)throw new Error("