PageSourceSearch

https://www.flourpizzeria.com/_next/static/chunks/7915.36d4cb26f858e985.js

js flourpizzeria.com collected 2026-10-04 23:06:19 UTC 36,051 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7915],{6884:(e,t,r)=>{r.d(t,{b:()=>u});var a=r(39876),l=r(71105),n=r(45809),s=r(31292),i=r(4802),o=r(95368),d=r(68372),c=r(78819);function u(e){let{address:t,onEdit:r,onCreated:u,onResolvedInline:m,submitLabel:x="Confirm address"}=e,{isAuthenticated:f}=(0,l.B)(),{register:h,handleSubmit:p}=(0,d.mN)({defaultValues:{unitNumber:"",entryCode:"",deliveryInstructions:""}}),[g,v]=(0,o.useState)(!1),y=(0,n.useMutation)({mutationFn:async e=>{let r={street2:e.unitNumber||null,entryCode:e.entryCode||null,deliveryInstructions:e.deliveryInstructions||null};if(f)return{saved:(await (0,s.F)({google_place_id:t.place_id,preferences:r})).user_delivery_address,preferences:r};let{address:a}=await (0,i.h)(t.place_id);return{resolved:a,preferences:r}}}),b=y.isPending||g;async function j(e){let t=await y.mutateAsync(e).catch(()=>null);if(t)try{v(!0),t.saved?await u(t.saved):t.resolved&&await (null==m?void 0:m({street1:t.resolved.street1,street2:t.preferences.street2,city:t.resolved.city,state:t.resolved.state,zip_code:t.resolved.zip_code,preferences:t.preferences},null!=t.resolved.lat&&null!=t.resolved.lng?{lat:t.resolved.lat,lng:t.resolved.lng}:null))}finally{v(!1)}}let N=y.isError?y.error.message||"Unable to save address. Please try again.":null;return(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3 rounded-2xl border border-black/10 px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-base font-medium leading-6 text-gray-900",children:t.main_text}),(0,a.jsx)("p",{className:"truncate text-sm text-gray-500",children:t.secondary_text})]}),(0,a.jsx)(c.$,{variant:"text",size:"inline",onClick:r,className:"shrink-0 text-sm font-semibold underline underline-offset-4",children:"Edit"})]}),(0,a.jsxs)("form",{onSubmit:p(e=>void j(e)),className:"flex min-h-0 flex-1 flex-col gap-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"delivery-unit",className:"mb-1.5 block text-sm font-semibold text-gray-900",children:"Apt / Unit"}),(0,a.jsx)("input",{id:"delivery-unit",...h("unitNumber"),placeholder:"e.g. Apt 4B",autoComplete:"address-line2",className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 placeholder:text-gray-500 transition-colors duration-150 focus:border-brand-primary focus:bg-white focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"delivery-entry-code",className:"mb-1.5 block text-sm font-semibold text-gray-900",children:"Entry code"}),(0,a.jsx)("input",{id:"delivery-entry-code",...h("entryCode"),placeholder:"e.g. #1234",autoComplete:"off",className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 placeholder:text-gray-500 transition-colors duration-150 focus:border-brand-primary focus:bg-white focus:outline-none"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"delivery-instructions",className:"mb-1.5 block text-sm font-semibold text-gray-900",children:"Delivery instructions"}),(0,a.jsx)("textarea",{id:"delivery-instructions",...h("deliveryInstructions"),placeholder:"e.g. Leave at door",rows:2,className:"w-full resize-none rounded-[10px] border border-transparent bg-[#ebebed] px-4 py-3 text-base text-gray-900 placeholder:text-gray-500 transition-colors duration-150 focus:border-brand-primary focus:bg-white focus:outline-none"})]}),N&&(0,a.jsx)("p",{role:"alert",className:"text-sm text-status-negative",children:N}),(0,a.jsx)("div",{className:"mt-auto pt-3",children:(0,a.jsx)(c.$,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,isLoading:b,loadingText:"Saving…",children:x})})]})]})}},58538:(e,t,r)=>{r.d(t,{I:()=>s});var a=r(39876),l=r(69412);function n(e){let{slots:t,size:r}=e;return(0,a.jsx)("div",{className:"sm"===r?"flex gap-1.5":"flex gap-2",children:t.map((e,t)=>(0,a.jsxs)("div",{className:"relative flex flex-1 items-center justify-center rounded-[10px] border [font-family:var(--font-medium)] text-gray-900 transition-colors ".concat("sm"===r?"h-11 text-base":"h-14 text-xl"," ").concat(e.isActive?"border-brand-primary bg-white":"border-transparent bg-[#ebebed]"),children:[e.char,e.hasFakeCaret&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,a.jsx)("div",{className:"h-5 w-px animate-pulse bg-brand-primary"})})]},t))})}let s=(0,r(95368).forwardRef)(function(e,t){let{value:r,onChange:s,onComplete:i,disabled:o,size:d="md","aria-label":c}=e;return(0,a.jsx)(l.wE,{ref:t,value:r,onChange:s,maxLength:6,pattern:l.UO,autoComplete:"one-time-code",inputMode:"numeric",disabled:o,"aria-label":null!=c?c:"6-digit verification code",onComplete:i,render:e=>{let{slots:t}=e;return(0,a.jsx)(n,{slots:t,size:d})}})})},68857:(e,t,r)=>{r.d(t,{F:()=>c});var a=r(39876),l=r(22039),n=r(95368);let s="/open-terms-of-use",i="/open-privacy-policy",o=new Map;function d(e){let t=o.get(e);return t||(t=fetch(e,{method:"HEAD"}).then(e=>e.ok).catch(()=>!1),o.set(e,t)),t}function c(e){let{className:t}=e,{termsUrl:r,privacyUrl:o}=function(){var e,t;let{config:r}
1=(0,l.y)(),[a,o]=(0,n.useState)({terms:!1,privacy:!1});return(0,n.useEffect)(()=>{let e=!1;return Promise.all([d(s),d(i)]).then(t=>{let[r,a]=t;e||o({terms:r,privacy:a})}),()=>{e=!0}},[]),{termsUrl:a.terms?s:"https://www.getopen.com/terms-of-use",privacyUrl:a.privacy?i:null!=(t=null==(e=r.data)?void 0:e.privacy_policy_url)?t:null}}();return(0,a.jsxs)("p",{className:t,children:["By continuing, you agree to our"," ",(0,a.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"[font-family:var(--font-medium)] font-normal text-gray-600 underline underline-offset-4 hover:text-gray-900",children:"Terms of Service"})," ","&"," ",o?(0,a.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",className:"[font-family:var(--font-medium)] font-normal text-gray-600 underline underline-offset-4 hover:text-gray-900",children:"Privacy Policy"}):"Privacy Policy"]})}},87915:(e,t,r)=>{r.r(t),r.d(t,{AuthSurface:()=>ei});var a=r(39876),l=r(71105),n=r(79540),s=r(3134),i=r(95368),o=r(82959),d=r(78262),c=r(59944),u=r(19334),m=r(3457),x=r(78819),f=r(68857);function h(e){let t=e.slice(0,10);return t.length<=3?t:t.length<=6?"(".concat(t.slice(0,3),") ").concat(t.slice(3)):"(".concat(t.slice(0,3),") ").concat(t.slice(3,6),"-").concat(t.slice(6))}function p(){return(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function g(e){let{onCodeSent:t,onClose:r}=e,{login:n}=(0,l.B)(),[s,o]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),[u,m]=(0,i.useState)(null),g=(0,i.useRef)(null);async function v(e){if(!(e.length<10)&&!n.isPending){m(null);try{await n.mutateAsync({phone:e}),t(e,h(e))}catch(e){m("Could not send code. Check your number and try again.")}}}return(0,i.useEffect)(()=>{let e=setTimeout(()=>{var e;return null==(e=g.current)?void 0:e.focus()},100);return()=>clearTimeout(e)},[]),(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsx)("h2",{className:"text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900",children:"Welcome in"}),(0,a.jsx)(x.$,{variant:"chrome",size:"icon-lg",onClick:r,"aria-label":"Close",children:(0,a.jsx)(p,{})})]}),(0,a.jsx)("p",{className:"mt-1.5 text-base text-gray-600",children:"Sign in with your phone — we'll text you a code."}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),v(s)},className:"mt-6 flex flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"auth-phone-input",className:"sr-only",children:"Phone number"}),(0,a.jsx)("input",{ref:g,id:"auth-phone-input",type:"tel",value:d,onChange:function(e){let t=e.target.value.replace(/\D/g,"");t.length>10&&t.startsWith("1")&&(t=t.slice(1));let r=t.slice(0,10);o(r),c(h(r)),10===r.length&&v(r)},placeholder:"(555) 000-0000",autoComplete:"tel",inputMode:"numeric","aria-invalid":!!u||void 0,"aria-describedby":u?"auth-phone-error":"auth-phone-hint",className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 transition-colors placeholder:text-gray-500 focus:border-brand-primary focus:bg-white focus:outline-none"}),u?(0,a.jsx)("p",{id:"auth-phone-error",role:"alert",className:"text-sm font-medium text-status-negative",children:u}):(0,a.jsx)("p",{id:"auth-phone-hint",className:"text-sm text-gray-500",children:"The code sends itself the moment your number is complete"})]}),(0,a.jsxs)("div",{className:"mt-auto pt-6",children:[(0,a.jsx)(x.$,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,disabled:n.isPending||s.length<10,isLoading:n.isPending,loadingText:"Sending…",children:"Send code"}),(0,a.jsx)(f.F,{className:"mt-3 text-center text-xs text-gray-500"})]})]})]})}var v=r(58538);function y(){return(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function b(e){let{phoneDigits:t,displayPhone:r,awaitingIdentity:n,identityError:s,onRetryIdentity:o,onBack:d,onVerified:c}=e,{login:u,verifyLogin:m}=(0,l.B)(),[f,h]=(0,i.useState)(""),[p,g]=(0,i.useState)(null),b=(0,i.useRef)(null);async function j(e){g(null);try{await m.mutateAsync({code:e,phone:t}),c()}catch(e){g("Invalid code. Please try again."),h("")}}return(0,i.useEffect)(()=>{let e=setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},100);return()=>clearTimeout(e)},[]),(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)(x.$,{variant:"chrome",size:"icon-lg",onClick:d,"aria-label":"Go back",children:(0,a.jsx)(y,{})})}),(0,a.jsx)("h2",{className:"mt-4 text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900",children:"Check your texts"}),(0,a.jsxs)("p",{className:"mt-1.5 text-base text-gray-600",children:["Enter the code we sent to ",r,"."]}),(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)(v.I,{ref:b,value:f,onChange:h,onComplete:j}),s?(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{role:"alert",className:"text-sm font-medium text-status-negative",children:"You're verified, but we couldn't load your account."}),(0,a.jsx)(x.$,{variant:"text",size:"inline",onClick:o,className:"mt-2 [font-family:var(--font-medium)] font-normal text-gray-600 underline underline-offset-4 hover:text-gray-900",children:"Try again"})]}):p?(0,a.jsx)("p",{role:"alert",className:"mt-3 text-sm font-medium text-status-negative",children:p}):m.isPending||n?(0,a.jsx)("p",{role:"status",className:"mt-3 text-sm text-gray-500",children:"Verifying…"}):(0,a.jsx)("p",{className:"mt-3 text-sm text-gray-500",children:"It verifies on its own once the 6th digit lands"})]}),(0,a.jsx)("div",{className:"mt-6 flex gap-6",children:(0,a.jsx)(x.$,{variant:"text",size:"inline",onClick:()=>{u.mutate({phone:t}),h("")},isLoading:u.isPending,loadingText:"Resending…",className:"[font-family:var(--font-medium)] font-normal text-gray-600 underline underline-offset-4 hover:text-gray-900",children:"Resend code"})})]})}var j=r(95438),N=r(92822),k=r(83528),w=r(41031);function _(e){var t,r,n,s;let{onContinue:o}=e,{signUp:d,identity:c}=(0,l.B)(),u=(0,j.p)(),[m,f]=(0,i.useState)(""),[h,p]=(0,i.useState)(""),[g,v]=(0,i.useState)(null),[y,b]=(0,i.useState)(""),_=(0,i.useRef)(null),C=(0,i.useRef)(null),S=!!(null==(t=u.data)?void 0:t.referral_program)&&((null==(n=c.data)||null==(r=n.customer)?void 0:r.is_first_time_customer)===!0||""!==y);async function P(e){var t,r,a,l;e.preventDefault(),v(null);let n=null==(r=c.data)||null==(t=r.customer)?void 0:t.uuid;if(!n){v("Could not load your account. Please try again."),c.refetch();return}let s=y.trim();try{let e=await d.mutateAsync({first_name:m,last_name:h,customer_uuid:n,email_opt_in:null,referral_code:s||null});s&&((0,w.eh)(),(null==e||null==(l=e.referral)||null==(a=l.referrer_info)?void 0:a.first_name)&&!e.referral.error||k.oR.error("Referral code couldn't be applied"));let{data:t}=await c.refetch();o(null!=t?t:null,null!=e?e:null)}catch(e){s&&e instanceof N.F&&400===e.status?((0,w.eh)(),v(e.message)):v("Could not complete sign-up. Please try again.")}}return(0,i.useEffect)(()=>{b(e=>{var t,r;return e||(null!=(r=null!=(t=new URLSearchParams(window.location.search).get("ref"))?t:(0,w.Tl)())?r:"")})},[]),(0,i.useEffect)(()=>{let e=setTimeout(()=>{var e,t;null==(t=((null==(e=_.current)?void 0:e.value)?C:_).current)||t.focu
1s()},100);return()=>clearTimeout(e)},[]),(0,i.useEffect)(()=>{f(e=>{var t,r,a;return e||(null!=(a=null==(r=c.data)||null==(t=r.user)?void 0:t.first_name)?a:"")}),p(e=>{var t,r,a;return e||(null!=(a=null==(r=c.data)||null==(t=r.user)?void 0:t.last_name)?a:"")})},[null==(s=c.data)?void 0:s.user]),(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsx)("h2",{className:"text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900",children:"What should we call you?"}),(0,a.jsx)("p",{className:"mt-1.5 text-base text-gray-600",children:"Last step — then you're in."}),(0,a.jsxs)("form",{onSubmit:P,className:"mt-6 flex flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"signup-first-name",className:"sr-only",children:"First name"}),(0,a.jsx)("input",{ref:_,id:"signup-first-name",placeholder:"First name",value:m,onChange:e=>f(e.target.value),autoComplete:"given-name",required:!0,className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 transition-colors placeholder:text-gray-500 focus:border-brand-primary focus:bg-white focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"signup-last-name",className:"sr-only",children:"Last name"}),(0,a.jsx)("input",{ref:C,id:"signup-last-name",placeholder:"Last name",value:h,onChange:e=>p(e.target.value),autoComplete:"family-name",required:!0,className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 transition-colors placeholder:text-gray-500 focus:border-brand-primary focus:bg-white focus:outline-none"})]})]}),S&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("label",{htmlFor:"signup-referral-code",className:"sr-only",children:"Referral code"}),(0,a.jsx)("input",{id:"signup-referral-code",placeholder:"Referral code",value:y,onChange:e=>b(e.target.value),autoComplete:"off",autoCapitalize:"characters",className:"h-12 w-full rounded-[10px] border border-transparent bg-[#ebebed] px-4 text-base text-gray-900 transition-colors placeholder:text-gray-500 focus:border-brand-primary focus:bg-white focus:outline-none"})]}),g&&(0,a.jsx)("p",{role:"alert",className:"mt-3 text-sm font-medium text-status-negative",children:g}),(0,a.jsx)("div",{className:"mt-auto pt-6",children:(0,a.jsx)(x.$,{type:"submit",variant:"primary",size:"lg",fullWidth:!0,disabled:d.isPending||!m.trim()||!h.trim(),isLoading:d.isPending,loadingText:"Creating account…",children:"Sign up"})})]})]})}var C=r(22039),S=r(93982),P=r(89452);function L(e){var t,r,n,s,o;let{onNext:d}=e,{updateMarketingPreferences:c,identity:u}=(0,l.B)(),{orderingMode:m}=(0,C.y)(),f=(0,S.l)(),[h,p]=(0,i.useState)(!0),[g,v]=(0,i.useState)(null),y="REGULAR"===m?null==(t=f.data)?void 0:t.welcome_offer_label:void 0,b=null!=(o=null==(s=u.data)||null==(n=s.customer)||null==(r=n.marketing_preferences)?void 0:r.email_opt_in)&&o;async function j(){v(null);try{await c.mutateAsync({sms_opt_in:h,email_opt_in:b}),d()}catch(e){v("Unable to save preferences. Please try again.")}}return(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsx)("h2",{className:"text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900",children:"Stay in the loop"}),(0,a.jsx)("p",{className:"mt-2 text-base text-gray-600",children:"First dibs on deals, drops, and rewards — straight to your phone."}),y&&(0,a.jsxs)("p",{className:"mt-4 flex items-center gap-1.5 text-sm font-semibold text-status-positive",children:[(0,a.jsx)("svg",{className:"h-4 w-4 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),y]}),(0,a.jsx)(P.S,{checked:h,onChange:p,className:"mt-8",children:"By checking this box, you agree to re
1ceive recurring automated promotional and personalized marketing text messages from us at the cell number used when signing up. Reply STOP to cancel. Msg frequency varies. Msg and data rates may apply."}),g&&(0,a.jsx)("p",{role:"alert",className:"mt-4 text-sm font-medium text-status-negative",children:g}),(0,a.jsx)("div",{className:"mt-auto pt-6",children:(0,a.jsx)(x.$,{variant:"primary",size:"lg",fullWidth:!0,onClick:j,isLoading:c.isPending,loadingText:"Saving…",children:"Continue"})})]})}var E=r(50754),R=r(22244),T=r(60720),A=r(36501),B=r(6884),M=r(44533);function z(){return(0,a.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function W(e){let{onBack:t,title:r,subtitle:l,children:n}=e;return(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[t&&(0,a.jsx)(x.$,{variant:"chrome",size:"icon-lg",onClick:t,className:"self-start","aria-label":"Go back",children:(0,a.jsx)(z,{})}),(0,a.jsx)("h2",{className:"text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900 ".concat(t?"mt-4":""),children:r}),l&&(0,a.jsx)("p",{className:"mt-1 text-base text-gray-600",children:l}),n]})}function F(e){var t;let{onComplete:r,onCancel:l}=e,{applyFulfillment:n,isSingleLocation:s,fulfillmentTypes:d,storeUuid:c,sortedStores:u}=(0,E.Hq)(),m=(0,o.useRouter)(),f=(0,M.B)(),h=(0,i.useRef)({storeUuid:c,sortedStores:u});h.current={storeUuid:c,sortedStores:u};let[p,g]=(0,i.useState)("select"),[v,y]=(0,i.useState)(null),[b,j]=(0,i.useState)(null),[N,k]=(0,i.useState)(null),[w,_]=(0,i.useState)(""),[C,S]=(0,i.useState)(null),[P,L]=(0,i.useState)(null),z=null!=(t=null==P?void 0:P.uuid)?t:null,[F,$]=(0,i.useState)(!1),[U,O]=(0,i.useState)(null);(0,E.Hc)(C);let I=d.some(e=>"curbside"===e.name&&e.available);async function D(e,t){$(!0),O(null);let a=await n({...t,storeUuid:e.uuid});if($(!1),"applied"===a.status){var l,s;S(null),r();let{storeUuid:t,sortedStores:a}=h.current,n=null!=(s=null==(l=a.find(e=>e.uuid===t))?void 0:l.slug)?s:e.slug;m.push(f.storeMenu(n))}else"error"===a.status&&O("Something went wrong. Please try again.")}function H(e){D(e,{mode:"pickup"})}function V(e){v&&D(e,{mode:"curbside",curbsideInfo:{makeModel:v.makeModel,color:v.color}})}function G(e){let t=e.address.latlng;(null==t?void 0:t.lat)!=null&&(null==t?void 0:t.lng)!=null&&S({lat:t.lat,lng:t.lng}),k(e.user_delivery_address_uuid),_("".concat(e.street1,", ").concat(e.city)),g("delivery-stores")}function Y(e,t,r,l){let n="delivery"===e;return(0,a.jsxs)(W,{onBack:()=>{g(t)},title:"Select store",subtitle:l,children:[(0,a.jsx)("div",{className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:(0,a.jsx)(R._d,{variant:"sheet",mode:e,centerMode:n?"external":"auto",externalCenter:n&&C?{...C,label:w||null}:null,selectedUuid:z,onSelect:(e,t)=>L(t),disabled:F})}),U&&(0,a.jsx)("p",{role:"alert",className:"mt-3 text-sm text-status-negative",children:U}),(0,a.jsx)("div",{className:"mt-auto pt-6",children:(0,a.jsx)(x.$,{variant:"primary",size:"lg",fullWidth:!0,onClick:()=>{P&&r(P)},disabled:!z||F,isLoading:F,loadingText:"Setting up…",children:"Next"})})]})}switch(p){case"select":return(0,a.jsxs)(W,{title:"How would you like to order?",children:[(0,a.jsx)("div",{className:"mt-6 space-y-3",children:["pickup",...I?["curbside"]:[],"delivery"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e,void((L(null),"pickup"===t)?s&&u[0]?H(u[0]):g("pickup-stores"):"curbside"===t?g("curbside-form"):g("delivery-search"))},disabled:F,className:"flex w-full items-center justify-between rounded-2xl border border-black/10 bg-white px-5 py-4 text-left transition-colors hover:border-black/25 disabled:opacity-50",children:[(0,a.jsx)("span",{className:"text-base font-medium capitalize text-gray-900",children:e}),(0,a.jsx)("svg",{className:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M7.5 5l5 5-5 5"})})]},e))}),F&&(0,a.jsx)("p",{role:"status",className:"mt-4 text-sm text-center text-gray-500",children:"Setting up your order…"}),U&&(0,a.jsx)("p",{role:"alert",className:"mt-4 text-sm text-center text-status-negative",children:U}),(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsx)(x.$,{variant:"text",size:"inline",fullWidth:!0,onClick:l,className:"[font-family:var(--font-medium)] text-gray-600 hover:text-gray-900 hover:no-underline",children:"Skip for now"})})]});case"pickup-stores":return Y("pickup","select",H);case"curbside-form":return(0,a.jsx)(W,{onBack:()=>{g("select")},title:"Curbside info",children:(0,a.jsx)("div",{className:"mt-6 flex min-h-0 flex-1 flex-col",children:(0,a.jsx)(A.m,{defaultValues:null!=v?v:void 0,submitLabel:"Continue",onSubmit:e=>{(y(e),s&&u[0])?V(u[0]):g("curbside-stores")}})})});case"curbside-stores":return Y("curbside","curbside-form",V);case"delivery-search":return(0,a.jsx)(W,{onBack:()=>{g("select")},title:"Delivery address",children:(0,a.jsx)("div",{className:"mt-4 flex min-h-0 flex-1 flex-col",children:(0,a.jsx)(T.v,{coordsBias:C,onSelectSaved:G,onSelectResult:e=>{j(e),g("delivery-details")},listClassName:"max-h-64"})})});case"delivery-details":if(!b)return null;return(0,a.jsx)(W,{onBack:()=>{g("delivery-search")},title:"Delivery details",children:(0,a.jsx)("div",{className:"mt-4 flex min-h-0 flex-1 flex-col",children:(0,a.jsx)(B.b,{address:b,onEdit:()=>{g("delivery-search")},onCreated:G,submitLabel:"Continue"})})});case"delivery-stores":return Y("delivery",b?"delivery-details":"delivery-search",function(e){N&&D(e,{mode:"delivery",deliveryAddressUuid:N,deliveryAddressLabel:w,coordinates:null!=C?C:void 0})},w||void 0)}}var $=r(50108),U=r(67559),O=r(170),I=r(52955),D=r(88284),H=r(14835),V=r(39490),G=r(47240),Y=r(64542),q=r(89641);let J={"add-card":"add_card","credits-offer":"credits_offer"};function K(e){var t,r,l,o,d,c;let{onDone:u}=e,m=(0,$.n)();(0,i.useEffect)(()=>m(),[m]);let{wallets:f}=(0,O.v)(),h=(0,I.$)(),p=(0,D.p)(),{cart:g,setApplyCredits:v}=(0,H._)(),y=(0,U.x)(),b=(0,n.s)(),[j,N]=(0,i.useState)(null),[k,w]=(0,i.useState)(!1),[_,C]=(0,i.useState)(!1),[S,P]=(0,i.useState)(!1),L=(null!=(o=null==(t=h.data)?void 0:t.reduce((e,t)=>
1e+t.balance.value,0))?o:0)+(null!=(d=null==(r=p.data)?void 0:r.balance.value)?d:0),E=(0,i.useRef)(!1);function R(e){E.current||(E.current=!0,b.track(s.R.PAYMENT_PROMPT_RESOLVED,{outcome:e,variant:j?J[j]:null}),u(e))}function T(){_&&!y.isPending&&y.mutate(void 0,{onSuccess:()=>R("card_added")})}async function A(){P(!1);try{await v.mutateAsync(!0),R("credits_applied")}catch(e){P(!0)}}return((0,i.useEffect)(()=>{j&&b.track(s.R.PAYMENT_PROMPT_SHOWN,{variant:J[j]})},[j]),(0,i.useEffect)(()=>{if(j)return;let e=setTimeout(()=>w(!0),1e4);return()=>clearTimeout(e)},[j]),(0,i.useEffect)(()=>{var e,t,r,a,l;if(j||E.current)return;let n=(l={timedOut:k,walletsErrored:f.isError,wallets:f.data,balancesSettled:!h.isPending&&!p.isPending&&!g.isPending,availableBalance:L,orderTotal:null!=(r=null==(e=g.data)?void 0:e.order_total.total)?r:0,creditsAlreadyApplied:null!=(a=null==(t=g.data)?void 0:t.apply_credits)&&a}).timedOut||l.walletsErrored?{kind:"finish",outcome:"unavailable"}:l.wallets?(0,q.g)(l.wallets).hasPaymentMethod?{kind:"finish",outcome:"not_needed"}:l.balancesSettled?0===l.orderTotal?{kind:"finish",outcome:"not_needed"}:!l.creditsAlreadyApplied&&l.availableBalance>=l.orderTotal?{kind:"form",variant:"credits-offer"}:{kind:"form",variant:"add-card"}:{kind:"wait"}:{kind:"wait"};"finish"===n.kind?R(n.outcome):"form"===n.kind&&N(n.variant)},[j,k,f.data,f.isError,h.isPending,p.isPending,g.isPending,g.data,L]),j)?(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsx)("h2",{className:"text-[1.75rem] font-normal leading-tight tracking-[-0.01em] text-gray-900",children:"Add a payment method"}),(0,a.jsx)("p",{className:"mt-1.5 text-base text-gray-600",children:"credits-offer"===j?"Add a card, or pay with your available balance.":"You'll need one to place your order."}),(0,a.jsx)("div",{className:"mt-6 rounded-xl border border-gray-200 px-4 py-3.5",children:(0,a.jsx)(G.hA,{onChange:e=>C(e.complete),options:{style:{base:{fontSize:"15px",color:"#1f2937","::placeholder":{color:"#9ca3af"}}}}})}),y.isError&&(0,a.jsx)("p",{role:"alert",className:"mt-3 text-sm font-medium text-status-negative",children:null!=(c=null==(l=y.error)?void 0:l.message)?c:"Unable to add card. Please try again."}),"credits-offer"===j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.$,{variant:"primary",size:"lg",fullWidth:!0,onClick:T,disabled:!_,isLoading:y.isPending,loadingText:"Saving…",className:"mt-6 text-base",children:"Save card"}),(0,a.jsxs)("div",{className:"mt-6 flex items-center gap-3","aria-hidden":"true",children:[(0,a.jsx)("div",{className:"h-px flex-1 bg-black/10"}),(0,a.jsx)("span",{className:"text-xs font-semibold tracking-widest text-gray-400",children:"OR"}),(0,a.jsx)("div",{className:"h-px flex-1 bg-black/10"})]}),(0,a.jsx)(x.$,{variant:"secondary",size:"lg",fullWidth:!0,onClick:A,isLoading:v.isPending,loadingText:"Applying…",className:"mt-6",children:"Use my ".concat((0,V.v)(L)," balance")}),S&&(0,a.jsx)("p",{role:"alert",className:"mt-3 text-sm font-medium text-status-negative",children:"Unable to apply your balance. Please try again."})]}),(0,a.jsxs)("div",{className:"mt-auto pt-6",children:["add-card"===j&&(0,a.jsx)(x.$,{variant:"primary",size:"lg",fullWidth:!0,onClick:T,disabled:!_,isLoading:y.isPending,loadingText:"Saving…",className:"text-base",children:"Save card"}),(0,a.jsx)(x.$,{variant:"text",fullWidth:!0,onClick:()=>R("skipped"),className:"mt-3 text-sm [font-family:var(--font-medium)] font-normal text-gray-600 underline underline-offset-4 hover:text-gray-900",children:"Skip for now"})]})]}):(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col items-center justify-center p-6",children:[(0,a.jsx)("h2",{className:"sr-only",children:"Checking payment options"}),(0,a.jsx)(Y.y,{label:"Checking payment options"})]})}var Q=r(68313),X=r(60119);function Z(){return(0,a.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("polyline",{points:"8 12.5 11 15.5 16 9.5"})]})}function ee(){return(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5","aria-hidden":"true",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})}function et(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),(0,a.jsx)("polyline",{points:"22,6 12,13 2,6"})]})}function er(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),(0,a.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,a.jsx)("path",{d:"M16 10a4 4 0 0 1-8 0"})]})}function ea(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,a.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,a.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]})}function el(){return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,a.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,a.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}function en(e){var t;let{referral:r,onContinue:l}=e,{program:n}=(0,Q.O)();if(!(null==r?void 0:r.referral_program)||!r.referrer_info)return null;let s=(0,X.u)({referralProgram:r.referral_program,amountCents:r.referral_program.referrer_reward_cents,loyaltyProgram:n.data}),i=(0,X.u)({referralProgram:r.referral_program,amountCents:r.referral_program.referee_reward_cents,loyaltyProgram:n.data}),o=r.referrer_info.first_name,d=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase(),c=null!=(t=r.referral_program.min_spend_subtotal)?t:0,u=s.amount===i.amount;return(0,a.jsxs)("div",{className:"flex min-h-[420px] flex-1 flex-col p-6",children:[(0,a.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-3xl border border-gray-900/10 bg-gray-100 text-gray-900",children:(0,a.jsx)(Z,{})}),(0,a.jsxs)("h2",{className:"mt-6 text-2xl font-bold leading-snug text-gray-900",children:["Referral code",(0,a.jsx)("br",{}),"activated"]}),(0,a.jsxs)("div",{className:"mt-8 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 text-gray-500",children:[(0,a.jsx)("span",{className:"mt-0.5 text-brand-primary",children:(0,a.jsx)(et,{})}
1),(0,a.jsxs)("p",{className:"text-sm",children:[d," invited you"]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 text-gray-500",children:[(0,a.jsx)("span",{className:"mt-0.5 text-brand-primary",children:(0,a.jsx)(er,{})}),(0,a.jsx)("p",{className:"text-sm",children:"Place an order to earn"})]}),c>0&&(0,a.jsxs)("div",{className:"flex items-start gap-3 text-gray-500",children:[(0,a.jsx)("span",{className:"mt-0.5 text-brand-primary",children:(0,a.jsx)(el,{})}),(0,a.jsxs)("p",{className:"text-sm",children:[(0,V.v)(c)," min subtotal"]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-3 text-gray-500",children:[(0,a.jsx)("span",{className:"mt-0.5 text-brand-primary",children:(0,a.jsx)(ea,{})}),(0,a.jsxs)("p",{className:"text-sm",children:["You ",u&&"both ","earn ",i.label]})]}),!u&&(0,a.jsxs)("div",{className:"flex items-start gap-3 text-gray-500",children:[(0,a.jsx)("span",{className:"mt-0.5 text-brand-primary",children:(0,a.jsx)(ea,{})}),(0,a.jsxs)("p",{className:"text-sm",children:[d," earns ",s.label]})]})]}),(0,a.jsxs)("div",{className:"mt-auto flex flex-col gap-3 pt-6",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-sm font-semibold text-green-700",children:[(0,a.jsx)(ee,{}),"Place order ",c>0&&"over ".concat((0,V.v)(c)," "),"to earn"]}),(0,a.jsx)(x.$,{variant:"primary",size:"lg",fullWidth:!0,onClick:l,className:"font-bold",children:"Get started"})]})]})}var es=r(84034);function ei(e){var t;let{props:r}=e,{onComplete:x}=r,{identity:f,isAuthenticated:h}=(0,l.B)(),p=(0,d.f)(),v=(0,o.usePathname)(),y=(0,n.s)(),j=(0,es.BR)(),N=null!=(t=r.intent)?t:(0,m.a)(v);(0,i.useEffect)(()=>{y.track(s.R.AUTH_PROMPT_SHOWN,{resumed:h})},[]);let[k,C]=(0,i.useState)("phone"),[S,P]=(0,i.useState)({digits:"",display:""}),[E,R]=(0,i.useState)(!1),T=(0,i.useRef)(!1),[A,B]=(0,i.useState)(null),M="sms-opt-in"===k||"signup"===k&&"signup"===(0,m.J)(f.data,"resume");function z(){p.pop(),null==x||x()}function W(){"default"===N?C("fulfillment-method"):"checkout"===N?C("payment-method"):z()}function $(e){let t=(0,m.J)(e,T.current?"live-login":"resume");t?C(t):W()}(0,c.Gd)(M),(0,i.useEffect)(()=>{if(E&&f.data){if(R(!1),T.current=!0,(0,w.Tl)())return void C("signup");$(f.data)}},[E,f.data]),(0,i.useEffect)(()=>{if("phone"!==k||!h||!f.data)return;let e=(0,m.J)(f.data,"resume");e?C(e):(0,w.Tl)()&&C("signup")},[k,h,f.data]);let U=(0,i.useRef)(null);(0,i.useEffect)(()=>{var e;if("sms-opt-in"!==k&&"referral-activated"!==k&&"fulfillment-method"!==k&&"payment-method"!==k)return;let t=null==(e=U.current)?void 0:e.querySelector("h1, h2, h3");t&&(t.setAttribute("tabindex","-1"),t.classList.add("focus:outline-none"),t.focus({preventScroll:!0}))},[k]);let O="phone"===k?"Sign in":"code"===k?"Enter code":"signup"===k?"Create account":"referral-activated"===k?"Referral activated":"sms-opt-in"===k?"Stay in the loop":"payment-method"===k?"Add a payment method":"How would you like to order?";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{hidden:!0,children:O}),(0,a.jsxs)("div",{ref:U,className:"flex min-h-0 flex-1 flex-col overflow-y-auto",children:["phone"===k&&(0,a.jsx)(g,{onCodeSent:(e,t)=>{P({digits:e,display:t}),C("code")},onClose:function(){p.pop()}}),"code"===k&&(0,a.jsx)(b,{phoneDigits:S.digits,displayPhone:S.display,awaitingIdentity:E,identityError:E&&f.isError,onRetryIdentity:()=>void f.refetch(),onBack:()=>{R(!1),C("phone")},onVerified:()=>R(!0)}),"signup"===k&&(0,a.jsx)(_,{onContinue:(e,t)=>{var r;let a=null==t?void 0:t.referral;(null==a||null==(r=a.referrer_info)?void 0:r.first_name)&&!a.error?(B({identity:e,referral:a}),C("referral-activated")):$(e)}}),"referral-activated"===k&&A&&(0,a.jsx)(en,{referral:A.referral,onContinue:()=>$(A.identity)}),"sms-opt-in"===k&&(0,a.jsx)(L,{onNext:W}),"fulfillment-method"===k&&(0,a.jsx)(F,{onComplete:z,onCancel:z}),"payment-method"===k&&(0,a.jsx)(K,{onDone:()=>z()}),j.isAvailable&&(0,a.jsx)("div",{className:"px-6 pb-5 text-center",children:(0,a.jsx)("button",{type:"button",onClick:j.open,className:"[font-family:var(--font-medium)] text-xs font-semibold uppercase tracking-[0.14em] text-gray-500 underline-offset-4 transition-colors hover:text-gray-900 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary/50",children:"Need help?"})})]})]})}},89452:(e,t,r)=>{r.d(t,{S:()=>l});var a=r(39876);function l(e){let{checked:t,onChange:r,disabled:l,id:n,children:s,className:i,labelClassName:o}=e;return(0,a.jsxs)("label",{className:"flex items-start gap-3 ".concat(l?"cursor-default opacity-60":"cursor-pointer"," ").concat(null!=i?i:""),children:[(0,a.jsxs)("div",{className:"relative mt-0.5 flex-shrink-0",children:[(0,a.jsx)("input",{type:"checkbox",id:n,checked:t,disabled:l,onChange:e=>r(e.target.checked),className:"peer sr-only"}),(0,a.jsx)("div",{className:"h-5 w-5 rounded-md border-2 border-gray-300 transition-colors peer-checked:border-brand-primary peer-checked:bg-brand-primary peer-focus-visible:ring-2 peer-focus-visible:ring-brand-primary/40 peer-focus-visible:ring-offset-2"}),t&&(0,a.jsx)("svg",{className:"absolute inset-0 m-auto h-3 w-3 text-[#faf1e7]",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M2 6l3 3 5-5"})})]}),(0,a.jsx)("span",{className:null!=o?o:"text-sm leading-relaxed text-gray-500",children:s})]})}},89641:(e,t,r)=>{r.d(t,{g:()=>a});function a(e){var t,r,a;let l=null==e?void 0:e.wallets.find(e=>e.is_default),n=(null==l?void 0:l.id)==="APPLE_PAY"||(null==l?void 0:l.id)==="GOOGLE_PAY",s=(null==l?void 0:l.id)==="INTERNAL"?null!=(a=null==(t=l.payment_methods)?void 0:t.find(e=>e.is_default))?a:null==(r=l.payment_methods)?void 0:r[0]:void 0;return{defaultWallet:l,isPlatformDefault:n,defaultCard:s,hasPaymentMethod:!!s||n}}}}]);

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.