PageSourceSearch

https://www.hellofresh.de/_next/static/chunks/pages/achievements-a6786fbcd0c38f62.js

js hellofresh.de collected 2026-09-25 23:37:44 UTC 73,013 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85961,42503,9012,168,82563],{174673:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/achievements",function(){return r(999318)}])},747012:function(e,t,r){"use strict";r.d(t,{Sj:function(){return p},h5:function(){return h},rm:function(){return m}});var n,o,i=r(671718),l=r(26124),a=r(447178),c=r(456552),s=r(699219),u=r(140224);function d(e,t,r,n,o,i,l){try{var a=e[i](l),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var h=(n=function(e,t){var r,n,o,l,a,c,s,u,d,h,p,m,f,b,g,v,O=arguments;return function(e,t){var r,n,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw TypeError("Generator is already executing.");for(;l;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,n=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,function(Z){switch(Z.label){case 0:r=O.length>2&&void 0!==O[2]?O[2]:i.Z,n=e.postcode,l=void 0===(o=e.numDeliveries)?4:o,a=e.locale,c=e.systemCountry,s=e.parentSpan,u=e.initialOrder,d=e.customerPriority,h=e.cutoffTimeThreshold,p=e.customerJourney,m=e.customerUUID,f=e,b=e,f.family&&(g=f.family),b.product&&(v=b.product),Z.label=1;case 1:return Z.trys.push([1,3,,4]),[4,r("/api/delivery_dates_options",t,{query:y({zip:n,numDeliveries:l,locale:a,country:c},g?{family:g}:{},v?{product:v}:{},u?{initialOrder:u}:{},d?{customerPriority:d}:{},h?{cutoffTimeThreshold:h}:{},p?{customerJourney:p}:{}),parentSpan:s,headers:y({},m?{"X-Customer-UUID":m}:{}),fetchSpanAttributes:{"request.backend_service":"delivery-options-service","request.backend_action":"get-delivery-options-by-postcode"}})];case 2:return[2,Z.sent().json()];case 3:throw Z.sent();case 4:return[2]}})},o=function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function l(e){d(i,r,o,l,a,"next",e)}function a(e){d(i,r,o,l,a,"throw",e)}l(void 0)})},function(e,t){return o.apply(this,arguments)}),p=function(e,t){var r=y({},e,(0,u.O)()),n=[s.Z["delivery-options.byPostcode"],r];return(0,l.Z)(n,function(e){return h(r,n,e)},t)},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,a.Z)().fetch,r=(0,u.O)();return(0,c.useQueries)(null==e?void 0:e.map(function(e,n){var o,i,l=(o=y({},e,r),i=i={key:n},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o),a=[s.Z["delivery-options.byPostcode.multiple"],l];return{queryKey:a,queryFn:function(){return h(l,a,t)},enabled:!!e.postcode}}))}},42208:function(e,t,r){"use strict";r.d(t,{kL:function(){return s},wM:function(){return a},wk:function(){return c}});var n=r(892940),o=n.z.object({id:n.z.string(),name:n.z.string(),handle:n.z.string(),legacy_handles:n.z.array(n.z.string()),legacy_ids:n.z.array(n.z.string()),country:n.z.string(),specs:n.z.object({meals:n.z.union([n.z.number(),n.z.string()]),size:n.z.union([n.z.number(),n.z.string()]),recurrency:n.z.number().int()}).passthrough(),meal_swap:n.z.boolean(),meal_swap_default_choice:n.z.string(),swappable_meals:n.z.string(),public:n.z.boolean(),active:n.z.boolean(),is_subscribable:n.z.boolean(),is_available_for_extra_meals:n.z.boolean(),is_preset_enabled:n.z.boolean(),sort:n.z.number().int(),family:n.z.string(),created_at:n.z.string(),updated_at:n.z.string()}).passthrough(),i=n.z.object({total:n.z.number().int(),take:n.z.number().int(),skip:n.z.number().int(),count:n.z.number().int(),items:n.z.array(o)}).passthrough(),l=n.z.object({id:n.z.string(),country:n.z.string(),handle:n.z.string(),name:n.z.string(),headline:n.z.string(),contents:n.z.object({benefits:n.z.string(),price:n.z.string(),price_unit:n.z.string(),price_label:n.z.string(),price_sidenote:n.z.string(),small_print:n.z.string(),image:n.z.string(),fb_url:n.z.string(),description:n.z.string()}).passthrough(),template:n.z.object({meals:n.z.array(n.z.any()),size:n.z.array(n.z.any()),recurrency:n.z.array(n.z.any())}).passthrough(),tags:n.z.array(n.z.string()),prefix:n.z.string(),promotes:n.z.array(n.z.any()),icons:n.z.object({"1x":n.z.string(),"2x":n.z.string(),"3x":n.z.string()}).passthrough(),active:n.z.boolean(),compatible:n.z.array(n.z.string()),converts:n.z.string(),auto_convert:n.z.string(),recipe_family:n.z.string(),show_mobile:n.z.boolean(),sort:n.z.number().int(),created_at:n.z.string(),updated_at:n.z.string()}).passthrough(),a=n.z.object({total:n.z.number().int(),take:n.z.number().int(),skip:n.z.number().int(),count:n.z.number().int(),items:n.z.array(l)}).passthrough(),c=i,s=o},650603:function(e,t,r){"use strict";r.d(t,{Cp:function(){return z}});var n=r(687800);r(827378);var o=r(165218),i=r.n(o),l=r(768587),a=r(313954),c=r(43011),s=r(602307),u=r(169821),d=r(184883),y=r(493757),h=r(506685),p=r(430959),m=r(132021),f=r(763724),b=r(377380),g=r(589902),v=r(694414),O=r(389073),Z=r(52566),w=r(481248);function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var x=i()(function(){return Promise.all([r.e(40412),r.e(46045),r.e(35919)]).then(r.bind(r,635919)).then(function(e){return e.LeadBarFeature})},{loadableGenerated:{webpack:()=>[635919]}}),S=i()(function(){return Promise.all([r.e(40412),r.e(15863),r.e(50883)]).then(r.bind(r,875536)).then(function(e){return e.FooterFeature})},{loadableGenerated:{webpack:()=>[875536]}}),C="56px",k=function(e){var t,r=e.enableSSRCustomerHeader,o=e.nonStickyDesktopHeader,i=e.disableHeader,m=e.disableFooter,f=e.disableMinHeight,j=e.headerFullWidth,P=e.ssrPayload,k=e.children,z=(0,c.Z)();return(0,n.tZ)(s.Z,{claim:{name:"activations-rte",githubTeam:"hellofresh/activations-rte",tribe:"conversions",alliance:"growth",jiraPrefix:"USCRO",slackChannel:"#squad-curation",slackAlertsChannel:"#squad-curation",skipLabelsOnPR:!1,teamIdentifier:"activations-rte"},children:(0,n.tZ)(d.Z,{scope:"universal-layout",children:(0,n.tZ)(a.Z,{componentName:"universal-layout",children:(0,n.tZ)(p.Z,{filtrationIdentifier:null!==(t=null==P?void 0:P.filtrationIdentifier)&&void 0!==t?t:"",children:(0,n.BX)(l.xu,{position:"relative","data-test-id":"universal-layout",backgroundColor:"alias.page-background.alternative",children:[(0,n.tZ)(d.Z,{scope:"layouts-universal-top-banner",children:(0,n.tZ)(a.Z,{componentName:"layouts-universal-top-banner",children:(0,n.tZ)(y.Z,{children:(0,n.tZ)(u.Z,{suspense:!0,children:(0,n.tZ)(h.Z,{})})})})}),!(void 0!==i&&i)&&(0,n.tZ)(d.Z,{scope:"layouts-universal-header",children:(0,n.BX)(a.Z,{componentName:"layouts-universal-header",children:[(0,n.tZ)(w.Z,{}),(0,n.tZ)(Z.D9,{fullWidth:void 0!==j&&j,children:(0,n.tZ)(l.xu,{position:["sticky",void 0!==o&&o?"relative":"sticky"],top:"0",zIndex:"115",minHeight:C,"data-test-id":"universal-layout-header-container",children:(0,n.tZ)(b.ZP,{queryKey:P.contentfulHeaderEntriesKey,children:void 0!==r&&r||z?(0,n.tZ)(O.default,{}):(0,n.tZ)(v.Z,{})})})})]})}),(0,n.tZ)(a.Z,{componentName:"layouts-universal-page",children:(0,n.tZ)(l.xu,{flex:"1",minHeight:void 0!==f&&f?"unset":"100vh",children:k})}),!(void 0!==m&&m)&&(0,n.tZ)(d.Z,{scope:"layouts-universal-footer",children:(0,n.BX)(a.Z,{componentName:"layouts-universal-footer",children:[(0,n.tZ)(x,{}),(0,n.tZ)(g.ZP,{queryKey:P.contentfulFooterEntriesKey,children:(0,n.tZ)(S,{})})]})})]})})})})})},z=function(e){var t=e.navigationComponent,r=e.children,o=e.disableHeader,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["navigationComponent","children","disableHeader"]);return(0,n.tZ)(s.Z,{claim:{name:"activations-rte",githubTeam:"hellofresh/activations-rte",tribe:"conversions",alliance:"growth",jiraPrefix:"USCRO",slackChannel:"#squad-curation",slackAlertsChannel:"#squad-curation",skipLabelsOnPR:!1,teamIdentifier:"activations-rte"},children:(0,n.tZ)(d.Z,{scope:"side-navigation-universal-layout",children:(0,n.tZ)(a.Z,{componentName:"layouts-universal-side-navigation",children:(0,n.BX)(k,P(j({},i),{disableHeader:o,children:[(0,n.tZ)(l.xu,P(j({position:"sticky",zIndex:2},!o&&{top:C}),{children:(0,n.tZ)(d.Z,{scope:"layouts-universal-notifications",children:(0,n.tZ)(a.Z,{componentName:"layouts-universal-notifications",children:(0,n.tZ)(m.Z,{children:(0,n.tZ)(f.Z,{})})})})})),(0,n.BX)(l.xu,{minHeight:"100vh",display:[null,"flex"],maxWidth:["100%","960px","1144px"],px:["xs","md-1","zero"],mx:"auto",pt:["sm-1","md-2"],children:[(0,n.tZ)(l.xu,{as:"aside",width:[1,1/4],mr:["zero","md-1","md-2"],children:t}),(0,n.tZ)(l.xu,{width:[1,3/4],children:r})]})]}))})})})};t.ZP=k},377380:function(e,t,r){"use strict";r.d(t,{yY:function(){return s}});var n=r(687800),o=r(827378),i=r(456552),l=r(497249),a=r(344884),c=(0,o.createContext)({segment:[],label:[]}),s=function(){return(0,o.useContext)(c)};t.ZP=function(e){var t=e.queryKey,r=e.children,s=(0,i.useQueryClient)(),u=(0,l.T)(),d=(0,o.useMemo)(function(){var e,r,n=s.getQueryData(t);return{segment:null!==(e=null==n?void 0:n.segment)&&void 0!==e?e:[],label:null!==(r=null==n?void 0:n.label)&&void 0!==r?r:[]}},[s,t]);return(0,o.useEffect)(function(){if(!d.segment.length||!d.label.length){var e=u.startSpan("contentful-header-prov
1ider.missing-data");e.setAttributes({segmentCount:d.segment.length,labelCount:d.label.length}),e.setStatus({code:a.Z.ERROR}).end()}},[d,u]),(0,n.tZ)(c.Provider,{value:d,children:r})}},929085:function(e,t,r){"use strict";r.d(t,{Z:function(){return E}});var n,o=r(687800),i=r(827378),l=r(313954),a=r(184883),c=r(399649),s=r(768587),u=r(318066),d=r(164528),y=r(537691),h=r(963847);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=(p(n={unreached:{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyTime.svg",title:"loyaltyChallenge.hub.resultsSection.incompleted.title",description:"loyaltyChallenge.hub.resultsSection.incomplete.description"}},c.SR.None,{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyCelebration.svg",title:"loyaltyChallenge.hub.resultsSection.incomplete.noActions.title",description:"loyaltyChallenge.hub.resultsSection.incomplete.noActions.description"}),p(n,c.SR.Activate,{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyCelebration.svg",title:"loyaltyChallenge.hub.resultsSection.activate.title",description:"loyaltyChallenge.hub.resultsSection.activate.description"}),p(n,c.SR.Redeem,{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyCelebration.svg",title:"loyaltyChallenge.hub.resultsSection.redeem.title",description:"loyaltyChallenge.hub.resultsSection.redeem.description"}),n),f=function(){var e=(0,d.ZP)("loyalty-challenge").translate,t=(0,y.L)(),r=!(0,h.jX)(t).length,n=(0,h.eb)(t),i=m[r?"unreached":n];return(0,o.tZ)(l.Z,{componentName:"loyalty-program.achievements.results-section",children:(0,o.tZ)(s.xu,{mt:["sm-2","zero"],"data-test-id":"loyalty-program.achievements.results-section",children:(0,o.BX)(s.xu,{flexDirection:"column",justifyContent:"center",children:[(0,o.tZ)(u.ZP,{"data-test-id":"empty-state-image",alt:"",src:i.imageSrc,width:"100",height:"100",fetchFormat:"svg",role:"presentation"}),(0,o.BX)(s.xu,{mt:"sm-2",textAlign:"center",children:[(0,o.tZ)(s.xv,{type:"body-md-bold",mb:"sm-1",children:e(i.title)}),(0,o.tZ)(s.xv,{as:"p",mt:"xs",children:e(i.description)})]})]})})})},b=r(204912),g=r(23287),v=r(910652),O=function(e){var t,r,n=e.step,i=e.animate,l=e.size,a=void 0===l?"large":l,c=e.reached,u=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["step","animate","size","reached"]),d="small"===a?"20px":"42px",y="small"===a?"28px":"50px";return(0,o.tZ)(v.Z,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({animate:i,"data-test-id":"illustration-step-box-".concat(void 0===n?0:n)},u),r=r={children:(0,o.tZ)(s.xu,{p:c?"zero":"xxs",children:(0,o.tZ)(s.xu,{display:"flex",minWidth:d,minHeight:d,borderRadius:"border-radius-circle",backgroundColor:c?"neutral.100":"neutral.500",children:c&&(0,o.tZ)(s.JO,{icon:(0,o.tZ)(g.default,{width:y,height:y}),color:"success.600"})})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))},Z=r(510679),w=function(e){var t=e.size,r=e.stepNumber,n=e.isMilestone,i=e.milestoneNumber,l=e.currentAnimatedStepNumber,a=n?Z.Z:O,c=r<=l,u=r>l;return(0,o.tZ)(s.xu,{display:"flex",textAlign:"center",alignItems:"center",flexDirection:"column",minWidth:["auto","small"===t?"10px":"40px"],"data-test-id":"timeline-step-container-".concat(n?"milestone":"box","-").concat(r),children:(0,o.tZ)(s.xu,{title:"Box #".concat(r),"data-test-id":"box-v2",children:(0,o.tZ)(a,{size:t,step:r,milestoneNumber:i,reached:c,animate:u,showOne:!1})})})},j=function(e){var t=e.milestones,r=e.currentStep,n=e.numberOfSteps;return(0,i.useMemo)(function(){return Array.from(Array(n).keys()).map(function(e){var n=t.find(function(t){return t.stepNumber===e+1}),o=!!n;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({stepNumber:e+1,isCompleted:e<r,isMilestone:o,milestoneNumber:o?null==n?void 0:n.milestoneNumber:void 0},o&&{stepState:n.state})})},[r,n,t])};function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var x=function(e){var t,r=e.currentStep,n=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(0))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),2!==i.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return P(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],l=n[1];return(0,i.useEffect)(function(){if(!(o>=r)){var e=setTimeout(function(){l(o+1)},o?200:900);return function(){clearTimeout(e)}}},[o,r]),o},S=function(e){var t,r,n=e.milestones,l=e.currentStep,a=e.numberOfSteps,c=e.size,u=void 0===c?"large":c,d=e.stateSpacing,y=void 0===d?"large":d,h=e.isBanner,p=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["milestones","currentStep","numberOfSteps","size","stateSpacing","isBanner"]),m=j({milestones:n,numberOfSteps:a,currentStep:l}),f=x({currentStep:l});return(0,o.tZ)(s.xu,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({display:"flex",flexWrap:["wrap","nowrap"],justifyContent:"center",flexShrink:["unset","0","0"],alignItems:h?"center":"baseline"},p),r=r={children:m.map(function(e,t){var r=e.stepNumber,n=e.isMilestone,l=e.milestoneNumber;return(0,o.BX)(i.Fragment,{children:[n&&(0,o.tZ)(O,{size:u,reached:r<=f,animate:r>f}),(0,o.tZ)(w,{size:u,stepNumber:r,isMilestone:n,currentAnimatedStepNumber:f,stateSpacing:y,milestoneNumber:n?l:void 0},r)]},"".concat(t).concat(r))})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))},C=function(e){var t=e.total,r=e.current,n=(0,d.ZP)("loyalty-challenge").translate;return(0,o.BX)(s.xu,{alignSelf:["start","start","center"],ml:"xxs",mt:["zero","zero","md-1"],children:[(0,o.tZ)(s.xv,{strong:!0,type:["body-xs-bold","body-xs-bold","body-md-bold"],children:r}),(0,o.BX)(s.xv,{type:["body-xs-bold","body-xs-bold","body-md-bold"],children:["/",t]}),(0,o.tZ)(s.xv,{type:["body-xs-regular","body-xs-regular","body-md-regular"],color:"neutral.600",ml:"xxs",children:n("loyaltyChallenge.achievements.hub.progress.boxesOrdered")})]})},k=function(e){var t=e.size,r=e.oneStepInMobile,n=e.justifyContent,i=e.stateSpacing,l=e.showBoxCounter,a=e.isBanner,c=(0,y.L)();if(!c)return null;var u=(0,h.L)(c);return(0,o.BX)(s.xu,{display:"flex",justifyContent:n||"center",marginTop:r?"zero":"xs",width:[r?"80px":"380px","auto"],minWidth:["auto","small"===t?"auto":"747px"],children:[(0,o.tZ)(b.Z,{viewports:["mobile","tablet"],children:(0,o.BX)(s.xu,{display:"flex",flexDirection:"column",children:[(0,o.tZ)(S,{size:"small",milestones:u,currentStep:null==c?void 0:c.progress,numberOfSteps:null==c?void 0:c.total_steps,isBanner:
1a}),l&&!a&&(0,o.tZ)(C,{current:null==c?void 0:c.progress,total:null==c?void 0:c.total_steps})]})}),(0,o.tZ)(b.Z,{viewports:["desktop"],children:(0,o.BX)(s.xu,{display:"flex",flexDirection:"column",children:[(0,o.tZ)(S,{size:t,milestones:u,stateSpacing:void 0===i?"large":i,currentStep:null==c?void 0:c.progress,numberOfSteps:null==c?void 0:c.total_steps,isBanner:a}),l&&!a&&(0,o.tZ)(C,{current:null==c?void 0:c.progress,total:null==c?void 0:c.total_steps})]})})]})},z=r(705833),_=function(){var e=(0,z.C)().goToMenu,t=(0,d.ZP)("loyalty-challenge").translateRaw,r=(0,y.L)(),n=null==r?void 0:r.state,i=(0,h.eb)(r);if(n!==c.RP.InProgress&&i===c.SR.None)return null;var a=t("loyaltyChallenge.achievements.planNextOrderCTA.label");return(0,o.tZ)(l.Z,{componentName:"loyalty-program.achievements.improved-hub.plan-next-order",children:(0,o.tZ)(s.xu,{display:"flex",alignItems:"center","data-test-id":"loyalty-program.achievements.improved-hub.plan-next-order",justifyContent:"center",mb:["sm-2","zero"],children:(0,o.tZ)(s.xu,{minWidth:"255px",children:(0,o.tZ)(s.zx.Primary,{onClick:function(){e()},children:a})})})})},D=function(){return(0,o.tZ)("span",{"data-test-id":"loyalty-program-hub.progress-timeline-error"})},A=function(e,t){var r,n,i=t.loyaltyProgressBanner,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["loyaltyProgressBanner"]);return e.state===c.RP.InProgress||i?(0,o.BX)(o.HY,{children:[(0,o.tZ)(k,(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},l),n=n={showBoxCounter:!0,isBanner:i},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r)),!i&&(0,o.tZ)(_,{})]}):(0,o.tZ)(f,{})},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,y.L)();return t?(0,o.tZ)(a.Z,{fallback:D,scope:"loyalty-program-hub.progress-timeline-error",children:(0,o.tZ)(l.Z,{componentName:"loyalty-program-hub.progress-timeline",children:A(t,e)})}):null}},510679:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(687800);r(827378);var o=r(768587),i=r(910652),l=r(318066),a=function(e){var t=e.name,r=e.alt,o=e.width,i=e.height,a=e.basePath;return(0,n.tZ)(l.ZP,{width:void 0===o?"100":o,height:void 0===i?"100":i,fetchFormat:"svg",alt:(void 0===r?"":r)||t,role:"presentation",src:"".concat(void 0===a?"/hellofresh_website/illustrations/loyalty-challenge":a,"/").concat(t,".svg")})},c=r(739126),s={small:"body-sm-regular",large:"body-lg-regular"},u={small:{width:38,height:38},large:{width:72,height:72}},d=function(e){var t,r,l=e.step,d=e.animate,y=e.size,h=void 0===y?"large":y,p=e.milestoneNumber,m=e.reached,f=e.showOne,b=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["step","animate","size","milestoneNumber","reached","showOne"]),g=(0,c.f3)();return(0,n.BX)(i.Z,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({animate:d,"data-test-id":"illustration-step-milestone-".concat(void 0===l?0:l)},b),r=r={children:[(0,n.tZ)(o.xu,{transform:"translate(0%, -5%)",minWidth:u[h].width,minHeight:u[h].height,children:(0,n.tZ)(a,{name:f?m?"trophy-green-star":"trophy":m?"trophy-green":"milestone-2",width:u[h].width,height:u[h].height,basePath:g.timeline.images.stepIllustrationsBasePath})}),!f&&(0,n.tZ)(o.xu,{top:"60%",left:"50%",position:"absolute",transform:"translate(-50%,-100%)",children:(0,n.tZ)(o.xv,{strong:!0,color:"primary.100",type:s[h],children:void 0===p?0:p})})]},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))}},910652:function(e,t,r){"use strict";var n=r(687800);r(827378);var o=r(768587);t.Z=function(e){var t,r,i=e.animate,l=e.children,a=e.marginBottom,c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["animate","children","marginBottom"]);return(0,n.tZ)(o.xu,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({position:"relative",marginBottom:a},c),r=r={__dangerouslySetCustomCSS:{"@keyframes step-done":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(1.1)"},"100%":{transform:"scale(1)"}},animationFillMode:"both",animationDuration:"0.3s",animationIterationCount:1,animationTimingFunction:"ease-out",animationName:i?"unset":"step-done"},children:l},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))}},705833:function(e,t,r){"use strict";r.d(t,{C:function(){return a}});var n=r(581340),o=r(909626);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var a=function(){var e=(0,n.t)(),t=e.push,r=e.query,a="/my-account/deliveries/menu",c=(0,o.v)({subscriptionId:Number(null==r?void 0:r.subscriptionId)}),s=c.id,u=c.nextModifiableDeliveryWeek,d={week:u,subscriptionId:s};return{goToMenu:function(){t({pathname:a,query:i({},d)})},goToAddonMenuEdit:function(){t({pathname:a,query:l(i({},d),{withMenuAddOns:"true"})})},goToMealsMenuEdit:function(){t({pathname:a,query:l(i({},d),{edit:"true"})})},goToSurchargeMenuEdit:function(){t({pathname:a,query:l(i({},d),{edit:"true",collection:"Specials",category:"dinners",subCategory:"dinners-specials"})})},gotoBrowseByCategoriesPage:function(e){return t({pathname:"/store",query:{category:e.category,subCategory:e.subCategory,week:u,subscriptionId:s}},void 0,{shallow:!0,scroll:!0})}}}},881795:function(e,t,r){"use strict";r.d(t,{U:function(){return a}});var n=r(687800);r(827378);var o=r(313954),i=r(363913),l=r(811369),a=function(e){var t=e.children,r=e.subscriptionId,a=e.enabled,c=e.state,s=e.suspense,u=(0,l.k)({state:void 0===c?"in-progress,completed,incomplete":c,enabled:void 0===a||a,subscriptionId:r,suspense:void 0===s||s}),d=u.challenges,y={isLoading:u.isLoading,isFetched:u.isFetched,challenges:d,current:null==d?void 0:d[0]};return(0,n.tZ)(o.Z,{componentName:"loyalty-program-challenge-provider",children:(0,n.tZ)(i.f.Provider,{value:y,children:t})})}},151110:function(e,t,r){"use strict";r.d(t,{w:function(){return o}});var n=r(363913),o=function(){return(0,n.w)().isFetched}},285745:function(e,t,r){"use strict";r.d(t,{V:function(){return o}});var n=r(363913),o=function(){return(0,n.w)().isLoading}},145099:function(e,t,r){"use strict";r.d(t,{c:function(){return l}});var n=r(718583),o=r(953137),i=r(463171),l=function(){var e=(0,i.Z)("loyalty_challenge_hub_feature").isEnabled,t=(0,o.u)({},{suspense:!1,enabled:e}).data,r=t&&t.count<2,l=null===n.ZP||void 0===n.ZP?void 0:n.ZP.getItem("challenge.force.state.hubchange");return"disabled"!==l&&("enabled"===l||e&&r)}},870199:function(e,t,r){"use strict";r.d(t,{f:function(){return f},Z:function(){return b}});
1var n,o=r(687800),i=r(827378),l=r(761403),a=r(189452),c=r(165218),s=r.n(c),u=r(169821),d=r(158256);function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=(y(n={},d.nK.bounceModal,function(){return Promise.all([r.e(12737),r.e(78526),r.e(30816),r.e(20264),r.e(20828),r.e(52291)]).then(r.bind(r,594803))}),y(n,d.nK.genericModal,function(){return r.e(10783).then(r.bind(r,110783))}),y(n,d.nK.communityDiscountModal,function(){return Promise.all([r.e(47057),r.e(5441),r.e(61785)]).then(r.bind(r,561785))}),y(n,d.nK.communityPerksModal,function(){return Promise.all([r.e(47057),r.e(38579),r.e(12737),r.e(78526),r.e(30816),r.e(20264),r.e(20828),r.e(99184),r.e(5441),r.e(15263)]).then(r.bind(r,151949))}),y(n,d.nK.subscriptionSettingsModal,function(){return Promise.all([r.e(12737),r.e(78526),r.e(30816),r.e(20264),r.e(20828),r.e(28004),r.e(7965),r.e(33040)]).then(r.bind(r,508402))}),y(n,d.nK.paymentMethodModal,function(){return Promise.all([r.e(38579),r.e(12737),r.e(78526),r.e(30816),r.e(20264),r.e(20828),r.e(90730),r.e(56370)]).then(r.bind(r,169881))}),y(n,d.nK.deliveryAddressModal,function(){return Promise.all([r.e(47057),r.e(14206),r.e(9432),r.e(37384),r.e(63581),r.e(50182)]).then(r.bind(r,859149))}),y(n,d.nK.mealSelectionCompletionModal,function(){return Promise.all([r.e(47057),r.e(38579),r.e(17827),r.e(52463),r.e(34330),r.e(16709),r.e(15540),r.e(10681)]).then(r.bind(r,519003))}),y(n,d.nK.snapDialogPaidOrderModal,function(){return Promise.all([r.e(38579),r.e(87365)]).then(r.bind(r,687365))}),y(n,d.nK.xsellOrderSuccessModal,function(){return Promise.all([r.e(47057),r.e(35730)]).then(r.bind(r,435730))}),y(n,d.nK.standaloneHighRiskModal,function(){return r.e(49506).then(r.bind(r,649506))}),y(n,d.nK.loyaltyOptInModal,function(){return Promise.all([r.e(38579),r.e(2715),r.e(83394),r.e(87918),r.e(96715),r.e(47953),r.e(48248),r.e(81298)]).then(r.bind(r,185395))}),y(n,d.nK.loyaltyMissionIntroModal,function(){return Promise.all([r.e(47057),r.e(38579),r.e(73020),r.e(97077),r.e(59546)]).then(r.bind(r,59546))}),y(n,d.nK.loyaltyOnboardingModal,function(){return Promise.all([r.e(38579),r.e(26116),r.e(18451)]).then(r.bind(r,718451))}),y(n,d.nK.doubleProteinOnboardingModal,function(){return r.e(56828).then(r.bind(r,256828))}),y(n,d.nK.referralNudgeModal,function(){return Promise.all([r.e(38579),r.e(3657)]).then(r.bind(r,903657))}),n),p=function(e){var t=e.modalKey,r=e.isActive,n=s()(h[t]);return r?(0,o.tZ)(u.Z,{suspense:!0,children:(0,o.tZ)(n,{},t)}):null};function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}"test"!==(0,a.Z)().NODE_ENV&&(0,l.setAppElement)("#__next");var f=(0,i.createContext)({activeModal:null,setActiveModal:function(){},closeModal:function(){}}),b=function(e){var t,r=e.registerModals,n=e.initialModal,l=e.children,a=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(null!=n?n:null))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),2!==i.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return m(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=a[0],s=a[1];return(0,o.BX)(f.Provider,{value:{activeModal:c,setActiveModal:s,closeModal:function(e){s(function(t){return t===e?null:t})}},children:[l,r.map(function(e){return(0,o.tZ)(p,{modalKey:e,isActive:c===e},"".concat(e,"+").concat(Date.now()))})]})}},158256:function(e,t,r){"use strict";var n,o;r.d(t,{nK:function(){return n}}),(o=n||(n={})).bounceModal="bounce-modal",o.genericModal="generic-modal",o.communityDiscountModal="community-discount-modal",o.communityPerksModal="community-perks-modal",o.subscriptionSettingsModal="subscription-settings-modal",o.paymentMethodModal="payment-method-modal",o.deliveryAddressModal="delivery-address-modal",o.mealSelectionCompletionModal="meal-selection-completion-modal",o.snapDialogPaidOrderModal="snap-dialog-paid-order-modal",o.xsellOrderSuccessModal="xsell-order-success-modal",o.standaloneHighRiskModal="standalone-high-risk-modal",o.loyaltyOptInModal="loyalty-opt-in-modal",o.loyaltyMissionIntroModal="loyalty-mission-intro-modal",o.loyaltyOnboardingModal="loyalty-onboarding-modal",o.doubleProteinOnboardingModal="double-protein-onboarding-modal",o.referralNudgeModal="referral-nudge-modal"},203666:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(687800),o=r(827378),i=r(169821),l=r(570084),a=r(953137),c=r(117608),s=function(e,t){var r=(0,c.Z)(),n=(0,a.u)({},{suspense:!1}).data,i=(0,o.useRef)(!1);(0,o.useEffect)(function(){if(!i.current&&(!r||t&&("prospect"===t&&(null==n?void 0:n.count)!==0||"active"===t&&(null==n?void 0:n.count)===0))){e
1(),i.current=!0;return}},[r,n,t,e])},u=function(e){var t=e.children,r=e.redirectPath,i=void 0===r?"/login":r,a=e.customerType;return s((0,o.useCallback)(function(){return(0,l.r)(i)},[i]),a),(0,n.tZ)(o.Fragment,{children:t})},d=function(e){return(0,n.tZ)(i.Z,{fallback:e.fallback,children:(0,n.tZ)(u,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e))})}},204912:function(e,t,r){"use strict";var n=r(687800);r(827378);var o=r(268481);t.Z=function(e){var t=e.children,r=e.viewports,i=(0,o.Sj)();return r.includes(i)?(0,n.tZ)(n.HY,{children:t}):null}},999318:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return ex},default:function(){return eS}});var n,o,i,l=r(687800),a=r(827378),c=r(203666),s=r(768587),u=r(313954),d=r(184883),y=r(650603),h=r(31748),p=r(631540),m=r(739126),f=r(165218),b=r.n(f),g=r(145099),v=r(581340),O=r(909626),Z=r(881795),w=r(763724),j=r(870199),P=r(158256),x=r(151110),S=r(285745),C=r(537691),k=r(500005),z=r(164528),_=r(963847),D=r(399649),A=r(553911),E={onboarding:{first:null,second:"loyaltyChallenge.achievements.hub.header.weAreThrilled",third:"loyaltyChallenge.achievements.hub.header.keepOrdering"},"in-progress":{first:null,second:"loyaltyChallenge.achievements.hub.header.weAreExcited",third:"loyaltyChallenge.achievements.hub.header.weCookedUp"},completed:{first:"loyaltyChallenge.achievements.hub.header.yay",second:"loyaltyChallenge.achievements.hub.header.checkOutYourRewards",third:null},empty:{first:null,second:"loyaltyChallenge.achievements.hub.header.nextRewards",third:"loyaltyChallenge.achievements.hub.header.keepAnEye"},cancelled:{first:null,second:"loyaltyChallenge.achievements.hub.header.nextRewards",third:"loyaltyChallenge.achievements.hub.header.keepAnEye"},incomplete:{first:"loyaltyChallenge.achievements.hub.header.ohNo",second:"loyaltyChallenge.achievements.hub.header.youCantAdvance",third:"loyaltyChallenge.achievements.hub.header.keepAnEye"},amazing:{first:"loyaltyChallenge.achievements.hub.header.youDidAmazing",second:"loyaltyChallenge.achievements.hub.header.checkOutYourRewards",third:null}},M=function(){return(0,l.tZ)(s.xu,{height:"100%",width:"100%",top:"0",position:"absolute",backgroundImage:"url(https://hf-website-live.s3.eu-west-1.amazonaws.com/loyalty-program/images/header/RightStir.svg)",backgroundPosition:"0 100%",backgroundRepeat:"no-repeat",backgroundSize:["25%","contain"]})},I=function(){var e,t=(0,C.L)(),r=(0,z.ZP)("loyalty-challenge"),n=r.translateRaw,o=r.translate,i=(0,_.Ei)(t),a=E[i],c=a.third&&n(a.third,{rewardsCount:(null==t?void 0:null===(e=t.milestone_steps)||void 0===e?void 0:e.length)||0});return(0,l.BX)(s.xu,{marginLeft:"auto",marginRight:"auto",textAlign:"center",maxWidth:"100%",backgroundColor:"success.100",pt:"lg-1",pb:["md-1","lg-1"],backgroundImage:"url(https://hf-website-live.s3.eu-west-1.amazonaws.com/loyalty-program/images/header/LeftStir.svg)",backgroundPosition:"100% 0",backgroundRepeat:"no-repeat",backgroundSize:["40%","contain"],position:"relative","data-test-id":"loyalty-program-hub_header",children:[(0,l.tZ)(M,{}),(0,l.BX)(s.xu,{position:"relative",pl:"sm-2",pr:"sm-2",children:[(0,l.tZ)(s.xv,{as:"h1",textAlign:"center",mb:"md-1","data-test-id":"loyalty-hub-achievements-welcome",children:n("loyaltyChallenge.achievements.welcome")}),a.first&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(s.xv,{type:"body-lg-regular",children:(0,l.tZ)(A.Z,{copy:n(a.first),hasMarkdown:!0})}),(0,l.tZ)("br",{})]}),a.second&&(0,l.BX)(s.xv,{type:"body-lg-regular",mb:"sm-2",children:[o(a.second),(0,l.tZ)("br",{})]}),c&&(0,l.tZ)(s.xv,{type:"body-lg-regular",children:[D.RP.InProgress,"onboarding"].some(function(e){return e===i})?(0,l.tZ)(s.xv,{type:"body-lg-regular",children:(0,l.tZ)(A.Z,{copy:c,hasMarkdown:!0})}):(0,l.tZ)("span",{children:c})})]})]})},R=function(){return(0,l.tZ)(l.HY,{})},B=function(){return(0,l.tZ)(d.Z,{scope:"loyalty-program.new-hub.header-error",fallback:R,children:(0,l.tZ)(u.Z,{componentName:"loyalty-program.new-hub.header",children:(0,l.tZ)(I,{})})})},N=r(887824),T=r(318066);function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var H={imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyTime.svg",title:"loyaltyChallenge.hub.resultsSection.empty.title",description:"loyaltyChallenge.hub.resultsSection.description"},L=(X(o={},D.RP.Cancelled,H),X(o,D.RP.Completed,{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyCelebration.svg",title:"loyaltyChallenge.hub.resultsSection.completed.title",description:"loyaltyChallenge.hub.resultsSection.description"}),X(o,D.RP.InProgress,H),X(o,D.RP.Incomplete,{imageSrc:"/hellofresh_website/loyalty-program/images/hub/TrophyTime.svg",title:"loyaltyChallenge.hub.resultsSection.incompleted.title",description:"loyaltyChallenge.hub.resultsSection.description"}),o),K=function(){var e=(0,z.ZP)("loyalty-challenge").translate,t=(0,C.L)(),r=L[null==t?void 0:t.state]||H;return(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.results-section",children:(0,l.tZ)(s.xu,{mt:["sm-2","zero"],"data-test-id":"loyalty-program.achievements.results-section",children:(0,l.BX)(s.xu,{flexDirection:"column",justifyContent:"center",children:[(0,l.tZ)(T.ZP,{"data-test-id":"empty-state-image",alt:"",src:r.imageSrc,width:"100",height:"100",fetchFormat:"svg",role:"presentation"}),(0,l.BX)(s.xu,{mt:"sm-2",textAlign:"center",children:[(0,l.tZ)(s.xv,{type:"body-md-bold",mb:"sm-1",children:e(r.title)}),(0,l.tZ)(s.xv,{as:"p",mt:"xs",children:e(r.description)})]})]})})})},W=r(308594),F=function(){var e=(0,z.ZP)("loyalty-challenge").translate,t=(0,N.Z)().push;return(0,l.tZ)(s.rU,{href:"/referrals?origin=achievements-raf-banner&type=credit",noStyle:!0,onClick:function(){return t(W.l0)},children:(0,l.tZ)(s.xu,{bg:"neutral.100",borderRadius:"border-radius-sm",maxWidth:"556px",px:["sm-1","md-1"],py:["sm-1","md-3"],mt:"md-1",backgroundSize:"cover",backgroundPosition:"100% 100%",backgroundImage:"url('https://cdn.hellofresh.com/us/cms/ER/lc-onboarding-background-left.svg')","data-test-id":"loyalty-program.achievements.benef
1its-section",backgroundRepeat:"no-repeat",children:(0,l.BX)(s.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,l.BX)(s.xu,{ml:"sm-2",mt:"sm-2",textAlign:"left",children:[(0,l.tZ)(s.xv,{mb:"sm-1",as:"h4",children:e("loyaltyChallenge.hub.referCard.title")}),(0,l.tZ)(s.xv,{as:"p",mb:"sm-2",children:e("loyaltyChallenge.hub.referCard.description")})]}),(0,l.tZ)(s.xu,{flexShrink:0,ml:["sm-1","md-2","xl-1"],children:(0,l.tZ)(T.ZP,{"data-test-id":"empty-state-image",alt:"",src:"/hellofresh_website/loyalty-program/images/hub/WomanBox.svg",width:"100",height:"87",fetchFormat:"svg",role:"presentation"})})]})})})},q=function(){var e=(0,z.ZP)("loyalty-challenge").translate;return(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.benefits-section",children:(0,l.BX)(s.xu,{pb:"lg-2",children:[(0,l.tZ)(s.xv,{as:"h4",children:e("loyaltyChallenge.benefits.title")}),(0,l.tZ)(s.xu,{display:"flex",justifyContent:"center",children:(0,l.tZ)(F,{})})]})})},U=r(463171),Y=function(){var e=(0,U.Z)("raf_page_enabled").isEnabled,t=(0,N.Z)().push;return a.useEffect(function(){setTimeout(function(){return t(W.Ad)},200)},[]),(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.non-active-challenge",children:(0,l.BX)(s.xu,{mt:"sm-2",display:"flex",flexDirection:"column",minHeight:"400px",children:[(0,l.tZ)(K,{}),e&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(s.iz,{variant:"horizontal",my:"lg-1"}),(0,l.tZ)(q,{})]})]})})},V=r(488694),Q=r(519883);(n=i||(i={}))["in-progress"]="loyaltyChallenge.achievements.yourProgress",n.completed="loyaltyChallenge.achievements.congrats",n.incomplete="loyaltyChallenge.achievements.betterLuckNextTime",n.redeem="loyaltyChallenge.achievements.redeemBeforeExpire",n.activate="loyaltyChallenge.hub.resultsSection.redeem.title",n["good-job"]="loyaltyChallenge.achievements.goodJobChef",n.cancelled="loyaltyChallenge.achievements.moreRewardsSoon",n.none="loyaltyChallenge.achievements.moreRewardsSoon",n.empty="loyaltyChallenge.achievements.moreRewardsSoon";var $=function(e){var t=e.challenge,r=(0,z.ZP)("loyalty-challenge").translate,n=(0,_.b1)(t);return(0,l.tZ)(s.xu,{position:"relative",margin:"md-2",children:(0,l.tZ)(s.xu,{mb:"sm-2",display:"flex",justifyContent:"center",children:(0,l.tZ)(s.xv,{as:"h2",children:r(i[n])})})})},G=r(295332),J=r(384949),ee=r(958042),et=function(e){var t=e.date,r=(0,z.ZP)("loyalty-challenge").translate,n=(0,ee.Z)(),o=(0,G.Z)(t,J.Si[n].DATE_FORMAT_FULL);return(0,l.BX)(s.xu,{mb:"sm-2",display:"flex",justifyContent:"center",children:[(0,l.tZ)(s.xv,{as:"span",children:r("loyaltyChallenge.hub.progress.startdate")}),(0,l.tZ)(s.xv,{ml:"xxs",as:"span",strong:!0,children:o})]})},er=r(809012),en=r(942503),eo=r(435940),ei=r.n(eo),el=r(563522),ea=r.n(el),ec=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Date;r.setHours(0,0,0,0);var n=new Date(e);n.setHours(0,0,0,0);var o=ei()(n,r);return(t&&(o-=1),o<7)?{count:o||1,isDays:!0}:{count:Math.floor(o/7)||1,isDays:!1}},es=function(e,t){var r=new Date;return ea()(r,e)||t!==D.RP.InProgress},eu=function(e,t,r){var n=e+(t.isDays?1:t.count);return r.filter(function(t){return t>e&&t<=n}).length||0},ed=function(e){var t=e.challengeState,r=e.finishDate,n=e.currentProgress,o=e.milestones,i=(0,z.ZP)("loyalty-challenge"),c=i.translate,u=i.translateRaw,d=es(r,t),y=ec(r),h=u("loyaltyChallenge.achievements.description.timeRemaining.".concat(y.isDays?"onlyDays":"onlyWeeks",".").concat(1===y.count?"singular":"plural"),{weeks:y.count,days:y.count}),p=u("loyaltyChallenge.achievements.timeRemaining.weeksLeft",{weeks:h}),m=eu(n,y,o),f=u("loyaltyChallenge.achievements.timeRemaining.rewards.".concat(1===m?"singular":"plural"),{rewards:m}),b=u(m===o.length?"loyaltyChallenge.achievements.timeRemaining.toEarnAllRewards":"loyaltyChallenge.achievements.timeRemaining.toEarnRewards",{rewards:f}),g=(0,a.useMemo)(function(){return m?(0,l.tZ)(l.HY,{children:(0,l.tZ)(s.xv,{children:(0,l.tZ)(A.Z,{copy:" ".concat(b),hasMarkdown:!0})})}):"!"},[m,b]);if(d){var v=c("loyaltyChallenge.achievements.timeRemaining.challengeEnded");return(0,l.tZ)(s.xv,{type:"body-md-bold",children:v})}return(0,l.BX)(l.HY,{children:[(0,l.tZ)(s.xv,{children:(0,l.tZ)(A.Z,{copy:p||"",hasMarkdown:!0})}),g]})},ey=function(e){var t=e.challengeState;return(0,l.tZ)(l.HY,{children:t===D.RP.InProgress?(0,l.tZ)(er.default,{}):(0,l.tZ)(en.default,{})})},eh=function(e){var t=e.challenge,r=null==t?void 0:t.state,n=(0,_.eb)(t);return r!==D.RP.InProgress&&n===D.SR.None?null:(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.improved-
1hub.timeline-time-remaining",children:(0,l.BX)(s.xu,{display:"inline-flex",px:"md-2",py:"sm-1",backgroundColor:"information.100",borderRadius:"border-radius-sm",alignItems:["flex-start","center"],"data-test-id":"loyalty-program.achievements.improved-hub.timeline-time-remaining",children:[(0,l.tZ)(ey,{challengeState:r}),(0,l.tZ)(s.xu,{ml:"xs",children:(0,l.tZ)(ed,{challengeState:r,finishDate:t.finish_date,currentProgress:t.progress,milestones:t.milestone_steps})})]})})},ep=function(e){var t=e.challenge,r=e.showTitle,n=e.showStartDate,o=e.showTimeRemaining;return(0,l.BX)(l.HY,{children:[r&&(0,l.tZ)($,{challenge:t}),n&&(0,l.tZ)(et,{date:null==t?void 0:t.start_date}),o&&(0,l.tZ)(eh,{challenge:t})]})},em=function(){var e,t=(0,N.Z)().push,r=(0,C.L)(),n=!!(null==r?void 0:null===(e=r.feature_flags)||void 0===e?void 0:e.concept_of_choice_enabled);return a.useEffect(function(){setTimeout(function(){var e,r;return t((e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},W.Ad),r=r={choose_reward:"".concat(n)},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e))},200)},[]),(0,l.BX)(u.Z,{componentName:"loyalty-program.achievements.running-challenge",children:[(0,l.tZ)(ep,{challenge:r,showTitle:!0,showStartDate:!0,showTimeRemaining:!0}),(0,l.tZ)(s.xu,{mt:"md-1",display:"flex",alignItems:"center",flexDirection:"column",children:(0,l.tZ)(V.Z,{})}),(0,l.tZ)(s.xu,{mt:"md-2",children:(0,l.tZ)(Q.Z,{})}),(0,l.tZ)(s.xu,{py:"global.lg-1"})]})},ef=r(247661),eb=function(){var e,t,r=(0,x.w)(),n=(0,S.V)(),o=(0,C.L)(),i=(0,k.B)(),a=(0,ef.c)(),c=a.wasIntroSeen,d=a.enabled;if(!r||n)return(0,l.tZ)(s.xu,{mt:"xl-1",backgroundColor:"neutral.200",children:(0,l.tZ)(s.$j,{variant:"primary",size:"lg"})});var y=null==o?void 0:o.state;return(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.space.main",children:(0,l.tZ)(p.Z,{values:(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},i),t=t={onboarding:d?c?"bottom":"top":""},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e),children:(0,l.BX)(s.xu,{marginLeft:"auto",marginRight:"auto",textAlign:"center",maxWidth:"100%",children:[(0,l.tZ)(B,{}),(0,l.tZ)(s.xu,{marginLeft:"auto",marginRight:"auto",textAlign:"center",px:["sm-2","zero"],maxWidth:["100%","960px","1144px"],children:(0,l.tZ)(s.xu,{px:["xs","zero"],children:(0,l.tZ)(s.xu,{textAlign:"center",mt:["zero","lg-1"],px:["sm-1","md-1","lg-1"],"data-test-id":"loyalty-challenge-running",children:(0,l.tZ)(s.xu,{px:["xs","zero"],children:y?(0,l.tZ)(em,{}):(0,l.tZ)(Y,{})})})})})]})})})},eg=r(948685),ev=function(){var e=(0,v.t)().query,t=(0,m.f3)().isProgramEnabled,r=(0,O.v)({enabled:t,subscriptionId:Number(null==e?void 0:e.subscriptionId)});return t?(0,l.tZ)(Z.U,{subscriptionId:Number(null==r?void 0:r.id),children:(0,l.BX)(j.Z,{registerModals:[P.nK.genericModal],children:[(0,l.tZ)(w.Z,{}),(0,l.tZ)(s.xu,{marginLeft:"auto",marginRight:"auto",textAlign:"center",maxWidth:"100%",backgroundColor:"neutral.100",children:(0,l.tZ)(eb,{})})]})}):(0,l.tZ)(eg.u,{})};function eO(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eZ=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=a.useState(!1))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),2!==i.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return eO(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eO(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],n=t[1],o=(0,z.ZP)("loyalty-challenge").translateRaw,i=(0,v.t)(),c=function(){i.reload(),n(!0)};return(0,l.tZ)(s.xu,{"data-test-id":"loyalty-error-fallback",py:["lg-3","xxl"],children:(0,l.tZ)(s.xu,{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",children:(0,l.BX)(s.xu,{textAlign:"center",maxWidth:"343px",children:[(0,l.tZ)(s.xu,{children:(0,l.tZ)(T.ZP,{alt:"",width:"104",height:"104",fetchFormat:"svg",role:"presentation",src:"/hellofresh_website/loyalty-program/images/reward/warm-error.svg"})}),(0,l.tZ)(s.xu,{textAlign:"center",mt:"sm-1",children:(0,l.tZ)(s.xv,{type:"body-md-bold",children:o("loyaltyChallenge.pageLoad.error.title")})}),(0,l.tZ)(s.xu,{textAlign:"center",mt:"sm-1",children:(0,l.tZ)(s.xv,{children:o("loyaltyChallenge.pageLoad.error.description")})}),(0,l.tZ)(s.xu,{mt:"md-1",display:"inline-flex",justifyContent:"center",children:(0,l.tZ)(s.zx.Primary,{loading:r,onClick:function(){return c()},children:o("loyaltyChallenge.pageLoad.error.cta")})})]})})})},ew=b()(function(){return Promise.all([r.e(9795),r.e(41696)]).then(r.bind(r,544590))},{loadableGenerated:{webpack:()=>[544590]}}),ej=function(){return(0,g.c)()?(0,l.tZ)(d.Z,{fallback:function(){return(0,l.tZ)(eZ,{})},scope:"loyalty-program.achievements.space.hub.error",children:(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.space.hub",children:(0,l.tZ)(ev,{})})}):(0,l.tZ)(d.Z,{fallback:function(){return(0,l.tZ)(eZ,{})},scope:"loyalty-program.achievements.space.v2.error",children:(0,l.tZ)(u.Z,{componentName:"loyalty-program.achievements.space.v2",children:(0,l.tZ)(ew,{})})})},eP=function(){return(0,l.BX)(l.HY,{children:[(0,l.tZ)(h.Z,{}),(0,l.tZ)(d.Z,{scope:"achievements",children:(0,l.tZ)(u.Z,{componentName:"loyalty-program.page.achievements",children:(0,l.tZ)(p.Z,{values:{screen:"Achievements"},children:(0,l.tZ)(c.Z,{customerType:"active",redirectPath:"/plans",children:(0,l.tZ)(a.Suspense,{fallback:(0,l.tZ)(s.xu,{marginLeft:"auto",marginRight:"auto",textAlign:"center",maxWidth:["100%","960px","1144px"],children:(0,l.tZ)(s.xu,{mt:"xl-1",children:(0,l.tZ)(s.$j,{variant:"primary",size:"lg"})})}),children:(0,l.tZ)(m.Cv,{children:(0,l.tZ)(ej,{})})})})})})})]})};eP.customLayout=y.ZP,eP.provideCustomLayoutProps={enableSSRCustomerHeader:!0};var ex=!0,eS=eP},948685:function(e,t,r){"use strict";r.d(t,{u:function(){return u}});var n=r(687800),o=r(827378),i=r(768587),l=r(318066),a=r(164528),c=r(887824),s=r(308594),u=function(){var e=(0,a.ZP)("loyalty-challenge").translate,t=(0,c.Z)().push;return(0,o.useEffect)(function(){t(s.zM)},[t]),(0,n.BX)(n.HY,{children:[(0,n.tZ)(i.xv,{as:"h2",textAlign:"center",mt:"md-3",mb:["sm-2","lg-2"],children:e("loyaltyChallenge.emptyState.title")}),(0,n.BX)(i.xu,{bg:"neutral.100",boxShadow:"shadow-sm",borderRadius:"border-radius-sm",maxWidth:"752px",mx:["md-1","auto"],py:["sm-2","md-2"],children:[(0,n.BX)(i.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",px:["sm-2","xl-1"],children:[(0,n.BX)(i.xu,{children:[(0,n.tZ)(i.xv,{mb:"xs",as:"h4",children:e("loyaltyChallenge.emptyState.subtitle")}),(0,n.tZ)(i.xv,{as:"p",mb:"sm-2",children:e("loyaltyChallenge.emptyState.description")})]}),(0,n.tZ)(i.xu,{flexShrink:0,ml:["sm-1","md-2","xl-1"],children:(0,n.tZ)(l.ZP,{"data-test-id":"empty-state-image",alt:"",src:"/hellofresh_website/us/cms/ER/empty-state.svg",width:"100",height:"87",fetchFormat:"svg",role:"presentation"})})]}),(0,n.tZ)(i.xu,{display:["block","none"],borderTopColor:"neutral.400",borderTopWidth:"1px",borderTopStyle:"solid"}),(0,n.tZ)(i.xu,{mx:["sm-2","xl-1"],mt:["sm-2","zero"],children:(0,n.tZ)(i.xu,{width:[1,"fit-content"],textAlign:"center",children:(0,n.tZ)(i.zx.Secondary,{as:"a",href:"/referrals","data-test-id":"empty-state-cta",onClick:function(){return t(s.LB)},children:e("loyaltyChallenge.emptyState.cta")})})})]})]})}},519883:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});
1var n=r(687800),o=r(827378),i=r(184883),l=r(313954),a=r(887824),c=r(807947),s=r(768587),u=r(537691),d=r(963847),y=r(553911),h=r(399649),p=r(308594),m=r(247661);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var b=function(){var e,t,r=(0,a.Z)().push,i=(0,u.L)(),l=(0,d.M1)(i),b=function(e){if(Array.isArray(e))return e}(e=(0,o.useState)(!1))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),2!==i.length);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return f(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=b[0],v=b[1],O=(0,m.c)(),Z=O.enabled,w=O.wasIntroSeen,j={question:"loyaltyChallenge.achievements.accordion.title",answer:null==l?void 0:null===(t=l.translation_keys)||void 0===t?void 0:t.how_it_works_description_accordion};return Z&&w&&(null==i?void 0:i.state)===h.RP.InProgress?j.answer?(0,n.BX)(s.xu,{ml:"auto",mr:"auto",display:"flex",alignItems:"center",flexDirection:"column",maxWidth:["100%","80%"],"data-test-id":"LoyaltyProgramHowItWorksAccordion",children:[(0,n.tZ)(s.xu,{width:"100%",borderTopColor:"neutral.400",borderTopWidth:1,borderTopStyle:"solid"}),(0,n.tZ)(s.xu,{pt:"md-3",pb:"xs",children:(0,n.tZ)(c.Z,{group:"loyalty-challenge",applangaKey:"loyaltyChallenge.achievements.accordion.header",render:function(e){return(0,n.tZ)(s.xv,{as:"h4",children:e})}})}),(0,n.tZ)(s.xu,{width:"100%",textAlign:"left",children:(0,n.BX)(s.UQ.Outline,{isOpen:g,buttonPosition:"right","data-test-id":"LoyaltyProgramHowItWorksAccordionButton",onClick:function(){r(p.H0),v(!g)},children:[(0,n.tZ)(s.UQ.Title,{children:(0,n.tZ)(c.Z,{group:"loyalty-challenge",applangaKey:j.question})}),(0,n.tZ)(s.UQ.Description,{children:(0,n.tZ)(s.xu,{pt:"sm-1",pl:"xs",children:(0,n.tZ)(c.Z,{group:"loyalty-challenge",applangaKey:j.answer,render:function(e){return(0,n.tZ)(s.xu,{pb:"md-1",children:(0,n.tZ)(s.xv,{textAlign:"left",children:(0,n.tZ)(y.Z,{copy:e,hasMarkdown:!0})})})}})})})]})})]}):(0,n.tZ)(n.HY,{}):null},g=function(){return(0,n.tZ)(n.HY,{})},v=function(){return(0,n.tZ)(i.Z,{fallback:g,scope:"achievements-loyalty-program-how-it-works-error",children:(0,n.tZ)(l.Z,{componentName:"achievements-loyalty-program-how-it-works",children:(0,n.tZ)(b,{})})})}},247661:function(e,t,r){"use strict";r.d(t,{c:function(){return s}});var n=r(564020),o=r(26730),i=r(200770),l=r(718583),a=r(953137),c=[o.Z.GB,o.Z.US,o.Z.AU,o.Z.NZ,o.Z.NL,o.Z.DE,o.Z.BE,o.Z.AT,o.Z.FR,o.Z.LU],s=function(){var e=(0,i.Z)(),t=c.includes(e),r=(0,a.u)({},{suspense:!1,enabled:t}).data,o=t&&r&&r.count<2,s=(0,n.k)({},{enabled:o,suspense:!1}),u=s.data,d=s.isLoading,y=null===l.ZP||void 0===l.ZP?void 0:l.ZP.getItem("challenge.force.state.onboarding");return"disabled"===y?{enabled:!1,wasIntroSeen:!1}:"enabled"===y?{enabled:!0,wasIntroSeen:!1}:{enabled:o&&!d,wasIntroSeen:!(null==u?void 0:u.loyalty_program_onboarding_show_intro)}}},308594:function(e,t,r){"use strict";function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}
1)(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r.d(t,{Ad:function(){return a},H0:function(){return p},LB:function(){return h},Pj:function(){return s},Qz:function(){return u},V3:function(){return d},l0:function(){return c},uT:function(){return l},zM:function(){return y}});var i={event:"gaEventTrigger"},l=o(n({},i),{event_name:"Achievements_ChallengeAchievementDisplay",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|display",user_action:"display",element:"achievements"}),a=o(n({},i),{user_action:"display",element:"freshAchievements",gaEventCategory:"loyaltyChallenge",gaEventAction:"freshAchievements|display",event_name:"Achievements_FreshAchievements"}),c=o(n({},i),{event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|clickEarnRewards",user_action:"clickEarnRewards"}),s=function(e){return n(o(n({},i),{gaEventAction:"achievements|clickHowToRedeem",user_action:"clickHowToRedeem",element:"achievements"}),e)},u=o(n({},i),{event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|popupRedeemAccept",user_action:"popupRedeemAccept",element:"achievements"}),d=o(n({},i),{event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|popupRedeemClose",user_action:"popupRedeemClose",element:"achievements"});o(n({},i),{gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|clickMoreDetails",user_action:"clickMoreDetails",element:"achievements"}),o(n({},i),{event_name:"Achievements_ChallengeMyDeliveryClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"myDeliveriesBanner|clickLearnMore",user_action:"clickLearnMore",element:"myDeliveriesBanner"}),o(n({},i),{event_name:"Achievements_ChallengeMyDeliveryDisplay",gaEventCategory:"loyaltyChallenge",gaEventAction:"myDeliveriesBanner|display",user_action:"display",element:"myDeliveriesBanner"}),o(n({},i),{event_name:"Achievements_ChallengeMyDeliveryClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"myDeliveriesBanner|clickDismiss",user_action:"clickDismiss",element:"myDeliveriesBanner"});var y=o(n({},i),{event_name:"Achievements_ChallengeAchievementDisplay",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|display",user_action:"display"}),h=o(n({},i),{event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|clickEarnRewards",user_action:"clickEarnRewards"}),p=o(n({},i),{event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|clickHowItWorks",user_action:"clickHowItWorks",element:"achievements"})},591329:function(e,t,r){"use strict";var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.Z=function(e){var t=e.title,r=e.titleId,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);
1return(0,n.BX)("svg",i(o(i(o({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),l),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{d:"M9 5.5a1 1 0 0 0-2 0v2.98l2.675 2.184a1 1 0 1 0 1.25-1.562L9 7.52V5.5Z",fill:"currentColor"}),(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-2 0A5 5 0 1 1 3 8a5 5 0 0 1 10 0Z",fill:"currentColor"})]}))}},125846:function(e,t,r){"use strict";r.r(t);var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.default=function(e){var t=e.title,r=e.titleId,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",i(o(i(o({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),l),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 6h-3a4 4 0 0 0-8 0H5L4 22h16L19 6ZM8 8v2h2V8h4v2h2V8h1.121l.75 12H6.13l.75-12H8Zm6-2h-4a2 2 0 1 1 4 0Z",fill:"currentColor"})]}))}},942503:function(e,t,r){"use strict";r.r(t);var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.default=function(e){var t=e.title,r=e.titleId,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",i(o(i(o({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),l),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{d:"M21 16.152a9.903 9.903 0 0 1-4.091.878c-5.49 0-9.94-4.45-9.94-9.939 0-1.458.315-2.843.879-4.091A9.941 9.941 0 0 0 2 12.06C2 17.55 6.45 22 11.94 22c4.03 0 7.5-2.4 9.06-5.848Z",fill:"currentColor"})]}))}},299446:function(e,t,r){"use strict";r.r(t);var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.default=function(e){var t=e.title,r=e.titleId,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",i(o(i(o({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),l),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.4 6 8 3h8l.6 3H21v13h-2a2 2 0 1 1-4 0H9a2 2 0 1 1-4 0H3V6h4.4Zm2.04 0 .2-1h4.72l.2 1H9.44ZM19 17V8H5v9h14Z",fill:"currentColor"})]}))}},809012:function(e,t,r){"use strict";r.r(t);var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.default=function(e){var t=e.title,r=e.titleId,l=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",i(o(i(o({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),l),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{d:"M11.299 11.909 8.896 9.41l-1.382 1.424 2.411 2.506c-.323 1.256.622 2.555 1.894 2.555 1.082 0 1.96-.909 1.96-2.03 0-1.323-1.266-2.303-2.48-1.957Z",fill:"currentColor"}),(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.758 5.252v-.207c0-1.682-1.316-3.045-2.94-3.045C10.196 2 8.88 3.363 8.88 5.045v.207C5.454 6.506 3 9.889 3 13.866 3 18.91 6.948 23 11.819 23c4.87 0 8.819-4.09 8.819-9.134 0-3.977-2.454-7.36-5.88-8.614Zm-3.886-.468a8.612 8.612 0 0 1 1.894 0 .987.987 0 0 0-.947-.754.987.987 0 0 0-.947.754Zm.947 1.978c-3.788 0-6.86 3.18-6.86 7.104s3.072 7.104 6.86 7.104c3.788 0 6.859-3.18 6.859-7.104s-3.071-7.104-6.86-7.104Z",fill:"currentColor"}),(0,n.tZ)("path",{d:"m22 6.676-1.386 1.435-2.771-2.87 1.386-1.435L22 6.676Z",fill:"currentColor"})]}))}}},function(e){e.O(0,[47057,38579,12737,8139,14206,44355,61403,274,24613,47710,27094,57252,36060,74050,64944,56360,95851,7563,36152,29037,95325,45692,58351,89073,94414,59754,92888,49774,40179],function(){return e(e.s=174673)}),_N_E=e.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.