1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7f1d432a-5be5-4914-bbdb-80512359df66",e._sentryDebugIdIdentifier="sentry-dbid-7f1d432a-5be5-4914-bbdb-80512359df66")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[307,5182],{7234:(e,t,n)=>{"use strict";n.d(t,{n:()=>u});var r=n(66043),a=n(61614),o=n(68070),i=n(52541),l=n(61643),s=n(74171),c=n(10945);function u(e,t){var n=(0,c.m)(null==t?void 0:t.client);(0,l.D$)(e,l.KG.Mutation);var u=a.useState({called:!1,loading:!1,client:n}),d=u[0],p=u[1],m=a.useRef({result:d,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(m.current,{client:n,options:t,mutation:e});var g=a.useCallback(function(e){void 0===e&&(e={});var t=m.current,n=t.options,a=t.mutation,l=(0,r.Cl)((0,r.Cl)({},n),{mutation:a}),c=e.client||m.current.client;m.current.result.loading||l.ignoreResults||!m.current.isMounted||p(m.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:c});var u=++m.current.mutationId,d=(0,o.l)(l,e);return c.mutate(d).then(function(t){var n,r,a=t.data,o=t.errors,l=o&&o.length>0?new s.K4({graphQLErrors:o}):void 0,g=e.onError||(null==(n=m.current.options)?void 0:n.onError);if(l&&g&&g(l,d),u===m.current.mutationId&&!d.ignoreResults){var b={called:!0,loading:!1,data:a,error:l,client:c};m.current.isMounted&&!(0,i.L)(m.current.result,b)&&p(m.current.result=b)}var h=e.onCompleted||(null==(r=m.current.options)?void 0:r.onCompleted);return l||null==h||h(t.data,d),t}).catch(function(t){if(u===m.current.mutationId&&m.current.isMounted){var n,r={loading:!1,error:t,data:void 0,called:!0,client:c};(0,i.L)(m.current.result,r)||p(m.current.result=r)}var a=e.onError||(null==(n=m.current.options)?void 0:n.onError);if(a)return a(t,d),{data:void 0,errors:t};throw t})},[]),b=a.useCallback(function(){if(m.current.isMounted){var e={called:!1,loading:!1,client:n};Object.assign(m.current,{mutationId:0,result:e}),p(e)}},[]);return a.useEffect(function(){return m.current.isMounted=!0,function(){m.current.isMounted=!1}},[]),[g,(0,r.Cl)({reset:b},d)]}},13702:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSG:()=>v,default:()=>y});var r=n(6029),a=n(20307),o=n(47740),i=n(7234),l=n(46111),s=n(76481),c=n(81278),u=n(55729),d=n(52995),p=n(22989),m=n(50350);let g={optInEmail:!1,optInPost:!1,optInOnline:!1,optInSms:!1},b=()=>{let e=(0,c.useRouter)(),[t,n]=u.useState(),{getCustomer:a}=(0,u.useContext)(s.Z0);(0,u.useEffect)(()=>{if(a.data?.customer){let e={...(0,p.F)(a.data.customer)};n({optInEmail:e.optInEmail,optInPost:e.optInPost,optInOnline:e.optInOnline,optInSms:e.optInSms,marketingLastUpdatedAt:e.marketingLastUpdatedAt})}},[a.data]);let[o]=(0,i.n)(m.QF),b=async t=>{try{let n=(0,d.B)(t,g);await o({variables:{input:n}}),a.refetch().then(()=>e.push("/account?success=communications-preferences"))}catch(e){throw Error("Sorry, we could not update your marketing preferences")}};return!a.loading&&a.data?.customer&&t?(0,r.jsx)(l.A,{...t,savePreferences:b,onCancel:()=>{e.replace("/account")}}):(0,r.jsx)("h1",{children:"Loading"})};var h=n(68972),v=!0;let y=e=>{let t=(0,c.useRouter)(),{page:n}=e;return(0,r.jsx)(h.A,{renderGraph:e,onIsSignedOut:()=>t.replace("/sign-in"),disableCustomerCache:!0,children:(0,r.jsxs)(r.Fragment,{children:[(0,d.f)(n.components.header),(0,r.jsx)(a.default,{links:[{label:"Home",url:"/"},{label:"My Account",url:"/account"},{label:"Communications Preferences",url:"/account/communications-preferences"}]}),(0,r.jsx)(o.A,{children:(0,r.jsx)(b,{})}),(0,d.f)(n.components.footer)]})})}},20307:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>j});var r=n(6029),a=n(81278),o=n(55729),i=n(76481),l=n(67974),s=n(80575),c=n(81751),u=n(13939);let d=(0,s.n9)()(e=>({linkText:Object.assign(Object.assign(Object.assign({color:e.isFlyingFlowers?u.Tj.black[700]:u.Tj.grey.grey7},e.typography.xxs_regular),(0,c.nf)()),{[e.breakpoints.up("md")]:Object.assign({},e.typography.small_regular)}),currentPage:Object.assign(Object.assign({color:e.isFlyingFlowers?u.Tj.black[700]:u.Tj.grey.grey8},e.typography.xxs_regular),{[e.breakpoints.up("md")]:Object.assign({},e.typography.small_regular)})})),p=({link:e,currentPage:t})=>{let{classes:n}=d();return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsx)(l.A,Object.assign({className:t?n.currentPage:n.linkText},e,{url:t?void 0:e.url}))})},m=(0,s.n9)()(e=>({breadcrumbContent:Object.assign(Object.assign({},c.w0),{backgroundColor:u.Tj.supplementary.white,minHeight:"33px",[e.breakpoints.up("md")]:{minHeight:"53px"}}),noBorderBottom:{borderBottom:"none"},pdpMobileNoBorder:{[e.breakpoints.down("sm")]:{borderBottom:"none"}},container:(0,c.W4)(e,Object.assign(Object.assign({display:"flex",overflowX:"auto",whiteSpace:"nowrap"},u.MY),{paddingTop:"4px",paddingBottom:"4px",paddingLeft:e.isFlyingFlowers?u.YK.small:u.YK.xs,paddingRight:e.isFlyingFlowers?u.YK.small:u.YK.xs,[e.breakpoints.up("md")]:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:e.isFlyingFlowers?u.YK.large:u.YK.small,paddingRight:e.isFlyingFlowers?u.YK.large:u.YK.small}})),arrowIcon:{margin:u.YK.xxs,color:e.isFlyingFlowers?u.Tj.black[700]:u.Tj.grey.grey6,"& .material-icons":{fontSize:u.GR.small},[e.breakpoints.up("md")]:{margin:`${u.YK.xs} ${u.YK.xxs} ${u.YK.xxs} ${u.YK.xxs}`}}}));var g=n(8588),b=n.n(g),h=n(91202),v=n(42246),y=n(50212),f=n(4494),x=n(26543);let j=e=>{var t,n;let{subject:l,isFlyingFlowers:s}=(0,o.useContext)(i.Z0),c=(0,a.useRouter)(),u=(0,v.A)(),d=null==c?void 0:c.asPath,[g,j]=(0,o.useState)([]),k=(0,h.Ub)({query:`(max-width: ${u.breakpoints.values.sm}px)`}),O=null==d?void 0:d.includes("/product/"),{state:{items:w}}=(0,f.rB)(),I=w.length,_=(0,o.useMemo)(()=>(0,x.p)({asPath:d,isFlyingFlowers:!!s,subject:l}),[d,s,l]);(0,o.useEffect)(()=>{var t;(null==d?void 0:d.includes("/category/"))?((0,i.fD)(["isFromPLP"]),(null==(t=null==e?void 0:e.links)?void 0:t.length)&&sessionStorage.setItem("breadcrumb",JSON.stringify(e.links))):["/search","/blog","/basket","/checkout/","/florist","/page/","/flower-delivery","/find-a-florist","/find-location-florist","/account","/favourites"].some(e=>null==d?void 0:d.includes(e))?(0,i.fD)(["isFromPLP","breadcrumb"]):(null==d?void 0:d.includes("/product/"))&&(new
1URLSearchParams(void 0===globalThis.window?"":globalThis.window.location.search).get("category")||(0,i.fD)(["isFromPLP","breadcrumb"]))},[d,null==e?void 0:e.links]),(0,o.useEffect)(()=>{var e;let{asPath:t}=null!=c?c:{},{product:n}=null!=l?l:{},r=sessionStorage.getItem("isFromPLP"),a=sessionStorage.getItem("breadcrumb"),o=(null==a?void 0:a.length)?JSON.parse(a):[];(null==t?void 0:t.includes("/product/"))&&r?j([...o,{label:null!=(e=null==n?void 0:n.name)?e:""}]):o.length&&j([...o])},[null==c?void 0:c.asPath,null==l?void 0:l.product]),(0,o.useEffect)(()=>{var t,n,r,a,o,i,s,u,d;if(!sessionStorage.getItem("breadcrumb")){let p=(null==(n=null==(t=null==l?void 0:l.product)?void 0:t.categories)?void 0:n.find(e=>{var t;return e.key===(null==(t=null==c?void 0:c.query)?void 0:t.category)}))||(null==(a=null==(r=null==l?void 0:l.product)?void 0:r.categories)?void 0:a.find(e=>{var t;return null==(t=e.ancestors)?void 0:t.some(e=>{var t;return e.key==(null==(t=null==c?void 0:c.query)?void 0:t.category)})}))||(null==(i=null==(o=null==l?void 0:l.product)?void 0:o.categories)?void 0:i[0]);j((null==l?void 0:l.product)&&p&&[{label:"Home",url:"/"},...(null==(s=p.ancestors)?void 0:s.map(e=>({label:e.name,url:e.url})))||[],{label:p.name,url:p.url},{label:(null==(u=l.product)?void 0:u.name)||"",url:(null==(d=l.product)?void 0:d.url)||""}]||e.links)}},[null==(t=null==c?void 0:c.query)?void 0:t.category,e.links,l,null==l?void 0:l.product]);let{classes:S}=m();return(0,r.jsx)(r.Fragment,{children:!!((null==g?void 0:g.length)||(null==(n=null==e?void 0:e.links)?void 0:n.length))&&(0,r.jsx)("div",{className:(0,y.A)(S.breadcrumbContent,k&&O&&S.pdpMobileNoBorder,_&&I>0&&S.noBorderBottom),"data-hj-ignore-attributes":!0,children:(0,r.jsx)("div",{className:S.container,children:g.map((e,t)=>(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(p,{link:e,currentPage:t===g.length-1}),t!==g.length-1&&(0,r.jsx)(b(),{src:"/images/icons/breadcrumBar/chevronRight.svg",alt:"chevronRight",className:S.arrowIcon,height:16,width:16})]},`breadcrumb_${e.label}}`))})})})}}
1,22989:(e,t,n)=>{"use strict";n.d(t,{F:()=>o,V:()=>a});var r=n(76481);let a=e=>(0,r.$U)(e,(e,t)=>null===t,(e,t)=>""),o=(e,t=!1)=>(0,r.$U)(e,(e,t)=>null===t,(e,n)=>t)},44589:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/communications-preferences",function(){return n(13702)}])},46111:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(6029),a=n(20134),o=n(55729),i=n(80575),l=n(49992),s=n(81751),c=n(13939);let u=(0,i.n9)()(e=>Object.assign(Object.assign({},(0,l.l)(e)),{receiveOffersCheckbox:{marginTop:`${c.YK.medium} !important`,"& p":Object.assign(Object.assign({},e.typography.xxs_regular),{fontWeight:c.NM.medium,marginTop:"22px",marginBottom:c.YK.small,[e.breakpoints.up("md")]:{marginBottom:c.YK.medium}})},chooseText:Object.assign(Object.assign({},e.typography.small_bold),{margin:`${c.YK.small} 0`,fontWeight:`${c.NM.regular} !important`,[e.breakpoints.up("md")]:Object.assign({},e.typography.medium_bold)}),preferencesOptions:{"& li":{marginBottom:c.YK.xs}},preferencesContainer:{"& p":Object.assign(Object.assign({},e.typography.small_bold),{marginTop:"20px",[e.breakpoints.up("md")]:Object.assign({},e.typography.medium_bold)})},privacyInformation:{marginTop:`${c.YK.xxl} !important`,"& h2":Object.assign(Object.assign({},e.typography.small_bold),{marginBottom:`${c.YK.medium} !important`,[e.breakpoints.up("md")]:Object.assign({},e.typography.medium_bold)}),"& p":Object.assign(Object.assign({},e.typography.small_bold),{fontWeight:`${c.NM.regular} !important`,[e.breakpoints.up("md")]:Object.assign({},e.typography.medium_bold)})},link:Object.assign(Object.assign(Object.assign({},e.typography.small_bold),(0,s.nf)(e.isFlyingFlowers?void 0:c.Tj.primary.gold4)),{color:e.isFlyingFlowers?c.Tj.black[700]:c.Tj.primary.gold5,fontWeight:`${c.NM.regular} !important`,[e.breakpoints.up("md")]:Object.assign({},e.typography.medium_bold)})}));var d=n(87192),p=n(35389),m=n(83431),g=n(76063),b=n(79973),h=n(67974),v=n(76481),y=n(86604);let f=e=>{let{optInEmail:t,optInPost:n,optInOnline:i,optInSms:l,savePreferences:s,onCancel:c,marketingLastUpdatedAt:f}=e,{classes:x}=u(),{isFlyingFlowers:j}=(0,o.useContext)(v.Z0),[k,O]=(0,o.useState)(!1),[w,I]=(0,o.useState)(t||!1),[_,S]=(0,o.useState)(n||!1),[C,F]=(0,o.useState)(i||!1),[P,K]=(0,o.useState)(l||!1),[N,T]=(0,o.useState)("");return(0,o.useEffect)(()=>{O(w||_||C||P)},[w,_,C,P]),(0,r.jsx)(g.l1,Object.assign({},{initialValues:{optInEmail:w,optInOnline:C,optInSms:P,optInPost:_},onSubmit:()=>{var e,t,n,r;return e=void 0,t=void 0,n=void 0,r=function*(){try{T(""),yield s({optInEmail:w,optInOnline:C,optInSms:P,optInPost:_})}catch(e){T(null==e?void 0:e.message)}},new(n||(n=Promise))(function(a,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function l(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?a(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(i,l)}s((r=r.apply(e,t||[])).next())})}},{children:({isSubmitting:e})=>(0,r.jsxs)(g.lV,{children:[(0,r.jsx)(a.A,{fieldNames:["acceptPromotions","optInEmail","optInPost","optInOnline","optInSms"],waitForSubmitAfterMount:!0,showWhenTouched:!0}),(0,r.jsxs)("div",{className:x.container,children:[(0,r.jsx)("h1",{children:"Communication preferences"}),(0,r.jsxs)("div",{className:x.box,children:[N&&(0,r.jsx)(b.default,{className:x.error,type:"alertError",message:N}),(0,r.jsx)("h2",{children:"Keeping in touch"}),(0,r.jsxs)("div",{className:x.receiveOffersCheckbox,children:[(0,r.jsx)(p.default,{label:`Yes, I would like to receive offers, updates and marketing from ${j?"Flying Flowers":"Interflora"}.`,name:"acceptPromotions",onChange:()=>{var e;I(e=!k),S(e),F(e),K(e)},type:"checkbox",checked:k,value:k,controlAlignment:"top"}),f&&(0,r.jsxs)("p",{children:["Last updated ",(0,m.A)(new Date(f),"dd MMM yyyy HH:mm")]})]}),k?(0,r.jsxs)("div",{className:x.preferencesContainer,id:"showPreferences",children:[(0,r.jsx)("h2",{children:"How would you like us to contact you?"}),(0,r.jsx)("p",{className:x.chooseText,children:"Choose as many options as you want."}),(0,r.jsxs)("ul",{className:x.preferencesOptions,children:[(0,r.jsx)("li",{children:(0,r.jsx)(p.default,{label:"Email",n
1ame:"optInEmail",value:w,onChange:()=>I(!w),type:"checkbox",checked:w})}),(0,r.jsx)("li",{children:(0,r.jsx)(p.default,{label:"Post",name:"optInPost",value:_,onChange:()=>S(!_),type:"checkbox",checked:_})}),(0,r.jsx)("li",{children:(0,r.jsx)(p.default,{label:"Online advertising",name:"optInOnline",value:C,onChange:()=>F(!C),type:"checkbox",checked:C})}),(0,r.jsx)("li",{children:(0,r.jsx)(p.default,{label:"SMS",name:"optInSms",value:P,onChange:()=>K(!P),type:"checkbox",checked:P})})]})]}):null,(0,r.jsxs)("div",{className:x.buttons,children:[(0,r.jsx)(d.A,{variant:(0,y.eM)("Save preferences"),thin:!0,fullWidth:!0,title:"Save preferences",className:x.saveButton,isSubmit:!0,disabled:e,icon:j?"check":void 0}),(0,r.jsx)(d.A,{variant:(0,y.eM)("Cancel - discard changes"),thin:!0,fullWidth:!0,title:"Cancel - discard changes",icon:j?"close":void 0,onClick:c})]}),(0,r.jsxs)("div",{className:x.privacyInformation,children:[(0,r.jsx)("h2",{children:"How we treat your data"}),(0,r.jsxs)("p",{children:["We will treat your personal information with respect and use it as detailed in our"," ",(0,r.jsx)(h.A,{label:"Privacy Policy",url:"/page/privacy",className:x.link})," and"," ",(0,r.jsx)(h.A,{label:"Cookie Policies",url:"/page/cookie-policy",className:x.link}),"."]})]})]})]})]})}))}},49992:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(13939);let a=e=>({container:{maxWidth:792,margin:"0 auto",padding:r.YK.small,"& h1":Object.assign(Object.assign({},e.typography.xl_regular),{[e.breakpoints.down("sm")]:{maxWidth:520,margin:"0 auto"},[e.breakpoints.up("md")]:Object.assign({},e.typography.xxxl)})},box:{"& > div, & > form":{maxWidth:520,margin:"0 auto"},"&:last-child":{marginTop:r.YK.small},[e.breakpoints.up("md")]:{border:`1px solid ${r.Tj.supplementary.black}`,padding:r.YK.small},"& h2":Object.assign(Object.assign({maxWidth:520,margin:"0 auto"},e.typography.medium_bold),{[e.breakpoints.up("md")]:Object.assign({},e.typography.large_bold)}),"& p":Object.assign(Object.assign(Object.assign({maxWidth:520,margin:"0 auto"},e.typography.small_regular),e.typographySpacing.xs),{color:r.Tj.grey.grey6,[e.breakpoints.up("md")]:Object.assign({},e.typography.large_regular)})},caption:Object.assign({},e.typography.xxs_regular),error:{marginBottom:r.YK.small},buttons:{marginTop:`${r.YK.xl} !important`,marginBottom:r.YK.medium},saveButton:{marginBottom:`${r.YK.medium} !important`},input:{marginBottom:`${r.YK.xs} !important`}})}},e=>{e.O(0,[988,3172,636,6593,8792],()=>e(e.s=44589)),_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.