PageSourceSearch

https://minibardelivery.com/_next/static/chunks/7358-0c0d505802748d41.js

js minibardelivery.com collected 2026-09-24 17:43:49 UTC 10,537 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3cb705b7-ca66-4b0e-8920-a18d7d28f4b2",e._sentryDebugIdIdentifier="sentry-dbid-3cb705b7-ca66-4b0e-8920-a18d7d28f4b2")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7358],{50994:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(98185).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},55629:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(98185).Z)("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]])},29750:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(98185).Z)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},42840:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(98185).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},58989:function(e,t,r){r.d(t,{default:function(){return a.a}});var n=r(43108),a=r.n(n)},57138:function(e,t,r){var n=r(61060);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},28552:function(e,t,r){r.d(t,{h:function(){return d}});var n=r(16572),a=r(16074),s=r(63433),l=r(29750),o=r(25612);function i(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.description}async function u(e,t){let r;let n=e.trim();if(n.length<3)return[];try{r=await fetch("/api/address/autocomplete",{method:"POST",signal:t,headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({q:n})})}catch(e){if(null==t?void 0:t.aborted)throw e;return[]}if(!r.ok)return[];try{let e=await r.json(),t=null==e?void 0:e.suggestions;if(!Array.isArray(t))return[];return t.filter(i)}catch(e){if(null==t?void 0:t.aborted)throw e;return[]}}let c="We currently support addresses in the United States. Check the address and choose a suggested result.";function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.onSelect?(0,n.jsx)(h,{...e,onSelect:e.onSelect}):(0,n.jsx)(f,{...e})}function f(e){let t=(0,s.ht)();return(0,n.jsx)(h,{...e,onSelect:async e=>{let r=await (0,o.T)(e.id);if("error"===r.status)throw Error(/United States/i.test(r.message)?c:r.message);try{await t.setAddressByPlacesId(e.id)}catch(e){throw Error("Couldn't set that address. Please try again.")}}})}function h(e){let{id:t,value:r,onValueChange:s,onSelect:o,ariaLabel:i="Address",placeholder:d="Enter your address",invalid:f=!1,disabled:h=!1}=e,p=(0,a.useId)(),m=null!=t?t:"address-autocomplete-".concat(p),x="".concat(m,"-suggestions"),[y,g]=(0,a.useState)(""),[b,v]=(0,a.useState)([]),[w,j]=(0,a.useState)(-1),[S,N]=(0,a.useState)(!1),[k,C]=(0,a.useState)(null),[M,E]=(0,a.useState)(!1),[P,A]=(0,a.useState)(!!(null==r?void 0:r.trim())),D=(0,a.useRef)(0),T=(0,a.useRef)([]),Z=null!=r?r:y;function R(e){void 0===r&&g(e),null==s||s(e)}async function z(e){if(!h){D.current++,v([]),j(-1),A(!0),E(!1),R(e.description),C(null),N(!0);try{await o(e)}catch(e){A(!1),C(e instanceof Error&&e.message?e.message:"Couldn't set that address. Please try again.")}finally{N(!1)}}}return(0,a.useEffect)(()=>{var e;w<0||null===(e=T.current[w])||void 0===e||e.scrollIntoView({block:"nearest"})},[w]),(0,a.useEffect)(()=>{let e=++D.current,t=Z.trim();if(h||t.length<3||P){v([]),j(-1),E(!1);return}if(/(?:^|,\s*)Canada\s*$/i.test(t)||/\b[A-Z]\d[A-Z][ -]?\d[A-Z]\d\b/i.test(t)||/\b(?:AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT)\b/.test(t)){v([]),j(-1),E(!0);return}let r=new AbortController,n=setTimeout(()=>{u(t,r.signal).then(t=>{D.current===e&&(v(t),j(-1),E(0===t.length))}).catch(()=>{D.current===e&&(v([]),j(-1),E(!1))})},250);return()=>{clearTimeout(n),r.abort()}},[h,Z,P]),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-surface-1 px-3 py-2 focus-within:border-brand",children:[(0,n.jsx)(l.Z,{"aria-hidden":!0,
1className:"h-4 w-4 shrink-0 text-text-muted"}),(0,n.jsx)("input",{id:m,type:"text",role:"combobox","aria-label":i,"aria-invalid":f,"aria-expanded":b.length>0,"aria-controls":x,"aria-activedescendant":w>=0?"".concat(x,"-").concat(w):void 0,autoComplete:"street-address",autoCapitalize:"words",enterKeyHint:"search","data-1p-ignore":!0,"data-lpignore":"true",placeholder:d,disabled:h||S,value:Z,onChange:e=>{var t;return t=e.target.value,void(D.current++,A(!1),C(null),E(!1),R(t))},onKeyDown:function(e){if(!e.nativeEvent.isComposing){if("Escape"===e.key){D.current++,v([]),j(-1);return}if(0!==b.length){if("ArrowDown"===e.key)e.preventDefault(),j(e=>Math.min(e+1,b.length-1));else if("ArrowUp"===e.key)e.preventDefault(),j(e=>Math.max(e-1,0));else if("Enter"===e.key){e.preventDefault();let t=b[w>=0?w:0];t&&z(t)}}}},className:"w-full bg-transparent text-base text-text-primary outline-none placeholder:text-text-muted sm:text-sm"})]}),S?(0,n.jsx)("p",{className:"mt-2 text-sm text-text-muted",children:"Setting address…"}):null,k?(0,n.jsx)("p",{role:"alert",className:"mt-2 text-sm text-destructive",children:k}):null,M?(0,n.jsx)("p",{role:"status",className:"mt-2 text-sm text-text-muted",children:c}):null,b.length>0?(0,n.jsx)("ul",{id:x,role:"listbox",className:"relative z-10 mt-1 max-h-[40dvh] w-full overflow-y-auto overscroll-contain rounded-md border border-border bg-surface-1 shadow-lg",children:b.map((e,t)=>(0,n.jsx)("li",{ref:e=>{T.current[t]=e},id:"".concat(x,"-").concat(t),role:"option","aria-selected":w===t,onMouseDown:e=>e.preventDefault(),onClick:()=>void z(e),className:"cursor-pointer px-3 py-2 text-left text-sm text-text-primary hover:bg-surface-2 ".concat(w===t?"bg-surface-2":""),children:e.description},e.id))}):null]})}},25567:function(e,t,r){r.r(t),r.d(t,{RailView:function(){return d}});var n=r(16572),a=r(58989),s=r(16074),l=r(74678),o=r(85569),i=r(88961),u=r(18367);function c(){return(0,n.jsxs)("div",{className:"w-40 shrink-0 rounded-md border border-border p-3",children:[(0,n.jsx)(l.Od,{className:"aspect-square w-full"}),(0,n.jsx)(l.Od,{className:"mt-3 h-4 w-3/4"}),(0,n.jsx)(l.Od,{className:"mt-2 h-4 w-1/2"}),(0,n.jsx)(l.Od,{className:"mt-2 h-4 w-2/3"})]})}function d(e){let{title:t,listId:r,seeAllHref:l,items:d,minItems:f=1,maxItems:h,requireVerifiedAvailability:p=!1,onAddRequest:m,deferCatalogPricesUntilHydrated:x=!1,availabilityWindow:y}=e,g=i.Hz.getLocationKey(),b=d.map(e=>e.product.upc).join("\x01"),v="".concat(g,"\0").concat(b),[w,j]=(0,s.useState)(null),[S,N]=(0,s.useState)(0),k=void 0!==y,C=y?Math.max(1,Math.floor(y.initialCandidates)):d.length,M=y?Math.max(1,Math.floor(y.additionalCandidates)):d.length,E=y?Math.max(1,Math.floor(y.targetItems)):d.length,P=k?w===v?S:C:d.length,A=k?d.slice(0,P):d;(0,s.useEffect)(()=>{k&&w!==v&&(j(v),N(Math.min(d.length,C)))},[w,C,d.length,k,v]);let{settled:D,unfiltered:T,visible:Z}=(0,o.vx)(A.map(e=>e.product.upc)),R=T?k?A:d:A.filter(e=>Z.has(e.product.upc)),z=p?R.filter(e=>{let t=i.Hz.getSnapshot(e.product.upc);return(null==t?void 0:t.status)==="loaded"&&!!t.data&&t.data.sameDay.length+t.data.shipping.length>0}):R,I=k&&!T&&A.some(e=>{var t;return(null===(t=i.Hz.getSnapshot(e.product.upc))||void 0===t?void 0:t.status)!=="loaded"}),q=k&&w===v&&D&&P<d.length&&!I&&z.length<Math.min(E,null!=h?h:E);if((0,s.useEffect)(()=>{q&&N(e=>Math.min(d.length,e+M))},[P,M,q,d.length]),d.length<f||D&&!q&&z.length<f)return null;let O=void 0===h?z:z.slice(0,h);return(0,n.jsxs)("section",{className:"py-4",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-primary",children:t}),l?(0,n.jsx)(a.default,{href:l,className:"text-sm text-brand",children:"See all →"}):null]}),(0,n.jsx)("ul",{className:"flex gap-4 overflow-x-auto pb-2",children:!D||q?(void 0===h?A:A.slice(0,h)).map(e=>(0,n.jsx)("li",{"aria-hidden":!0,children:(0,n.jsx)(c,{})},e.product.upc)):O.map((e,a)=>(0,n.jsx)("li",{children:(0,n.jsx)(u.p,{item:e,listId:r||"rail:".concat(t),index:a,onAddRequest:m,deferCatalogPriceUntilHydrated:x})},e.product.upc))})]})}},53669:function(e,t,r){r.d(t,{$:function(){return l}});var n=r(16572),a=r(78432),s=r(28552);function l(e){let{open:t,onOpenChange:r}=e;return(0,n.jsx)(a.Vq,{open:t,onOpenChange:r,children:(0,n.jsxs)(a.cZ,{children:[(0,n.jsx)(a.$N,{children:"Where should we deliver it?"}),(0,n.jsx)(a.Be,{className:"mb-4 text-sm text-text-muted",children:"Set your address and we'll add this item as soon as you enter the store."}),(0,n.jsx)(s.h,{})]})})}},57911:function(e,t,r){r.d(t,{w:function(){return c}});var n=r(16074),a=r(57138),s=r(63433),l=r(78432),o=r(54677),i=r(89481);function u(){window.location.reload()}function c(){let e=(0,a.useRouter)(),t=(0,s.i3)(),r=(0,l.pm)(),[c,d]=(0,n.use
1State)(!1),f=(0,n.useRef)(null),h=(0,n.useRef)(),p=(0,n.useRef)(0);(0,n.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]);let m=(0,n.useCallback)(async n=>{if(!(0,o.yq)(n))return;let a=++p.current;h.current&&clearTimeout(h.current);let s=await (0,o.kB)({address:n.address,coordinates:n.coordinates});if(!s.current||!s.settled)return;d(!1);let l=f.current;if(f.current=null,l)try{await t.addProduct({identifier:l.product.upc,fulfillmentType:o.Zf,quantity:1},!1),r.success("Added ".concat(l.product.name," to cart"))}catch(e){r.error("Couldn't add ".concat(l.product.name,". Please try again from the store."))}a===p.current&&((0,i.UM)()?(e.refresh(),h.current&&clearTimeout(h.current),h.current=setTimeout(u,1500)):e.push("/store/category/liquor"))},[t,e,r]);(0,s.yS)(s.z6.ADDRESS_UPDATED,m);let x=(0,n.useCallback)(e=>{f.current=e,d(!0)},[]);return{promptOpen:c,setPromptOpen:(0,n.useCallback)(e=>{d(e),e||(f.current=null)},[]),requestAdd:x}}},25612:function(e,t,r){r.d(t,{T:function(){return n}}),r(434);var n=(0,r(39162).$)("e43589f5168f63d6bdb3e5a08b8e3cde148a1e3c")},42072:function(e,t,r){r.d(t,{V:function(){return a}});var n=r(88961);function a(e){var t;n.Hz.setLocation({address:(t=e.address).one?t:{...t,one:[t.city,t.zip].filter(Boolean).join(" ")||"Approximate location"},coordinates:e.coordinates})}}}]);

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.