PageSourceSearch

https://storefront-010.beyourahi.workers.dev/assets/index-BmQRDb16.js

js storefront-010.beyourahi.workers.dev collected 2026-10-03 08:11:12 UTC 40,767 bytes, 3 lines download raw bytes

1import{r as l,j as E,f as ce,k as ue,d as Ue,L as pe,P as je,h as Xe,Q as Ze}from"./chunk-QFMPRPBF-Cyfx7RlH.js";const et="modulepreload",tt=function(e){return"/"+e},he={},rt=function(t,r,o){let n=Promise.resolve();if(r&&r.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),c=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));n=a(r.map(u=>{if(u=tt(u),u in he)return;he[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":et,d||(h.as="script"),h.crossOrigin="",h.href=u,c&&h.setAttribute("nonce",c),document.head.appendChild(h),d)return new Promise((m,g)=>{h.addEventListener("load",m),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return n.then(a=>{for(const s of a||[])s.status==="rejected"&&i(s.reason);return t().catch(i)})};function W(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(t=>{if(!(t!=null&&t.node))throw new Error("flattenConnection(): Connection edges must contain nodes");return t.node}):[]}var ye="_shopify_y",me="_shopify_s",nt="X-Shopify-VisitToken",ot="X-Shopify-UniqueToken",ae={current:null};function U(){var t,r,o;let e;if(typeof window<"u"&&typeof window.performance<"u")try{const n=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/,i=performance.getEntriesByType("resource");let a;for(let s=i.length-1;s>=0;s--){const c=i[s];if(c.initiatorType!=="fetch")continue;const u=window.location.host,d=c.name.match(n);if(!d)continue;const[,f,h]=d;if(f===u||h&&(f!=null&&f.endsWith(`.${u}`))){const m=ge(c);if(m){a=m;break}}}if(a&&(e=a),e?ae.current=e:ae.current&&(e=ae.current),!e){const s=performance.getEntriesByType("navigation")[0];e=ge(s,!1)}}catch{}if(!e){const n=typeof arguments[0]=="string"?arguments[0]:typeof document<"u"?document.cookie:"";e={uniqueToken:((t=n.match(/\b_shopify_y=([^;]+)/))==null?void 0:t[1])||"",visitToken:((r=n.match(/\b_shopify_s=([^;]+)/))==null?void 0:r[1])||"",consent:((o=n.match(/\b_tracking_consent=([^;]+)/))==null?void 0:o[1])||""}}return e}function ge(e,t=!0){let r="",o="",n="";const i=e.serverTiming;if(i&&i.length>=3)for(let a=i.length-1;a>=0;a--){const{name:s,description:c}=i[a];if(!(!s||!c)&&(s==="_y"?r=c:s==="_s"?o=c:s==="_cmp"&&(n=c),r&&o&&n))break}return r&&o&&(!t||n)?{uniqueToken:r,visitToken:o,consent:n}:void 0}var I={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"},j={collection:"collection",product:"product",search:"search"},at={headless:"headless"},ve={hydrogen:"6167201",headless:"12875497473"};function D(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function T(e){const t={id:"",resource:null,resourceId:null,search:"",searchParams:new URLSearchParams,hash:""};if(typeof e!="string")return t;try{const{search:r,searchParams:o,pathname:n,hash:i}=new URL(e),a=n.split("/"),s=a[a.length-1],c=a[a.length-2];return!s||!c?t:{id:`${s}${r}${i}`||"",resource:c??null,resourceId:s||null,search:r,searchParams:o,hash:i}}catch{return t}}function A(e,t){return typeof e!="object"?{}:(Object.entries(e).forEach(([r,o])=>{o&&(t[r]=o)}),t)}function it(e){return typeof document>"u"?(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0):!1}var we="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function te(){let e="";try{const t=window.crypto,r=new Uint16Array(31);t.getRandomValues(r);let o=0;e=we.replace(/[x]/g,n=>{const i=r[o]%16,a=n==="x"?i:i&3|8;return o++,a.toString(16)}).toUpperCase()}catch{e=we.replace(/[x]/g,r=>{const o=Math.random()*16|0;return(r==="x"?o:o&3|8).toString(16)}).toUpperCase()}return`${st()}-${e}`}function st(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}var ct="trekkie_storefront_page_view/1.4",ut="myshopify.dev";function _e(e){const t=e,{id:r,resource:o}=T(t.resourceId),n=o?o.toLowerCase():void 0;return[D(ct,A({pageType:t.pageType,customerId:parseInt(T(t.customerId).id||"0"),resourceType:n,resourceId:parseInt(r)},lt(t)))]}function lt(e){return{appClientId:e.shopifySalesChannel?ve[e.shopifySalesChannel]:ve.headless,isMerchantRequest:dt(e.url),hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:te(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(T(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function dt(e){if(typeof e!="string")return!1;const t=new URL(e).hostname;return t.indexOf(ut)!==-1||t==="localhost"}var O="custom_storefront_customer_tracking/1.2",$e="page_rendered",qe="collection_page_rendered",Be="product_page_rendered",ft="product_added_to_cart",We="search_submitted";function G(e){return{canonical_url:e.canonicalUrl||e.url,customer_id:parseInt(T(e.customerId).id||"0")}}function pt(e){const t=e,r=G(t),o=t.pageType,n=[];switch(n.push(D(O,A({event_name:$e,...r},x(t)))),o){case j.collection:n.push(D(O,A({event_name:qe,...r,collection_name:t.collectionHandle,collection_id:parseInt(T(t.collectionId).id)},x(t))));break;case j.product:n.push(D(O,A({event_name:Be,...r,products:le(t.products),total_value:t.totalValue},x(t))));break;case j.search:n.push(D(O,A({event_name:We,...r,search_string:t.searchString},x(t))));break}return n}function ht(e){const t=e;return[D(O,A({event_name:$e,...G(t)},x(t)))]}function yt(e){const t=e;return[D(O,A({event_name:qe,...G(t),collection_name:t.collectionHandle,collection_id:parseInt(T(t.collectionId).id)},x(t)))]}function mt(e){const t=e;return[D(O,A({event_name:Be,...G(t),products:le(t.products),total_value:t.totalValue},x(t)))]}function gt(e){const t=e;return[D(O,A({event_name:We,...G(t),search_string:t.searchString},x(t)))]}function vt(e){const t=e,r=T(t.cartId);return[D(O,A({event_name:ft,customerId:t.customerId,cart_token:r!=null&&r.id?`${r.id}`:null,total_value:t.totalValue,products:le(t.products),customer_id:parseInt(T(t.customerId).id||"0")},x(t)))]}function x(e){const t=e;return{source:e.shopifySalesChannel||at.headless,asset_version_id:e.assetVersionId||"2026.4.2",hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",is_persistent_c
1ookie:e.hasUserConsent,deprecated_visit_token:e.visitToken,unique_token:e.uniqueToken,event_time:Date.now(),event_id:te(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(T(e.shopId).id),currency:e.currency,ccpa_enforced:t.ccpaEnforced||!1,gdpr_enforced:t.gdprEnforced||!1,gdpr_enforced_as_string:t.gdprEnforced?"true":"false",analytics_allowed:e.analyticsAllowed||!1,marketing_allowed:e.marketingAllowed||!1,sale_of_data_allowed:e.saleOfDataAllowed||!1}}function le(e){return e?e.map(t=>{const r=A({variant_gid:t.variantGid,category:t.category,sku:t.sku,product_id:parseInt(T(t.productGid).id),variant_id:parseInt(T(t.variantGid).id)},{product_gid:t.productGid,name:t.name,variant:t.variantName||"",brand:t.brand,price:parseFloat(t.price),quantity:Number(t.quantity||0)});return JSON.stringify(r)}):[]}function H(e,t){const{eventName:r,payload:o}=e;if(!o.hasUserConsent)return Promise.resolve();let n=[];const i=o;return r===I.PAGE_VIEW?n=n.concat(_e(i),pt(i)):r===I.ADD_TO_CART?n=n.concat(vt(o)):r===I.PAGE_VIEW_2?n=n.concat(_e(i),ht(i)):r===I.COLLECTION_VIEW?n=n.concat(yt(i)):r===I.PRODUCT_VIEW?n=n.concat(mt(i)):r===I.SEARCH_VIEW&&(n=n.concat(gt(i))),n.length?_t(n,t):Promise.resolve()}function wt(){return typeof window>"u"||!window.navigator?!1:/Chrome-Lighthouse/.test(window.navigator.userAgent)}var Ee="sendShopifyAnalytics request is unsuccessful";function _t(e,t){if(wt())return Promise.resolve();const r={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(r)}).then(o=>{if(!o.ok)throw new Error("Response failed");return o.text()}).then(o=>{o&&JSON.parse(o).result.forEach(n=>{n.status!==200&&console.error(Ee,`
2
3`,n.message)})}).catch(o=>{console.error(Ee,o)})}catch{return Promise.resolve()}}function Et(){if(it("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};const[e,t]=kt(),r=U();return{uniqueToken:r.uniqueToken,visitToken:r.visitToken,url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function Pt(){try{const e=(performance==null?void 0:performance.getEntriesByType)&&(performance==null?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){const t=window.performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch{}}function Ct(){var e,t;try{if(PerformanceNavigation&&((e=performance==null?void 0:performance.navigation)==null?void 0:e.type)!==null&&((t=performance==null?void 0:performance.navigation)==null?void 0:t.type)!==void 0){const r=performance.navigation.type;switch(r){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${r}`}}}catch{}}function kt(){try{let e="PerformanceNavigationTiming",t=Pt();return t||(t=Ct(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch{}return["error","error"]}var Pe={};function Tt(e,t){const r=Pe[e];if(r)return r;const o=new Promise((n,i)=>{const a=document.createElement("script");t!=null&&t.module?a.type="module":a.type="text/javascript",a.src=e,a.onload=()=>{n(!0)},a.onerror=()=>{i(!1)},(t==null?void 0:t.in)==="head"?document.head.appendChild(a):document.body.appendChild(a);const s=t==null?void 0:t.attributes;s&&Object.keys(s).forEach(c=>{a.setAttribute(c,s[c])})});return Pe[e]=o,o}function de(e,t){const[r,o]=l.useState("loading");return l.useEffect(()=>{Tt(e,t).then(()=>o("done")).catch(()=>o("error"))},[e]),r}function It(e,t,r={}){let o=e+"="+encodeURIComponent(t);return r.expires&&(o+="; Expires="+new Date(r.expires).toUTCString()),r.maxage!=null&&r.maxage>=0&&(o+="; Max-Age="+(r.maxage|0)),r.domain&&(o+="; Domain="+r.domain),r.path&&(o+="; Path="+r.path),r.samesite&&(o+="; SameSite="+r.samesite),(r.secure||r.samesite==="None")&&(o+="; Secure"),r.httponly&&(o+="; HttpOnly"),o}var At=3600*24*360*1,St=1800;function Me(e){const{hasUserConsent:t,domain:r="",checkoutDomain:o="",storefrontAccessToken:n,fetchTrackingValues:i,ignoreDeprecatedCookies:a=!1}=e||{},s=bt({storefrontAccessToken:n,fetchTrackingValues:i,checkoutDomain:o});return l.useEffect(()=>{if(a||!s)return;let c=r||window.location.host;if(o){const d=o.split(".").reverse(),f=c.split(".").reverse(),h=[];d.forEach((m,g)=>{m===f[g]&&h.push(m)}),c=h.reverse().join(".")}/^localhost/.test(c)&&(c="");const u=c?/^\./.test(c)?c:`.${c}`:"";if(t){const d=U();if((d.uniqueToken||d.visitToken||"").startsWith("00000000-"))return;J(ye,d.uniqueToken||te(),At,u),J(me,d.visitToken||te(),St,u)}else J(ye,"",0,u),J(me,"",0,u)},[s,t,r,o,a]),s}function J(e,t,r,o){document.cookie=It(e,t,{maxage:r,domain:o,samesite:"Lax",path:"/"})}async function Ce(e,t=""){const{uniqueToken:r,visitToken:o}=U(),n=await fetch(`${t.replace(/\/+$/,"")}/api/unstable/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json",...e&&{"X-Shopify-Storefront-Access-Token":e},...o||r?{[nt]:o,[ot]:r}:void 0},body:JSON.stringify({query:"query ensureCookies { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }"})});if(!n.ok)throw new Error(`Failed to fetch consent from browser: ${n.status} ${n.statusText}`);await n.json(),U()}function bt({checkoutDomain:e,storefrontAccessToken:t,fetchTrackingValues:r=!1}){const[o,n]=l.useState(!r),i=l.useRef(!1);return l.useEffect(()=>{if(!r){n(!0);return}i.current||(i.current=!0,Ce(t).catch(a=>
3e?Ce(t,e):Promise.reject(a)).catch(a=>{console.warn("[h2:warn:useShopifyCookies] Failed to fetch tracking values from browser: "+(a instanceof Error?a.message:String(a)))}).finally(()=>{n(!0)}))},[e,r,t]),o}function ne(e){let{type:t,data:r={},customData:o}=e,n=ue(),{publish:i,cart:a,prevCart:s,shop:c,customData:u}=oe(),d=n.pathname+n.search,f={...r,customData:{...u,...o},cart:a,prevCart:s,shop:c};return l.useEffect(()=>{c!=null&&c.shopId&&(f={...f,url:window.location.href},i(t,f))},[i,d,c==null?void 0:c.shopId]),null}function Dt(e){return E.jsx(ne,{...e,type:"page_viewed"})}function Ot(e){return E.jsx(ne,{...e,type:"product_viewed"})}function xt(e){return E.jsx(ne,{...e,type:"collection_viewed"})}function Lt(e){return E.jsx(ne,{...e,type:"search_viewed"})}var b={PAGE_VIEWED:"page_viewed",PRODUCT_VIEWED:"product_viewed",COLLECTION_VIEWED:"collection_viewed",CART_VIEWED:"cart_viewed",SEARCH_VIEWED:"search_viewed",PRODUCT_ADD_TO_CART:"product_added_to_cart"},Rt="_sfapi_proxy",Nt="_server_tracking";function Ge(e){var t,r;if(typeof window>"u")return!1;try{return!!((r=(t=window.performance.getEntriesByType("navigation")[0])==null?void 0:t.serverTiming)!=null&&r.some(o=>o.name===e))}catch{return!1}}function Vt(){return Ge(Rt)}function Ut(){return Ge(Nt)}var jt="https://cdn.shopify.com/shopifycloud/consent-tracking-api/v0.2/consent-tracking-api.js",$t="https://cdn.shopify.com/shopifycloud/privacy-banner/storefront-banner.js";function ie(e){console.error(`[h2:error:useCustomerPrivacy] Unable to setup Customer Privacy API: Missing consent.${e} configuration.`)}function qt(e){let{withPrivacyBanner:t=!1,onVisitorConsentCollected:r,onReady:o,checkoutDomain:n,storefrontAccessToken:i,country:a,locale:s,sameDomainForStorefrontApi:c}=e,u=l.useMemo(()=>c??Vt(),[c]),d=l.useMemo(()=>u&&!Ut(),[u]),f=Me({fetchTrackingValues:d,storefrontAccessToken:i,ignoreDeprecatedCookies:!0}),h=l.useMemo(U,[f]),{revalidate:m}=Ze();de(t?$t:jt,{attributes:{id:"customer-privacy-api"}});let{observing:g,setLoaded:p,apisLoaded:y}=Wt({withPrivacyBanner:t}),v=l.useMemo(()=>{n||ie("checkoutDomain"),i||ie("storefrontAccessToken"),(i.startsWith("shpat_")||i.length!==32)&&console.error("[h2:error:useCustomerPrivacy] It looks like you passed a private access token, make sure to use the public token");let _=Mt(n);return{checkoutRootDomain:u&&typeof window<"u"?window.location.host:n,storefrontRootDomain:_?"."+_:void 0,storefrontAccessToken:i,country:a,locale:s}},[ie,n,i,a,s]);l.useEffect(()=>{let _=w=>{let S=U();if((h.visitToken!==S.visitToken||h.uniqueToken!==S.uniqueToken)&&m().catch(()=>{console.warn("[h2:warn:useCustomerPrivacy] Revalidation failed after consent change.")}),r){let C=$();if(C!=null&&C.shouldShowBanner()){let k=C.currentVisitorConsent();if(k&&k.marketing===""&&k.analytics===""&&k.preferences==="")return}r(w.detail)}};return document.addEventListener("visitorConsentCollected",_),()=>{document.removeEventListener("visitorConsentCollected",_)}},[r]),l.useEffect(()=>{if(!t||g.current.privacyBanner)return;g.current.privacyBanner=!0;let _=window.privacyBanner||void 0;Object.defineProperty(window,"privacyBanner",{configurable:!0,get(){return _},set(w){typeof w=="object"&&w!==null&&"showPreferences"in w&&"loadBanner"in w&&(_=Ie({privacyBanner:w,config:v}),p.privacyBanner())}})},[t,v,Ie,p.privacyBanner]),l.useEffect(()=>{if(g.current.customerPrivacy)return;g.current.customerPrivacy=!0;let _=null,w=null,S=window.Shopify||void 0;Object.defineProperty(window,"Shopify",{configurable:!0,get(){return S},set(C){typeof C=="object"&&C!==null&&Object.keys(C).length===0&&(S=C,_={backendConsentEnabled:!0},Object.defineProperty(window.Shopify,"customerPrivacy",{configurable:!0,get(){return w??_},set(k){if(typeof k=="object"&&k!==null&&"setTrackingConsent"in k){let q=k;w={...q,setTrackingConsent:Te({customerPrivacy:q,config:v})},S={...S,customerPrivacy:w},p.customerPrivacy()}}}))}})},[v,Te,p.customerPrivacy]),l.useEffect(()=>{if(!y||!f)return;let _=$();if(_&&!_.cachedConsent){let w=U();w.consent&&(_.cachedConsent=w.consent)}if(t){let w=re();w&&w.loadBanner(v)}Bt(),o==null||o()},[y,f]);let P={customerPrivacy:$()};return t&&(P.privacyBanner=re()),P}var ke=!1;function Bt(){if(ke)return;ke=!0;let e=new CustomEvent("shopifyCustomerPrivacyApiLoaded");document.dispatchEvent(e)}function Wt({withPrivacyBanner:e}){let t=l.useRef({customerPrivacy:!1,privacyBanner:!1}),[r,o]=l.useState(e?[!1,!1]:[!1]),n=r.every(Boolean);return{observing:t,setLoaded:{customerPrivacy:()=>{o(e?i=>[!0,i[1]]:()=>[!0])},privacyBanner:()=>{e&&o(i=>[i[0],!0])}},apisLoaded:n}}function Mt(e){if(typeof window>"u")return;let t=window.location.host,r=e.split(".").reverse(),o=t.split(".").reverse(),n=[];return r.forEach((i,a)=>{i===o[a]&&n.push(i)}),n.reverse().join(".")||void 0}function Te({customerPrivacy:e,config:t}){let r=e.setTrackingConsent,{locale:o,country:n,...i}=t;function a(s,c){r({...i,headlessStorefront:!0,...s},c)}return a}function Ie({privacyBanner:e,config:t}){let r=e.loadBanner,o=e.showPreferences;function n(a){if(typeof a=="object"){r({...t,...a});return}r(t)}function i(a){if(typeof a=="object"){o({...t,...a});return}o(t)}return{loadBanner:n,showPreferences:i}}function $(){var e;try{let t=(e=window.Shopify)==null?void 0:e.customerPrivacy;return t&&"setTrackingConsent"in t?t:null}catch{return null}}function re(){try{return window&&(window!=null&&window.privacyBanner)?window.privacyBanner:null}catch{return null}}var Gt="2026.4.2";function Ht(){let e=$();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 Ft({consent:e,onReady:t,domain:r}){let{subscribe:o,register:n,canTrack:i}=oe(),[a,s]=l.useState(!1),[c,u]=l.useState(!1),[d,f]=l.useState(""),h=l.useRef(!1),{checkoutDomain:m,storefrontAccessToken:g,language:p}=e,{ready:y}=n("Internal_Shopify_Analytics");qt({...e,locale:p,checkoutDomain:m||"mock.shop",storefrontAccessToken:g||"abcdefghijklmnopqrstuvwxyz123456",onReady:()=>!e.withPrivacyBanner&&u(!0),onVisitorConsentCollected:P=>{try{f(JSON.stringify(P))}catch{}u(!0)}});let v=l.useMemo(()=>c?i():!0,[c,i,d]);return Me({hasUserConsent:v,domain:r,checkoutDomain:m,fetchTrackingValues:!1,ignoreDeprecatedCookies:!c}),l.useEffect(()=>{h.current||(h.current=!0,o(b.PAGE_VIEWED,Kt),o(b.PRODUCT_VIEWED,Yt),o(b.COLLECTION_VIEWED,Qt),o(b.SEARCH_VIEWED,zt),o(b.PRODUCT_ADD_TO_CART,Xt),s(!0))},[o]),l.useEffect(()=>{a&&c&&(y(),t())},[a,c,t]),null}function K(e){console.error(`[h2:error:ShopifyAnalytics] Unable to send Shopify analytics: Missing shop.${e} configuration.`)}function F(e){var o,n,i,a;let t=Ht(),r=t.analyticsProcessingAllowed();if(!((o=e==null?void 0:e.shop)!=null&&o.shopId)){K("shopId");return}if(!((n=e==null?void 0:e.shop)!=null&&n.acceptedLanguage)){K("acceptedLanguage");return}if(!((i=e==null?void 0:e.shop)!=null&&i.currency)){K("currency");return}if(!((a=e==null?void 0:e.shop)!=null&&a.hydrogenSubchannelId)){K("hydrogenSubchannelId");return}return{shopifySalesChannel:"hydrogen",assetVersionId:Gt,...e.shop,hasUserConsent:r,...Et(),analyticsAllowed:t.analyticsProcessingAllowed(),marketingAllowed:t.marketingAllowed(),saleOfDataAllowed:t.saleOfDataAllowed(),ccpaEnforced:!t.saleOfDataAllowed(),gdprEnforced:!(t.marketingAllowed()&&t.anal
3yticsProcessingAllowed())}}function Jt(e,t){if(t===null)return;let r=F(e);return r?{...r,cartId:t.id}:void 0}var R={};function Kt(e){let t=F(e);t&&(H({eventName:I.PAGE_VIEW_2,payload:{...t,...R}}),R={})}function Yt(e){let t=F(e);if(t&&He({type:"product",products:e.products})){let r=se(e.products);R={pageType:j.product,resourceId:r[0].productGid},t={...t,...R,products:se(e.products)},H({eventName:I.PRODUCT_VIEW,payload:t})}}function Qt(e){let t=F(e);t&&(R={pageType:j.collection,resourceId:e.collection.id},t={...t,...R,collectionHandle:e.collection.handle,collectionId:e.collection.id},H({eventName:I.COLLECTION_VIEW,payload:t}))}function zt(e){let t=F(e);t&&(R={pageType:j.search},t={...t,...R,searchString:e.searchTerm},H({eventName:I.SEARCH_VIEW,payload:t}))}function Xt(e){let{cart:t,currentLine:r}=e,o=Jt(e,t);!o||!(r!=null&&r.id)||Zt({matchedLine:r,eventPayload:o})}function Zt({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};He({type:"cart",products:[r]})&&H({eventName:I.ADD_TO_CART,payload:{...t,products:se([r])}})}function N(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 He({type:e,products:t}){return!t||t.length===0?(N(e,"",!1,"data.products"),!1):(t.forEach(r=>{if(!r.id)return N(e,"id",!1),!1;if(!r.title)return N(e,"title",!1),!1;if(!r.price)return N(e,"price.amount",!0,"price"),!1;if(!r.vendor)return N(e,"vendor",!1),!1;if(!r.variantId)return N(e,"id",!0,"variantId"),!1;if(!r.variantTitle)return N(e,"title",!0,"variantTitle"),!1}),!0)}function se(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 Ae(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 er({cart:e,setCarts:t}){let{publish:r,shop:o,customData:n,canTrack:i,cart:a,prevCart:s}=oe(),c=l.useRef(null);return l.useEffect(()=>{if(e)return Promise.resolve(e).then(u=>{if(u&&u.lines){if(!u.id){Ae("id");return}if(!u.updatedAt){Ae("updatedAt");return}}t(({cart:d,prevCart:f})=>(u==null?void 0:u.updatedAt)!==(d==null?void 0:d.updatedAt)?{cart:u,prevCart:d}:{cart:d,prevCart:f})}),()=>{}},[t,e]),l.useEffect(()=>{if(!a||!(a!=null&&a.updatedAt)||(a==null?void 0:a.updatedAt)===(s==null?void 0:s.updatedAt))return;let u;try{u=JSON.parse(localStorage.getItem("cartLastUpdatedAt")||"")}catch{u=null}if(a.id===(u==null?void 0:u.id)&&a.updatedAt===(u==null?void 0:u.updatedAt))return;let d={eventTimestamp:Date.now(),cart:a,prevCart:s,shop:o,customData:n};if(a.updatedAt===c.current)return;c.current=a.updatedAt,r("cart_updated",d),localStorage.setItem("cartLastUpdatedAt",JSON.stringify({id:a.id,updatedAt:a.updatedAt}));let f=s!=null&&s.lines?W(s==null?void 0:s.lines):[],h=a.lines?W(a.lines):[];f==null||f.forEach(m=>{let g=h.filter(p=>m.id===p.id);if((g==null?void 0:g.length)===1){let p=g[0];m.quantity<p.quantity?r("product_added_to_cart",{...d,prevLine:m,currentLine:p}):m.quantity>p.quantity&&r("product_removed_from_cart",{...d,prevLine:m,currentLine:p})}else r("product_removed_from_cart",{...d,prevLine:m})}),h==null||h.forEach(m=>{let g=f.filter(p=>m.id===p.id);(!g||g.length===0)&&r("product_added_to_cart",{...d,currentLine:m})})},[a,s,r,o,n,i]),null}var tr="https://cdn.shopify.com/shopifycloud/perf-kit/shopify-perf-kit-spa.min.js";function rr({shop:e}){let t=l.useRef(!1),{subscribe:r,register:o}=oe(),{ready:n}=o("Internal_Shopify_Perf_Kit"),i=de(tr,{attributes:{id:"perfkit","data-application":"hydrogen","data-shop-id":T(e.shopId).id.toString(),"data-storefront-id":e.hydrogenSubchannelId,"data-monorail-region":"global","data-spa-mode":"true","data-resource-timing-sampl
3ing-rate":"100"}});return l.useEffect(()=>{i!=="done"||t.current||(t.current=!0,r(b.PAGE_VIEWED,()=>{var a;(a=window.PerfKit)==null||a.navigate()}),r(b.PRODUCT_VIEWED,()=>{var a;(a=window.PerfKit)==null||a.setPageType("product")}),r(b.COLLECTION_VIEWED,()=>{var a;(a=window.PerfKit)==null||a.setPageType("collection")}),r(b.SEARCH_VIEWED,()=>{var a;(a=window.PerfKit)==null||a.setPageType("search")}),r(b.CART_VIEWED,()=>{var a;(a=window.PerfKit)==null||a.setPageType("cart")}),n())},[r,n,i]),null}var Se=new Set,nr=e=>{Se.has(e)||(console.warn(e),Se.add(e))},be=new Set,De=e=>{be.has(e)||(console.error(new Error(e)),be.add(e))},or={canTrack:()=>!1,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},Fe=l.createContext(or),Z=new Map,M={};function Je(){return Object.values(M).every(Boolean)}function Oe(e,t){var r;Z.has(e)||Z.set(e,new Map),(r=Z.get(e))==null||r.set(t.toString(),t)}var ee=new Map;function xe(e,t){if(!Je()){ee.set(e,t);return}Ke(e,t)}function Ke(e,t){(Z.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 Le(e){return M.hasOwnProperty(e)||(M[e]=!1),{ready:()=>{M[e]=!0,Je()&&ee.size>0&&(ee.forEach((t,r)=>{Ke(r,t)}),ee.clear())}}}function Re(){var e,t;try{return((t=(e=window.Shopify.customerPrivacy)==null?void 0:e.analyticsProcessingAllowed)==null?void 0:t.call(e))??!1}catch{}return!1}function Ne(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 ar({canTrack:e,cart:t,children:r,consent:o,customData:n={},shop:i=null,cookieDomain:a}){var v;let{shop:s}=ir(i),[c,u]=l.useState(!!e),[d,f]=l.useState(!1),[h,m]=l.useState({cart:null,prevCart:null}),[g,p]=l.useState(e?()=>e:()=>Re);if(s)if(/\/68817551382$/.test(s.shopId))nr("[h2:error:Analytics.Provider] - Mock shop is used. Analytics will not work properly.");else{if(!o.checkoutDomain){let P=Ne("consent.checkoutDomain","PUBLIC_CHECKOUT_DOMAIN");De(P)}if(!o.storefrontAccessToken){let P=Ne("consent.storefrontAccessToken","PUBLIC_STOREFRONT_API_TOKEN");De(P)}o!=null&&o.country||(o.country="US"),o!=null&&o.language||(o.language="EN"),o.withPrivacyBanner===void 0&&(o.withPrivacyBanner=!1)}let y=l.useMemo(()=>({canTrack:g,...h,customData:n,publish:g()?xe:()=>{},shop:s,subscribe:Oe,register:Le,customerPrivacy:$(),privacyBanner:re()}),[c,g,h,(v=h.cart)==null?void 0:v.updatedAt,h.prevCart,xe,Oe,n,s,Le,JSON.stringify(M),$,re]);return E.jsxs(Fe.Provider,{value:y,children:[r,!!s&&E.jsx(Dt,{}),!!s&&!!t&&E.jsx(er,{cart:t,setCarts:m}),!!s&&E.jsx(Ft,{consent:o,onReady:()=>{u(!0),p(e?()=>e:()=>Re),f(!0)},domain:a}),!!s&&d&&E.jsx(rr,{shop:s})]})}function oe(){let e=l.useContext(Fe);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of <AnalyticsProvider/>");return e}function ir(e){let[t,r]=l.useState(null);return l.useEffect(()=>(Promise.resolve(e).then(r),()=>{}),[r,e]),{shop:t}}var yr={CollectionView:xt,ProductView:Ot,Provider:ar,SearchView:Lt},Ye="cartFormInput";function V({children:e,action:t,inputs:r,route:o,fetcherKey:n}){let i=Xe({key:n});return E.jsxs(i.Form,{action:o||"",method:"post",children:[(t||r)&&E.jsx("input",{type:"hidden",name:Ye,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(i):e]})}V.INPUT_NAME=Ye;V.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 sr(e){let t={};for(let a of e.entries()){let s=a[0],c=e.getAll(s);t[s]=c.length>1?c:a[1],t[s]==="on"?t[s]=!0:t[s]==="off"&&(t[s]=!1)}let{cartFormInput:r,...o}=t,{action:n,inputs:i}=r?JSON.parse(String(r)):{};return{action:n,inputs:{...i,...o}}}V.getFormInput=sr;var Qe="__h_pending_";function cr(e){return Qe+e}function Ve(e){return e.startsWith(Qe)}function mr(e){let t=je();if(!t||!t.length)return e;let r=e!=null&&e.lines?structuredClone(e):{lines:{nodes:[]}},o=r.lines.nodes,n=!1;for(let{formData:i}of t){if(!i)continue;let a=V.getFormInput(i);if(a.action===V.ACTIONS.LinesAdd)for(let s of a.inputs.lines){if(!s.selectedVariant){console.error("[h2:error:useOptimisticCart] No selected variant was passed in the cart action. Make sure to pass the selected variant if you want to use an optimistic cart");continue}let c=o.find(u=>{var d;return u.merchandise.id===((d=s.selectedVariant)==null?void 0:d.id)});n=!0,c?(c.quantity=(c.quantity||1)+(s.quantity||1),c.isOptimistic=!0):o.unshift({id:cr(s.selectedVariant.id),merchandise:s.selectedVariant,isOptimistic:!0,quantity:s.quantity||1})}else if(a.action===V.ACTIONS.LinesRemove)for(let s of a.inputs.lineIds){let c=o.findIndex(u=>u.id===s);if(c!==-1){if(Ve(o[c].id)){console.error("[h2:error:useOptimisticCart] Tried to remove an optimistic line that has not been added to the cart yet");continue}o.splice(c,1),n=!0}else console.warn(`[h2:warn:useOptimisticCart] Tried to remove line '${s}' but it doesn't exist in the cart`)}else if(a.action===V.ACTIONS.LinesUpdate)for(let s of a.inputs.lines){let c=o.findIndex(u=>s.id===u.id);if(c>-1){if(Ve(o[c].id)){console.error("[h2:error:useOptimisticCart] Tried to update an optimistic line that has not been added to the cart yet");continue}o[c].quantity=s.quantity,o[c].quantity===0&&o.splice(c,1),n=!0}else console.warn(`[h2:warn:useOptimisticCart] Tried to update line '${s.id}' but it doesn't exist in the cart`)}}return n&&(r.isOptimistic=n),r.totalQuantity=o.reduce((i,a)=>i+a.quantity,0),r}var ze=l.createContext(void 0),gr=ze.Provider,ur=()=>l.useContext(ze),vr=l.forwardRef((e,t)=>
3{let{waitForHydration:r,src:o,...n}=e,i=ur();return r?E.jsx(lr,{src:o,options:n}):E.jsx("script",{suppressHydrationWarning:!0,...n,src:o,nonce:i,ref:t})});function lr({src:e,options:t}){if(!e)throw new Error("`waitForHydration` with the Script component requires a `src` prop");return de(e,{attributes:t}),null}function wr(e){let t=je(),r={};for(let{formData:o}of t)if((o==null?void 0:o.get("optimistic-identifier"))===e)try{if(o.has("optimistic-data")){let n=JSON.parse(String(o.get("optimistic-data")));Object.assign(r,n)}}catch{}return r}function _r({id:e,data:t}){return E.jsxs(E.Fragment,{children:[E.jsx("input",{type:"hidden",name:"optimistic-identifier",value:e}),E.jsx("input",{type:"hidden",name:"optimistic-data",value:JSON.stringify(t)})]})}function Er({connection:e,children:t=()=>(console.warn("<Pagination> requires children to work properly"),null),namespace:r=""}){let[o,n]=l.useState(!1),i=ce(),a=ue();Ue(),l.useEffect(()=>{i.state==="idle"&&n(!1)},[i.state]);let{endCursor:s,hasNextPage:c,hasPreviousPage:u,nextPageUrl:d,nodes:f,previousPageUrl:h,startCursor:m}=dr(e,r),g=l.useMemo(()=>{var v;return{...a.state,pagination:{...((v=a.state)==null?void 0:v.pagination)||{},[r]:{pageInfo:{endCursor:s,hasPreviousPage:u,hasNextPage:c,startCursor:m},nodes:f}}}},[s,c,u,m,f,r,a.state]),p=l.useMemo(()=>l.forwardRef(function(v,P){return c?l.createElement(pe,{preventScrollReset:!0,...v,to:d,state:g,replace:!0,ref:P,onClick:()=>n(!0)}):null}),[c,d,g]),y=l.useMemo(()=>l.forwardRef(function(v,P){return u?l.createElement(pe,{preventScrollReset:!0,...v,to:h,state:g,replace:!0,ref:P,onClick:()=>n(!0)}):null}),[u,h,g]);return t({state:g,hasNextPage:c,hasPreviousPage:u,isLoading:o,nextPageUrl:d,nodes:f,previousPageUrl:h,NextLink:p,PreviousLink:y})}function Y(e,t){let r=new URLSearchParams(e);return Object.keys((t==null?void 0:t.pagination)||{}).forEach(o=>{let n=o===""?"":`${o}_`,i=`${n}cursor`,a=`${n}direction`;r.delete(i),r.delete(a)}),r.toString()}function B(e){throw new Error(`The Pagination component requires ${"`"+e+"`"} to be a part of your query. See the guide on how to setup your query to include ${"`"+e+"`"}: https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#setup-the-paginated-query`)}function dr(e,t=""){e.pageInfo||B("pageInfo"),typeof e.pageInfo.startCursor>"u"&&B("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&B("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&B("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&B("pageInfo.hasPreviousPage");let r=ce(),o=Ue(),{state:n,search:i,pathname:a}=ue(),s=t?`${t}_cursor`:"cursor",c=t?`${t}_direction`:"direction",u=new URLSearchParams(i).get(c)==="previous",d=l.useMemo(()=>{var p,y,v;return!((p=globalThis==null?void 0:globalThis.window)!=null&&p.__hydrogenHydrated)||!((v=(y=n==null?void 0:n.pagination)==null?void 0:y[t])!=null&&v.nodes)?W(e):u?[...W(e),...n.pagination[t].nodes||[]]:[...n.pagination[t].nodes||[],...W(e)]},[n,e,t]),f=l.useMemo(()=>{var S,C,k,q,fe;let p=(S=globalThis==null?void 0:globalThis.window)==null?void 0:S.__hydrogenHydrated,y=(k=(C=n==null?void 0:n.pagination)==null?void 0:C[t])==null?void 0:k.pageInfo,v=!p||(y==null?void 0:y.startCursor)===void 0?e.pageInfo.startCursor:y.startCursor,P=!
3p||(y==null?void 0:y.endCursor)===void 0?e.pageInfo.endCursor:y.endCursor,_=!p||(y==null?void 0:y.hasPreviousPage)===void 0?e.pageInfo.hasPreviousPage:y.hasPreviousPage,w=!p||(y==null?void 0:y.hasNextPage)===void 0?e.pageInfo.hasNextPage:y.hasNextPage;return(fe=(q=n==null?void 0:n.pagination)==null?void 0:q[t])!=null&&fe.nodes&&(u?(v=e.pageInfo.startCursor,_=e.pageInfo.hasPreviousPage):(P=e.pageInfo.endCursor,w=e.pageInfo.hasNextPage)),{startCursor:v,endCursor:P,hasPreviousPage:_,hasNextPage:w}},[u,n,t,e.pageInfo.hasNextPage,e.pageInfo.hasPreviousPage,e.pageInfo.startCursor,e.pageInfo.endCursor]),h=l.useRef({params:Y(i,n),pathname:a});l.useEffect(()=>{window.__hydrogenHydrated=!0},[]),l.useEffect(()=>{let p=Y(i,n),y=h.current.params;(a!==h.current.pathname||p!==y)&&!(r.state==="idle"&&!r.location)&&(h.current={pathname:a,params:Y(i,n)},o(`${a}?${Y(i,n)}`,{replace:!0,preventScrollReset:!0,state:{nodes:void 0,pageInfo:void 0}}))},[a,i,n]);let m=l.useMemo(()=>{let p=new URLSearchParams(i);return p.set(c,"previous"),f.startCursor&&p.set(s,f.startCursor),`?${p.toString()}`},[i,f.startCursor]),g=l.useMemo(()=>{let p=new URLSearchParams(i);return p.set(c,"next"),f.endCursor&&p.set(s,f.endCursor),`?${p.toString()}`},[i,f.endCursor]);return{...f,previousPageUrl:m,nextPageUrl:g,nodes:d}}function Pr(e,t){let r=ce(),[o,n]=l.useState([]);if(l.useEffect(()=>{Promise.resolve(t).then(i=>{var a,s;i&&n(i instanceof Array?i:((s=(a=i.product)==null?void 0:a.variants)==null?void 0:s.nodes)||[])}).catch(i=>{reportError(new Error("[h2:error:useOptimisticVariant] An error occurred while resolving the variants for the optimistic product hook.",{cause:i}))})},[JSON.stringify(t)]),r.state==="loading"){let i=new URLSearchParams(r.location.search),a=!1,s=o.find(c=>c.selectedOptions?c.selectedOptions.every(u=>i.get(u.name)===u.value):(a||(a=!0,reportError(new Error("[h2:error:useOptimisticVariant] The optimistic product hook requires your product query to include variants with the selectedOptions field."))),!1));if(s)return{...s,isOptimistic:!0}}return e}var L="Error in SEO input: ",Q={title:{validate:e=>{if(typeof e!="string")throw new Error(L.concat("`title` should be a string"));if(typeof e=="string"&&e.length>70)throw new Error(L.concat("`title` should not be longer than 70 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(L.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(L.concat("`description` should not be longer than 160 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(L.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(L.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(L.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(L.concat("`handle` should start with `@`"));return e}}};function fr(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function pr(e){switch(e&&e.split(".").pop()){case"svg":return"image/svg+xml";case"png":return"image/png";case"gif":return"image/gif";case"swf":return"application/x-shockwave-flash";case"mp3":return"audio/mpeg";default:return"image/jpeg"}}function z(e){return Array.isArray(e)?e:[e]}function X(e,t){try{return e.validate(t)}catch(r){return console.warn(r.message),t}}function Cr(...e){let t=[],r=e.reduce((o,n)=>{if(!n)return o;Object.keys(n).forEach(a=>!n[a]&&delete n[a]);let{jsonLd:i}=n;return i?o!=null&&o.jsonLd?{...o,...n,jsonLd:z(o.jsonLd).concat(i)}:{...o,...n,jsonLd:[i]}:{...o,...n}},{})||{};for(let o of Object.keys(r))switch(o){case"title":{let n=X(Q.title,r.title),i=fr(r==null?void 0:r.titleTemplate,n);if(!i)break;t.push({title:i},{property:"og:title",content:i},{property:"twitter:title",content:i});break}case"description":{let n=X(Q.description,r.description);if(!n)break;t.push({name:"description",content:n},{property:"og:description",content:n},{property:"twitter:description",content:n});break}case"url":{let n=X(Q.url,r.url);if(!n)break;let i=n.split("?")[0].replace(/\/$/,"");t.push({tagName:"link",rel:"canonical",href:i},{property:"og:url",content:i});break}case"handle":{let n=X(Q.handle,r.handle);if(!n)break;t.push({property:"twitter:site",content:n},{property:"twitter:creator",content:n});break}case"media":{let n,i=z(r.media);
3for(let a of i)if(typeof a=="string"&&t.push({property:"og:image",content:a}),a&&typeof a=="object"){let s=a.type||"image",c=a?{url:a==null?void 0:a.url,secure_url:a==null?void 0:a.url,type:pr(a.url),width:a==null?void 0:a.width,height:a==null?void 0:a.height,alt:a==null?void 0:a.altText}:{};for(let u of Object.keys(c))c[u]&&(n=c[u],t.push({property:`og:${s}:${u}`,content:n}))}break}case"jsonLd":{let n=z(r.jsonLd);for(let i of n)typeof i!="object"||Object.keys(i).length===0||t.push({"script:ld+json":i});break}case"alternates":{let n=z(r.alternates);for(let i of n){if(!i)continue;let{language:a,url:s,default:c}=i,u=a?`${a}${c?"-default":""}`:void 0;t.push({tagName:"link",rel:"alternate",hrefLang:u,href:s})}break}case"robots":{if(!r.robots)break;let{maxImagePreview:n,maxSnippet:i,maxVideoPreview:a,noArchive:s,noFollow:c,noImageIndex:u,noIndex:d,noSnippet:f,noTranslate:h,unavailableAfter:m}=r.robots,g=[s&&"noarchive",u&&"noimageindex",f&&"nosnippet",h&&"notranslate",n&&`max-image-preview:${n}`,i&&`max-snippet:${i}`,a&&`max-video-preview:${a}`,m&&`unavailable_after:${m}`],p=(d?"noindex":"index")+","+(c?"nofollow":"follow");for(let y of g)y&&(p+=`,${y}`);t.push({name:"robots",content:p});break}}return t}l.lazy(()=>rt(()=>import("./log-seo-tags-TY72EQWZ-DCHH-_Gl.js"),[]));export{Cr as F,yr as H,gr as L,Pr as P,oe as Z,mr as _,vr as a,_r as d,W as f,Er as m,V as r,wr as u,ur as y};

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