PageSourceSearch

https://www.brickyardbar.com/_next/static/chunks/pages/account/rewards-8a13a55c62e6ba54.js

js brickyardbar.com collected 2026-09-26 17:45:06 UTC 31,236 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[581],{63312:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/rewards",function(){return t(52168)}])},52168:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return e2}});var n=t(52322),i=t(2784),a=t(5732),o=t(56580),s=t(39097),c=t.n(s),l=t(87749),d=t(63974),u=t(5288),x=t(97421),h=t(90736);let m=e=>{let{label:r}=e;return(0,n.jsx)(c(),{href:{pathname:h.Z6.STORES},passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":"Go to the store locator page",onClick:()=>{(0,l.O)(d.x.GENERIC__CTA,{name:d.V.ORDER_NOW,details:r})},children:(0,n.jsx)(u.Z,{accessor:"rewards.order_now_button"})})})};var p=t(53237),_=t(37085),g=t(926),f=t(73695),j=t(46956);function b(e){let{name:r,description:t,image_url:i,onClick:a,id:o,isSelected:s}=e,{primary_border_color:c,border_radius:l,primary_active_color:d}=(0,f.$E)("global"),{primary_font:u}=(0,f.$E)("text"),{color:x}=(0,j.l)(u);return(0,n.jsxs)(g.Kq,{"data-testid":"social-cause-item",onClick:()=>{s?a():a(o)},direction:"vertical",align:"center",position:"center",css:{padding:"$4",border:"1px solid ".concat(s?d:c),borderRadius:"".concat(l,"px"),color:null!=x?x:"inherit",width:"100%"},children:[(0,n.jsxs)(g.Kq,{align:"center",position:"leading",gap:"$4",css:{width:"100%"},children:[i?(0,n.jsx)(_.E,{src:i,width:50,height:50,alt:"".concat(null!=r?r:""," social cause icon")}):null,(0,n.jsx)("h3",{children:r})]}),(0,n.jsx)(w,{children:t})]})}let w=(0,p.zo)("p",{margin:0});var y=t(40024),v=t(47661),E=t(62350),C=t(69780),R=t(38801),T=t(15066),S=t(17609),Z=t(97549),k=t(20496),I=t(89601),P=t(59706);let O=()=>{let e=(0,S.d9)({origin:(0,Z.P$)(window.location.host)});return(0,v.a)({queryKey:["social-causes"],queryFn:()=>(0,y.sX)({client:e}),refetchOnWindowFocus:!1})},D=()=>{let{dispatch:e,displayErrorToast:r,displayToast:t}=(0,R.xP)(),n=(0,C.E)(),i=(0,S.d9)({origin:(0,Z.P$)(window.location.host)});return(0,E.D)(e=>(0,y.rJ)(e.socialCause.id,e.donation,{client:i}),{onError:async t=>{k.Tb(t),e(r((await (0,I.Xr)((0,P.bc)(n,"rewards.donate_reward_error_text"),t)).message))},onSuccess:(r,i)=>{e(T.default.fetchRedeemables()),e(T.default.fetchOffers()),e(T.default.fetchLoyaltyState()),e(t((0,P.bc)(n,"rewards.donate_reward_success_text",{socialCauseName:i.socialCause.name})))}})};var A=t(23643),N=t(74115),F=t(75470);function z(e){let{toggle:r,onSubmit:t,isLoading:a}=e,{data:o,status:s}=O(),{label:c}=(0,F.v9)(e=>e.app.organization.organization),[l,d]=(0,i.useState)(),{dispatch:h,displayErrorToast:m}=(0,R.xP)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_header",dataObj:{brand:c}})}),(0,n.jsx)(A.u.Content,{children:(0,n.jsxs)(g.Kq,{direction:"vertical",gap:"$4",children:[(0,n.jsx)(N.H,{condition:"loading"===s,children:(0,n.jsx)(H,{children:"Fetching Social Causes..."})}),(0,n.jsx)(N.H,{condition:!!((null==o?void 0:o.data)&&0===o.data.length),children:(0,n.jsx)(H,{children:" Sorry, there are no Social Causes available "})}),(0,n.jsx)(N.H,{condition:!!((null==o?void 0:o.data)&&o.data.length>0),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L,{children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_subheader"})}),(0,n.jsx)(g.Kq,{position:"center",css:{flexWrap:"wrap"},children:null==o?void 0:o.data.map(e=>(0,n.jsx)(b,{isSelected:e.id===l,...e,onClick:d},e.id))})]})})]})}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Cancel"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!l||a||"loading"===s,onClick:async()=>{if(!l)return;let e=null==o?void 0:o.data.find(e=>e.id===l);if(e)await t({id:e.id,name:e.name}),r();else{let e=Error("Social Cause not found");k.Tb(e),h(m((await (0,I.Xr)("Social Cause not found. Please try again.",e)).message))}},children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_donate_button"})})]})]})}let L=(0,p.zo)("h2",{margin:0}),H=(0,p.zo)("p",{margin:0,textAlign:"center"});var G=t(81334),U=t(92240);function Y(e){var r;let{donation:t,rewardName:i}
1=e,a=(0,f.JR)(),o=(0,F.v9)(U.F5),{mutateAsync:s,isLoading:c}=D();return(null===(r=o.loyalty.features)||void 0===r?void 0:r.supportsSocialCauses)&&a.rewards.donatable_rewards?(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(W,{onClick:e,"aria-label":"Click to donate reward ".concat(i),children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_button"})}),children:e=>(0,n.jsx)(z,{...t,toggle:e,onSubmit:async e=>await s({socialCause:e,donation:t}),isLoading:c})}):null}let W=(0,p.zo)(G.UN,{alignSelf:"center",width:"100%"});var M=t(63602),$=t(65413),B=t(34737),q=t(88373),V=t(92122),K=t(22427);function X(e){let{initialAmount:r,rewardActionType:t,onSubmit:i,isLoading:a}=e,o=(0,K.DV)(r),s="redeem"===t?"Redemption":"Donation",c=(0,$.Ry)({amount:(0,$.Rx)().required().max(Number(o),"Please enter an amount up to $".concat((0,K.DV)(r))).min(0,"".concat(s," amount must be more than $0"))});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:"".concat((0,P.fm)(t)," Your Reward")}),(0,n.jsx)(q.K,{align:"center",direction:"vertical",gap:"$4",css:{minHeight:"100%",textAlign:"center"},children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(M.J9,{validateOnBlur:!0,validateOnChange:!0,initialValues:{amount:(0,K.DV)(r)},onSubmit:(e,r)=>{let{amount:t}=e,{resetForm:n}=r;i(100*Number(t)),n()},validationSchema:c,children:e=>{let{isValid:i}=e;return(0,n.jsxs)(M.l0,{children:[(0,n.jsxs)(Q,{children:[(0,n.jsx)(J,{children:"You have $".concat((0,K.DV)(r)," available to ").concat(t,".")}),(0,n.jsxs)(B.x,{css:{display:"flex",alignItems:"center"},children:[(0,n.jsx)("i",{style:{position:"relative",left:"1rem",fontStyle:"normal"},children:"$"}),(0,n.jsx)(V.I,{style:{paddingLeft:"1.125rem"},placeholder:"0.00",pattern:"[0-9.]*",type:"number",step:"0.01",autoFocus:!0,id:"amount",name:"amount",min:"0",label:"Enter amount of rewards available to ".concat(t)})]})]}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!i||a,$buttonTheme:"secondary",type:"submit",children:(0,P.fm)(t)})]})]})}})})})]})}let J=(0,p.zo)("p",{fontSize:"1rem",margin:0}),Q=(0,p.zo)(A.u.Content,{display:"flex",flexDirection:"column",gap:"1rem",position:"relative",overflowY:"auto"});var ee=t(17335),er=t.n(ee),et=t(12929);let en=()=>{let{myOffers:e,redemptions:r}=(0,F.v9)(et.G),t=e.map(e=>{var r;return null===(r=e.redemption)||void 0===r?void 0:r.id}).filter(e=>void 0!==e),n=r.map(e=>null==e?void 0:e.id),i=er()(n,t);return r.find(e=>e.id===i[0])};var ei=t(29782),ea=t(43580),eo=t(80295),es=t(50584);let ec=e=>{let{id:r,type:t,memberCode:a,memberId:o,onError:s}=e,{activeRedemption:c,loading:l,error:d}=(0,F.v9)(et.G),{organization:x}=(0,F.v9)(e=>e.app.organization),h=(0,F.I0)(),m=c?c.tracking_code:a,p=a?"Member Code":null==c?void 0:c.label;return(0,i.useEffect)(()=>{r&&t&&h(T.default.createRedemption(r,t))},[]),(0,i.useEffect)(()=>{d&&s()},[d]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:a?"rewards.earn_in_store_modal_header":"rewards.redeem_in_store_modal_header",html:!0,dataObj:{brand:x.label}})}),(0,n.jsx)(A.u.Content,{children:(0,n.jsx)(eo.K,{align:"center",direction:"vertical",gap:"var(--size-4)",overrides:{minHeight:"100%",textAlign:"center"},children:l&&r&&t?(0,n.jsx)(ex,{children:"loading..."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[p&&(0,n.jsx)(el,{children:p}),(null==c?void 0:c.expiring_at)&&(0,n.jsxs)(ed,{children:["Expires: ",(0,es.vh)(c.expiring_at)]})]}),m&&(0,n.jsx)(ei.tv,{value:m,size:160}),(null==c?void 0:c.tracking_code)&&(0,n.jsxs)("span",{children:["Tracking Code: ",c.tracking_code]}),o&&(0,n.jsxs)("span",{children:["Member Id: ",o]}),(0,n.jsx)(eu,{children:(0,n.jsx)(u.Z,{accessor:a?"rewards.earn_in_store_instructional_text":"rewards.redeem_in_store_instructional_text",html:!0})})]})})}),(0,n.jsx)(A.u.Footer,{children:(0,n.jsx)(A.u.Cancel,{children:"Close"})})]})},el=ea.ZP.h2.withConfig({componentId:"sc-568cf4e1-0"})(["margin:0;"]),ed=ea.ZP.span.withConfig({componentId:"sc-568cf4e1-1"})(["display:block;padding-block-start:var(--size-2);opacity:0.75;"]),eu=ea.ZP.div.withConfig({componentId:"sc-568cf4e1-2"})(["font-size:0.675rem;"]),ex=ea.ZP.span.withConfig({componentId:"sc-568cf4e1-3"})(["margin:auto 0;"]);var eh=t(87557);let em=e=>{let{onClose:r,initialAmount:t}=e,a=(0,o.useDispatch)(),{data:s,activeRedemption:c}=(0,o.useSelector)(et.G),{isLoading:l,isSuccess:d,mutate:u}=(0,E.D)({mutationFn:e=>{let{amount:r,client:t}=e;return(0,y.HB)(r,t)},onError:e=>{a(T.default.createRedemptionFailure(e,eh.Hx.REWARD))},onSuccess:e=>{a(T.default.createRedemptionSuccess(e,eh.Hx.REWARD))}}),x=en();return(0,i.useEffect)(()=>{x&&!c&&a(T.default.createRedemptionSuccess(x,eh.Hx.REWARD))},[x,c]),(0,i.useEffect)(()=>()=>{a(T.default.clearActiveRedemption())},[]),d||c?(0,n.jsx)(ec,{type:eh.Hx.REWARD,memberId:null==s?void 0:s.external_user_fk,onError:r}):(0,n.jsx)(X,{onSubmit:e=>u({amount:e,client:{client:(0,S.d9)({origin:(0,Z.P$)(window.location.host)})}}),initialAmount:t,rewardActionType:"redeem",isLoading:l})},ep=()=>{let{loyaltyState:e}
1=(0,o.useSelector)(et.G),r=(0,o.useSelector)(U.F5),t=null==e?void 0:e.banked_currency,i=null==e?void 0:e.banked_currency_expiration_date,a=null==e?void 0:e.banked_currency_expiring;return(null==r?void 0:r.loyalty.program_type)!==eh.cI.POINTS_CONVERT_CURRENCY?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.EE,{children:[(0,n.jsx)(u.Z,{tag:G.Nc,accessor:"rewards.banked_currency_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_subheader",html:!0}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsxs)(G.hb,{children:[(0,n.jsxs)(G.cs,{children:[(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.banked_currency_card_header",html:!0}),(0,n.jsxs)("h1",{children:["$",(0,K.DV)(t)]}),t?i&&a&&a>0&&(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_expiration_text",html:!0,dataObj:{currency:"$".concat((0,K.DV)(a)),date:(0,es.vh)(i)}}):(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_empty_state_text",html:!0})]}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(m,{label:"Rewards - Rewards"}),!!t&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:()=>e(),$buttonTheme:"knockout","aria-label":"Redeem banked currency in store",children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:e=>(0,n.jsx)(em,{onClose:e,initialAmount:t})})})]}),t?(0,n.jsx)(G.qt,{children:(0,n.jsx)(Y,{donation:{type:"currency",item:t.toString()},rewardName:"Banked Currency"})}):null]})]})};var e_=t(8782),eg=t(83065);let ef=e=>{let{externalURL:r}=e,{organization:t}=(0,F.v9)(e=>e.app.organization),i=(0,n.jsx)(u.Z,{accessor:"rewards.learn_more_button"}),a="Click to learn how rewards work",o=()=>(0,l.O)(d.x.GENERIC__CTA,{name:d.V.HOW_REWARDS_WORK,details:"Rewards"});return(0,n.jsxs)(G.kx,{children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.learn_more_header",html:!0,dataObj:{brand:t.label}}),r?(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":a,as:"a",href:r,target:"_blank",onClick:()=>o(),children:i}):(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":a,onClick:()=>{e(),o()},children:i}),children:(0,n.jsx)(eg.F,{})})]})},ej=ea.ZP.button.withConfig({componentId:"sc-b09c69c9-0"})(["display:none;@media (max-width:767px){width:64px;height:100px;border-radius:32px;box-shadow:0 0 8px 0 #ccc;border:none;background:",";display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;p{position:absolute;bottom:0;font-family:",";font-size:16px;color:",";}}"],e=>{let{theme:r}=e;return r.auth_page.background_color},e=>{let{theme:r}=e;return r.primary_font.bold.font_family},e=>{var r;let{theme:t}=e;return(0,e_.mj)(null!==(r=t.auth_page.background_color)&&void 0!==r?r:"#fff",t.global.primary_active_color)>4.5?t.global.primary_active_color:t.auth_page.font.color}),eb=ea.ZP.div.withConfig({componentId:"sc-b09c69c9-1"})(["width:48px;height:48px;border-radius:24px;background:",";display:flex;justify-content:center;align-items:center;position:absolute;top:7px;"],e=>{let{theme:r}=e;return r.global.primary_active_color}),ew=ea.ZP.div.withConfig({componentId:"sc-b09c69c9-2"})(["position:fixed;bottom:var(--safe-offset--descending,0);margin-bottom:var(--size-4);right:var(--size-4);"]),ey=()=>{let{data:e}=(0,o.useSelector)(et.G);return(null==e?void 0:e.qrcode)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ew,{children:(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsxs)(ej,{"aria-label":"Click to view your membership ID",onClick:()=>e(),children:[(0,n.jsx)(eb,{children:(0,n.jsx)("img",{src:"/static/img/icons/qr.svg",alt:"",role:"presentation"})}),(0,n.jsx)("p",{children:"Scan"})]}),children:()=>(0,n.jsx)(ec,{memberCode:e.qrcode,memberId:null==e?void 0:e.external_user_fk})})})}):null},ev=ea.ZP.ul.withConfig({componentId:"sc-f85932d1-0"})(["margin:var(--neg-size-6) 0;padding:0;"]),eE=ea.ZP.li.withConfig({componentId:"sc-f85932d1-1"})(["padding:var(--size-3) 0;display:flex;justify-content:space-between;border-bottom:1px solid ",";h3{font-size:16px;}h2{font-size:16px;","}&:last-of-type{border:none;}"],e=>{let{theme:r}=e;return r.global.primary_border_color},e=>{let{addition:r,theme:t}=e;return r&&"\n    color: ".concat(t.global.primary_active_color,";\n  ")}),eC=ea.ZP.div.withConfig({componentId:"sc-f85932d1-2"})(["h3{font-size:20px;font-family:",";margin:0 auto;}button{width:100%;}"],e=>{let{theme:r}=e;return r.primary_font.bold.font_family});var eR=t(78754),eT=t(23314),eS=t(16251);let eZ=()=>{let e=(0,o.useSelector)(e=>e.app.me.rewardsHistory),r=(0,o.useDispatch)(),t=e.length>0;return(0,i.useEffect)(()=>{r(T.default.fetchRewardsHistory())},[]),(0,n.jsxs)(G.kx,{className:eR.Y.LOYALTY_REWARDS_FOOTER.POINTS_HISTORY,children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.point_history_header"}),(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:e,$buttonTheme:"knockout","aria-label":"Click to view your points history",children:(0,n.jsx)(u.Z,{accessor:"rewards.point_history_button"})}),children:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.point_history_modal_header",html:!0})}),(0,n.jsx)(A.u.Content,{children:t?(0,n.jsx)(ev,{children:e.map((e,r)=>e.value&&(0,n.jsxs)(eE,{addition:e.value.includes("+"),children:[(0,n.jsx)("h3",{children:(0,eS.p6)(e.date,eT.z.MONTH_DAY_YEAR)}),(0,n.jsx)("h2",{children:e.value})]},"".concat(e.date,"-").concat(r)))}):(0,n.jsxs)(eC,{children:[(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.points_history_modal_empty_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.points_history_modal_empty_subheader",html:!0})]})}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),!t&&(0,n.jsx)(m,{label:"Rewards - History Modal"})]})]})})]})};var ek=t(69767),eI=t(30686);let eP=(0,$.Ry)({barcode:(0,$.Z_)()}),eO=()=>{let e=(0,o.useDispatch)(),{receiptBarcodeLoading:r}=(0,o.useSelector)(et.G),t=(0,f.EL)();return(0,n.jsxs)(G.kx,{className:eR.Y.LOYALTY_REWARDS_FOOTER.RECEIPT_BARCODE,children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.enter_barcode_header"}),(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:e,$buttonTheme:"knockout","aria-label":"Click to redeem rewards from a receipt barcode",children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_button"})}),children:i=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_modal_header",html:!0})}),(0,n.jsx)(M.J9,{initialValues:{barcode:""},onSubmit:(r,t)=>{let{barcode:n}=r,{resetForm:a}=t;e(T.default.redeemReceiptBarcode(n)),i(),a()},validationSchema:eP,children:e=>{let{dirty:i,isValid:a}=e;return(0,n.jsxs)(M.l0,{children:[(0,n.jsxs)(A.u.Content,{children:[(0,n.jsx)(eD,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_instructional_text",html:!0})}),(0,n.jsx)(ek.x,{overrides:{marginTop:"var(--size-3)"},children:(0,n.jsx)(V.I,{autoFocus:!0,id:"barcode",name:"barcode",label:(0,P.bc)(t,"rewards.enter_barcode_placeholder_text")})}),(0,n.jsx)(eA,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_disclaimer_text",html:!0})})]}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!i||!a,$submitting:r,$buttonTheme:"secondary",type:"submit",children:"Submit"})]})]})}})]})})]})},eD=ea.ZP.p.withConfig({componentId:"sc-28a083b-0"})(["font-size:1rem;margin:0;"]),eA=ea.ZP.p.withConfig({componentId:"sc-28a083b-1"})(e=>{let{theme:r}=e;return{fontSize:".75rem",margin:0,...(0,j.l)(r.text.primary_font,["color"],{color:e=>e?(0,eI.F)(e_.DZ)("0.1",e):"inherit"})}});var eN=t(79807);function eF(){let{slug:e}=(0,F.v9)(e=>e.app.organization.organization),{webConfig:r,strings:t}=(0,F.v9)(e=>e.app.cmsConfig),i=t.rewards.learn_more_url,o=eN.P.MODAL_HOW_REWARDS_WORK[e];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ez,{children:(0,n.jsxs)(eL,{children:[(i||o)&&(0,n.jsx)(ef,{externalURL:i}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.SHOW_LOYALTY_HISTORY,component:(0,n.jsx)(eZ,{})}),r.accounts.barcode_scan&&(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.CLAIM_REWARDS_BY_RECEIPT,component:(0,n.jsx)(eO,{})})]})}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.SUPPORTS_QR,component:(0,n.jsx)(ey,{})})]})}let ez=ea.ZP.div.withConfig({componentId:"sc-fdf048e2-0"})(["align-items:center;background:",";justify-content:center;min-width:100%;padding:var(--size-5) var(--size-5) var(--size-32);width:100%;h1{font-family:",";font-size:24px;text-align:left;}button{align-items:center;max-width:75%;@media (max-width:1024px){min-width:100% !important;}}@media (min-width:768px){padding:var(--size-16) var(--size-5);}"],e=>{let{theme:r}=e;return(0,eI.F)(e_.DZ)("0.9",r.global.primary_active_color)},e=>{let{theme:r}=e;return r.primary_font.bold.font_family}),eL=ea.ZP.div.withConfig({componentId:"sc-fdf048e2-1"})(["display:grid;gap:var(--size-12);grid-template-columns:1fr;margin:0 auto;max-width:var(--size-4xl);width:100%;@media (min-width:768px){gap:var(--size-5);grid-template-columns:repeat(3,1fr);}"]);var eH=t(80684),eG=t(85787),eU=t(36525);let eY=ea.ZP.div.withConfig({componentId:"sc-78322357-0"})(["align-items:center;background:",";display:flex;height:400px;justify-content:center;padding:","px;text-align:center;width:100%;> div{width:100%;}h2,h3{font-size:20px;margin:0 0 ","px;@media (max-width:767px){font-size:16px;margin-bottom:","px;}}h3{font-family:",";font-weight:normal;}@media (max-width:767px){height:auto;margin-top:","px;padding:","px ","px;}"],e=>{let{theme:r}=e;return r.global.secondary_body_color},eU._.GUTTER,eU._.GUTTER,eU._.GUTTER/2,e=>{let{theme:r}=e;return r.primary_font.regular.font_family},eU._.LOYALTY_MENU_HEIGHT_MOBILE,2*eU._.GUTTER,eU._.GUTTER),eW=ea.ZP.h1.withConfig({componentId:"sc-78322357-1"})(["font-size:","px;font-family:",";margin:0 0 ","px;@media (max-width:767px){font-size:","px;margin-bottom:","px;}"],e=>e.currentPoints>0?48:32,e=>{let{theme:r}=e;return r.primary_font.bold.font_family},eU._.GUTTER,e=>e.currentPoints>0?38:28,eU._.GUTTER/2),eM=ea.ZP.div.withConfig({componentId:"sc-78322357-2"})(["display:flex;margin:0 0 ","px;justify-content:center;.wrapper{max-width:500px;width:100%;}.progress-bar{width:100%;background:",";border-radius:12px;border:1px solid ",";overflow:hidden;}.progress-bar-fill{display:block;height:24px;transition:width 500ms ease-in-out;background:",";border-radius:12px;}@media (max-width:767px){margin:0 0 ","px;}"],eU._.GUTTER,e=>{let{theme:r}=e;return(0,eI.F)(e_.DZ)(".9",r.global.primary_border_color)},e=>{let{theme:r}=e;return r.global.primary_border_color},e=>{let{theme:r}=e;return r.global.primary_active_color},eU._.GUTTER),e$=ea.ZP.div.withConfig({componentId:"sc-78322357-3"})(["display:flex;justify-content:center;margin:","px;"],eU._.GUTTER);var eB=(0,o.connect)(e=>({loyaltyState:e.app.me.loyaltyState,myRedeemables:e.app.me.redeemables,organization:e.app.organization,strings:e.app.cmsConfig.strings}))(e=>{var r;let{loyaltyState:t,organization:i,myRedeemables:a,strings:o}=e,s=null==t?void 0:t.membership_level_name,c=null!==(r=null==t?void 0:t.points)&&void 0!==r?r:0,l=null==i?void 0:i.loyalty.program_type,d=eH.fH.nextLargestRewardPointValue(l,t,a),x=eH.fH.calculateProgressBarWidth(c,d),h=d-c>0?d-c:0,p=(0,P.fB)((0,P.bc)(o,"rewards.rewards_counter"),1!==h);return(0,n.jsx)(eY,{children:(0,n.jsxs)("div",{children:[(0,n.jsx)(eW,{currentPoints:c,children:((e,r,t)=>{let i=(0,P.fB)((0,P.bc)(o,"rewards.rewards_counter"),t>1);
1return e?r?(0,n.jsxs)(n.Fragment,{children:[e.toLocaleString(),"/",t.toLocaleString()," ",i]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u.Z,{accessor:"rewards.maximum_tier_header",html:!0,dataObj:{points:e.toLocaleString()}})}):(0,n.jsx)(u.Z,{accessor:"rewards.no_rewards_header",html:!0})})(c,h,d)}),h>0&&(0,n.jsx)(eM,{children:(0,n.jsx)("div",{className:"wrapper",children:(0,n.jsx)("div",{className:"progress-bar",children:(0,n.jsx)("span",{className:"progress-bar-fill",style:{width:x}})})})}),h>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{children:(0,n.jsx)(u.Z,{accessor:"rewards.points_meter_subheader",html:!0,dataObj:{number:h.toLocaleString(),counter:p,conversionRate:l===eh.cI.POINTS_CONVERT_CURRENCY&&"$".concat(null==t?void 0:t.conversion_rate)}})}),(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.user_summary_total_available_points_text",html:!0,dataObj:{points:c.toString()}})]}):(0,n.jsx)(u.Z,{tag:"h2",accessor:"rewards.maximum_tier_subheader",html:!0}),!h&&(0,n.jsx)(e$,{children:(0,n.jsx)(eG.qt,{children:(0,n.jsx)(m,{label:"Rewards - Loyalty State"})})}),s&&(0,n.jsxs)(G.LS,{children:[(0,n.jsx)("img",{src:"/static/img/icons/trophy.svg",alt:"Trophy Icon"}),(0,n.jsx)(u.Z,{accessor:"rewards.user_summary_membership_level_text",html:!0,dataObj:{level:s}})]}),(0,n.jsx)(u.Z,{accessor:"rewards.pending_points_disclaimer",html:!0,tag:G.jp})]})})}),eq=t(96748);let eV=()=>{let{myOffers:e}=(0,o.useSelector)(et.G),r=(0,o.useSelector)(U.F5),t=(0,o.useDispatch)(),i=null==r?void 0:r.loyalty.program_type,s=[eh.cI.POINTS_CONVERT_REWARDS,eh.cI.SP_POINTS_CONVERT_REWARDS],c=(0,n.jsx)(u.Z,{accessor:s.includes(i)?"rewards.my_rewards_header":"rewards.offers_header",html:!0});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.EE,{children:[(0,n.jsxs)(G.Nc,{children:[c," (",e.length,")"]}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsx)(G.xc,{children:e.length>0?e.map((e,r)=>{var i;return(0,n.jsxs)(G.i$,{children:[(0,n.jsxs)(G.r7,{children:[(null===(i=e.image)||void 0===i?void 0:i.url)&&(0,n.jsx)("img",{src:e.image.url,alt:e.label}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{children:e.label}),e.expires_at&&(0,n.jsxs)("p",{children:["Expires: ",(0,es.vh)(e.expires_at)]})]})]}),(0,n.jsx)("div",{children:e.description&&e.description.split("\n").map((e,r)=>(0,n.jsx)(G.Fl,{children:e.trim()},"line-".concat(r)))}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(m,{label:"Rewards - Offers"}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.CREATE_REDEMPTION_USING_REWARD,component:(0,n.jsx)(A.u.Container,{onCancel:()=>t(T.default.clearActiveRedemption()),trigger:r=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",$buttonTheme:"knockout","aria-label":"Click to redeem reward ".concat(e.label," in store"),onClick:r,children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:r=>(0,n.jsx)(ec,{id:e.id,type:eh.Hx.OFFER,onError:r})})})]}),(0,n.jsx)(N.H,{condition:e.supports_donation,children:(0,n.jsx)(G.qt,{children:(0,n.jsx)(Y,{donation:{type:"reward",item:e.id},rewardName:e.label})})})]},r)}):(0,n.jsxs)(G.RX,{children:[(0,n.jsx)(eq.Cu,{}),(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.no_offers_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.no_offers_subheader",html:!0})]})})]})},eK=()=>{let{redeemables:e,loyaltyState:r}=(0,o.useSelector)(et.G),t=(0,f.EL)(),i=(0,o.useSelector)(U.F5),s=(0,o.useDispatch)(),c=null==r?void 0:r.points,l=(0,es.gx)(e,[],c);return(null==i?void 0:i.loyalty.program_type)!==eh.cI.POINTS_CONVERT_REDEEMABLES?null:(0,n.jsxs)(n.Fragment,{children:[e&&(0,n.jsxs)(G.EE,{children:[(0,n.jsxs)(G.Nc,{children:[(0,n.jsx)(u.Z,{accessor:"rewards.my_rewards_header",html:!0}),"\xa0(",l,")"]}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.my_rewards_subheader",html:!0}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsx)(G.xc,{children:e.map(e=>{var i;let o=e.points_required>(null==r?void 0:r.points),c=(0,P.fB)((0,P.bc)(t,"rewards.rewards_counter"),e.points_required>1);return(0,n.jsxs)(G.i$,{$inactive:o,children:[(0,n.jsxs)(G.r7,{children:[(null===(i=e.image)||void 0===i?void 0:i.url)&&(0,n.jsx)(G.ID,{$inactive:o,children:(0,n.jsx)("img",{src:e.image.url,alt:e.label})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{children:e.label}
1),(0,n.jsxs)("h4",{children:[e.points_required.toLocaleString()," ",c]})]})]}),(0,n.jsx)("div",{children:e.description&&e.description.split("\n").map((e,r)=>(0,n.jsx)(G.Fl,{children:e.trim()},"line-".concat(r)))}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(m,{label:"Rewards - Rewards"}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.CREATE_REDEMPTION_USING_REDEEMABLE,component:(0,n.jsx)(A.u.Container,{onCancel:()=>s(T.default.clearActiveRedemption()),trigger:r=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",$buttonTheme:"knockout","aria-label":"Click to redeem reward ".concat(e.label," in store"),onClick:r,children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:r=>(0,n.jsx)(ec,{id:e.id,type:eh.Hx.REWARD,onError:r})})})]}),(0,n.jsx)(N.H,{condition:e.supports_donation,children:(0,n.jsx)(G.qt,{children:(0,n.jsx)(Y,{donation:{type:"redeemable",item:e.id.toString()},rewardName:e.label})})})]},e.id)})})]})};var eX=t(96337),eJ=t(55354),eQ=t(62907),e0=t(29652),e3=t(16339),e1=t(20051);let e6="rewards-connection-error";var e2=()=>{let{dispatch:e,fetchRewardsHistory:r,fetchRedeemables:t,fetchOffers:o,fetchLoyaltyState:s,fetchRedemptions:c}=(0,e3.U)(),l=(0,F.v9)(e=>e.app.me.loyaltyState),d=(0,F.v9)(e=>e.app.me.loyaltyConnectionError),u=()=>{e(r()),e(t()),e(o()),e(s()),e(c())};return(0,i.useEffect)(()=>{(0,e1.nD)()&&u()},[]),(0,n.jsx)(e0.Q,{children:(0,n.jsx)(eJ.Z,{children:l?(0,n.jsxs)(eX.JP,{children:[d&&(0,n.jsx)(eQ.Gz,{variant:"banner","data-testid":e6,onRetry:u}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.SHOW_LOYALTY_STATE,component:(0,n.jsx)(eB,{})}),(0,n.jsxs)(eX.Qu,{children:[(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.INDEX_REDEEMABLES,component:(0,n.jsx)(eK,{})}),(0,n.jsx)(ep,{}),(0,n.jsx)(a.Z,{checkType:eh.Mo.FEATURE,checkName:eh.lw.INDEX_MY_REWARDS,component:(0,n.jsx)(eV,{})})]}),(0,n.jsx)(eF,{})]}):d?(0,n.jsx)(eQ.Gz,{"data-testid":e6,onRetry:u}):null})})}},83065:function(e,r,t){"use strict";t.d(r,{F:function(){return s}});var n=t(52322),i=t(79807),a=t(23643),o=t(75470);function s(){let{slug:e}=(0,o.v9)(e=>e.app.organization.organization),r=i.P.MODAL_HOW_REWARDS_WORK[e];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.u.Title,{children:"How Rewards Work"}),(0,n.jsx)(a.u.Content,{children:r&&(0,n.jsx)(r,{})}),(0,n.jsx)(a.u.Footer,{children:(0,n.jsx)(a.u.Cancel,{children:"Close"})})]})}},96337:function(e,r,t){"use strict";t.d(r,{$3:function(){return _},Dk:function(){return p},Gq:function(){return d},JP:function(){return l},Ji:function(){return g},Ll:function(){return x},Mo:function(){return f},Pw:function(){return c},Qu:function(){return o},UN:function(){return j},VX:function(){return m},aN:function(){return a},fb:function(){return u},t9:function(){return s},yt:function(){return h}});var n=t(43580),i=t(36525);let a=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-0"})({display:"flex",flexDirection:"column",gap:"var(--size-3)",paddingTop:"var(--size-3)","@media (min-width: 768px)":{gap:"var(--size-6)",paddingTop:"var(--size-6)"}}),o=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-1"})({margin:"0 auto",maxWidth:"".concat(i._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),padding:"".concat(2*i._.GUTTER,"px 0"),width:"100%"}),s=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-2"})({maxWidth:"".concat(i._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),margin:"".concat(i._.LOYALTY_MENU_HEIGHT_DESKTOP,"px auto 0"),"@media (max-width: 767px)":{marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),c=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-3"})({display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}),l=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-4"})({marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_DESKTOP,"px"),"@media (max-width: 767px)":{marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),d=n.ZP.form.withConfig({componentId:"sc-3b6e5b93-5"})({alignItems:"center",display:"flex",flexDirection:"column",margin:"0 auto",justifyContent:"center",width:"100%"}),u=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-6"})({alignItems:"center",display:"flex",flexWrap:"wrap",justifyContent:"center",width:"100%"}),x=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-7"})(e=>{let{autoHeight:r,theme:t}=e;return{flex:"1 1 33.333%",height:r?"auto":"".concat(t.forms.field_height+i._.GUTTER,"px"),overflow:"hidden",position:"relative","&:not(:first-child)":{paddingLeft:"".concat(i._.GUTTER,"px"),"@media (max-width: 767px)":{paddingLeft:0}},"@media (max-width: 767px)":{flexBasis:"100%"}}}),h=n.ZP.input.withConfig({componentId:"sc-3b6e5b93-8"})({backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #e0ded9",height:"48px",marginBottom:"20px",padding:"0 12px",width:"100%",color:"#231f20",fontSize:"16px",fontFamily:"Jost, Arial, Helvetica"}),m=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-9"})({display:"flex",justifyContent:"right",alignSelf:"flex-end","@media (max-width: 767px)":{display:"flex",flexDirection:"column-reverse",width:"100%",margin:0,button:{width:"100%"},"> div:first-child":{margin:"".concat(i._.GUTTER,"px 0 0 0")}}}),p=(0,n.ZP)(m).withConfig({componentId:"sc-3b6e5b93-10"})({position:"relative",top:"-20px","@media (max-width: 767px)":{top:0}}),_=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-11"})({padding:"".concat(i._.GUTTER,"px"),p:{margin:"".concat(i._.GUTTER/4,"px 0"),fontSize:"16px"}}),g=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-12"})({display:"flex",justifyContent:"space-between",alignItems:"center","@media (max-width: 767px)":{display:"block"}}),f=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-13"})({display:"flex",marginRight:"".concat(i._.GUTTER,"px"),alignItems:"center"}),j=n.ZP.button.withConfig({componentId:"sc-3b6e5b93-14"})(e=>{let{$bold:r,theme:t}=e;return{fontFamily:r?t.primary_font.bold.font_family:t.primary_font.regular.font_family,fontSize:"16px",color:t.global.primary_active_color,background:"none",border:"none",cursor:"pointer",padding:0,"&:hover":{opacity:.8}}})},16339:function(e,r,t){"use strict";t.d(r,{U:function(){return a}});var n=t(75470),i=t(15066);let a=()=>({dispatch:(0,n.I0)(),...i.default})}},function(e){e.O(0,[688,462,553,270,593,620,807,354,573,888,774,179],function(){return e(e.s=63312)}),_N_E=e.O()}]);
2//# sourceMappingURL=rewards-8a13a55c62e6ba54.js.map

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.