PageSourceSearch

https://circusliquorsc.com/assets/route-D4Gcgbmv.js

js circusliquorsc.com collected 2026-10-04 07:37:49 UTC 14,927 bytes, 1 lines download raw bytes

1import{r as m,j as t}from"./jsx-runtime-D2HyDbKh.js";import{D as L}from"./CartProvider-DRDkNzgb.js";import{e as E,a as O,u as U}from"./components-SDhFL-zL.js";import{Q as V,R as B,T as K,v as Z,z,u as H,g as q}from"./root-BpeR1a67.js";import{e as G}from"./notFound-l1yN1R_J.js";import{u as W}from"./useScrollToTop-BZbeTjC4.js";import{c as _}from"./Button-DN0gBET_.js";import{C as I}from"./CatalogSkeleton-BmzWpN0n.js";import{P as Q}from"./PaginationControls-Cyhllp02.js";import{I as X,V as D}from"./ItemPreview-Dkp9pH7P.js";import{D as J}from"./Divider-DTIW_4YD.js";import{F as Y}from"./ChevronUpIcon-CcvVYZ9f.js";import{a as ee,d as te,e as re}from"./index-OGzYKti1.js";import{S as se}from"./shopping-bag-BqYu4B-m.js";import{S as at}from"./ErrorBoundary-Bv7xMbj2.js";import"./index.esm--4BB0KQy.js";import"./firebase.client-CKNaDRR2.js";import"./index-DXqQCM1T.js";import"./index-C9Ymd-py.js";import"./motion-FGmiHZpJ.js";import"./useFirstRender-BfqRfFrL.js";import"./index-CSgRVgty.js";import"./createLucideIcon-iJ9pEJd7.js";import"./check-DLhAKf5E.js";import"./circle-alert-9e1ZjEZ4.js";import"./formatProductVariantAttributes-B4dzlm21.js";import"./performance-0E6KhFrC.js";import"./hub-lKrYKKAf.js";import"./node-5jBVRjIE.js";import"./scroll-restoration-z6xYfQi5.js";import"./Input-CZhQOuOd.js";import"./arrow-left-6qDR8OYQ.js";import"./Loader-B3AeGKAp.js";import"./index-BzOSxPQb.js";import"./shopping-cart-CgbSuC5_.js";import"./ChevronRightIcon-BtKbYLSv.js";import"./StockIndicator-DktI9Z7o.js";import"./errors-2D5e8SUx.js";const ie=({message:e,duration:s=3500})=>{const[r,i]=m.useState("enter");return m.useEffect(()=>{const o=requestAnimationFrame(()=>i("visible")),l=setTimeout(()=>i("exit"),s),n=setTimeout(()=>i("gone"),s+300);return()=>{cancelAnimationFrame(o),clearTimeout(l),clearTimeout(n)}},[s]),r==="gone"?null:t.jsx("div",{className:_("fixed left-1/2 -translate-x-1/2 z-40","bg-white shadow-lg rounded-lg px-4 py-2 text-sm text-gray-700 border border-gray-200","transition-all duration-300 ease-out",r==="enter"&&"opacity-0 -translate-y-2",r==="visible"&&"opacity-100 translate-y-0",r==="exit"&&"opacity-0 -translate-y-2"),style:{top:"calc(var(--header-height, 80px) + 8px)"},role:"status","aria-live":"polite",children:e})};function ne({title:e,titleId:s,...r},i){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s},r),e?m.createElement("title",{id:s},e):null,m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const ae=m.forwardRef(ne);function oe({title:e,titleId:s,...r},i){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":s},r),e?m.createElement("title",{id:s},e):null,m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"}))}const le=m.forwardRef(oe),ce=({count:e,viewMode:s,pageSize:r,page:i,onViewChange:o})=>{const l=i*r,d=`${l-r+1} - ${l>e?e:l} of ${e}`;return t.jsxs("div",{className:"flex items-center justify-between my-4",children:[t.jsxs("div",{className:"text-foreground text-sm font-light leading-tight",children:[d," products"]}),t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(me,{viewMode:s,onViewChange:o}),t.jsx("div",{className:"Line11 h-8 w-px border border-gray-300"}),t.jsx(de,{})]})]})}
1,me=({viewMode:e,onViewChange:s})=>{const r=()=>{s("grid")},i=()=>{s("list")};return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("button",{name:"viewMode",value:"grid","aria-label":"grid-mode button",onClick:r,children:t.jsx(ae,{"data-testid":"grid-mode-button",className:`h-8 w-8 cursor-pointer ${e==="grid"?"text-foreground":"text-gray-500"}`})}),t.jsx("button",{name:"viewMode",value:"list","aria-label":"list-mode button",onClick:i,children:t.jsx(le,{"data-testid":"list-mode-button",style:{transform:"rotate(90deg)"},className:`h-8 w-8 cursor-pointer ml-2 ${e==="list"?"text-foreground":"text-gray-500"}`})})]})},de=()=>{const[e,s]=E(),r=[{sortKey:"PRICE",sortOrder:"asc",display:"Price: Low - High",shortHandDisplay:"$ → $$$"},{sortKey:"PRICE",sortOrder:"desc",display:"Price: High - Low",shortHandDisplay:"$$$ → $"},{sortKey:"NAME",sortOrder:"asc",display:"Alphabetical",shortHandDisplay:"A → Z"},{sortKey:"NAME",sortOrder:"desc",display:"Reverse Alphabetical",shortHandDisplay:"Z → A"}],i=({sortKey:o,sortOrder:l})=>{const n=new URLSearchParams(e);if(o===n.get("sortKey")&&l===n.get("sortOrder")){n.delete("sortKey"),n.delete("sortOrder"),s(n);return}n.set("sortKey",o),n.set("sortOrder",l),s(n)};return t.jsxs(V,{as:"div",className:"relative inline-block text-left",children:[t.jsx(V.Button,{className:"inline-flex items-center justify-start h-5 gap-2 Frame837",children:({open:o})=>t.jsxs("div",{className:"inline-flex items-center gap-2 text-foreground text-base font-medium",children:[t.jsx("span",{children:"Sort by"}),o?t.jsx(Y,{className:"w-5 h-5"}):t.jsx(B,{className:"h-5 w-5 text-primary"})]})}),t.jsx(K,{as:m.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:t.jsx(V.Items,{className:"absolute right-0 z-10 inline-flex flex-col items-end justify-center w-56 gap-3 p-2 mt-2 origin-top-right bg-white border divide-gray-100 shadow-lg top-8 border-neutral-100 ring-1 ring-black/5 focus:outline-none",children:r==null?void 0:r.map((o,l)=>{const{shortHandDisplay:n,display:d,sortKey:c,sortOrder:g}=o,h=l!==r.length-1,u=c===e.get("sortKey")&&g===e.get("sortOrder"),a=()=>i({sortKey:c,sortOrder:g});return t.jsxs(m.Fragment,{children:[t.jsx(V.Item,{children:t.jsxs("button",{type:"button",className:`PriceHighLow text-primary text-base font-medium text-right w-full p-2 transition-all  hover:cursor-pointer ${u?"bg-primary-50 hover:bg-primary-75":"hover:bg-primary-50"}`,onClick:a,children:[t.jsx("p",{className:"text-sm",children:n}),t.jsx("p",{className:"text-sm mb-1",children:d})]})}),h&&t.jsx(J,{className:"bg-[#f2e9db]"})]},`${l}-${c}-${g}`)})})})]})},ue=e=>{const s=e.defaultAvailableVariant;return s?{variant:s,isAvailable:!0}:{variant:void 0,isAvailable:!1}},F=m.memo(({product:e,collectionType:s,viewType:r,CollectionCardConfig:i,index:o,itemListId:l,itemListName:n})=>{const d=s?`/collections/${s}/${e.node.slug}`:`/products/${e.node.slug}`,{variant:c,isAvailable:g}=m.useMemo(()=>ue(e.node),[e.node]);return t.jsx(X,{to:d,product:{id:e.node.id,name:e.node.name,slug:e.node.slug,description:e.node.description,modifierGroup:e.node.modifierGroup,defaultAvailableVariant:c,variants:e.node.variants,isAvailable:g,storeAvailability:e.node.storeAvailability},viewType:r,CollectionCardConfig:i,itemListId:l,itemListName:n,index:o},`${o}-${e.node.id}`)});F.displayName="ProductItem";const ge=({collectionType:e,collectionName:s,products:r,pageInfo:i})=>{var j,P,S;const[o,l]=E(),n=ee(),d=te(),c=re(),h=d.state==="loading"&&((j=d.location)==null?void 0:j.pathname)===n.pathname||c.state==="loading",u=Z(),{selectedStore:a,openSelector:v}=z(),{siteConfigs:p}=H(),[x,f]=m.useState(null),w=m.useRef(0),N=m.useRef(a==null?void 0:a.storeId);m.useEffect(()=>{a&&N.current!==a.storeId&&!h&&r.length>0?(w.current+=1,f(`Showing ${r.length} products at ${a.storeName}`),N.current=a.storeId):a||(N.current=void 0)},[a==null?void 0:a.storeId,a==null?void 0:a.storeName,h,r.length]),m.useEffect(()=>{if(x){const y=setTimeout(()=>f(null),4e3);return()=>clearTimeout(y)}},[x]);const b=o.get("viewMode")??"grid",C=y=>y==="grid"?D.GRID:D.LIST,A=m.useCallback(y=>{const T=new URLSearchParams(o);T.set("viewMode",y),l(T,{replace:!0})},[o,l]),$=`${n.pathname}${n.search?n.search:""}`,k=$.includes("?")?$.replace(/(&|\?)page=\d+/,""):$,M=m.useMemo(()=>C(b),[b]),R=m.useMemo(()=>({count:(i==null?void 0:i.totalEdges)??r.length,pageSize:(i==null?void 0:i.pageSize)??0,page:(i==null?void 0:i.page)??1,viewMode:b,onViewChange:A}),[i,r.length,b,A]);return t.jsxs(t.Fragment,{children:[x&&t.jsx(ie,{message:x},w.current),u&&!a&&t.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-gray-600 mb-2",children:[t.jsx("span",{children:"Showing products from all stores"}),t.jsx("span",{children:"·"}),t.jsx("button",{type:"button",onClick:v,className:"font-medium text-blue-600 hover:text-blue-700 underline",children:"Select a store"})]}),t.jsxs("div",{children:[t.jsx(ce,{...R}),t.jsx("div",{className:_("transition-opacity duration-200",h&&r.length>0?"opacity-50 pointer-events-none":"opacity-100"),children:h&&r.length===0?t.jsx(I,{count:6}):t.jsx("ul",{className:`grid ${b==="grid"?"lg:grid-cols-3 grid-cols-2 gap-collection-grid-gap":"grid-cols-1 gap-collection-grid-gap"}`,"aria-label":"Product List",children:r==null?void 0:r.map((y,T)=>t.jsx(F,{product:y,collectionType:e,viewType:M,CollectionCardConfig:p==null?void 0:p.CollectionCardConfig,index:T,itemListId:e,itemListName:s},`${T}-${y.node.id}`))})}),i&&!((S=(P=p==null?void 0:p.customConfigurations)==null?void 0:P.collections)!=null&&S.disablePagination)&&t.jsx(Q,{pageInfo:i,baseUrl:k})]})]})},he=()=>t.jsx("div",{className:"flex w-full min-h-[50vh]",children:t.jsxs("div",{className:"flex gap-3 flex-col items-center justify-center w-full text-neutral-400",children:[t.jsx(se,{className:"lg:h-24 lg:w-24 h-16 w-16"}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("h3",{className:"lg:text-2xl text-xl font-bold",children:"No items available"}),t.jsx("span",{className:"text-center",children:"This collection is currently empty or items are not available."}),t.jsx("span",{className:"text-center",children:"Please check back later."})]})]})}),pe=({trail:e=[]})=>e.length===0?null:t.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-4 text-sm text-gray-500",children:t.jsx("ol",{className:"p-0 list-none flex flex-wrap",children:e==null?void 0:e.map((s,r)=>t.jsxs("li",{className:"flex items-center",children:[r>0&&t.jsx("span",{className:"mx-2",children:"/"}),r===e.length-1?t.jsx("span",{className:"font-bold text-foreground truncate max-w-[220px]",children:s.label}):t.jsx(O,{to:s.href,className:"text-gray-500 hover:text-gray-700",children:s.label})]},s.href))})}),xe=pe,et=({currentUrl:e,nextUrl:s,defaultShouldRevalidate:r})=>e.pathname!==s.pathname||e.search!==s.search?!0:r,tt={breadcrumb:({data:e})=>`${e==null?void 0:e.title}`},rt=({data:e,matches:s,error:r})=>{var N,b,C,A,$,k,M,R,j,P;const i=(e==null?void 0:e.title)??"Collection",o=(e==null?void 0:e.description)??"",l=(e==null?void 0:e.metaTitle)??i,n=e==null?void 0:e.platformName,d=(($=(A=(C=(b=(N=e==null?void 0:e.products)==null?void 0:N[0])==null?void 0:b.node)==null?void 0:C.defaultAvailableVariant)==null?void 0:A.image)==null?void 0:$.scale1x)??"",c=((R=(M=(k=s==null?void 0:s[0])==null?void 0:k.data)==null?void 0:M.siteConfigs)==null?void 0:R.storeName)??"Home";if(!e)return G(r,"Collection",c);const g=(e==null?void 0:e.currentUrl)??"",h=`Shop ${l} Collection ${n?`| ${n}`:`| ${c}`}`;let u="";e!=null&&e.metaDescription&&(e==null?void 0:e.metaDescription)!==i?u=e.metaDescription:o&&o!==i?u=o:l?u=`Shop ${l} collection at ${n||c}.`:i?u=`Shop ${i} collection at ${n||c}.`:u=`Shop collections at ${n||c}.`;const a=u.length>160?`${u.substring(0,157)}...`:u;let v="",p="",x=!1,f;
1try{f=new URL(g??""),v=g.replace("http://","https://"),p=v,x=f.searchParams.get("page")==="1"}catch(S){console.error("Invalid URL in meta function:",S)}const w=[{title:h},{name:"description",content:a},{property:"og:title",content:l},{property:"og:description",content:a},{property:"og:type",content:"website"},{property:"og:url",content:v},{property:"og:site_name",content:c},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:l},{name:"twitter:description",content:a}];if(d&&w.push({property:"og:image",content:d},{property:"og:image:alt",content:`${l} collection image`},{property:"og:image:width",content:"400"},{property:"og:image:height",content:"400"},{name:"twitter:image",content:d},{name:"twitter:image:alt",content:`${l} collection image`}),x&&f){(P=(j=f==null?void 0:f.searchParams)==null?void 0:j.delete)==null||P.call(j,"page");const S=f.toString().replace("http://","https://");w.push({tagName:"link",rel:"canonical",href:S})}else p&&w.push({tagName:"link",rel:"canonical",href:p});return w};function st(){W();const{title:e,slug:s,products:r,pageInfo:i}=U(),{siteConfigs:o}=H();m.useEffect(()=>{if(!(r!=null&&r.length))return;const d={event:"view_item_list",ecommerce:{currency:"USD",value:Number((r==null?void 0:r.reduce((c,g)=>{var h,u,a;return c+new L(((a=(u=(h=g==null?void 0:g.node)==null?void 0:h.defaultAvailableVariant)==null?void 0:u.price)==null?void 0:a.amount)??0).toDecimalPlaces(2).toNumber()},0))??0),item_list_id:s,item_list_name:e,items:r==null?void 0:r.map((c,g)=>{var u,a,v,p,x;const h=((u=c.node.defaultAvailableVariant)==null?void 0:u.id)??c.node.id;return{id:h,item_id:h,item_name:((a=c.node.defaultAvailableVariant)==null?void 0:a.name)??"Not provided",price:new L(((p=(v=c.node.defaultAvailableVariant)==null?void 0:v.price)==null?void 0:p.amount)??0).toDecimalPlaces(2).toNumber(),item_variant:((x=c.node.defaultAvailableVariant)==null?void 0:x.size)??void 0,index:g+1,quantity:1,google_business_vertical:"retail"}})}};q(d)},[i==null?void 0:i.page,r,s,e]);const l=m.useMemo(()=>{var d,c;const n=(c=(d=o==null?void 0:o.customConfigurations)==null?void 0:d.collections)==null?void 0:c.rootCrumb;return[{label:(n==null?void 0:n.label)??"Home",href:(n==null?void 0:n.href)??"/"},{label:e,href:`/collections/${s}`}]},[o,e,s]);return t.jsxs("section",{className:"container max-w-[1440px] mx-auto p-4 py-10","aria-label":`Product Collection: ${e}`,children:[t.jsx(xe,{trail:l??[]}),t.jsx("h1",{className:"text-2xl font-bold text-foreground",id:"collection-title",children:e}),r!=null&&r.length?t.jsx(ge,{products:r,collectionType:s,collectionName:e,pageInfo:i}):t.jsx(he,{})]})}export{at as ErrorBoundary,st as default,tt as handle,rt as meta,et as shouldRevalidate};

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.