PageSourceSearch

https://geltoynation.com/assets/CategoryGrid-zyq-zENP.js

js geltoynation.com collected 2026-10-04 02:39:07 UTC 6,051 bytes, 1 lines download raw bytes

1import{Q as j,U as x,V as Q,W as S,Y as C,Z as N,_ as k,$ as L,r as m,a0 as q,a1 as H,a2 as M,a3 as A,a4 as w,a5 as P,a6 as B,c as T,a7 as U,j as o,b as _,L as z}from"./index-BCW6nnV8.js";function R(t,s){const e=new Set(s);return t.filter(r=>!e.has(r))}function I(t,s,e){const r=t.slice(0);return r[s]=e,r}var F=class extends j{#r;#e;#n;#a;#s;#t;#i;#o;#l;#c=[];constructor(t,s,e){super(),this.#r=t,this.#a=e,this.#n=[],this.#s=[],this.#e=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(s=>{this.#p(t,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,s){this.#n=t,this.#a=s,x.batch(()=>{const e=this.#s,r=this.#d(this.#n);r.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const n=r.map(l=>l.observer),a=n.map(l=>l.getCurrentResult()),i=e.length!==n.length,u=n.some((l,f)=>l!==e[f]),h=i||u,g=h?!0:a.some((l,f)=>{const b=this.#e[f];return!b||!Q(l,b)});!h&&!g||(h&&(this.#c=r,this.#s=n),this.#e=a,this.hasListeners()&&(h&&(R(e,n).forEach(l=>{l.destroy()}),R(n,e).forEach(l=>{l.subscribe(f=>{this.#p(l,f)})})),this.#f()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,s){const e=this.#d(t),r=e.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),n=e.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>this.#h(a??r,s,n),()=>this.#u(r,e)]}#u(t,s){return s.map((e,r)=>{const n=t[r];return e.defaultedQueryOptions.notifyOnChangeProps?n:e.observer.trackResult(n,a=>{s.forEach(i=>{i.observer.trackProp(a)})})})}#h(t,s,e){if(s){const r=this.#l,n=e!==void 0&&r!==void 0&&(r.length!==e.length||e.some((a,i)=>a!==r[i]));return(!this.#t||this.#e!==this.#o||n||s!==this.#i)&&(this.#i=s,this.#o=this.#e,e!==void 0&&(this.#l=e),this.#t=S(this.#t,s(t))),this.#t}return t}#d(t){const s=new Map;this.#s.forEach(r=>{const n=r.options.queryHash;if(!n)return;const a=s.get(n);a?a.push(r):s.set(n,[r])});const e=[];return t.forEach(r=>{const n=this.#r.defaultQueryOptions(r),i=s.get(n.queryHash)?.shift()??new C(this.#r,n);e.push({defaultedQueryOptions:n,observer:i})}),e}#p(t,s){const e=this.#s.indexOf(t);e!==-1&&(this.#e=I(this.#e,e,s),this.#f())}#f(){if(this.hasListeners()){const t=this.#t,s=this.#u(this.#e,this.#c),e=this.#h(s,this.#a?.combine);t!==e&&x.batch(()=>{this.listeners.forEach(r=>{r(this.#e)})})}}};function W({queries:t,...s},e){const r=N(),n=k(),a=L(),i=m.useMemo(()=>t.map(c=>{const d=r.defaultQueryOptions(c);return d._optimisticResults=n?"isRestoring":"optimistic",d}),[t,r,n]);i.forEach(c=>{q(c);const d=r.getQueryCache().get(c.queryHash);H(c,a,d)}),M(a);const[u]=m.useState(()=>new F(r,i,s)),[h,g,l]=u.getOptimisticResult(i,s.combine),f=!n&&s.subscribed!==!1;m.useSyncExternalStore(m.useCallback(c=>f?u.subscribe(x.batchCalls(c)):A,[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),m.useEffect(()=>{u.setQueries(i,s)},[i,s,u]);const y=h.some((c,d)=>w(i[d],c))?h.flatMap((c,d)=>{const p=i[d];if(p&&w(p,c)){const E=new C(r,p);return P(p,E,a)}return[]}):[];if(y.length>0)throw Promise.all(y);const v=h.find((c,d)=>{const p=i[d];return p&&B({result:c,errorResetBoundary:a,throwOnError:p.throwOnError,query:r.getQueryCache().get(p.queryHash),suspense:p.suspense})});if(v?.error)throw v.error;return g(l())}const D=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Y=T("arrow-right",D),O=[{handle:"us-warehouse",label:"US Warehouse"},{handle:"new-arrival-gel-blasters",label:"New Arrivals"},{handle:"high-powered-adult-gel-blasters",label:"High-Powered Adult Blasters"}];function V(){const t=W({queries:O.map(e=>({queryKey:["shopify","collection",e.handle,1],queryFn:()=>U(e.handle,1),staleTime:3e5}))}),s=t.some(e=>e.isLoading);return o.jsxs("section",{className:"mx-auto max-w-7xl px-4 md:px-6 py-16 md:py-24",children:[o.jsx(G,{eyebrow:"Shop by Collection",title:"Find Your Loadout"}),s?o.jsx("div",{className:"flex justify-center py-16",children:o.jsx(_,{className:"h-8 w-8 animate-spin text-brand"})}):o.jsx("div",{className:"mt-10 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6",children:O.map((e,r)=>{const n=t[r].data,a=n?.products?.edges?.[0]?.node,i=n?.image?.url??a?.images?.edges?.[0]?.node?.url,u=n?.title??e.label,h=n?.products?.edges?.length??0;return o.jsxs(z,{to:"/shop",search:{collection:e.handle},className:"group relative aspect-[4/5] md:aspect-[3/4] overflow-hidden rounded-2xl border border-border bg-surface transition-all duration-300 hover:border-brand/60 hover:-translate-y-1 hover:shadow-[var(--shadow-glow)]",children:[i?o.jsx("img",{src:i,alt:u,loading:"lazy",className:"absolute inset-0 h-full w-full object-cover transition-transform duration-700 group-hover:scale-110"}):o.jsx("div",{className:"absolute inset-0 bg-surface-2"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/50 to-transparent"}),o.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-5 md:p-6",children:[n&&o.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-brand",children:h>0?"Live Collection":"Collection"}),o.jsx("h3",{className:"mt-1 font-display text-2xl md:text-3xl font-extrabold uppercase text-white leading-tight",children:u}),o.jsxs("span",{className:"mt-3 inline-flex items-center gap-1 text-xs font-bold uppercase tracking-wider text-white/90 group-hover:text-brand transition",children:["Shop Now ",o.jsx(Y,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-1"})]})]})]},e.handle)})})]})}function G({eyebrow:t,title:s,subtitle:e}){return o.jsxs("div",{className:"flex flex-col items-start md:items-center md:text-center gap-2",children:[t&&o.jsx("span",{className:"text-xs font-bold uppercase tracking-[0.25em] text-brand",children:t}),o.jsx("h2",{className:"font-display text-3xl md:text-5xl font-extrabold uppercase text-foreground",children:s}),e&&o.jsx("p",{className:"max-w-2xl text-sm md:text-base text-muted-foreground",children:e})]})}
1export{Y as A,V as C,G as S};

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.