1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17428],{17091:function(e,a,t){t.d(a,{Z:function(){return c}});var r=t(85893),s=t(7599),l=t(67294);let n={white:"bg-white",grey:"bg-background-grey"},c=Object.assign((0,l.forwardRef)(function(e,a){let{className:t="",color:s="white",elevated:l=!0,children:c,...i}=e;return(0,r.jsx)("section",{ref:a,id:i.id,className:"rounded-lg ".concat(n[s]," ").concat(l?"shadow-md shadow-navy/30":""," ").concat(t),...i,children:c})}),{Content:function(e){let{className:a="",children:t}=e;return(0,r.jsx)("div",{className:"p-5 ".concat(a),children:t})},Footer:function(e){let{className:a,backgroundColor:t="white",noPadding:l=!1,children:n}=e;return(0,r.jsx)("footer",{className:"flex gap-5 rounded-b-lg ".concat(s.tn[t]," ").concat(l?"":"px-5 py-1"," ").concat(a),children:n})}})},71013:function(e,a,t){t.d(a,{t:function(){return n}});var r=t(39902),s=t(67294),l=t(5068);function n(){let{mutate:e,...a}=(0,l.ZP)({url:"user/rewards",params:{program:"LOYALTY"}},r.R1,{shouldRetryOnError:!1,revalidateOnFocus:!0}),t=(0,s.useCallback)(async()=>{await e()},[e]);return{rewards:a.data,rewardsError:a.error,loadingRewards:a.isLoading,validatingRewards:a.isValidating,refetchRewards:t}}},84407:function(e,a,t){t.d(a,{ME:function(){return s},gC:function(){return r}});let r=(e,a)=>a?a||a===e?"".concat(e,"/").concat(a):"".concat(e," Points"):"0 Points",s=e=>{let{requestedAmount:a,availableRewards:t,maxRewardsAllowed:r,rewardsLoaded:s}=e;return!!a&&(!s||a>Math.min(t,r))}},17428:function(e,a,t){t.d(a,{p:function(){return J}});var r=t(85893),s=t(53731),l=t(20265),n=t(71706),c=t(26816),i=t(81146),d=t(5316),o=t(17396),h=t(71013),m=t(91307),u=t(84407),x=t(24189),g=t(80407),f=t(21102),b=t(1005),p=t(39902),j=t(67294),w=t(5068),v=t(25675),N=t.n(v),y=()=>{let{data:e,loading:a}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DEFAULT",a=(0,w.ZP)(()=>({url:"/user/barcodes/".concat(e),authenticated:!0}),p.R1,{shouldRetryOnError:!1,revalidateOnFocus:!1});return(0,j.useMemo)(()=>({data:a.data,loading:a.isLoading,updating:a.isValidating}),[a.data,a.isLoading,a.isValidating])}(),t=(0,f.R)(),{fulfillmentType:s}=(0,b.s)();return(0,r.jsxs)("button",{className:"z-[1] mx-auto mb-4 flex min-w-fit items-center rounded-lg border-4 border-red bg-white px-2.5 py-1.5 text-[0.938rem] font-bold leading-5 text-red sm:z-auto md:mb-0 md:mr-0",onClick:()=>{t({title:"Scan at Checkout",message:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"mb-4 text-2xl",children:"To earn and redeem rewards and digital coupons"}),(0,r.jsx)("div",{className:"relative h-28 w-full max-w-96",children:(null==e?void 0:e.dataUri)&&(0,r.jsx)(N(),{src:e.dataUri,alt:"barcode",fill:!0})}),(0,r.jsx)("p",{className:"mt-4 text-base",children:" Your Rewards ID: "}),(0,r.jsx)("p",{className:"text-base",children:(0,o.YY)(null==e?void 0:e.identifier,"***-***-**")})]}),hideConfirmButton:!0,hideCancelButton:!0}),(0,c.R)("Viewed Barcode Screen",s)},disabled:a,children:[(0,r.jsx)(x.J,{name:"Barcode",className:"mr-2 h-7 w-8"}),a?(0,r.jsx)(g.P,{ariaLabel:"loading barcode data"}):"Rewards Barcode"]})};function k(){let e=(0,d.G)("md"),{user:a}=(0,m.b)(),{rewards:t}=(0,h.t)();return a&&t?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"mb-2 overflow-hidden bg-cover md:mb-8",style:{backgroundImage:"url(/images/stars-background.svg)"},children:(0,r.jsxs)(s.W,{className:"relative flex flex-col md:flex-row md:gap-8 lg:gap-16",children:[(0,r.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex shrink-0 md:relative",children:[(0,r.jsx)("div",{className:"ml-[-12.8rem] mt-4 w-[25.1rem] shrink-0 bg-[length:30rem] bg-right-top bg-no-repeat md:ml-[-6.4rem] md:w-[17.2rem] lg:ml-[-7.2rem] lg:mt-5 lg:w-[26.2rem] lg:bg-[length:52rem] xl:ml-[-6.225rem] xl:w-[25.1rem]",style:{backgroundImage:"url(/images/reward-yourself-mobile.svg)"},"aria-label":"Reward Yourself"}),(0,r.jsx)(i.Q,{name:"Henry",size:"100%",className:"ml-2 mt-4 h-14 shrink-0 rotate-12 lg:ml-5 lg:mt-7 lg:h-24"})]}),(0,r.jsxs)("div",{className:"relative mt-16 w-full px-6 py-5 sm:px-0 md:mt-0",children:[(0,r.jsxs)("div",{className:"mb-4 grid grid-cols-[1fr,auto] items-center md:flex-row md:gap-4 lg:mb-6",children:[(0,r.jsxs)("p",{className:"flex text-navy drop-shadow-[0_0.25rem_0.25rem_#00000040]",children:[(0,r.jsx)("span",{className:"-mr-px w-9 shrink-0 bg-[#F7B520]",style:{clipPath:"pol
1ygon(100% 0, 100% 100%, 0% 100%, 50% 50%, 0% 0%)"}}),(0,r.jsxs)("span",{className:"flex w-full flex-wrap items-end justify-center gap-x-2 bg-[#F7B520] py-1.5 text-center text-body lg:text-body-large",children:[(0,r.jsxs)("span",{className:"whitespace-nowrap",children:["Hi, ",a.firstName,"!"]}),t.length?(0,r.jsxs)("span",{className:"whitespace-nowrap",children:["You have"," ",(0,r.jsx)("span",{className:"text-h6 lg:text-h3",children:o.VF.format(t[0].cashRewardsValue)})," ","available."]}):(0,r.jsx)("span",{className:"whitespace-nowrap font-bold",children:"Make a purchase to earn 2% back."})]}),(0,r.jsx)("span",{className:"-ml-px w-9 shrink-0 bg-[#F7B520]",style:{clipPath:"polygon(100% 0, 50% 50%, 100% 100%, 0% 100%, 0% 0%)"}})]}),e?null:(0,r.jsx)(y,{})]}),(()=>{let e=t.length?t[0].balance:0,a=t.length?t[0].nextRewardLevel:0,s=t.length?t[0].totalCashRewardsValue:0,l=a&&e?e/a*100:0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-2 h-4 w-full rounded-full shadow-inner ".concat(0===e?"bg-medium-grey/30":""),children:(0,r.jsx)("div",{className:"h-full rounded-full bg-gradient-to-b from-red-gradient-start to-red-gradient-end",style:{width:"".concat(l,"%")}})}),(0,r.jsxs)("div",{className:"flex flex-col items-end justify-between text-body-small lg:text-body xl:flex-row xl:items-start",children:[(0,r.jsxs)("p",{children:["Total Rewards earned: ",o.VF.format(s)]}),(0,r.jsxs)("p",{children:[!!(null==t?void 0:t.length)&&"Points toward your next reward: ",(0,u.gC)(e,a)]})]})]})})()]}),e?(0,r.jsx)(y,{}):null]})})}):null}var C=t(9008),R=t.n(C),F=t(68092),P=t(17091),L=t(16695),O=t.n(L),M=t(99269),S=t(39332);let B=e=>{switch(e){case"https://local.schnucks.com:3000":case"https://dev.schnucks.com":return"https://wpdev.schnucks.com";case"https://qa.schnucks.com":return"https://wpqa.schnucks.com";default:return"https://nourish.schnucks.com"}},E=()=>[{icon:"Contact",label:"Profile",href:"/account/profile"},{icon:"Purchases",label:"Purchases",href:"/account/purchases"},{icon:"Star",label:"Rewards",href:"/account/rewards"},{icon:"PinLocation",label:"Delivery Addresses",href:"/account/delivery-addresses"},{icon:"Card",label:"Payment Methods",href:"/account/payment-methods"},{icon:"InstacartCarrot",label:"Instacart Account",href:"/account/instacart-membership"},{icon:"MembershipCard",label:"Memberships",href:"/account/memberships"},{icon:"Donation",label:"Donations",href:"/account/donations"},{icon:"FavoriteUnselected",label:"Favorite Recipes",href:"/account/favorite-recipes"},{icon:"Settings",label:"Settings",href:"/account/settings"}],V=e=>[{label:"CVS Pharmacy",href:"/pharmacy"},{label:"Cooking School",href:"/cooking-school"},{label:"Deli Order Ahead",href:"".concat(B(e),"/web-ext/deli")},{label:"Party Planning",href:"".concat(B(e),"/web-ext/party-planning")},{label:"Contact Us",href:"/contact-us"}];var D=t(93967),I=t.n(D),_=t(41664),A=t.n(_);function U(e){let{menu:a,selected:t}=e;return(0,r.jsx)("li",{children:(0,r.jsxs)(A(),{href:a.href,target:a.target,className:I()("group flex h-12 items-center gap-4 pl-5 pr-6 border-l-4",t?"text-red bg-background-grey border-l-red cursor-default":"border-transparent hover:bg-red/5",{"md:hidden":a.mobileOnly}),"data-testid":a.href,children:[(0,r.jsx)("div",{className:"flex w-[40px] justify-center",children:(0,r.jsx)(x.J,{name:a.icon,className:t?"text-red":"text-navy","data-testid":"".concat(a.href,"-icon")})}),(0,r.jsx)("p",{className:"text-h5 group-hover:bg-transparent",children:a.label})]})})}function Y(e){let{item:a,selected:t}=e;return(0,r.jsx)("li",{children:(0,r.jsxs)(A(),{href:a.href,target:a.target,className:I()("flex h-12 items-center gap-3 pr-6 border-l-4 w-full justify-between",t?"text-red bg-background-grey border-l-red cursor-default":"border-transparent hover:bg-red/5"),"data-testid":a.label,children:[(0,r.jsx)("p",{className:"text-[20px] font-semibold",children:a.label}),(0,r.jsx)(x.J,{name:"ChevronRight",size:16})]})})}function z(){let e=(0,S.usePathname)(),a=O()("HOSTED_URL"),t=E(),s=V(a),n=t.find(a=>null==e?void 0:e.startsWith(a.href));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("nav",{className:"hidden md:block","aria-label":"My Account",children:[(0,r.jsx)("ul",{children:t.map(a=>{var t;return(0,r.jsx)(U,{menu:a,selected:null!==(t=null==e?void 0:e.startsWith(a.href))&&void 0!==t&&t},a.href)})}),(0,r.jsx)("hr",{className:"my-4 h-px w-full"}),(0,r.jsx)("ul",{className:"w-full ",children:s.map(a=>(0,r.jsx)(Y,{item:a,selected:a.href===e},a.label))})]}),(0,r.jsxs)(M.v,{as:"div",className:"relative md:hidden",children:[(0,r.jsx)(M.v.Button,{as:F.z,adornmentStart:n?(0,r.jsx)(x.J,{name:n.icon}):void 0,adornmentEnd:(0,r.jsx)(x.J,{name:"Dropdown",className:"ml-auto"}),width:"full",color:"navy",children:null==n?void 0:n.label}),(0,r.jsxs)(M.v.Items,{as:P.Z,className:"absolute inset-x-0 top-[3.25rem] z-10 max-h-[50vh] overflow-auto",children:[(0,r.jsx)("ul",{children:t.map(a=>{var t;return(0,r.jsx)(M.v.Item,{as:j.Fragment,children:(0,r.jsx)(U,{menu:a,selected:null!==(t=null==e?void 0:e.startsWith(a.href))&&void 0!==t&&t})},a.href)})}),(0,r.jsx)("hr",{className:"mx-auto my-4 w-[90%]"}),(0,r.jsx)("ul",{className:"mx-auto w-[85%]",children:s.map(a=>(0,r.jsx)(M.v.Item,{as:j.Fragment,children:(0,r.jsx)(Y,{item:a,selected:a.href===e},a.label)},a.href))}),(0,r.jsx)("div",{className:"px-8 py-4",children:(0,r.jsx)(l.r,{href:"/api/auth/logout","data-testid":"logout-button",variant:"outlined",width:"full","aria-label":"Click here to log out",children:"Log Out"})})]})]})]})}function J(e){let{siteSettings:a,title:t,children:i}=e,{fulfillmentType:d}=(0,b.s)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R(),{children:(0,r.jsx)("meta",{"http-equiv":"Cache-control",content:"no-cache"})}),(0,r.jsxs)(n.e,{siteSettings:a,title:t,topMargin:!1,children:[(0,r.jsx)(k,{}),(0,r.jsxs)(s.W,{className:"mb-8 flex flex-col gap-6 px-6 sm:px-0 md:flex-row",children:[(0,r.jsxs)("div",{className:"w-full shrink-0 md:max-w-xs",children:[(0,r.jsx)("div",{className:"mb-4 text-center text-h2 md:text-left",children:"My A
1ccount"}),(0,r.jsx)(z,{}),(0,r.jsx)("div",{className:"mt-4 hidden md:block",children:(0,r.jsx)(l.r,{href:"/api/auth/logout",variant:"outlined",width:"full","aria-label":"Click here to log out","data-testid":"logout-button",onClick:()=>{(0,c.R)("User Logged Out",d)},children:"Log Out"})})]}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("h1",{className:"mb-4 hidden text-h2 md:block",children:t}),i]})]})]})]})}}}]);
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.