1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2815],{66:(t,e,a)=>{"use strict";a.d(e,{EQ:()=>s,PE:()=>n,es:()=>d});var r=a(94070),i=a(54280),l=a(26402);let n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.NONE,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{excludeMediaId:n,separateMediaId:c,tag:y}=a;if(!Object.values(s).includes(t))throw Error("Invalid path type: ".concat(t));if(!Object.values(d).includes(e))throw Error("Invalid filter type: ".concat(e));let{getIdTokenClaims:u,isAuthenticated:h}=(0,i.WB)(),[p,m]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=async()=>{h&&m((await u()).inmarToken)};t!==s.ALL_OFFERS&&e()},[u,h,t]);let{data:g,error:f,isLoading:C}=(0,l.Ay)(t===s.ALL_OFFERS||p?[t]:null,async()=>{let e={"Content-Type":"application/json","x-retailer":"thefreshmarket"};t!==s.ALL_OFFERS&&(e["x-auth-token"]=p);let a=await fetch(t,{method:"GET",headers:e});if(!a.ok)throw Error("Failed to fetch data");return a.json()}),S=Array.isArray(g)&&401!==g.status?g.filter(t=>!(n&&o(t,n))&&(e===d.NONE||(null==t?void 0:t.type)===e&&!!_(t))):[],E=[],v=[],M=[];return S.forEach(t=>{var e;let a=c&&o(t,c),r=(null==t||null==(e=t.tags)?void 0:e.map(t=>String(t).toLowerCase()))||[],i=y&&r.includes(y.toLowerCase());a?v.push(t):i?M.push(t):E.push(t)}),{data:E,separatedMediaData:v,taggedData:M,error:f,isLoading:C}},o=(t,e)=>{if(!(null==t?void 0:t.mediaProperties))return!1;let a=String(e);return Array.isArray(t.mediaProperties)?t.mediaProperties.some(t=>"object"==typeof t&&null!==t?String(t.id||t.value||t.code)===a:String(t)===a):("string"==typeof t.mediaProperties||"number"==typeof t.mediaProperties)&&String(t.mediaProperties).includes(a)},s={ALL_OFFERS:"".concat("https://api.thefreshmarket.com/inmar/ice","/v2/offers?limit=400"),ALL_USERS_OFFERS:"".concat("https://api.thefreshmarket.com/inmar/ice","/v2/offers/ranked?limit=400&contextTypes=targeted,campaign,relevant,unranked"),CLIPPED_USERS_OFFERS:"".concat("https://api.thefreshmarket.com/inmar/ice","/v2/offers/ranked?limit=400&contextTypes=targeted,campaign,relevant,unranked&groups=clipped")},d={NONE:"none",STORE:"store"},_=t=>{let e=(null==t?void 0:t.tags.map(t=>t.toLowerCase()).indexOf("birthday"))!==-1,a=(null==t?void 0:t.tags.map(t=>t.toLowerCase()).indexOf("clubreward"))!==-1,r=(null==t?void 0:t.tags.map(t=>t.toLowerCase()).indexOf("surprise"))!==-1;if(!e&&!a&&!r)return t}},26908:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var r,i=a(94070);function l(){return(l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t}).apply(null,arguments)}let n=function(t){return i.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},t),r||(r=i.createElement("path",{d:"M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zm2-13c0 .28-.21.8-.42 1L10 9.58c-.57.58-1 1.6-1 2.42v1h2v-1c0-.29.21-.8.42-1L13 9.42c.57-.58 1-1.6 1-2.42a4 4 0 00-8 0h2a2 2 0 114 0zm-3 8v2h2v-2H9z"})))}},36140:t=>{t.exports={WalletContainer:"MyWallet_WalletContainer__Pg3r7",SectionTitle:"MyWallet_SectionTitle__tcTjN",SectionSubtitle:"MyWallet_SectionSubtitle__O773N",CardGrid:"MyWallet_CardGrid__k8s9e",FeaturedCard:"MyWallet_FeaturedCard__7HolM",EmptyStateContainer:"MyWallet_EmptyStateContainer__nx7lh",EmptyStateImage:"MyWallet_EmptyStateImage__DztVz",EmptyStateContent:"MyWallet_EmptyStateContent__rHGNU",EmptyStateTitle:"MyWallet_EmptyStateTitle__Nlt6J",EmptyStateDescription:"MyWallet_EmptyStateDescription__jQmnu",EmptyStateButton:"MyWallet_EmptyStateButton__k_Kkj",BirthdayCard:"MyWallet_BirthdayCard__5uYri",BirthdayCardImage:"MyWallet_BirthdayCardImage__xbN7d",BirthdayCardContent:"MyWallet_BirthdayCardContent__HLtch",BirthdayCardGreeting:"MyWallet_BirthdayCardGreeting__WiwOZ",BirthdayCardValue:"MyWallet_BirthdayCardValue__zMNH3",BirthdayCardDescription:"MyWallet_BirthdayCardDescription__FkyJI",BirthdayCardFooter:"MyWallet_BirthdayCardFooter__FRsfd",BirthdayCardDate:"MyWallet_BirthdayCardDate__RYsdt",BirthdayCardInfoButton:"MyWallet_BirthdayCardInfoButton__9eDVd",HistorySection:"MyWallet_HistorySection__XMMGQ",Instru
1ctionsButton:"MyWallet_InstructionsButton__BJz7o",DialogContent:"MyWallet_DialogContent__D0ToF",DialogBody:"MyWallet_DialogBody__IgIlQ",DialogHeader:"MyWallet_DialogHeader__e_bLT",DialogInfoIcon:"MyWallet_DialogInfoIcon__PTeX2",DialogTitle:"MyWallet_DialogTitle__qFRBd",DialogTermsText:"MyWallet_DialogTermsText__a7U8j"}},61162:(t,e,a)=>{"use strict";a.r(e),a.d(e,{__N_SSG:()=>E,default:()=>v});var r=a(89142),i=a(94070),l=a(54280),n=a(15635),o=a(15574),s=a(8283),d=a(47907),_=a(5105),c=a(59304),y=a(54474),u=a(50084),h=a.n(u),p=a(66),m=a(46485),g=a(26908),f=a(36140),C=a.n(f);let S=t=>{let{emptyMessage:e,loyaltySiteframeContent:a}=t,[l,s]=(0,i.useState)(!1),{data:u}=(0,p.PE)(p.EQ.CLIPPED_USERS_OFFERS,p.es.STORE),h=[{title:t.rewardsTabTitle,href:"/loyalty/my-wallet"},{title:t.offersTabTitle,href:"/loyalty/my-wallet/offers",isActive:!0}];return(0,r.jsx)(d.A,{...t,headline:null==a?void 0:a.headline,imageList:null==a?void 0:a.imageList,children:(0,r.jsxs)(_.A,{children:[(0,r.jsx)("h2",{className:C().PageTitle,children:t.tabHeadline}),(0,r.jsx)(c.A,{tabs:h,DialogTrigger:(0,r.jsxs)(n.A,{linkBg:!0,onClick:()=>s(!0),className:C().TabLinksDialogTrigger,children:[(0,r.jsx)(g.A,{})," ",t.instructionsLabel]})}),(()=>{var e;return(0,r.jsx)(o.A,{showDialog:l,setShowDialog:()=>s(!1),children:(null==(e=t.instructionsModalContent)?void 0:e.json)?(0,m.i)(t.instructionsModalContent.json):null})})(),(0,r.jsx)("div",{className:C().RewardsContainer,children:(0,r.jsx)("div",{className:C().Section,children:(0,r.jsx)("div",{className:C().RewardsCardContainer,children:(null==u?void 0:u.length)>0?(0,r.jsx)("div",{className:C().CardList}):(0,r.jsx)("div",{className:C().EmptyMessage,children:(0,m.i)(e.json,(0,y.jP)())})})})})]})})};S.propTypes={pageTitle:h().string,rewardsTabTitle:h().string,offersTabTitle:h().string,tabHeadline:h().string,instructionsLabel:h().string,instructionsModalContent:h().object,emptyMessage:h().object,loyaltySiteframeContent:h().object};var E=!0;let v=(0,l.O8)(S,{onRedirecting:()=>(0,r.jsx)(s.q,{})})},91651:(t,e,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/loyalty/my-wallet/offers",function(){return a(61162)}])}},t=>{t.O(0,[9404,8868,9292,7600,9315,6485,2949,3215,2631,2062,636,6593,8792],()=>t(t.s=91651)),_N_E=t.O()}]);
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.