PageSourceSearch

https://www.hellofresh.de/_next/static/chunks/pages/cancel-03985e3ca5e654af.js

js hellofresh.de collected 2026-09-25 23:37:58 UTC 26,879 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22185],{505370:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cancel",function(){return r(738308)}])},203666:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(687800),o=r(827378),i=r(169821),a=r(570084),u=r(953137),c=r(117608),s=function(e,t){var r=(0,c.Z)(),n=(0,u.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(),i.current=!0;return}},[r,n,t,e])},l=function(e){var t=e.children,r=e.redirectPath,i=void 0===r?"/login":r,u=e.customerType;return s((0,o.useCallback)(function(){return(0,a.r)(i)},[i]),u),(0,n.tZ)(o.Fragment,{children:t})},d=function(e){return(0,n.tZ)(i.Z,{fallback:e.fallback,children:(0,n.tZ)(l,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))})}},738308:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return ek},default:function(){return eA}});var n=r(687800),o=r(827378),i=r(650603),a=r(31748),u=r(184883),c=r(203666),s=r(602307),l=r(768587),d=r(164528),f=function(){var e=(0,d.ZP)("cancel").translateRaw;return(0,n.tZ)(l.xu,{paddingX:"global.sm-2",paddingY:"global.md-1","data-test-id":"cancel-error",children:(0,n.tZ)(l.Yo,{variant:"error",children:e("cancel.error.generic")})})},b=r(260194),v=r(228653),p=r(165218),m=r.n(p),g=r(396887),y=function(){return(0,n.tZ)(l.xu,{display:"flex",justifyContent:"center",paddingY:"global.lg-1","data-test-id":"cancel-loading",children:(0,n.tZ)(l.$j,{size:"lg",variant:"primary"})})},h=r(497249),C=(0,o.createContext)(null),O=function(e){var t=e.name,r=e.children,i=(0,o.useMemo)(function(){return{name:t}},[t]),a=(0,h.T)();return(0,o.useEffect)(function(){a.startSpan("cancellation.flow.resolved",{attributes:{"flow.name":t}}).end()},[]),(0,n.tZ)(C.Provider,{value:i,children:r})},w=m()(function(){return r.e(31481).then(r.bind(r,231481))},{loadableGenerated:{webpack:()=>[231481]},loading:function(){return(0,n.tZ)(y,{})},ssr:!1}),S=m()(function(){return Promise.all([r.e(89315),r.e(72065),r.e(46725),r.e(39167),r.e(7048),r.e(39313)]).then(r.bind(r,339313))},{loadableGenerated:{webpack:()=>[339313]},loading:function(){return(0,n.tZ)(y,{})},ssr:!1}),E=function(){var e=(0,v.M)();if(e.config.local.supportedSystemCountries.includes(e.runtime.systemCountry))return(0,n.tZ)(O,{name:"cancellation-flow",children:(0,n.tZ)(S,{})});if(e.config.local.mockFlowEnabled&&e.runtime.env!==g.Xe.live)return(0,n.tZ)(O,{name:"mock-flow",children:(0,n.tZ)(w,{})});throw Error("FlowHandler: no flow matched the resolved segmentation context")},I=function(){var e=(0,h.T)(),t=(0,o.useRef)(null),r=(0,o.useRef)(!1);return(0,o.useLayoutEffect)(function(){t.current||(t.current=e.startSpan("cancellation.data-loader.resolve"),r.current=!1)},[e]),(0,o.useEffect)(function(){return function(){t.current&&!r.current&&(t.current.setAttributes({outcome:"unmounted"}),t.current.end(),r.current=!0)}},[]),{setAttributes:(0,o.useCallback)(function(e){t.current&&!r.current&&t.current.setAttributes(e)},[]),finish:(0,o.useCallback)(function(e){var n=e.outcome,o=e.reason;!r.current&&t.current&&(t.current.setAttributes(o?{outcome:n,reason:o}:{outcome:n}),t.current.end(),r.current=!0)},[])}},Z=r(619339),P=r(26730),k=r(881821),A=function(e,t){var r,n,o=null==t?void 0:t.items.find(k.kO);return(null==o?void 0:o.customerPlanId)?(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}({},e),n=n={customerPlanId:o.customerPlanId},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}
1)(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r):e},_=r(141323),j=r(97901),R=r(845384),D=r(571767),T=r(366828),L=r(54879),M=r(527157),N=r(331227),x=r(200770),B=r(449551),U=r(757114),F=r(190341),V=r(958042),G=r(860853),H=function(e){var t,r,n,i=(0,M.Z)(),a=(0,N.Z)(),u=(0,x.Z)(),c=(0,B.Z)(),s=(0,V.Z)(),l=(0,g.ew)().NEXT_PUBLIC_SERVER_ENV,d=(0,F.G)().mobileWebView,f=!!(null==d?void 0:d.active),b=e&&(0,k.Lh)(e)?G.M.factorform:void 0,v=null!==(n=null==e?void 0:null===(r=e.billingAddress)||void 0===r?void 0:null===(t=r.region)||void 0===t?void 0:t.code)&&void 0!==n?n:void 0;return(0,o.useMemo)(function(){return{brand:i,brandFamily:a,subBrand:b,systemCountry:u,realCountry:c,region:v,businessDivision:{brand:U.A[i],region_code:c},locale:s,isMobileAppWebview:f,env:l}},[i,a,b,u,c,v,s,f,l])},W=r(712501),X=r(491639),Y=r(966622),z=r(943701),q={isMultiCadenceEnabled:{key:"rtevms-2265-multiple-cadence-ui",default:!1}},K={},$={enabled:!1,variationKey:null,parameters:null};function J(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}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return J(e,t);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 J(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ee=function(){var e=(0,h.T)(),t=(0,W.Z)(),r=t.featureCheckGate,n=t.isReady,i=(0,X._)(),a=i.userID,u=i.publicID,c=i.country,s=i.locale,l=i.brand,d=i.platform,f=i.environment,b=(0,o.useMemo)(function(){return{userID:a,customIDs:{publicID:u},custom:{platform:d,environment:f,country:c,locale:s,brand:l}}},[a,u,d,f,c,s,l]),v=(0,Y.py)({runUsingStatsig:!0}),p=v.decide,m=v.isReady,g=(0,z.R)({runUsingStatsig:!0}),y=g.id,C=g.attributes,O=g.isReady,w=m&&O,S=(0,o.useCallback)(function(t,r){e.startSpan("".concat("cancellation.statsig",".").concat(t,".error"),{attributes:{name:r}}).end()},[e]);return(0,o.useMemo)(function(){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}))),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}({},Object.fromEntries(Object.entries(q).map(function(e){var t=Q(e,2),o=t[0],i=t[1];if(!n)return[o,i.default];try{return[o,r(b,i.key)]}catch(e){return S("gate",o),[o,i.default]}})),Object.fromEntries(Object.entries(K).map(function(e){var t=Q(e,2),r=t[0],n=t[1];if(!w)return[r,n.schema.parse($)];try{var o=p({experimentKey:n.key,experimentationUserId:y,experimentationUserAttributes:C});return[r,n.schema.parse(o)]}catch(e){return S("experiment",r),[r,n.schema.parse($)]}})))},[n,w,b,r,p,y,C,S])},et=r(581340);function er(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}function en(e){return function(e){if(Array.isArray(e))return er(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return er(e,void 0);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 er(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eo=function(e){var t,r,n,o,i=e.routeSubscriptionId,a=e.customer,u=e.customerSubBrandSubscriptions;if(a.isLoading||u.isLoading)return{status:"loading"};var c=null===(t=u.data)||void 0===t?void 0:t.items.find(k.kO),s=c?String(c.id
1):void 0,l=null===(r=a.data)||void 0===r?void 0:r.activeSubscriptionId,d=l?String(l):void 0,f=new Set(en((null!==(o=null===(n=a.data)||void 0===n?void 0:n.subscriptionIds)&&void 0!==o?o:[]).map(String)).concat(en(d?[d]:[]),en(s?[s]:[])));return i&&f.has(i)?{status:"resolved",id:i}:s?{status:"resolved",id:s}:d?{status:"resolved",id:d}:{status:"none"}},ei=function(e){var t,r=e.subscriptionId;return Array.isArray(r)?null!==(t=r[0])&&void 0!==t?t:null:null!=r?r:null},ea=function(){var e=(0,et.t)(),t=(0,_.j)({},{suspense:!1}),r=(0,j.Z)({},{suspense:!1}),n=ei(e.query);return(0,o.useMemo)(function(){return eo({routeSubscriptionId:n,customer:t,customerSubBrandSubscriptions:r})},[n,t,r])},eu=function(){var e,t,r,n,i,a=(0,h.T)(),u=(0,_.j)({},{suspense:!1}),c=(0,L.N)({customerUUID:null!==(r=null===(e=u.data)||void 0===e?void 0:e.uuid)&&void 0!==r?r:""},{suspense:!1,enabled:!!(null===(t=u.data)||void 0===t?void 0:t.uuid)}),s=(0,j.Z)({},{suspense:!1}),l=ea(),d="resolved"===l.status?l.id:null,f=(0,R.K)({id:null!=d?d:""},{suspense:!1,enabled:"resolved"===l.status}),v=f.data,p=(0,b.DX)(),m=ee(),g=H(v),y=(0,D.v)({customerPlanId:null!==(n=null==v?void 0:v.customerPlanId)&&void 0!==n?n:"",subscriptionId:null!==(i=null==v?void 0:v.id)&&void 0!==i?i:""},{suspense:!1,enabled:!!v}),C=(0,T.m)({state:g.region,plan_id:null==v?void 0:v.customerPlanId},{suspense:!1,enabled:!!v}),O=(0,o.useRef)(null);return(0,o.useEffect)(function(){O.current!==d&&(O.current=d,a.startSpan("".concat("cancellation.loader",".resolve"),{attributes:{"cancel.target_subscription_id":null!=d?d:""}}).end())},[a,d]),{customer:u,customerSubBrandSubscriptions:s,subscription:f,benefits:y,credit:c,remoteConfig:C,runtime:g,localConfig:p,statsig:m,meta:{targetSubscriptionId:d}}},ec=(0,o.createContext)(void 0),es=function(e){var t=e.children,r=eu();return(0,n.tZ)(ec.Provider,{value:r,children:t})},el=function(){var e=(0,o.useContext)(ec);if(!e)throw Error("useCancellationRawData must be used within CancellationDataProvider");return e},ed=function(){var e=el(),t=e.customer,r=e.customerSubBrandSubscriptions,n=e.subscription,i=e.benefits,a=e.credit,u=e.remoteConfig,c=e.runtime,s=e.localConfig,l=e.statsig;return(0,o.useMemo)(function(){if(t.isLoading||r.isLoading||a.isLoading||a.isIdle||n.isLoading||i.isLoading||u.isLoading)return{status:"loading"};var e=t.data;if(t.isError||!e)return{status:"error",reason:"customer-data-failed"};var o=a.data;if(a.isError||!o)return{status:"error",reason:"credit-data-failed"};var d=n.data;if(n.isError||!d)return{status:"error",reason:"subscription-data-failed"};var f=i.data;if(i.isError||!f)return{status:"error",reason:"benefits-data-failed"};var b=u.data;if(u.isError||!b){if(c.systemCountry!==P.Z.US)return{status:"error",reason:"remote-config-failed"};b={showCancellation:!0,flowType:Z.p.ONE_STEP}}return{status:"success",data:{customer:e,subscription:A(d,r.data),benefits:f,credit:o,remoteConfig:b,runtime:c,localConfig:s,statsig:l}}},[t,r,n,i,a,u,c,s,l])},ef=function(){var e=I(),t=e.setAttributes,r=e.finish,i=ed();if((0,o.useLayoutEffect)(function(){if("error"===i.status)r({outcome:"error",reason:i.reason});else if("success"===i.status){var e=i.data,n=e.runtime,o=e.remoteConfig;t({"runtime.region":n.region,"runtime.subBrand":n.subBrand,"runtime.isMobileAppWebview":n.isMobileAppWebview,"remoteConfig.showCancellation":o.showCancellation,"remoteConfig.flowType":o.flowType}),r({outcome:"render"})}},[i,t,r]),"loading"===i.status)return(0,n.tZ)(y,{});if("error"===i.status)return(0,n.tZ)(f,{});var a=i.data,u=a.customer,c=a.subscription,s=a.benefits,l=a.credit,d=a.remoteConfig,b=a.runtime,p=a.localConfig,m=a.statsig;return(0,n.tZ)(v.q,{customer:u,subscription:c,benefits:s,credit:l,runtime:b,remoteConfig:d,localConfig:p,statsig:m,children:(0,n.tZ)(E,{})})},eb=function(e){var t,r=(0,h.T)(),n=(0,o.useRef)(null),i=(0,o.useRef)(!1);(0,o.useLayoutEffect)(function(){n.current||(n.current=r.startSpan(e),i.current=!1)},[r,e]),(0,o.useEffect)(function(){return function(){n.current&&!i.current&&(n.current.setAttributes({outcome:"unmounted"}),n.current.end(),i.current=!0)}},[]);var a=(0,o.useCallback)(function(e){n.current&&!i.current&&n.current.setAttributes(e)},[]),u=(0,o.useCallback)(function(e){n.current&&!i.current&&(n.current.setAttributes(e),n.current.end(),i.current=!0)},[]);return{span:null!==(t=n.current)&&void 0!==t?t:void 0,trackOutcome:u,setAttributes:a}},ev=r(916957),ep=function(){var e=(0,ev.H)(),t=(0,o.useRef)(!1);return{redirect:(0,o.useCallback)(function(r){var n=r.to,o=r.via;t.current||(t.current=!0,e[void 0===o?"leave":o](n))},[e]),hasRedirectedRef:t}},em={CANCELLATION_DISABLED:"cancellation-disabled",NO_SUBSCRIPTION:"no-subscription",CUSTOMER_DATA_ERROR:"customer-data-error"},eg={SUBSCRIPTION_DATA_UNAVAILABLE:"subscription-data-unavailable",REMOTE_CONFIG_FAILED:"remote-config-failed",REMOTE_CONFIG_MISSING:"remote-config-missing"},ey={US_ONE_STEP:"us-one-step"},eh=function(e){var t=e.children,r=e.redirectTo,i=void 0===r?"/account":r,a=e.loadingFallback,u=void 0===a?(0,n.tZ)(y,{}):a,c=e.onNoSubscription,s=ep(),l=s.redirect,d=s.hasRedirectedRef,f=eb("cancel.guard.has-subscription"),b=f.trackOutcome,v=f.setAttributes,p=(0,_.j)({},{suspense:!1}),m=ea(),g=p.isError,h=m.status,C="resolved"===m.status?m.id:null;return((0,o.useEffect)(function(){if("loading"!==h){if(v({customerError:g,targetSubscriptionId:null!=C?C:"",hasSubscription:"resolved"===h}),g&&!d.current){b({outcome:"redirect",reason:em.CUSTOMER_DATA_ERROR,redirectTo:i,details:"Infrastru
1cture error: customer subscriptions fetch failed"}),l({to:i,via:"leave"});return}if("none"===h&&!d.current){b({outcome:"redirect",reason:em.NO_SUBSCRIPTION,redirectTo:i}),null==c||c(),l({to:i,via:"leave"});return}"resolved"===h&&b({outcome:"allow"})}},[g,h,C,i,c,b,v,l,d]),"loading"===h||g)?(0,n.tZ)(n.HY,{children:u}):"none"===m.status?null:(0,n.tZ)(n.HY,{children:t})},eC=function(e){var t=e.isLoadingUpstream,r=e.subscription,n=e.remoteConfig,i=e.runtime,a=e.targetSubscriptionId,u=e.shouldRender,c=e.redirectTo,s=e.trackOutcome,l=e.setAttributes,d=e.redirect,f=e.hasRedirectedRef;(0,o.useEffect)(function(){var e,o,b,v,p,m,g;if(!t){if(r.isError||!r.data){s({outcome:"error",reason:eg.SUBSCRIPTION_DATA_UNAVAILABLE});return}if(!n.isLoading&&!n.isIdle){if(l({region:null!==(v=i.region)&&void 0!==v?v:"",planId:null!==(p=r.data.customerPlanId)&&void 0!==p?p:"",showCancellation:null!==(m=null===(e=n.data)||void 0===e?void 0:e.showCancellation)&&void 0!==m&&m,flowType:null!==(g=null===(o=n.data)||void 0===o?void 0:o.flowType)&&void 0!==g?g:"",hasRemoteConfigError:n.isError,targetSubscriptionId:null!=a?a:""}),(null===(b=n.data)||void 0===b?void 0:b.showCancellation)===!1&&!f.current){s({outcome:"redirect",reason:em.CANCELLATION_DISABLED,redirectTo:c}),d({to:c,via:"leave"});return}u?s(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}({outcome:"allow"},n.isError&&{remoteConfigFallback:ey.US_ONE_STEP},!n.data&&{remoteConfigMissing:!0})):n.isError&&s({outcome:"error",reason:eg.REMOTE_CONFIG_FAILED})}}},[t,r.isError,r.data,n.isLoading,n.isIdle,n.isError,n.data,i.systemCountry,i.region,a,u,c,s,l,d,f])},eO=function(e){var t=e.children,r=e.redirectTo,i=e.loadingFallback,a=void 0===i?(0,n.tZ)(y,{}):i,u=e.errorFallback,c=ep(),s=c.redirect,l=c.hasRedirectedRef,d=eb("cancel.guard.cancellation-enabled"),b=d.trackOutcome,v=d.setAttributes,p=el(),m=p.customer,g=p.customerSubBrandSubscriptions,h=p.subscription,C=p.runtime,O=p.meta.targetSubscriptionId,w=h.data,S=(0,T.m)({state:C.region,plan_id:null==w?void 0:w.customerPlanId},{suspense:!1,enabled:!!w}),E=m.isLoading||g.isLoading||h.isLoading,I=(0,o.useMemo)(function(){return!E&&!S.isLoading&&!S.isIdle&&!h.isError&&!!w&&(S.isError||!S.data?C.systemCountry===P.Z.US:!0===S.data.showCancellation)},[E,S.isLoading,S.isIdle,S.isError,S.data,h.isError,w,C.systemCountry]);return(eC({isLoadingUpstream:E,subscription:{isError:h.isError,data:w},remoteConfig:S,runtime:{region:C.region,systemCountry:C.systemCountry},targetSubscriptionId:O,shouldRender:I,redirectTo:void 0===r?"/account":r,trackOutcome:b,setAttributes:v,redirect:s,hasRedirectedRef:l}),E||S.isLoading||S.isIdle)?(0,n.tZ)(n.HY,{children:a}):h.isError||!w?u?(0,n.tZ)(n.HY,{children:u(Error(eg.SUBSCRIPTION_DATA_UNAVAILABLE))}):(0,n.tZ)(f,{}):S.isError&&C.systemCountry!==P.Z.US?u?(0,n.tZ)(n.HY,{children:u(Error(eg.REMOTE_CONFIG_FAILED))}):(0,n.tZ)(f,{}):S.data||C.systemCountry===P.Z.US?I?(0,n.tZ)(n.HY,{children:t}):null:u?(0,n.tZ)(n.HY,{children:u(Error(eg.REMOTE_CONFIG_MISSING))}):(0,n.tZ)(f,{})},ew=["/account","/weekly-menu","/contact-us"],eS=function(e){return ew.includes(e)?e:"/account"},eE=function(e){var t=e.children,r=e.loadingFallback,i=void 0===r?(0,n.tZ)(y,{}):r,a=(0,b.DX)(),s=(0,h.T)(),l=(0,o.useRef)(!1),d=(0,o.useMemo)(function(){return{loadingFallback:i,redirects:{onMissingSubscription:eS(a.redirects.onMissingSubscription),onCancellationDisabled:eS(a.redirects.onCancellationDisabled)}}},[i,a.redirects]);return(0,o.useEffect)(function(){if(!l.current){var e=s.startSpan("cancel.guard.entry");e.setAttributes({onMissingSubscription:d.redirects.onMissingSubscription,onCancellationDisabled:d.redirects.onCancellationDisabled}),e.end(),l.current=!0}},[s,d.redirects]),(0,n.tZ)(u.Z,{scope:"cancel.guards",fallback:(0,n.tZ)(f,{}),children:(0,n.tZ)(c.Z,{redirectPath:"/login",fallback:i,children:(0,n.tZ)(eh,{redirectTo:d.redirects.onMissingSubscription,loadingFallback:i,children:(0,n.tZ)(es,{children:(0,n.tZ)(eO,{redirectTo:d.redirects.onCancellationDisabled,loadingFallback:i,children:t})})})})})},eI={name:"plans-and-monetization",githubTeam:"hellofresh/squad-plans-and-monetization",tribe:"order-and-subscription-experience",alliance:"consumer",jiraPrefix:"PAM",slackChannel:"#squad-plans-and-monetization",slackAlertsChannel:"#squad-plans-and-monetization-alerts-live",skipLabelsOnPR:!1,teamIdentifier:"plans-and-monetization"},eZ=function(){return(0,n.tZ)(s.Z,{claim:eI,children:(0,n.tZ)(u.Z,{scope:"cancel",fallback:(0,n.tZ)(f,{}),children:(0,n.tZ)(b.um,{children:(0,n.tZ)(eE,{children:(0,n.tZ)(ef,{})})})})})},eP=function(){return(0,n.BX)(u.Z,{scope:"cancel-page",children:[(0,n.tZ)(a.Z,{}),(0,n.tZ)(c.Z,{children:(0,n.tZ)(eZ,{})})]})};eP.customLayout=i.ZP,eP.provideCustomLayoutProps=function(e){var t,r=!!(null===(t=e.ssrPayload.mobileWebView)||void 0===t?void 0:t.active);return{enableSSRCustomerHeader:!0,disableHeader:r,disableFooter:r}};var ek=!0,eA=eP},916957:function(e,t,r){"use strict";r.d(t,{H:function(){return u}});var n=r(827378),o=r(581340),i=r(887824),a=r(190341),u=function(){var e=(0,o.t)(),t=(0,i.Z)().push,r=(0,a.G)().mobileWebView,u=!!(null==r?void 0:r.active),c=(0,n.useCallback)(function(t){e.push(t)},[e]),s=(0,n.useCallback)(function(r){if(u){t({event:"mobileWebViewAction",actionType:"redirection",value:"closeWebView"});return}e.push(r)},[e,u,t]);return(0,n.useMemo)(function(){return{push:c,leave:s}},[c,s])}},260194:function(e,t,r){"use strict";r.d(t,{um:function(){return d},DX:function(){return b}});var n,o=r(575085),i=r(26730),a=r(396887),u=[{systemCountry:i.Z.FJ,values:{deflectionCards:["factor-plus","plan-downgrade","pause","voucher","use-points","contact","invite-friend"],deflectionCardsSubBrand:["plan-downgrade","pause","voucher","use-points","contact","invite-friend"],deflectionVoucherCodeLive:"3T-B4TAD",deflectionVoucherCodeStaging:"GC-OMVM6",planDowngradeRedirectPath:"/settings/plan/plan-selection",features:{factorPlus:!0}}},{systemCountry:i.Z.KN,values:{deflectionCards:["plan-downgrade","pause","contact"]}}];function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}var s={redirects:{onMissingSubscription:"/account",onCancellationDisabled:"/account"},mockBannerEnabled:!0,mockFlowEnabled:!0,skipCancelSubscriptionSurvey:!1,deflectionCards:["plan-downgrade","pause","contact","invite-friend"],deflectionCardsEnabled:!0,isDeliveryCadenceEnabled:!1,isFullLengthContactBannerEnabled:!1,deflectionVoucherCodeLive:null,deflectionVoucherCodeStaging:null,surveyReasonIds:["spending","meals","schedule","delivery","other","noReason"],shuffleSurveyReasons:!0,planDowngradeRedirectPath:"/settings/plan",supp
1ortedSystemCountries:[i.Z.FJ,i.Z.ER,i.Z.AO,i.Z.CK,i.Z.CG,i.Z.GN,i.Z.GQ,i.Z.YE,i.Z.KN],features:{factorPlus:!1},cardIconBackgrounds:{"plan-downgrade":"global.lemon.500",pause:"global.pink.200",contact:"global.factor-forest.100","invite-friend":"global.mint.500",voucher:"reward.100","use-points":"reward.100"},benefitsPanelStyles:{background:"global.brown.400",iconBackground:"global.factor.brand-carbon.900",savingsCardBackground:"global.brown.300"},confirmationBannerStyles:{background:"global.chefsplate-red.100",iconBackground:"global.chefsplate-red.300"},assets:{pauseModalImage:"https://hf-website-live.s3.eu-west-1.amazonaws.com/factor/cancel-unified-flow/pause_plan.svg",contactModalImage:"https://media.hellofresh.com/hellofresh_website/factor/cancel-unified-flow/contact_team.svg",voucherModalImage:"https://hf-website-live.s3.eu-west-1.amazonaws.com/factor/cancel-unified-flow/exclusive_offer.svg",confirmationBannerImage:"https://media.hellofresh.com/hellofresh_website/factor/cancel-unified-flow/calendar_denied.svg"},overrides:u},l=(0,o.Z)("cancellation",(n=function(){return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}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,u])}}}(this,function(e){return[2,{default:s}]})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(void 0)})})),d=l.ProjectConfigProvider;l.configMiddleware;var f=l.useConfig,b=function(){var e,t,r=f(),n=(0,a.ew)().NEXT_PUBLIC_SERVER_ENV===a.Xe.live?r.deflectionVoucherCodeLive:r.deflectionVoucherCodeStaging;return 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}({},r),t=t={deflectionVoucherCode:n},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}},228653:function(e,t,r){"use strict";r.d(t,{q:function(){return c},M:function(){return s}});var n=r(687800),o=r(827378),i=function(e){var t;return!!(null==e?void 0:null===(t=e.promises)||void 0===t?void 0:t.some(function(e){var t;return null==e?void 0:null===(t=e.units)||void 0===t?void 0:t.some(function(e){return!e.used&&e.benefits.some(function(e){return"mealbox"===e.applicableTo})})}))},a=function(e){var t;return!!(null===(t=e.freeAddOnSubscriptions)||void 0===t?void 0:t.some(function(e){return e.isEnabled&&!e.isRevoked}))},u=(0,o.createContext)(null),c=function(e){var t=e.customer,r=e.subscription,c=e.benefits,s=e.credit,l=e.runtime,d=e.remoteConfig,f=e.localConfig,b=e.statsig,v=e.children,p=(0,o.useMemo)(function(){var e,n,o,u,v,p;return{customer:{id:t.id,uuid:t.uuid,boxesReceived:t.boxesReceived,subscriptionIds:t.subscriptionIds,benefits:{hasBoxDiscount:i(c),hasCredit:s.amount>0,hasFreeAddons:a(t)}},subscription:{id:r.id,customerPlanId:r.customerPlanId,productSku:null!==(u=null===(e=r.productType)||void 0===e?void 0:e.handle)&&void 0!==u?u:"",productFamilyHandle:null!==(v=null===(o=r.productType)||void 0===o?void 0:null===(n=o.family)||void 0===n?void 0:n.handle)&&void 0!==v?v:"",deliveryInterval:r.deliveryInterval,couponCode:r.couponCode,voucherInfo:r.voucherInfo,nextDeliveryDate:r.nextDelivery,nextDeliveryWeek:r.nextDeliveryWeek,nextCutoffDate:r.nextCutoffDate,nextModifiableDeliveryWeek:r.nextModifiableDeliveryWeek,firstBoxDelivered:null!==(p=r.firstBoxDelivered)&&void 0!==p&&p},runtime:l,config:{remote:d,local:f},statsig:b}},[t,r,c,s,l,d,f,b]);return(0,n.tZ)(u.Provider,{value:p,children:v})},s=function(){var e=(0,o.useContext)(u);if(!e)throw Error("useSegmentationContext used outside of SegmentationProvider");return e}}},function(e){e.O(0,[47057,38579,12737,8139,14206,44355,274,24613,47710,14532,57252,36060,74050,64944,56360,95851,7563,36152,29037,95325,45692,58351,89073,94414,21430,92888,49774,40179],function(){return e(e.s=505370)}),_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.