1"use strict";(globalThis.webpackChunkgrowingfamilies=globalThis.webpackChunkgrowingfamilies||[]).push([[5662],{20850(e,i,l){l.d(i,{h:()=>s});var t=l(48);const s=()=>{const{language:e}=(0,t.i)();return"en"===e?"en-GB":e}},25368(e,i,l){l.d(i,{$t:()=>s,h7:()=>t,l5:()=>n});let t=function(e){return e.Success="Success",e.PartialSuccess="PartialSuccess",e.PartialSuccessPersonalisationFailure="PartialSuccessPersonalisationFailure",e.InvalidInputs="InvalidInputs",e.InvalidInputsPersonalisationFailure="InvalidInputsPersonalisationFailure",e.Failure="Failure",e}({}),s=function(e){return e.Success="Success",e.Failure="Failure",e.InvalidInputs="InvalidInputs",e}({}),n=function(e){return e.Success="Success",e.PartialSuccess="PartialSuccess",e.Failure="Failure",e}({})},40955(e,i,l){l.r(i),l.d(i,{default:()=>f});var t=l(20850),s=l(25368),n=l(48),u=l(88094),r=l(20044),a=l(29292);var o=l(23373),c=l(64973),d=l(76889),v=l(7176),p=l(15678);const f=e=>{var i,l,f;let{fields:g}=e;const{pageEditing:S}=(0,n.i)(),I=(0,t.h)(),h=(0,c.WT)(),P=(0,c.bJ)(h),F={cultureCode:I,incentiveid:0,distrubitionid:0};if(null!==P&&void 0!==P&&null!==(i=P.incentives)&&void 0!==i&&i.length){const e=P.incentives;F.incentiveid=e[0].id,F.distrubitionid=e[0].distrubutionid,sessionStorage.setItem(v.n6,JSON.stringify(e))}const m=((e,i)=>{const{csrfToken:l}=(0,n.i)(),[t,s]=(0,u.useState)({isComplete:!1,result:null});if(i||!e.incentiveid||!e.distrubitionid)return{isComplete:!1,result:null};const o=(0,a.Vl)("api/offer/clippedretailercoupon");return t.isComplete||(0,r.Y)(o,e,l).then(e=>{s({isComplete:!0,result:e})}).catch(e=>{s({isComplete:!0,result:e.toString()})}),t})(F,S,d.p.RETAILER_COUPON);if(S)return(0,p.jsx)("p",{children:"Retailer coupon redemption - click here to configure"});if(!m.isComplete)return null;let C;var b,k;if(sessionStorage.setItem(v.w7,JSON.stringify(m)),m.result.Result===s.$t.Success)C=null===(b=g.SuccessPage)||void 0===b||null===(k=b.value)||void 0===k?void 0:k.href;else if((null===(l=m.result)||void 0===l?void 0:l.Result)===s.$t.Failure){var R,w;C=null===(R=g.FailurePage)||void 0===R||null===(w=R.value)||void 0===w?void 0:w.href}else if((null===(f=m.result)||void 0===f?void 0:f.Result)===s.$t.InvalidInputs){var T,O;C=null===(T=g.FailurePage)||void 0===T||null===(O=T.value)||void 0===O?void 0:O.href}return(0,p.jsx)(o.C5,{to:(0,c.IK)(C,h)})}}}]);
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.