1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5973],{51053:function(n,e,i){i.d(e,{Z:function(){return V}});var t=i(52322),o=i(2784),l=i(98615),r=i(49408),d=i(27864);let a=n=>"\n width: ".concat(n,"px;\n height: ").concat(n,"px;\n border-radius: 50%;\n"),u=d.ZP.div.withConfig({componentId:"sc-6ffcfdad-0"})(["border-radius:6px;padding:20px 16px;display:flex;cursor:pointer;"," input[type='radio']{",";appearance:none;border:1px solid ",";outline:none;}input[type='radio']::before{",";content:'';display:block;border-color:",";}input[type='radio']:checked{border-color:",";display:flex;justify-content:center;align-items:center;}input[type='radio']:checked::before{background:",";flex-shrink:0;}"],n=>n.index===n.colorIndex?"border: 2px solid ".concat(r.O.$00697c,";"):"border: 1px solid ".concat(r.O.$bebebe,";"),a(20),r.O.$bebebe,a(12),r.O.$00697c,r.O.$00697c,r.O.$00697c),s=d.ZP.div.withConfig({componentId:"sc-6ffcfdad-1"})(["display:flex;align-items:center;",""],n=>"align-self: ".concat(n.align));var c=n=>{let{item:e,index:i,selIndex:o,onSelectItem:r}=n;return(0,t.jsxs)(u,{index:i,colorIndex:o,onClick:()=>{r(i)},children:[(0,t.jsx)(s,{children:(0,t.jsx)("input",{type:"radio",name:"singleSelection",checked:o===i,onChange:()=>{}})}),(0,t.jsx)(l.Z,{detail:e.detail,title:e.title,description:e.description,extra:e.extra,value:e.value})]})},v=i(67862),p=i(92603),f=i(12153);function g(){let n=(0,v._)(["\n margin-bottom: -",";\n "]);return g=function(){return n},n}function m(){let n=(0,v._)(["\n margin-bottom: -",";\n "]);return m=function(){return n},n}function h(){let n=(0,v._)(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin-bottom: -",";\n\n ","\n\n ","\n"]);return h=function(){return n},n}function y(){let n=(0,v._)(["\n width: calc(50% - 12px);\n margin-bottom: ",";\n\n :nth-last-child(2) {\n margin-bottom: 0;\n }\n "]);return y=function(){return n},n}function b(){let n=(0,v._)(["\n width: calc(50% - ",");\n margin-bottom: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,v._)(["\n width: 100%;\n margin-bottom: ",";\n\n :last-child {\n margin-bottom: 0;\n }\n\n ","\n\n ","\n"]);return C=function(){return n},n}let E=p.Z.div(h(),f.r.spacing.md,f.B.tablet(g(),f.r.spacing.lg),f.B.desktop(m(),f.r.spacing.xl)),S=p.Z.div(C(),f.r.spacing.md,f.B.tablet(y(),f.r.spacing.lg),f.B.desktop(b(),f.r.spacing.md,f.r.spacing.xl));var x=n=>{let{items:e,selIndex:i,onSelectItem:l}=n;return(0,t.jsx)(E,{children:o.Children.toArray(e.map((n,o)=>(0,t.jsx)(S,{lastLine:o<=e.length-2,children:(0,t.jsx)(c,{item:n,index:o,selIndex:i,onSelectItem:l})})))})},I=i(71804),A=i(83144),_=i(66649),T=i(11108),N=i(95125),L=i(82898),O=i(78908);let R=d.ZP.div.withConfig({componentId:"sc-eab4b0b-0"})(["color:",";font-weight:400;max-height:60vh;display:flex;flex-direction:column;"],O.O9.$262626),D=d.ZP.div.withConfig({componentId:"sc-eab4b0b-1"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){"," margin-bottom:32px;}"],O.Rq.exbold,(0,O.Ln)(30,38),O.AV.desktop,(0,O.Ln)(36,45)),M=d.ZP.div.withConfig({componentId:"sc-eab4b0b-2"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){margin-bottom:32px;}@media (min-width:","){margin-bottom:40px;}"],O.Rq.regular,(0,O.Ln)(18,24),O.AV.tablet,O.AV.desktop),P=d.ZP.div.withConfig({componentId:"sc-eab4b0b-3"})(["align-self:flex-start;overflow:scroll;overflow-x:hidden;margin-bottom:32px;min-height:68px;width:100%;@media (min-width:","){margin-bottom:24px;min-height:72px;}@media (min-width:","){margin-bottom:32px;}"],O.AV.tablet,O.AV.desktop),w=d.ZP.div.withConfig({componentId:"sc-eab4b0b-4"})(["display:flex;width:100%;margin-bottom:36px;@media (min-width:","){margin-bottom:44px;}@media (min-width:","){margin-bottom:52px;}"],O.AV.tablet,O.AV.desktop),k=d.ZP.div.withConfig({componentId:"sc-eab4b0b-5"})(["width:100%;display:flex;justify-content:center;.button-slide-container{width:100%;@media (min-width:","){width:258px;}@media (min-width:","){width:296px;}}"],O.AV.tablet,O.AV.desktop);var j=i(23072),B=i(33849),F=i(74191);let z=n=>{var e,i,t,o,l,r,d,a,u,s,c,v;return{title:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientLogged)||void 0===i?void 0:null===(e=i.editNumber)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.clientLogged)||void 0===l?void 0:null===(o=l.editNumber)||void 0===o?void 0:o.description)||"",buttonText:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientLogged)||void 0===a?void 0:null===(d=a.editNumber)||void 0===d?void 0:d.buttonLabel)||"",numbers:[{title:"******1111",value:"1111111111"},{title:"******2222",value:"2222222222"},{title:"******3333",value:"3333333333"}],selIndexMok:2,ctaLable:(null==n?void 0:null===(v=n.personalinfo)||void 0===v?void 0:null===(c=v.clientLogged)||void 0===c?void 0:null===(s=c.editNumber)||void 0===s?void 0:s.addNewNumberLabel)||""}},Z=n=>{let{onChangeNumber:e,data:i,selectedNumber:t,isLoading:l}=n,{subtitle:r,title:d,ctaLable:a,buttonText:u}=z((0,B.C)(B.J,F.b.CMS_GET_PERSONAL_DATA)),{isTablet:s,isDesktop:c}=(0,j.h)(),[v,p]=(0,o.useState)(-1),[f,g]=(0,o.useState)(!1),[m,h]=(0,o.useState)([]);return(0,o.useEffect)(()=>
1{if(i){let n=[];i.forEach((e,i)=>{var o;n.push({title:"******".concat(null===(o=e.phoneNumber)||void 0===o?void 0:o.substring(6)),value:e.phoneNumber||""}),e.phoneNumber===t&&p(i)}),h(n)}},[]),(0,o.useEffect)(()=>{l||g(!1)},[l]),{title:d,subtitle:r,numbers:m,onSelectItem:n=>{p(n)},selIndex:v,setOpenModal:g,ctaLable:a,buttonText:u,onSave:()=>{(0,F.d)(u),e(m[v])},setModalHeight:(n,e)=>n&&563||e&&563||void 0,isTablet:s,isDesktop:c,openModal:f,addNewNumber:n=>{e({title:"",value:n.phoneNumber||""})}}},H=n=>{let{title:e,subtitle:i,numbers:o,onSelectItem:l,selIndex:r,setOpenModal:d,ctaLable:a,buttonText:u,onSave:s,setModalHeight:c,openModal:v,isTablet:p,isDesktop:f,addNewNumber:g,isLoading:m}=n;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(R,{children:[(0,t.jsx)(D,{children:e}),(0,t.jsx)(M,{children:i}),(0,t.jsx)(P,{children:(0,t.jsx)(x,{"data-cs-mask":"",items:o||[],onSelectItem:l,selIndex:r})}),(0,t.jsx)(w,{children:(0,t.jsx)(I.Z,{onClick:()=>d(!0),text:a})}),(0,t.jsx)(k,{children:(0,t.jsx)(A.Z,{label:u,onClick:s,isApp:(0,N.k)(),borderColor:"#0d0d0d",hoverColor:"#262626",hoverTextColor:"#fff",clickColor:"#7e7e7e",clickTextColor:"#fff",disabled:m||-1===r,name:"action_addNumber"})})]}),(0,t.jsx)(L.Z,{height:c(p,f),isOpen:v,handleClose:()=>d(!1),children:(0,t.jsxs)(t.Fragment,{children:[m&&(0,t.jsx)(_.Z,{}),(0,t.jsx)(T.Z,{onSubmit:g,handleClose:()=>d(!1),newNumber:!0})]})})]})};var V=n=>{let{onChangeNumber:e,data:i,selectedNumber:o,isLoading:l}=n,{title:r,subtitle:d,numbers:a,onSelectItem:u,selIndex:s,setOpenModal:c,ctaLable:v,buttonText:p,onSave:f,setModalHeight:g,isTablet:m,isDesktop:h,openModal:y,addNewNumber:b}=Z({onChangeNumber:e,data:i,selectedNumber:o,isLoading:l});return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(H,{title:r,subtitle:d,numbers:a,onSelectItem:u,selIndex:s,setOpenModal:c,ctaLable:v,buttonText:p,onSave:f,setModalHeight:g,openModal:y,isTablet:y,isDesktop:h,addNewNumber:b,isLoading:l})})}},59202:function(n,e,i){i.d(e,{Z:function(){return V}});var t=i(52322),o=i(63535),l=i(2784),r=i(90401),d=i(82898),a=i(42406),u=i(67862),s=i(92603),c=i(12153);function v(){let n=(0,u._)(["\n width: 280px;\n "]);return v=function(){return n},n}function p(){let n=(0,u._)(["\n width: 320px;\n "]);return p=function(){return n},n}function f(){let n=(0,u._)(["\n display: flex;\n flex-direction: column;\n width: 255px;\n border-radius: ",";\n border: "," "," solid;\n\n ","\n\n ","\n"]);return f=function(){return n},n}function g(){let n=(0,u._)(["\n width: 100%;\n height: 120px;\n border-radius: 20px 20px 0 0;\n"]);return g=function(){return n},n}function m(){let n=(0,u._)(["\n padding: 16px 16px 24px;\n gap: ",";\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"]);return m=function(){return n},n}function h(){let n=(0,u._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n overflow-wrap: break-word;\n word-wrap: break-word;\n"]);return h=function(){return n},n}function y(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n text-align: left;\n word-break: break-word;\n"]);return y=function(){return n},n}function b(){let n=(0,u._)(["\n font-size: ",";\n line-height ",";\n "]);return b=function(){return n},n}function C(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n text-align: left;\n\n ","\n"]);return C=function(){return n},n}function E(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n text-align: left;\n"]);return E=function(){return n},n}function S(){let n=(0,u._)(["\n font-size: ",";\n line-height ","; \n "]);return S=function(){return n},n}function x(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n text-align: left;\n\n ","\n"]);return x=function(){return n},n}function I(){let n=(0,u._)(["\n display: flex;\n flex-direction: column;\n align-self: center;\n width: 100%;\n gap: ",";\n"]);return I=function(){return n},n}function A(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n color: ",";\n text-align: left;\n\n overflow-wrap: break-word;\n word-wrap: break-word;\n\n p {\n margin: 0;\n text-align: left;\n overflow-wrap: break-word;\n word-wrap: break-word;\n }\n"]);return A=function(){return n},n}function _(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n text-align: left;\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-underline-position: from-font;\n text-decoration-skip-ink: none;\n color: ",";\n cursor: pointer;\n"]);return _=function(){return n},n}function T(){let n=(0,u._)(["\n font-size: ",";\n line-height ",";\n "]);return T=function(){return n},n}function N(){let n=(0,u._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height ",";\n\n ","\n"]);return N=function(){return n},n}let L=s.Z.div(f(),c.r.radius.lg,c.r.borderWidth.thin,c.r.colors.border.default,c.B.tablet(v()),c.B.tablet(p())),O=s.Z.div(g()),R=s.Z.div(m(),c.r.spacing.md),D=s.Z.div(h()),M=s.Z.div(y(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.extrabold,c.r.typography.fontSize.h4,c.r.typography.lineHeight.h4),P=s.Z.div(C(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.extrabold,c.r.typography.fontSize.h5,c.r.typography.lineHeight.h5,c.B.desktop(b(),c.r.typography.fontSize.h4,c.r.typography.lineHeight.h4)),w=s.Z.div(E(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.regular,c.r.typography.fontSize.body2,c.r.typography.lineHeight.body2),k=s.Z.div(x(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.extrabold,c.r.typography.fontSize.h5,c.r.typography.lineHeight.h5,c.B.desktop(S(),c.r.typography.fontSize.h4,c.r.typography.lineHeight.h4)),j=s.Z.div(I(),c.r.spacing.md),B=s.Z.div(A(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.regular,c.r.typography.fontSize.body2,c.r.typography.lineHeight.body2,c.r.colors.text.secondary),F=s.Z.a(_(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.bold,c.r.typography.fontSize.body2,c.r.typography.lineHeight.body2,c.r.colors.text.primary),z=s.Z.div(N(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.regular,c.r.typography.fontSize.body2,c.r.typography.lineHeight.body2,c.B.tablet(T(),c.r.typography.fontSize.h6,c.r.typography.lineHeight.h6));var Z=i(73843);let H=n=>
1{let{popupTitle:e,popupBody:i,added:o,ctaAddLabel:l,addonId:d,ctaRemoveLabel:u,handleAddAction:s,handleRemoveAction:c,closePopupLabel:v,handleClosePopup:p,isPerformingAction:f,loadingId:g}=n,[m]=(0,r.q)([i]);return(0,a.Fk)({event_name:"view",event_label_track:"addons:detail"}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{children:e}),(0,t.jsx)(z,{dangerouslySetInnerHTML:{__html:m||""}}),(0,t.jsxs)(j,{children:[(0,t.jsx)(Z.Z,{onClick:()=>o?c(d):s(d),variant:o?"secondary":"primary",loading:f&&g===d,disabled:f&&g!==d,children:o?u:l},d+(o?"_remove":"_add")),(0,t.jsx)(Z.Z,{onClick:()=>p(v),variant:"secondary",children:v})]})]})};var V=n=>{let{title:e,price:i,subprice:u,imageUri:s,ctaAddLabel:c,ctaRemoveLabel:v,closePopupLabel:p,description:f,ctaOpenDetailsLabel:g,popupBody:m,addonId:h,popupTitle:y,added:b=!1,isLoadingUpdate:C,isLoadingCartUpdate:E,noPriceLabel:S,loadingId:x,saveAddon:I,removeAddon:A}=n,[_,T]=(0,l.useState)(!1),[N,z,V,U]=(0,r.q)([e,f,S,u]),Q=C||E,G=n=>{_&&T(!1),I(n)},Y=n=>{_&&T(!1),A(n)},W=n=>{(0,a.dw)(n||"chiudi","users","click","ui_interaction"),T(!1)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L,{children:[s&&(0,t.jsx)(O,{children:(0,t.jsx)(o.Z,{image:s,imageMobile:s,style:{borderRadius:"16px 16px 0 0"},nameCard:"addon-image"})}),(0,t.jsxs)(R,{children:[(0,t.jsxs)(D,{children:[(0,t.jsx)(M,{dangerouslySetInnerHTML:{__html:N||""}}),""!==i&&(0,t.jsx)(P,{children:i}),""===i&&V&&""!==V&&(0,t.jsx)(k,{dangerouslySetInnerHTML:{__html:V}}),(0,t.jsx)(w,{dangerouslySetInnerHTML:{__html:U||""}})]}),(0,t.jsx)(j,{children:(0,t.jsx)(Z.Z,{onClick:()=>b?Y(h):G(h),variant:b?"secondary":"primary",loading:Q&&x===h,disabled:Q&&x!==h,children:b?v:c},h+(b?"_remove":"_add"))}),(0,t.jsx)(B,{dangerouslySetInnerHTML:{__html:z||""}}),(0,t.jsx)(F,{onClick:()=>{(0,a.dw)(g),T(!0)},children:g})]})]}),(0,t.jsx)(d.Z,{isOpen:_,handleClose:()=>W("x"),children:(0,t.jsx)(H,{added:b,addonId:h,popupTitle:y,ctaRemoveLabel:v,ctaAddLabel:c,closePopupLabel:p,handleRemoveAction:Y,handleAddAction:G,handleClosePopup:W,popupBody:m,isPerformingAction:Q,loadingId:x||""})})]})}},37155:function(n,e,i){i.d(e,{Z:function(){return M}});var t=i(52322),o=i(73595),l=i(71804),r=i(2985),d=i(82898),a=i(33669),u=i(67862),s=i(92603),c=i(12153);function v(){let n=(0,u._)(["\n width: 366px;\n gap: ",";\n "]);return v=function(){return n},n}function p(){let n=(0,u._)(["\n width: 406px;\n "]);return p=function(){return n},n}function f(){let n=(0,u._)(["\n margin: 0 auto;\n gap: ",";\n width: 287px;\n\n ","\n\n ","\n"]);return f=function(){return n},n}function g(){let n=(0,u._)(["\n font-size: ",";\n line-height: ",";\n padding: 3.75rem 0 1rem;\n "]);return g=function(){return n},n}function m(){let n=(0,u._)(["\n font-size: ","; \n line-height: ","; \n "]);return m=function(){return n},n}function h(){let n=(0,u._)(["\n padding: 2rem 0 1rem;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: center;\n\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return h=function(){return n},n}function y(){let n=(0,u._)(["\n font-size: ",";\n line-height: ",";\n "]);return y=function(){return n},n}function b(){let n=(0,u._)(["\n margin-bottom: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,u._)(["\n margin: 0 auto;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: center;\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n\n p {\n margin-block: 0;\n\n b {\n font-weight: ",";\n }\n }\n"]);return C=function(){return n},n}function E(){let n=(0,u._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return E=function(){return n},n}function S(){let n=(0,u._)(["\n width: inherit;\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(",", ","),\n linear-gradient(",", ",");\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: ",";\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 58px;\n margin-bottom: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return S=function(){return n},n}function x(){let n=(0,u._)(["\n margin-top: ",";\n display: flex;\n text-align: left;\n"]);return x=function(){return n},n}function I(){let n=(0,u._)(["\n p {\n margin: 0 auto;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: left;\n font-size: ",";\n line-height: ",";\n }\n"]);return I=function(){return n},n}let A=s.Z.div(f(),c.r.spacing.md,c.B.tablet(v(),c.r.spacing.sm),c.B.desktop(p())),_=s.Z.div(h(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.extrabold,c.r.typography.fontSize.display5,c.r.typography.lineHeight.display5,c.B.tablet(g(),c.r.typography.fontSize.display4,c.r.typography.lineHeight.display4),c.B.desktop(m(),c.r.typography.fontSize.display4,c.r.typography.lineHeight.display4)),T=s.Z.div(C(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.regular,c.r.typography.fontSize.h6,c.r.typography.lineHeight.h6,c.r.spacing.xl,c.B.tablet(y(),c.r.typography.fontSize.h6,c.r.typography.lineHeight.h6),c.B.desktop(b(),c.r.spacing.xl),c.r.typography.fontWeight.extrabold);s.Z.div(S(),c.r.colors.bg.primary,c.r.colors.border.light,c.r.colors.border.light,c.r.colors.border.light,c.r.colors.border.light,c.r.spacing["3xl"],c.r.spacing.md,c.r.spacing.md,c.B.tablet(E()));let N=s.Z.div(x(),c.r.spacing.md),L=s.Z.div(I(),c.r.typography.fontFamily.primary,c.r.typography.fontWeight.regular,c.r.typography.fontSize.body2,c.r.typography.lineHeight.body2);var O=i(2784),R=i(90401);let D=n=>{let{items:e,value:i,setSelectedItem:t,onSelectItem:o,selectedItem:l,onOpeneModal:r}=n,d=(0,R.q)([(null==n?void 0:n.description)||""]),[a,u]=(0,O.useState)(),[s,c]=(0,O.useState)(!1),v=null==e?void 0:e.findIndex(n=>n.value===(null==l?void 0:l.value)),[p,f]=(0,O.useState)(v);return(0,O.useEffect)(()=>{void 0!==a&&(null==a?void 0:a.value)!==(null==l?void 0:l.value)&&(t(a),o&&o(a),a&&f(e.findIndex(n=>n.value===i)))},[a]),(0,O.useEffect)(()=>{e&&e.length>0&&f(null==e?void 0:e.findIndex(n=>n.value===(null==l?void 0:l.value)))},[e]),(0,O.useEffect)(()=>{s&&(null==r||r())},[s]),{item:a,setItem:u,openModal:s,passedItemIndex:p,handleToggleModal:()=>c(n=>!n),handleCloseModal:()=>c(!1),pDescription:d}};var M=n=>
1{let{title:e,description:i,bottomModal:u,bottomText:s,disableItems:c=!1,items:v,isSuccess:p=!0}=n,{openModal:f,setItem:g,passedItemIndex:m,handleToggleModal:h,handleCloseModal:y,pDescription:b}=D(n);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A,{children:[(0,t.jsx)(_,{children:e}),b[0]&&(0,t.jsx)(T,{dangerouslySetInnerHTML:{__html:b[0]}}),p?(0,t.jsx)(o.Z,{marginBottom:{mobile:12,tablet:12,desktop:12},items:v,selectedItem:g,passedValueIndex:m,disabled:c}):(0,t.jsx)(r.Z,{quantity:2,heights:70}),(null==u?void 0:u.textLink)&&(0,t.jsx)(N,{children:(0,t.jsx)(l.Z,{size:"1",onClick:h,text:null==u?void 0:u.textLink})}),s&&(0,t.jsx)(L,{children:(0,t.jsx)("p",{children:s})})]}),(0,t.jsx)(d.Z,{isOpen:f,handleClose:y,children:(0,t.jsx)(a.Z,{title:(null==u?void 0:u.titleModal)||"",description:(null==u?void 0:u.descriptionModal)||"",options:{textAlign:"left"}})})]})}},85069:function(n,e,i){i.d(e,{Z:function(){return C}});var t=i(52322),o=i(2784),l=i(14738),r=i(17965),d=i(67862),a=i(92603),u=i(96443);function s(){let n=(0,d._)(["\n padding: "," ",";\n margin-bottom: ",";\n "]);return s=function(){return n},n}function c(){let n=(0,d._)(["\n margin-bottom: ",";\n "]);return c=function(){return n},n}function v(){let n=(0,d._)(["\n margin: 0 auto;\n border-radius: ",";\n padding: "," ",";\n display: flex;\n flex-direction: row;\n cursor: ",";\n background-color: ",";\n margin-bottom: ",";\n ","\n\n ","\n\n ","\n"]);return v=function(){return n},n}function p(){let n=(0,d._)(["\n display: flex;\n align-items: center;\n z-index: 3;\n ","\n flex-shrink: 0;\n"]);return p=function(){return n},n}function f(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n width: 294px;\n "]);return f=function(){return n},n}function g(){let n=(0,d._)(["\n width: 334px;\n "]);return g=function(){return n},n}function m(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: left;\n font-size: ",";\n line-height: ",";\n\n width: 208px;\n margin-left: ",";\n\n ","\n\n ","\n"]);return m=function(){return n},n}let h=a.Z.div(v(),u.rS.radius.md,u.rS.spacing.md,u.rS.spacing.md,n=>n.disabled?"not-allowed":"pointer",n=>n.disabled?u.rS.colors.bg.disabled:"",n=>{var e;return(null===(e=n.marginBottom)||void 0===e?void 0:e.mobile)?"".concat(n.marginBottom.mobile,"px"):u.rS.spacing.md},n=>n.index===n.colorIndex?"border: 2px solid ".concat(u.DH.cyanDark,";"):"border: 1px solid ".concat(u.rS.colors.brand.primaryDisabled,";"),u.BC.tablet(s(),u.rS.spacing.lg,u.rS.spacing.md,n=>{var e;return(null===(e=n.marginBottom)||void 0===e?void 0:e.tablet)?"".concat(n.marginBottom.tablet,"px"):u.rS.spacing.md}),u.BC.desktop(c(),n=>{var e;return(null===(e=n.marginBottom)||void 0===e?void 0:e.desktop)?"".concat(n.marginBottom.desktop,"px"):u.rS.spacing.lg})),y=a.Z.div(p(),n=>"align-self: ".concat(n.align,";"));a.Z.div(m(),u.rS.typography.fontFamily.primary,u.rS.typography.fontWeight.extrabold,u.rS.typography.fontSize.h6,u.rS.typography.lineHeight.body1,u.rS.spacing.md,u.BC.tablet(f(),u.rS.typography.fontSize.h6,u.rS.typography.lineHeight.h6),u.BC.desktop(g()));var b=i(71075),C=n=>{let{items:e,selectedItem:i,passedValueIndex:d,onChangeItem:a,align:u,disabled:s=!1,disabledByIndex:c,marginBottom:v}=n,[p,f]=(0,o.useState)(d);return(0,o.useEffect)(()=>{void 0!==d&&i&&(i(e[d]),f(d))},[d]),(0,t.jsx)(t.Fragment,{children:o.Children.toArray(e.map((n,e)=>(0,t.jsxs)(h,{disabled:(null==c?void 0:c.index)===e&&(null==c?void 0:c.state),marginBottom:v,className:"checkbox-container",index:e,colorIndex:p,onClick:()=>{!s&&(null==c?void 0:c.index)!==e&&e!=p&&(f(e),i&&i(n),a&&a(n,e))},style:s?{cursor:"wait"}:{},children:[(0,t.jsx)(y,{align:u,children:p===e?(0,t.jsx)(l.Z,{}):(0,t.jsx)(r.Z,{})}),(0,t.jsx)(b.Z,{detail:n.detail,title:n.title,description:n.description,extra:n.extra,value:n.value,titleIcon:n.titleIcon})]})))})}},31273:function(n,e,i){var t,o;i.d(e,{b:function(){return t}}),(o=t||(t={})).Change="change",o.Modify="modify"},62658:function(n,e,i){i.d(e,{Z:function(){return K}});var t=i(52322),o=i(63955),l=i(74875),r=i(83144),d=i(90401),a=i(38524),u=i(45451),s=i(95125),c=i(67862),v=i(92603),p=i(28165),f=i(96443);function g(){let n=(0,c._)(["\n b {\n font-family: ",";\n font-weight: ",";\n }\n\n img {\n cursor: text;\n vertical-align: baseline;\n }\n\n a {\n color: ",";\n font-weight: ",";\n\n &:hover {\n color: ",";\n }\n }\n\n button {\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n \n color: ",";\n background: none;\n border: none;\n padding: 0;\n outline: inherit;\n\n span {\n font-family: ",";\n font-weight: ",";\n color: ","; \n background-color: ",";\n padding-left: ",";\n padding-right: ",";\n border-radius: 50%;\n cursor: pointer;\n }\n\n &:hover {\n span {\n background-color: ",";\n }\n }\n\n &:active {\n span {\n background-color: ",";\n }\n }\n }\n div {\n margin-bottom: 100px;\n margin-left: 24px;\n margin-right: 24px;\n }\n"]);return g=function(){return n},n}function m(){let n=(0,c._)(["\n margin: 0 auto;\n color: ",";\n font-family: ",";\n font-weight: ",";\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"]);return m=function(){return n},n}function h(){let n=(0,c._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return h=function(){return n},n}function y(){let n=(0,c._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n"]);return y=function(){return n},n}function b(){let n=(0,c._)(["\n margin: 0 0 ",";\n "]);return b=function(){return n},n}function C(){let n=(0,c._)(["\n margin: 0 0 ",";\n "]);return C=function(){return n},n}function E(){let n=(0,c._)(["\n \n font-size: ",";\n line-height: ",";\n text-align: left;\n margin: 0 0 ",";\n ","\n ","\n \n ","\n"]);return E=function(){return n},n}function S(){let n=(0,c._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return S=function(){return n},n}function x(){let n=(0,c._)(["\n margin-bottom: ",";\n "]);return x=function(){return n},n}function I(){let n=(0,c._)(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n\n div {\n color: ",";\n }\n"]);return I=function(){return n},n}function A(){let n=(0,c._)(["\n width: 258px;\n "]);return A=function(){return n},n}function _(){let n=(0,c._)(["\n width: 296px;\n "]);return _=function(){return n},n}function T(){let n=(0,c._)(["\n display: flex;\n justify-content: center;\n\n .button-slide-container {\n position: relative;\n bottom: 0;\n width: 100%;\n background: ",";\n\n ","\n\n ","\n }\n"]);return T=function(){return n},n}function N(){let n=(0,c._)(["\n ","\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n color: ",";\n font-size: ",";\n line-height: ",";\n font-family: ",";\n font-weight: ",";\n text-align: left;\n"]);return N=function(){return n},n}let L=(0,p.iv)(g(),f.rS.typography.fontFamily.primary,f.rS.typography.fontWeight.extrabold,f.rS.colors.text.primary,f.rS.typography.fontWeight.bold,f.rS.colors.text.link,f.rS.typography.fontFamily.primary,f.rS.typography.fontWeight.extrabold,f.rS.typography.fontSize.display5,f.rS.colors.text.brand,f.r
1S.typography.fontFamily.secondary,f.rS.typography.fontWeight.light,f.rS.colors.text.inverse,f.rS.colors.brand.primary,f.rS.spacing.sm,f.rS.spacing.sm,f.rS.colors.text.linkHover,f.rS.colors.interactive.active),O=v.Z.div(m(),f.rS.colors.text.primary,f.rS.typography.fontFamily.secondary,f.rS.typography.fontWeight.regular),R=v.Z.div(y(),f.rS.typography.fontFamily.primary,f.rS.typography.fontWeight.extrabold,f.rS.typography.fontSize.h4,f.rS.typography.lineHeight.h4,f.rS.spacing.lg,f.BC.desktop(h(),f.rS.typography.fontSize.h2,f.rS.typography.lineHeight.h2,f.rS.spacing.xl)),D=v.Z.div(E(),f.rS.typography.fontSize.body1,f.rS.typography.lineHeight.body2,f.rS.spacing.xl,f.BC.tablet(b(),f.rS.spacing["2xl"]),f.BC.desktop(C(),f.rS.spacing.xl),L),M=v.Z.div(I(),f.rS.typography.fontWeight.bold,f.rS.typography.fontSize.body1,f.rS.typography.lineHeight.body2,f.rS.spacing.lg,f.BC.tablet(S(),f.rS.typography.fontSize.h6,f.rS.typography.lineHeight.body1,f.rS.spacing.xl),f.BC.desktop(x(),f.rS.spacing["2xl"]),f.DH.cyanDark),P=v.Z.div(T(),f.rS.colors.bg.primary,f.BC.tablet(A()),f.BC.desktop(_())),w=v.Z.p(N(),n=>n.isManual?"":"display: none;",f.rS.colors.text.error,f.rS.typography.fontSize.body3,f.rS.typography.lineHeight.body3,f.rS.typography.fontFamily.secondary,f.rS.typography.fontWeight.regular);var k=i(2784),j=i(6812),B=i(38004),F=i(36172),z=i(41989),Z=i(16053),H=i(13630),V=i(76527),U=i(42406),Q=i(82066),G=i(65413);let Y=G.object({placeId:G.string().required(""),city:G.string().min(1,"Campo obbligatorio").matches(/^[a-zA-Z+"à èìòùÃÃÃÃÃáéÃóúýÃÃÃÃÃÃ"+\s]*$/g,"Campo errato"),postalCode:G.string().min(5,"Campo obbligatorio").max(5,"Campo errato").matches(/^\d+$/,"Campo errato"),stateOrProvince:G.string().min(1,"Campo obbligatorio").matches(/^[a-zA-Z+"à èìòùÃÃÃÃÃáéÃóúýÃÃÃÃÃÃ"+\s]*$/g,"Campo errato"),street:G.string().min(1,"Campo obbligatorio").matches(/^[a-zA-Z+"-à èìòùÃÃÃÃÃáéÃóúýÃÃÃÃÃÃ"+\s]*$/g,"Campo errato"),streetNumber:G.string().min(1,"Campo obbligatorio").test("rangeTest","Campo errato.",n=>null!=n&&!!n.match(/^[1-9]([0-9]{0,5})[a-zA-Z]?$/))}).required();var W=i(31273),J=i(54751),X=n=>{let{shippingAddress:e,setShippingAddress:i,billingAddress:t,setBillingAddress:l,setInvoice:r,setPickupPoint:d,mode:a,state:u,origin:s,modeAction:c,handleClose:v,lables:p,lastName:f,firstName:g,cmsConfig:m,manualAddressConfig:h}=n,y=(0,Q.useQueryClient)(),{handleSubmit:b,control:C,register:E,watch:S,setValue:x,getValues:I,reset:A,trigger:_,setError:T,clearErrors:N,formState:{isValid:L,errors:O}}=(0,o.cI)({resolver:(0,j.X)(Y),mode:"onChange"}),[R,D]=(0,k.useState)(!1),[M,P]=(0,k.useState)(!1),[w,G]=(0,k.useState)(!0),[X,q]=(0,k.useState)(""),{isMobile:K}=(0,F.h)(),[$,nn]=(0,k.useState)(!1),[ne,ni]=(0,k.useState)({placeId:!1,city:!0,postalCode:!0,stateOrProvince:!0,street:!0,streetNumber:!0}),nt=(0,H.q)(),no=(0,V.Ih)(),nl=(0,V.hr)(),[nr,nd]=(0,k.useState)(!0),[na,nu]=(0,k.useState)((null==u?void 0:u.stateOrProvince)||""),ns=(0,k.useCallback)(n=>no.filter(e=>""===n||e.province===n).map(n=>"".concat(n.municipality," (").concat(n.province,")")),[no]),nc=(0,k.useCallback)(()=>nl.map(n=>"".concat(n.long," (").concat(n.short,")")),[no]);(0,k.useEffect)(()=>{var n,e,i;let t=null===(n=I())||void 0===n?void 0:n.stateOrProvince,o=null===(e=I())||void 0===e?void 0:e.city;nt.reset(),t||o?nd(!0):nd(!1),o&&nu((null===(i=no.find(n=>n.municipality===(null==o?void 0:o.toUpperCase())))||void 0===i?void 0:i.province)||"")},[R]);let nv=function(n){let e="";return Object.values(n).map(n=>(n&&(e=e.concat(n,", ")),null)),e},np=(0,k.useCallback)(async n=>{let e=await (0,B.Bz)(n),i=(n=>{let{city:e,postalCode:i,stateOrProvince:t,street:o,streetNumber:l}=n;return{city:e,postalCode:i,stateOrProvince:t,street:o,streetNumber:l}})(e);return e&&q(nv(i)),e},[]),nf=async n=>Promise.resolve(await (0,B.iy)(n)),ng=n=>a===W.b.Modify?c&&c(n):s?(d({storeId:"",locationAddress:{id:"",city:"",country:"",displayCountry:"",stateOrProvince:"",displayStateOrProvince:"",longitude:"",latitude:"",postalCode:"",formattedAddress1:"",postalOfficeID:"",postalOfficeDescription:""},aerialDistance:1.521}),i({...e,formattedAddress:(0,J.N6)({city:n.city,postalCode:n.postalCode,stateOrProvince:n.stateOrProvince,street:n.street,streetNumber:n.streetNumber||""}),formattedAddress1:"".concat(n.streetNumber||""," ").concat(n.street||""),formattedAddress2:"".concat(n.city||""," ").concat(n.stateOrProvince||""," ").concat(n.postalCode||""),city:n.city||"",postalCode:n.postalCode||"",stateOrProvince:n.stateOrProvince||"",street:n.street||"",streetNumber:n.streetNumber||"",postalOfficeDescription:"",latitude:(null==n?void 0:n.latitude)||0,longitude:(null==n?void 0:n.longitude)||0})):(r({option:""}),(0,z.u)(y,["billingCreatedAddress","billingAddress","billDeliveryDetails"]),null==l?void 0:l({...t,formattedAddress:(0,J.N6)({city:n.city,postalCode:n.postalCode,stateOrProvince:n.stateOrProvince,street:n.street,streetNumber:n.streetNumber||""}),formattedAddress1:"".concat(n.streetNumber||""," ").concat(n.street||""),formattedAddress2:"".concat(n.city||""," ").concat(n.stateOrProvince||""," ").concat(n.postalCode||""),city:n.city||"",postalCode:n.postalCode||"",stateOrProvince:n.stateOrProvince||"",street:n.street||"",streetNumber:n.streetNumber||""})),nm=S("placeId"),nh=S("streetNumber"),ny=(0,k.useCallback)(async(n,e)=>{if(n){let e=await np(n);e&&((null==e?void 0:e.streetNumber)?x("streetNumber",e.streetNumber):ni(n=>({...n,streetNumber:!1})),e.city&&x("city",e.city),e.postalCode&&x("postalCode",e.postalCode),e.street&&x("street",e.street),e.stateOrProvince&&x("stateOrProvince",e.stateOrProvince),(null==e?void 0:e.latitude)&&x("latitude",parseFloat(e.latitude)),(null==e?void 0:e.longitude)&&x("longitude",parseFloat(e.longitude)),await _(["city","postalCode","street","stateOrProvince"]))}else if(!n&&e){let n=await nf(e);
1if(n){let e=(n=>{let{city:e,postalCode:i,stateOrProvince:t,street:o,streetNumber:l}=n;return{city:e,postalCode:i,stateOrProvince:t,street:o,streetNumber:l}})(n),i=I();Object.values(e).some(n=>""===n)?Object.values(i).some(n=>void 0===n)?(D(!0),ni({placeId:!0,city:!1,postalCode:!1,stateOrProvince:!1,street:!1,streetNumber:!1})):""===e.streetNumber&&""!==i.streetNumber?(D(!0),ni({placeId:!0,city:!1,postalCode:!1,stateOrProvince:!1,street:!1,streetNumber:!1}),N(),i.streetNumber&&x("streetNumber",i.streetNumber),n.city&&x("city",n.city),n.postalCode&&x("postalCode",n.postalCode),n.street&&x("street",n.street),n.stateOrProvince&&x("stateOrProvince",n.stateOrProvince),n.latitude&&x("latitude",parseFloat(n.latitude)),n.longitude&&x("longitude",parseFloat(n.longitude)),await _(),ng({...i,latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)}),v()):Object.entries(e).filter(n=>{if(""===n[1])return T(n[0],{message:m.apiError},{shouldFocus:!0})}):(N(),n.streetNumber&&x("streetNumber",n.streetNumber),n.city&&x("city",n.city),n.postalCode&&x("postalCode",n.postalCode),n.street&&x("street",n.street),n.stateOrProvince&&x("stateOrProvince",n.stateOrProvince),n.latitude&&x("latitude",parseFloat(n.latitude)),n.longitude&&x("longitude",parseFloat(n.longitude)),await _(),ng({...i,postalCode:n.postalCode,streetNumber:n.streetNumber,city:n.city,street:n.street,stateOrProvince:n.stateOrProvince,latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)}),v())}}},[x,_,I,np,ng,n,nh]);(0,k.useEffect)(()=>{nm&&!nh&&!0===ne.streetNumber&&ny(nm).catch(n=>{z.K.debug(n)}),G(()=>!(void 0!==nh&&nh.trim().length>0&&!O.streetNumber&&!R))},[nm,nh,ne.streetNumber,R,ny,x]);let nb=async(n,e)=>{e.preventDefault(),ng(n),v()},nC=n=>{let e={street:"",city:"",province:"",postalCode:""};return n.forEach(n=>{var i,t,o,l;(null==n?void 0:null===(i=n.types)||void 0===i?void 0:i.includes("route"))?e.street=n.long_name||"":(null==n?void 0:null===(t=n.types)||void 0===t?void 0:t.includes("administrative_area_level_3"))?e.city=n.long_name||"":(null==n?void 0:null===(o=n.types)||void 0===o?void 0:o.includes("administrative_area_level_2"))?e.province=n.short_name||"":(null==n?void 0:null===(l=n.types)||void 0===l?void 0:l.includes("postal_code"))&&(e.postalCode=n.long_name||"")}),q("".concat(e.city,", ").concat(e.postalCode,", ").concat(e.province,", ").concat(e.street,",")),e},nE=async n=>((0,U.dw)("click geolocalization"),new Promise(e=>{var i,t;nn(!0),(0,Z.fK)(null==n?void 0:null===(i=n.coords)||void 0===i?void 0:i.latitude,null==n?void 0:null===(t=n.coords)||void 0===t?void 0:t.longitude).then(n=>{let i={street:"",city:"",province:"",postalCode:""};void 0!==n&&(ni(n=>({...n,streetNumber:!1})),i=nC(n.address_components)),e(i),nn(!1)})}));return(0,k.useEffect)(()=>{nm||x("streetNumber","")},[nm]),(0,k.useEffect)(()=>{G(()=>!(void 0!==nh&&nh.trim().length>0&&!O.streetNumber&&!R))},[O.streetNumber,nh]),{isForceManual:M,manualAddressConfig:h,forceManualSubmit:n=>{ng(n),v()},state:u,lables:p,cmsConfig:m,origin:s,firstName:g,lastName:f,handleSubmit:b,onConfirm:nb,control:C,hiddenFields:ne,setHiddenFields:ni,onIconClick:()=>{A(),ni({placeId:!1,city:!0,postalCode:!0,stateOrProvince:!0,street:!0,streetNumber:!0})},onSelectProvince:n=>{x("stateOrProvince",(n.match(/\((.*?)\)/)||"")[1]),na!==I().stateOrProvince&&(x("city",""),nu("")),_("stateOrProvince"),nd(""!==n)},onSelectCity:n=>{x("city",(n.match(/^[^(]+/)||" ")[0].trim()),""!==n&&nu((n.match(/\((.*?)\)/)||"")[1]),_("city")},dividerMargin:K?1:1.5,getApiErrorMessage:()=>{let n="";return Object.keys(O).forEach(e=>{O[e].message&&""===n&&(n=O[e].message)}),""===n&&(n=m.genericError),n},handleForceManual:()=>{P(!0),(0,U.Fk)({event_name:"view",event_label_track:"manual address input",event_category:"tools",page_type:"address"})},errors:O,findPosition:nE,isManual:R,register:E,calculatedItalianProvinces:nc,calculatedItalianMunicipalities:ns,isProvinceSelected:nr,getValues:I,isValid:L,handleFirstClick:()=>{(0,U.dw)(m.submitButton||""),!0===ne.streetNumber?(ng(I()),v()):ny(null,X+nh).catch(n=>{z.K.debug(n)})},isDisabledFirstStep:w,isLoadingGeo:$}},q=i(36731),K=n=>{var e,i,c,v,p;let{isForceManual:f,manualAddressConfig:g,forceManualSubmit:m,state:h,lables:y,cmsConfig:b,origin:C,firstName:E,lastName:S,handleSubmit:x,onConfirm:I,control:A,hiddenFields:_,setHiddenFields:T,onIconClick:N,onSelectProvince:L,onSelectCity:k,dividerMargin:j,getApiErrorMessage:B,handleForceManual:F,errors:z,findPosition:Z,isManual:H,register:V,calculatedItalianProvinces:U,calculatedItalianMunicipalities:Q,isProvinceSelected:G,getValues:Y,isValid:W,handleFirstClick:J,isDisabledFirstStep:K,isLoadingGeo:$}=X(n);return(0,t.jsxs)(t.Fragment,{children:[f&&(0,t.jsx)(a.Z,{cmsConfig:g,onSubmit:m,state:h}),!f&&(0,t.jsxs)(O,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R,{children:y?y.title:b.title}),(0,t.jsx)(D,{dangerouslySetInnerHTML:{__html:(y?(0,d.q)([null==y?void 0:y.subtitle])[0]:C?(0,d.q)([b.shippingSubtitle])[0]:(0,d.q)([b.billingSubtitle])[0])||""}}),!y&&(0,t.jsxs)(M,{children:[b.lable,(0,t.jsxs)("div",{"data-cs-mask":"",children:[E," ",
1S]})]}),(0,t.jsxs)(u.Z,{onSubmit:x(I),autoComplete:"off",children:[(0,t.jsx)(o.Qr,{control:A,name:"placeId",render:n=>{var e;let{field:{onChange:i,onBlur:o,ref:l}}=n;return(0,t.jsx)(u.Z.AddressInput,{"data-cs-mask":"",label:b.labels.addressInput,placeholder:b.placeHolders.addressInput,onChange:n=>{T(n=>({...n,streetNumber:!0})),i(n)},hidden:_.placeId,autoFocus:!0,onIconClick:N,onBlur:o,ref:l,findPosition:Z,placeholderAutocomplete:{enabled:!0,label:(null==b?void 0:null===(e=b.labels)||void 0===e?void 0:e.addressInputPlaceHolderAutocomplete)||"Ricerca manuale",action:F}})}}),(0,t.jsx)(l.Z,{marginBottom:j,hidden:_.street}),(0,t.jsx)(u.Z.TextInput,{"data-cs-mask":"",placeholder:" ",label:b.labels.street,hidden:_.street,error:_.street?"":null===(e=z.street)||void 0===e?void 0:e.message,isErrorMessageDisabled:H,autoFocus:!0,...V("street")}),(0,t.jsx)(l.Z,{marginBottom:j,hidden:_.streetNumber}),(0,t.jsx)(u.Z.TextInput,{"data-cs-mask":"",placeholder:" ",label:b.labels.streetNumber,hidden:_.streetNumber,error:_.streetNumber?"":null===(i=z.streetNumber)||void 0===i?void 0:i.message,isErrorMessageDisabled:H,autoFocus:!0,...V("streetNumber")}),(0,t.jsx)(l.Z,{marginBottom:j,hidden:_.streetNumber}),(0,t.jsx)(u.Z.SelectInput,{"data-cs-mask":"",label:b.labels.stateOrProvince,onSelectValue:n=>{L(n)},hidden:_.stateOrProvince,errorMessage:_.stateOrProvince?"":null===(c=z.stateOrProvince)||void 0===c?void 0:c.message,isErrorMessageDisabled:H,placeholder:" ",...V("stateOrProvince"),items:U()}),(0,t.jsx)(l.Z,{marginBottom:j,hidden:_.streetNumber}),(0,t.jsx)(u.Z.SelectInput,{"data-cs-mask":"",label:b.labels.city,onSelectValue:n=>{k(n)},hidden:_.city,isDisabled:!G,errorMessage:_.city?"":null===(v=z.city)||void 0===v?void 0:v.message,isErrorMessageDisabled:H,placeholder:" ",...V("city"),items:Q(Y().stateOrProvince||"")}),(0,t.jsx)(l.Z,{marginBottom:j,hidden:_.postalCode}),(0,t.jsx)(u.Z.TextInput,{"data-cs-mask":"",required:!0,placeholder:" ",label:b.labels.postalCode,hidden:_.postalCode,error:_.postalCode?"":null===(p=z.postalCode)||void 0===p?void 0:p.message,isErrorMessageDisabled:H,autoFocus:!0,...V("postalCode")}),(0,t.jsx)(l.Z,{marginBottom:j}),(0,t.jsx)(w,{isManual:H&&(!W||B()===b.apiError),children:B()})]})]}),(0,t.jsx)(P,{children:(0,t.jsx)(r.Z,{label:b.submitButton,onClick:J,isApp:(0,s.k)(),disabled:K&&!W||$,borderColor:q.r.colors.text.mvaSecondary,hoverColor:q.r.colors.text.primary,hoverTextColor:q.r.colors.text.inverse,clickColor:q.r.colors.text.secondary,clickTextColor:q.r.colors.text.inverse,name:"action_editAddress"})})]})]})}},49994:function(n,e,i){i.d(e,{Z:function(){return D}});var t=i(52322),o=i(73595),l=i(83144),r=i(2784),d=i(42406),a=i(4233),u=i(95125),s=i(67862),c=i(92603),v=i(12153);function p(){let n=(0,s._)(["\n margin: 0 auto;\n text-align: left;\n font-family: ",";\n font-weight: ",";\n color: ",";\n display: flex;\n flex-direction: column;\n height: 100%;\n justify-content: space-between;\n"]);return p=function(){return n},n}function f(){let n=(0,s._)(["\n margin-bottom: ",";\n "]);return f=function(){return n},n}function g(){let n=(0,s._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: 40px;\n "]);return g=function(){return n},n}function m(){let n=(0,s._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return m=function(){return n},n}function h(){let n=(0,s._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: 12px;\n "]);return h=function(){return n},n}function y(){let n=(0,s._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n"]);return y=function(){return n},n}function b(){let n=(0,s._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,s._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n"]);return C=function(){return n},n}function E(){let n=(0,s._)(["\n margin-bottom: ",";\n "]);return E=function(){return n},n}function S(){let n=(0,s._)(["\n .checkbox-container {\n margin-bottom: ",";\n padding: ",";\n\n ","\n }\n"]);return S=function(){return n},n}function x(){let n=(0,s._)(["\n margin-top: 38px;\n width: 258px;\n "]);return x=function(){return n},n}function I(){let n=(0,s._)(["\n margin-top: ",";\n width: 296px;\n "]);return I=function(){return n},n}function A(){let n=(0,s._)(["\n margin: 0 auto;\n width: 100%;\n\n ","\n\n ","\n"]);return A=function(){return n},n}let _=c.Z.div(p(),v.r.typography.fontFamily.primary,v.r.typography.fontWeight.extrabold,v.r.colors.text.primary),T=c.Z.div(m(),v.r.typography.fontSize.h4,v.r.typography.lineHeight.h4,v.r.spacing.lg,v.B.tablet(f(),v.r.spacing.xl),v.B.desktop(g(),v.r.typography.fontSize.h2,v.r.typography.lineHeight.h2)),N=c.Z.div(y(),v.r.typography.fontSize.body1,v.r.typography.lineHeight.body1,v.r.spacing.sm,v.B.tablet(h(),v.r.typography.fontSize.h5,v.r.typography.lineHeight.h6)),L=c.Z.div(C(),v.r.typography.fontFamily.secondary,v.r.typography.fontSize.body2,v.r.typography.lineHeight.body3,v.r.spacing.lg,v.B.tablet(b(),v.r.typography.fontSize.body1,v.r.typography.lineHeight.body2,v.r.spacing.lg)),O=c.Z.div(S(),v.r.spacing.sm,v.r.spacing.md,v.B.tablet(E(),v.r.spacing.sm)),R=c.Z.div(A(),v.B.tablet(x()),v.B.desktop(I(),v.r.spacing.lg));var D=n=>{let{options:e,onSaveAddress:i,handlerSelectAddress:s,hiddenCta:c,deliveryCenterData:v,editAddressOptionsConfig:p}=n,f=(0,r.useMemo)(()=>
1{if(!v||(null==v?void 0:v.length)===0){let n=e.findIndex(n=>n.value===a.G.PO);if(-1!==n)return{index:n,state:!0}}},[v,e]);return(0,t.jsxs)(_,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T,{children:null==p?void 0:p.title}),(0,t.jsx)(N,{children:null==p?void 0:p.subtitle}),(0,t.jsx)(L,{children:null==p?void 0:p.description}),(0,t.jsx)(O,{children:(0,t.jsx)(o.Z,{disabledByIndex:f,onChangeItem:n=>{(0,d.dw)(n.title||""),s(n)},items:e})})]}),!c&&(0,t.jsx)(R,{children:(0,t.jsx)(l.Z,{label:null==p?void 0:p.ctaLable,onClick:()=>{(0,d.dw)((null==p?void 0:p.ctaLable)||""),i()},borderColor:"#0d0d0d",isApp:(0,u.k)(),hoverColor:"#262626",hoverTextColor:"#fff",clickColor:"#7e7e7e",clickTextColor:"#fff",name:"action_saveAddress"})})]})}},30182:function(n,e,i){i.d(e,{Z:function(){return S}});var t=i(52322),o=i(2784),l=i(83144),r=i(45451),d=i(49408),a=i(63955),u=i(99981),s=i(75900),c=i(6812),v=i(65413);let p=v.object({phoneNumber:v.string().required("Campo obbligatorio").min(10,"Campo errato").max(11,"Campo errato").matches(/^[0-9]*$/,"Inserire un numero valido"),email:v.string().required("Campo obbligatorio").email("Inserire email nel formato corretto")});var f=i(27864),g=i(78908);let m=f.ZP.div.withConfig({componentId:"sc-22b1993a-0"})(["color:",";font-weight:400;.text-input{margin-bottom:24px;@media (min-width:","){margin-bottom:32px;width:328px;}@media (min-width:","){margin-bottom:40px;width:406px;}}"],g.O9.$262626,g.AV.tablet,g.AV.desktop),h=f.ZP.div.withConfig({componentId:"sc-22b1993a-1"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){"," margin-bottom:32px;}"],g.Rq.exbold,(0,g.Ln)(30,38),g.AV.desktop,(0,g.Ln)(36,45)),y=f.ZP.div.withConfig({componentId:"sc-22b1993a-2"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){margin-bottom:32px;}@media (min-width:","){margin-bottom:40px;}"],g.Rq.regular,(0,g.Ln)(18,24),g.AV.tablet,g.AV.desktop),b=f.ZP.div.withConfig({componentId:"sc-22b1993a-3"})(["@media (min-width:","){display:flex;flex-direction:column;align-items:center;}"],g.AV.tablet),C=f.ZP.div.withConfig({componentId:"sc-22b1993a-4"})(["margin:0 auto;@media (min-width:","){width:246px;}@media (min-width:","){width:300px;}"],g.AV.tablet,g.AV.desktop),E=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S;return{titleNumber:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientLogged)||void 0===i?void 0:null===(e=i.editNumber)||void 0===e?void 0:e.title)||"",titleEmail:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.clientLogged)||void 0===l?void 0:null===(o=l.newEmail)||void 0===o?void 0:o.title)||"",subtitleNumber:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientLogged)||void 0===a?void 0:null===(d=a.newNumber)||void 0===d?void 0:d.description)||"",subtitleEmail:(null==n?void 0:null===(v=n.personalinfo)||void 0===v?void 0:null===(c=v.clientLogged)||void 0===c?void 0:null===(s=c.newEmail)||void 0===s?void 0:s.subtitle)||"",buttonLableNumber:(null==n?void 0:null===(g=n.personalinfo)||void 0===g?void 0:null===(f=g.clientLogged)||void 0===f?void 0:null===(p=f.newNumber)||void 0===p?void 0:p.buttonLabel)||"",buttonLableEmail:(null==n?void 0:null===(y=n.personalinfo)||void 0===y?void 0:null===(h=y.clientLogged)||void 0===h?void 0:null===(m=h.newEmail)||void 0===m?void 0:m.buttonLabel)||"",lableNumber:(null==n?void 0:null===(C=n.personalinfo)||void 0===C?void 0:null===(b=C.selectInput)||void 0===b?void 0:b.telephone)||"",lableEmail:(null==n?void 0:null===(S=n.personalinfo)||void 0===S?void 0:null===(E=S.selectInput)||void 0===E?void 0:E.email)||""}};var S=n=>{var e,i;let{onSubmit:v,isPhone:f,isLoading:g}=n,{register:S,getValues:x,formState:{errors:I}}=(0,a.cI)({resolver:(0,c.X)(p),mode:"onChange"}
1),{buttonLableEmail:A,lableEmail:_,buttonLableNumber:T,subtitleEmail:N,titleEmail:L,subtitleNumber:O,titleNumber:R,lableNumber:D}=E((0,s.CA)(s.yw[u.q5.CONSUMER],u.bl.CMS_GET_PERSONAL_DATA)),[M,P]=(0,o.useState)(!0),w=()=>{void 0!==I.email||void 0!==I.phoneNumber||""===x().email||""===x().phoneNumber?P(!0):P(!1)};return(0,o.useEffect)(()=>{w()},[I.email,I.phoneNumber,x]),(0,t.jsxs)(m,{children:[(0,t.jsx)(h,{children:f?R:L}),(0,t.jsx)(y,{children:f?O:N}),(0,t.jsxs)(b,{children:[(0,t.jsx)("div",{className:"text-input",children:(0,t.jsx)(r.Z.TextInput,{"data-cs-mask":"",label:f?D:_,error:f?null===(e=I.phoneNumber)||void 0===e?void 0:e.message:null===(i=I.email)||void 0===i?void 0:i.message,placeholder:" ",...S(f?"phoneNumber":"email",{onChange:w})})}),(0,t.jsx)(C,{children:(0,t.jsx)(l.Z,{label:f?T:A,onClick:()=>{(0,u.dw)(f?T:A),v(x())},disabled:M||g,borderColor:d.O.$0d0d0d,isApp:(0,s.ks)(),hoverColor:d.O.$262626,hoverTextColor:d.O.$ffffff,clickColor:d.O.$7e7e7e,clickTextColor:d.O.$ffffff,name:"action_editField"})})]})]})}},11108:function(n,e,i){i.d(e,{Z:function(){return C}});var t=i(52322),o=i(83144),l=i(45451),r=i(63955),d=i(6812),a=i(25399),u=i(75900),s=i(65413);let c=s.object({phoneNumber:s.string().required("Campo obbligatorio").min(10,"Campo errato").max(11,"Campo errato").matches(/^[1-9][0-9]*$/,"Inserire un numero valido")});var v=i(27864),p=i(78908);let f=v.ZP.div.withConfig({componentId:"sc-22b1993a-0"})(["color:",";font-weight:400;.text-input{margin-bottom:24px;@media (min-width:","){margin-bottom:32px;width:328px;}@media (min-width:","){margin-bottom:40px;width:406px;}}"],p.O9.$262626,p.AV.tablet,p.AV.desktop),g=v.ZP.div.withConfig({componentId:"sc-22b1993a-1"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){"," margin-bottom:32px;}"],p.Rq.exbold,(0,p.Ln)(30,38),p.AV.desktop,(0,p.Ln)(36,45)),m=v.ZP.div.withConfig({componentId:"sc-22b1993a-2"})(["font-family:",";"," margin-bottom:24px;@media (min-width:","){margin-bottom:32px;}@media (min-width:","){margin-bottom:40px;}"],p.Rq.regular,(0,p.Ln)(18,24),p.AV.tablet,p.AV.desktop),h=v.ZP.div.withConfig({componentId:"sc-22b1993a-3"})(["@media (min-width:","){display:flex;flex-direction:column;align-items:center;}"],p.AV.tablet),y=v.ZP.div.withConfig({componentId:"sc-22b1993a-4"})(["margin:0 auto;@media (min-width:","){width:246px;}@media (min-width:","){width:300px;}"],p.AV.tablet,p.AV.desktop),b=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f;return{title:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientLogged)||void 0===i?void 0:null===(e=i.editNumber)||void 0===e?void 0:e.title)||"",titleNew:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.clientLogged)||void 0===l?void 0:null===(o=l.newNumber)||void 0===o?void 0:o.title)||"",subtitle:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientLogged)||void 0===a?void 0:null===(d=a.newNumber)||void 0===d?void 0:d.description)||"",buttonText:(null==n?void 0:null===(v=n.personalinfo)||void 0===v?void 0:null===(c=v.clientLogged)||void 0===c?void 0:null===(s=c.newNumber)||void 0===s?void 0:s.buttonLabel)||"",lable:(null==n?void 0:null===(f=n.personalinfo)||void 0===f?void 0:null===(p=f.selectInput)||void 0===p?void 0:p.telephone)||""}};var C=n=>{var e;let{onSubmit:i,newNumber:s}=n,{title:v,subtitle:p,titleNew:C,buttonText:E,lable:S}=b((0,u.CA)(u.yw[a.q.CONSUMER],a.b.CMS_GET_PERSONAL_DATA)),{register:x,getValues:I,formState:{isValid:A,errors:_}}=(0,r.cI)({resolver:(0,d.X)(c),mode:"onChange"});return(0,t.jsxs)(f,{children:[(0,t.jsx)(g,{children:s?C:v}),(0,t.jsx)(m,{children:p}),(0,t.jsxs)(h,{children:[(0,t.jsx)("div",{className:"text-input",children:(0,t.jsx)(l.Z.TextInput,{label:S,error:null===(e=_.phoneNumber)||void 0===e?void 0:e.message,placeholder:" ",...x("phoneNumber")})}),(0,t.jsx)(y,{children:(0,t.jsx)(o.Z,{label:E,onClick:()=>{i(I())},disabled:!A,borderColor:"#0d0d0d",isApp:(0,u.ks)(),hoverColor:"#262626",hoverTextColor:"#fff",clickColor:"#7e7e7e",clickTextColor:"#fff",n
1ame:"action_editNumber"})})]})]})}},71075:function(n,e,i){i.d(e,{Z:function(){return D}});var t=i(52322),o=i(2784),l=i(63535),r=i(90401),d=i(67862),a=i(92603),u=i(96443);function s(){let n=(0,d._)(["\n b {\n font-family: ",";\n font-weight: ",";\n }\n\n img {\n cursor: text;\n vertical-align: baseline;\n }\n\n a {\n color: ",";\n font-weight: ",";\n\n &:hover {\n color: ",";\n }\n }\n\n button {\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n\n color: ",";\n background: none;\n border: none;\n padding: 0;\n outline: inherit;\n\n span {\n font-family: ",";\n font-weight: ",";\n color: ",";\n background-color: ",";\n padding-left: ",";\n padding-right: ",";\n border-radius: 50%;\n cursor: pointer;\n }\n\n &:hover {\n span {\n background-color: ",";\n }\n }\n\n &:active {\n span {\n background-color: ",";\n }\n }\n }\n"]);return s=function(){return n},n}function c(){let n=(0,d._)(["\n word-break: break-word;\n display: flex;\n flex-direction: column;\n margin-left: ",";\n\n div {\n width: 100%;\n font-style: normal;\n text-align: left;\n color: ",";\n align-items: center;\n }\n\n p {\n margin: 0 auto;\n }\n"]);return c=function(){return n},n}function v(){let n=(0,d._)(["\n ","\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n text-transform: uppercase;\n margin: "," "," "," ",";\n"]);return v=function(){return n},n}function p(){let n=(0,d._)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"]);return p=function(){return n},n}function f(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n "]);return f=function(){return n},n}function g(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n color: "," !important;\n margin: 0 auto;\n font-size: ",";\n line-height: ",";\n ","\n"]);return g=function(){return n},n}function m(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n "]);return m=function(){return n},n}function h(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return h=function(){return n},n}function y(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n margin: 0 auto;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return y=function(){return n},n}function b(){let n=(0,d._)(["\n margin-top: 0;\n font-size: ",";\n line-height: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,d._)(["\n div {\n font-family: ",";\n font-weight: ",";\n margin: 0 auto;\n margin-top: ",";\n font-size: ",";\n line-height: ",";\n\n b {\n font-family: ",";\n font-weight: ",";\n }\n\n ","\n }\n"]);return C=function(){return n},n}function E(){let n=(0,d._)(["\n margin-top: ",";\n "]);return E=function(){return n},n}function S(){let n=(0,d._)(["\n display: flex;\n flex-direction: row;\n margin-top: ",";\n\n &.extraClass {\n padding: "," ",";\n gap: ",";\n width: 155px;\n height: ",";\n background: ",";\n opacity: 0.8;\n border-radius: ",";\n }\n\n svg {\n width: ",";\n vertical-align: middle;\n margin-right: ",";\n ","\n }\n\n ","\n"]);return S=function(){return n},n}function x(){let n=(0,d._)(["\n div {\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin: 0 auto;\n ","\n ","\n }\n"]);return x=function(){return n},n}let I=(0,i(28165).iv)(s(),u.rS.typography.fontFamily.primary,u.rS.typography.fontWeight.extrabold,u.rS.colors.text.primary,u.rS.typography.fontWeight.bold,u.rS.colors.text.link,u.rS.typography.fontFamily.primary,u.rS.typography.fontWeight.extrabold,u.rS.typography.fontSize.display5,u.rS.colors.text.brand,u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.light,u.rS.colors.text.inverse,u.rS.colors.brand.primary,u.rS.spacing.sm,u.rS.spacing.sm,u.rS.colors.text.linkHover,u.rS.colors.interactive.active),A=a.Z.div(c(),u.rS.spacing.md,u.rS.colors.text.primary);a.Z.div(v(),I,u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.light,u.rS.typography.fontSize.body1,u.rS.typography.lineHeight.body1,u.rS.colors.text.primary,u.rS.spacing["2xl"],u.rS.spacing.lg,u.rS.spacing.xl,u.rS.spacing.lg);let _=a.Z.div(p()),T=a.Z.div(g(),u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.regular,u.rS.colors.text.disabled,u.rS.typography.fontSize.body2,u.rS.typography.lineHeight.body2,u.BC.tablet(f(),u.rS.typography.fontSize.body1,u.rS.typography.lineHeight.body2)),N=a.Z.div(y(),u.rS.typography.fontFamily.primary,u.rS.typography.fontWeight.extrabold,u.rS.typography.fontSize.h6,u.rS.typography.lineHeight.body1,u.BC.tablet(m(),u.rS.typography.fontSize.h6,u.rS.typography.lineHeight.h6),n=>3===n.type?"{\n font-family: ".concat(u.rS.typography.fontFamily.secondary,";\n font-weight: ").concat(u.rS.typography.fontWeight.bold,";\n margin-bottom: ").concat(u.rS.spacing.sm,";\n font-size: ").concat(u.rS.typography.fontSize.body2,";\n line-height: ").concat(u.rS.typography.lineHeight.body2,";\n ").concat(u.BC.tablet(h(),u.rS.typography.fontSize.body2,u.rS.typography.lineHeight.body2,u.rS.spacing.md),"\n }"):""),L=a.Z.div(C(),u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.regular,u.rS.spacing.xs,u.rS.typography.fontSize.body2,u.rS.typography.lineHeight.body2,u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.bold,u.BC.tablet(b(),u.rS.typography.fontSize.body2,u.rS.typography.lineHeight.body2)),O=a.Z.div(S(),u.rS.spacing.xs,u.rS.spacing.xs,u.rS.spacing.sm,u.rS.spacing.xs,u.rS.spacing.lg,u.DH.cyanDark,u.rS.radius.lg,u.rS.spacing.lg,u.rS.spacing.sm,n=>"stroke: ".concat(n.color),u.BC.tablet(E(),u.rS.spacing.sm)),R=a.Z.div(x(),u.rS.typography.fontFamily.secondary,u.rS.typography.fontWeight.bold,u.rS.typography.fontSize.body2,u.rS.typography.lineHeight.body2,n=>"color: ".concat(n.color," !important;"),n=>{let{variant:e}=n;return"action"===e?"text-decoration: underline":""});var D=n=>{let{detail:e,title:i,description:d,extra:a,titleIcon:u,linkExtra:s}=n,[c]=(0,r.q)([d]),[v,p]=(0,o.useState)(0),[f]=(0,r.q)([null==s?void 0:s.text]),[g]=(0,r.q)([null==a?void 0:a.text]);return(0,o.useEffect)(()=>{e?p(3):a?p(2):d?p(1):p(0)},[n,d,e,a]),(0,t.jsxs)(A,{children:[(0,t.jsx)(T,{children:e}),(0,t.jsxs)(_,{children:[(0,t.jsx)(N,{className:"title",type:v,children:i}),u&&(0,t.jsx)(l.Z,{width:"24px",nameCard:"icon",image:u})]}),d&&(0,t.jsx)(L,{type:v,dangerouslySetInnerHTML:{__html:c||""}}),s&&s.text&&(0,t.jsx)(O,{onClick:null==a?void 0:a.action,children:(0,t.jsx)(R,{variant:s.variant,children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:f||""}})})}),a&&a.text&&(0,t.jsxs)(O,{color:null==a?void 0:a.color,onClick:null==a?void 0:a.action,className:null==a?void 0:a.extraClass,children:[(null==a?void 0:a.icon)?a.icon:"",(0,t.jsx)(R,{variant:a.variant,color:null==a?void 0:a.color,children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:g||""}})})]})]})}},65429:function(n,e,i){i.d(e,{Z:function(){return m}});var t=i(52322),o=i(96108),l=i(82454),r=i(67862),d=i(92603),a=i(12153);function u(){let n=(0,r._)(["\n margin: 0 ",";\n "]);return u=function(){return n},n}function s(){let n=(0,r._)(["\n margin: 0 ",";\n\n ","\n\n display: flex;\n flex-direction: column;\n height: inherit;\n justify-content: space-between;\n text-align: center;\n"]);return s=function(){return n},n}function c(){let n=(0,r._)(["\n margin-top: ",";\n font-size: ",";\n line-height: ",";\n "]);return c=function(){return n},n}function v(){let n=(0,r._)(["\n font-size: ",";\n line-height: ",";\n "]);return v=function(){return n},n}function p(){let n=(0,r._)(["\n margin-top: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n text-align: center;\n\n ","\n\n ","\n"]);return p=function(){return n},n}let f=d.Z.div(s(),a.r.spacing.lg,a.B.tablet(u(),a.r.spacing["2xl"])),g=d.Z.div(p(),a.r.spacing.xl,a.r.typography.fontWeight.extrabold,a.r.typography.fontSize.h3,a.r.typography.lineHeight.h3,a.B.tablet(c(),a.r.spacing["3xl"],a.r.typography.fontSize.h1,a.r.typography.lineHeight.h1),a.B.desktop(v(),a.r.typography.fontSize.h2,a.r.typography.lineHeight.h2));var m=n=>{let{title:e,description:i}=n;return(0,t.jsxs)(f,{children:[(0,t.jsx)(g,{children:e}),(0,t.jsx)(o.Z,{text:i,fontFamily:l.R.regular,sizeMobile:20,size:20,lineHeightMobile:26,lineHeight:30,textAlign:"center",modal:!0})]})}},36786:function(n,e,i){i.d(e,{Z:function(){return Z}});var t=i(52322),o=i(67862),l=i(92603),r=i(95912);function d(){let n=(0,o._)(["\n margin: 0;\n"]);return d=function(){return n},n}function a(){let n=(0,o._)(["\n font-size: ",";\n line-height: ",";\n "]);return a=function(){return n},n}function u(){let n=(0,o._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n\n ","\n"]);return u=function(){return n},n}function s(){let n=(0,o._)(["\n margin-top: ",";\n margin-bottom: ",";\n "]);return s=function(){return n},n}function c(){let n=(0,o._)(["\n margin-top: ",";\n margin-bottom: ",";\n "]);return c=function(){return n},n}function v(){let n=(0,o._)(["\n margin-top: ",";\n margin-bottom: ",";\n padding: 0;\n\n li {\n list-style: none;\n }\n\n ","\n\n ","\n"]);return v=function(){return n},n}function p(){let n=(0,o._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return p=function(){return n},n}function f(){let n=(0,o._)(["\n margin-top: ",";\n margin-bottom: 0;\n "]);return f=function(){return n},n}function g(){let n=(0,o._)(["\n margin-top: ",";\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n\n ","\n\n ","\n"]);return g=function(){return n},n}function m(){let n=(0,o._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: 0;\n "]);return m=function(){return n},n}function h(){let n=(0,o._)(["\n margin-top: ",";\n "]);return h=function(){return n},n}function y(){let n=(0,o._)(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n margin-top: ",";\n\n ","\n\n ","\n"]);return y=function(){return n},n}function b(){let n=(0,o._)(["\n padding-top: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,o._)(["\n ","\n"]);return C=function(){return n},n}function E(){let n=(0,o._)(["\n margin-top: ",";\n margin-bottom: ",";\n "]);return E=function(){return n},n}function S(){let n=(0,o._)(["\n font-size: ",";\n line-height: ","; \n margin-top: ","; \n margin-bottom: ",";\n "]);return S=function(){return n},n}function x(){let n=(0,o._)(["\n\n text-align: start; \n margin-top: ",";\n margin-bottom: ","; \n font-family: ","; \n font-size: ","; \n line-height: ",";\n font-weight: ",";\n \n ","\n ","\n"]);return x=function(){return n},n}function I(){let n=(0,o._)(["\n margin-top: ",";\n flex-direction: row;\n gap: ",";\n\n div {\n width: 100%;\n max-width: ",";\n }\n "]);return I=function(){return n},n}function A(){let n=(0,o._)(["\n div {\n width: 100%;\n max-width: ",";\n }\n "]);return A=function(){return n},n}function _(){let n=(0,o._)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n justify-content: center;\n\n div {\n width: 100%;\n max-width: inherit;\n }\n\n ","\n\n ","\n"]);return _=function(){return n},n}let T=l.Z.p(d()),N=(0,l.Z)(T)(u(),r.rS.typography.fontFamily.primary,r.rS.typography.fontWeight.extrabold,r.rS.typography.fontSize.h3,r.r
1S.typography.lineHeight.h3,r.rS.colors.text.primary,r.BC.desktop(a(),r.rS.typography.fontSize.h2,r.rS.typography.lineHeight.h2)),L=l.Z.ul(v(),r.rS.spacing.xl,r.rS.spacing.xl,r.BC.tablet(s(),r.rS.spacing.lg,r.rS.spacing["2xl"]),r.BC.desktop(c(),r.rS.spacing.xl,r.rS.spacing["2xl"])),O=(0,l.Z)(T)(g(),r.rS.spacing.md,r.rS.typography.fontFamily.primary,r.rS.typography.fontWeight.regular,r.rS.typography.fontSize.body1,r.rS.typography.lineHeight.body1,r.rS.colors.text.primary,r.BC.tablet(p(),r.rS.typography.fontSize.body1,r.rS.typography.lineHeight.body1,r.rS.spacing.xl),r.BC.desktop(f(),r.rS.spacing.sm)),R=(0,l.Z)(O)(y(),r.rS.typography.fontWeight.bold,r.rS.typography.fontSize.body1,r.rS.typography.lineHeight.body1,r.rS.colors.text.primary,r.rS.spacing.md,r.BC.tablet(m(),r.rS.typography.fontSize.body1,r.rS.typography.lineHeight.body1),r.BC.desktop(h(),r.rS.spacing.xl)),D=l.Z.div(C(),r.BC.desktop(b(),r.rS.spacing.md)),M=l.Z.div(x(),r.rS.spacing.md,r.rS.spacing.xl,r.rS.typography.fontFamily.primary,r.rS.typography.fontSize.body2,r.rS.typography.lineHeight.body2,r.rS.typography.fontWeight.light,r.BC.desktop(E(),r.rS.spacing.xl,r.rS.spacing["2xl"]),r.BC.tablet(S(),r.rS.typography.fontSize.body2,r.rS.typography.lineHeight.body2,r.rS.spacing.lg,r.rS.spacing.xl)),P=l.Z.div(_(),r.rS.spacing.md,r.BC.tablet(I(),r.rS.spacing["2xl"],r.rS.spacing.xl,(0,r.Q1)(258)),r.BC.desktop(A(),(0,r.Q1)(296)));var w=n=>{let{offers:e}=n;return(0,t.jsx)(L,{children:e.map(n=>(0,t.jsxs)("li",{children:[(0,t.jsx)(R,{children:n.subtitle}),(0,t.jsx)(O,{children:n.paragraph})]},n.key))})},k=i(95125),j=i(90401);let B=n=>{let{itemList:e,accordions:i,button:t}=n;return{offers:e.map((n,e)=>
1({key:"offer-".concat(e),subtitle:n.subtitle,paragraph:n.paragraph})),accordionItems:i.map((n,e)=>{let[i]=(0,j.q)([n.text||""]);return{key:"accordion-".concat(e),title:n.title||"",text:i||""}}),actionButton:t?{isApp:(0,k.k)(),label:t.label,onClick:t.onClick}:void 0}};var F=i(65753),z=i(83144),Z=n=>{let{title:e,itemList:i,accordions:o,button:l}=n,{offers:r,accordionItems:d,actionButton:a}=B({itemList:i,accordions:o,button:l});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{children:e}),(0,t.jsx)(w,{offers:r}),(0,t.jsx)(t.Fragment,{children:d.map(n=>(0,t.jsx)(F.Z,{title:n.title,content:[(0,t.jsx)(M,{dangerouslySetInnerHTML:{__html:n.text}},n.key)],iconColor:"#e60000"},n.key))}),(0,t.jsx)(D,{}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(P,{children:(0,t.jsx)(z.Z,{isApp:a.isApp,onClick:a.onClick,label:a.label,name:"action_modal_accordion"})})})]})}},21880:function(n,e,i){i.d(e,{Z:function(){return z}});var t=i(52322),o=i(27864),l=i(78908);let r=o.ZP.div.withConfig({componentId:"sc-ef2f79c3-0"})(["border:1px solid #d8d8d8;margin:0 auto;border-radius:5px;height:162px;padding:16px;padding-bottom:20px;color:",";text-align:left;@media (min-width:","){padding:24px;padding-top:20px;height:192px;}"],l.O9.$262626,l.AV.tablet),d=o.ZP.div.withConfig({componentId:"sc-ef2f79c3-1"})(["font-family:",";font-weight:400;"," margin-bottom:16px;@media (min-width:","){"," margin-bottom:24px;}"],l.Rq.exbold,(0,l.Ln)(20,26),l.AV.tablet,(0,l.Ln)(24,30)),a=o.ZP.div.withConfig({componentId:"sc-ef2f79c3-2"})(["font-family:",";font-weight:400;"," margin-bottom:16px;@media (min-width:","){","}p{margin:0 auto;}"],l.Rq.regular,(0,l.Ln)(18,24),l.AV.tablet,(0,l.Ln)(20,30)),u=o.ZP.div.withConfig({componentId:"sc-ef2f79c3-3"})(["display:flex;align-items:center;font-family:",";font-weight:400;"," svg{margin-right:8px;height:16px;width:24px;}"],l.Rq.regular,(0,l.Ln)(14,18));var s=n=>{let{title:e,cardNumber:i,cardOwner:o,icon:l,expirationLabel:s}=n;return(0,t.jsxs)(r,{children:[e&&(0,t.jsx)(d,{children:e}),(0,t.jsxs)(a,{"data-cs-mask":"",children:[i||"",(0,t.jsx)("p",{children:o||""})]}),(0,t.jsxs)(u,{"data-cs-mask":"",children:[l&&l,s||""]})]})},c=i(71804),v=i(11946),p=i(2784),f=i(90401),g=i(71581),m=i(67862),h=i(92603),y=i(70095);function b(){let n=(0,m._)(["\n margin: 60px 40px;\n width: auto;\n "]);return b=function(){return n},n}function C(){let n=(0,m._)(["\n margin: 60px 55px;\n "]);return C=function(){return n},n}function E(){let n=(0,m._)(["\n color: ",";\n width: fit-content;\n margin: "," "," 0;\n\n ","\n\n ","\n"]);return E=function(){return n},n}function S(){let n=(0,m._)(["\n font-size: ",";\n line-height: 52px;\n "]);return S=function(){return n},n}function x(){let n=(0,m._)(["\n font-size: ",";\n line-height: 45px;\n "]);return x=function(){return n},n}function I(){let n=(0,m._)(["\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: 38px;\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return I=function(){return n},n}function A(){let n=(0,m._)(["\n div {\n font-size: ",";\n line-height: 30px;\n margin-bottom: 35px;\n }\n "]);return A=function(){return n},n}function _(){let n=(0,m._)(["\n div {\n margin-bottom: 40px;\n }\n "]);return _=function(){return n},n}function T(){let n=(0,m._)(["\n div {\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: 26px;\n margin-bottom: 30px;\n }\n\n ","\n\n ","\n"]);return T=function(){return n},n}function N(){let n=(0,m._)(["\n display: flex;\n margin-top: ",";\n"]);return N=function(){return n},n}function L(){let n=(0,m._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return L=function(){return n},n}function O(){let n=(0,m._)(["\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(#eee, #eee), linear-gradient(#eee, #eee);\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n border-radius: 5px;\n\n :first-child {\n margin-top: 60px;\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 162px;\n margin-bottom: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return O=function(){return n},n}let R=h.Z.div(E(),y.v.colors.text.primary,y.v.spacing.xl,y.v.spacing.lg,y.B.tablet(b()),y.B.desktop(C())),D=h.Z.div(I(),y.v.typography.fontFamily.primary,y.v.typography.fontWeight.extrabold,y.v.typography.fontSize.display5,y.v.spacing.md,y.B.tablet(S(),y.v.typography.fontSize.h1),y.B.desktop(x(),y.v.typography.fontSize.display4)),M=h.Z.div(T(),y.v.typography.fontFamily.primary,y.v.typography.fontWeight.regular,y.v.typography.fontSize.h6,y.B.tablet(A(),y.v.typography.fontSize.h6),y.B.desktop(_())),P=h.Z.div(N(),y.v.spacing.lg),w=h.Z.div(O(),y.v.colors.bg.primary,y.v.spacing.md,y.v.spacing.md,y.B.tablet(L()));var k=(0,p.memo)(n=>(0,t.jsxs)("svg",{width:"48",height:"32",viewBox:"0 0 48 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M44 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H44C46.2091 32 48 30.2091 48 28V4C48 1.79086 46.2091 0 44 0Z",fill:"#F2F0EC"}),(0,t.jsx)("path",{d:"M29.1104 7.65991H18.9004V24.3399H29.1104V7.65991Z",fill:"#F26122"}),(0,t.jsx)("path",{d:"M20.0007 16.0001C19.9839 12.7536 21.4584 9.67911 24.0007 7.66006C19.651 4.23935 13.4027 4.73608 9.64802 8.80106C5.89337 12.866 5.89337 19.1341 9.64802 23.1991C13.4027 27.264 19.651 27.7608 24.0007 24.3401C21.4584 22.321 19.9839 19.2465 20.0007 16.0001Z",fill:"#EA1D25"}),(0,t.jsx)("path",{d:"M40.1395 22.5699V22.2299H40.2895V22.1599H39.9395V22.2299H40.0795V22.5699H40.1395ZM40.8195 22.5699V22.1599H40.7195L40.5995 22.4499L40.4695 22.1599H40.3695V22.5699H40.4395V22.2599L40.5595 22.5299H40.6395L40.7495 22.2599V22.5699H40.8195Z",fill:"#F69E1E"}),(0,t.jsx)("path",{d:"M41.16 16C41.1574 20.0593 38.8389 23.7614 35.1879 25.5358C31.5369 27.3102 27.1935 26.846 24 24.34C28.6001 20.7179 29.3967 14.0543 25.78 9.44999C25.2616 8.78326 24.6638 8.18216 24 7.65999C27.1935 5.15398 31.5369 4.68973 35.1879 6.46416C38.8389 8.23859 41.1574 11.9406 41.16 16Z",fill:"#F69E1E"})]})),j=(0,p.memo)(n=>(0,t.jsxs)("svg",{width:"48",height:"32",viewBox:"0 0 48 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M44 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H44C46.2091 32 48 30.2091 48 28V4C48 1.79086 46.2091 0 44 0Z",fill:"#2A2A6C"}),(0,t.jsx)("path",{d:"M23.8602 11.39L21.8602 20.64H19.4602L21.4602 11.39H23.8602ZM33.9202 17.39L35.1802 13.92L35.9102 17.39H33.9202ZM36.5902 20.67H38.8102L36.8702 11.42H34.8702C34.4301 11.424 34.0357 11.6922 33.8702 12.1L30.2802 20.67H32.8002L33.2902 19.29H36.3002L36.5902 20.67ZM30.3502 17.67C30.3602 15.18 27.0002 15 27.0002 14C27.0002 13.67 27.3202 13.32 28.0002 13.23C28.8095 13.1499 29.6253 13.2916 30.3602 13.64L30.7802 11.64C30.0638 11.3713 29.3053 11.2325 28.5402 11.23C26.1802 11.23 24.5402 12.49 24.5402 14.29C24.5402 15.62 25.7302 16.36 26.6302 16.8C27.5302 17.24 27.8802 17.55 27.8702 17.95C27.8702 18.57 27.1302 18.85 26.4402 18.86C25.589 18.8709 24.7492 18.6644 24.0002 18.26L23.5702 20.26C24.4176 20.5908 25.3204 20.7571 26.2302 20.75C28.7402 20.75 30.3902 19.51 30.4002 17.59L30.3502 17.67ZM20.4902 11.36L16.6102 20.61H14.0002L12.0902 13.22C12.0566 12.8682 11.8399 12.5603 11.5202 12.41C10.7694 12.0518 9.97649 11.7897 9.16016 11.63L9.22016 11.36H13.2902C13.841 11.3577 14.3116 11.7563 14.4002 12.3L15.4002 17.65L17.8902 11.36H20.4902Z",fill:"white"})]})),B=(0,p.memo)(n=>(0,t.jsxs)("svg",{width:"48",height:"32",viewBox:"0 0 48 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M44 -0.000244141H4C1.79086 -0.000244141 0 1.79062 0 3.99976V27.9998C0 30.2089 1.79086 31.9998 4 31.9998H44C46.2091 31.9998 48 30.2089 48 27.9998V3.99976C48 1.79062 46.2091 -0.000244141 44 -0.000244141Z",fill:"white"}),(0,t.jsx)("path",{d:"M8.88 17.8999V26.0599H17.14L18 24.8399L18.84 26.0599H23.89V24.2199H24.45C24.9584 24.2243 25.4643 24.1501 25.95 23.9999V26.0599H29.38V24.5999L30.54 26.0599H46.16C46.802 26.0711 47.4338 25.8975 47.98 25.5599V28.9999C47.5224 30.7721 45.9203 32.0076 44.09 31.9999H4C1.79086 31.9999 0 30.209 0 27.9999V15.3999H2.28L2.75 14.1799H3.87L4.33 15.3999H22.67V13.9399L23.83 15.3999H28.64V14.6599C29.3453 15.1619 30.1945 15.4216 31.06 15.3999H33.93L34.39 14.1799H35.51L36 15.3999H40.9V13.8199L41.9 15.3999H45.28V7.23985
1H41.69V8.89985L40.62 7.23985H37.48V9.33985L36.48 7.23985H31.14C30.2366 7.21368 29.3524 7.5037 28.64 8.05985V7.23985H11L10.4 8.99985L9.8 7.19985H5.8V9.29985L4.86 7.19985H1.6L0 10.9999V3.99985C0 1.79071 1.79086 -0.00031901 4 -0.00031901H44.09C45.9278 -0.0171336 47.5406 1.22036 48 2.99985V17.8999H18.86L18 19.0999L17.16 17.8999H8.88Z",fill:"#296DB6"}),(0,t.jsx)("path",{d:"M14.7097 20.3599V19.1599H10.1797V24.7999H14.7097V23.5999H11.5397V22.5999H14.6497V21.3799H11.5397V20.3799L14.7097 20.3599ZM18.7997 21.9999L21.0597 19.1999H19.3997L17.9997 20.9399L16.6097 19.1599H14.9097L17.1997 21.9999L14.9997 24.7999H16.6397L17.9997 22.9999L19.3597 24.8199H21.0797L18.7997 21.9999ZM24.4297 19.1999H21.3197V24.7999H22.6897V22.9399H24.3897C24.9138 22.9797 25.4302 22.7958 25.8113 22.4337C26.1924 22.0717 26.4025 21.5654 26.3897 21.0399C26.4116 20.5207 26.2093 20.0171 25.8342 19.6573C25.4592 19.2976 24.9476 19.1164 24.4297 19.1599V19.1999ZM24.3097 21.7799H22.6897V20.3599H24.3097C24.6908 20.3599 24.9997 20.6689 24.9997 21.0499C24.9997 21.431 24.6908 21.7399 24.3097 21.7399V21.7799ZM30.5997 22.7799C31.5828 22.664 32.2857 21.773 32.1697 20.7899C32.0537 19.8069 31.1628 19.104 30.1797 19.2199H27.1197V24.7999H28.4797V22.7999H29.0997L30.7797 24.7999H32.4897L30.5997 22.7799ZM30.0597 21.6599H28.4797V20.3599H30.0597C30.2375 20.3368 30.4166 20.3917 30.5508 20.5106C30.685 20.6295 30.7612 20.8006 30.7597 20.9799C30.7646 21.1603 30.6895 21.3336 30.5544 21.4533C30.4193 21.5729 30.2382 21.6266 30.0597 21.5999V21.6599ZM37.3597 20.4199V19.2199H32.8097V24.7999H37.3597V23.5999H34.1897V22.5999H37.2797V21.3799H34.1897V20.3799L37.3597 20.4199ZM41.1297 21.4199H39.8197C39.6172 21.4606 39.4102 21.3752 39.2953 21.2036C39.1805 21.0319 39.1805 20.8079 39.2953 20.6363C39.4102 20.4647 39.6172 20.3792 39.8197 20.4199H42.2497L42.7897 19.2199H39.8597C39.3612 19.1622 38.862 19.3225 38.4903 19.6597C38.1186 19.9969 37.9106 20.4782 37.9197 20.9799C37.8893 21.4468 38.0688 21.903 38.4091 22.224C38.7495 22.5451 39.2154 22.6975 39.6797 22.6399H40.9997C41.2022 22.5992 41.4092 22.6847 41.524 22.8563C41.6389 23.028 41.6389 23.2519 41.524 23.4236C41.4092 23.5952 41.2022 23.6806 40.9997 23.6399H38.0797V24.8399H40.9997C41.5036 24.8811 42.0008 24.7024 42.3631 24.3497C42.7253 23.997 42.9174 23.5048 42.8897 22.9999C42.915 22.5377 42.7323 22.0884 42.3917 21.7749C42.0511 21.4614 41.5882 21.3165 41.1297 21.3799V21.4199ZM45.0297 20.4199H47.4597L47.9997 19.1999H45.0697C44.5712 19.1422 44.072 19.3025 43.7003 19.6397C43.3286 19.9769 43.1206 20.4582 43.1297 20.9599C43.0993 21.4268 43.2788 21.883 43.6191 22.204C43.9595 22.525 44.4254 22.6775 44.8897 22.6199H46.1797C46.3822 22.5792 46.5892 22.6647 46.704 22.8363C46.8189 23.0079 46.8189 23.2319 46.704 23.4036C46.5892 23.5752 46.3822 23.6606 46.1797 23.6199H43.2897V24.8199H46.1597C46.9663 24.9002 47.7243 24.4223 47.9997 23.6599V22.3199C47.7114 21.6871 47.0514 21.3088 46.3597 21.3799H44.9997C44.7972 21.4206 44.5902 21.3352 44.4753 21.1636C44.3605 20.9919 44.3605 20.768 44.4753 20.5963C44.5902 20.4247 44.7972 20.3392 44.9997 20.3799L45.0297 20.4199Z",fill:"#296DB6"}),(0,t.jsx)("path",{d:"M4.23 8.4999H2.45L0 14.1399H1.48L2 12.9999H4.63L5.11 14.1799H6.65L4.23 8.4999ZM2.38 11.8599L2.93 10.5399L3.29 9.6599L3.65 10.5399L4.19 11.8599H2.38ZM11.7 8.4999L10.6 11.7599L10.42 12.3799L10.24 11.7599L9.12 8.4999H6.91V14.1399H8.24V10.4399V9.5799L8.52 10.4399L9.8 14.1399H11L12.31 10.4399L12.57 9.5799V10.4399V14.1399H13.89V8.4999H11.7ZM19.5 9.6999V8.4999H15V14.1399H19.5V12.9399H16.33V11.9399H19.42V10.7199H16.33V9.7199L19.5 9.6999ZM23.91 12.0599C24.8053 11.952 25.4719 11.1814 25.45 10.2799C25.4573 9.76603 25.2408 9.27436 24.8569 8.93269C24.473 8.59102 23.9596 8.43307 23.45 8.4999H20.4V14.1399H21.79V12.1399H22.41L24.09 14.1399H25.79L23.91 12.0599ZM23.37 10.9399H21.79V9.6999H23.37C23.5471 9.68009 23.7243 9.73623 23.8577 9.85439C23.9912 9.97255 24.0683 10.1417 24.07 10.3199C24.0749 10.5003 23.9998 10.6736 23.8647 10.7933C23.7296 10.9129 23.5485 10.9666 23.37 10.9399ZM26.11 8.4999V14.1399H27.48V8.4999H26.11ZM31.11 9.7199H32.58V8.4999H31C30.2562 8.45289 29.5291 8.73361 29.0099 9.26822C28.4907 9.80283 28.2313 10.5378 28.3 11.2799V11.3599C28.2164 12.0914 28.4596 12.8225 28.9645 13.3583C29.4694 13.894 30.1849 14.18 30.92 14.1399H31L31.55 12.9399H31.1C30.685 12.9612 30.2819 12.7971 29.9999 12.4919C29.7179 12.1867 29.586 11.7719 29.64 11.3599V11.2799C29.5925 10.8711 29.7272 10.462 30.0085 10.1615C30.2897 9.86104 30.6889 9.69951 31.1 9.7199H31.11ZM35.89 8.4999H34.09L31.67 14.1399H33.13L33.61 12.9999H36.28L36.76 14.1799H38.3L35.89 8.4999ZM34.05 11.8599L34.57 10.5399L34.93 9.6599L35.27 10.5399L35.81 11.8599H34.05ZM42.61 8.4999V11.4999V12.1799L42.23 11.5399L40.23 8.5399H38.56V14.1799H39.9V10.9999V10.3399L40.26 10.9599L42.35 14.1399H44V8.4999H42.61Z",fill:"#296DB6"})]})),F=(0,p.memo)(n=>(0,t.jsxs)("svg",{width:"48",height:"32",viewBox:"0 0 48 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M44 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H44C46.2091 32 48 30.2091 48 28V4C48 1.79086 46.2091 0 44 0Z",fill:"white"}),(0,t.jsx)("path",{d:"M44 2C45.1046 2 46 2.89543 46 4V28C46 29.1046 45.1046 30 44 30H4C2.89543 30 2 29.1046 2 28V4C2 2.89543 2.89543 2 4 2H44ZM44 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H44C46.2091 32 48 30.2091 48 28V4C48 1.79086 46.2091 0 44 0Z",fill:"#CCCCCB"}),(0,t.jsx)("path",{d:"M20.3385 25.3202L20.6885 23.1202H19.9085H16.2285L18.7885 6.86018C18.7953 6.8098 18.8202 6.76361 18.8585 6.73018C18.8987 6.69911 18.9477 6.6816 18.9985 6.68018H25.2085C27.2785 6.68018 28.6985 7.11018 29.4485 7.96018C29.7804 8.3167 30.0116 8.75498 30.1185 9.23018C30.2351 9.80768 30.2351 10.4027 30.1185 10.9802V11.4802L30.4685 11.6802C30.735 11.813 30.9754 11.9925 31.1785 12.2102C31.4842 12.5792 31.6815 13.0257 31.7485 13.5002C31.8234 14.1204 31.7964 14.7487 31.6685 15.3602C31.5366 16.
1103 31.2761 16.817 30.8985 17.4702C30.5934 17.9938 30.1811 18.4471 29.6885 18.8002C29.1928 19.1382 28.6408 19.3854 28.0585 19.5302C27.4048 19.6951 26.7327 19.7757 26.0585 19.7702H25.5685C25.2251 19.7702 24.8925 19.8905 24.6285 20.1102C24.3631 20.3338 24.1888 20.6468 24.1385 20.9902V21.1902L23.5285 25.0702V25.2202C23.5358 25.2463 23.5358 25.274 23.5285 25.3002H23.4685L20.3385 25.3202Z",fill:"#253D80"}),(0,t.jsx)("path",{d:"M30.8002 11.0801L30.7402 11.4501C29.9202 15.6501 27.1102 17.1101 23.5302 17.1101H21.7102C21.2724 17.1095 20.8991 17.4276 20.8302 17.8601L19.9002 23.7801L19.6302 25.4601C19.61 25.5946 19.649 25.7313 19.7372 25.8349C19.8254 25.9384 19.9542 25.9987 20.0902 26.0001H23.3302C23.7144 25.9997 24.0411 25.7197 24.1002 25.3401V25.1801L24.7102 21.3101V21.1001C24.7648 20.722 25.0883 20.4411 25.4702 20.4401H26.0002C29.1302 20.4401 31.5902 19.1701 32.3002 15.4401C32.6844 14.1652 32.4474 12.784 31.6602 11.7101C31.4105 11.4539 31.1198 11.241 30.8002 11.0801Z",fill:"#189BD7"}),(0,t.jsx)("path",{d:"M29.9384 10.7398L29.5584 10.6398L29.1384 10.5598C28.6089 10.4807 28.0738 10.4439 27.5384 10.4498H22.6584C22.5444 10.4467 22.4313 10.4707 22.3284 10.5198C22.0966 10.6284 21.9349 10.8464 21.8984 11.0998L20.8984 17.6698V17.8598C20.9673 17.4274 21.3405 17.1093 21.7784 17.1098H23.5984C27.1784 17.1098 29.9884 15.6498 30.8084 11.4498L30.8684 11.0798C30.653 10.9685 30.429 10.8749 30.1984 10.7998L29.9384 10.7398Z",fill:"#242E65"}),(0,t.jsx)("path",{d:"M21.8994 11.1C21.9359 10.8466 22.0975 10.6286 22.3294 10.52C22.4323 10.4709 22.5454 10.4469 22.6594 10.45H27.5394C28.0748 10.444 28.6098 10.4808 29.1394 10.56L29.5594 10.64L29.9394 10.74L30.1294 10.8C30.3599 10.8751 30.584 10.9687 30.7994 11.08C31.1245 9.83063 30.8265 8.50118 29.9994 7.51C28.9994 6.45 27.3594 6 25.2194 6H18.9994C18.5615 5.99947 18.1883 6.31756 18.1194 6.75L15.5294 23.16C15.5062 23.3148 15.5513 23.472 15.653 23.5909C15.7547 23.7098 15.9029 23.7788 16.0594 23.78H19.8994L20.8994 17.67L21.8994 11.1Z",fill:"#253D80"})]})),z=n=>{let{owningIndividual:e,handleChangePayment:i,config:o,payMean:l,showLoader:r,disableNewPaymentMethod:d}=n,{title:a,subtitle:u,buttonLabel:m,yourIbanTitle:h,yourCreditCardTitle:y,yourDebitCardTitle:b,yourPrepaidCardTitle:C,yourPaypalTitle:E,expirationLabelTitle:S}=o,[x]=(0,f.q)([u||""]),[I,A]=(0,p.useState)(null),_=n=>{var e,i,t,o,l,r,d;switch(null==n?void 0:null===(e=n.type)||void 0===e?void 0:e.toLowerCase()){case null===(i=g.Q.BANK_ACCOUNT)||void 0===i?void 0:i.toLowerCase():return h;case null===(t=g.Q.CREDIT_CARD)||void 0===t?void 0:t.toLowerCase():return y;case null===(o=g.Q.DEBIT_CARD)||void 0===o?void 0:o.toLowerCase():return b;case null===(l=g.Q.PREPAID_CARD)||void 0===l?void 0:l.toLowerCase():return C;case null===(r=g.Q.PAYPAL)||void 0===r?void 0:r.toLowerCase():return E;case null===(d=g.Q.WALLET)||void 0===d?void 0:d.toLowerCase():default:return""}};return(0,p.useEffect)(()=>{if(l){var n,i,t,o;let r=(null==l?void 0:null===(n=l.type)||void 0===n?void 0:n.toLowerCase())===(null===g.Q||void 0===g.Q?void 0:g.Q.CREDIT_CARD.toLowerCase())||(null==l?void 0:null===(i=l.type)||void 0===i?void 0:i.toLowerCase())===(null===g.Q||void 0===g.Q?void 0:g.Q.DEBIT_CARD.toLowerCase())||(null==l?void 0:null===(t=l.type)||void 0===t?void 0:t.toLowerCase())===(null===g.Q||void 0===g.Q?void 0:g.Q.PREPAID_CARD.toLowerCase());localStorage.setItem(v.aY,null==l?void 0:l.type);let d=(null==l?void 0:null===(o=l.expiryMonth)||void 0===o?void 0:o.length)===1?"0".concat(null==l?void 0:l.expiryMonth):l.expiryMonth,a="";r?a="****".concat((null==l?void 0:l.lastFourDigits)||""):(null==l?void 0:l.ibanNumber)&&(a="****".concat((null==l?void 0:l.ibanNumber)||"")),A({cardNumber:a,circuit:r&&(null==l?void 0:l.displayBrand)||"",cardOwner:"".concat((null==e?void 0:e.firstName)||""," ").concat((null==e?void 0:e.lastName)||""),title:_(l)||"",expirationLabel:r?(null==S?void 0:S.replace("$expirationDate","".concat(d,"/").concat(null==l?void 0:l.expiryYear)))||"Valida fino al ".concat(d,"/").concat(null==l?void 0:l.expiryYear):""})}},[l]),(0,t.jsx)(R,{children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D,{children:a}),(0,t.jsx)(M,{children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:x||""}})}),r&&(0,t.jsx)(w,{}),!r&&(null==I?void 0:I.cardOwner)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s,{...I,icon:(()=>
1{if(!l)return(0,t.jsx)("div",{});let{brand:n}=l||{};if(!n)return(0,t.jsx)("div",{});switch(n.trim().toLowerCase()){case"mastercard":return(0,t.jsx)(k,{});case"visa":return(0,t.jsx)(j,{});case"americanexpress":return(0,t.jsx)(B,{});case"paypal":return(0,t.jsx)(F,{});default:return(0,t.jsx)("div",{})}})()}),m&&i&&!d&&(0,t.jsx)(P,{children:(0,t.jsx)(c.Z,{onClick:i,text:m})})]})]})})}},38919:function(n,e,i){i.d(e,{Z:function(){return O}});var t=i(52322),o=i(71804),l=i(67862),r=i(92603),d=i(20789);function a(){let n=(0,l._)(["\n margin: 59px 40px 0;\n "]);return a=function(){return n},n}function u(){let n=(0,l._)(["\n margin: 60px 55px 0;\n "]);return u=function(){return n},n}function s(){let n=(0,l._)(["\n margin: 35px 20px 37px;\n text-align: left;\n font-weight: ",";\n color: ",";\n font-family: ",";\n\n div {\n justify-content: left;\n }\n\n ","\n\n ","\n"]);return s=function(){return n},n}function c(){let n=(0,l._)(["\n ","\n "]);return c=function(){return n},n}function v(){let n=(0,l._)(["\n ","\n "]);return v=function(){return n},n}function p(){let n=(0,l._)(["\n text-align: center;\n font-family: ",";\n font-weight: ",";\n ","\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return p=function(){return n},n}function f(){let n=(0,l._)(["\n ","\n "]);return f=function(){return n},n}function g(){let n=(0,l._)(["\n margin-bottom: ",";\n "]);return g=function(){return n},n}function m(){let n=(0,l._)(["\n text-align: center;\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return m=function(){return n},n}function h(){let n=(0,l._)(["\n ","\n "]);return h=function(){return n},n}function y(){let n=(0,l._)(["\n display: flex;\n flex-direction: column;\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n div {\n height: ",";\n }\n\n span {\n color: ",";\n }\n"]);return y=function(){return n},n}function b(){let n=(0,l._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n margin-top: ",";\n "]);return b=function(){return n},n}function C(){let n=(0,l._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n margin-top: ",";\n\n ","\n"]);return C=function(){return n},n}function E(){let n=(0,l._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return E=function(){return n},n}function S(){let n=(0,l._)(["\n width: inherit;\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(#eee, #eee), linear-gradient(#eee, #eee);\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: 60px;\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 150px;\n margin-top: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return S=function(){return n},n}function x(){let n=(0,l._)(["\n width: 515px;\n border: 1px solid ",";\n"]);return x=function(){return n},n}let I=r.Z.div(s(),d.rS.typography.fontWeight.regular,d.rS.colors.text.primary,d.rS.typography.fontFamily.primary,d.BC.tablet(a()),d.BC.desktop(u())),A=r.Z.div(p(),d.rS.typography.fontFamily.primary,d.rS.typography.fontWeight.extrabold,(0,d.Ln)(30,38),d.rS.spacing.md,d.BC.tablet(c(),(0,d.Ln)(42,52)),d.BC.desktop(v(),(0,d.Ln)(36,45))),_=r.Z.div(m(),d.rS.typography.fontSize.h6,d.rS.typography.lineHeight.h6,d.rS.spacing.xl,d.BC.tablet(f(),(0,d.Ln)(20,30)),d.BC.desktop(g(),(0,d.Q1)(40))),T=r.Z.div(y(),d.rS.typography.fontWeight.bold,d.rS.typography.fontSize.body1,d.rS.typography.lineHeight.body1,d.BC.tablet(h(),(0,d.Ln)(20,30)),(0,d.Q1)(24),d.DH.cyanDark),N=r.Z.div(C(),d.rS.typography.fontFamily.primary,d.rS.typography.fontWeight.extrabold,d.rS.typography.fontSize.h6,d.rS.typography.lineHeight.h6,d.rS.spacing.md,d.rS.spacing.xl,d.BC.tablet(b(),d.rS.typography.fontSize.h5,d.rS.typography.lineHeight.h5,(0,d.Q1)(12),(0,d.Q1)(40))),L=r.Z.div(S(),d.rS.colors.bg.primary,d.rS.spacing.md,d.rS.spacing.xl,d.BC.tablet(E()));r.Z.div(x(),d.rS.colors.border.default);var O=n=>{let{data:e,isLoading:i,cmsConfig:l}=n;return(0,t.jsxs)(I,{children:[i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{className:"skeleton"}),(0,t.jsx)(L,{className:"skeleton"})]}),!i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{children:l.title}),(0,t.jsx)(_,{children:l.description}),(0,t.jsxs)(T,{children:[l.lableName,(0,t.jsxs)("span",{children:[e.owningIndividual.firstName," ",e.owningIndividual.lastName]}),(0,t.jsx)("div",{}),l.lableFiscalCode,(0,t.jsx)("span",{children:e.owningIndividual.fiscalCode})]}),(0,t.jsx)(N,{children:l.bottomText}),l.url&&(0,t.jsx)(o.Z,{onClick:()=>window.open(l.url,"_self"),text:l.action})]})]})}},97042:function(n,e,i){i.d(e,{Dj:function(){return p},N5:function(){return f},im:function(){return v}});var t=i(67862),o=i(92603),l=i(12153);function r(){let n=(0,t._)(["\n margin: 21.5px 40px 40px;\n height: auto;\n "]);return r=function(){return n},n}function d(){let n=(0,t._)(["\n margin: 29.5px 109px 64px;\n "]);return d=function(){return n},n}function a(){let n=(0,t._)(["\n margin: 12px 44px ",";\n height: calc(100% - 66px);\n\n ","\n\n ","\n"]);return a=function(){return n},n}function u(){let n=(0,t._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return u=function(){return n},n}function s(){let n=(0,t._)(["\n width: inherit;\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(",", ","), linear-gradient(",", ",");\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: 60px;\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 58px;\n margin-bottom: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return s=function(){return n},n}function c(){let n=(0,t._)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n min-height: 400px;\n\n svg {\n width: 25px;\n height: 25px;\n margin: 0;\n }\n"]);return c=function(){return n},n}let v=o.Z.div(a(),l.r.spacing.xl,l.B.tablet(r()),l.B.desktop(d())),p=o.Z.div(s(),l.r.colors.bg.primary,l.r.colors.bg.tertiary,l.r.colors.bg.tertiary,l.r.colors.bg.tertiary,l.r.colors.bg.tertiary,l.r.spacing.md,l.r.spacing.md,l.B.tablet(u())),f=o.Z.div(c())},87564:function(n,e,i){i.d(e,{Z:function(){return h}});var t=i(52322),o=i(62658),l=i(49994),r=i(30648),d=i(91464),a=i(42406),u=i(4233),s=i(2784),c=i(26533),v=i(82066),p=i(90722),f=i(66649),g=i(31273),m=i(97042),h=n=>{let{address:e,shippingAddress:i,setShippingAddress:h,postalOffices:y,pickupPoints:b,vodafoneStores:C,onChangePickupPoint:E,isOpen:S,handleClose:x,deliveryOptions:I,userData:A,setInvoice:_,setPickupPoint:T,setBillingAddress:N,billingAddress:L,multipleOptions:O,editAddressStepperModalConfig:R,mapConfig:D,mapConfigEdit:M,editAddressOptionsConfig:P,isLoading:w,manualAddressConfig:k}
1=n,j=(0,v.useQueryClient)(),[B,F]=(0,s.useState)(0),[z,Z]=(0,s.useState)(),[H,V]=(0,s.useState)(),[U,Q]=(0,s.useState)([]),[G,Y]=(0,s.useState)({tablet:"",desktop:""}),{isLoading:W,pickupPoints:J,isSuccess:X,startingSearchAddress:q,setStartingSearchAddress:K}=(0,c.g)(e,z,B,null==H?void 0:H.value),$=(0,s.useMemo)(()=>{let n=y;return(null==H?void 0:H.value)===u.G.PP?n=b:(null==H?void 0:H.value)===u.G.P&&(n=C),(null==H?void 0:H.value)===u.G.PP||(null==H?void 0:H.value)===u.G.P?localStorage.setItem("deliveryCenter","PP"):(null==H?void 0:H.value)===u.G.PO&&localStorage.setItem("deliveryCenter","PO"),X&&J&&J.length>0&&J||n},[null==H?void 0:H.value,X,y,C,b,J]),nn=()=>{F(0),e&&K(e),x()};(0,s.useEffect)(()=>{if(I){var n;Q((null==O?void 0:null===(n=O.filter(n=>null==I?void 0:I.map(n=>n.code).includes(n.type)))||void 0===n?void 0:n.map(n=>({title:n.title,description:n.text,value:n.type})))||[])}},[I]),(0,s.useEffect)(()=>{e&&K(e)},[e]);let ne=()=>{if(2===B&&U.length>1){F(1);return}if(1===B&&(null==H?void 0:H.value)===u.G.S||0===B&&1===U.length||0===B&&(null==I?void 0:I.length)<=1){nn();return}F(n=>n+1)},ni=n=>{var e;(0,p.u)(j,["deliveryAddress","deliveryCreatedAddress","deliveryDetailsIsEditAddress","individual","linkContactAndCustomer"]);let t=n.locationAddress.formattedAddress1.split(" "),o="";t.forEach((n,e)=>{o+=e<t.length-1?"".concat(n," "):""}),h({...i,city:n.locationAddress.city||"",postalCode:n.locationAddress.postalCode||"",stateOrProvince:n.locationAddress.stateOrProvince||"",street:o||"",streetNumber:t.pop()||"",postalOfficeDescription:(null==n?void 0:null===(e=n.locationAddress)||void 0===e?void 0:e.postalOfficeDescription)||"",typePickupPoint:(null==H?void 0:H.value)||""}),E({...n,typePickupPoint:null==H?void 0:H.value}),nn()},nt=()=>0===B&&!(null==U?void 0:U.find(n=>[u.G.PO,u.G.PP].includes(n.value)))||1===B&&(null==H?void 0:H.value)===u.G.S||2===B,no=()=>0===B&&(null==U?void 0:U.find(n=>[u.G.PO,u.G.PP,u.G.P].includes(n.value)));return(0,s.useEffect)(()=>{(null==U?void 0:U.length)>0&&(nt()&&Y({tablet:"608.5px",desktop:"633.5px"}),no()&&Y({tablet:"",desktop:""}))},[U]),(0,t.jsx)(d.Z,{id:"edit-address-modal",showBackCta:0!==B,isOpen:S,onBack:()=>{1===B&&e&&K(e),F(n=>n-1)},handleClose:nn,height:G,children:(0,t.jsxs)(t.Fragment,{children:[w&&(0,t.jsx)(m.N5,{children:(0,t.jsx)(f.Z,{isChild:!0})}),!w&&(nt()?(0,t.jsxs)(m.im,{children:[W&&(0,t.jsx)(m.N5,{children:(0,t.jsx)(f.Z,{})}),!W&&(0,t.jsx)(o.Z,{firstName:null==A?void 0:A.firstName,lastName:null==A?void 0:A.lastName,handleClose:()=>ne(),origin:!0,mode:2===B?g.b.Modify:g.b.Change,modeAction:n=>{var e,i;(0,p.u)(j,["pickupAddress","pickupCreatedAddress"]),Z({city:(null==n?void 0:n.city)||"",displayStateOrProvince:null==n?void 0:n.stateOrProvince,postalCode:(null==n?void 0:n.postalCode)||"",stateOrProvince:(null==n?void 0:n.stateOrProvince)||"",street:(null==n?void 0:n.street)||"",streetNumber:(null==n?void 0:n.streetNumber)||"",latitude:(null==n?void 0:null===(e=n.latitude)||void 0===e?void 0:e.toString())||"",longitude:(null==n?void 0:null===(i=n.longitude)||void 0===i?void 0:i.toString())||""})},lables:2===B?M:void 0,shippingAddress:i,billingAddress:L,setBillingAddress:N,setShippingAddress:h,setInvoice:_,setPickupPoint:T,cmsConfig:R,manualAddressConfig:k})]}):no()?(0,t.jsx)(m.im,{children:(0,t.jsx)(l.Z,{deliveryCenterData:$,onSaveAddress:()=>[],handlerSelectAddress:n=>{V(n),setTimeout(()=>ne(),400)},options:U,hiddenCta:!0,editAddressOptionsConfig:P})}):(0,t.jsx)(r.Z,{storeListData:{deliveryCenterData:$,position:q,addressType:null==H?void 0:H.value,cardItem:{title:(null==H?void 0:H.value)===u.G.PP?D.titlePP:D.titlePO||"Uffici Postali",subTitle:(null==H?void 0:H.value)===u.G.PP?D.subTitlePP:D.subTitlePO||"Ecco i negozi Vodafone vicini al tuo indirizzo di installazione",ctaAddress:{action:()=>{(0,a.dw)(D.ctaModifyLable||"Modifica indirizzo"),ne()},label:D.ctaModifyLable||"Modifica indirizzo"},switchLabelDx:D.switchLabelDx||"Lista",switchLabelSx:D.switchLabelSx||"Mappa",ctaDeliveryPoint:{action:n=>{(0,a.dw)(D.ctaSaveLable||""),ni(n)},label:D.ctaSaveLable||"Seleziona questo punto di ritiro"}},isLoading:W}}))]})})}},30648:function(n,e,i){i.d(e,{Z:function(){return nr}});var t=i(52322),o=i(2784),l=i(6084),r=i(71804),d=i(67862),a=i(92603),u=i(36731);function s(){let n=(0,d._)(["\n position: relative;\n display: inline-block;\n width: 45px;\n height: 24px;\n\n span {\n position: absolute;\n cursor: pointer;\n border-radius: 100px;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n transition: 0.4s;\n\n &::before {\n position: absolute;\n content: '';\n height: 20px;
1\n width: 20px;\n left: 2px;\n bottom: 2px;\n top: 2px;\n background-color: ",";\n transition: 0.4s;\n border-radius: 50%;\n }\n }\n\n input {\n opacity: 0;\n width: 0;\n height: 0;\n\n &:checked + span::before {\n transform: translateX(21px);\n }\n\n &:disabled + span {\n background-color: ",";\n }\n }\n"]);return s=function(){return n},n}let c=a.Z.label(s(),u.r.colors.brand.primary,u.r.colors.bg.primary,u.r.colors.bg.disabled);var v=n=>{let{onSwitch:e,disabled:i,isActive:o}=n;return(0,t.jsxs)(c,{children:[(0,t.jsx)("input",{disabled:i,onChange:e,type:"checkbox",checked:o}),(0,t.jsx)("span",{})]})},p=i(73595),f=i(83144),g=i(42406),m=i(12153);function h(){let n=(0,d._)(["\n margin: 8px 44px 32px;\n "]);return h=function(){return n},n}function y(){let n=(0,d._)(["\n margin: 21px 109px 50px;\n height: 98%;\n "]);return y=function(){return n},n}function b(){let n=(0,d._)(["\n height: 95%;\n display: flex;\n flex-direction: column;\n margin: "," "," ",";\n\n ","\n\n ","\n"]);return b=function(){return n},n}function C(){let n=(0,d._)(["\n margin: 0;\n font-weight: 400;\n color: ",";\n"]);return C=function(){return n},n}function E(){let n=(0,d._)(["\n margin-bottom: ",";\n "]);return E=function(){return n},n}function S(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return S=function(){return n},n}function x(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return x=function(){return n},n}function I(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n "]);return I=function(){return n},n}function A(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: 0;\n "]);return A=function(){return n},n}function _(){let n=(0,d._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return _=function(){return n},n}function T(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n "]);return T=function(){return n},n}function N(){let n=(0,d._)(["\n text-align: left;\n margin-bottom: ",";\n "]);return N=function(){return n},n}function L(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n margin-bottom: ",";\n text-align: center;\n text-transform: capitalize;\n\n ","\n\n ","\n"]);return L=function(){return n},n}function O(){let n=(0,d._)(["\n gap: ",";\n "]);return O=function(){return n},n}function R(){let n=(0,d._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: ",";\n\n ","\n\n .linkWithIcon {\n font-size: ",";\n line-height: ",";\n }\n"]);return R=function(){return n},n}function D(){let n=(0,d._)(["\n display: inline-flex;\n font-family: ",";\n background-color: transparent;\n padding: 0;\n margin: 0;\n border: none;\n border-bottom: 1px solid ",";\n color: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n &:hover {\n cursor: pointer;\n }\n"]);return D=function(){return n},n}function M(){let n=(0,d._)(["\n margin-bottom: 36px;\n "]);return M=function(){return n},n}function P(){let n=(0,d._)(["\n margin-bottom: 40px;\n "]);return P=function(){return n},n}function w(){let n=(0,d._)(["\n display: flex;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n\n ","\n\n ","\n"]);return w=function(){return n},n}function k(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n "]);return k=function(){return n},n}function j(){let n=(0,d._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n color: ",";\n\n ","\n"]);return j=function(){return n},n}function B(){let n=(0,d._)(["\n margin-bottom: ",";\n "]);return B=function(){return n},n}function F(){let n=(0,d._)(["\n flex: 1 1 auto;\n overflow-y: scroll;\n min-height: 30vh;\n margin-bottom: 16px;\n padding-right: 10px;\n width: calc(100% + 10px);\n text-transform: capitalize;\n\n ","\n"]);return F=function(){return n},n}function z(){let n=(0,d._)(["\n min-height: 236px;\n margin: 0 -44px var(--spacing-xl);\n "]);return z=function(){return n},n}function Z(){let n=(0,d._)(["\n min-height: 392px;\n margin: 0 -109px 40px;\n "]);return Z=function(){return n},n}function H(){let n=(0,d._)(["\n flex: 1 1 auto;\n min-height: 0;\n margin: 0 -44px ",";\n\n ","\n\n ","\n"]);return H=function(){return n},n}function V(){let n=(0,d._)(["\n position: sticky;\n display: flex;\n justify-content: space-around;\n bottom: 0;\n margin-top: auto;\n background-color: ",";\n z-index: 1;\n"]);return V=function(){return n},n}function U(){let n=(0,d._)(["\n position: sticky;\n width: 350px;\n "]);return U=function(){return n},n}function Q(){let n=(0,d._)(["\n ","\n"]);return Q=function(){return n},n}let G=a.Z.div(b(),m.r.spacing.sm,m.r.spacing.xl,m.r.spacing.xl,m.B.tablet(h()),m.B.desktop(y())),Y=a.Z.p(C(),m.r.colors.text.primary),W=(0,a.Z)(Y)(x(),m.r.typography.fontFamily.primary,m.r.typography.fontWeight.extrabold,m.r.typography.fontSize.h4,m.r.typography.lineHeight.h4,m.r.spacing.lg,m.B.tablet(E(),m.r.spacing.lg),m.B.desktop(S(),m.r.typography.fontSize.h2,m.r.typography.lineHeight.h2,m.r.spacing.xl)),J=(0,a.Z)(Y)(_(),m.r.typography.fontFamily.secondary,m.r.typography.fontSize.body1,m.r.typography.lineHeight.body1,m.r.spacing.md,m.B.tablet(I(),m.r.typography.fontSize.body1,m.r.typography.lineHeight.body2,m.r.spacing.xl),m.B.desktop(A(),m.r.typography.fontSize.h6,m.r.typography.lineHeight.h6)),X=(0,a.Z)(Y)(L(),m.r.typography.fontFamily.secondary,m.r.typography.fontWeight.bold,m.r.typography.fontSize.body1,m.r.typography.lineHeight.body1,m.r.colors.brand.primary,m.r.spacing.sm,m.B.tablet(T(),m.r.typography.fontSize.h6,m.r.typography.lineHeight.h6),m.B.desktop(N(),m.r.spacing.md)),q=a.Z.div(R(),m.r.spacing.md,m.B.tablet(O(),m.r.spacing.xl),m.r.typography.fontSize.body2,m.r.typography.lineHeight.body2);a.Z.button(D(),m.r.typography.fontFamily.secondary,m.r.colors.border.default,m.r.colors.text.primary,m.r.typography.fontWeight.bold,m.r.typography.fontSize.body2,m.r.typography.lineHeight.body2);let K=a.Z.div(w(),m.B.tablet(M()),m.B.desktop(P())),$=(0,a.Z)(Y)(j(),m.r.typography.fontFamily.secondary,m.r.typography.fontSize.caption,m.r.typography.lineHeight.caption,m.r.colors.text.primary,m.B.tablet(k(),m.r.typography.fontSize.body3,m.r.typography.lineHeight.body3)),nn=a.Z.div(F(),m.B.tablet(B(),m.r.spacing["2xl"])),ne=a.Z.div(H(),m.r.spacing.xl,m.B.tablet(z()),m.B.desktop(Z())),ni=a.Z.div(V(),m.r.colors.text.inverse),nt=a.Z.div(Q(),m.B.tablet(U()));var no=i(97042),nl=i(95125),nr=n=>{var e,i;let{storeListData:d}=n,[a,u]=(0,o.useState)(!0),[s,c]=(0,o.useState)([]),[m,h]=(0,o.useState)(),{deliveryCenterData:y,cardItem:b,addressType:C,position:E,isLoading:S}=d,x="".concat(null==E?void 0:E.street," ").concat(null==E?void 0:E.streetNumber,", ").concat(null==E?void 0:E.
1city).toLowerCase().concat(" ".concat(null==E?void 0:E.stateOrProvince.toUpperCase())),I=(0,o.useCallback)(()=>{for(let n=0;n<s.length;n+=1)s[n].isSelected=!1,s[n].value="";c(s)},[s]),A=n=>{"number"==typeof n&&(I(),s[n].isSelected=!0,s[n].value+=n,c(s),h(n))},_=(n,e)=>{A(e)};return(0,o.useEffect)(()=>{c((null==y?void 0:y.length)>0&&(null==y?void 0:y.map(n=>({...n,title:n.locationAddress.postalOfficeDescription.toLowerCase(),description:"".concat(n.locationAddress.formattedAddress1.toLowerCase(),"</br> ").concat(n.locationAddress.postalCode," - ").concat(n.locationAddress.displayStateOrProvince),detail:"".concat(n.aerialDistance.toPrecision(2),"km")})))||[])},[y]),(0,t.jsxs)(G,{children:[(0,t.jsx)(W,{children:b.title}),(0,t.jsx)(J,{children:b.subTitle}),S&&(0,t.jsx)(no.Dj,{}),!S&&(0,t.jsx)(X,{children:x}),(0,t.jsxs)(q,{children:[(0,t.jsx)(r.Z,{onClick:b.ctaAddress.action,text:b.ctaAddress.label}),(0,t.jsxs)(K,{children:[(0,t.jsx)($,{children:b.switchLabelSx}),(0,t.jsx)(v,{isActive:a,onSwitch:()=>u(n=>!n)}),(0,t.jsx)($,{children:b.switchLabelDx})]})]}),!S&&(a?(0,t.jsx)(nn,{children:(0,t.jsx)(p.Z,{passedValueIndex:m,align:"flex-start",items:s,onChangeItem:(n,e)=>_(n,e)})}):(0,t.jsx)(ne,{children:(0,t.jsx)(l.Z,{position:{lat:(null==E?void 0:null===(e=E.latitude)||void 0===e?void 0:e.toString())||"",lng:(null==E?void 0:null===(i=E.longitude)||void 0===i?void 0:i.toString())||""},items:s,type:C,onSelectItem:n=>{A(n)}})})),S&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(no.Dj,{}),(0,t.jsx)(no.Dj,{}),(0,t.jsx)(no.Dj,{})]}),(0,t.jsx)(ni,{children:(0,t.jsx)(nt,{children:(0,t.jsx)(f.Z,{disabled:!(void 0!==m),isApp:(0,nl.k)(),borderColor:"#262626",hoverColor:"#262626",hoverTextColor:"#fff",clickColor:"#7e7e7e",clickTextColor:"#fff",label:b.ctaDeliveryPoint.label,onClick:()=>{(0,g.dw)(b.ctaDeliveryPoint.label||""),void 0!==m&&b.ctaDeliveryPoint.action(s[m])},name:"action_store_list"})})})]})}},6084:function(n,e,i){i.d(e,{Z:function(){return I}});var t=i(52322),o=i(2784),l=i(1537),r=(0,o.memo)(()=>(0,t.jsxs)("svg",{width:"55",height:"57",viewBox:"0 0 55 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("g",{filter:"url(#filter0_d_6147_76123)",children:(0,t.jsx)("rect",{x:"4",y:"3",width:"46.7778",height:"48.892",rx:"2",fill:"white"})}),(0,t.jsx)("path",{d:"M36.5673 27.4427C36.5673 32.7743 32.4375 37.0583 27.3891 37.0583C22.3407 37.0583 18.2109 32.7743 18.2109 27.4427C18.2109 22.1111 22.3407 17.8271 27.3891 17.8271C32.4375 17.8271 36.5673 22.1111 36.5673 27.4427Z",stroke:"#D1D1D1"}),(0,t.jsx)("ellipse",{cx:"27.3896",cy:"27.442",rx:"6.45211",ry:"6.74373",fill:"#999",stroke:"white"}),(0,t.jsx)("rect",{x:"25.7773",y:"13.9551",width:"3.22605",height:"3.37186",fill:"#D1D1D1"}),(0,t.jsx)("rect",{x:"25.7773",y:"37.5615",width:"3.22605",height:"3.37186",fill:"#D1D1D1"}),(0,t.jsx)("rect",{x:"37.0664",y:"25.7568",width:"3.22605",height:"3.37186",fill:"#D1D1D1"}),(0,t.jsx)("rect",{x:"14.4844",y:"25.7568",width:"3.22605",height:"3.37186",fill:"#D1D1D1"}),(0,t.jsx)("defs",{children:(0,t.jsxs)("filter",{id:"filter0_d_6147_76123",x:"0",y:"0",width:"54.7773",height:"56.8916",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,t.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,t.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,t.jsx)("feOffset",{dy:"1"}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,t.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),(0,t.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_6147_76123"}),(0,t.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_6147_76123",result:"shape"})]})})]})),d=(0,o.memo)(()=>(0,t.jsxs)("svg",{className:"vodafoneStoreIcon",width:"35",height:"35",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("circle",{cx:"17.5",cy:"17.5",r:"17.5",fill:"#e60000"}),(0,t.jsx)("path",{d:"M17.4987 28.2488C23.942 28.2488 29.1654 23.2057 29.1654 16.9847C29.1654 10.7638 23.942 5.7207 17.4987 5.7207C11.0554 5.7207 5.83203 10.7638 5.83203 16.9847C
15.83203 23.2057 11.0554 28.2488 17.4987 28.2488Z",fill:"white"}),(0,t.jsx)("path",{d:"M17.592 23.2645C14.3866 23.2748 11.0511 20.633 11.0371 16.3915C11.0297 13.5868 12.597 10.887 14.6006 9.2816C16.5548 7.71911 19.2317 6.71693 21.66 6.70898C21.9728 6.70898 22.2996 6.73283 22.4997 6.79879C20.3767 7.22398 18.6868 9.13139 18.6942 11.2955C18.6939 11.357 18.6986 11.4183 18.7082 11.4791C22.261 12.3144 23.8735 14.3839 23.8834 17.2474C23.8933 20.1109 21.5522 23.2518 17.592 23.2645Z",fill:"#e60000"})]})),a=(0,o.memo)(()=>(0,t.jsxs)("svg",{className:"posteIcon",width:"46",height:"46",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("circle",{opacity:"0.3",cx:"23",cy:"23",r:"23",fill:"#fecb00"}),(0,t.jsx)("circle",{cx:"23.0013",cy:"22.9994",r:"15.3333",fill:"#fecb00"}),(0,t.jsx)("rect",{x:"7.66797",y:"7.66602",width:"30.6667",height:"30.6667",fill:"url(#pattern0)"}),(0,t.jsxs)("defs",{children:[(0,t.jsx)("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,t.jsx)("use",{href:"#image0_6147_76794",transform:"scale(0.00277778)"})}),(0,t.jsx)("image",{id:"image0_6147_76794",width:"360",height:"360",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFoCAYAAAB65WHVAAAMeGlDQ1BEaXNwbGF5AABIiZVXd1STeRa9X0lCQi8iIEjoTRRpgkgNVVCQDjZCEiAQQvxIULFhGUbRsYsFu46KOOjoCMpYEHWwDYLdsSzqYBkZB3Xshf0jAV129+zZd07ye+f+7ruvfN/JyQP03woVChlpABTKlUxiVBg/PSOTz3kIEpYwgiu8hKJiRWhCQhwA9JxfGQG8vgYCAC67CxUKGf4/MxJLikUAMQ5AtrhYVAgQjQC9XqRglAB7HAC7yUqFEmCXATBh0jMyAfZKACa5an8XAJNstX8EgAmTnCgA2K2Alo5QyOQCercB8EtEuUpA7yMAD7lYKgf0BwEIEuUJxYC+DMCgwsIiMaC/BoBziShXAeg3AvDL/koz91/0s3v1hcLcXl/dFwBAK1xarJAJp/6fo/nfVihT9eRwBKCTx0QnAjABiBsFRbGJAHQAolOePToegBFAvJWK1XMHSF6eKjpFzSctRcWCTACmAOkhFobHArAEyEi5bHScBs/OkUbGADAAyClSZUwyADOAnC8pjkjScDYzRYmaXGRdDiMI1eBnhAygyXVXVZASqtF/kSeJ0ehTeqV5yWkAeABlXyJNHQ1AD6AGFxckxWo4I0rzBKN7OIwqMQWAPUAlSuRRYWp9qiSHiUzU8CsKi3v6pTbnSWNGa/z9yrzkaPV8qFMiYUSSuheqVSIPTenRkRSnx/X0IpaER6h7px5L5ClJGp23CmVYojqW5ilkCRo+bSuRRSUCsAVo7+KSJE0snapkkjXPiM5RKBOS1XXSpfnCkQnqeuiliIMA4eBDBT6yUYR8SFs66zvB19xEQggGuZDAXYP0RKRBCAZyCJGEUvwJOSQo7o0LgxAMJCiBHJ96UfW3O3IgBIMSSFCMAjwEg0LEQgYJVGAggbw3Wyp+BwPpv2UXgg8RiiBDERhI/wveg35BQiFAnAZR9WTk6/cw2RHscHY0O5LtQlvQQXQAHUcH0SF0EO1J+9H+PX184bMestpY91lXWe2smxOlc5g+VY5CO1SaGUqQ/fUsaEfak/ahw+hAOoj2B582pS3gTnvTfnQoHUwH0D60PwSaulVg+sywTwdfPQ0Nj+vBJbn9uSFc576Req56Pr0qEsj/ZT7qWrN75y3ovembX/DV9MUoQmxfJjWfOkA1Uyeos9QRqh586jh1iLpAHaXqv3q7fgeD3N5siZBAjgLIIP23fEJNTgYSFHvUeDzx+Ki+U0qmKAFAUKSYykhz85T8UIVCJuHHyEWDB/E9PTw9gfSMTL765+ulKQgAhOm5L9hcHhAo7+7uPvIFi30P/GQD8Nq/YE6XAD0FcGaZSMWUqDEaAFjgQR8mMMdA2MEZ7vCELwIQggiMRDySkYEJECEPhWAwGdMxG+VYiKVYhXXYhG3YhR+wH/U4ghP4BefRiqu4hXZ04Cm68BofCILgELqEMWFOWBMOhBvhSfgRQUQEEUckEhlEFpFLyAkVMZ2YSywklhPriC1ENfEjcZg4QZwl2oibxD3iCfGCeE9SpA5pQlqRjuQQ0o8MJWPJZHI8mUtOIkvJeeRicg25ldxD1pEnyPPkVbKdfEq+okBpU6aUDeVO+VECKp7KpHIohppJVVCV1FaqlmqgmqnLVDvVSb2j2bQxzafd6QA6mk6hRfQkeia9iF5H76Lr6FP0Zfoe3UV/ZumyLFlurOGsGFY6K5c1mVXOqmTtYB1knWZdZXWwXrPZbFO2E3sYO5qdwc5nT2MvYm9g72U3stvYD9ivOByOOceNE8iJ5wg5Sk45Zy1nD+c45xKng/NWS1vLWstTK1IrU0uuNUerUmu31jGtS1qPtD5wDbgO3OHceK6YO5W7hLud28C9yO3gfuAZ8px4gbxkXj5vNm8Nr5Z3mneb91JbW9tW2197jLZUu0x7jfY+7TPa97Tf6RjpuOoIdMbpqHQW6+zUadS5qfNSV1fXUTdEN1NXqbtYt1r3pO5d3bd6xnqD9WL0xHqz9Kr06vQu6T3T5+o76IfqT9Av1a/UP6B/Ub/TgGvgaCAwEBrMNKgyOGxw3eCVobHhUMN4w0LDRYa7Dc8aPjbiGDkaRRiJjeYZbTM6afTAmDK2MxYYi4znGm83Pm3cYcI2cTKJMck3WWjyg0mLSVc/o37e/VL7TelX1e9ov3ZTytTRNMZUZrrEdL/pNdP3/a36h/aX9F/Qv7b/pf5vzAaYhZhJzCrM9ppdNXtvzjePMC8wX2Zeb37HgrZwtRhjMdlio8Vpi84BJgMCBogGVAzYP+A3S9LS1TLRcprlNssLlq+sBlpFWSms1lqdtOocaDowZGD+wJUDjw18Ym1sHWQttV5pfdz6D34/fihfxl/DP8XvsrG0ibZR2WyxabH5YOtkm2I7x3av7R07np2fXY7dSrsmuy57a/tR9tPta+x/c+A6+DnkOax2aHZ44+jkmOb4rWO942MnM6cYp1KnGqfbzrrOwc6TnLc6X3Fhu/i5FLhscGl1JV19XPNcq1wvupFuvm5Stw1ubYNYg/wHyQdtHXTdXcc91L3Evcb93mDTwXGD5wyuH/xsiP2QzCHLhjQP+ezh4yHz2O5xa6jR0JFD5wxtGPrC09VT5FnlecVL1yvSa5bXIa/n3m7eEu+N3jd8jH1G+Xzr0+TzyXeYL+Nb6/tkmP2wrGHrh133M/FL8Fvkd8af5R/mP8v/iP+74b7DlcP3D/8rwD2gIGB3wOMRTiMkI7aPeBBoGygM3BLYHsQPygraHNQebBMsDN4afD/ELkQcsiPkUahLaH7ontBnYR5hTNjBsDeC4YIZgsZwKjwqvCK8JcIoIiViXcTdSNvI3MiayK4on6hpUY3RrOjY6GXR12OsYkQx1TFdI4eNnDHyVKxObFLsutj7ca5xTFzDKHLUyFErRt0e7TBaPro+HvEx8Svi7yQ4JUxK+HkMe0zCmKoxDxOHJk5PbE4yTpqYtDvpdXJY8pLkWynOKaqUplT91HGp1alv0sLTlqe1pw9Jn5F+PsMiQ5pxKJOTmZq5I/PV2Iixq8Z2jPMZVz7u2nin8VPGn51gMUE24ehE/YnCiQeyWFlpWbuzPgrjhVuFr7Jjstdnd4kEotWip+IQ8UrxE0mgZLnkUU5gzvKcx7mBuStyn+QF51XmdUoF0nXS5/nR+Zvy3xTEF+ws6JalyfYWahVmFR6WG8kL5KeKBhZNKWpTuCnKFe2Thk9aNamLiWV2FBPF44
1sPKU2UCuUFlbPqG9W9kqCSqpK3k1MnH5hiOEU+5cJU16kLpj4qjSz9fho9TTStabrN9NnT780InbFlJjEze2bTLLtZ82Z1lEWV7ZrNm10w+9c5HnOWz/l7btrchnlW88rmPfgm6puacr1ypvz6twHfbppPz5fOb1ngtWDtgs8V4opzCz0WVi78uEi06Nx3Q79b81334pzFLUt8l2xcyl4qX3ptWfCyXcsNl5cuf7Bi1Iq6lfyVFSv/XjVx1dlK78pNq3mrVavb18StObTWfu3StR/X5a27WhVWtXe95foF699sEG+4tDFkY+0mq00LN73fLN18Y0vUlrqtjlsrt7G3lWx7uD11e/P3ft9X77DYsXDHp53yne27Enedqh5WXb3bcveSGrJGVfNkz7g9rT+E/3Co1r12y17TvQv3YZ9q3x8/Zv14bX/s/qYDfgdqf3L4af1B44MVdUTd1Lqu+rz69kMZh9oOjzzc1BDQcPDnwT/vPGJzpOpov6NLjvGOzTvWfbz0+KtGRWPnidwTD5omNt06mX7yyqkxp1pOx54+80vkLyebQ5uPnwk8c+Ts8LOHz/mdqz/ve77ugs+Fg7/6/Hqwxbel7uKwi4da/Vsb2ka0HbsUfOnE5fDLv1yJuXL+6uirbddSrt24Pu56+w3xjcc3ZTef/1by24dbZbdZtyvuGNypvGt5d+s/XP6xt923/ei98HsX7ifdv/VA9ODp78W/f+yY91D3YeUj60fVjz0fH3kS+aT1j7F/dDxVPP3QWf6n4Z/rnzk/++mvkL8udKV3dTxnnne/WPTS/OXOv73/bnqV8Oru68LXH95UvDV/u+ud37vm92nvH32Y/JHzcc0nl08Nn2M/3+4u7O5WCBkhAIACQObkAC92AroZgHErwBur3gUBAIR6fwXU/0H+s6/eFwEAvkAtgEQAgkZgXyPgWAbolgEJAJJDQHp59X40Vpzj5anW0mEA1tvu7pdWAKcB+MR0d3/Y0N39aTtA3QQaJ6l3UABgGwCbwwHg5orxZehj6v30qx77ngDp5eWNvuc/AbYRkFD7FbD5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAE8mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDc2NiwgMjAyMS8wMi8xOS0yMzoxMDowNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKE1hY2ludG9zaCkiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA1LTA2VDE3OjU5OjU0KzAyOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNS0wNlQxODozMDoyNCswMjowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNS0wNlQxODozMDoyNCswMjowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NjEwMmUxZWQtMTk4Mi00OThlLWE4ODAtNGFkNWM3ODQ5MjI1IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjYxMDJlMWVkLTE5ODItNDk4ZS1hODgwLTRhZDVjNzg0OTIyNSIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjYxMDJlMWVkLTE5ODItNDk4ZS1hODgwLTRhZDVjNzg0OTIyNSI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6NjEwMmUxZWQtMTk4Mi00OThlLWE4ODAtNGFkNWM3ODQ5MjI1IiBzdEV2dDp3aGVuPSIyMDIyLTA1LTA2VDE3OjU5OjU0KzAyOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoTWFjaW50b3NoKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4mLzvLAAAYnElEQVR4nO3deZhcVZnH8d+ppdPdCVlIDE2HQAgCCYQlBBAFWUQFQZZRBGbmURyiAqMPDuKCD4sjOjAKjAsyj45sOjqOII/gMAEHRhBJWAKJIBCNIWFLZCCBJCTppLvqnvmju0mHbH1vd9d5z73fz/MU5Akh9Xbdc373rXNu3XLeewEA7CmFLgAAsGUENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYVQldwJY450KXEFq7pFZJVe/9gtDFIL+cc1MldUlaJ2lZ4HKC8t6HLmEzzmRR+Qzokd771aGLAAbKOTdSUu7GssUsZIlj6Ez03qvPI3cDGsXkvV/dd2xLmhi6pryigx4cY7z3r4cuArDCOTdGUlRzwmIW0kFnN65PFxHVQASGmvf+9T4d9rjQ9cSKDjqdsve+HroIIFbOubIkk3PIYhbSQfdPe083YHJgAbHw3td7grA9dC0xoIPeDouvD5AXzPVtM3kddGgWDxSQR33nmqWwtoIljrcgnIEwmHubo4PuweAAwuudh3TT3eigpVbCGbClZ062hq4jtKIH9Djv/brQRQDYXM/cLPQ11IW9isPizw1gy4qaCYXsoC0eCABbV9Q5W6hNwqIeZCAPiriBWJgOmnAG8qFIc7kQAV2kAwoUQVHmdO4DuigHEiiaIsztXAd0EQ4gUGR5n+O5Dei8HzgA3fI813MZ0A/9VuXQNQBonLzO+dx9UMXizwOgMfKWHbnsoAEgD3IV0BbPgAAaJ28ZkJuAztuBAZBNnrIgLwFd6DteAdhMLjIhD5uErdwyFMBbOedaJfU7G0xmocmiUgS0xfoB2BB7lkS9xGHxBQVgR+wZEXVAA0CeRRvQsZ8ZATRGzFkRZUDH/IIDaLxYMyPKgAaAIiCgAcCo6AI61rcqAMKKMTtiC+j20AUAiFpUGRLVB1Us1gogLjHlS0wddC5vyA2g4aLJkmgC2ntfD10DgPjFlCXRBDQAFE0sAZ2LWwcCMCOKTIlik9BijQDiFkPOxNJBA0DhxBDQY0IXACCXzGeL+SUOi/UByAfrWRNDBw0AhURAA4BRBDQAGGU9oCeGLgBArpnOGNObhBZrA5AvlvPGegcNAIVFQAOAUZYDemToAgAUgtmsMbsGbbEuAPlkNXMsd9AAUGgENAAYRUADgFEENAAYRUADgFEENAAYRUADgFEENAAYRUADgFFWA7o9dAEACsVk5lgN6NbQBQAoFJOZYzWgq6ELAFAoJjPH5M2SAAB2O2gAKDwCGgCMIqABwCgCGgCMIqABwCgCGgCMIqABwCgCGgCMIqABwCgCGgCMIqABwCgCGgCMIqABwCgCGgCMIqABwCgCGgCMqoQuIDZzZ5/5qUMvOucH6txBKhXoyw68k8asksavkOolHdL2miYMX6cD2tYs3m3MhoV7j68/09zy7NPV6nOL9jv4kQdClfn03JM/NO0L59+mjtHFOj4x6Sjr6PfO031Xf8KFLsU6AjqlcqnWqbYuuaRTFVesAEh8i+pvTJQkzV20i+Ym0u11N1l1TVaXjteY1WobtU4fmfSfmjxuzbJxO8351f6Tbrpg/4P8+kbVWCrVOrVTl1TrVLVgxycWXV1ltQ/vCl1GFAho9FvJeZV6Q28Li2M1P1wvvz5C174qKVG7tO+58p86V6Pv1MXvemThh2f86crph91ycyNrBmLGGnRaNGVbVXFe1VKialOianOiSnMiNdeljrH6p1kn7XXQVz9901lf+bG/9bZLbw1dKxADAhpDxkmqO
1nWHdkuXyq1V/Xj+Xjr95uNPe/cn7/VXXX/JI889teeug/qknECRIwQ0GqbkvKpNdZWHSQ8ub9UXf3HKobtfcc3zd/zX+deFrg2wiIDOgr3nASlJqpa9qiM6pY636dTrP/L3Z1/2I79gflt76NoASwjo1JyUqPutNI8BP6qlRK5c1k3z9tY+X7pt6Y0/+8Iv0x6RzRj4uXhs45FI8nQ5/cFVHCn5zUYbBqrivDQsUVeT08ybTzn1+aU3dnz182e3ZPm7vFTaeFw4PiY55k5/0UGnxHl/6FSdV3m4dPn/Tm0+6XO3+SfmHnhY9r+NAED86KBT6tubEQGDzzmp0lrXnX+coNd/dNlD300OOeagd8y9P8vfxfFB7OigYVKlpabZS9p1wU8uuu/Jx6ccGLoeDCLOnP1GB50F7XNDVIbV9MCzE3TujVfMv6G0x95Tpz+7sF//I8fHNo5Pv9FBw7RKc00PPduua26/7E+hawEajYBOLfQ1SsV7lFu7dMPDb9fXrv3mkn4cnyR0vTz680i2egSxEQGdlg9dQPE4SWr1uux/Dpn033edcck2/zDHxz735j+wHQR0FqGbjwI+KvKSa9IHf/DJr3F8In/0ftAL20VAIxqVciKtb9XXrv3GktC1AI1AQCMuwxJdNvuASfPmnHj6lv6zZ0xHgQa6fxjMiEql5KVVo3T1XR/8eehagKHGddCZ9F1Qa7yad1J9gJssTpvu0zivkpNKEfQ25eaafvbANF08b1zbvgctf3nzP+Hf8m/YEm7uxIaAzqJnfIUYYnUvTWju0sFtK9VUTl+DU/f/85e1ZS1dX1LZSR2JtGzVMCUbqko2NElNkipepUpidK/dSy1lXf/rf3zxWwepuqX/LO+JAKs4MP1GQMemXtIRu76qL51xZnn6wT7zxaR/eLxt3PrOnSc7l9SSpKm5o2OvA3197LiVa8bvOWdJ83t++ezY9kXz95Ray1JLXSp7lS19CWs10SOL9qg89Xj7pGkzlj3X+9vel0paV5G6qqo7A9faVrxKw+pBT3R176QNZakesIi+NpTV0VUOXUUUCOjYeKm5Ig0knCVpvxkvL5e0vM9vzen9xamSvinp+acO3+fuJ6dd+Ks5x58966XRqndWVW4yEHqSXNnroaWtWvLSRy+dNkMze39/ROvCeVefcevttXrzCBf40xClUr32/Cu7H/29hw5tLakcJKTr3mmXkat01mG/fXJUy5pl3peC7zvVvavsOnbpw9K5oUsxj4COUKP62N2mzX7mnGmaec7faOZdd//t52/+7XuvuuXhqdLITpUDr32UJNVdRfc8vdvZJ52yMaAnTfvzCxdO018FLG0Ts+//6/O/N2f6dxJVwrwDSZx2HfWGZh513Yzdp62rNb4ADETws2mUQl/oH2Cef+
1D4n1798yv/zl188kMv6I2S6okL/xpUE1378CS99PS7DhzyFyCjWq3SHPp1qidOXbW2wf1yXjQEAZ2W7/1H6EcYX7/ggt1++Q83Xa6VUj3wa1B2ifT6GD35wqSTh/4nH6iAr5X3kh/YkhjCIKCR2qkn3/CVK0+f+4xWNoUuRWpNdOeTe18QugzTbF6Kg34goFMK17tuZGG+XfSZz+17+jsXqN4VeAhVEj2zeL/RYYvYOgvjpaePZq5HiIOGzD525L1fUKWr+zKuUEper64aHe75gSFEQGcRevnZQlsm6cQT/uPq4yaskmoBNwwlPdMh3Xf/lPcM+Q+cRehxYmi8ID0CGgNy+P7336vOkMPIS51OK1YefFzAIrYtZEAS0FHjOujUNrYlYT5MHOp5t+zIKYt/pHXuvb41TE3OOfm6U0dH++QgBfRLwPHiSOiY0UFjQPbe+aV7Nfo1JYHWoZ28VC+rtnavfYIU0B8WdnURJTroLEI2JcaaIa/XVmrcKmnFSKkUqDjf/bHqME/eD6GXOBAtOui0LAx4CzX02HnK8+vfP371wG9/OhAVryeWlfcPV8B2ENDIiIBOi7erm7HwktT5nBxyiIBOi45kcwZeE2fhLGGZgWOE9AjolBjnm3NcKbB1PvDFyL3f0IAosUmYmlfPzWcUZOSHet5tWLq2qjdflxC8D/bU2+M3+UWY8WLrwkykQQcdI0OzbdkzB7T94cW3hbuCQ5K81BTy+beHTUJkREBjQFZ3jJ2sV3ZUKWRA1p12H5ssClcAMDQIaAzIY0t2+oCGhR5GXi1NtTWBiwAGHWvQafXZ8wny4Tlv613rPfOOvETNSbjP7XhJ5USVlsULA5XQb8GOm6UBg1QI6Cx6N+qC7EzZmm0PL5okVeoBNwidVK5r+PAlT4cpYHv6biizqYx0Qr83RSY2Jty1P7z01wtXDAu7QShJVa8dRy54MGwRwOAjoJHJ03Pfc8T5s97xfjW5sJ8k9NJ+LdLRxyz4TcgygKFAQCOTw7531u+0Zge50N1z3WlC29KwNQBDhDXorELezS5wJs687Dv1Nc9Pl2utBa9FnSUdvNcT8wJXsXUGjpeJGpAJHXRKRd5z+fP86Xsd+5nr/Y2zDyip1cjdPddKx0177gehy9ia4EPFv5nPzPUI0UFHp/FT/slHp+z1yDOnfeNTt3z9VG0YIQ2rm7iDnU+cNOEV7TruuQdC17Jt3EAc2RDQmYS8AY7ruTnR0Lv7nqlH/37BWd/61fwrDnzo2dFSq+SGGemcJWl9SRcf++LyXfeb/8fQpfRPmPHSM1a5IWuECOisvMLcCNl5rV5X1f33fuDMUS3lNQN+6+qdfH3n9iRpbl28vLzn4y+0HvGbJeOnPf7wvpL7N6m1Lg1LpOHe1C09vXfSsPU6at+n/jV0LcBQIaAHIkRDVPa6ffGOuv3b5/1sUD4ckkhaOULqrEhN6n5UvTQukXOdm/5ZS++Wa9Ipu2/Q+0644SuhS9mu0DdLsnTckAoBPQDhxn1Jqo0YvL9utJe0+dKF6Xm9pqrj3nXXLdIpoSvpN9OvJ0wioGPVoHVok5KSNGqFzvv4988IXUoUDC1NIR0COjWvsJuE0BvSjec+cqd0auhK+inkeOm9u5bjMrsIEdBZJCKbQ+kq6eTpy/Tu/f/9HOnK0NX0T/A1aAZrrDirIi6ry/rwUbO++/YDX1oWuhRgqBHQaYW6vA7S+pJOO/Ipfez0n342dCn9ZqV5tVIHUmGJIzPWoBuqq6zW8St00YduPlb6dOhqUgi9Z8EYjRkddEq+zz/RIImTKh269ayfXDjj8LlR3VbUwkihlYgXHXRmDPuG8JKWl/T9z9w/64QT7/iX0OVkE7qDZpzGig4adnlJa50u/+jcxeecfdWJocsBGo0OOrXQa4oFsqKsb3/ygTmfPefyw0OXkl3o8cI4jRkBnQkBPaS8k14t68tnzHsl7nDuZSGgGasxYokjNZ8w2IdQ3Unr6vrhZ2fdfsWXvrhT6HIGD2MG6dFBZ0JXMiTWl6WW1br1/Pu+f9pHrjsvdDmDo+8JPWQHzcX7MSKgEV7dSeu9zpzxki447VvvPvSIPzwYuiTAAgI6rTcbZzroAfNOWlvWyJ1e1z+f+eis82Zec6J0duiqBtcmYyVgB839OKJEQGfCEkdm3nV3zJ1OKndq5vseXfflk359zB4HzXk0dGlDJ3RAI1YENBojcVJnSap16eipK3TifkufPOHwS2bsM8PXJPtfihI/1qBjRECnFvq6VuO8635ZEifVJXWVpDUlaceV+vhRCzo/ccTzl44efc8v9j3kxcXSxaGrbYDQ44VxGjMCGtn0BnHddd8fu+6kTi81d2nE2PU6fExdU3Zao/E7P/Gbd0598Jpjjn1iVuiSgdgQ0CltvFlSwM4kcdKGcncwDra6pNpW3g7XJG3oef7dlkvVug7f9TVNGbsh2WV05+JDd+98UOX/e2XEDvN/N27UY3d3L1/ARgdNFx0jAjo2idO0cat0/Iw5v2+t1lf7
1Qfwqo8SrtNOoNxbtMmb1gsS7TcaG9640ftSGF3Yb27nI+1JJ7pVX5OpJufTcoonT1gzFqQKDxIl4jhUBnVrgNcW604z2tbrqwuumN/7JkV7vB1VCd9B8J2GMCOhMwk64Ov1qhEIHtGfURIizanR4sxqX0GvAjJeY0UGnFvotKyuKUXnzk4R9/91IPeOFIRMlOmgAMIoOOhMLmz6Ih4XxwpiJEQGdSegJh3j0bs6FHi981DtGLHEAQ46TKrKhg06t74YPSxzoL8YL0qODziTkgGeyxSX0GjDjJWZ00KlxmR3SMnCZHaJEQKfW+5FZ3rJi+/wmv2K8IB2WOFLyBr5/k+mGNLwk75nrMaKDTo0bsCMNK+OFe3HEiLNqJmwSIg02CZENHXRqbBIiq5DjhduNxoiDFh3COS59T+hBnj/Q82Iw0EFnQgeNLEKOF9agY0RAZxb63gqIR+hNQsSKJQ6gEFiDjhEddGpWLptCPBgvyIazaiahL7NjwkXDcy8OZEcHnZbv+4tAmz7MuUiF/MorNgljREBnwltWpGFhvLAGHSMOGgAYRQedWuhPEtJBx8Sb2VRmiSNGdNAp+TdfMzZ9kEbY8eKZ61Gig06tt4OW+CQhto/xguw4q0aHyRYn3nEhPTroTLgXB9II3UEjVgR0JqE3fRCX0OOFMRMrljiAoWQhGy3UgEzooNPq+YI3OiL0j5HL7BgyUaKDTi3kemLv8zLb4sMmIdKjg86ETR+kEXq8ENKxIqAzCfmWNQn0vMjOwBIHosQSRyYhu1g6aKAo6KBT414cSMPKeOFeHDGig86EgAQw9AhoYAhxkyIMBIMnNW58jrh0L3KUWM6MEActpVq91KQXq1JXVSoFWOpY6/Ty5Ir++JgrTTmYdUXravVyk56rSq4SZn93g9O8UVUlnoCOkfOe9VQAsIi36wBgFAENAEYR0ABgFAENAEYR0ABgFAENAEYR0ABgFAENAEYR0ABgFAENAEYR0ABgFAENAEYR0ABgFAENAEYR0ABgFAENAEaZDGjn3NTQNQAoDquZYzKgpaZa6AoAFInNzDEa0J1rQ1cAoEhsZo7J7yR0zsliXQDyyWrmGO2gAQBmA3rJY8PM1gYgPyxnDUscAArPauaYPXMAQNER0ABgFAENAEYR0ABgFAENAEYR0ABglNmAds6NDF0DgPyznDVmr4OWZPK6RAD5YjlvzHbQAFB0BDQAGGU6oJ1zE0PXACC/rGeM6TVoyea6EIB8sJ41pjtoACgyAhoAjIoioBc93NIcugYA+RFLpphfg5Z2Huv9shXBigGQS861j5X+8ma2mMxCk0VtEtA2XzgAcYshZ6JY4pCkF+e1RFMrALtiypIoOmhJ47z3y0PUAiB/nHPjJG2SKSaz0GRRmwe0yRcPQJxiyZhoWn0AKJpoAto5Vw5dA4D4xZQl0QS0pLokvTBveCV0IQDi0yc76kELSSGaNehubRO9/8uLDS0GQG44t/NE6eUtZojJLDRZ1FYD2uaLCCAOsWVLTEsckrpf4IWzW0eErgNAPBbObh2xrXC2KroOWuo+0y2dP7w0YfrapEElAYhUb1b0J1esiTagASCNGHMluiUOaeML/dLvh0dZP4DG6M2IGJc3pEg76F4WawdgS8x5QgcKAEZFHdCxvm0B0BixZ0TUAS1JzrmW0DUAsCcP2RB9QEvqcM6NDV0EADt6MqEjdB0DFfUmYV8Wfw4AYeQlQ/LQQUuKf60JwODIUxbkJq
1ClfB0YAOnlLQNyFdCSpHWj83WEAPRPDud+btag+7L4MwEYWnnMjfx10Mrf2xwA25bXOZ/LgJbye8AAbCrPcz23AS3l+8AByP8cz3VAS/k/gEBRFWFu5z6gpe4D+fgde/Bls0AOPH7HHpUihLOU06s4tsbizwognSLlQ6G6yt4Da/FAANi2onTNfRViieOtiniggZgVdc4WMqCl7gPOXfAA25xzY4sazlLB1qC3osV7H/1tCYG86bmfc8PmpsksNFlUgDOmxdcBKCoyoFuhNgm3hQ1EILwiL2dsSWHXoLeGAQKEwdzbHB30FvQdKHTUwNAhlLeNDno7uq/2GNMWug4gT5wb00Y4bx+bhOmUvPdJ6CKAWDnnSpJMziGLWUgHnU7Sc/20nHM7hi4GiIFzbsfeeSOj4WwVAZ3daxvDeu8xoYsBLHFu7zF9Qvm10PXEiiWOodPuvV8WughgqDnn2iVFP9ZNZqHJovIR0G+1g/f+jdBFAAPlnNtBUu7GssksNFlUPgM6jTapqVmqVL1f++fQxSC/nBu+p1TrkjrXS3o5dD0hmcxCi0UBANgkBACzCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMIqABgCjCGgAMOr/AQSWbdGYTc82AAAAAElFTkSuQmCC"})]})]})),u=i(23072);let s={fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!1,showsUserLocation:!0,showsMyLocationButton:!0,zoomControlOptions:{position:3},styles:[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels",stylers:[{visibility:"on"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"administrative",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"labels",stylers:[{weight:4.5}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#cb0b0b"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road",elementType:"geometry.fill",stylers:[{color:"#f0f0f0"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#d1d1d1"}]},{featureType:"road",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}]};var c=i(27864),v=i(11787),p=i(86728),f=i(91311),g=i(57349),m=i(68724);let h=c.ZP.div.withConfig({componentId:"sc-68b806f-0"})(["position:relative;width:100%;display:flex;flex-direction:column;justify-content:end;flex:1 1 auto;height:100%;min-height:0;@media (min-width:","){height:236px;min-height:236px;}@media (min-width:","){height:392px;}.gmnoprint.gm-bundled-control{margin:0 !important;}#location-control{display:block !important;}"],v.A.tablet,v.A.desktop),y=c.ZP.div.withConfig({componentId:"sc-68b806f-1"})(["position:absolute;width:100%;"]),b=c.ZP.div.withConfig({componentId:"sc-68b806f-2"})(["z-index:3;position:absolute;width:fit-content;margin-left:calc(100% - 48px);padding-bottom:64px;display:flex;flex-direction:row-reverse;@media (min-width:","){padding-bottom:72px;}svg{margin:-4px;}"],v.A.tablet),C=c.ZP.div.withConfig({componentId:"sc-68b806f-3"})(["width:100%;background-color:",";display:flex;flex-direction:row;align-items:center;padding:13px 16px;height:53px;@media (min-width:","){padding:17px 16px;}.posteIcon,.vodafoneStoreIcon{margin-right:16px;width:27px;height:27px;@media (min-width:","){width:35px;height:35px;}}"],m.rS.colors.bg.mvaSecondary,v.A.tablet,v.A.tablet),E=c.ZP.div.withConfig({componentId:"sc-68b806f-4"})(["font-family:",";font-weight:400;color:",";"," @media (min-width:","){","}@media (min-width:","){","}p{margin:0 auto;}"],f.R.regular,p.O.$ffffff,(0,g.Ln)(14,19),v.A.tablet,(0,g.Ln)(16,22),v.A.desktop,(0,g.Ln)(18,24));var S=i(4233);
1let x={lable:"Consegna presso:"};var I=n=>{var e,i,c;let{type:v,items:p,onSelectItem:f,position:g}=n,[m,I]=(0,o.useState)(-1),[A,_]=(0,o.useState)({lat:0,lng:0}),T=[],{isDesktop:N,isTablet:L,isMobile:O}=(0,u.h)(),R={min:0,max:0};R=N?{min:23,max:46}:L?{min:15,max:41}:{min:12,max:30};let D=N?{height:77.14,width:60.68}:{height:56.02,width:46.56},[M,P]=(0,o.useState)(!0),[w,k]=(0,o.useState)();(0,o.useEffect)(()=>{I(p.findIndex(n=>n.isSelected))},[]),(0,o.useEffect)(()=>{P(!M)},[O,L,N]),(0,o.useEffect)(()=>{g&&""!==g.lat&&""!==g.lat&&_({lat:parseFloat(g.lat),lng:parseFloat(g.lng)})},[]);let j=()=>w.panTo(new google.maps.LatLng(null==A?void 0:A.lat,null==A?void 0:A.lng)),B=(n,e,i)=>{let t="";if(n===e&&i)switch(v){case S.G.P:case S.G.PO:case S.G.PP:t="https://vf-test-components.s3.eu-south-1.amazonaws.com/images/posteSelected.svg";break;case S.G.S:t="https://vf-test-components.s3.eu-south-1.amazonaws.com/images/vodafoneStoreSelected.svg"}else switch(v){case S.G.P:case S.G.PO:case S.G.PP:t="https://vf-test-components.s3.eu-south-1.amazonaws.com/images/posteDot.svg";break;case S.G.S:t="https://vf-test-components.s3.eu-south-1.amazonaws.com/images/vodafoneStoreDot.svg"}let o=n===e&&i?R.max:R.min;return{url:t,scaledSize:new google.maps.Size(o,o)}},F=n=>{f(n),I(n),T.forEach((e,i)=>{i>0&&e.setIcon(B(1,1,i===n+1))})},z=(n,e,i,t,o,l)=>{let r=new e.Marker({position:{lat:i,lng:t},icon:l,map:n,zIndex:60});T.push(r),o>-1&&e.event.addDomListener(r,"click",()=>F(o))};return(0,t.jsx)(h,{children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.ZP,{bootstrapURLKeys:{key:"AIzaSyCGPq5-LJvN1i-5HiRAyVQyZoloVyxSsvo",libraries:["places"],language:"it",region:"it",version:"weekly"},zoom:14,options:s,draggable:!0,center:A,yesIWantToUseGoogleMapApiInternals:!0,onGoogleApiLoaded:n=>{let{map:e,maps:i}=n;k(e),z(e,i,null==A?void 0:A.lat,null==A?void 0:A.lng,-1,{url:"https://vf-test-components.s3.eu-south-1.amazonaws.com/images/myLocation.svg",scaledSize:new google.maps.Size(D.height,D.width)}),p.forEach((n,t)=>{let{locationAddress:o,isSelected:l}=n;z(e,i,parseFloat(null==o?void 0:o.latitude),parseFloat(null==o?void 0:o.longitude),t,B(1,1,l||!1))})}},M.toString()),(0,t.jsx)(b,{onClick:()=>j(),children:(0,t.jsx)(r,{})}),(0,t.jsx)(y,{children:(0,t.jsxs)(C,{children:[v===S.G.S?(0,t.jsx)(d,{}):(0,t.jsx)(a,{}),(0,t.jsx)(E,{children:-1!==m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:x.lable}),(0,t.jsx)("p",{style:{textTransform:"capitalize"},children:"".concat(null===(e=p[m])||void 0===e?void 0:e.locationAddress.postalOfficeDescription.toLowerCase()," - ").concat(null===(i=p[m])||void 0===i?void 0:i.locationAddress.formattedAddress1.toLowerCase(),", ").concat(null===(c=p[m])||void 0===c?void 0:c.locationAddress.stateOrProvince)})]}):"Seleziona un punto sulla mappa"})]})})]})})}},47314:function(n,e,i){var t,o;i.d(e,{Q:function(){return t}}),(o=t||(t={})).FIXED_VOICE="fixedVoiceOffering",o.SIM_DATA="mobileOffering",o.INTERNET="internetOffering",o.MOBILE="mobile"},56610:function(n,e,i){i.d(e,{l:function(){return l},m:function(){return r}});var t=i(29261);let o=n=>{let e="",i="",o="";switch(n){case t.Q.FIXED_VOICE:e="fixedVoiceAddOnOfferingConfiguration",i="fixedVoiceAddOnOfferingConfigurationId",o="fixedVoiceOfferingConfiguration";break;case t.Q.INTERNET:e="internetAddOnOfferingConfiguration",i="internetAddOnOfferingConfigurationId",o="internetOfferingConfiguration";break;case t.Q.SIM_DATA:e="mobileAddOnOfferingConfiguration",i="mobileAddOnOfferingConfigurationId",o="mobileOfferingConfiguration"}return{keyType:e,keyTypeRemoval:i,levelOfData:o}},l=(n,e,i)=>{let{keyType:t,levelOfData:l}=o(i);return{qualificationCriteria:{orderingActivity:"newSubscription"},context:"shoppingCart.Id==".concat(n),configurationType:"fullConfigurable",levelOfData:"bundledAddOnConfiguration,bundledAddOnGroupConfiguration,price,".concat(l),runValidation:"true",[t]:{offering:{id:e}}}},r=(n,e,i)=>{let{keyTypeRemoval:t,levelOfData:l}=o(i);return{qualificationCriteria:{orderingActivity:"newSubscription"},context:"shoppingCart.Id==".concat(n),levelOfData:"bundledAddOnConfiguration,bundledAddOnGroupConfiguration,price,".concat(l),runValidation:"true",[t]:e}}},52771:function(n,e,i){i.d(e,{BP:function(){return u}});var t=i(82066),o=i(41307),l=i(99306),r=i(9109);let d={MOBILE:"WS",INTERNET:"IN",FIXED_VOICE:"FV"},a=(n,e,i,t)=>o.W.post("".concat(l.b.INDIVIDUAL,"/").concat(n,"/").concat(l.b.PRIVACY_PROFILE),i,{searchParams:{relatedFlow:"Provide",relatedEntityType:"Subscriber",productId:"".concat(e)},...(null==t?void 0:t.headers)&&{headers:t.headers},...(null==t?void 0:t.silentLoginHeaders)&&{silentLoginHeaders:t.silentLoginHeaders}}),u=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("privacyProfile",n=>{var e,i,t,o,u,s,c,v,p,f,g,m,h,y,b,C,E,S;let x=(0,l.f)("findCaller"),I=(0,l.f)("customerData"),A=(0,l.f)("oldPrivacyProfile"),_=(0,l.f)("shoppingCart"),T=(null==I?void 0:null===(i=I["0"])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.id)||(null==x?void 0:null===(t=x.individualRef)||void 0===t?void 0:t.contactId)||"",N=null==_?void 0:null===(c=_.cartItem)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:null===(u=s.dataSim)||void 0===u?void 0:null===(o=u[0].product)||void 0===o?void 0:o.id,L=null==_?void 0:null===(g=_.cartItem)||void 0===g?void 0:null===(f=g[0])||void 0===f?void 0:null===(p=f.internet)||void 0===p?void 0:null===(v=p[0].product)||void 0===v?void 0:v.id,O=null==_?void 0:null===(b=_.cartItem)||void 0===b?void 0:null===(y=b[0])||void 0===y?void 0:null===(h=y.fixedVoice)||void 0===h?void 0:null===(m=h[0].product)||void 0===m?void 0:m.id,R=null==_?void 0:null===(S=_.cartItem)||void 0===S?void 0:null===(E=S[0])||void 0===E?void 0:null===(C=E.product)||void 0===C?void 0:C.id,D={partyPrivacyItems:n.map(n=>{var e,i,t,o;let l=!0;if(null==A?void 0:A.partyPrivacyItems){let e=null==A?void 0:null===(t=A.partyPrivacyItems)||void 0===t?void 0:t.find(e=>e.id==n.id);e&&(null==n||null===(o=n.subscribers)||void 0===o||o.forEach((n,i)=>{var t,o;l=l||n[i].selectedValue!==(null==e?void 0:null===(o=e.subscribers)||void 0===o?void 0:null===(t=o[i])||void 0===t?void 0:t.selectedValue)}))}return{id:(null==n?void 0:null===(e=n.id)||void 0===e?void 0:e.toString())||"",code:(null==n?void 0:null===(i=n.code)||void 0===i?void 0:i.toString())||"",selectedValue:l||!1,subscribers:n.subscribers.map(e=>{let i=e.productId,t="";return t=i==L?d.INTERNET:i==O?d.FIXED_VOICE:d.MOBILE,{...e,selectedValue:(null==n?void 0:n.selectedValue)||!1,lob:t}})}})};return localStorage.setItem("oldPrivacyProfile",JSON.stringify(n)),a(T,(0,r.P)()?R:N,D)},{onSuccess:e=>{localStorage.setItem("privacyProfile",JSON.stringify(e)),n.setQueryData("privacyProfile",e)},onError:(e,i)=>{o.K.error("ERROR - privacyProfile: ",e),n.setQueryData("privacyProfile",(0,r.n)("privacyProfile",e)),localStorage.setItem("privacyProfile",JSON.stringify((0,r.n)("privacyProfile",e)))}})}},59391:function(n,e,i){i.d(e,{V:function(){return a}});var t=i(82066),o=i(9109),l=i(99306),r=i(41307);let d=(n,e,i)=>r.W.post("".concat(l.b.INDIVIDUAL,"/").concat(n,"/").concat(l.b.RETRIEVE_MULTILINES),e,{searchParams:{relatedFlow:"Provide",relatedEntityType:"Subscriber",partyPrivacyType:"VF"},...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("retrieveMultiLinesMutation",()=>{var n,e,i,t,r,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x;let I=(0,l.f)("customerData"),A=(0,l.f)("findCaller"),_=(0,l.f)("shoppingCart"),T=null==_?void 0:null===(r=_.cartItem)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:null===(i=t.dataSim)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:null===(n=e.product)||void 0===n?void 0:n.id,N=null==_?void 0:null===(v=_.cartItem)||void 0===v?void 0:null===(c=v[0])||void 0===c?void 0:null===(s=c.internet)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:null===(a=u.product)||void 0===a?void 0:a.id,L=null==_?void 0:null===(h=_.cartItem)||void 0===h?void 0:null===(m=h[0])||void 0===m?void 0:null===(g=m.fixedVoice)||void 0===g?void 0:null===(f=g[0])||void 0===f?void 0:null===(p=f.product)||void 0===p?void 0:p.id,O=null==_?void 0:null===(C=_.cartItem)||void 0===C?void 0:null===(b=C[0])||void 0===b?void 0:null===(y=b.product)||void 0===y?void 0:y.id,R=(null==I?void 0:null===(S=I[0])||void 0===S?void 0:null===(E=S.owningIndividual)||void 0===E?void 0:E.id)||(null==A?void 0:null===(x=A.individualRef)||void 0===x?void 0:x.contactId);return d(R,{subscribers:(0,o.P)()?[{productId:O}]:[{productId:T},{productId:N},{productId:L}]})},{onSuccess:e=>{localStorage.setItem("retrieveMultiLines",JSON.stringify(e)),localStorage.setItem("oldPrivacyProfile",JSON.stringify(e)),n.setQueryData("retrieveMultiLines",e)},onError:e=>{r.K.error("ERROR - retrieveMultiLines: ",e),n.setQueryData("retrieveMultiLines",(0,o.n)("retrieveMultiLines",e)),localStorage.setItem("retrieveMultiLines",JSON.stringify((0,o.n)("retrieveMultiLines",e)))}})}},4880:function(n,e,i){i.d(e,{V:function(){return a}});var t=i(41307),o=i(1733),l=i(10727),r=i(82066);let d=(n,e)=>t.W.post(l.b.ADDRESS,n,{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),a=n=>{let e=(0,r.useQueryClient)(),i="createdAddress";return(0,r.useMutation)("createAddress",e=>d(e.address,n),{onMutate:async n=>{(null==n?void 0:n.isBilling)===!0?i="billingCreatedAddress":(null==n?void 0:n.isDelivery)===!0?i="deliveryCreatedAddress":(null==n?void 0:n.isPickup)===!0&&(i="pickupCreatedAddress")},onSuccess:t=>{var o;localStorage.setItem(i,JSON.stringify(t)),e.setQueryData(i,t),null==n||null===(o=n.onSuccess)||void 0===o||o.call(n,t)},onError:l=>{var r;t.K.error("ERROR - ".concat(i,": "),l),e.setQueryData(i,(0,o.n)("".concat(i),l)),localStorage.setItem("".concat(i),JSON.stringify((0,o.n)("".concat(i),l))),null==n||null===(r=n.onError)||void 0===r||r.call(n,l)}})}},62689:function(n,e,i){i.d(e,{S:function(){return a}});var t=i(82066),o=i(41307),l=i(1733),r=i(99306);let d=(n,e,i,t)=>o.W.put("".concat(r.b.CUSTOMER,"/").concat(n,"/").concat(r.b.BILLING_ACCOUNT,"/").concat(e,"/").concat(r.b.BILLING_DELIVERY_DETAILS),i,{...(null==t?void 0:t.headers)&&{headers:t.headers},...(null==t?void 0:t.silentLoginHeaders)&&{silentLoginHeaders:t.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)(),e="billDeliveryDetails";return(0,t.useMutation)(["billDelivery"],n=>{var e,i,t,o,l;let a;let u=(0,r.f)("customerData"),s=(0,r.f)("findCaller"),c=(0,r.f)("billingAccount"),v=(null==s?void 0:null===(e=s.customerRef)||void 0===e?void 0:e.id)||(null==u?void 0:null===(i=u[0])||void 0===i?void 0:i.id),p=null==c?void 0:c.id,f=null==u?void 0:null===(o=u[0])||void 0===o?void 0:null===(t=o.owningIndividual)||void 0===t?void 0:t.contactMedium.filter(n=>"email"===n.type),{billFormat:g,physicalAddress:m,emailAddress:h}=n;switch(g){case"eBill":a={billFormat:g,emailAddress:h||(null==f?void 0:null===(l=f[0])||void 0===l?void 0:l.emailAddress)};break;case"paperBill":a={billFormat:g,...m&&{physicalAddress:m}}}return d(v,p,a)},{onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})}},27166:function(n,e,i){i.d(e,{r:function(){return d}});var t=i(38062),o=i(99306),l=i(98602);let r=(n,e,i)=>t.Wd.get("".concat(o.b.CUSTOMER,"/").concat(n,"/").concat(o.b.BILLING_ACCOUNT),{searchParams:{salesChannel:"selfService",checkExistingInstallment:!0,...i&&{checkOnGoingTNPDevice:!0}},...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),d=(n,e)=>{let i=(null==n?void 0:n.enabled)!==void 0&&n.enabled,d={queryKey:n&&n.keyDependency?n.keyDependency:"billingAccount",queryFn:()=>{var i,t,d,a,u,s,c,v,p;let f=(0,o.f)("customerData"),g=(0,o.f)("findCaller"),m=(null==f?void 0:null===(i=f[0])||void 0===i?void 0:i.id)||(null==g?void 0:null===(t=g.customerRef)||void 0===t?void 0:t.id),h=(null==f?void 0:null===(a=f[0])||void 0===a?void 0:null===(d=a.owningIndividual)||void 0===d?void 0:d.fiscalCode)||(null==g?void 0:null===(u=g.individualRef)||void 0===u?void 0:u.fiscalCode);(0,l.AQ)()===l.xx.NEXT_USER_INACTIVE||((0,l.AQ)(),l.xx.NEXT_USER_ACTIVE);let y=null==h?void 0:h.includes("XBS"),b=(null==e?void 0:null===(c=e.globalconfig)||void 0===c?void 0:null===(s=c.newMop)||void 0===s?void 0:s.enableNewMopFixed)==="true"||(null==e?void 0:null===(p=e.globalconfig)||void 0===p?void 0:null===(v=p.newMop)||void 0===v?void 0:v.enableNewMopMobile)==="true";return r(m,n,y||b)},options:{...n&&{...n},enabled:i&&((null==n?void 0:n.enabled)===void 0||(null==n?void 0:n.enabled)),onSuccess:e=>{var i;localStorage.setItem("billingAccount",JSON.stringify(e)),null==n||null===(i=n.onSuccess)||void 0===i||i.call(n,e)},onError:e=>{var i;t.KF.error("ERROR - billingAccount: ",e),localStorage.setItem("billingAccount",JSON.stringify((0,l.nQ)("billingAccount",e))),null==n||null===(i=n.onError)||void 0===i||i.call(n,e)}}};return(0,t.Aq)(d)}},93216:function(n,e,i){i.d(e,{O:function(){return d}});var t=i(38062),o=i(1733),l=i(10727);let r=n=>t.Wd.get(l.b.CUSTOMER_REFERENCE_DATA,{...(null==n?void 0:n.headers)&&{headers:n.headers},...(null==n?void 0:n.silentLoginHeaders)&&{silentLoginHeaders:n.silentLoginHeaders}}),d=n=>{let e={queryKey:n&&n.keyDependency?n.keyDependency:"customerReference",queryFn:()=>r(n),options:{...n&&{...n},onSuccess:n=>{localStorage.setItem("customerReference",JSON.stringify(n))},onError:n=>{t.KF.error("ERROR - customerReference: ",n),localStorage.setItem("customerReference",JSON.stringify((0,o.n)("customerReference",n)))}}};return(0,t.Aq)(e)}},32218:function(n,e,i){i.d(e,{U:function(){return d}});var t=i(38062),o=i(1733),l=i(99306);let r=(n,e)=>t.Wd.get("".concat(l.b.INDIVIDUAL,"/").concat(n),{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),d=n=>{var e,i,d;let a=(0,l.f)("customerData"),u=(0,l.f)("findCaller"),s=(null==a?void 0:null===(i=a[0])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.id)||(null==u?void 0:null===(d=u.individualRef)||void 0===d?void 0:d.contactId),c={queryKey:n&&n.keyDependency?n.keyDependency:"individual",queryFn:()=>r(s,n),options:{...n&&{...n},onSuccess:n=>{localStorage.setItem("individual",JSON.stringify(n))},onError:n=>(t.KF.error("ERROR - individual: ",n),localStorage.setItem("individual",JSON.stringify((0,o.n)("individual",n))),(0,o.n)("individual",n))}};return(0,t.Aq)(c)}},57714:function(n,e,i){i.d(e,{A:function(){return a}});var t=i(82066),o=i(41307),l=i(99306),r=i(1733);let d=(n,e)=>o.W.post(l.b.LINK_CONTACT_CUSTOMER,n,{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),a=n=>{let e=(0,t.useQueryClient)();return(0,t.useMutation)("linkContactAndCustomer",e=>{var i,t,r;let a;if(e)a=e;else if(null==n?void 0:n.storeId)a=null==n?void 0:null===(r=n.locationAddress)||void 0===r?void 0:r.id;else{let n=(0,l.f)("deliveryCreatedAddress");a=n?null==n?void 0:n.id:""}let u=(0,l.f)("individual"),s=null==u?void 0:u.contactObjId,c=(0,l.f)("customerData"),v=(0,l.f)("findCaller");return o.K.debug("customerData: ",c),d({addressId:a,customerId:(null==c?void 0:null===(i=c[0])||void 0===i?void 0:i.id)||(null==v?void 0:null===(t=v.customerRef)||void 0===t?void 0:t.id)||"",contactObjId:s})},{onSuccess:n=>{localStorage.setItem("linkContactAndCustomer",JSON.stringify(n)),e.setQueryData("linkContactAndCustomer",n)},onError:n=>{o.K.error("ERROR - linkContactAndCustomer: ",n),e.setQueryData("linkContactAndCustomer",(0,r.n)("linkContactAndCustomer",n)),localStorage.setItem("linkContactAndCustomer",JSON.stringify((0,r.n)("linkContactAndCustomer",n)))}})}},28432:function(n,e,i){i.d(e,{W:function(){return a}});var t=i(82066),o=i(41307),l=i(1733),r=i(99306);let d=n=>o.W.post("".concat(r.b.CARE_V1,"/").concat(r.b.LOCATE_STORE),n),a=()=>{let n=(0,t.useQueryClient)(),e="locateStore";return(0,t.useMutation)(["locateStoreMutation"],n=>{var e,i;let t=(0,r.f)("createdAddress")||(0,r.f)("deliveryCreatedAddress"),o=(0,r.f)("customerData"),l=(null==o?void 0:null===(i=o[0
1])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.contactMedium)||[],a=null==l?void 0:l.find(n=>"postalAddress"==n.type),u=(null==t?void 0:t.id)||(null==a?void 0:a.id);return n&&(u=n),d({addressId:u,geoLocations:{},radius:30,isPickUpStore:"Y",checkInventoryAvailability:!1})},{onMutate:async n=>{n&&(e+=n)},onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})}},30681:function(n,e,i){i.d(e,{n:function(){return s}});var t=i(82066),o=i(41307),l=i(62185),r=i(99306);let d=(n,e)=>{switch(e){case"email":return"/owningIndividual/contactMedium/".concat(n,"/emailAddress");case"number":return"/owningIndividual/contactMedium/".concat(n,"/phoneNumber");case"identificationNumber":return"/owningIndividual/identification/".concat(n,"/identificationNumber");case"identificationType":return"/owningIndividual/identification/".concat(n,"/identificationType");case"expirationDate":return"/owningIndividual/identification/".concat(n,"/expirationDate");case"nationality":return"/owningIndividual/identification/".concat(n,"/nationality");case"formattedAddress1":return"/owningIndividual/contactMedium/".concat(n,"/formattedAddress1");case"formattedAddress3":return"/owningIndividual/contactMedium/".concat(n,"/formattedAddress3");case"streetType":return"/owningIndividual/contactMedium/".concat(n,"/streetType");case"streetName":return"/owningIndividual/contactMedium/".concat(n,"/streetName");case"city":return"/owningIndividual/contactMedium/".concat(n,"/city");case"postalCode":return"/owningIndividual/contactMedium/".concat(n,"/postalCode");case"streetNumber":return"/owningIndividual/contactMedium/".concat(n,"/streetNumber");case"externalId":return"/owningIndividual/contactMedium/".concat(n,"/externalId");case"stateOrProvince":return"/owningIndividual/contactMedium/".concat(n,"/stateOrProvince");case"street":return"/owningIndividual/contactMedium/".concat(n,"/street");case"istatCode":return"/owningIndividual/contactMedium/".concat(n,"/istatCode");case"homeZone":return"/owningIndividual/contactMedium/".concat(n,"/homeZone");case"longitude":return"/owningIndividual/contactMedium/".concat(n,"/longitude");case"latitude":return"/owningIndividual/contactMedium/".concat(n,"/latitude");default:return""}},a=(n,e,i,t)=>{let o;switch(o={op:i,path:d(t,e)},e){case"email":case"number":case"identificationType":case"identificationNumber":case"expirationDate":case"nationality":"replace"===i&&(o={...o,value:n});break;case"formattedAddress1":case"formattedAddress3":case"streetType":case"streetName":case"city":case"postalCode":case"streetNumber":case"externalId":case"stateOrProvince":case"street":case"istatCode":case"homeZone":case"longitude":case"latitude":o={...o,..."replace"===i&&{value:n}}}return o},u=(n,e,i)=>o.W.patch("".concat(r.b.CUSTOMER,"/").concat(n),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),s=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)(["patchCustomer"],n=>{var e,i;let t=(0,r.f)("findCaller"),l=(0,r.f)("customerData"),d=t&&((null==t?void 0:t.resultInfo)==="existingNextCustomer"||(null==t?void 0:t.customerHasActiveSubs)===!1)&&(null==t?void 0:t.customerRef)&&(null==t?void 0:null===(e=t.customerRef)||void 0===e?void 0:e.id);!d&&l&&(d=null==l?void 0:null===(i=l[0])||void 0===i?void 0:i.id);let s=[];return n.forEach(n=>{s.push(a(n.updatedValue,n.type,n.operation,n.index))}),o.K.debug("patchCustomerService payload :",s),u(d,s)},{onSuccess:e=>{localStorage.setItem("patchCustomer",JSON.stringify(e)),n.setQueryData("patchCustomer",e)},onError:e=>{o.K.error("ERROR - patchCustomerService:",e),n.setQueryData("patchCustomer",e),localStorage.setItem("patchCustomer",JSON.stringify((0,l.n)("patchCustomer",e,l.S.PATCH_CUSTOMER)))}})}},25184:function(n,e,i){i.d(e,{b:function(){return a}});var t=i(82066),o=i(99306),l=i(62185),r=i(41307);let d=(n,e,i,t)=>r.W.get("".concat(o.b.CUSTOMER,"/").concat(n,"/individual/").concat(e,"/").concat(o.b.PAYMEAN),{searchParams:{...i},...(null==t?void 0:t.headers)&&{headers:t.headers},...(null==t?void 0:t.silentLoginHeaders)&&{silentLoginHeaders:t.silentLoginHeaders}}),a=(n,e)=>(0,t.useQuery)(["payMean"],()=>{var n,i,t,l,r,a,u,s,c,v,p;let f=(0,o.f)("customerData"),g=(0,o.f)("findCaller"),m=null==g?void 0:null===(i=g.individualRef)||void 0===i?void 0:null===(n=i.fiscalCode)||void 0===n?void 0:n.includes("XBS"),h=(null==e?void 0:null===(l=e.globalconfig)||void 0===l?void 0:null===(t=l.newMop)||void 0===t?void 0:t.enableNewMopFixed)==="true"||(null==e?void 0:null===(a=e.globalconfig)||void 0===a?void 0:null===(r=a.newMop)||void 0===r?void 0:r.enableNewMopMobile)==="true",y=(0,o.f)("billingAccount"),b=(null==f?void 0:null===(u=f[0])||void 0===u?void 0:u.id)||(null==g?void 0:null===(s=g.customerRef)||void 0===s?void 0:s.id),C=(null==f?void 0:null===(v=f[0])||void 0===v?void 0:null===(c=v.owningIndividual)||void 0===c?void 0:c.id)||(null==g?void 0:null===(p=g.individualRef)||void 0===p?void 0:p.contactId),E={salesChannel:"selfService",checkExistingInstallment:"true",autoPay:"false",filters:"type==bankAccount,credit
1Card",usePaymeanFiltering:"false",...(null==y?void 0:y.id)&&{billingArrangementId:null==y?void 0:y.id}},S={salesChannel:"selfService",checkExistingInstallment:"true",checkOnGoingTNPDevice:"true",autoPay:"true",filters:"type==bankAccount,creditCard,debitCard,payPal;availableNewPaymeanTypes==filtered",...(null==y?void 0:y.id)&&{billingArrangementId:null==y?void 0:y.id}};return d(b,C,m||h?S:E)},{enabled:(null==n?void 0:n.enabled)||!1,onSuccess:n=>{localStorage.setItem("payMean",JSON.stringify(n))},onError:n=>{r.K.error("ERROR - payMean: ",n,l.S.PAYMEAN),localStorage.setItem("payMean",JSON.stringify((0,l.n)("payMean",n,l.S.PAYMEAN)))}})},77125:function(n,e,i){i.d(e,{P:function(){return u}});var t=i(82066),o=i(41307),l=i(1733),r=i(99306),d=i(4233);let a=(n,e)=>o.W.post("".concat(r.b.CARE_V1,"/").concat(r.b.SEARCH_PICKUP_LOCATIONS),n,{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),u=()=>{let n=(0,t.useQueryClient)(),e="searchPickUpLocations";return(0,t.useMutation)(["searchPickUpLocationsMutation"],n=>{var i,t;let o,{id:l,options:u}=n,s=(0,r.f)("createdAddress")||(0,r.f)("deliveryCreatedAddress"),c=(0,r.f)("customerData"),v=(null==c?void 0:null===(t=c[0])||void 0===t?void 0:null===(i=t.owningIndividual)||void 0===i?void 0:i.contactMedium)||[],p=null==v?void 0:v.find(n=>"postalAddress"==n.type),f=(null==s?void 0:s.id)||(null==p?void 0:p.id);switch(l&&(f=l),u){case d.G.PP:o={addressId:f,geoLocations:{},radius:30,additionalIdType:"PICKUP_POINTX9"},e="searchPickUpStoreLocations";break;case d.G.PO:default:o={addressId:f,geoLocations:{},radius:30,additionalIdType:"POSTAL_OFFICEX9"}}return a(o)},{onMutate:async n=>{(null==n?void 0:n.id)&&(e+=n.id)},onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})}},15277:function(n,e,i){i.d(e,{Nb:function(){return h},Ih:function(){return y},Gt:function(){return g},Cm:function(){return m},DR:function(){return C},tg:function(){return b},os:function(){return E},PA:function(){return S},AY:function(){return x}});var t,o,l=i(82066),r=i(38062),d=i(11946);i(63459);var a=i(99306);(t=o||(o={})).isBase="IsBase",t.isBaseMobile="IsBaseMobile",t.isAdvanced="IsAdvanced",t.IsAdvancedMobile="IsAdvancedMobile",t.isPost="IsPost",t.isEvolved="IsEvolved",t.IsEvolvedMobile="IsEvolvedMobile",t.isEditAddress="IsEditAddress",t.IsUltraMobile="IsUltraMobile",t.ShippingMethodCode="deliveryShippingMethodCode";let u=n=>{if((null==n?void 0:n.length)>0){let e=null==n?void 0:n.find(n=>null==n?void 0:n.isSelected);return(null==e?void 0:e.code)||"S"}return(0,d.PQ)()?"S":"T"},s=(n,e,i)=>r.Wd.get("".concat(a.b.ORDER,"/").concat(n).concat(a.b.DELIVERY_DETAILS),{searchParams:e,...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),c=(n,e,i)=>r.Wd.get("".concat(a.b.ORDER_V2,"/").concat(n).concat(a.b.DELIVERY_DETAILS),{searchParams:e,...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),v=(n,e)=>r.Wd.post("".concat(a.b.ORDER,"/").concat(n).concat(a.b.DELIVERY_DETAILS),e),p=(n,e,i)=>r.Wd.post("".concat(a.b.ORDER_V2,"/").concat(n).concat(a.b.DELIVERY_DETAILS),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),f=(n,e)=>r.Wd.post("".concat(a.b.REPLACE_BILLING_ADDRESS,"/").concat(n,"/replaceBillingAddress"),e),g=(n,e)=>{var i,t,o,l;let u=(null==e?void 0:e.keyDependency)?null===(i=e.keyDependency)||void 0===i?void 0:i[0]:"deliveryDetailsIsBase",c=(0,a.f)("customerData"),v=(0,a.f)("findCaller"),p=(0,a.f)("patchCustomer"),f=(0,a.f)("shoppingCart"),g=null==f?void 0:f.id,m=(null==c?void 0:null===(t=c[0])||void 0===t?void 0:t.id)||(null==p?void 0:null===(o=p.owningIndividual)||void 0===o?void 0:o.id)||(null==v?void 0:null===(l=v.customerRef)||void 0===l?void 0:l.id),h=!!g&&!!m,y=(null==e?void 0:e.enabled)!==void 0?h&&e.enabled:h,b={queryKey:[u],queryFn:()=>s(g,{salesChannel:"selfService",...!n&&{mode:"loadConfiguration"},customerId:m,filter:"All",lob:"WS"},e),options:{...e&&{...e},enabled:y,onSuccess:n=>{r.KF.debug("delivery success",n),localStorage.setItem("".concat(u),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(u,": "),n),localStorage.setItem("".concat(u),JSON.stringify((0,d.nQ)("".concat(u),n)))}}};return(0,r.Aq)(b)},m=n=>{var e,i,t,o;let l=(null==n?void 0:n.keyDependency)?null===(e=n.keyDependency)||void 0===e?void 0:e[0]:"deliveryDetailsIsBase",u=(0,a.f)("customerData"),s=(0,a.f)("findCaller"),v=(0,a.f)("patchCustomer"),p=(0,a.f)("shoppingCart"),f=null==p?void 0:p.id,g=(null==u?void 0:null===(i=u[0])||void 0===i?void 0:i.id)||(null==v?void 0:null===(t=v.owningIndividual)||void 0===t?void 0:t.id)||(null==s?void 0:null===(o=s.customerRef)||void 0===o?void 0:o.id),m=!!f&&!!g,h=(null==n?void 0:n.enabled)!==void 0?m&&n.enabled:m,y={queryKey:[l],queryFn:()=>c(f,{salesChannel:"selfService",mode:"loadConfiguration",customerId:g,filter:"All",lob:"WL",identificationMethod:"NA"},n),options:{...n&&{...n},enabled:h,onSuccess:n=>{r.KF.debug("delivery success",n),localStorage.setItem("".concat(l),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(l,": "),n),localStorage.setItem("".concat(l),JSON.stringify((0,d.nQ)("".concat(l),n)))}}};return(0,r.Aq)(y)},h=(n,e)=>{var i,t,o,l;let u=(null==e?void 0:e.keyDependency)?null===(i=e.keyDependency)||void 0===i?void 0:i[0]:"deliveryDetailsIsAdvance",c=(0,a.f)("customerData"),v=(0,a.f)("findCaller"),p=(0,a.f)("patchCustomer"),f=(0,a.f)("shoppingCart"),g=null==f?void 0:f.id,m=(null==c?void 0:null===(t=c[0])||void 0===t?void 0:t.id)||(null==p?void 0:null===(o=p.owningIndividual)||void 0===o?void 0:o.id)||(null==v?void 0:null===(l=v.customerRef)||void 0===l?void 0:l.id),h=!!g&&!!m,y=(null==e?void 0:e.enabled)!==void 0?h&&e.enabled:h,b={queryKey:[u],queryFn:()=>s(g,{salesChannel:"selfService",mode:"loadConfiguration",identificationMethod:n,customerId:m,filter:"All",lob:"WS"},e),options:{...e&&{...e},enabled:y,onSuccess:n=>{r.KF.debug("delivery success",n),localStorage.setItem("".concat(u),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(u,": "),n),localStorage.setItem("".concat(u),JSON.stringify((0,d.nQ)("".concat(u),n)))}}};return(0,r.Aq)(b)},y=(n,e,i,t)=>{var o,l,u,s;let v=(null==t?void 0:t.keyDependency)?null===(o=t.keyDependency)||void 0===o?void 0:o[0]:"deliveryDetailsIsAdvance",p=(0,a.f)("customerData"),f=(0,a.f)("findCaller"),g=(0,a.f)("patchCustomer"),m=(0,a.f)("shoppingCart"),h=null==m?void 0:m.id,y=(null==p?void 0:null===(l=p[0])||void 0===l?void 0:l.id)||(null==g?void 0:null===(u=g.owningIndividual)||void 0===u?void 0:u.id)||(null==f?void 0:null===(s=f.customerRef)||void 0===s?void 0:s.id),b=!!h&&!!y,C=(null==t?void 0:t.enabled)!==void 0?b&&t.enabled:b,E={queryKey:[v],queryFn:()=>c(h,{salesChannel:"selfService",identificationMethod:n,addressId:e,deliveryMethod:i,filter:"All",lob:"WL"},t),options:{...t&&{...t},enabled:C,onSuccess:n=>{r.KF.info("delivery success",n),localStorage.setItem("".concat(v),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(v,": "),n),localStorage.setItem("".concat(v),JSON.stringify((0,d.nQ)("".concat(v),n)))}}};return(0,r.Aq)(E)},b=(n,e,i)=>{var t,o,l,s;let v=(null==i?void 0:i.keyDependency)?null===(t=i.keyDependency)||void 0===t?void 0:t[0]:"deliveryDetailsIsEvolvedMobile",p=(0,a.f)("customerData"),f=(0,a.f)("findCaller"),g=(0,a.f)("patchCustomer"),m=(0,a.f)("shoppingCart"),h=null==m?void 0:m.id,y=(null==p?void 0:null===(o=p[0])||void 0===o?void 0:o.id)||(null==g?void 0:null===(l=g.owningIndividual)||void 0===l?void 0:l.id)||(null==f?void 0:null===(s=f.customerRef)||void 0===s?void 0:s.id),b=!!h&&!!y,C=(null==i?void 0:i.enabled)!==void 0?b&&i.enabled:b,E={queryKey:[v],queryFn:()=>{var n;let t=(0,a.f)("deliveryDetailsIsAdvance");t&&!Array.isArray(t)&&(t=[t]);
1let{deliveryDetails:o,identificationDetails:l}=null==t?void 0:t[0],r=null==l?void 0:l.filter(n=>!0===n.isSelected);return c(h,{salesChannel:"selfService",mode:"reviewMode",identificationMethod:(null==r?void 0:null===(n=r[0])||void 0===n?void 0:n.code)||"NA",deliveryMethod:(null==e?void 0:e.storeId)?(null==e?void 0:e.typePickupPoint)||"PO":u(o),customerId:y,filter:"All",lob:"WL"},i)},options:{...i&&{...i},enabled:C,onSuccess:n=>{r.KF.debug("delivery success",n),localStorage.setItem("".concat(v),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(v,": "),n),localStorage.setItem("".concat(v),JSON.stringify((0,d.nQ)("".concat(v),n)))}}};return(0,r.Aq)(E)},C=(n,e,i,t)=>{var o,l,c,v;let p=(null==t?void 0:t.keyDependency)?null===(o=t.keyDependency)||void 0===o?void 0:o[0]:"deliveryDetailsIsEvolvedMobile",f=(0,a.f)("customerData"),g=(0,a.f)("findCaller"),m=(0,a.f)("patchCustomer"),h=(0,a.f)("shoppingCart"),y=null==h?void 0:h.id,b=(null==f?void 0:null===(l=f[0])||void 0===l?void 0:l.id)||(null==m?void 0:null===(c=m.owningIndividual)||void 0===c?void 0:c.id)||(null==g?void 0:null===(v=g.customerRef)||void 0===v?void 0:v.id),C=!!y&&!!b,E=(null==t?void 0:t.enabled)!==void 0?C&&t.enabled:C,S={queryKey:[p],queryFn:()=>{var o;let l=(0,a.f)("deliveryDetailsIsAdvance");l&&!Array.isArray(l)&&(l=[l]);let{deliveryDetails:r,identificationDetails:d}=null==l?void 0:l[0],c=null==d?void 0:d.filter(n=>!0===n.isSelected),v=(null==c?void 0:null===(o=c[0])||void 0===o?void 0:o.code)||(i?"VR":"NA"),p=(null==e?void 0:e.storeId)?(null==e?void 0:e.locationAddress)||(null==e?void 0:e.storeAddress):n,f=(null==e?void 0:e.storeId)?(null==e?void 0:e.typePickupPoint)||"PO":u(r);return s(y,{salesChannel:"selfService",mode:"loadConfiguration",identificationMethod:v,addressId:(null==p?void 0:p.id)||(null==e?void 0:e.storeId),deliveryMethod:f,filter:"All",lob:"WS"},t)},options:{...t&&{...t},enabled:E,onSuccess:n=>{r.KF.debug("delivery success",n),localStorage.setItem("".concat(p),JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - ".concat(p,": "),n),localStorage.setItem("".concat(p),JSON.stringify((0,d.nQ)("".concat(p),n)))}}};return(0,r.Aq)(S)},E=()=>{let n=(0,l.useQueryClient)();return(0,l.useMutation)(["postDeliveryServiceDetailsMutation"],n=>{var e,i,t,o,l,r,d;let{shippingAddress:s,pickupPoint:c,isEsim:p}=n,f=(0,a.f)("shoppingCart"),g=null==f?void 0:f.id,m=(0,a.f)("deliveryDetailsIsEvolvedMobile");m&&!Array.isArray(m)&&(m=[m]);let{deliveryItems:h,identificationDetails:y,recipientDetails:b,deliveryDetails:C}=null==m?void 0:m[0],E=null==y?void 0:y.filter(n=>!0===n.isSelected),S=(null==E?void 0:null===(e=E[0])||void 0===e?void 0:e.code)||(p?"VR":"NA"),x=(null==c?void 0:c.storeId)?(null==c?void 0:c.locationAddress)||(null==c?void 0:c.storeAddress):s,I=(null==c?void 0:c.storeId)?(null==c?void 0:c.typePickupPoint)||"PO":u(C),A=null==C?void 0:null===(o=C[0])||void 0===o?void 0:null===(t=o.shippingOptions)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.name,_=(null==c?void 0:c.storeId)?{id:c.storeId,addressId:(null==c?void 0:null===(l=c.locationAddress)||void 0===l?void 0:l.id)||(null==c?void 0:null===(r=c.storeAddress)||void 0===r?void 0:r.id)}:{};return v(g,{deliveryMethodCode:I,shippingMethodCode:A,indetificationMethodCode:S,recipientDetails:{recipientAddress:{id:null==x?void 0:x.id,...(null==c?void 0:c.storeId)&&x},contactPhoneNumber:null==b?void 0:b.contactPhoneNumber,contactEmailAddress:null==b?void 0:b.contactEmailAddress,recipientName:{formattedName:null==b?void 0:null===(d=b.recipientName)||void 0===d?void 0:d.formattedName},notes:null==s?void 0:s.note},pickUpDetails:_,deliveryItems:h})},{onSuccess:e=>{let i=e?JSON.stringify(e):"";localStorage.setItem("postDeliveryServiceDetails",i),n.setQueryData("postDeliveryServiceDetails",e)},onError:e=>{r.KF.error("ERROR - postDeliveryServiceDetails: ",e),n.setQueryData("postDeliveryServiceDetails",(0,d.nQ)("postDeliveryServiceDetails",e)),localStorage.setItem("postDeliveryServiceDetails",JSON.stringify((0,d.nQ)("postDeliveryServiceDetails",e)))}})},S=()=>{let n=(0,l.useQueryClient)();return(0,l.useMutation)(["postDeliveryServiceDetailsMutation"],n=>{let e,{shippingAddress:i,pickupPoint:t}=n,o=(0,a.f)("shoppingCart"),l=null==o?void 0:o.id,r=(0,a.f)("deliveryDetailsIsEvolved");r&&!Array.isArray(r)&&(r=[r]);let d=[],u=r;if(e=(null==t?void 0:t.storeId)?(null==t?void 0:t.locationAddress)||(null==t?void 0:t.storeAddress):i,u){let n=n=>{var o,l,r,d,a,u,s,c,v;
1let{deliveryItems:p,identificationDetails:f,recipientDetails:g}=n,m=null==f?void 0:f.filter(n=>!0===n.isSelected),h=null==m?void 0:null===(o=m[0])||void 0===o?void 0:o.code,y=(null==p?void 0:null===(u=p[0])||void 0===u?void 0:null===(a=u.details)||void 0===a?void 0:null===(d=a[0])||void 0===d?void 0:null===(r=d.shippingOptions)||void 0===r?void 0:null===(l=r[0])||void 0===l?void 0:l.name)||"ST",b=(null==t?void 0:t.storeId)?{id:t.storeId,addressId:(null==t?void 0:null===(s=t.locationAddress)||void 0===s?void 0:s.id)||(null==t?void 0:null===(c=t.storeAddress)||void 0===c?void 0:c.id)}:{},C=(n=>{let e=[];return null==n||n.forEach(n=>{var i,t;(null==n?void 0:null===(i=n.items)||void 0===i?void 0:i.length)>0&&(null==n||null===(t=n.items)||void 0===t||t.forEach(n=>{n&&e.push(n)}))}),e})(p),E=null==C?void 0:C.some(n=>{var e;return(null===(e=n.itemType)||void 0===e?void 0:e.toLowerCase())==="ant"}),S=(null==t?void 0:t.storeId)?(null==t?void 0:t.typePickupPoint)||"PO":(n=>{if((null==n?void 0:n.length)>0){let e=[];null==n||n.forEach(n=>{var i;return e.push((null==n?void 0:null===(i=n.details)||void 0===i?void 0:i[0])||{})});let i=null==e?void 0:e.find(n=>null==n?void 0:n.isSelected);return(null==i?void 0:i.code)||"S"}return"T"})(p);return E&&(S="T"),{deliveryMethodCode:S,shippingMethodCode:y,indetificationMethodCode:h,recipientDetails:{recipientAddress:{id:null==e?void 0:e.id,...(null==t?void 0:t.storeId)&&e},contactPhoneNumber:null==g?void 0:g.contactPhoneNumber,contactEmailAddress:null==g?void 0:g.contactEmailAddress,recipientName:{formattedName:null==g?void 0:null===(v=g.recipientName)||void 0===v?void 0:v.formattedName},notes:null==i?void 0:i.note},pickUpDetails:b,deliveryItems:C}};Array.isArray(u)?null==u||u.forEach(e=>{d.push({...n(e)})}):d.push({...n(u)})}return p(l,d)},{onSuccess:e=>{let i=e?JSON.stringify(e):"";localStorage.setItem("postDeliveryServiceDetails",i),n.setQueryData("postDeliveryServiceDetails",e)},onError:e=>{r.KF.error("ERROR - postDeliveryServiceDetails: ",e),n.setQueryData("postDeliveryServiceDetails",(0,d.nQ)("postDeliveryServiceDetails",e)),localStorage.setItem("postDeliveryServiceDetails",JSON.stringify((0,d.nQ)("postDeliveryServiceDetails",e)))}})},x=()=>{let n=(0,l.useQueryClient)();return(0,l.useMutation)(["replaceBillingAddress"],n=>{let{billingAccountId:e,billingAddressId:i,billingAddressType:t}=n;return f(e,{billingAddressId:i,billingAddressType:t})},{onSuccess:e=>{let i=e?JSON.stringify(e):"";localStorage.setItem("postDeliveryServiceDetails",i),n.setQueryData("postDeliveryServiceDetails",e)},onError:e=>{r.KF.error("ERROR - postDeliveryServiceDetails: ",e),n.setQueryData("postDeliveryServiceDetails",(0,d.nQ)("postDeliveryServiceDetails",e)),localStorage.setItem("postDeliveryServiceDetails",JSON.stringify((0,d.nQ)("postDeliveryServiceDetails",e)))}})}},69011:function(n,e,i){i.d(e,{d:function(){return a}});var t=i(82066),o=i(99306),l=i(11946),r=i(41307);let d=(n,e)=>r.W.post("".concat(o.b.CARE_V1,"/").concat(o.b.NOTIFY),n,{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)(["notifyService"],()=>{var n,e,i,t,r,a,u,s,c,v,p,f,g,m,h,y;let b;let C=(0,l.YZ)(),E=(0,o.f)("customerData"),S=(0,o.f)("shoppingCart"),x=(0,o.f)("findCaller"),I=null==S?void 0:S.id,A=(null==E?void 0:null===(e=E[0])||void 0===e?void 0:null===(n=e.owningIndividual)||void 0===n?void 0:n.id)||(null==x?void 0:null===(i=x.individualRef)||void 0===i?void 0:i.contactId),_=(null==E?void 0:null===(u=E[0])||void 0===u?void 0:null===(a=u.owningIndividual)||void 0===a?void 0:null===(r=a.contactMedium)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.emailAddress)||(null===(s=localStorage)||void 0===s?void 0:s.getItem("email_cus"))||"",T=(null==E?void 0:null===(v=E[0])||void 0===v?void 0:null===(c=v.owningIndividual)||void 0===c?void 0:c.firstName)||(null==x?void 0:null===(p=x.individualRef)||void 0===p?void 0:p.firstName)||(null===(f=localStorage)||void 0===f?void 0:f.getItem("name_cus"))||"",N=(null==E?void 0:null===(m=E[0])||void 0===m?void 0:null===(g=m.owningIndividual)||void 0===g?void 0:g.lastName)||(null==x?void 0:null===(h=x.individualRef)||void 0===h?void 0:h.lastName)||(null===(y=localStorage)||void 0===y?void 0:y.getItem("surname_cus"));return A&&S&&(b={template:"sendContractSummary",lastName:N,firstName:T,email:_,orderId:I,contractSummaryLink:["https://myvfapp-aem.vodafone.it/content/dam/myvf/mva10/cce-pdf/".concat((null==C?void 0:C.offerId)||"3556298",".pdf")],individualId:A}),d(b)},{onSuccess:e=>{localStorage.setItem("notify","1"),n.setQueryData("notify",e)},onError:e=>{r.K.error("ERROR - notify: ",e),n.setQueryData("notify",(0,l.nQ)("notify",e)),localStorage.setItem("notify",JSON.stringify((0,l.nQ)("notify",e)))}})}},42250:function(n,e,i){i.d(e,{V:function(){return a}});var t=i(82066),o=i(1733),l=i(99306),r=i(38062);let d=(n,e)=>r.Wd.get("".concat(l.b.ORDER,"/").concat(n,"/").concat(l.b.PAYMENT),{searchParams:{salesChannel:"selfService",levelOfData:"amount,paymentMethod,paymentDistribution"},...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),a=n=>{let e=(0,t.useQueryClient)(),i=(0,l.f)("shoppingCart"),a=null==i?void 0:i.id,u=n?n.enabled&&!!a:!!a,s={queryKey:n&&n.keyDependency?n.keyDependency:"paymentData",queryFn:()=>d(a,n),options:{...n&&{...n},enabled:u,onSuccess:n=>{e.setQueryData("paymentData",n),localStorage.setItem("paymentData",JSON.stringify(n))},onError:n=>{r.KF.error("ERROR - paymentData: ",n),localStorage.setItem("paymentData",JSON.stringify((0,o.n)("paymentData",n)))}}};return(0,r.Aq)(s)}},12517:function(n,e,i){i.d(e,{H:function(){return d}});var t=i(82066),o=i(41307),l=i(99306);let r=(n,e,i)=>o.W.post("".concat(l.b.ORDER,"/").concat(n,"/").concat(l.b.UPDATE_VOUCHER),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),d=()=>(0,t.useMutation)(["reserveUnreserveVoucher"],n=>{var e,i;let{voucherId:t,status:o,boArray:d}=n,a=(0,l.f)("shoppingCart"),u=(0,l.f)("customerData"),s=(0,l.f)("findCaller");return r(null==a?void 0:a.id,{voucherId:t,customerId:(null==u?void 0:null===(e=u[0])||void 0===e?void 0:e.id)||(null==s?void 0:null===(i=s.customerRef)||void 0===i?void 0:i.id),status:o,boArray:d})},{onSuccess:n=>{o.K.log("Reserve unreserve",n)},onError:n=>{o.K.error("ERROR - reserveUnreserveVoucher: ",n)}})},62110:function(n,e,i){i.d(e,{TT:function(){return u},ko:function(){return a}});var t=i(82066),o=i(41307),l=i(34734),r=i(99306);let d=async(n,e,i,t)=>o.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.SUBMIT),e,{searchParams:{...o.W.searchParams,...t},...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("submitMutation",()=>{var n,e,i,t,o,l,a,u,s;let c=(0,r.f)("shoppingCart"),v=(0,r.f)("findCaller"),p=null==c?void 0:c.id,f=null==c?void 0:c.cartItem[0],g=(0,r.f)("customerData");
1return d(p,{customerId:(null==g?void 0:null===(n=g[0])||void 0===n?void 0:n.id)||(null==v?void 0:null===(e=v.customerRef)||void 0===e?void 0:e.id),isPortIn:!0,deliveryMethod:(n=>{if((null==n?void 0:n.length)>0){let e=[];null==n||n.forEach(n=>{var i;return e.push((null==n?void 0:null===(i=n.details)||void 0===i?void 0:i[0])||{})});let i=null==e?void 0:e.find(n=>null==n?void 0:n.isSelected);return(null==i?void 0:i.code)||"S"}return"T"})(null===(i=(0,r.f)("deliveryDetailsIsAdvance")[0])||void 0===i?void 0:i.deliveryItems),productsInOrders:[{orderItemId:null==f?void 0:null===(o=f.dataSim)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:t.id},{orderItemId:null==f?void 0:null===(a=f.fixedVoice)||void 0===a?void 0:null===(l=a[0])||void 0===l?void 0:l.id},{orderItemId:null==f?void 0:null===(s=f.internet)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:u.id}]},void 0,{bypassChargeDistribution:"true"})},{onSuccess:e=>{localStorage.setItem("submitOrder",JSON.stringify(e)),n.setQueryData("submitQuery",e)},onError:e=>{o.K.error("ERROR - submitQuery: ",e),n.setQueryData("submitQuery",(0,l.n)("submitQuery",e)),localStorage.setItem("submitQuery",JSON.stringify((0,l.n)("submitQuery",e)))}})},u=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("submitMutation",()=>{var n,e,i,t,o;let a=(0,r.f)("shoppingCart"),u=(0,r.f)("customerData"),s=(0,r.f)("findCaller"),c=(0,r.f)("postDeliveryServiceDetails"),v=localStorage.getItem("portability"),p=(null==c?void 0:null===(e=c.deliveryDetails)||void 0===e?void 0:null===(n=e[0])||void 0===n?void 0:n.code)||"",f=null==a?void 0:a.id,g=null==a?void 0:null===(i=a.cartItem)||void 0===i?void 0:i[0],m=(null==u?void 0:null===(t=u[0])||void 0===t?void 0:t.id)||(null==s?void 0:null===(o=s.customerRef)||void 0===o?void 0:o.id),h=(0,l.R)();return d(f,{customerId:m,isPortIn:"1"===v,deliveryMethod:p,productsInOrders:[{orderItemId:null==g?void 0:g.id}],checkSimSwapCounter:!1,...h&&{fwtoken:h}},void 0,{bypassChargeDistribution:"true"})},{onSuccess:e=>{localStorage.setItem("submitOrder",JSON.stringify(e)),n.setQueryData("submitQuery",e)},onError:e=>{o.K.error("ERROR - submitQuery: ",e),n.setQueryData("submitQuery",(0,l.n)("submitQuery",e)),localStorage.setItem("submitQuery",JSON.stringify((0,l.n)("submitQuery",e)))}})}},74145:function(n,e,i){i.d(e,{b9:function(){return a},n3:function(){return u}});var t=i(82066),o=i(41307),l=i(34734),r=i(99306);let d=async(n,e,i)=>o.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.SUBMIT_WITH_PAYMENT),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("submitMutation",()=>{var n,e,i,t,l,a,u,s,c,v,p,f,g;let m=(0,r.f)("shoppingCart"),h=(0,r.f)("customerData"),y=(0,r.f)("billingAccount"),b=(0,r.f)("postDeliveryServiceDetails"),C=(0,r.f)("authorize"),E=(0,r.f)("findCaller"),S=localStorage.getItem("portability"),x=m&&(null==m?void 0:m.id),I=m&&(null==m?void 0:m.cartItem[0]),A=(null==h?void 0:null===(n=h[0])||void 0===n?void 0:n.id)||(null==E?void 0:null===(e=E.customerRef)||void 0===e?void 0:e.id),_=null==C?void 0:null===(i=C.authorizationParameters)||void 0===i?void 0:i.siaOrderId,T=[],N=n=>{let e=[];return null==n||n.forEach(n=>{var i,t;(null==n?void 0:null===(i=n.items)||void 0===i?void 0:i.length)>0&&(null==n||null===(t=n.items)||void 0===t||t.forEach(n=>{n&&e.push(n)}))}),e},L=n=>{N(n||[]).forEach(n=>T.push(n))};Array.isArray(b)?null==b||b.forEach(n=>{L((null==n?void 0:n.deliveryItems)||[])}):L((null==b?void 0:b.deliveryItems)||[]);let O=null==T?void 0:T.some(n=>{var e;return(null===(e=n.itemType)||void 0===e?void 0:e.toLowerCase())==="ant"}),R=(n=>{if((null==n?void 0:n.length)>0){let e=[];null==n||n.forEach(n=>{var i;return e.push((null==n?void 0:null===(i=n.details)||void 0===i?void 0:i[0])||{})});let i=null==e?void 0:e.find(n=>null==n?void 0:n.isSelected);return(null==i?void 0:i.code)||"S"}return"T"})(T);O&&(R="T");let D={customerId:A,immediatePayment:!0,deliveryMethod:R,shipmentCountry:"IT",barId:(null==y?void 0:y.id)||"",isPortIn:"1"===S,productsInOrders:[{orderItemId:null==I?void 0:null===(l=I.dataSim)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.id},{orderItemId:null==I?void 0:null===(u=I.fixedVoice)||void 0===u?void 0:null===(a=u[0])||void 0===a?void 0:a.id},{orderItemId:null==I?void 0:null===(c=I.internet)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:s.id}],deliveryItems:T,invoiceRequired:!1,siaOrderId:_,isFlexiFlow:!1,...(null==h?void 0:null===(p=h[0].financialAccount)||void 0===p?void 0:null===(v=p[0])||void 0===v?void 0:v.id)&&{faId:null==h?void 0:null===(g=h[0].financialAccount)||void 0===g?void 0:null===(f=g[0])||void 0===f?void 0:f.id}};return o.K.debug("SUBMIT PAYMENT payload",D),d(x,D)},{onSuccess:e=>{localStorage.setItem("submitOrder",JSON.stringify(e)),n.setQueryData("submitQuery",e)},onError:e=>{o.K.error("ERROR - submitQuery: ",e),n.setQueryData("submitQuery",(0,l.n)("submitQuery",e)),localStorage.setItem("submitQuery",JSON.stringify((0,l.n)("submitQuery",e)))}})},u=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("submitMutation",()=>{var n,e,i,t,o,a,u,s,c;let v=(0,r.f)("shoppingCart"),p=(0,r.f)("customerData"),f=(0,r.f)("billingAccount"),g=(0,r.f)("postDeliveryServiceDetails"),m=(0,r.f)("authorize"),h=(0,r.f)("findCaller"),y=localStorage.getItem("portability"),b=v&&(null==v?void 0:v.id),C=v&&(null==v?void 0:v.cartItem[0]),E=(null==p?void 0:null===(n=p[0])||void 0===n?void 0:n.id)||(null==h?void 0:null===(e=h.customerRef)||void 0===e?void 0:e.id),S=(null==g?void 0:null===(t=g.deliveryDetails)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.code)||"",x=null==m?void 0:null===(o=m.authorizationParameters)||void 0===o?void 0:o.siaOrderId;return d(b,{fwtoken:(0,l.R)(),customerId:E,immediatePayment:!0,deliveryMethod:S,shipmentCountry:"IT",barId:(null==f?void 0:f.id)||"",isPortIn:"1"===y,productsInOrders:[{orderItemId:null==C?void 0:C.id}],deliveryItems:(null==g?void 0:g.deliveryItems)||[],invoiceRequired:!1,siaOrderId:x,isFlexiFlow:!1,...(null==p?void 0:null===(u=p[0].financialAccount)||void 0===u?void 0:null===(a=u[0])||void 0===a?void 0:a.id)&&{faId:null==p?void 0:null===(c=p[
10].financialAccount)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:s.id}})},{onSuccess:e=>{localStorage.setItem("submitOrder",JSON.stringify(e)),n.setQueryData("submitQuery",e)},onError:e=>{o.K.error("ERROR - submitQuery: ",e),n.setQueryData("submitQuery",(0,l.n)("submitQuery",e)),localStorage.setItem("submitQuery",JSON.stringify((0,l.n)("submitQuery",e)))}})}},23274:function(n,e,i){i.d(e,{R:function(){return a},x:function(){return u}});var t=i(82066),o=i(41307),l=i(9109),r=i(99306);let d=(n,e,i)=>o.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.UPDATE_PRODUCT_CHARACTERISTIC),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)(),e="updateProductCharacteristic";return(0,t.useMutation)(["doUpdateProductCharacteristic"],n=>{var e,i,t,a,u,s,c,v,p,f,g,m,h,y,b;let C;let E=(0,r.f)("shoppingCart"),S=(0,r.f)("findCaller"),x=(0,r.f)("customerData");o.K.log("UPDATE PRODUCT CHARACT GETDATAFROM STORAGE",x,E);let I=null==E?void 0:E.id,A=(null==x?void 0:null===(i=x[0])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.id)||(null==S?void 0:null===(t=S.individualRef)||void 0===t?void 0:t.contactId),_=null==E?void 0:null===(s=E.cartItem)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:null===(a=u.fixedVoice)||void 0===a?void 0:a[0].id,T=null==E?void 0:null===(v=E.cartItem)||void 0===v?void 0:null===(c=v[0])||void 0===c?void 0:c.id,N=!!(null==E?void 0:E.id)&&(null!==(b=null==E?void 0:null===(f=E.cartItem)||void 0===f?void 0:null===(p=f[0])||void 0===p?void 0:p.dataSim)&&void 0!==b?b:[])[0],L=!!N&&(null==N?void 0:N.id),O=null==E?void 0:null===(y=E.cartItem)||void 0===y?void 0:null===(h=y[0])||void 0===h?void 0:null===(m=h.internet)||void 0===m?void 0:null===(g=m[0])||void 0===g?void 0:g.id;return A&&O?(C={updatedProductCharacteristicList:[{contactId:A,orderActionId:O}],runRules:!0},_&&C.updatedProductCharacteristicList.push({contactId:A,orderActionId:_}),L&&!n&&C.updatedProductCharacteristicList.push({contactId:A,orderActionId:L}),n&&(C.optionToReconsider=n.replace(/^./,n[0].toUpperCase()))):A&&T&&(0,l.P)()&&(C={updatedProductCharacteristicList:[{contactId:A,orderActionId:T}],runRules:!0}),o.K.debug("doUpdateProductCharacteristic : ",C),o.K.debug("doUpdateProductCharacteristic : ",n),localStorage.setItem("optionToReconsider",null==n?void 0:n.toLowerCase()),o.K.debug("doUpdateProductCharacteristic before calling service : ",C),d(I,C)},{onMutate:async n=>{n&&(e="updateProductCharacteristic_2")},onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})},u=()=>{let n=(0,t.useQueryClient)(),e="UPCAutomaticRecharge";return(0,t.useMutation)([e],n=>{var e,i,t,o,l,a,u,s,c;let v=(0,r.f)("shoppingCart"),p=null==v?void 0:v.id,f=null==v?void 0:null===(i=v.cartItem)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.id,g=null==v?void 0:null===(l=v.cartItem)||void 0===l?void 0:null===(o=l[0])||void 0===o?void 0:null===(t=o.product)||void 0===t?void 0:t.id,m=null==v?void 0:null===(c=v.cartItem)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:null===(u=s.product)||void 0===u?void 0:null===(a=u.productCharacteristic)||void 0===a?void 0:a.find(n=>"Is_Recurring_TopUp_Automatically_Included_Next_R07"===n.name);return d(p,{updatedProductCharacteristicList:[{productId:g,orderActionId:f,productCharacteristic:{id:(null==m?void 0:m.id)||"",selectedValue:n}}],runRules:!0})},{onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})}},40858:function(n,e,i){i.d(e,{W:function(){return a}});var t=i(82066),o=i(41307),l=i(1733),r=i(99306);let d=(n,e,i)=>o.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.VALIDATE_VOUCHER),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)(),e="validateVoucher";return(0,t.useMutation)(["doValidateVoucher"],n=>{var e,i;let{voucherId:t}=n,o=(0,r.f)("shoppingCart"),l=(0,r.f)("customerData"),a=(0,r.f)("findCaller");return d(null==o?void 0:o.id,{voucherId:t,customerId:(null==l?void 0:null===(e=l[0])||void 0===e?void 0:e.id)||(null==a?void 0:null===(i=a.customerRef)||void 0===i?void 0:i.id)})},{onSuccess:i=>{localStorage.setItem(e,JSON.stringify(i)),n.setQueryData(e,i)},onError:i=>{o.K.error("ERROR - ".concat(e,": "),i),n.setQueryData(e,(0,l.n)("".concat(e),i)),localStorage.setItem("".concat(e),JSON.stringify((0,l.n)("".concat(e),i)))}})}},15565:function(n,e,i){i.d(e,{I:function(){return u},O:function(){return a}});var t=i(82066),o=i(1733),l=i(99306),r=i(38062);let d=(n,e,i)=>{r.KF.debug("authorizationOrderService orderId: ",e),r.KF.debug("authorizationOrderService siaOrderId: ",i);let t={queryKey:n&&n.keyDependency?n.keyDependency:"authorization",queryFn:()=>r.Wd.get("".concat(l.b.PAYMENT_MANAGEMENT_ORDER,"/").concat(e,"/").concat(l.b.AUTHORIZATION),{searchParams:{...r.Wd.searchParams,siaOrderId:i}}),options:{...n&&{...n}}};return(0,r.Aq)(t)},a=n=>{var e;let i=(0,t.useQueryClient)(),u=null==n?void 0:n.enabled;r.KF.debug("useAuthorizationOrder : ",a);let s=localStorage.getItem("authorize"),c=!!s&&JSON.parse(s),v=null==c?void 0:null===(e=c.authorizationParameters)||void 0===e?void 0:e.siaOrderId;r.KF.debug("useAuthorizationOrder siaOrderId : ",v);let p=localStorage.getItem("shoppingCart"),f=!!p&&JSON.parse(p);r.KF.debug("useAuthorizationOrder shoppingCart : ",f);let g=null==f?void 0:f.id;return r.KF.debug("useAuthorizationOrder cartId : ",g),d({enabled:!!g&&!!v&&u,onSuccess:n=>{var e,t,d;let a=null==n?void 0:null===(t=n.authorization)||void 0===t?void 0:null===(e=t.status)||void 0===e?void 0:e.toLowerCase();if(n&&n.authorization&&a&&"ok"!==a&&"timeoutok"!==a){let e=(0,o.n)("authorization",{status:"200",url:l.b.AUTHORIZATION,statusText:"200"},a,null==n?void 0:null===(d=n.authorization)||void 0===d?void 0:d.errorCode);i.setQueryData("authorizationError",e),localStorage.setItem("authorizationError",JSON.stringify(e))}else localStorage.setItem("authorization",JSON.stringify(n)),r.KF.debug("useAuthorizationOrder data : ",n)},onError:n=>{let e=(0,o.n)("authorization",n);r.KF.error("ERROR - authorization: ",n),r.KF.debug("useAuthorizationOrder error : ",e),i.setQueryData("authorizationError",e),localStorage.setItem("authorizationError",JSON.stringify(e))}},g,v)},u=n=>{var e;let i=(0,t.useQueryClient)(),u=null==n?void 0:n.enabled;r.KF.debug("useAuthorizationOrder : ",a);let s=(0,l.f)("authorize"),c=(0,l.f)("shoppingCart"),v=null==s?void 0:null===(e=s.authorizationParameters)||void 0===e?void 0:e.siaOrderId,p=null==c?void 0:c.id;return d({keyDependency:null==n?void 0:n.keyDependency,enabled:!!p&&!!v&&u,onSuccess:n=>{var e,t;let d=null==n?void 0:null===(t=n.authorization)||void 0===t?void 0:null===(e=t.status)||void 0===e?void 0:e.toLowerCase();if(n&&n.authorization&&d&&"ok"!==d&&"timeoutok"!==d){let n=(0,o.n)("authorization",{status:"200",url:l.b.AUTHORIZATION,statusText:"200"},d);i.setQueryData("authorizationError",n),localStorage.setItem("authorizationError",JSON.stringify(n))}else localStorage.setItem("authorizationRecurring",JSON.stringify(n)),r.KF.debug("useAuthorizationOrder data : ",n)},onError:n=>{let e=(0,o.n)("authorization",n);r.KF.error("ERROR - authorization: ",n),r.KF.debug("useAuthorizationOrder error : ",e),i.setQueryData("authorizationError",e),localStorage.setItem("authorizationError",JSON.stringify(e))}},p,v)}},13409:function(n,e,i){i.d(e,{Sz:function(){return u}});var t=i(82066),o=i(41307),l=i(11946),r=i(99306),d=i(75972);let a=(n,e,i)=>o.W.post("".concat(r.b.PAYMENT_MANAGEMENT_ORDER,"/").concat(e,"/").concat(r.b.AUTHORIZE),n,{searchParams:{...o.W.searchParams,isIBANValidationRequired:"false"},...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),u=()=>{o.K.debug("HANDLE SELECT IN AUTHORIZE");let n=(0,t.useQueryClient)();return(0,t.useMutation)("paymentAuth",n=>{var e,i,t,u,s;let c,{payMeanType:v,siaFlowType:p,authorizationOperation:f}=n,g=(0,l.YZ)(),m=(0,r.f)("shoppingCart"),h=null==m?void 0:m.id;o.K.debug("HANDLE SELECT IN AUTHORIZE ENTER MUTATION CALL");let y=(0,r.f)("payMean"),b=null===(e=(0,l.YZ)())||void 0===e?void 0:e.recurrence,C=null==g?void 0:null===(i=g.offerId)||void 0===i?void 0:i.toString(),E=(0,l.sJ)(y),S=(null===(u=(0,l.Bv)(l.MM.RECURRING))||void 0===u?void 0:null===(t=u.formattedPrice)||void 0===t?void 0:t.toString())||0,x=(0,l.k1)(),I=(0,l.Bv)(l.MM.SHIPPING),A=x.price||0;I.price&&(A+=I.price);let _=f;_||(_=v?"capture":"verify");let T=(g.isLockInProduct||g.isLockInMMProduct?"".concat(S,"â¬"):null===(s=(0,l.YZ)())||void 0===s?void 0:s.price).trim().toString().replace(",",".").replace("/",",").replace("â¬","€"),N=v||(null==E?void 0:E.type)||void 0,L=y&&"verify"===_?null==E?void 0:E.id:void 0,O=A?T.concat(",".concat(b,",").concat(C,",").concat(A,"€")):T.concat(",".concat(b,",").concat(C,",")),R=p===d.K.RECURRENT?"onBill":"immediate";c=(0,l.PQ)()?"Sunrise_Mobile_Cop":(()=>{var n,e,i,t;let o=null==N?void 0:null===(t=N.toString())||void 0===t?void 0:null===(i=t.toLowerCase())||void 0===i?void 0:i.includes(null===(e=d.Q.PAYPAL)||void 0===e?void 0:null===(n=e.toString())||void 0===n?void 0:n.toLowerCase());return null!=g&&!!g.enableRecurringPayment&&!o||null!=g&&!!g.enableRecurringPayment&&!!o&&"immediate"===R})()?"Sunrise_Mobile_Cop":"cop";let D={payMeanType:N,payMeanPurpose:R,authorizationOperation:_,flowType:c,orddescr:O,payMeanId:L};return o.K.debug("NEW PAYMENT CARD PAYLOAD : ",D),a(D,h)},{onSuccess:e=>{localStorage.setItem("authorize",JSON.stringify(e)),o.K.debug("authorize SUCCESS",e),n.setQueryData("authorize",e)},onError:e=>{o.K.error("ERROR - authorize: ",e),n.setQueryData("authorize",(0,l.nQ)("authorize",e)),localStorage.setItem("authorize",JSON.stringify((0,l.nQ)("authorize",e)))}})}},26382:function(n,e,i){i.d(e,{v:function(){return a}});var t=i(82066),o=i(41307),l=i(1733),r=i(10727);let d=(n,e,i)=>o.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.LIGHT_CREDIT_VETTING),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("lightCreditCardVetting",()=>{var n;let e=localStorage.getItem("shoppingCart"),i=!!e&&JSON.parse(e);o.K.debug("shoppingCart : ",i);let t=null==i?void 0:i.id,l=localStorage.getItem("billingAccount"),r=!!l&&JSON.parse(l),a=null==r?void 0:null===(n=r.billDeliveryDetails)||void 0===n?void 0:n.physicalAddress;return o.K.debug("physicalAddress : ",a),d(t,{shippingAddress:{id:null==a?void 0:a.id,street:null==a?void 0:a.street,streetNumber:null==a?void 0:a.streetNumber,city:null==a?void 0:a.city,country:null==a?void 0:a.country,stateOrProvince:null==a?void 0:a.stateOrProvince,postalCode:null==a?void 0:a.postalCode,formattedAddress1:(null==a?void 0:a.formattedAddress)||(null==a?void 0:a.formattedAddress1)}})},{onSuccess:e=>{o.K.debug("SUCCESS",e),n.setQueryData("lightCreditVetting",e)},onError:e=>{o.K.error("ERROR - lightCreditVetting: ",e),n.setQueryData("lightCreditVetting",(0,l.n)("lightCreditVetting",e)),localStorage.setItem("lightCreditVetting",JSON.stringify((0,l.n)("lightCreditVetting",e)))}})}},10255:function(n,e,i){i.d(e,{a9:function(){return c},WQ:function(){return v}});var t=i(82066),o=i(41307),l=i(99306),r=i(11946),d=i(71581);let a=(n,e,i,t)=>(o.K.debug("paymentDistributionService PAYLOAD -------",i),o.K.debug("paymentDistributionService siaOrderId -------",e),o.K.debug("paymentDistributionService cartId -------",n),o.W.post("".concat(l.b.ORDER,"/").concat(n,"/").concat(l.b.PAYMENT_DISTRIBUTION),i,{searchParams:{...o.W.searchParams,siaOrderId:e},...(null==t?void 0:t.headers)&&{headers:t.headers},...(null==t?void 0:t.silentLoginHeaders)&&{silentLoginHeaders:t.silentLoginHeaders}})),u=(n,e)=>{var i,t;o.K.debug("findBillingOfferId : ",n);let l=null==n?void 0:n.filter(n=>(null==n?void 0:n.orderActionId)===e);return null==l?void 0:null===(t=l[0])||void 0===t?void 0:null===(i=t.orderItemOnBillPayment)||void 0===i?void 0:i.billingOfferIdForDistribution},s=(n,e,i)=>(o.K.debug("PAYMENT DISTRIBUTION",n,e,i),null==n?void 0:n.filter(n=>!!n).map(n=>({orderActionId:n,orderItemOnBillPayment:{selectedPayMean:e,billingOfferIdForDistribution:u(i,n)}}))),c=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("paymentDistribution",()=>{var n,e,i,t,r,d,u,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M,P,w,k,j,B,F;o.K.debug("------PaymentDistribution");let z=(0,l.f)("shoppingCart"),Z=(0,l.f)("authorize"),H=(0,l.f)("customerData"),V=(0,l.f)("billingAccount"),U=(0,l.f)("paymentData"),Q=(0,l.f)("findCaller"),G=(0,l.f)("authorizationRecurring"),Y=(0,l.f)("authorization"),W=G||Y,J=null==U?void 0:null===(n=U.orderPayment)||void 0===n?void 0:n.orderItemPayments,X=null==Z?void 0:null===(e=Z.authorizationParameters)||void 0===e?void 0:e.siaOrderId,q=(null==H?void 0:null===(i=H[0])||void 0===i?void 0:i.id)||(null==Q?void 0:null===(t=Q.customerRef)||void 0===t?void 0:t.id),K=(null==H?void 0:null===(d=H[0])||void 0===d?void 0:null===(r=d.owningIndividual)||void 0===r?void 0:r.id)||(null==Q?void 0:null===(u=Q.individualRef)||void 0===u?void 0:u.contactId),$=null==z?void 0:z.id,nn=null==z?void 0:null===(c=z.cartItem)||void 0===c?void 0:c[0],ne=null==nn?void 0:null===(p=nn.dataSim)||void 0===p?void 0:null===(v=p[0])||void 0===v?void 0:v.id,ni=s([ne,null==nn?void 0:null===(g=nn.fixedVoice)||void 0===g?void 0:null===(f=g[0])||void 0===f?void 0:f.id,null==nn?void 0:null===(h=nn.internet)||void 0===h?void 0:null===(m=h[0])||void 0===m?void 0:m.id],{object_type:null==W?void 0:null===(b=W.authorization)||void 0===b?void 0:null===(y=b.payMean)||void 0===y?void 0:y.object_type,id:null==W?void 0:null===(E=W.authorization)||void 0===E?void 0:null===(C=E.payMean)||void 0===C?void 0:C.id,type:null==W?void 0:null===(x=W.authorization)||void 0===x?void 0:null===(S=x.payMean)||void 0===S?void 0:S.type,brand:null==W?void 0:null===(A=W.authorization)||void 0===A?void 0:null===(I=A.payMean)||void 0===I?void 0:I.brand,displayBrand:null==W?void 0:null===(T=W.authorization)||void 0===T?void 0:null===(_=T.payMean)||void 0===_?void 0:_.brand,holder
1Name:" ",lastFourDigits:null==W?void 0:null===(L=W.authorization)||void 0===L?void 0:null===(N=L.payMean)||void 0===N?void 0:N.lastFourDigits,expiryMonth:null==W?void 0:null===(R=W.authorization)||void 0===R?void 0:null===(O=R.payMean)||void 0===O?void 0:O.expiryMonth,expiryYear:null==W?void 0:null===(M=W.authorization)||void 0===M?void 0:null===(D=M.payMean)||void 0===D?void 0:D.expiryYear,isVerified:!0,isExpired:!1,ppbId:null==W?void 0:null===(w=W.authorization)||void 0===w?void 0:null===(P=w.payMean)||void 0===P?void 0:P.ppbId},J)||[];return a($,X,{orderPayment:{customerId:q,barId:V.id,ownerIndividualId:K,orderItemPayments:ni},flowType:"fixed",...(null==U?void 0:null===(j=U.orderPayment)||void 0===j?void 0:null===(k=j.orderInstallmentsPayment)||void 0===k?void 0:k.additionalBillPostpaidBillingOffers)&&{additionalBillPostpaidBillingOffers:null==U?void 0:null===(F=U.orderPayment)||void 0===F?void 0:null===(B=F.orderInstallmentsPayment)||void 0===B?void 0:B.additionalBillPostpaidBillingOffers}})},{onSuccess:e=>{localStorage.setItem("paymentDistribution",JSON.stringify(e)),n.setQueryData("paymentDistribution",e)},onError:e=>{o.K.error("ERROR - paymentDistribution: ",e),n.setQueryData("paymentDistribution",(0,r.nQ)("paymentDistribution",e)),localStorage.setItem("paymentDistribution",JSON.stringify((0,r.nQ)("paymentDistribution",e)))}})},v=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("paymentDistribution",()=>{var n,e,i,t,u,c,v,p,f,g,m,h,y,b;let C;o.K.debug("------PaymentDistribution");let E=(0,l.f)("shoppingCart"),S=(0,l.f)("authorize"),x=(0,l.f)("customerData"),I=(0,l.f)("billingAccount"),A=(0,l.f)("paymentData"),_=(0,l.f)("findCaller"),T=(0,l.f)("authorizationRecurring"),N=(0,l.f)("payMean"),L=localStorage.getItem(r.aY),O=(null==L?void 0:L.toLowerCase())===d.Q.WALLET.toLowerCase(),R=null==T?void 0:null===(n=T.authorization)||void 0===n?void 0:n.payMean,D=null==N?void 0:null===(e=N.payMeans)||void 0===e?void 0:e.find(n=>n.lastFourDigits===(null==R?void 0:R.lastFourDigits)&&n.type===(null==R?void 0:R.type)&&n.object_type===(null==R?void 0:R.object_type)),M=null==A?void 0:null===(i=A.orderPayment)||void 0===i?void 0:i.orderItemPayments,P=null==S?void 0:null===(t=S.authorizationParameters)||void 0===t?void 0:t.siaOrderId,w=(null==x?void 0:null===(u=x[0])||void 0===u?void 0:u.id)||(null==_?void 0:null===(c=_.customerRef)||void 0===c?void 0:c.id),k=(null==x?void 0:null===(p=x[0])||void 0===p?void 0:null===(v=p.owningIndividual)||void 0===v?void 0:v.id)||(null==_?void 0:null===(f=_.individualRef)||void 0===f?void 0:f.contactId),j=null==E?void 0:E.id,B=null==E?void 0:null===(g=E.cartItem)||void 0===g?void 0:g[0];C=O?{type:d.Q.WALLET.toLowerCase()}:{object_type:null==R?void 0:R.object_type,type:null==R?void 0:R.type,brand:null==R?void 0:R.brand,displayBrand:null==R?void 0:R.brand,holderName:" ",lastFourDigits:null==R?void 0:R.lastFourDigits,expiryMonth:null==R?void 0:R.expiryMonth,expiryYear:null==R?void 0:R.expiryYear,isVerified:!0,isExpired:!1,ppbId:null==R?void 0:R.ppbId,...(null==D?void 0:D.id)&&{id:D.id}};let F=s([B.id],C,M)||[],z={orderPayment:{customerId:w,barId:I.id,ownerIndividualId:k,orderItemPayments:F},...(null==A?void 0:null===(h=A.orderPayment)||void 0===h?void 0:null===(m=h.orderInstallmentsPayment)||void 0===m?void 0:m.additionalBillPostpaidBillingOffers)&&{additionalBillPostpaidBillingOffers:null==A?void 0:null===(b=A.orderPayment)||void 0===b?void 0:null===(y=b.orderInstallmentsPayment)||void 0===y?void 0:y.additionalBillPostpaidBillingOffers}};return o.K.debug("Payment distribution Payload",z),a(j,P,z)},{onSuccess:e=>{localStorage.setItem("paymentDistribution",JSON.stringify(e)),n.setQueryData("paymentDistribution",e)},onError:e=>{o.K.error("ERROR - paymentDistribution: ",e),n.setQueryData("paymentDistribution",(0,r.nQ)("paymentDistribution",e)),localStorage.setItem("paymentDistribution",JSON.stringify((0,r.nQ)("paymentDistribution",e)))}})}},79753:function(n,e,i){i.d(e,{j:function(){return a}});var t=i(41307),o=i(82066),l=i(9109),r=i(99306);let d=(n,e,i)=>t.W.post("".concat(r.b.ORDER,"/").concat(n,"/").concat(r.b.RESERVE_EQUIPMENT),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=()=>{let n=(0,o.useQueryClient)();return(0,o.useMutation)("reserveEquipmentMutation",()=>{var n,e,i,t,o,a,u,s,c,v,p,f;let g=(0,r.f)("shoppingCart"),m=null==g?void 0:g.id;return d(m,{cartType:(0,l.P)()?null==g?void 0:null===(i=g.cartItem)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:null===(n=e.device)||void 0===n?void 0:n.type:null==g?void 0:null===(o=g.cartItem)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:t.type,deviceOfferingId:(0,l.P)()?null==g?void 0:null===(c=g.cartItem)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:null===(u=s.device)||void 0===u?void 0:null===(a=u.offering)||void 0===a?void 0:a.id:null==g?void 0:null===(f=g.cartItem)||void 0===f?void 0:null===(p=f[0])||void 0===p?void 0:null===(v=p.offering)||void 0===v?void 0:v.id})},{onSuccess:e=>{localStorage.setItem("reserveEquipment",JSON.stringify(e)),n.setQueryData("reserveEquipment",e)},onError:e=>{t.K.error("ERROR - reserveEquipment: ",e),n.setQueryData("reserveEquipment",(0,l.n)("reserveEquipment",e)),localStorage.setItem("reserveEquipment",JSON.stringify((0,l.n)("reserveEquipment",e)))}})}},74228:function(n,e,i){i.d(e,{TW:function(){return u},QJ:function(){return s}});var t=i(82066),o=i(41307),l=i(99306),r=i(11946);let d=(n,e,i)=>o.W.post("".concat(l.b.ORDER,"/").concat(n,"/").concat(l.b.VALIDATE_IBANS),e,{...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),a=(n,e,i)=>{e.map((e,t)=>{e&&(0===t&&n.push({orderActionId:e,orderItemOnBillPayment:{payMeanPurpose:"onBill",selectedPayMean:i},lob:"WL"}),t>0&&n.push({...n[t-1],orderActionId:"".concat(n[t-1].orderActionId,",").concat(e)}))})},u=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("validateIbans",()=>{var n,e,i,t,o,u,s,c,v,p,f,g,m;let h;let y=(0,l.f)("billingAccount"),b=(0,l.f)("shoppingCart"),C=(0,l.f)("payMean"),E=(0,l.f)("authorizationRecurring"),S=null==b?void 0:b.id,x=null==b?void 0:null===(n=b.cartItem)||void 0===n?void 0:n[0],I=(0,r.sJ)(C),A=null==x?void 0:null===(i=x.dataSim)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.id,_=null==x?void 0:null===(o=x.fixedVoice)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:t.id,T=null==x?void 0:null===(s=x.internet)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:u.id;if(E&&I){let n={id:null==I?void 0:I.id,bankCode:null==I?void 0:I.bankCode,branchCode:null==I?void 0:I.branchCode,holderName:null==I?void 0:I.holder
1Name,ibanNumber:null==I?void 0:I.ibanNumber,accountNumber:null==I?void 0:I.accountNumber,isVerified:!1,ppbId:null===(v=E.authorization)||void 0===v?void 0:null===(c=v.payMean)||void 0===c?void 0:c.ppbId,object_type:null===(f=E.authorization)||void 0===f?void 0:null===(p=f.payMean)||void 0===p?void 0:p.object_type,type:null===(m=E.authorization)||void 0===m?void 0:null===(g=m.payMean)||void 0===g?void 0:g.type},e=[];a(e,[A,_,T],n),h={orderPayment:{barId:y.id,orderItemPayments:e}}}return!!h&&d(S,h)},{onSuccess:e=>{o.K.debug("SUCCESS",e),n.setQueryData("validateIbansQuery",e)},onError:e=>{o.K.error("ERROR - validateIbansQuery: ",e),n.setQueryData("validateIbansQuery",(0,r.nQ)("validateIbansQuery")),localStorage.setItem("validateIbansQuery",JSON.stringify((0,r.nQ)("validateIbansQuery")))}})},s=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("validateIbans",()=>{var n,e,i,t,o,u,s;let c;let v=(0,l.f)("billingAccount"),p=(0,l.f)("shoppingCart"),f=(0,l.f)("payMean"),g=(0,l.f)("authorizationRecurring"),m=null==p?void 0:p.id,h=null==p?void 0:null===(n=p.cartItem)||void 0===n?void 0:n[0],y=null==h?void 0:h.id,b=(0,r.sJ)(f);if(g&&b){let n={id:null==b?void 0:b.id,bankCode:null==b?void 0:b.bankCode,branchCode:null==b?void 0:b.branchCode,holderName:null==b?void 0:b.holderName,ibanNumber:null==b?void 0:b.ibanNumber,accountNumber:null==b?void 0:b.accountNumber,isVerified:!1,ppbId:null===(i=g.authorization)||void 0===i?void 0:null===(e=i.payMean)||void 0===e?void 0:e.ppbId,object_type:null===(o=g.authorization)||void 0===o?void 0:null===(t=o.payMean)||void 0===t?void 0:t.object_type,type:null===(s=g.authorization)||void 0===s?void 0:null===(u=s.payMean)||void 0===u?void 0:u.type};a([],[y],n),c={orderPayment:{barId:v.id,orderItemPayments:[{orderActionId:y,orderItemOnBillPayment:{payMeanPurpose:"onBill",selectedPayMean:n}}]}}}return!!c&&d(m,c)},{onSuccess:e=>{n.setQueryData("validateIbansQuery",e)},onError:e=>{o.K.error("ERROR - validateIbansQuery: ",e),n.setQueryData("validateIbansQuery",(0,r.nQ)("validateIbansQuery",e)),localStorage.setItem("validateIbansQuery",JSON.stringify((0,r.nQ)("validateIbansQuery")))}})}},38206:function(n,e,i){i.d(e,{E:function(){return a},Pj:function(){return t},S2:function(){return d},Yq:function(){return u},_V:function(){return o},gE:function(){return r},n3:function(){return l}});let t=(n,e)=>{if(n)return(null==n?void 0:n.map(n=>{if((null==n?void 0:n.displayValue)===e)return null==n?void 0:n.value}).filter(n=>void 0!==n))[0]},o=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RLC_TelephoneNumber";if(n)return(null==n?void 0:n.map(n=>{if((null==n?void 0:n.name)===e)return null==n?void 0:n.displayValue}).filter(n=>void 0!==n))[0]},l=n=>JSON.parse(n)?"Yes":"No",r=(n,e)=>{var i,t,o;let l=null===(t=n.portInDetails.mobilePortInDetails[0])||void 0===t?void 0:null===(i=t.portInProviderCust)||void 0===i?void 0:i.availableValues;if(l&&e&&(null==e?void 0:e.length)>0){let i=e.filter(n=>n.id&&""!==n.id).map(n=>n.id.toLowerCase()),t=l.filter(n=>!i.includes(n.value.toLowerCase()));return{...n,portInDetails:{...n.portInDetails,mobilePortInDetails:[{...n.portInDetails.mobilePortInDetails[0],portInProviderCust:{...null===(o=n.portInDetails.mobilePortInDetails[0])||void 0===o?void 0:o.portInProviderCust,availableValues:t}}]}}}return n},d=(n,e)=>{var i,t,o,l;let r=null===(t=n.portInDetails.mobilePortInDetails[0])||void 0===t?void 0:null===(i=t.portInProviderCust)||void 0===i?void 0:i.availableValues;return r&&e&&(null===(o=e.elements)||void 0===o?void 0:o.length)>0?(e.elements.forEach(n=>{var e;let i=r.findIndex(e=>{var i;return(null===(i=n.value)||void 0===i?void 0:i.toLowerCase())===e.value.toLowerCase()});-1!==i&&(null===(e=n.displayValue)||void 0===e?void 0:e.trim().length)>0&&(r[i].displayValue=n.displayValue)}),{...n,portInDetails:{...n.portInDetails,mobilePortInDetails:[{...n.portInDetails.mobilePortInDetails[0],portInProviderCust:{...null===(l=n.portInDetails.mobilePortInDetails[0])||void 0===l?void 0:l.portInProviderCust,availableValues:r}}]}}):n},a=(n,e)=>{var i,t,o,l;let r=null===(t=n.portInDetails.mobilePortInDetails[0])||void 0===t?void 0:null===(i=t.portInProviderCust)||void 0===i?void 0:i.availableValues;if(r&&e&&(null===(o=e.elements)||void 0===o?void 0:o.length)>0){let i=r.map(n=>n.value.toLowerCase()),t=e.elements.filter(n=>{var e;return n.value&&""!==n.value&&n.displayValue&&""!==n.displayValue&&i.includes(null===(e=n.value)||void 0===e?void 0:e.toLowerCase())}),o=t.map(n=>{var e;return null===(e=n.value)||void 0===e?void 0:e.toLowerCase()}),d=r.filter(n=>{var e;return!o.includes(null===(e=n.value)||void 0===e?void 0:e.toLowerCase())}),a=t.map(n=>({type:"STRING",...n})).concat(d);return{...n,portInDetails:{...n.portInDetails,mobilePortInDetails:[{...n.portInDetails.mobilePortInDetails[0],portInProviderCust:{...null===(l=n.portInDetails.mobilePortInDetails[0])||void 0===l?void 0:l.portInProviderCust,availableValues:a}}]}}}return n},u=(n,e)=>{var i,t,o,l,r,d,a,u,s;let c=null===(l=n.fixedVoicePortInDetails)||void 0===l?void 0:null===(o=l[0])||void 0===o?void 0:null===(t=o.r1MissingMigrationFixedPortInSpecification)||void 0===t?void 0:null===(i=t.r1FirstDonatingNetworkOperator)||void 0===i?void 0:i.availableValues,v=null===(u=n.fixedVoicePortInDetails)||void 0===u?void 0:null===(a=u[0])||void 0===a?void 0:null===(d=a.r1MissingMigrationFixedPortInSpecification)||void 0===d?void 0:null===(r=d.r1SecondDonatingNetworkOperator)||void 0===r?void 0:r.availableValues;return c&&v&&e&&(null===(s=e.elements)||void 0===s?void 0:s.length)>
10?(e.elements.forEach(n=>{var e;let i=c.findIndex(e=>{var i;return(null===(i=n.value)||void 0===i?void 0:i.toLowerCase())===e.value.toLowerCase()});-1!==i&&(null===(e=n.displayValue)||void 0===e?void 0:e.trim().length)>0&&(c[i].displayValue=n.displayValue)}),e.elements.forEach(n=>{var e;let i=v.findIndex(e=>{var i;return(null===(i=n.value)||void 0===i?void 0:i.toLowerCase())===e.value.toLowerCase()});-1!==i&&(null===(e=n.displayValue)||void 0===e?void 0:e.trim().length)>0&&(v[i].displayValue=n.displayValue)}),{...n,fixedVoicePortInDetails:[{...n.fixedVoicePortInDetails[0],r1MissingMigrationFixedPortInSpecification:{...n.fixedVoicePortInDetails[0].r1MissingMigrationFixedPortInSpecification,r1FirstDonatingNetworkOperator:{...n.fixedVoicePortInDetails[0].r1MissingMigrationFixedPortInSpecification.r1FirstDonatingNetworkOperator,availableValues:c},r1SecondDonatingNetworkOperator:{...n.fixedVoicePortInDetails[0].r1MissingMigrationFixedPortInSpecification.r1SecondDonatingNetworkOperator,availableValues:v}}}]}):n}},68830:function(n,e,i){i.d(e,{L:function(){return a}});var t=i(82066),o=i(41307),l=i(10727),r=i(1733);let d=(n,e)=>o.W.post(l.b.SHOPPING_CART,n,{...(null==e?void 0:e.headers)&&{headers:e.headers},...(null==e?void 0:e.silentLoginHeaders)&&{silentLoginHeaders:e.silentLoginHeaders}}),a=()=>{let n=(0,t.useQueryClient)();return(0,t.useMutation)("shoppingCart",n=>d({shoppingCart:{...n.shoppingCart}}),{onSuccess:e=>{e?(localStorage.setItem("shoppingCart",JSON.stringify(e)),n.setQueryData("shoppingCart",e)):n.setQueryData("shoppingCart",(0,r.n)("shoppingCart"))},onError:e=>{o.K.error("ERROR - shoppingCart: ",e),n.setQueryData("shoppingCart",(0,r.n)("shoppingCart",e)),localStorage.setItem("shoppingCart",JSON.stringify((0,r.n)("shoppingCart",e)))}})}},57563:function(n,e,i){i.d(e,{c:function(){return g},x:function(){return m}}),(t=d||(d={})).HTML="html",t.Image="image",(a||(a={})).Eur="EUR",(u||(u={})).Add="add",(o=s||(s={})).HOME_INTERNET="homeInternet_R1",o.MOBILE_PLAN="mobilePlan",(l=c||(c={})).MULTI_PLAY="multiPlayCartItem",l.MOBILE="mobileCartItem",l.MOBILE_PLAN="mobilePlanCartItem",(r=v||(v={})).MOBILE_PLAN_V1="V1MobilePlanCartItem",r.MOBILE_V1="V1MobileCartItem",r.MULTI_PLAY_V1="V1MultiPlayCartItem",(p||(p={})).OWNED="Owned";var t,o,l,r,d,a,u,s,c,v,p,f=i(11946);let g=(n,e,i,t)=>n&&e&&i?{shoppingCart:{cartItem:[{offeringServiceability:{serviceabilityTechnology:t||""},action:u.Add,flowType:s.HOME_INTERNET,quantity:1,type:c.MULTI_PLAY,object_type:v.MULTI_PLAY_V1,offering:{id:n},multiPlayProduct:{installationAddress:{id:e}}}],serviceabilityId:i}}:null,m=(n,e,i,t,o,l,r)=>{if(!n||!e)return null;let d=(0,f.RQ)();return{shoppingCart:{...d&&{fwtoken:d},...i?{customerId:{id:t}}:{},cartItem:[{action:u.Add,flowType:s.MOBILE_PLAN,quantity:1,type:c.MOBILE,object_type:v.MOBILE_V1,offering:{id:"".concat(n,"_").concat(e)},plan:{type:c.MOBILE_PLAN,object_type:v.MOBILE_PLAN_V1,offering:{id:e}},deviceAcquisitionType:p.OWNED}],...(o||l)&&{phoneNumber:(null==r?void 0:r.dummyNumber)||"39999999999",mobileDonatingOperator:(null==r?void 0:r.dummyOperator)||"TIM_GSM"},serviceabilityId:null}}}},85035:function(n,e,i){i.d(e,{D:function(){return o}});var t=i(90401);let o=(n,e)=>{var i,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L;return{voucherstwilight:{insertion:{title:(null==n?void 0:null===(o=n.voucherstwilight)||void 0===o?void 0:null===(i=o.insertion)||void 0===i?void 0:i.title)||"",message:(null==n?void 0:null===(r=n.voucherstwilight)||void 0===r?void 0:null===(l=r.insertion)||void 0===l?void 0:l.message)||"",inputName:(null==n?void 0:null===(a=n.voucherstwilight)||void 0===a?void 0:null===(d=a.insertion)||void 0===d?void 0:d.inputName)||"",buttonLabel:(null==n?void 0:null===(s=n.voucherstwilight)||void 0===s?void 0:null===(u=s.insertion)||void 0===u?void 0:u.buttonLabel)||"",expiredMessage:(null==n?void 0:null===(v=n.voucherstwilight)||void 0===v?void 0:null===(c=v.insertion)||void 0===c?void 0:c.expiredMessage)||"",invalidMessage:(null==n?void 0:null===(f=n.voucherstwilight)||void 0===f?void 0:null===(p=f.insertion)||void 0===p?void 0:p.invalidMessage)||"",skipLabel:(null==n?void 0:null===(m=n.voucherstwilight)||void 0===m?void 0:null===(g=m.insertion)||void 0===g?void 0:g.skipLabel)||"s
1alta"},success:{title:(null==n?void 0:null===(y=n.voucherstwilight)||void 0===y?void 0:null===(h=y.success)||void 0===h?void 0:h.title)||"",subtitle:null==n?void 0:null===(E=n.voucherstwilight)||void 0===E?void 0:null===(C=E.success)||void 0===C?void 0:null===(b=C.subtitle)||void 0===b?void 0:b.replace("$VOUCHER",e||""),loadingMessage:(null===(S=(0,t.q)([(null==n?void 0:null===(I=n.voucherstwilight)||void 0===I?void 0:null===(x=I.success)||void 0===x?void 0:x.loadingMessage)||""]))||void 0===S?void 0:S[0])||"",backTitle:(null===(A=(0,t.q)([(null==n?void 0:null===(T=n.voucherstwilight)||void 0===T?void 0:null===(_=T.success)||void 0===_?void 0:_.backTitle)||""]))||void 0===A?void 0:A[0])||""},validationMinLength:{message:null==n?void 0:null===(L=n.voucherstwilight)||void 0===L?void 0:null===(N=L.validationMinLength)||void 0===N?void 0:N.message}}}}},63459:function(n,e,i){i.d(e,{Sf:function(){return o},v$:function(){return t},zw:function(){return l}}),i(97477),i(85363);let t=(n,e)=>{var i,t;let o=(n,e)=>{var i,t,o,l,r,d,a,u,s,c;return(null===(i=n.city)||void 0===i?void 0:i.toLowerCase())===(null==e?void 0:null===(t=e.city)||void 0===t?void 0:t.toLowerCase())&&(null===(o=n.postalCode)||void 0===o?void 0:o.toLowerCase())===(null==e?void 0:null===(l=e.postalCode)||void 0===l?void 0:l.toLowerCase())&&(null===(r=n.stateOrProvince)||void 0===r?void 0:r.toLowerCase())===(null==e?void 0:null===(d=e.stateOrProvince)||void 0===d?void 0:d.toLowerCase())&&(null===(a=n.street)||void 0===a?void 0:a.toLowerCase())===(null==e?void 0:null===(u=e.street)||void 0===u?void 0:u.toLowerCase())&&(null===(s=n.streetNumber)||void 0===s?void 0:s.toLowerCase())===(null==e?void 0:null===(c=e.streetNumber)||void 0===c?void 0:c.toLowerCase())},l=(null==n?void 0:null===(i=n.recipientDetails)||void 0===i?void 0:i.availableAddresses)||[],r=(null==n?void 0:null===(t=n.recipientDetails)||void 0===t?void 0:t.recipientAddress)||[];if((null==l?void 0:l.length)>0){let n=null==l?void 0:l.find(n=>o(n,e)),i=o(r,e);if(n)return n;if(i)return r}return null},o=n=>(null==n?void 0:n.filter(n=>(null==n?void 0:n.code)==="PO").length)>0,l=n=>(null==n?void 0:n.filter(n=>(null==n?void 0:n.code)==="PP").length)>0},19243:function(n,e,i){i.d(e,{o0:function(){return cm},Mo:function(){return cf},FY:function(){return cM},tD:function(){return cx},dl:function(){return cO},Dv:function(){return cA},XF:function(){return cN}});var t,o,l,r,d,a,u,s,c,v,p,f,g=i(2784),m=i(52322),h=i(99306),y=i(34759),b=i(11946),C=i(63955),E=i(75672),S=i(45451),x=i(6812),I=i(29281),A=i(90401),_=i(65413);let T=(n,e,i)=>{var t,o,l,r,d,a;return _.object({identificationType:_.string().required(" "),identificationNumber:_.string().ensure().when("identificationType",{is:n=>(null==n?void 0:n.toLowerCase())==="carta d'identit\xe0"||(null==n?void 0:n.toLowerCase())==="carta di identit\xe0"||(null==n?void 0:n.toLowerCase())==="identity card",then:e?_.string().required(" ").matches(/^[A-Z]{2}\d{5}[A-Z]{2}$/i,i||"Inserire un numero di documento valido"):_.string().required(" ").matches(/^[a-zA-Z]{2}[0-9]{5}([0-9]{2}||[a-zA-Z]{2})$/,(null==n?void 0:null===(t=n.identificationNumber)||void 0===t?void 0:t.valid)||"Inserire un numero di documento valido").min(9,(null==n?void 0:null===(o=n.identificationNumber)||void 0===o?void 0:o.minimum)||"Inserire un numero di documento valido"),otherwise:_.string().required(" ").matches(/^[a-zA-Z0-9]*$/,(null==n?void 0:null===(l=n.otherwise)||void 0===l?void 0:l.valid)||"Inserire un numero di documento valido").min(6,(null==n?void 0:null===(r=n.otherwise)||void 0===r?void 0:r.minimum)||"Inserire un numero di documento valido").max(15,(null==n?void 0:null===(d=n.otherwise)||void 0===d?void 0:d.maximum)||"Inserire un numero di documento valido")}),expirationDate:_.string().required(" ").test("rangeTest",(null==n?void 0:null===(a=n.expirationDate)||void 0===a?void 0:a.rangeTest)||"Inserire una data di scadenza valida",n=>{if((null==n?void 0:n.includes("_"))===!1&&n.match(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/)){let e=new Date,i=n.split("/"),t=new Date(parseInt(i[2],10),parseInt(i[1],10)-1,parseInt(i[0],10)),o=new Date;o.setDate(e.getDate()-1);let l=new Date;if(l.setFullYear(e.getFullYear()+10),t>o&&t<=l)return!0}return!1}),nationality:_.string().required(" ")})};var N=i(67862),L=i(92603),O=i(12153);function R(){let n=(0,N._)(["\n width: 366px;\n "]);return R=function(){return n},n}function D(){let n=(0,N._)(["\n width: 406px;\n "]);return D=function(){return n},n}function M(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n\n ","\n\n ","\n"]);return M=function(){return n},n}function P(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.238;\n padding: 60px 0 16px;\n "]);return P=function(){return n},n}function w(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return w=function(){return n},n}function k(){let n=(0,N._)(["\n padding: 32px 0 16px;\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: 1.875rem;\n line-height: 1.267;\n\n ","\n\n ","\n"]);return k=function(){return n},n}function j(){let n=(0,N._)(["\n line-height: 1.5;\n "]);return j=function(){return n},n}function B(){let n=(0,N._)(["\n margin-bottom: 40px;\n "]);return B=function(){return n},n}function F(){let n=(0,N._)(["\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n margin-bottom: 32px;\n text-align: center;\n font-size: ",";\n line-height: 1.3;\n\n ","\n\n ","\n"]);return F=function(){return n},n}function z(){let n=(0,N._)(["\n gap: 1.25rem;\n "]);return z=function(){return n},n}function Z(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n\n ","\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n margin-bottom: 0;\n }\n"]);return Z=function(){return n},n}function H(){let n=(0,N._)(["\n margin-top: 1.25rem;\n "]);return H=function(){return n},n}function V(){let n=(0,N._)(["\n display: flex;\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n font-size: ",";\n line-height: 1.286;\n margin-top: ",";\n margin-bottom: 32px;\n\n ","\n"]);return V=function(){return n},n}let U=L.Z.div(M(),O.B.tablet(R()),O.B.desktop(D())),Q=L.Z.div(k(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.B.tablet(P(),O.r.typography.fontSize.h1),O.B.desktop(w(),O.r.typography.fontSize.h2)),G=L.Z.div(F(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.h6,O.B.tablet(j()),O.B.desktop(B())),Y=L.Z.div(Z(),O.r.spacing.md,O.B.tablet(z())),W=L.Z.div(V(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.spacing.md,O.B.tablet(H())),J={margins:[60,30],tabletMargins:[32,15],groups:[{heights:60,marginBottom:15},{heights:90,marginBottom:32},{heights:60,repeat:4,gap:15}]};var X=n=>{var e,i,t,o;let{data:l,nationality:r,identificationType:d,onChangeData:a,isReadonly:u,isLoading:s,setIsValidForm:c,configCms:v}=n,{owningIndividual:p}=l,{title:f,docExpirationDateLable:h,docLable:y,docNumberLable:b,errorMessage:_,countryLable:N,subtitle:L,cieEnabled:O,cieErrorMessage:R}=v,{register:D,setValue:M,getValues:P,trigger:w,formState:{isValid:k,touchedFields:j,errors:B}}=(0,C.cI)({resolver:(0,x.X)(T(null==v?void 0:v.validationMessage,O,R)),mode:"all"}),[F,z]=(0,g.useState)(0),[Z]=(0,g.useState)(""),H=n=>(null==n?void 0:n.identificationType)!==""&&(null==n?void 0:n.identificationNumber)!==""&&(null==n?void 0:n.expirationDate)!==""&&(null==n?void 0:n.nationality)!=="",[V]=(0,A.q)([L||""]);(0,g.useEffect)(()=>
1{if(!s){let n=(0,I.N)(p),e=null==d?void 0:d.find(e=>{var i,t;return(null==e?void 0:null===(i=e.identificationType)||void 0===i?void 0:i.toLowerCase())===(null==n?void 0:null===(t=n.identificationType)||void 0===t?void 0:t.toLowerCase())}),i=H(n||void 0);p&&(M("identificationType",(null==e?void 0:e.displayName)||"",{shouldValidate:i}),M("identificationNumber",(null==n?void 0:n.identificationNumber)||"",{shouldTouch:i,shouldValidate:i}),M("expirationDate",(null==n?void 0:n.expirationDate)||"",{shouldTouch:i,shouldValidate:i}),M("nationality",(null==n?void 0:n.nationality)||"",{shouldValidate:i}))}},[s,l]);let X=()=>{var n;let e=P(),i={...l,owningIndividual:{...p,identification:[{identificationType:(null==d?void 0:null===(n=d.find(n=>{var i,t;return(null==n?void 0:null===(i=n.displayName)||void 0===i?void 0:i.toLowerCase())===(null==e?void 0:null===(t=e.identificationType)||void 0===t?void 0:t.toLowerCase())}))||void 0===n?void 0:n.identificationType)||"",nationality:e.nationality||"",identificationNumber:e.identificationNumber||"",expirationDate:e.expirationDate||""}]}};a&&a(i,k),z(n=>n+1)};return(0,g.useEffect)(()=>{null==c||c(k)},[F,k]),(0,g.useEffect)(()=>{s||X()},[k]),(0,m.jsx)(U,{children:s?(0,m.jsx)(E.Z,{...J}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Q,{children:f}),V&&(0,m.jsx)(G,{dangerouslySetInnerHTML:{__html:V}}),(0,m.jsxs)(Y,{children:[(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.SelectInput,{"data-cs-mask":"",label:y,setValue:()=>Z,onSelectValue:n=>{M("identificationType",n),w("identificationType"),M("identificationNumber",""),w("identificationNumber"),X()},isDisabled:s||u,errorMessage:null===(e=B.identificationType)||void 0===e?void 0:e.message,placeholder:" ",...D("identificationType",{onChange:X}),items:(null==d?void 0:d.map(n=>(null==n?void 0:n.displayName)||""))||["Patente","Passaporto","Carta"]})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{"data-cs-mask":"",label:b,placeholder:" ",autoComplete:"off",disabled:s||u,error:j.identificationNumber?null===(i=B.identificationNumber)||void 0===i?void 0:i.message:"",...D("identificationNumber",{onChange:X})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.MaskInput,{"data-cs-mask":"",mask:"99/99/9999",label:h,placeholder:" ",autoComplete:"off",disabled:s||u,error:null===(t=B.expirationDate)||void 0===t?void 0:t.message,...D("expirationDate",{onChange:X})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.SelectInput,{"data-cs-mask":"",label:N,isDisabled:s||u,setValue:()=>Z,onSelectValue:n=>{M("nationality",n),w("nationality"),X()},errorMessage:j.nationality?null===(o=B.nationality)||void 0===o?void 0:o.message:"",suggestionsMaxHeight:"120px",placeholder:" ",...D("nationality",{onChange:X}),items:r||["Italia"]})})]}),(0,m.jsx)(W,{children:_})]})})};let q={nameTitle:[{rel:"self",href:"/care/v1/nameTitle",id:"EMPTY",name:"EMPTY",displayName:" ",default:!0},{rel:"self",href:"/care/v1/nameTitle",id:"Mr.",name:"Mr.",displayName:"Sig.",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Mrs.",name:"Mrs.",displayName:"Sig.ra",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Ms.",name:"Ms.",displayName:"Sig.na",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Dr.",name:"Dr.",displayName:"Dr.",default:!1}],identificationType:[{rel:"self",href:"/care/v1/identificationType",id:"1",name:"1",displayName:"Carta d'identit\xe0",default:!1},{rel:"self",href:"/care/v1/identificationType",id:"2",name:"2",displayName:"Passaporto",default:!1},{rel:"self",href:"/care/v1/identificationType",id:"3",name:"3",displayName:"Patente di guida",default:!1}]},K=(n,e)=>{var i,t,o,l;let r=new DOMParser,d=(null==n?void 0:null===(i=n.find(n=>n.id===e))||void 0===i?void 0:i.value)||"",a=r.parseFromString((null===(t=(0,A.q)([d||""]))||void 0===t?void 0:t[0])||"","text/html");return(null==a?void 0:null===(l=a.body)||void 0===l?void 0:null===(o=l.textContent)||void 0===o?void 0:o.replace("\n",""))||""},$=(n,e)=>{var i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R;return{title:e?(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.preFilledDocument)||void 0===i?void 0:i.title)||"Documento":(null==n?void 0:null===(l=n.personalinfo)||void 0===l?void 0:null===(o=l.newDocument)||void 0===o?void 0:o.title)||"Documento",subtitle:e?(null==n?void 0:null===(d=n.personalinfo)||void 0===d?void 0:null===(r=d.preFilledDocument)||void 0===r?void 0:r.description)||"Conferma o modifica i dati del tuo documento. Per verificare la tua identit\xe0, dovrai mostrare lo stesso documento durante la consegna o l'attivazione online della tua nuova SIM.":(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.newDocument)||void 0===a?void 0:a.description)||"Inserisci i dati di un tuo documento. Per verificare la tua identit\xe0, dovrai mostrare lo stesso documento durante la consegna o l'attivazione online della tua nuova SIM.",docLable:(null==n?void 0:null===(c=n.personalinfo)||void 0===c?void 0:null===(s=c.selectInput)||void 0===s?void 0:s.docType)||"",docNumberLable:(null==n?void 0:null===(p=n.personalinfo)||void 0===p?void 0:null===(v=p.selectInput)||void 0===v?void 0:v.docNumber)||"",docExpirationDateLable:(null==n?void 0:null===(g=n.personalinfo)||void 0===g?void 0:null===(f=g.selectInput)||void 0===f?void 0:f.docExpirationDate)||"",countryLable:(null==n?void 0:null===(h=n.personalinfo)||void 0===h?void 0:null===(m=h.selectInput)||void 0===m?void 0:m.nation)||"",errorMessage:e?(null==n?void 0:null===(b=n.personalinfo)||void 0===b?void 0:null===(y=b.preFilledDocument)||void 0===y?void 0:y.allFieldsAreRequired)||"Tutti i campi sono obbligatori":(null==n?void 0:null===(E=n.personalinfo)||void 0===E?void 0:null===(C=E.newDocument)||void 0===C?void 0:C.allFieldsAreRequired)||"Tutti i campi sono obbligatori",validationMessage:{
1identificationNumber:{valid:K(null==n?void 0:null===(S=n.editorialconfigs)||void 0===S?void 0:S.elements,"identificationNumberValid")||"Inserire un numero di documento valido",minimum:K(null==n?void 0:null===(x=n.editorialconfigs)||void 0===x?void 0:x.elements,"identificationMinimum")||"Inserire un numero di documento valido"},otherwise:{valid:K(null==n?void 0:null===(I=n.editorialconfigs)||void 0===I?void 0:I.elements,"otherwiseValid")||"Inserire un numero di documento valido",minimum:K(null==n?void 0:null===(A=n.editorialconfigs)||void 0===A?void 0:A.elements,"otherwiseMinimum")||"Inserire un numero di documento valido",maximum:K(null==n?void 0:null===(_=n.editorialconfigs)||void 0===_?void 0:_.elements,"otherwiseMaximum")||"Inserire un numero di documento valido"},expirationDate:{rangeTest:K(null==n?void 0:null===(T=n.editorialconfigs)||void 0===T?void 0:T.elements,"expirationDateRangeTest")||"Inserire una data di scadenza valida"}},cieEnabled:"true"===String(null==n?void 0:null===(L=n.personalinfo)||void 0===L?void 0:null===(N=L.selectInput)||void 0===N?void 0:N.cieEnabled).toLowerCase(),cieErrorMessage:(null==n?void 0:null===(R=n.personalinfo)||void 0===R?void 0:null===(O=R.selectInput)||void 0===O?void 0:O.cieErrorMessage)||""}},nn=(n,e)=>null==n?void 0:n.map(n=>(null==n?void 0:n.id)==="1"&&K(e,"identityCard")?{displayName:K(e,"identityCard")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:(null==n?void 0:n.id)==="2"&&K(e,"passport")?{displayName:K(e,"passport")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:(null==n?void 0:n.id)==="3"&&K(e,"drivingLicense")?{displayName:K(e,"drivingLicense")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:{displayName:(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""});var ne=i(82881),ni=i(29470),nt=i(55552),no=i(82066),nl=i(18899);let nr=()=>n=>e=>{let[i,t]=(0,g.useState)(!0);return((0,g.useEffect)(()=>{setTimeout(()=>{t(!1)},800)},[]),i)?null:(0,m.jsx)(n,{...e})},nd=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("document","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step3"],event_label:"document",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),null});var na=i(6185),nu=i(83144),ns=i(46474);function nc(){let n=(0,N._)(["\n margin-top: ",";\n "]);return nc=function(){return n},n}function nv(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n padding: 0 ",";\n gap: ",";\n align-items: center;\n margin-bottom: ",";\n margin-top: ",";\n\n ","\n"]);return nv=function(){return n},n}function np(){let n=(0,N._)(["\n ",";\n "]);return np=function(){return n},n}function nf(){let n=(0,N._)(["\n margin: 0;\n font-family: ",";\n font-weight: ",";\n ",";\n align-self: center;\n\n p {\n margin: 0;\n\n b {\n font-family: ",";\n font-weight: ",";\n }\n }\n\n ","\n"]);return nf=function(){return n},n}function ng(){let n=(0,N._)(["\n width: 288px;\n "]);return ng=function(){return n},n}function nm(){let n=(0,N._)(["\n width: 100%;\n\n ","\n"]);return nm=function(){return n},n}function nh(){let n=(0,N._)(["\n gap: 40px;\n "]);return nh=function(){return n},n}function ny(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n\n ","\n"]);return ny=function(){return n},n}let nb=L.Z.div(nv(),ns.rS.spacing.md,ns.rS.spacing.lg,ns.rS.spacing["2xl"],ns.rS.spacing.md,ns.BC.desktop(nc(),ns.rS.spacing.xl)),nC=L.Z.p(nf(),ns.rS.typography.fontFamily.primary,ns.rS.typography.fontWeight.light,(0,ns.Ln)(30,38),ns.rS.typography.fontFamily.primary,ns.rS.typography.fontWeight.extrabold,ns.BC.desktop(np(),(0,ns.Ln)(36,45))),nE=L.Z.div(nm(),ns.BC.tablet(ng())),nS=L.Z.div(ny(),ns.rS.spacing.lg,ns.BC.desktop(nh())),nx=n=>{let{title:e,ctaLabel:i,addonList:t,addedAddons:o,isLoadingUpdate:l,isLoadingCartUpdate:r,loadingId:d,saveAddon:a,removeAddon:u,goNext:s}=n,[c]=(0,A.q)([e]),v=n=>{var e,i,t,o;let l=(null==n?void 0:null===(i=n.addondetails)||void 0===i?void 0:null===(e=i.common)||void 0===e?void 0:e.priceRecurring)||"",r=(null==n?void 0:null===(o=n.addondetails)||void 0===o?void 0:null===(t=o.common)||void 0===t?void 0:t.recurringLabel)||"";return""!==l&&""!==r?"+".concat(l,"â¬/").concat(r):""};return(0,m.jsxs)(nb,{children:[(0,m.jsx)(nC,{dangerouslySetInnerHTML:{__html:c||""}}),i&&(0,m.jsx)(nE,{children:(0,m.jsx)(nu.Z,{label:i,onClick:s,buttonColor:"#fff",labelColor:"#262626",borderColor:"#262626",disabled:r||l})}),(0,m.jsx)(nS,{children:t&&t.map(n=>{var e,i,t,s,c,p,f,g,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M;return(0,m.jsx)(na.S,{title:(null==n?void 0:null===(i=n.addondetails)||void 0===i?void 0:null===(e=i.card)||void 0===e?void 0:e.title)||(null==n?void 0:null===(t=n.addondetails)||void 0===t?void 0:t.name)||"",price:v(n),subprice:(null==n?void 0:null===(c=n.addondetails)||void 0===c?void 0:null===(s=c.common)||void 0===s?void 0:s.priceActivationLabel)||"",imageUri:(null==n?void 0:null===(f=n.addondetails)||void 0===f?void 0:null===(p=f.card)||void 0===p?void 0:p.cardImage)||"",ctaAddLabel:(null==n?void 0:null===(h=n.addondetails)||void 0===h?void 0:null===(g=h.common)||void 0===g?void 0:g.ctaAddLabel)||"",ctaRemoveLabel:(null==n?void 0:null===(b=n.addondetails)||void 0===b?void 0:null===(y=b.common)||void 0===y?void 0:y.ctaRemoveLabel)||"",ctaAddedLabel:null==n?void 0:null===(E=n.addondetails)||void 0===E?void 0:null===(C=E.common)||void 0===C?void 0:C.ctaAddedLabel,description:(null==n?void 0:null===(x=n.addondetails)||void 0===x?void 0:null===(S=x.card)||void 0===S?void 0:S.description)||"",ctaOpenDetailsLabel:(null==n?void 0:null===(A=n.addondetails)||void 0===A?void 0:null===(I=A.card)||void 0===I?void 0:I.popUpCtaLabel)||"",popupTitle:(null==n?void 0:null===(T=n.addondetails)||void 0===T?void 0:null===(_=T.detailPo
1pup)||void 0===_?void 0:_.popupTitle)||"",popupBody:(null==n?void 0:null===(L=n.addondetails)||void 0===L?void 0:null===(N=L.detailPopup)||void 0===N?void 0:N.popupDescription)||"",closePopupLabel:(null==n?void 0:null===(R=n.addondetails)||void 0===R?void 0:null===(O=R.common)||void 0===O?void 0:O.ctaCloseLabel)||"",noPriceLabel:(null==n?void 0:null===(M=n.addondetails)||void 0===M?void 0:null===(D=M.common)||void 0===D?void 0:D.noPriceLabel)||"",addonId:n.cmsId||"",added:o.some(e=>e===n.cmsId),isLoadingUpdate:l,isLoadingCartUpdate:r,saveAddon:a,removeAddon:u,loadingId:d},n.cmsId)})})]})};var nI=i(27864);let nA=()=>(0,m.jsx)(n_,{children:(0,m.jsx)(E.Z,{margins:[8,8,8,8]})}),n_=nI.ZP.div.withConfig({componentId:"sc-13aa6270-0"})(["padding:20px"]);var nT=i(83003),nN=i(42406),nL=i(9399),nO=i(42446),nR=i(71170);let nD=nr()(n=>{let{addonIdList:e}=n,{product:i}=(0,ne.Mg)(),t=(0,no.useQueryClient)(),o=(0,nT.fF)("shoppingCart"),{getCartProductsWithAddon:l,retrieveCartAddons:r}=(0,nL.Vz)(t),{trackView:d}=(0,nT.rS)({event:["view"],event_label:"addons:view",opts:{product_target_segment:"consumer",page_section:"fixed offers",page_subsection:"checkout",page_type:"addons",event_category:"sales",journey_type:"journey",journey_name:"checkout",product_technology:(0,nO.C)()||""},cartProduct:{cart_id:null==o?void 0:o.id,cart_product_technology:(0,nO.C)()||"",cart_product_quantity:"1",cart_product_id:"".concat(null==i?void 0:i.offerId),cart_product_name:null==i?void 0:i.slug,cart_product_category:"fixed",cart_product_price:(null==i?void 0:i.price)&&(0,nR.F)(i.price),...l(i,r(e))},visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(d,"addons:"),(0,nT.qH)(d),null});var nM=i(4217),nP=i(93216),nw=i(19042),nk=i(83756),nj=i(3307),nB=i(88301);let nF=n=>{var e,i,t;return{title:(null==n?void 0:null===(e=n.addoncommons)||void 0===e?void 0:e.addonStep.topText)||"",ctaLabel:(null==n?void 0:null===(t=n.addoncommons)||void 0===t?void 0:null===(i=t.addonStep)||void 0===i?void 0:i.skipCtaLabel)||""}},nz=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,m;let{handleGoNextSlide:h,handleOnChangeEnableGoNext:C}=n,{product:E,addons:S,addonState:x,isLoadingCart:I,setAddonState:A,setCurrentStepKey:_,setFindCaller:T,findCaller:N,setIsStartCustomerFlow:L,currentStepKey:O,customerFlow:R,customerAsyncInfo:D,owningData:M,checkoutErrors:P,isModalButtonSticky:w,lockInAppFlow:k,setIsStartLockInAppFlow:j,setIsDisabledBackButton:B,setCustomerId:F,setOwningData:z,setCheckoutStepState:Z}=(0,ne.Mg)(),[H,V]=(0,g.useState)(""),[U,Q]=(0,g.useState)([]),{availableAddons:G,isLoadingUpdate:Y,isLoadingPriceUpdate:W,isLoading:J}=x,X=(0,y.CA)(y.Jn,y.bl.CMS_GET_ADDONS),q=(0,no.useQueryClient)(),K=(0,nj.f)("getCountry"),$={id:N.verifyOtp},{isSuccess:nn,isLoading:nt,isError:nr,error:nd}=(0,nP.O)(),na=(0,y.CA)(y.Jn,y.bl.CMS_GET_GENERIC_ERROR),{errorcomponent:{errors:nu}}=(0,y.CA)(y.Jn,y.bl.CMS_GET_ORDER_ERROR),ns=null==nu?void 0:nu.find(n=>(null==n?void 0:n.error)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED),nc=(null==k?void 0:null===(e=k.campaigns)||void 0===e?void 0:e.isLoading)||(null==k?void 0:null===(i=k.accept)||void 0===i?void 0:i.isLoading)||(null==k?void 0:null===(t=k.shoppingCart)||void 0===t?void 0:t.isLoading)||(null==R?void 0:null===(o=R.associateCustomer)||void 0===o?void 0:o.isLoading),nv=(null==k?void 0:null===(l=k.campaigns)||void 0===l?void 0:l.isSuccess)&&(null==k?void 0:null===(r=k.accept)||void 0===r?void 0:r.isSuccess)&&(null==k?void 0:null===(d=k.shoppingCart)||void 0===d?void 0:d.isSuccess)&&(null==R?void 0:null===(a=R.associateCustomer)||void 0===a?void 0:a.isSuccess),np=nt||!nn||!!(null==$?void 0:$.id)&&!(null==R?void 0:null===(u=R.associateCustomer)||void 0===u?void 0:u.isSuccess),nf=(null==k?void 0:null===(s=k.campaigns)||void 0===s?void 0:s.isError)||(null==k?void 0:null===(c=k.accept)||void 0===c?void 0:c.isError)||(null==k?void 0:null===(v=k.shoppingCart)||void 0===v?void 0:v.isError)||(null==R?void 0:null===(p=R.associateCustomer)||void 0===p?void 0:p.isError)||(null==k?void 0:null===(f=k.campaigns)||void 0===f?void 0:f.isSuccess)&&!(null==k?void 0:null===(m=k.checkEligibility)||void 0===m?void 0:m.eligible),ng=()=>{var n,e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,S;if((null==R?void 0:null===(n=R.associateCustomer)||void 0===n?void 0:n.isSuccess)||(null==R?void 0:null===(e=R.associateCustomer)||void 0===e?void 0:e.isError)||nr){if(T({...N,...(null==R?void 0:null===(t=R.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.paymean)&&{paymean:null==R?void 0:null===(l=R.findcaller)||void 0===l?void 0:null===(o=l.data)||void 0===o?void 0:o.paymean},showOtp:!1,verifyOtp:"",isVerified:!0}),(null==R?void 0:null===(r=R.associateCustomer)||void 0===r?void 0:r.isError)&&(null==R?void 0:null===(u=R.associateCustomer)||void 0===u?void 0:null===(a=u.error)||void 0===a?void 0:null===(d=a.error)||void 0===d?void 0:d.statusText)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED){let n=()=>{(0,nB.uY)(q)},e=()=>{var n,e,i;(null==ns?void 0:null===(n=ns.button)||void 0===n?void 0:n.urlForRedirect)?(0,nk.x)(q,(null==ns?void 0:null===(e=ns.button)||void 0===e?void 0:e.urlForRedirect)||"",E,()=>{(0,nB.uY)(q)},O,null==R?void 0:null===(i=R.associateCustomer)||void 0===i?void 0:i.error):(0,nB.uY)(q)};null==P||null===(g=P.showAndTrackError)||void 0===g||g.call(P,na,()=>n(),(null==R?void 0:null===(c=R.associateCustomer)||void 0===c?void 0:c.isError)?null==R?void 0:null===(v=R.associateCustomer)||void 0===v?void 0:v.error:void 0,(null==ns?void 0:ns.title)||"Attenzione",(null==ns?void 0:ns.message)||"I seguenti articoli non sono attivabili dal cliente selezionato",()=>e(),(null==ns?void 0:null===(p=ns.button)||void 0===p?void 0:p.title)||"Ti richiamiamo",()=>{var e,i,t;return(0,nk.x)(q,(null==E?void 0:null===(e=E.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",E,n,O,(null==R?void 0:null===(i=R.associateCustomer)||void 0===i?void 0:i.isError)?null==R?void 0:null===(t=R.associateCustomer)||void 0===t?void 0:t.error:void 0)},null==E?void 0:null===(f=E.genericErrorCallMeNow)||void 0===f?void 0:f.label,w)}else if((null==R?void 0:null===(s=R.associateCustomer)||void 0===s?void 0:s.isError)||nr){let n;nr&&nd&&(n=(0,nw.n)(nM.S.REFERENCE_CUSTOMER,nd)),(null==R?void 0:null===(m=R.associateCustomer)||void 0===m?void 0:m.isError)&&(null==D?void 0:null===(h=D.customerInfo)||void 0===h?void 0:h.isError)&&(n=null==D?void 0:null===(S=D.customerInfo)||void 0===S?void 0:S.error),null==P||null===(C=P.showAndTrackError)||void 0===C||C.call(P,na,void 0,{...n,isBlocking:!0},"","",void 0,(null==na?void 0:null===(y=na.genericerror)||void 0===y?void 0:y.buttonLabel)||"",()=>{var e;return(0,nk.x)(q,(null==E?void 0:null===(e=E.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",E,void 0,O,n)},null==E?void 0:null===(b=E.genericErrorCallMeNow)||void 0===b?void 0:b.label,w)}}},nm=()=>{var n,e,i,t;let o=(null==R?void 0:null===(n=R.findcaller)||void 0===n?void 0:n.error)||(null==R?void 0:null===(e=R.customerInfo)||void 0===e?void 0:e.error);null==P||null===(t=P.showAndTrackError)||void 0===t||t.call(P,na,()=>{var n;null==k||null===(n=k.resetLockInAppFlow)||void 0===n||n.call(k)},{...o,isBlocking:!0},void 0,void 0,()=>{var n;null==k||null===(n=k.resetLockInAppFlow)||void 0===n||n.call(k)},(null==na?void 0:null===(i=na.genericerror)||void 0===i?void 0:i.buttonLabel)||"Chiudi")};(0,b.ks)()&&((0,g.useEffect)(()=>{var n,e,i;if((0,b.ks)()&&ng(),null==R?void 0:null===(n=R.associateCustomer)||void 0===n?void 0:n.isSuccess){let n=null==R?void 0:null===(i=R.customerInfo)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:e[0];if(n){let e=(0,nl.Vp)(n,K);z({...M,owningIndividual:{...M.owningIndividual,...e}}),F(n.id)}}},[k,nr,D]),(0,g.useEffect)(()=>{var n,e,i,t,o,l;nv&&(null===(i=R.findcaller)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:null===(n=e.customerRef)||void 0===n?void 0:n.id)&&F(null===(l=R.findcaller)||void 0===l?void 0:null===(o=l.data)||void 0===o?void 0:null===(t=o.customerRef)||void 0===t?void 0:t.id)},[nv]),(0,g.useEffect)(()=>{nf&&nm()},[nf]),(0,g.useEffect)(()=>{B(np||nc)},[nc,np]),(0,g.useEffect)(()=>{var n,e,i,t,o,l,r;(null==R?void 0:null===(n=R.findcaller)||void 0===n?void 0:n.isSuccess)&&(null==R?void 0:null===(t=R.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:null===(e=i.customerRef)||void 0===e?void 0:e.id)&&!(null==k?void 0:null===(o=k.campaigns)||void 0===o?void 0:o.isSuccess)&&j(!0),((null==R?void 0:null===(l=R.findcaller)||void 0===l?void 0:l.isError)||(null==R?void 0:null===(r=R.customerInfo)||void 0===r?void 0:r.isError))&&nm()},[R]),(0,g.useEffect)(()=>{T({...N,showOtp:!1}),L(!0)},[]));let{title:nh,ctaLabel:ny}
1=nF((0,y.CA)(y.Jn,y.bl.CMS_GET_ADDONS_COMMON)),nb=Object.keys(X).filter(n=>{var e;return null==E?void 0:null===(e=E.addonList)||void 0===e?void 0:e.some(e=>e.cmsId===n)}),nC=Object.keys(X).filter(n=>{var e;return null==E?void 0:null===(e=E.addonList)||void 0===e?void 0:e.some(e=>e.cmsId===n)}).map(n=>{var e,i,t,o;let l=null==E?void 0:null===(e=E.addonList)||void 0===e?void 0:e.find(e=>e.cmsId===n),r=null==l?void 0:l.boId,d=(null===(t=X[n])||void 0===t?void 0:null===(i=t.addondetails)||void 0===i?void 0:i.id)||"";return{cmsId:n,id:r||d,addondetails:{...null===(o=X[n])||void 0===o?void 0:o.addondetails,id:r||d}}});return(0,g.useEffect)(()=>{_(ni.Bf.ADDON_CARD),Z(ni.v9.ADDON_CARD,{}),localStorage.removeItem("addons")},[]),(0,g.useEffect)(()=>{Y||V("")},[Y]),(0,g.useEffect)(()=>{G.length>0&&Q(null==nC?void 0:nC.filter(n=>{var e;return null==G?void 0:G.includes((null===(e=n.addondetails)||void 0===e?void 0:e.id)||"0")}))},[G]),(0,g.useEffect)(()=>{null==C||C(!(Y||J||I||W))},[Y,J,I,W]),{addons:S,addonIdList:nb,loadingId:H,addonListFiltered:U,title:nh,ctaLabel:ny,isLoadingUpdate:Y,isLoadingPriceUpdate:W,isLoadingCart:I,isLoadingGetAddons:(0,b.ks)()?J||np||nc:J,callSaveAddon:n=>{var e;let i=U.find(e=>e.cmsId===n),t=(null==i?void 0:null===(e=i.addondetails)||void 0===e?void 0:e.id)||"";(0,nN.dw)("aggiungi ".concat(t),"users","click","cart_add"),A({...x,addonCmsId:n,addonMecId:t,callSaveAddon:!0}),V(n)},callRemoveAddon:n=>{var e;let i=U.find(e=>e.cmsId===n),t=(null==i?void 0:null===(e=i.addondetails)||void 0===e?void 0:e.id)||"";(0,nN.dw)("rimuovi ".concat(t),"users","click","cart_remove"),A({...x,addonCmsId:n,addonMecId:t,callRemoveAddon:!0}),V(n)},goNext:()=>{(0,nN.dw)(ny),localStorage.setItem("addons",JSON.stringify(S)),null==h||h({},!1)}}};var nZ=i(47314),nH=i(39893),nV=i(65873),nU=i(56610);let nQ=(n,e,i)=>nH.Wd.post("".concat(nH.bl.FIXED_VOICE_OFFERING_CONFIGURATION,"/").concat(e,"/").concat(n),i),nG=(n,e,i)=>nH.Wd.post("".concat(nH.bl.INTERNET_OFFERING_CONFIGURATION,"/").concat(e,"/").concat(n),i),nY=(n,e,i)=>nH.Wd.post("".concat(nH.bl.DATA_SIM_OFFERING_CONFIGURATION,"/").concat(e,"/").concat(n),i),nW=()=>{var n;let e=(0,no.useQueryClient)(),i=(0,nH.fF)("shoppingCart"),t=null==i?void 0:null===(n=i.cartItem)||void 0===n?void 0:n[0];return(0,no.useMutation)("addAddon",n=>{var e,i,o,l,r;let{cartId:d,addonId:a,type:u}=n;switch(u){case nV.Qd.FIXED_VOICE:{let n=(0,nU.l)(d,a,u),o=null==t?void 0:null===(i=t.fixedVoice)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.id;return nQ(nV.am.ADD_FIXED_VOICE,o,n)}case nV.Qd.INTERNET:{let n=(0,nU.l)(d,a,u),e=null==t?void 0:null===(l=t.internet)||void 0===l?void 0:null===(o=l[0])||void 0===o?void 0:o.id;return nG(nV.am.ADD_INTERNET,e,n)}case nV.Qd.SIM_DATA:{let n=(0,nU.l)(d,a,u),e=null==t?void 0:null===(r=t.dataSim)||void 0===r?void 0:r[0].id;return nY(nV.am.ADD_DATA_SIM,e,n)}}},{onSuccess:n=>{e.setQueryData("addAddon",n)},onError:n=>{nH.KF.error("ERROR - addAddon",n),e.setQueryData("addAddon",(0,nV.nQ)("addAddon",n))}})},nJ=()=>{var n;let e=(0,no.useQueryClient)(),i=(0,nH.fF)("shoppingCart"),t=null==i?void 0:null===(n=i.cartItem)||void 0===n?void 0:n[0];return(0,no.useMutation)("removeAddon",n=>{var e,i,o,l,r;let{cartId:d,addonId:a,type:u}=n;switch(u){case nV.Qd.FIXED_VOICE:{let n=(0,nU.m)(d,a,u),o=null==t?void 0:null===(i=t.fixedVoice)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.id;return nQ(nV.am.REMOVE_FIXED_VOICE,o,n)}case nV.Qd.INTERNET:{let n=(0,nU.m)(d,a,u),e=null==t?void 0:null===(l=t.internet)||void 0===l?void 0:null===(o=l[0])||void 0===o?void 0:o.id;return nG(nV.am.REMOVE_INTERNET,e,n)}case nV.Qd.SIM_DATA:{let n=(0,nU.m)(d,a,u),e=null==t?void 0:null===(r=t.dataSim)||void 0===r?void 0:r[0].id;return nY(nV.am.REMOVE_DATA_SIM,e,n)}}},{onSuccess:n=>{e.setQueryData("removeAddon",n)},onError:n=>{nH.KF.error("ERROR - removeAddon",n),e.setQueryData("removeAddon",(0,nV.nQ)("removeAddon",n))}})};var nX=i(30573),nq=i(15532),nK=i(8013),n$=i(23448),n0=i(69947),n1=i(29261);let n2=(n,e)=>{var i;return null!==(i=null==n?void 0:n.some(n=>n.offeringId===e))&&void 0!==i&&i},n9=n=>{var e,i,t,o,l,r,d,a,u,s,c,v;return{fixedVoiceSection:(null==n?void 0:null===(o=n.bundledFixedVoiceOfferingConfiguration)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:null===(i=t.fixedVoiceOfferingConfiguration)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.bundledAddOnConfiguration)||null,dataSimSection:(null==n?void 0:null===(a=n.bundledDataSimOfferingConfiguration)||void 0===a?void 0:null===(d=a[0])||void 0===d?void 0:null===(r=d.mobileOfferingConfiguration)||void 0===r?void 0:null===(l=r[0])||void 0===l?void 0:l.bundledAddOnGroupConfiguration)||null,internetOfferingSection:(null==n?void 0:null===(v=n.bundledInternetOfferingConfiguration)||void 0===v?void 0:null===(c=v[0])||void 0===c?void 0:null===(s=c.internetOfferingConfiguration)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:u.bundledAddOnConfiguration)||null}},n3=(n,e)=>{let i;let{fixedVoiceSection:t,dataSimSection:o,internetOfferingSection:l}=n9(e);
1return n2(t,n)&&(i=n1.Q.FIXED_VOICE),null==o||o.forEach(e=>{n2(e.bundledAddOnConfiguration,n)&&(i=n1.Q.SIM_DATA)}),n2(l,n)&&(i=n1.Q.INTERNET),i||void 0},n4=(n,e)=>{let i={};switch(n){case n1.Q.FIXED_VOICE:i=e.fixedVoiceOfferingConfiguration;break;case n1.Q.INTERNET:i=e.internetOfferingConfiguration;break;case n1.Q.SIM_DATA:i=e.mobileOfferingConfiguration}return i},n6=(n,e,i)=>{var t,o,l,r;let d=n4(n,i);return(null==d?void 0:null===(r=d.bundledAddOnConfiguration)||void 0===r?void 0:null===(l=r.find(n=>n.offeringId===e))||void 0===l?void 0:null===(o=l.addOnOfferingConfiguration[0])||void 0===o?void 0:null===(t=o.productSpecificationConfiguration)||void 0===t?void 0:t.referenceId)||null},n5=(n,e,i,t)=>{let o=n.getQueryData("SavedAddons")||{};n.setQueryData("SavedAddons",{...o,[e]:{referenceId:i,type:t}})},n7=(n,e)=>{let i=n.getQueryData("SavedAddons")||{};if(i[e]){let{[e]:t,...o}=i;n.setQueryData("SavedAddons",o)}},n8=(n,e)=>{var i;let t=n.getQueryData("SavedAddons");return(null==t?void 0:null===(i=t[e])||void 0===i?void 0:i.referenceId)||""},en=()=>{let{addons:n,setAddons:e,addonState:i,setAddonState:t,product:o,setProduct:l,checkoutErrors:r}=(0,ne.Mg)(),{addonCmsId:d,addonMecId:a,availableAddons:u,callSaveAddon:s,callRemoveAddon:c}=i,v=(0,nq.fF)("shoppingCart"),p=(null==v?void 0:v.id)||"",f=(0,b.YZ)(),m=(0,no.useQueryClient)(),h=m.getQueryData("getAvailableAddons"),C=(0,y.CA)(y.Jn,nq.bl.CMS_GET_GENERIC_ERROR),{mutate:E,data:S,isSuccess:x,isError:I,isLoading:A}=nW(),{mutate:_,data:T,isSuccess:N,isError:L,isLoading:O}=nJ(),{isSuccess:R,data:D,refetch:M,isFetching:P,isError:w}=(0,nX.ju)(p,{enabled:!1,keyDependency:["getShoppingCartAddons"]}),k=()=>{if(d&&a){let n=n3(a,h)||nZ.Q.FIXED_VOICE;E({cartId:p,addonId:a,type:n})}else nq.KF.error("Error in offer update"),t({...n0.kN,availableAddons:u})},j=()=>
1{if(d&&a){let n=n3(a,h)||nZ.Q.FIXED_VOICE;_({cartId:p,addonId:n8(m,a),type:n})}else nq.KF.error("Error in offer update"),t({...n0.kN,availableAddons:u})};return(0,g.useEffect)(()=>{s&&k(),c&&j()},[s,c]),(0,g.useEffect)(()=>{if(x&&S){let i=n3(a,h)||nZ.Q.FIXED_VOICE,o=n6(i,a,S);n5(m,a,o,i),e([...n,d]),t({...n0.kN,availableAddons:u}),M()}},[x,S]),(0,g.useEffect)(()=>{N&&T&&(e(n.filter(n=>n!==d)),n7(m,a),t({...n0.kN,availableAddons:u}),M())},[N,T]),(0,g.useEffect)(()=>{let e=JSON.stringify(n);localStorage.setItem("addons",e)},[n]),(0,g.useEffect)(()=>{if(I||L||w){var n;t({...n0.kN,availableAddons:u}),null==r||null===(n=r.showAndTrackError)||void 0===n||n.call(r,C)}},[I,L,w]),(0,g.useEffect)(()=>{if(R&&D){var n,e;let i=(0,b.Bv)(b.MM.RECURRING),t={...f,price:null==i?void 0:null===(n=i.formattedPrice)||void 0===n?void 0:n.toString()};localStorage.setItem("tProd",JSON.stringify(t)),l({...o,...(0,n$.v)(o,nK.Z.EDIT),price:null==i?void 0:null===(e=i.formattedPrice)||void 0===e?void 0:e.toString()})}t({...n0.kN,availableAddons:u})},[R,D]),(0,g.useEffect)(()=>{(A||O)&&t({...i,isLoadingUpdate:!0})},[A,O]),(0,g.useEffect)(()=>{P?t({...i,isLoadingPriceUpdate:!0}):t({...n0.kN,availableAddons:u})},[P]),null};var ee=i(95125),ei=i(64630),et=i(64612);let eo=(n,e,i)=>{let t=(null==i?void 0:i.title)||"",o=(null==i?void 0:i.description)||"",l=(null==i?void 0:i.buttonLabel)||"",r=e,d=e;return n===nM.S.FISCAL_CODE_UNDERAGE&&(o="Devi essere maggiorenne per proseguire",r=void 0,d=void 0),n===nM.S.FISCAL_CODE_ERROR&&(o="Il codice fiscale non \xe8 valido. Inserisci un codice fiscale valido per proseguire",r=void 0,d=void 0),{title:t,message:o,actionText:l,onClose:r,actionEvent:d}},el=(n,e)=>{var i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M;return{title:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.fiscalCode)||void 0===i?void 0:i.title)||"",description:(null==n?void 0:null===(l=n.personalinfo)||void 0===l?void 0:null===(o=l.fiscalCode)||void 0===o?void 0:o.description)||"",firstNameLable:(null==n?void 0:null===(d=n.personalinfo)||void 0===d?void 0:null===(r=d.selectInput)||void 0===r?void 0:r.firstName)||"",lastNameLable:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.selectInput)||void 0===a?void 0:a.lastName)||"",fiscalCodeLable:(null==n?void 0:null===(c=n.personalinfo)||void 0===c?void 0:null===(s=c.selectInput)||void 0===s?void 0:s.fiscalCode)||"",buttonLabel:(null==n?void 0:null===(p=n.personalinfo)||void 0===p?void 0:null===(v=p.generalInfo)||void 0===v?void 0:v.fcMissingLabel)||"",legacyPopup:{legacyPopupIsOpen:!0,legacyPopupTitle:(null==e?void 0:null===(g=e.commonOverride)||void 0===g?void 0:null===(f=g.legacyCtc)||void 0===f?void 0:f.title)||(null==n?void 0:null===(y=n.personalinfo)||void 0===y?void 0:null===(h=y.clientRecognition)||void 0===h?void 0:null===(m=h.redirect)||void 0===m?void 0:m.title)||"",legacyPopupMessage:(null==e?void 0:null===(C=e.commonOverride)||void 0===C?void 0:null===(b=C.legacyCtc)||void 0===b?void 0:b.description)||(null==n?void 0:null===(x=n.personalinfo)||void 0===x?void 0:null===(S=x.clientRecognition)||void 0===S?void 0:null===(E=S.redirect)||void 0===E?void 0:E.description)||"",legacyPopupActionText:(null==e?void 0:null===(A=e.commonOverride)||void 0===A?void 0:null===(I=A.legacyCtc)||void 0===I?void 0:I.buttonLabel)||(null==n?void 0:null===(N=n.personalinfo)||void 0===N?void 0:null===(T=N.clientRecognition)||void 0===T?void 0:null===(_=T.redirect)||void 0===_?void 0:_.buttonLabel)||"",legacyPopupUrl:(null==e?void 0:null===(O=e.commonOverride)||void 0===O?void 0:null===(L=O.legacyCtc)||void 0===L?void 0:L.url)||(null==n?void 0:null===(M=n.personalinfo)||void 0===M?void 0:null===(D=M.clientRecognition)||void 0===D?void 0:null===(R=D.redirect)||void 0===R?void 0:R.url)||""}}},er=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E;return{title:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientLogged)||void 0===i?void 0:null===(e=i.personalInfo)||void 0===e?void 0:e.title)||"Dati personali",description:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.clientLogged)||void 0===l?void 0:null===(o=l.personalInfo)||void 0===o?void 0:o.description)||"Queste sono le tue informazioni personali.",bottomText:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientLogged)||void 0===a?void 0:null===(d=a.personalInfo)||void 0===d?void 0:d.bottomText)||"Vuoi effettuare lâordine per unâaltra persona?",lableName:(null==n?void 0:null===(v=n.personalinfo)||void 0===v?void 0:null===(c=v.clientLogged)||void 0===c?void 0:null===(s=c.personalInfo)||void 0===s?void 0:s.labelName)||"Il tuo nome e cognome",lableFiscalCode:(null==n?void 0:null===(g=n.personalinfo)||void 0===g?void 0:null===(f=g.clientLogged)||void 0===f?void 0:null===(p=f.personalInfo)||void 0===p?void 0:p.lableFiscalCode)||"Il tuo codice fiscale",action:(null==n?void 0:null===(y=n.personalinfo)||void 0===y?void 0:null===(h=y.clientLogged)||void 0===h?void 0:null===(m=h.personalInfo)||void 0===m?void 0:m.textAction)||"Logout",url:(null==n?void 0:null===(E=n.personalinfo)||void 0===E?void 0:null===(C=E.clientLogged)||void 0===C?void 0:null===(b=C.personalInfo)||void 0===b?void 0:b.url)||"https://www.vodafone.it/accediavodafone/accedi.html"}},ed=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M,P,w,k,j,B,F,z,Z,H,V;return{retriveFiscalCode:{title:(null==n?void 0:null===(i=n.personalinfo)||void 0===i?void 0:null===(e=i.fiscalCode)||void 0===e?void 0:e.title)||"",description:(null==n?void 0:null===(o=n.personalinfo)||void 0===o?void 0:null===(t=o.fiscalCode)||void 0===t?void 0:t.description)||"",firstName:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.selectInput)||void 0===l?void 0:l.firstName)||"",lastName:(null==n?void 0:null===(a=n.personalinfo)||void 0===a?void 0:null===(d=a.selectInput)||void 0===d?void 0:d.lastName)||"",birthDate:(null==n?void 0:null===(s=n.personalinfo)||void 0===s?void 0:null===(u=s.selectInput)||void 0===u?void 0:u.birthdate)||"",gender:(null==n?void 0:null===(v=n.personalinfo)||void 0===v?void 0:null===(c=v.selectInput)||void 0===c?void 0:c.gender)||"",nationality:(null==n?void 0:null===(f=n.personalinfo)||void 0===f?void 0:null===(p=f.selectInput)||void 0===p?void 0:p.country)||"",birthPlace:(null==n?void 0:null===(m=n.personalinfo)||void 0===m?void 0:null===(g=m.selectInput)||void 0===g?void 0:g.city)||"",errorMessage:(null==n?void 0:null===(b=n.personalinfo)||void 0===b?void 0:null===(y=b.generalInfo)||void 0===y?void 0:null===(h=y.errorMessage)||void 0===h?void 0:h.error2)||"",birthNation:(null==n?void 0:null===(E=n.personalinfo)||void 0===E?void 0:null===(C=E.selectInput)||void 0===C?void 0:C.birthNation)||"Nazione di nascita",buttonLabel:(null==n?void 0:null===(x=n.personalinfo)||void 0===x?void 0:null===(S=x.fiscalCode)||void 0===S?void 0:S.buttonLabel)||""},nameFiscalCodeCard:{title:(null==n?void 0:null===(A=n.personalinfo)||void 0===A?void 0:null===(I=A.generalInfo)||void 0===I?void 0:I.title)||"",titleReadOnly:(null==n?void 0:null===(T=n.personalinfo)||void 0===T?void 0:null===(_=T.generalInfo)||void 0===_?void 0:_.titleReadOnly)||(null==n?void 0:null===(L=n.personalinfo)||void 0===L?void 0:null===(N=L.generalInfo)||void 0===N?void 0:N.title)||"",description:(null==n?void 0:null===(R=n.personalinfo)||void 0===R?void 0:null===(O=R.generalInfo)||void 0===O?void 0:O.de
1scription)||"",descriptionReadOnly:(null==n?void 0:null===(M=n.personalinfo)||void 0===M?void 0:null===(D=M.generalInfo)||void 0===D?void 0:D.descriptionReadOnly)||(null==n?void 0:null===(w=n.personalinfo)||void 0===w?void 0:null===(P=w.generalInfo)||void 0===P?void 0:P.description)||"",firstNameLable:(null==n?void 0:null===(j=n.personalinfo)||void 0===j?void 0:null===(k=j.selectInput)||void 0===k?void 0:k.firstName)||"",lastNameLable:(null==n?void 0:null===(F=n.personalinfo)||void 0===F?void 0:null===(B=F.selectInput)||void 0===B?void 0:B.lastName)||"",fiscalCodeLable:(null==n?void 0:null===(Z=n.personalinfo)||void 0===Z?void 0:null===(z=Z.selectInput)||void 0===z?void 0:z.fiscalCode)||"",buttonLabel:(null==n?void 0:null===(V=n.personalinfo)||void 0===V?void 0:null===(H=V.generalInfo)||void 0===H?void 0:H.fcMissingLabel)||""}}},ea=(n,e,i)=>{let t;let o=(0,et.tC)("3");if(!e||!o||e.isNoCookie||e.isLockInMMProduct)return;let l=(0,b.ve)();switch(n){case"anonymous":default:t="anonymous";break;case"existingLegacyCustomer":t="legacy";break;case"existingNextCustomer":t="next"}localStorage.setItem("userType",t),(0,b.oT)(e,null==l?void 0:l.address,null==l?void 0:l.technology,i,t)},eu=n=>{var e;let i=(null==n?void 0:null===(e=n.editorialconfigs)||void 0===e?void 0:e.elements)||[],t=n=>{var e,t;let o=new DOMParser,l=(null==i?void 0:null===(e=i.find(e=>e.id===n))||void 0===e?void 0:e.value)||"";return o.parseFromString((null===(t=(0,A.q)([l||""]))||void 0===t?void 0:t[0])||"","text/html").body.textContent||""};return{requiredField:t("requiredField"),validFiscalCode:t("validFiscalCode"),validName:t("validName"),validSurname:t("validSurname"),surnameMinLen:t("surnameMinLen"),validDate:t("validDate"),nameMinLen:t("nameMinLen")}},es=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("personal data","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step1"],event_label:"personal information",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),(0,nN.kg)(i,"personal information"),null});var ec=i(35977),ev=i(72430);let ep=n=>{var e,i,t,o,l,r,d,a,u;let{handleOnChangeEnableGoNext:s,handleOnClose:c}=n,{currentStepKey:v,checkoutErrors:p,owningData:f,findCaller:m,isLoadingCart:h,isModalButtonSticky:C,customerFlow:E,product:S,setOwningData:x,setFindCaller:I,setCurrentStepKey:A,serializeContext:_,deleteSerializedContext:T,setCheckoutStepState:N}=(0,ne.Mg)(),L=(0,y.CA)(y.Jn,y.bl.CMS_GET_GENERIC_ERROR),O=(0,y.CA)(y.Jn,y.bl.CMS_GET_GLOBAL_CONFIG),R=((null==O?void 0:null===(t=O.globalconfig)||void 0===t?void 0:null===(i=t.cookies)||void 0===i?void 0:null===(e=i.cartCookie)||void 0===e?void 0:e.durationHours)?parseFloat((null==O?void 0:null===(r=O.globalconfig)||void 0===r?void 0:null===(l=r.cookies)||void 0===l?void 0:null===(o=l.cartCookie)||void 0===o?void 0:o.durationHours)||"2"):48)/24,D=(0,no.useQueryClient)(),M=(0,b.DK)(),P=(0,b.AQ)()===b.xx.LOGGED_USER,[w,k]=(0,g.useState)(M),{isLoading:j,isError:B,errorCode:F,getFindCallerResponse:z,isInResetCustomer:Z}=(0,ec.n)({fiscalCode:f.owningIndividual.fiscalCode,owningDataIsValid:!w&&(f.isValid||!1),isFlowEnabled:!h&&!P}),H=["existingLegacyCustomer","inMigration"],[V,U]=(0,g.useState)(""),Q=(0,y.CA)(y.Jn,y.bl.CMS_GET_PERSONAL_DATA),{legacyPopup:G}=el(Q,S),Y=er(Q),W=ed(Q),J=()=>{var n;return(null==S?void 0:null===(n=S.partnerOffer)||void 0===n?void 0:n.isPartnerOffer)||!1},X=P?j||!(null==E?void 0:null===(d=E.associateCustomer)||void 0===d?void 0:d.isSuccess):j,q=(0,nl.De)("personal data","fixed",D),K={...q,opts:{...q.opts},pageProductsInfo:{...q.pageProductsInfo,product_category:"fixed",product_price:"string"==typeof(null===(a=q.pageProductsInfo)||void 0===a?void 0:a.product_price)&&(null===(u=q.pageProductsInfo)||void 0===u?void 0:u.product_price.replace(".",","))}};(0,g.useEffect)(()=>{A(ni.Bf.PERSONAL_INFO),M&&setTimeout(()=>{T(),window.history.pushState(null,"",window.location.pathname),k(!1)},1e3)},[]);let $=()=>{s&&s(f.isValid&&!X&&!h)},nn=()=>{(0,nB.uY)(D,["fiscalCodeBirthPlace","findCaller","generateOTP","verifyOTP","postCustomer","customerData","updateProductCharacteristic","validateDuplicateOrder","payMean","associateCustomer"])};(0,g.useEffect)(()=>{z&&!m.verifyOtp&&z.resultInfo&&H.includes(z.resultInfo)&&nn()},[]),(0,g.useEffect)(()=>
1{if(z){var n,e,i;nB.KF.debug("FIND CALLER RESPONSE",z);let t=!f.isLogged&&!m.isVerified&&!!((null===(n=z.individualRef)||void 0===n?void 0:n.email)||(null===(e=z.individualRef)||void 0===e?void 0:e.msisdn));I({...z,showOtp:t,isVerified:!!f.isLogged}),ea(z.resultInfo,S,R),!m.verifyOtp&&z.resultInfo&&H.includes(z.resultInfo)&&((0,nN.Fk)({event_name:"checkout_step1.3",event_label_track:"coexistent popup"}),null==p||null===(i=p.showAndTrackError)||void 0===i||i.call(p,L,c,void 0,null==G?void 0:G.legacyPopupTitle,null==G?void 0:G.legacyPopupMessage,()=>{(null==G?void 0:G.legacyPopupUrl)?(0,nk.x)(D,null==G?void 0:G.legacyPopupUrl,S,c):c&&c()},null==G?void 0:G.legacyPopupActionText,void 0,void 0,C))}},[z]),(0,g.useEffect)(()=>{if(Z&&!M){var n;null==p||null===(n=p.showAndTrackError)||void 0===n||n.call(p,L,()=>{c&&c()},(0,nw.n)("resetUser",{url:"resetUser",status:"200",statusText:"200"}),"Attenzione!","Vuoi effettuare l'ordine con un altro utente?",()=>{localStorage.removeItem("customerDataCf"),_(!0),setTimeout(()=>{s&&s(!1);let n="".concat(window.location.href,"?").concat(nM.S.MODE_RESET_USER);nB.KF.debug("Redirect reset",n),window.location.href=n},1500)},"Si",()=>{c&&c()},"No",C,!0)}},[Z]),(0,g.useEffect)(()=>{h||$()},[X,f.isLogged,f.isValid,h]),(0,g.useEffect)(()=>{if(B){var n,e;let i=F===nM.S.FISCAL_CODE_ERROR,t=eo(F,c,null==L?void 0:L.genericerror);x({...f,owningIndividual:{...f.owningIndividual,fiscalCode:F===nM.S.FISCAL_CODE_ERROR?f.owningIndividual.fiscalCode:""},isValid:!1}),nn(),F!==nM.S.FISCAL_CODE_ERROR?U(""):U(()=>(null==t?void 0:t.message)||""),null==p||null===(e=p.showAndTrackError)||void 0===e||e.call(p,L,null==t?void 0:t.onClose,(0,nw.n)("checkFiscalCode",{url:"checkFiscalCode",status:"NA",statusText:F||"error"}),null==t?void 0:t.title,null==t?void 0:t.message,null==t?void 0:t.onClose,t.actionText,()=>{var n;return(0,nk.x)(D,(null==S?void 0:null===(n=S.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",S,c,v,(0,nw.n)("checkFiscalCode",{url:"checkFiscalCode",status:"NA",statusText:F||"error"}))},(null==S?void 0:null===(n=S.genericErrorCallMeNow)||void 0===n?void 0:n.label)||"",C,!0,i)}},[B]),(0,g.useEffect)(()=>{N(ni.v9.NAME_FISCAL_CODE_CARD,{})},[]);let nt=()=>{let n=(0,ev.UY)(b.Qh);if(!n){var e,i;null==p||null===(i=p.showAndTrackError)||void 0===i||i.call(p,L,c,(0,nw.n)("partnerOffer",{url:"getPartnerOfferData",status:"500",statusText:"500"}),null==G?void 0:G.legacyPopupTitle,null==G?void 0:G.legacyPopupMessage,c,null==G?void 0:G.legacyPopupActionText,()=>{var n;return(0,nk.x)(D,(null==S?void 0:null===(n=S.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",S,c,v,(0,nw.n)("partnerOffer",{url:"getPartnerOfferData",status:"500",statusText:"500"}))},(null==S?void 0:null===(e=S.genericErrorCallMeNow)||void 0===e?void 0:e.label)||"",C,!0)}return{...f,owningIndividual:{...null==f?void 0:f.owningIndividual,firstName:(null==n?void 0:n.firstName)||"",lastName:(null==n?void 0:n.lastName)||"",fiscalCode:(null==n?void 0:n.fiscalCode)||""}}};return{owningData:f,product:S,dataFromCms:Q,personalInfoConfigCms:Y,nameFiscalCodeConfigCms:W,taggingInfo:K,isLoggedUser:P,isLoading:X,isLoadingReset:w,isLoadingCart:h,isErrorFiscaleCode:V,onChangeData:(n,e)=>{let{owningIndividual:i}=n,{firstName:t,lastName:o,fiscalCode:l}=i,{owningIndividual:r}=f,{firstName:d,lastName:a,fiscalCode:u}=r;f&&x({...n}),t===d&&o===a&&l===u||(nn(),e||x({...n,isValid:!1,isLogged:!1}))},getData:()=>J()?nt():f,isPartnerOffer:J}};var ef=i(4679),eg=i(2985),em=i(62606),eh=i(52107);function ey(){let n=(0,N._)(["\n padding: 0 40px;\n height: 737px;\n "]);return ey=function(){return n},n}function eb(){let n=(0,N._)(["\n padding: 0 74px;\n "]);return eb=function(){return n},n}function eC(){let n=(0,N._)(["\n padding: 0 ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 492px;\n\n ","\n\n ","\n"]);return eC=function(){return n},n}function eE(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return eE=function(){return n},n}function eS(){let n=(0,N._)(["\n height: 30px;\n\n ","\n"]);return eS=function(){return n},n}function ex(){let n=(0,N._)(["\n @-moz-document url-prefix() {\n zoom: 115%;\n }\n "]);return ex=function(){return n},n}function eI(){let n=(0,N._)(["\n @-moz-document url-prefix() {\n zoom: 130%;\n }\n "]);return eI=function(){return n},n}function eA(){let n=(0,N._)(["\n @-moz-document url-prefix() {\n zoom: 0;\n }\n\n ","\n\n ","\n"]);return eA=function(){return n},n}let e_=L.Z.div(eC(),O.r.spacing.md,O.B.tablet(ey()),O.B.desktop(eb())),eT=L.Z.div(eS(),O.B.tablet(eE())),eN=L.Z.div(eA(),O.B.tablet(ex()),O.B.desktop(eI()));var eL=()=>{var n;let{product:e,currentStepKey:i,setCheckoutStepState:t}=(0,ne.Mg)(),o=()=>{var n,t,o,l,r,d;
1switch(i){case ni.Bf.TERMS_AND_CONDITIONS:case ni.Bf.DELIVERY_ADDRESS:return(null==e?void 0:null===(n=e.loaders)||void 0===n?void 0:n.yourAddressCard)||"";case ni.Bf.PAYMENT_METHOD_WITHOUT_RECURRING:case ni.Bf.PAYMENT_METHOD:case ni.Bf.RECURRENT_PAYMENT_CARD:case ni.Bf.UPFRONT_PAYMENT:case ni.Bf.UPFRONT_SELECTION:return(null==e?void 0:null===(t=e.loaders)||void 0===t?void 0:t.choosePayment)||(null==e?void 0:null===(o=e.loaders)||void 0===o?void 0:o.shoppingCart)||"";default:return(null==e?void 0:null===(l=e.loaders)||void 0===l?void 0:l.shoppingCart)||(null==e?void 0:null===(r=e.loaders)||void 0===r?void 0:r.yourAddressCard)||(null==e?void 0:null===(d=e.loaders)||void 0===d?void 0:d.choosePayment)||""}},l=()=>{eh.datadogRum.addError({step:i,message:"La pagina sembra non rispondere in questo momento. Attendi o premi il tasto in basso per essere ricontattato.",error:"stuck"})};return((0,g.useEffect)(()=>{let n=setInterval(()=>{l()},12e4);return()=>clearInterval(n)},[]),(0,g.useEffect)(()=>{t(ni.v9.LOADING_CARD,{})},[]),o())?(0,m.jsxs)(e_,{children:[(0,m.jsx)(eT,{}),(0,m.jsx)(eN,{children:(0,m.jsx)(em.J5,{src:(null===(n=(0,ef.o)(o()))||void 0===n?void 0:n.src)||"",className:"player",loop:!0,autoplay:!0})})]}):(0,m.jsx)(eg.Z,{quantity:2,heights:90})},eO=i(48638),eR=i(62689),eD=i(30681),eM=i(10727),eP=i(71804);let ew=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y;return _.object({phoneNumber:_.string().required((null==n?void 0:null===(t=n.coveragetool)||void 0===t?void 0:null===(i=t.validationMessage)||void 0===i?void 0:null===(e=i.phoneNumber)||void 0===e?void 0:e.required)||"").min(9,(null==n?void 0:null===(r=n.coveragetool)||void 0===r?void 0:null===(l=r.validationMessage)||void 0===l?void 0:null===(o=l.phoneNumber)||void 0===o?void 0:o.maximum)||"").max(10,(null==n?void 0:null===(u=n.coveragetool)||void 0===u?void 0:null===(a=u.validationMessage)||void 0===a?void 0:null===(d=a.phoneNumber)||void 0===d?void 0:d.minimum)||"").matches(/^(3)+[0-9]*$/,(null==n?void 0:null===(v=n.coveragetool)||void 0===v?void 0:null===(c=v.validationMessage)||void 0===c?void 0:null===(s=c.phoneNumber)||void 0===s?void 0:s.matches)||""),emailAddress:_.string().required((null==n?void 0:null===(g=n.coveragetool)||void 0===g?void 0:null===(f=g.validationMessage)||void 0===f?void 0:null===(p=f.emailAddress)||void 0===p?void 0:p.required)||"").email((null==n?void 0:null===(y=n.coveragetool)||void 0===y?void 0:null===(h=y.validationMessage)||void 0===h?void 0:null===(m=h.emailAddress)||void 0===m?void 0:m.email)||"")})};(t=u||(u={})).ERROR="error",t.ADD="add",t.EDIT="edit",(o=s||(s={})).EMAIL="email",o.MSISDN="phone";var ek=i(96443);function ej(){let n=(0,N._)(["\n width: 366px;\n "]);return ej=function(){return n},n}function eB(){let n=(0,N._)(["\n width: 406px;\n "]);return eB=function(){return n},n}function eF(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n ","\n ","\n"]);return eF=function(){return n},n}function ez(){let n=(0,N._)(["\n padding: "," 0 ",";\n font-size: ",";\n line-height: ",";\n "]);return ez=function(){return n},n}function eZ(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return eZ=function(){return n},n}function eH(){let n=(0,N._)(["\n padding: "," 0 ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return eH=function(){return n},n}function eV(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return eV=function(){return n},n}function eU(){let n=(0,N._)(["\n font-weight: ",";\n margin-top: ",";\n margin-bottom: ",";\n text-align: center;\n font-size: ",";\n line-height: ",";\n\n ","\n"]);return eU=function(){return n},n}function eQ(){let n=(0,N._)(["\n gap: ",";\n "]);return eQ=function(){return n},n}function eG(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n }\n\n gap: ",";\n\n ","\n"]);return eG=function(){return n},n}function eY(){let n=(0,N._)(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n margin-bottom: ",";\n display: flex;\n flex-direction: row;\n gap: ",";\n"]);return eY=function(){return n},n}function eW(){let n=(0,N._)(["\n width: fit-content;\n text-align: start;\n margin-left: 10px;\n"]);return eW=function(){return n},n}function eJ(){let n=(0,N._)([""]);return eJ=function(){return n},n}function eX(){let n=(0,N._)(["\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 34px;\n\n .custom-checkbox {\n display: block;\n position: relative;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;
1\n -ms-user-select: none;\n user-select: none;\n }\n\n .custom-checkbox input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n }\n\n .checkmark {\n position: absolute;\n top: 2;\n left: 2;\n margin-top: ",";\n height: 20px;\n width: 20px;\n border-radius: 3px;\n border: 1px solid ",";\n }\n\n .checkmark::after {\n content: '';\n position: absolute;\n display: none;\n }\n\n .custom-checkbox .checkmark:after {\n left: 7px;\n top: 3px;\n width: 5px;\n height: 10px;\n border: solid white;\n border-width: 0 2px 2px 0;\n -webkit-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n .custom-checkbox:hover input ~ .checkmark {\n border: 1px solid ",";\n }\n\n .custom-checkbox input:checked ~ .checkmark {\n background-color: ",";\n border: none;\n }\n\n .custom-checkbox input:checked ~ .checkmark::after {\n display: block;\n }\n"]);return eX=function(){return n},n}function eq(){let n=(0,N._)(["\n gap: ",";\n margin-bottom: ",";\n "]);return eq=function(){return n},n}function eK(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return eK=function(){return n},n}function e$(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ",";\n ","\n\n ","\n"]);return e$=function(){return n},n}function e0(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return e0=function(){return n},n}function e1(){let n=(0,N._)(["\n text-align: left;\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n p {\n margin: 0 0 8px;\n color: ",";\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-all;\n }\n\n div {\n justify-content: flex-start;\n }\n"]);return e1=function(){return n},n}let e2=L.Z.div(eF(),ek.BC.tablet(ej()),ek.BC.desktop(eB())),e9=L.Z.div(eH(),ek.rS.spacing.xl,ek.rS.spacing.md,ek.rS.typography.fontWeight.extrabold,ek.rS.typography.fontSize.h3,ek.rS.typography.lineHeight.h3,ek.BC.tablet(ez(),ek.rS.spacing["3xl"],ek.rS.spacing.md,ek.rS.typography.fontSize.h1,ek.rS.typography.lineHeight.h1),ek.BC.desktop(eZ(),ek.rS.typography.fontSize.h2,ek.rS.typography.lineHeight.h2)),e3=L.Z.div(eU(),ek.rS.typography.fontWeight.regular,ek.rS.spacing.md,ek.rS.spacing.xl,ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.h6,ek.BC.tablet(eV(),ek.rS.spacing["2xl"])),e4=L.Z.div(eG(),ek.rS.spacing.md,ek.BC.tablet(eQ(),ek.rS.spacing.md)),e6=L.Z.div(eY(),ek.rS.typography.fontWeight.regular,ek.rS.typography.fontSize.body3,ek.rS.typography.lineHeight.body3,ek.rS.spacing.xl,ek.rS.spacing.xl,ek.rS.spacing.md),e5=L.Z.div(eW());L.Z.div(eJ());let e7=L.Z.label(eX(),ek.rS.spacing.xs,ek.rS.colors.border.default,ek.rS.colors.border.default,ek.DH.cyanDark),e8=L.Z.div(e$(),ek.rS.spacing.lg,ek.BC.tablet(eq(),ek.rS.spacing.lg,ek.rS.spacing.xs),ek.BC.desktop(eK(),ek.rS.spacing.lg)),ie=L.Z.div(e1(),ek.rS.typography.fontWeight.extrabold,ek.rS.typography.fontSize.body1,ek.rS.typography.lineHeight.body1,ek.BC.tablet(e0(),ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.h6),ek.DH.cyanDark);var ii=i(96789);let it={roSubtitle:"Ecco un riepilogo dei tuoi contatti personali per essere ricontattato al telefono e per ricevere via mail le comunicazioni sullâattivazione. Verifica che siano corretti o modificali prima di proseguire.",roTelephoneLable:"Il tuo numero di telefono",roEmailLable:"Il tuo indirizzo email",roCtaTelephone:"Modifica numero",roCtaEmail:"Modifica email"},io=n=>{var e,i,t,o,l,r,d,a,u,s;return{title:(null==n?void 0:null===(i=n.personalinfo)||void 0===i?void 0:null===(e=i.clientRegistered)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(o=n.personalinfo)||void 0===o?void 0:null===(t=o.generalInfo)||void 0===t?void 0:t.subtitle)||"",telephoneLable:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.selectInput)||void 0===l?void 0:l.telephone)||"",emailLable:(null==n?void 0:null===(a=n.personalinfo)||void 0===a?void 0:null===(d=a.selectInput)||void 0===d?void 0:d.email)||"",footerInfo:(null==n?void 0:null===(s=n.personalinfo)||void 0===s?void 0:null===(u=s.clientRegistered)||void 0===u?void 0:u.smallInfo)||""}},il=n=>{switch(n){case"CRM-0020":case"CRM-0024":return ii.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT;case"CRM-0021":case"CRM-0023":return ii.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT;case"CRM-0022":case"CRM-0025":return ii.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT;default:return""}},ir=(n,e,i)=>{var t,o;let l=e.find(e=>e.error===n),r=(null==i?void 0:i.genericerror)||null;return{title:(null==l?void 0:l.title)||(null==r?void 0:r.title)||"",message:(null==l?void 0:l.message)||(null==r?void 0:r.description)||"",actionText:(null==l?void 0:null===(t=l.button)||void 0===t?void 0:t.t
1itle)||(null==r?void 0:r.buttonLabel)||"",url:(null==l?void 0:null===(o=l.button)||void 0===o?void 0:o.urlForRedirect)||""}};var id=i(64268),ia=i(30100);let iu=n=>{var e;let i=null==n?void 0:null===(e=n.owningIndividual)||void 0===e?void 0:e.contactMedium;if(i&&i.length>0){let n=i.find(n=>"email"===n.type),e=i.find(n=>"phone"===n.type);(null==n?void 0:n.emailAddress)?localStorage.setItem(ia.e,n.emailAddress):localStorage.removeItem(ia.e),(null==e?void 0:e.phoneNumber)?localStorage.setItem(ia.j,e.phoneNumber):localStorage.removeItem(ia.j)}},is=n=>{let{data:e,onChangeData:i,onChangeCheck:t,checkInfo:o,setIsValidForm:l}=n,r=(0,no.useQueryClient)(),{owningIndividual:d}=e,a=(0,y.CA)(y.Jn,eM.b.CMS_GET_PERSONAL_DATA),c=(0,y.CA)(y.Jn,eM.b.CMS_GET_COVERAGE_TOOL_CONFIG),{currentStepKey:v,isModalButtonSticky:p,checkoutErrors:f,findCaller:h,setOwningData:E}=(0,ne.Mg)(),{isError:I,error:A,mutateAsync:_}=(0,eD.n)(),{mutateAsync:T,isLoading:N,isSuccess:L,error:O,isError:R}=(0,eR.S)();(0,g.useEffect)(()=>{if(R){var n,e;null==f||null===(e=f.showAndTrackError)||void 0===e||e.call(f,G,()=>{},(0,b.nQ)("patchCustomer",O,nM.S.BILLING_ERROR),null==O?void 0:O.statusText,"",()=>{},"Ops si \xe8 verificato un errore",()=>{var n;return(0,eO.x)(r,(null==W?void 0:null===(n=W.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",W,()=>{},v,(0,b.nQ)("patchCustomer",O,nM.S.BILLING_ERROR))},(null==W?void 0:null===(n=W.genericErrorCallMeNow)||void 0===n?void 0:n.label)||"",p,!0)}},[R]);let[D,M]=(0,g.useState)({isOpen:!1,type:s.EMAIL,operationType:u.EDIT}),[P,w]=(0,g.useState)({email:-2,phone:-2}),[k,j]=(0,g.useState)(!1),{register:B,getValues:F,setValue:z,formState:{isValid:Z,errors:H}}=(0,C.cI)({resolver:(0,x.X)(ew(c)),mode:"onChange"}),V=(n,i,t)=>{var o,l;if(!d.contactMedium)return;null==d||d.contactMedium.push(n===s.EMAIL?{type:n,preferred:t,emailAddress:i}:{type:n,preferred:t,phoneNumber:i});let r=(null!==(l=null==d?void 0:null===(o=d.contactMedium)||void 0===o?void 0:o.length)&&void 0!==l?l:0)-1;n===s.EMAIL?P.email=r:P.phone=r,w(P),E({...e,owningIndividual:d})},U=n=>{let e=-2;return(null==d?void 0:d.contactMedium)&&-1===(e=null==d?void 0:d.contactMedium.findIndex(e=>e.type===n&&e.preferred))&&-1===(e=null==d?void 0:d.contactMedium.findIndex(e=>e.type===n))&&V(n,"",!0),e},Q=()=>{var n,e,i,t;let o=U(s.EMAIL),l=U(s.MSISDN),r=(null==d?void 0:null===(e=d.contactMedium)||void 0===e?void 0:null===(n=e[o])||void 0===n?void 0:n.emailAddress)||"",a=(null==d?void 0:null===(t=d.contactMedium)||void 0===t?void 0:null===(i=t[l])||void 0===i?void 0:i.phoneNumber)||"";-1!==o&&(P.email=o,z("emailAddress",r,{shouldValidate:""!==r})),-1!==l&&(P.phone=l,z("phoneNumber",a,{shouldValidate:""!==a})),w(P)};(0,g.useEffect)(()=>{if(e.isLogged||e.isValid){let n=()=>{var n,i;let{owningIndividual:t}=e,o=null==t?void 0:null===(n=t.contactMedium)||void 0===n?void 0:n.find(n=>n.type===s.MSISDN),l=null==t?void 0:null===(i=t.contactMedium)||void 0===i?void 0:i.find(n=>n.type===s.EMAIL);return!!((null==o?void 0:o.phoneNumber)&&(null==l?void 0:l.emailAddress)&&"3"===o.phoneNumber.substring(0,1))};setTimeout(()=>{i&&i({...e,owningIndividual:d},n())},250)}},[]),(0,g.useEffect)(()=>{Q(),i&&i({...e,owningIndividual:d},Z),localStorage.setItem("emailAddress",JSON.stringify(F("emailAddress"))),localStorage.setItem("phoneNumber",JSON.stringify(F("phoneNumber")))},[Z,d]);let G=(0,y.CA)(y.Jn,eM.b.CMS_GET_GENERIC_ERROR),{errorcomponent:Y}=(0,y.CA)(y.Jn,eM.b.CMS_GET_CUSTOMER_ERROR_FIXED)||{},W=(0,id.YZ)();(0,g.useEffect)(()=>{if(I&&D.operationType!==u.ERROR){var n,e,i;let t=ir(il((null===(n=A.headers)||void 0===n?void 0:n.get("ERR-backendErrorCode"))||""),(null==Y?void 0:Y.errors)||[],G);null==f||null===(i=f.showAndTrackError)||void 0===i||i.call(f,G,()=>{},(0,b.nQ)("patchCustomer",A,nM.S.PATCH_CUSTOMER),null==t?void 0:t.title,null==t?void 0:t.message,()=>{},(null==t?void 0:t.actionText)||"",()=>{var n;return(0,eO.x)(r,(null==W?void 0:null===(n=W.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",W,()=>{},v,(0,b.nQ)("patchCustomer",A,nM.S.PATCH_CUSTOMER))},(null==W?void 0:null===(e=W.genericErrorCallMeNow)||void 0===e?void 0:e.label)||"",p,!0)}},[I]),(0,g.useEffect)(()=>{null==l||l(Z)},[Z]);let{footerInfo:J,subtitle:X,title:q,telephoneLable:K,emailLable:$}=io(a),nn=()=>{M({isOpen:!1,operationType:u.EDIT,type:s.EMAIL})},ni=n=>{j(!0),_([{updatedValue:n.value,type:"number",operation:"replace",index:1}]).then(()=>{(null==d?void 0:d.contactMedium)&&(null==d||d.contactMedium.forEach((e,i)=>{var t;e.type===s.MSISDN&&(null==d?void 0:null===(t=d.contactMedium)||void 0===t?void 0:t[i])&&(d.contactMedium[i].phoneNumber=n.value)}));let i={...e,owningIndividual:d};E({...i}),iu({...i}),j(!1),nn()}).catch(n=>{j(!1),eO.K.debug(n)})},nt=()=>{var n;return null===(n=h.subscription)||void 0===n?void 0:n.filter(n=>"M"===n.serviceType).map(n=>({type:"phone",preferred:!1,phoneNumber:n.msisdn}))},nl=()=>{var n;return!(!nt()||nt()&&(null===(n=nt())||void 0===n?void 0:n.length)===0)},nr=(n,e)=>
1{M({isOpen:!0,type:n,operationType:e})},nd=()=>{let n=F();(null==d?void 0:d.contactMedium)&&(d.contactMedium[P.email].emailAddress=n.emailAddress,d.contactMedium[P.phone].phoneNumber=n.phoneNumber),i&&i({...e,owningIndividual:d},Z)},na=n=>{" "===n.key&&n.preventDefault()};return{title:q,subtitle:X,alreadyExistsCustomer:()=>{var n,e;return(0,m.jsxs)(e8,{children:[(0,m.jsxs)(ie,{children:[it.roTelephoneLable,(0,m.jsx)("p",{"data-cs-mask":"",children:(null==d?void 0:d.contactMedium)&&-2!==P.phone?null==d?void 0:null===(n=d.contactMedium[P.phone])||void 0===n?void 0:n.phoneNumber:""}),(0,m.jsx)(eP.Z,{onClick:()=>nr(s.MSISDN,nl()?u.ADD:u.EDIT),text:it.roCtaTelephone})]}),(0,m.jsxs)(ie,{children:[it.roEmailLable,(0,m.jsx)("p",{"data-cs-mask":"",children:(null==d?void 0:d.contactMedium)&&-2!==P.email?null==d?void 0:null===(e=d.contactMedium[P.email])||void 0===e?void 0:e.emailAddress:""}),(0,m.jsx)(eP.Z,{onClick:()=>nr(s.EMAIL,u.EDIT),text:it.roCtaEmail})]})]})},notExistsCustomer:()=>{var n,e;return(0,m.jsxs)(e4,{children:[(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{"data-cs-mask":"",label:K,error:null===(n=H.phoneNumber)||void 0===n?void 0:n.message,autoComplete:"off",placeholder:" ",...B("phoneNumber",{onChange:nd})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{"data-cs-mask":"",label:$,type:"email",error:null===(e=H.emailAddress)||void 0===e?void 0:e.message,autoComplete:"off",placeholder:" ",onKeyDown:n=>na(n),...B("emailAddress",{onChange:n=>{z("emailAddress",n.target.value.replace(/\s+/g,"")),null==nd||nd()}})})})]})},onCheckClickHandler:()=>{t({checkContactProblem:!(null==o?void 0:o.checkContactProblem)})},footerInfo:J,modalConfig:D,resetModal:nn,loading:k,onChangeNumber:ni,getAllNumbers:nt,owningIndividual:d,modifyField:n=>{n.phoneNumber?ni({title:"",value:n.phoneNumber}):(j(!0),_([{updatedValue:n.email,type:"email",operation:"replace",index:0}]).then(()=>{(null==d?void 0:d.contactMedium)&&(d.contactMedium[P.email].emailAddress=n.email);let i={...e,owningIndividual:d};E({...i}),iu({...i}),j(!1),nn()}).catch(n=>{j(!1),eO.K.debug(n)}),T({billFormat:"eBill",emailAddress:n.email}))}}};var ic=i(82898),iv=i(66649),ip=i(12418);let ig=n=>{var e;let{title:i,subtitle:t,alreadyExistsCustomer:o,notExistsCustomer:l,onCheckClickHandler:r,footerInfo:d,modalConfig:a,resetModal:c,loading:v,onChangeNumber:p,getAllNumbers:f,owningIndividual:g,modifyField:h,isReadOnly:y,checkInfo:b}=n;return(0,m.jsxs)(e2,{children:[(0,m.jsx)(e9,{children:i}),(0,m.jsx)(e3,{children:y?it.roSubtitle:t}),y?o():l(),(0,m.jsxs)(e6,{children:[(0,m.jsx)("div",{children:(0,m.jsx)(e7,{children:(0,m.jsxs)("div",{className:"custom-checkbox","data-testid":"consent-checkbox",children:[(0,m.jsx)("input",{type:"checkbox",checked:b.checkContactProblem,onChange:r}),(0,m.jsx)("span",{className:"checkmark"})]})})}),(0,m.jsx)(e5,{children:d})]}),(0,m.jsx)(ic.Z,{isOpen:a.isOpen&&a.operationType===u.ADD,handleClose:c,children:(0,m.jsxs)(m.Fragment,{children:[v&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.E,{"data-cs-mask":"",onChangeNumber:p,isLoading:v,data:f(),selectedNumber:(null==g?void 0:null===(e=g.contactMedium)||void 0===e?void 0:e[1].phoneNumber)||""})]})}),(0,m.jsx)(ic.Z,{isOpen:a.isOpen&&a.operationType===u.EDIT,handleClose:c,children:(0,m.jsxs)(m.Fragment,{children:[v&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.B,{isLoading:v,onSubmit:h,handleClose:c,isPhone:a.type===s.MSISDN})]})})]})};var im=n=>{let{data:e,onChangeData:i,checkInfo:t,onChangeCheck:o,isReadOnly:l,setIsValidForm:r}=n,{title:d,subtitle:a,alreadyExistsCustomer:u,notExistsCustomer:s,onCheckClickHandler:c,footerInfo:v,modalConfig:p,resetModal:f,loading:g,onChangeNumber:h,getAllNumbers:y,owningIndividual:b,modifyField:C}=is({data:e,onChangeData:i,checkInfo:t,onChangeCheck:o,setIsValidForm:r});return(0,m.jsx)(ig,{title:d,subtitle:a,alreadyExistsCustomer:u,notExistsCustomer:s,onCheckClickHandler:c,footerInfo:v,modalConfig:p,resetModal:f,loading:g,onChangeNumber:h,getAllNumbers:y,owningIndividual:b,modifyField:C,isReadOnly:l,checkInfo:t})},ih=i(52275),iy=i(45867),ib=i(90722),iC=i(12902);let iE=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,m,h,C,E;let{handleOnClose:S}=n,{currentStepKey:x,product:I,findCaller:A,customerFlow:_,customerAsyncInfo:T,owningData:N,checkoutErrors:L,isModalButtonSticky:O,lockInMMFlow:R,setIsShowCheckout:D,setProduct:M,setIsStartLockInMMFlow:P,setIsDisabledBackButton:w,setCustomerId:k,setOwningData:j,setIsStartCustomerFlow:B,setFindCaller:F}=(0,ne.Mg)(),z=null==I?void 0:I.isLockInMMProduct,Z=(0,no.useQueryClient)(),H=(0,nj.f)("getCountry"),V={id:A.verifyOtp},{isSuccess:U,isLoading:Q,isError:G,error:Y}=(0,nP.O)(),{associateCustomer:W}=_,J=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),{errorcomponent:X}=(0,y.CA)(y.Jn,iy.bl.CMS_GET_ORDER_ERROR),{errors:q}=X||{},K=null==q?void 0:q.find(n=>(null==n?void 0:n.error)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED),$=(null==R?void 0:null===(e=R.campaigns)||void 0===e?void 0:e.isLoading)||(null==R?void 0:null===(i=R.accept)||void 0===i?void 0:i.isLoading)||(null==R?void 0:null===(t=R.shoppingCart)||void 0===t?void 0:t.isLoading),nn=(null==R?void 0:null===(o=R.campaigns)||void 0===o?void 0:o.isError)||(null==R?void 0:null===(l=R.campaigns)||void 0===l?void 0:l.isSuccess)&&!(null==R?void 0:null===(r=R.checkEligibility)||void 0===r?void 0:r.eligible)||(null==R?void 0:null===(d=R.campaigns)||void 0===d?void 0:d.isSuccess)&&!(null==R?void 0:null===(a=R.checkEligibility)||void 0===a?void 0:a.lockInProduct)||(null==R?void 0:null===(u=R.accept)||void 0===u?void 0:u.isError)||(null==R?void 0:null===(s=R.shoppingCart)||void 0===s?void 0:s.isError),ni=(null==R?void 0:null===(c=R.campaigns)||void 0===c?void 0:c.isSuccess)&&(null==R?void 0:null===(v=R.accept)||void 0===v?void 0:v.isSuccess)&&(null==R?void 0:null===(p=R.shoppingCart)||void 0===p?void 0:p.isSuccess),nt=Q||!U||!!(null==V?void 0:V.id)&&!W.isSuccess||(null==_?void 0:null===(f=_.billingAccount)||void 0===f?void 0:f.isLoading)||(null==T?void 0:null===(m=T.customerInfo)||void 0===m?void 0:m.isLoading)||(null==_?void 0:null===(h=_.paymean)||void 0===h?void 0:h.isLoading)||(null==_?void 0:null===(C=_.payment)||void 0===C?void 0:C.isLoading)||(null==T?void 0:null===(E=T.termsAndConditions)||void 0===E?void 0:E.isLoading),nr=()=>{if(W.isSuccess||W.isError||G){var n,e,i,t,o,l,r,d,a,u,s,c,v,p;if(F({...A,...(null==_?void 0:null===(e=_.findcaller)||void 0===e?void 0:null===(n=e.data)||void 0===n?void 0:n.paymean)&&{paymean:null==_?void 0:null===(t=_.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.paymean},showOtp:!1,verifyOtp:"",isVerified:!0}),W.isError&&(null===(l=W.error)||void 0===l?void 0:null===(o=l.error)||void 0===o?void 0:o.statusText)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED){let n=()=>{S&&((0,ib.u)(Z),S())},e=()=>{var n,e;(null==K?void 0:null===(n=K.button)||void 0===n?void 0:n.urlForRedirect)?(0,nk.x)(Z,(null==K?void 0:null===(e=K.button)||void 0===e?void 0:e.urlForRedirect)||"",I,()=>{S&&((0,ib.u)(Z),S())},x,W.error):S&&((0,ib.u)(Z),S())};null==L||null===(a=L.showAndTrackError)||void 0===a||a.call(L,J,()=>n(),(null==W?void 0:W.isError)?W.error:void 0,(null==K?void 0:K.title)||"Attenzione",(null==K?void 0:K.message)||"I seguenti articoli non sono attivabili dal cliente selezionato",()=>e(),(null==K?void 0:null===(r=K.button)||void 0===r?void 0:r.title)||"Ti richiamiamo",()=>{var e;return(0,nk.x)(Z,(null==I?void 0:null===(e=I.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",I,n,x,(null==W?void 0:W.isError)?W.error:void 0)},null==I?void 0:null===(d=I.genericErrorCallMeNow)||void 0===d?void 0:d.label,O)}else if(W.isError||G){let n;G&&Y&&(n=(0,b.nQ)(nM.S.REFERENCE_CUSTOMER,Y)),W.isError&&(null==T?void 0:null===(u=T.customerInfo)||void 0===u?void 0:u.isError)&&(n=null==T?void 0:null===(p=T.customerInfo)||void 0===p?void 0:p.error),null==L||null===(v=L.showAndTrackError)||void 0===v||v.call(L,J,S,{...n,isBlocking:!0},"","",S,(null==J?void 0:null===(s=J.genericerror)||void 0===s?void 0:s.buttonLabel)||"",()=>{var n;return(0,nk.x)(Z,(null==I?void 0:null===(n=I.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",I,S)},null==I?void 0:null===(c=I.genericErrorCallMeNow)||void 0===c?void 0:c.label,O)}}},nd=()=>{!ni||nt||$||z||!R.checkEligibility.lockInProduct||(localStorage.setItem("tProd_backUp",JSON.stringify(I)),M({...R.checkEligibility.lockInProduct,...(0,iC.vn)(R.checkEligibility.lockInProduct),slug:null==I?void 0:I.slug,shoppingCartUrl:null==I?void 0:I.shoppingCartUrl,isLockInMMProduct:!0}),D(!1))},na=()=>{let n=(0,b.AQ)();return!(0,iC.af)()&&(n===b.xx.NEXT_USER_ACTIVE||n===b.xx.LOGGED_USER)&&I.enableLockInFlow};return(0,g.useEffect)(()=>
1{if(nr(),W.isSuccess){var n;let e=null===(n=T.customerInfo.data)||void 0===n?void 0:n[0];if(e){let n=(0,nl.Vp)(e,H);j({...N,owningIndividual:{...N.owningIndividual,...n}}),k(e.id)}}},[W,G,T]),(0,g.useEffect)(()=>{var n,e,i,t,o,l;(nn||ni)&&(null===(i=_.findcaller)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:null===(n=e.customerRef)||void 0===n?void 0:n.id)&&k(null===(l=_.findcaller)||void 0===l?void 0:null===(o=l.data)||void 0===o?void 0:null===(t=o.customerRef)||void 0===t?void 0:t.id)},[nn,ni]),(0,g.useEffect)(()=>{w(nt||$),nd()},[$,nt]),(0,g.useEffect)(()=>{var n,e,i,t,o,l,r,d,a,u,s;let c=(0,b.AQ)(),v=_.findcaller&&(null===(e=_.findcaller)||void 0===e?void 0:null===(n=e.data)||void 0===n?void 0:n.customerHasActiveSubs)&&(null===(o=_.findcaller)||void 0===o?void 0:null===(t=o.data)||void 0===t?void 0:null===(i=t.customerRef)||void 0===i?void 0:i.id);na()&&(c===b.xx.LOGGED_USER||v)?P(!0):v&&(null===(d=_.findcaller)||void 0===d?void 0:null===(r=d.data)||void 0===r?void 0:null===(l=r.customerRef)||void 0===l?void 0:l.id)&&k(null===(s=_.findcaller)||void 0===s?void 0:null===(u=s.data)||void 0===u?void 0:null===(a=u.customerRef)||void 0===a?void 0:a.id)},[_.findcaller]),(0,g.useEffect)(()=>{F({...A,showOtp:!1}),z||B(!0)},[]),{isLoading:!z&&($||nt)}},iS=(n,e)=>{let{owningData:i,contactInfo:t,setOwningData:o,setContactInfo:l,setCurrentStepKey:r,setIsDisabledBackButton:d,customerFlow:a,setCheckoutStepState:u}=(0,ne.Mg)(),{isLoading:s}=iE(n),c=(0,b.AQ)()!==b.xx.LOGGED_USER&&s,[v,p]=(0,g.useState)(!1);return(0,b.AQ)(),b.xx.LOGGED_USER,(0,g.useEffect)(()=>{e&&(d(!1),(0,b.gp)()?setTimeout(()=>{e(!c&&(v||(0,b.gp)()))},800):setTimeout(()=>{e(!c&&v)},800))},[v,c]),(0,g.useEffect)(()=>{i.owningIndividual&&iu(i)},[null==i?void 0:i.owningIndividual]),(0,g.useEffect)(()=>{r(ni.Bf.CONTACT_CARD),(0,b._d)(t)},[]),(0,g.useEffect)(()=>{u(ni.v9.CONTACT_CARD,{})},[]),{isLoading:c,customerFlow:a,owningData:i,contactInfo:t,onChangeData:n=>
1{iu(n),o(n)},onChangeCheck:n=>{let e="off";n.checkContactProblem&&(e="on"),(0,nN.dw)("re-contact checkbox ".concat(e)),(0,b._d)(n),l(n)},setIsValidForm:p}};var ix=()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("contact","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step2"],event_label:"contacts",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i),(0,nt.q)(i),null},iI=i(95147);let iA=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("OTP","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step1.2"],event_label:"OTP",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i,"OTP"),(0,nt.q)(i),null});var i_=i(51039),iT=i(8244);let iN=n=>{let{handleOnChangeEnableGoNext:e,handleGoPrevSlide:i}=n,t=(0,no.useQueryClient)(),{currentStepKey:o,checkoutErrors:l,findCaller:r,isModalButtonSticky:d,product:a,timerID:u,setFindCaller:s,setIsDisabledBackButton:c,setTimerID:v,setCheckoutStepState:p}=(0,ne.Mg)(),{mutate:f,isError:m,error:h}=(0,i_.Z2)(),{mutate:y,data:b,isSuccess:C,isError:E,isLoading:S,error:x}=(0,i_.US)(),I=(0,i_.CA)(i_.Jn,eM.b.CMS_GET_GENERIC_ERROR),A=(0,i_.CA)(i_.Jn,eM.b.CMS_GET_PERSONAL_DATA),[_,T]=(0,g.useState)(!1),[N,L]=(0,g.useState)(!1),O=(n,e)=>{var i,o,l,r,d,a,s,c,p,g,m,h;(0,iT.uY)(t,["generateOTP"]),f({identifier:n,identifierType:e}),(null==A?void 0:null===(l=A.personalinfo)||void 0===l?void 0:null===(o=l.clientRecognition)||void 0===o?void 0:null===(i=o.timer)||void 0===i?void 0:i.amount)&&!isNaN(parseInt(null==A?void 0:null===(a=A.personalinfo)||void 0===a?void 0:null===(d=a.clientRecognition)||void 0===d?void 0:null===(r=d.timer)||void 0===r?void 0:r.amount))&&parseInt(null==A?void 0:null===(p=A.personalinfo)||void 0===p?void 0:null===(c=p.clientRecognition)||void 0===c?void 0:null===(s=c.timer)||void 0===s?void 0:s.amount)>0&&(clearInterval(u),L(!0),v((0,i_.Zn)(parseInt(null==A?void 0:null===(h=A.personalinfo)||void 0===h?void 0:null===(m=h.clientRecognition)||void 0===m?void 0:null===(g=m.timer)||void 0===g?void 0:g.amount),()=>L(!1))))},R=(0,i_.CA)(i_.Jn,eM.b.CMS_GET_GLOBAL_CONFIG),D=null==R?void 0:R.globalconfig,M=parseInt(localStorage.getItem("numOfOtpFailures")||"0",10);return(0,g.useEffect)(()=>{var n,e,r,u,s;if(m){if(M<((null==D?void 0:null===(n=D.otp)||void 0===n?void 0:n.maxFailureNumber)||0))localStorage.setItem("numOfOtpFailures",(M+1).toString());else{let n=(null==D?void 0:null===(e=D.otp)||void 0===e?void 0:e.adHocError)||{};m&&i&&(null==l||null===(s=l.showAndTrackError)||void 0===s||s.call(l,I,i,(0,i_.nQ)("generateOtp",h),void 0,void 0,i,(null==I?void 0:null===(r=I.genericerror)||void 0===r?void 0:r.buttonLabel)||"",()=>{var n;return(0,iT.xb)(t,(null==a?void 0:null===(n=a.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",a,()=>i(),o,(0,i_.nQ)("generateOtp",h))},(null==a?void 0:null===(u=a.genericErrorCallMeNow)||void 0===u?void 0:u.label)||"",d,!0));let c=()=>{window.open((null==n?void 0:n.buttonLink)||"","_self")};iT.D0.handleError(iT.T_.getSeverityErrorHigh(),{title:(null==n?void 0:n.title)||"",message:(null==n?void 0:n.description)||"",onClose:c,actionEvent:c,actionText:(null==n?void 0:n.buttonLabel)||"",trackError:(0,nl.yP)((0,i_.nQ)("generate",h||void 0))})}}},[m]),(0,g.useEffect)(()=>{let n=()=>{localStorage.removeItem("numOfOtpFailures")};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[]),(0,g.useEffect)(()=>{(E||!E&&C&&!b)&&(T(!0),x&&(0,iT.Fk)({...(0,nl.yP)((0,i_.nQ)("VerifyOtp",x),"OTP"),page_error_code:x.status||""}))},[C,b,E]),(0,g.useEffect)(()=>{if(e){var n;s({...r,isVerified:!!b,verifyOtp:(null==b?void 0:b.id)||""}),localStorage.setItem(i_.V7,(null==r?void 0:null===(n=r.selectedContactMedium)||void 0===n?void 0:n.fieldType)||""),e(!!b)}},[b]),(0,g.useEffect)(()=>{c(S)},[S]),(0,g.useEffect)(()=>{_&&setTimeout(()=>{T(!1)},3e3)},[_]),(0,g.useEffect)(()=>{var n;(null===(n=r.selectedContactMedium)||void 0===n?void 0:n.field)&&O(r.selectedContactMedium.field,r.selectedContactMedium.fieldType)},[]),(0,g.useEffect)(()=>{p(ni.v9.OTP_CARD,{})},[]),{dataFromCms:A,product:a,isError:_,isLoading:S,isSuccessVerifyOtp:C,isTimerActive:N,handleSendOtp:O,handleVerify:n=>{y(n)},handleSetError:()=>{T(!1)},findCaller:r}};var iL=i(21271),iO=i(33849),iR=i(29949);let iD=(n,e)=>{var i,t,o,l,r,d,a,u,s,c;return{titleCms:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientRecognition)||void 0===i?void 0:i.title)||"",descriptionCms:(null==n?void 0:null===(l=n.personalinfo)||void 0===l?void 0:null===(o=l.clientRecognition)||void 0===o?void 0:o.description)||"",placeholderCms:(null==n?void 0:null===(d=n.personalinfo)||void 0===d?void 0:null===(r=d.selectInput)||void 0===r?void 0:r.contactPlaceholder)||"",ctaLabelCms:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientRecognition)||void 0===a?void 0:a.contactNotAccessLabel)||"",ctaUrl:(null==n?void 0:null===(c=n.personalinfo)||void 0===c?void 0:null===(s=c.clientRecognition)||void 0===s?void 0:s.contactNotAccessUrl)||(null==e?void 0:e.urlClickToCallOtp)||""}},iM=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("confirm id","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step1.1"],event_label:"verify id",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i),(0,nt.q)(i),null});var iP=i(12822),iw=i(44180);let ik=n=>{var e,i,t,o,l,r;let d=null==n?void 0:null===(e=n.portability)||void 0===e?void 0:e.activationFixedLine;return{cardData:{title:(null==d?void 0:d.title)||"",items:[{title:(null==d?void 0:null===(i=d.choice)||void 0===i?void 0:i.option1)||"",value:"yes"},{title:(null==d?void 0:null===(t=d.choice)||void 0===t?void 0:t.option2)||"",value:"internetOnly"},{title:(null==d?void 0:null===(o=d.choice)||void 0===o?void 0:o.option3)||"",value:"no"}]},errorOnPortability:{erroMessage:{genericError:{title:(null==n?void 0:null===(r=n.portability)||void 0===r?void 0:null===(l=r.errorOnPortability)||void 0===l?void 0:l.message)||""}}}}},ij=n=>{var e,i,t,o,l,r,d,a,u,s,c,v;let{handleOnChangeEnableGoNext:p,handleOnClose:f}=n,m=(0,b.YZ)(),{currentStepKey:h,checkoutErrors:C,portability:E,isModalButtonSticky:S,customerFlow:x,setIsStartCustomerFlow:I,setPortability:A,setCurrentStepKey:_,setSlidesGoBack:T,setIsDisabledBackButton:N,setCheckoutStepState:L}=(0,ne.Mg)(),{urlGenericErrorCallMeNow:O}=(0,b.S6)(m),R=(0,no.useQueryClient)(),[D,M]=(0,g.useState)((null==E?void 0:E.portabilityLine)?{title:"",value:(null==E?void 0:E.portabilityLine)||""}:void 0),P=(null==x?void 0:null===(e=x.postCustomer)||void 0===e?void 0:e.isLoading)||(null==x?void 0:null===(i=x.patchCustomer)||void 0===i?void 0:i.isLoading)||(null==x?void 0:null===(t=x.customerInfo)||void 0===t?void 0:t.isLoading)||(null==x?void 0:null===(o=x.associateCustomer)||void 0===o?void 0:o.isLoading),w=(null==x?void 0:null===(l=x.postCustomer)||void 0===l?void 0:l.isError)||(null==x?void 0:null===(r=x.patchCustomer)||void 0===r?void 0:r.isError)||(null==x?void 0:null===(d=x.customerInfo)||void 0===d?void 0:d.isError)||(null==x?void 0:null===(a=x.associateCustomer)||void 0===a?void 0:a.isError),k=(null==x?void 0:null===(u=x.postCustomer)||void 0===u?void 0:u.error)||(null==x?void 0:null===(s=x.patchCustomer)||void 0===s?void 0:s.error)||(null==x?void 0:null===(c=x.associateCustomer)||void 0===c?void 0:c.error),j=null==x?void 0:null===(v=x.associateCustomer)||void 0===v?void 0:v.isSuccess,B=(0,y.CA)(y.Jn,iw.bl.CMS_GET_PORTABILITY),F=(0,y.
1CA)(y.Jn,iw.bl.CMS_GET_GENERIC_ERROR),{cardData:z,errorOnPortability:Z}=ik(B),{errorcomponent:H}=(0,y.CA)(y.Jn,iw.bl.CMS_GET_ORDER_ERROR)||{},V=(null==H?void 0:H.errors)||[],{errorcomponent:U}=(0,y.CA)(y.Jn,iw.bl.CMS_GET_CUSTOMER_ERROR_FIXED)||{},Q=[...V,...(null==U?void 0:U.errors)||[]];return(0,g.useEffect)(()=>{let n=document.getElementById("sticky-offer-next"),e=()=>{let n;n=(null==D?void 0:D.value)==="yes"?"yes with phone":(null==D?void 0:D.value)==="internetOnly"?"yes internet only":"no portability",(0,iw.dw)(n)};return null==n||n.addEventListener("click",e),()=>{null==n||n.removeEventListener("click",e)}},[D]),(0,g.useEffect)(()=>{null==p||p(!P&&!!D)},[P,D]),(0,g.useEffect)(()=>{if(w){var n,e,i,t,o;let l=(0,nl.Tz)(Q,(null==k?void 0:k.errorCode)||"",{title:(null==F?void 0:null===(n=F.genericerror)||void 0===n?void 0:n.title)||"Ops",description:(null==F?void 0:null===(e=F.genericerror)||void 0===e?void 0:e.description)||(null==Z?void 0:null===(t=Z.erroMessage)||void 0===t?void 0:null===(i=t.genericError)||void 0===i?void 0:i.title)||""}),r=n=>{var e;switch(null==x||null===(e=x.resetPatchAndPost)||void 0===e||e.call(x,x),null==k?void 0:k.errorCode){case nM.S.CREATE_CUSTOMER_FISCAL_CODE_ALREADY_PRESENT:T(4);break;case nM.S.CREATE_CUSTOMER_DOCUMENT_ALREADY_PRESENT:case nM.S.CREATE_CUSTOMER_MISSING_NATION_ADDRESS:(null==l?void 0:l.isPopup)&&n?(0,iw.xb)(R,(null==l?void 0:l.url)||O,m,()=>{f&&f()},h,k):T(2);break;case nM.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT:case nM.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT:case nM.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT:T(3);break;case nM.S.ASSOCIATE_CUSTOMER_BLOCKED:(null==l?void 0:l.isPopup)&&n?(0,iw.xb)(R,(null==l?void 0:l.url)||O,m,()=>{f&&f()},h,k):f&&f();break;default:f&&f()}};null==C||null===(o=C.showAndTrackError)||void 0===o||o.call(C,{genericerror:{title:(null==l?void 0:l.title)||"",description:(null==l?void 0:l.message)||"",buttonLabel:(null==l?void 0:l.actionText)||"Chiudi"}},r,k,"","",()=>r(!0),"",void 0,"",S)}},[w]),(0,g.useEffect)(()=>{N(P)},[P]),(0,g.useEffect)(()=>{_(ni.Bf.PORTABILITY_LINE),I(!0),L(ni.v9.PORTABILITY_LINE_CARD,{})},[]),{cardData:z,portability:E,selectedItem:D,isSuccessAssociate:j,handleSelect:n=>{A({...E,portabilityLine:(null==n?void 0:n.value)||"",portabilityWant:!1}),localStorage.setItem("portability",(null==n?void 0:n.value)==="yes"?"1":"0")},setSelectedItem:M}};var iB=i(31728),iF=i(89065);let iz=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("portability","fixed",n),{product:i}=(0,iB.q)(),{trackView:t}=(0,nt.r)({event:["checkout_step4"],event_label:"portability",opts:e.opts,cartProduct:{...e.trackingProduct,cart_total:(null==i?void 0:i.price)&&(0,iF.F)(i.price)},pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)(),disableInitialTrack:!1});return(0,nt.q)(t),(0,nN.kg)(t,"portability"),null});var iZ=i(65429);let iH=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("portability","fixed",n),i=(0,id.YZ)(),{trackView:t}=(0,nt.r)({event:["checkout_step4.5"],event_label:"portability info message",opts:e.opts,cartProduct:{...e.trackingProduct,cart_total:(null==i?void 0:i.price)&&(0,nR.F)(i.price)},pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(t),(0,nN.kg)(t),null}),iV=n=>{var e,i,t,o;return{title:(null==n?void 0:null===(i=n.portability)||void 0===i?void 0:null===(e=i.modalInfo)||void 0===e?void 0:e.title)||"",description:(null==n?void 0:null===(o=n.portability)||void 0===o?void 0:null===(t=o.modalInfo)||void 0===t?void 0:t.description)||""}},iU=n=>{let{handleOnChangeEnableGoNext:e}=n,{setCurrentStepKey:i,setCheckoutStepState:t}=(0,ne.Mg)(),{title:o,description:l}=iV((0,iO.C)(iO.J,eM.b.CMS_GET_PORTABILITY));return(0,g.useEffect)(()=>{i(ni.Bf.PORTABILITY_INTERNET),t(ni.v9.PORTABILITY_INTERNET_CARD,{}),e&&e(!0)},[]),{title:o,description:l}},iQ=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("portability","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step4.2"],event_label:"landline information",opts:e.opts,cartProduct:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),(0,nN.kg)(i),null}),iG=(n,e)=>{var i,t,o,l;let r=null==n?void 0:null===(i=n.portability)||void 0===i?void 0:i.lineInfo;return{title:(null==r?void 0:r.title)||"",description:(null==r?void 0:null===(t=r.description)||void 0===t?void 0:t.replace("PHONENUMBER","".concat((null==e?void 0:e.portabilityNumber)||"")))||"",items:[{title:(null==r?void 0:null===(o=r.choice)||void 0===o?void 0:o.option1)||"",value:"TelInt"},{title:(null==r?void 0:null===(l=r.choice)||void 0===l?void 0:l.option2)||"",value:"TelOnly"}]}},iY=n=>{let{handleOnChangeEnableGoNext:e}=n,{portability:i,setPortability:t,setCurrentStepKey:o,setCheckoutStepState:l}
1=(0,ne.Mg)(),[r,d]=(0,g.useState)(),{title:a,items:u,description:s}=iG((0,iO.C)(iO.J,eM.b.CMS_GET_PORTABILITY),i);return(0,g.useEffect)(()=>{o(ni.Bf.PORTABILITY_INFORMATIONS),l(ni.v9.PORTABILITY_INFO_CARD,{}),d(void 0),t({...i,portabilityInfo:"",portabilityOperators:""})},[]),{title:a,items:u,description:s,selectedItem:r,portability:i,setSelectedItem:d,handleSelect:n=>{t({...i,portabilityInfo:(null==n?void 0:n.value)||"",portabilityOperators:""}),n&&e&&e(!0)}}};var iW=i(74875),iJ=i(36731),iX=i(12949);function iq(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n cursor: ",";\n display: flex;\n"]);return iq=function(){return n},n}function iK(){let n=(0,N._)(["\n ","\n cursor: ",";\n margin-right: ",";\n"]);return iK=function(){return n},n}let i$=L.Z.label(iq(),iJ.r.typography.fontSize.body2,iJ.r.typography.lineHeight.caption,n=>{let{disabled:e}=n;return e?"not-allowed":"pointer"}),i0=L.Z.input(iK(),iX.MJ,n=>{let{disabled:e}=n;return e?"not-allowed":"pointer"},iJ.r.spacing.sm),i1=(0,g.forwardRef)((n,e)=>{let{children:i,styled:t,disabled:o,style:l,...r}=n;return(0,m.jsxs)(i$,{disabled:o,style:l,children:[(0,m.jsx)(i0,{...r,disabled:o,ref:e,type:"checkbox"}),i]})});function i2(){let n=(0,N._)(["\n padding-top: ",";\n padding-left: ",";\n padding-right: ",";\n padding-bottom: ",";\n "]);return i2=function(){return n},n}function i9(){let n=(0,N._)(["\n padding-top: ",";\n padding-left: ",";\n padding-right: ",";\n padding-bottom: ",";\n "]);return i9=function(){return n},n}function i3(){let n=(0,N._)(["\n padding-top: ",";\n padding-left: ",";\n padding-right: ",";\n\n padding-bottom: ",";\n\n ","\n\n ","\n"]);return i3=function(){return n},n}function i4(){let n=(0,N._)(["\n margin: 0;\n font-weight: ",";\n color: ",";\n"]);return i4=function(){return n},n}function i6(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return i6=function(){return n},n}function i5(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return i5=function(){return n},n}function i7(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n text-align: center;\n\n ","\n\n ","\n"]);return i7=function(){return n},n}function i8(){let n=(0,N._)(["\n margin-top: ",";\n "]);return i8=function(){return n},n}function tn(){let n=(0,N._)(["\n display: flex;\n background-color: transparent;\n padding: 0;\n margin: 0;\n border: none;\n border-bottom: 1px solid ",";\n margin-top: ",";\n color: ",";\n font-weight: ",";\n font-family: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n &:hover {\n cursor: pointer;\n }\n"]);return tn=function(){return n},n}function te(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n "]);return te=function(){return n},n}function ti(){let n=(0,N._)(["\n margin-top: ",";\n "]);return ti=function(){return n},n}function tt(){let n=(0,N._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n\n text-align: start;\n color: ",";\n margin-top: ",";\n\n ","\n\n ","\n"]);return tt=function(){return n},n}function to(){let n=(0,N._)(["\n padding: 0;\n "]);return to=function(){return n},n}function tl(){let n=(0,N._)(["\n padding: 0;\n ","\n"]);return tl=function(){return n},n}function tr(){let n=(0,N._)(["\n padding-top: ",";\n font-size: ",";\n line-height: ",";\n "]);return tr=function(){return n},n}function td(){let n=(0,N._)(["\n padding-top: ",";\n font-size: ",";\n line-height: ",";\n "]);return td=function(){return n},n}function ta(){let n=(0,N._)(["\n text-align: left;\n\n ","\n\n ","\n"]);return ta=function(){return n},n}function tu(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return tu=function(){return n},n}function ts(){let n=(0,N._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n text-align: left;\n\n ","\n"]);return ts=function(){return n},n}function tc(){let n=(0,N._)(["\n width: 328px;\n margin: "," auto;\n "]);return tc=function(){return n},n}function tv(){let n=(0,N._)(["\n width: 100%;\n margin-top: ",";\n\n .button-slide-container:last-of-type {\n margin-top: ",";\n }\n\n ","\n"]);return tv=function(){return n},n}function tp(){let n=(0,N._)(["\n text-align: center;\n "]);return tp=function(){return n},n}function tf(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n text-align: center;\n\n ","\n"]);return tf=function(){return n},n}function tg(){let n=(0,N._)(["\n margin-top: ",";\n \n "]);return tg=function(){return n},n}function tm(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-top: ",";\n\n div {\n text-align: left;\n\n &:first-child {\n margin-bottom: ",";\n }\n }\n\n ","\n\n \n"]);return tm=function(){return n},n}function th(){let n=(0,N._)(["\n color: ",";\n font-family: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n"]);return th=function(){return n},n}function ty(){let n=(0,N._)(["\n margin-top: 2px;\n "]);return ty=function(){return n},n}function tb(){let n=(0,N._)(["\n display: flex;\n width: 100%;\n margin: 20px 10px 0 0;\n\n ","\n\n span {\n color: ",";\n font-family: ",";\n font-size: ",";\n line-height: ",";\n font-weight: ",";\n }\n"]);return tb=function(){return n},n}let tC=L.Z.div(i3(),O.r.spacing.xl,O.r.spacing.lg,O.r.spacing.lg,n=>n.isMultipleOperators?O.r.spacing.xl:O.r.spacing["3xl"],O.B.tablet(i2(),O.r.spacing["3xl"],O.r.spacing["2xl"],O.r.spacing["2xl"],n=>n.isMultipleOperators?O.r.spacing["3xl"]:"207px"),O.B.desktop(i9(),O.r.spacing["3xl"],O.r.spacing["2xl"],O.r.spacing["2xl"],n=>n.isMultipleOperators?O.r.spacing["3xl"]:"207px")),tE=L.Z.p(i4(),O.r.typography.fontWeight.regular,O.r.colors.text.primary),tS=(0,L.Z)(tE)(i7(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h4,O.r.typography.lineHeight.h4,O.B.tablet(i6(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1),O.B.desktop(i5(),O.r.typography.fontSize.h2,O.r.typography.lineHeight.h2));L.Z.button(tn(),O.r.colors.text.primary,O.r.spacing.md,O.r.colors.text.primary,O.r.typography.fontWeight.bold,O.r.typography.fontFamily.secondary,O.r.typography.fontSize.body2,O.r.typography.lineHeight.body2,O.B.tablet(i8(),O.r.spacing.md));let tx=(0,L.Z)(tE)(tt(),O.r.typography.fontFamily.secondary,O.r.typography.fontSize.caption,O.r.typography.lineHeight.caption,O.r.colors.text.secondary,O.r.spacing.lg,O.B.tablet(te(),O.r.typography.fontSize.body3,O.r.typography.lineHeight.body3,O.r.spacing.xl),O.B.desktop(ti(),O.r.spacing["2xl"])),tI=L.Z.div(tl(),O.B.tablet(to())),tA=(0,L.Z)(tS)(ta(),O.B.tablet(tr(),O.r.spacing.sm,O.r.typography.fontSize.h4,O.r.typography.lineHeight.h4),O.B.desktop(td(),O.r.spacing.sm,O.r.typography.fontSize.h2,O.r.typography.lineHeight.h2)),t_=(0,L.Z)(tE)(ts(),O.r.typography.fontFamily.secondary,O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1,O.r.spacing.xl,O.B.tablet(tu(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1)),tT=L.Z.div(tv(),O.r.spacing.xl,O.r.spacing.lg,O.B.tablet(tc(),O.r.spacing.xl)),tN=(0,L.Z)(tE)(tf(),O.r.typography.fontFamily.secondary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.typography.lineHeight.body3,O.r.spacing.sm,O.B.tablet(tp())),tL=L.Z.div(tm(),O.r.spacing.md,O.r.spacing.sm,O.B.tablet(tg(),O.r.spacing.sm)),tO=L.Z.div(th(),O.r.colors.text.primary,O.r.typography.fontFamily.secondary,O.r.typography.fontSize.body3,O.r.typography.lineHeight.body3,O.r.typography.fontWeight.regular),tR=L.Z.div(tb(),O.B.tablet(ty()),O.r.colors.text.primary,O.r.typography.fontFamily.secondary,O.r.typography.fontSize.body3,O.r.typography.lineHeight.body3,O.r.typography.fontWeight.regular);function tD(){let n=(0,N._)(["\n text-align: center;\n"]);return tD=function(){return n},n}function tM(){let n=(0,N._)(["\n margin: 0;\n font-weight: ",";\n color: ",";\n"]);return tM=function(){return n},n}function tP(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return tP=function(){return n},n}function tw(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n \n\n ","\n"]);return tw=function(){return n},n}function tk(){let n=(0,N._)(["\n margin-top: ",";\n display: flex;\n flex-direction: column;\n gap: 1rem;\n\n .text-input {\n width: 100%;\n }\n"]);return tk=function(){return n},n}let tj=L.Z.div(tD()),tB=L.Z.p(tM(),O.r.typography.fontWeight.regular,O.r.colors.text.primary),tF=(0,L.Z)(tB)(tw(),O.r.typography.fontFamily.secondary,O.r.typography.fontWeight.bold,O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6,O.B.tablet(tP(),O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6)),tz=L.Z.div(tk(),n=>n.isMultipleOperators?O.r.spacing.md:O.r.spacing.lg);var tZ=i(2008);let tH=()=>_.object({operator:_.string().required("Campo Obbligatorio"),migrationCode:_.string().required("Campo Obbligatorio").min(8,"codice di migrazione non valido").max(20,"codice di migrazione non valido")}),tV=n=>{let{onChangeData:e,passedData:i}=n,{hookReturn:{register:t,setValue:o,getValues:l,formState:{errors:r}},registerSearchSelect:d}=(0,tZ.c)({resolver:(0,x.X)(tH()),mode:"all"}),a=n=>(null==n?void 0:n.operator)!==""&&(null==n?void 0:n.migrationCode)!=="";return(0,g.useEffect)(()=>{let n=a(i);i&&(o("operator",i.operator,{shouldValidate:n,shouldTouch:n}),o("migrationCode",i.migrationCode,{shouldValidate:n,shouldTouch:n}))},[]),{register:t,setValue:o,getValues:l,errors:r,registerSearchSelect:d,handlerData:()=>{let n=l(),i=""!==n.operator&&n.migrationCode.length>=8&&n.migrationCode.length<=20;null==e||e(l(),i)},isPassed:a}};var tU=n=>{var e;let{onChangeData:i,operators:t,title:o,isMultipleOperators:l,dropdownPlaceholder:r,textInputPlaceholder:d,hiddenMigrationCode:a,passedData:u}=n,{register:s,setValue:c,errors:v,registerSearchSelect:p,handlerData:f}=tV({onChangeData:i,passedData:u});return(0,m.jsxs)(tj,{children:[(0,m.jsx)(tF,{children:o}),(0,m.jsxs)(tz,{isMultipleOperators:l,children:[(0,m.jsx)("div",{className:"text-input",children:(0,m.jsx)(S.Z.SearchSelect,{placeholder:" ",label:r,items:t,searchable:!0,autoComplete:"off",...p("operator"),setValue:n=>{c("operator",n),f()}})}),!a&&(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{label:d,placeholder:" ",...s("migrationCode",{onChange:n=>{c("migrationCode",n.target.value.replace(/\s+/g,"")),f()}}),error:(null==v?void 0:null===(e=v.migrationCode)||void 0===e?void 0:e.message)||""})})]})]})},tQ=i(85363);let tG=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y;return{chooseOperator:[{title:(null==n?void 0:null===(t=n.portability)||void 0===t?void 0:null===(i=t.provider)||void 0===i?void 0:null===(e=i.providerTitles)||void 0===e?void 0:e.providerOne)||"",textInput:(null==n?void 0:null===(l=n.portability)||void 0===l?void 0:null===(o=l.selectInput)||void 0===o?void 0:o.migrationCode)||"",dropDown:(null==n?void 0:null===(d=n.portability)||void 0===d?void 0:null===(r=d.provider)||void 0===r?void 0:r.title)||""},{title:(null==n?void 0:null===(s=n.portability)||void 0===s?void 0:null===(u=s.provider)||void 0===u?void 0:null===(a=u.providerTitles)||void 0===a?void 0:a.providerTwo)||"",textInput:(null==n?void 0:null===(v=n.portability)||void 0===v?void 0:null===(c=v.selectInput)||void 0===c?void 0:c.migrationCode)||"",dropDown:(null==n?void 0:null===(f=n.portability)||void 0===f?void 0:null===(p=f.provider)||void 0===p?void 0:p.title)||""}],lineInfo:{option1:(null==n?void 0:null===(m=n.portability)||void 0===m?void 0:null===(g=m.lineInfo)||void 0===g?void 0:g.choice.option1)||"",option2:null==n?void 0:null===(y=n.portability)||void 0===y?void 0:null===(h=y.lineInfo)||void 0===h?void 0:h.choice.option2}}},tY=n=>{var e,i,t,o;
1let{onChangeFirst:l,onChangeSecond:r,onNoCode:d,data:a,portabilityData:u,handleGoNextSlide:s}=n,{isMultipleOperators:c,title:v,migrationCodeCtaLabel:p,findmigrationlabel:f,skipMigrationCodeCheckboxText:m,otherInformationText:y,modalMigrationCode:b}=u,{firstOperator:C,firstCode:E,secondOperator:S,secondCode:x,noCode:I}=a,{portabilityStatus:A,setPortabilityStatus:_}=(0,ne.Mg)(),[T,N]=(0,g.useState)(!1),L=(0,h.f)("multiPlayOfferingConfiguration"),O=(null==L?void 0:null===(o=L.fixedVoicePortInDetails)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:null===(i=t.r1MissingMigrationFixedPortInSpecification)||void 0===i?void 0:null===(e=i.r1FirstDonatingNetworkOperator)||void 0===e?void 0:e.availableValues)||[],R=O.map(n=>n.displayValue),D=(0,iO.C)(iO.J,h.b.CMS_GET_PORTABILITY),M=tG(D),P=(0,g.useCallback)(()=>N(n=>!n),[]);return{isMultipleOperators:c,title:v,migrationCodeCtaLabel:p,findmigrationlabel:f,skipMigrationCodeCheckboxText:m,otherInformationText:y,modalMigrationCode:b,firstOperator:C,firstCode:E,secondOperator:S,secondCode:x,noCode:I,portabilityStatus:A,setPortabilityStatus:_,isOpenModal:T,setIsOpenModal:N,multiPlayOfferingConfiguration:L,serviceProviders:O,providers:R,cmsData:D,portabilityCms:M,toggleModal:P,onChangeFirstOperatorData:(n,e)=>{l&&l(n,e)},onChangeSecondOperatorData:(n,e)=>{tQ.K.debug(e,n),r&&r(n,e)},choseNoMigrationCodeFromModal:()=>{null==d||d(!0),C&&!c||c&&C&&S?(_({...A,isStartPortIn:!0}),null==s||s()):P()}}};var tW=n=>{var e,i,t,o,l,r,d,a,u,s;let{portabilityData:c,data:v,handleGoNextSlide:p,onChangeFirst:f,onChangeSecond:g,onNoCode:h}=n,{isMultipleOperators:y,title:b,migrationCodeCtaLabel:C,findmigrationlabel:E,skipMigrationCodeCheckboxText:S,otherInformationText:x,modalMigrationCode:I,firstOperator:A,firstCode:_,secondOperator:T,secondCode:N,noCode:L,isOpenModal:O,providers:R,portabilityCms:D,toggleModal:M,onChangeFirstOperatorData:P,onChangeSecondOperatorData:w,choseNoMigrationCodeFromModal:k}=tY({onChangeFirst:f,onChangeSecond:g,onNoCode:h,data:v,portabilityData:c,handleGoNextSlide:p});return(0,m.jsxs)(tC,{isMultipleOperators:y||!1,children:[(0,m.jsx)(tS,{children:b}),(0,m.jsx)(iW.Z,{marginBottom:2}),(0,m.jsx)(tU,{isMultipleOperators:y||!1,title:y?(null==D?void 0:null===(e=D.lineInfo)||void 0===e?void 0:e.option1)||"Linea telefonica":(null==D?void 0:null===(i=D.lineInfo)||void 0===i?void 0:i.option2)||"Linea telefonica e internet",operators:R,onChangeData:P,textInputPlaceholder:(null==D?void 0:null===(o=D.chooseOperator)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:t.textInput)||"",dropdownPlaceholder:(null==D?void 0:null===(r=D.chooseOperator)||void 0===r?void 0:null===(l=r[0])||void 0===l?void 0:l.dropDown)||"",hiddenMigrationCode:!!L,passedData:{operator:A||"",migrationCode:_||""}}),y&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iW.Z,{marginBottom:2}),(0,m.jsx)(tU,{isMultipleOperators:y||!1,title:(null==D?void 0:null===(d=D.chooseOperator)||void 0===d?void 0:d[1].title)||"",operators:R,onChangeData:w,textInputPlaceholder:(null==D?void 0:null===(u=D.chooseOperator)||void 0===u?void 0:null===(a=u[1])||void 0===a?void 0:a.textInput)||"",dropdownPlaceholder:(null==D?void 0:null===(s=D.chooseOperator)||void 0===s?void 0:s[1].dropDown)||"",hiddenMigrationCode:!!L,passedData:{operator:T||"",migrationCode:N||""}})]}),(0,m.jsxs)(tL,{children:[(0,m.jsx)(tO,{children:E}),(0,m.jsx)(eP.Z,{onClick:M,text:C}),(0,m.jsx)(tR,{children:(0,m.jsx)(i1,{checked:L,onChange:()=>null==h?void 0:h(!L),children:(0,m.jsx)("span",{className:"checkmark",children:S})})})]}),(0,m.jsx)(tx,{children:x}),(0,m.jsx)(ic.Z,{isOpen:O,handleClose:M,height:526,children:(0,m.jsxs)(tI,{children:[(0,m.jsx)(tA,{children:null==I?void 0:I.title}),(0,m.jsx)(t_,{children:null==I?void 0:I.description}),(0,m.jsxs)(tT,{children:[(0,m.jsx)(nu.Z,{borderColor:"#262626",labelColor:"#262626",isApp:(0,ee.k)(),label:null==I?void 0:I.addMigrationCodeLabel,onClick:()=>{null==h||h(!1),M()},name:"action_migration"}),(0,m.jsx)(nu.Z,{borderColor:"#262626",labelColor:"#262626",isApp:(0,ee.k)(),label:null==I?void 0:I.noCode,onClick:k,name:"action_migration"})]}),(0,m.jsx)(tN,{children:null==I?void 0:I.migrationCodeLabel})]})})]})};let tJ=nr()(n=>{let{isMultipleOperators:e}=n,i=(0,no.useQueryClient)(),t=(0,nl.De)("portability","fixed",i),{trackView:o}=(0,nt.r)({event:["checkout_step4.4"],event_label:e?"two carrier":"one carrier",opts:t.opts,cartProduct:t.trackingProduct,pageProduct:null==t?void 0:t.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(o),(0,nN.kg)(o,"portability"),null});var tX=i(41307),tq=i(1733),tK=i(38206);let t$=async(n,e,i)=>
1tX.W.get("".concat(h.b.MULTI_PLAYING_OFFERING_CONFIGURATION,"/").concat(n,"?salesChannel=selfService&context=shoppingCart.Id==").concat(e,"&configurationType=descriptiveCharacteristics&levelOfData=portIn"),{searchParams:void 0,...(null==i?void 0:i.headers)&&{headers:i.headers},...(null==i?void 0:i.silentLoginHeaders)&&{silentLoginHeaders:i.silentLoginHeaders}}),t0=(n,e)=>{var i,t;let o=(0,no.useQueryClient)(),l=(0,h.f)("shoppingCart"),r=(0,h.f)("associateCustomer"),d=null==l?void 0:l.id,a=null==l?void 0:null===(t=l.cartItem)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:i.id;return(0,no.useQuery)(["multiPlayOfferingConfiguration"],()=>t$(a,d),{enabled:(null==e?void 0:e.enabled)!==void 0?e.enabled:!!a&&!!d&&!!r,onSuccess:e=>{let i=(0,tK.Yq)(e,n);localStorage.setItem("multiPlayOfferingConfiguration",JSON.stringify(i)),o.setQueryData("multiPlayOfferingConfigurationQuery",i)},onError:n=>{tX.K.error("ERROR - multiPlayOfferingConfiguration: ",n),localStorage.setItem("multiPlayOfferingConfiguration",JSON.stringify((0,tq.n)("multiPlayOfferingConfiguration",n)))}})},t1=(n,e)=>{var i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x;return{title:(null==n?void 0:null===(t=n.portability)||void 0===t?void 0:null===(i=t.provider)||void 0===i?void 0:i.title)||"",migrationCodeCtaLabel:(null==n?void 0:null===(r=n.portability)||void 0===r?void 0:null===(l=r.provider)||void 0===l?void 0:null===(o=l.operatorSelect)||void 0===o?void 0:o.findMigrationLabel)||"",skipMigrationCodeCheckboxText:(null==n?void 0:null===(u=n.portability)||void 0===u?void 0:null===(a=u.provider)||void 0===a?void 0:null===(d=a.operatorSelect)||void 0===d?void 0:d.skipMigrationCodeCheckboxText)||"",otherInformationText:(null==n?void 0:null===(v=n.portability)||void 0===v?void 0:null===(c=v.provider)||void 0===c?void 0:null===(s=c.operatorSelect)||void 0===s?void 0:s.smallInfo)||"",operatorsList:(null==n?void 0:null===(p=n.portability)||void 0===p?void 0:p.operatorList)||null,modalMigrationCode:{title:(null==n?void 0:null===(g=n.portability)||void 0===g?void 0:null===(f=g.modal)||void 0===f?void 0:f.title)||"",description:(null==n?void 0:null===(h=n.portability)||void 0===h?void 0:null===(m=h.modal)||void 0===m?void 0:m.description)||"",addMigrationCodeLabel:(null==n?void 0:null===(b=n.portability)||void 0===b?void 0:null===(y=b.modal)||void 0===y?void 0:y.buttonLabel)||"",noCode:(null==n?void 0:null===(E=n.portability)||void 0===E?void 0:null===(C=E.modal)||void 0===C?void 0:C.noCode)||"",migrationCodeLabel:(null==n?void 0:null===(x=n.portability)||void 0===x?void 0:null===(S=x.modal)||void 0===S?void 0:S.codeNotFound)||""},isMultipleOperators:(null==e?void 0:e.portabilityOperators)==="double",findmigrationlabel:""}},t2=n=>{var e;let{handleOnChangeEnableGoNext:i,handleOnClose:t}=n,{currentStepKey:o,portability:l,portabilityStatus:r,checkoutErrors:d,product:a,setPortability:u,setPortabilityStatus:s,setCurrentStepKey:c,setCheckoutStepState:v}=(0,ne.Mg)(),p=(0,no.useQueryClient)(),[f,m]=(0,g.useState)(!1),h=(0,nj.f)("multiPlayOfferingConfiguration"),[C,E]=(0,g.useState)(!h),{buttonGenericError:S,urlGenericErrorCallMeNow:x}=(0,b.S6)(a),I=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),A=(0,y.CA)(y.Jn,iy.bl.CMS_GET_PORTABILITY),_=t1(A,l),{isMultipleOperators:T}=_,{error:N,isLoading:L,isError:O,isSuccess:R,refetch:D}=t0(null==A?void 0:null===(e=A.portability)||void 0===e?void 0:e.operatorList,{enabled:!1}),M=n=>{let e=(()=>{let{portabilityMigration:e}=n,{firstOperator:i,firstCodeValid:t,secondOperator:o,secondCodeValid:l,noCode:r}=e||{};return r?T?!!(i&&o):!!i:T?!!(i&&o&&t&&l):!!i&&!!t})();m(e),null==i||i(e)},P=()=>{let n=(n,e)=>{let i=e;if("TELECOM ITALIA"===n&&i){if(i.length<=14)i="".concat(i.slice(0,i.length-1),"111").concat(i[i.length-1]);else if(i.length>=15&&i.length<=16){let n=i.slice(-4,-1);if(n.includes("OFA")||n.includes("012"))return i;i="".concat(i.slice(0,i.length-1),"111").concat(i[i.length-1])}}return i};if(l.portabilityMigration){var e,i;l.portabilityMigration.firstCode=n((null==l?void 0:null===(e=l.portabilityMigration)||void 0===e?void 0:e.firstOperator)||"",null==l?void 0:l.portabilityMigration.firstCode),l.portabilityMigration.secondCode=n((null==l?void 0:null===(i=l.portabilityMigration)||void 0===i?void 0:i.secondOperator)||"",null==l?void 0:l.portabilityMigration.secondCode)}return l};return(0,g.useEffect)(()=>{let n=document.getElementById("sticky-offer-next"),e=()=>{let n=P();s({...r,isStartPortIn:!0}),u({...n})};return f?null==n||n.addEventListener("click",e):null==n||n.removeEventListener("click",e),()=>{null==n||n.removeEventListener("click",e)}},[f,l]),(0,g.useEffect)(()=>{M(l)},[l]),(0,g.useEffect)(()=>
1{if(O){var n;null==d||null===(n=d.showAndTrackError)||void 0===n||n.call(d,I,t,(0,b.nQ)("multiplayoffering",N),void 0,void 0,()=>(0,nk.x)(p,x,a,t,o,(0,b.nQ)("multiplayoffering",N)),S)}else R&&E(!1)},[O,R]),(0,g.useEffect)(()=>{c(ni.Bf.PORTABILITY_MIGRATIONS),v(ni.v9.PORTABILITY_MIGRATION_CARD,{}),localStorage.setItem(b.UP,"1"),C&&!L&&D()},[]),{isLoading:C,portabilityData:_,onChangeFirstCode:(n,e)=>{let i={...l,portabilityMigration:{...l.portabilityMigration,firstOperator:n.operator,firstCode:n.migrationCode,firstCodeValid:e}};u(i),M(i)},onChangeSecondCode:(n,e)=>{let i={...l,portabilityMigration:{...l.portabilityMigration,secondOperator:n.operator,secondCode:n.migrationCode,secondCodeValid:e}};u(i),M(i)},onNoCode:n=>{let e={...l,portabilityMigration:{...l.portabilityMigration,noCode:n}};n?localStorage.setItem(b.UP,"0"):localStorage.setItem(b.UP,"1"),u(e),M(e)},portability:l,isMultipleOperators:T}},t9=n=>{var e,i,t,o,l,r,d;let a=null==n?void 0:null===(e=n.portability)||void 0===e?void 0:e.provider;return{title:(null==a?void 0:null===(i=a.operatorInfo)||void 0===i?void 0:i.title)||"",description:(null==a?void 0:null===(t=a.operatorInfo)||void 0===t?void 0:t.description)||"",items:[{title:(null==a?void 0:null===(l=a.operatorInfo)||void 0===l?void 0:null===(o=l.choice)||void 0===o?void 0:o.option1)||"",value:"single"},{title:(null==a?void 0:null===(d=a.operatorInfo)||void 0===d?void 0:null===(r=d.choice)||void 0===r?void 0:r.option2)||"",value:"double"}]}},t3={margins:[60,30],tabletMargins:[32,15],groups:[{heights:45,marginBottom:15},{heights:60,marginBottom:32},{heights:60,marginBottom:15},{heights:75,repeat:4,gap:15},{heights:45,marginBottom:15}]},t4=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("portability","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step4.3"],event_label:"carrier information",opts:e.opts,cartProduct:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),null}),t6=n=>{let{checkoutErrors:e,isModalButtonSticky:i,portability:t,portabilityStatus:o,setSlidesGoBack:l,setPortability:r,setPortabilityStatus:d,setCurrentStepKey:a,setCheckoutStepState:u}=(0,ne.Mg)(),[s,c]=(0,g.useState)(),v=(0,y.CA)(y.Jn,eM.b.CMS_GET_GENERIC_ERROR),{title:p,description:f,items:m}=t9((0,y.CA)(y.Jn,eM.b.CMS_GET_PORTABILITY));return(0,g.useEffect)(()=>{if(null==o?void 0:o.isErrorCheck){var n;tQ.K.log("Error: portability_error"),null==e||null===(n=e.showAndTrackError)||void 0===n||n.call(e,v,()=>{d({...o,isLoadingCheck:!1,isSuccessCheck:!1,isErrorCheck:!1}),r({...t}),l(3)},(0,b.nQ)("portability",{url:"portabilityOperators",status:"500",statusText:"500"},null==o?void 0:o.errorMessage),void 0,void 0,void 0,void 0,void 0,void 0,i,!0)}},[t]),(0,g.useEffect)(()=>{a(ni.Bf.PORTABILITY_INFORMATIONS),u(ni.v9.PORTABILITY_INFORMATIONS_CARD,{}),c(void 0),d({...o,isStartPortIn:!1}),r({...t,portabilityOperators:""})},[]),{portabilityStatus:o,title:p,description:f,items:m,portability:t,selectedItem:s,setSelectedItem:c,handleSelect:e=>{r({...t,portabilityOperators:null==e?void 0:e.value}),e&&n&&n(!0)}}},t5=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C;return{title:(null==n?void 0:null===(i=n.portability)||void 0===i?void 0:null===(e=i.general)||void 0===e?void 0:e.title)||"",description:(null==n?void 0:null===(o=n.portability)||void 0===o?void 0:null===(t=o.general)||void 0===t?void 0:t.description)||"",items:[{title:(null==n?void 0:null===(a=n.portability)||void 0===a?void 0:null===(d=a.general)||void 0===d?void 0:null===(r=d.choicePortability)||void 0===r?void 0:null===(l=r.option1)||void 0===l?void 0:l.title)||"S\xec",description:(null==n?void 0:null===(v=n.portability)||void 0===v?void 0:null===(c=v.general)||void 0===c?void 0:null===(s=c.choicePortability)||void 0===s?void 0:null===(u=s.option1)||void 0===u?void 0:u.description)||"Ci occuperemo noi di disattivare la linea del tuo vecchio operatore e attivare la nuova.",value:"yes"},{title:(null==n?void 0:null===(m=n.portability)||void 0===m?void 0:null===(g=m.general)||void 0===g?void 0:null===(f=g.choicePortability)||void 0===f?void 0:null===(p=f.option2)||void 0===p?void 0:p.title)||"
1No",description:(null==n?void 0:null===(C=n.portability)||void 0===C?void 0:null===(b=C.general)||void 0===b?void 0:null===(y=b.choicePortability)||void 0===y?void 0:null===(h=y.option1)||void 0===h?void 0:h.description)||"Ricordati che dovrai provvedere tu alla disattivazione della linea del tuo vecchio operatore.",value:"no"}]}},t7=n=>{let{portability:e,product:i,setPortability:t,setCurrentStepKey:o,setCheckoutStepState:l}=(0,ne.Mg)(),r=(0,no.useQueryClient)(),d=(0,nl.De)("portability first choice","fixed",r),{title:a,description:u,items:s}=t5((0,y.CA)(y.Jn,iy.bl.CMS_GET_PORTABILITY)),[c,v]=(0,g.useState)(),{trackView:p}=(0,nB.rS)({event:["checkout_step4"],event_label:"portability first choice",opts:d.opts,cartProduct:{...d.trackingProduct,cart_total:(null==i?void 0:i.price)&&(0,iF.F)(i.price)},pageProduct:null==d?void 0:d.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(p),(0,g.useEffect)(()=>{n&&n(!!c)},[c]),(0,g.useEffect)(()=>{o(ni.Bf.PORTABILITY),(0,ib.u)(r,b.EP),l(ni.v9.PORTABILITY_CARD,{})},[]),{title:a,description:u,items:s,portability:e,selectedItem:c,setSelectedItem:v,handleSelect:n=>{let i=(null==n?void 0:n.value)==="yes";t({...e,...!i&&{portabilityMigration:{...n0.dw}},portabilityNumber:"",portabilityWant:i}),localStorage.setItem("portability",(null==n?void 0:n.value)==="yes"?"1":"0")}}};var t8=i(47103);let on=n=>{var e,i,t,o,l,r;return{title:(null==n?void 0:null===(i=n.portability)||void 0===i?void 0:null===(e=i.telephone)||void 0===e?void 0:e.title)||"",description:(null==n?void 0:null===(o=n.portability)||void 0===o?void 0:null===(t=o.telephone)||void 0===t?void 0:t.description)||"",label:(null==n?void 0:null===(r=n.portability)||void 0===r?void 0:null===(l=r.selectInput)||void 0===l?void 0:l.telephone)||""}},oe=n=>{var e,i,t,o;return{titleError:(null==n?void 0:null===(i=n.portability)||void 0===i?void 0:null===(e=i.errorModal)||void 0===e?void 0:e.title)||"",messageError:(null==n?void 0:null===(o=n.portability)||void 0===o?void 0:null===(t=o.errorMod
1al)||void 0===t?void 0:t.message)||""}},oi=(n,e)=>{var i,t,o,l;let r=new DOMParser,d=(null==n?void 0:null===(i=n.find(n=>n.id===e))||void 0===i?void 0:i.value)||"",a=r.parseFromString((null===(t=(0,A.q)([d||""]))||void 0===t?void 0:t[0])||"","text/html");return(null==a?void 0:null===(l=a.body)||void 0===l?void 0:null===(o=l.textContent)||void 0===o?void 0:o.replace("\n",""))||""},ot=n=>({requiredField:oi(n,"requiredField"),validNumber:oi(n,"validNumber")}),oo=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("portability","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step4.1"],event_label:"number portability",opts:e.opts,cartProduct:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),null});function ol(){let n=(0,N._)(["\n width: 366px;\n "]);return ol=function(){return n},n}function or(){let n=(0,N._)(["\n width: 406px;\n "]);return or=function(){return n},n}function od(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n\n ","\n\n ","\n"]);return od=function(){return n},n}function oa(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n padding: 60px 0 ",";\n "]);return oa=function(){return n},n}function ou(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return ou=function(){return n},n}function os(){let n=(0,N._)(["\n padding: 32px 0 ",";\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: 1.3;\n\n ","\n\n ","\n"]);return os=function(){return n},n}function oc(){let n=(0,N._)(["\n line-height: 1.5;\n "]);return oc=function(){return n},n}function ov(){let n=(0,N._)(["\n margin-bottom: 2.5rem;\n "]);return ov=function(){return n},n}function op(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n margin-top: ",";\n margin-bottom: ",";\n text-align: center;\n font-size: ",";\n line-height: 1.3;\n\n ","\n\n ","\n"]);return op=function(){return n},n}function of(){let n=(0,N._)(["\n gap: 1.25rem;\n "]);return of=function(){return n},n}function og(){let n=(0,N._)(["\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n input[type='number'] {\n -moz-appearance: textfield;\n }\n display: flex;\n flex-direction: column;\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n margin-bottom: 0;\n }\n\n gap: ",";\n\n ","\n"]);return og=function(){return n},n}function om(){let n=(0,N._)(["\n margin-top: 1.25rem;\n "]);return om=function(){return n},n}function oh(){let n=(0,N._)(["\n display: flex;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n font-size: ",";\n line-height: 1.3;\n margin-top: ",";\n margin-bottom: ",";\n\n ","\n"]);return oh=function(){return n},n}function oy(){let n=(0,N._)(["\n margin-top: 3.75rem;\n"]);return oy=function(){return n},n}function ob(){let n=(0,N._)(["\n font-size: ",";\n line-height: 0.9;\n margin: "," 0;\n "]);return ob=function(){return n},n}function oC(){let n=(0,N._)(["\n margin: "," 0;\n "]);return oC=function(){return n},n}function oE(){let n=(0,N._)(["\n text-align: left;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: 1.286;\n margin: "," 0;\n\n ","\n\n ","\n\n b {\n font-family: ",";\n font-weight: ",";\n }\n\n img {\n cursor: text;\n vertical-align: baseline;\n }\n\n a {\n color: ",";\n font-weight: ",";\n\n &:hover {\n color: ",";\n }\n }\n"]);return oE=function(){return n},n}let oS=L.Z.div(od(),O.B.tablet(ol()),O.B.desktop(or())),ox=L.Z.div(os(),O.r.spacing.md,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.display5,O.B.tablet(oa(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1,O.r.spacing.md),O.B.desktop(ou(),O.r.typography.fontSize.h2)),oI=L.Z.div(op(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.spacing.md,O.r.spacing["3xl"],O.r.typography.fontSize.h6,O.B.tablet(oc()),O.B.desktop(ov())),oA=L.Z.div(og(),O.r.spacing.md,O.B.tablet(of()));L.Z.div(oh(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.spacing.md,O.r.spacing["3xl"],O.B.tablet(om()));let o_=L.Z.div(oy()),oT=L.Z.div(oE(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.spacing.xl,O.B.tablet(ob(),O.r.typography.fontSize.h6,O.r.spacing.xl),O.B.desktop(oC(),O.r.spacing.xl),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.colors.text.primary,O.r.typography.fontWeight.bold,O.r.colors.text.error),oN=n=>_.object({phoneNumber:_.string().required((null==n?void 0:n.requiredField)||"Campo obbligatorio").matches(/^0[1-9]([0-9]{5,8}$)/,(null==n?void 0:n.validNumber)||"Inserire un numero valido")});var oL=n=>{var e;
1let{title:i,description:t,label:o,value:l,onChangeData:r,onValidChange:d,isLoading:a,schema:u,disabled:s,disclaimer:c,editorialConfigs:v}=n,{register:p,setValue:f,getValues:h,formState:{isValid:y,errors:b}}=(0,C.cI)({resolver:(0,x.X)(oN(ot(v))||u),mode:"all"});return(0,g.useEffect)(()=>{l&&f("phoneNumber",l,{shouldValidate:!!l})},[]),(0,g.useEffect)(()=>{null==d||d(y)},[y]),(0,m.jsx)(oS,{children:a?(0,m.jsx)(o_,{children:(0,m.jsx)(eg.Z,{heights:70,quantity:3})}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ox,{children:i}),(0,m.jsx)(oI,{children:t}),(0,m.jsx)(oA,{children:(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{"data-cs-mask":"",label:o,type:"number",placeholder:" ",autoComplete:"off",disabled:s||!1,error:null===(e=b.phoneNumber)||void 0===e?void 0:e.message,...p("phoneNumber",{onChange:()=>{let n=h().phoneNumber;r&&r(n)},setValueAs:n=>n.trim()})})})}),c&&(0,m.jsx)(oT,{dangerouslySetInnerHTML:{__html:(0,A.q)([c||""])[0]||""}})]})})},oO=n=>{var e,i;let{handleOnChangeEnableGoNext:t,handleGoPrevSlide:o}=n,{currentStepKey:l,checkoutErrors:r,portability:d,isModalButtonSticky:a,product:u,setPortability:s,setCurrentStepKey:c,setCheckoutStepState:v}=(0,ne.Mg)(),p=(0,no.useQueryClient)(),f=(0,id.YZ)(),{buttonGenericError:h,urlGenericErrorCallMeNow:C}=(0,b.S6)(f),E=(0,y.CA)(y.Jn,t8.bl.CMS_GET_PORTABILITY),S=(0,y.CA)(y.Jn,t8.bl.CMS_GET_GENERIC_ERROR),{isLoading:x,isError:I,error:A}=t0(null==E?void 0:null===(e=E.portability)||void 0===e?void 0:e.operatorList),{title:_,description:T,label:N}=on(E),{titleError:L,messageError:O}=oe(E),R=()=>{if(null==d?void 0:d.portabilityNumber){let n=d.portabilityNumber.match(t8.Sz.fixedNumber);null==t||t(!!n)}else null==t||t(!1)};return(0,g.useEffect)(()=>{R()},[d]),(0,g.useEffect)(()=>{c(ni.Bf.PORTABILITY_NUMBER),v(ni.v9.PORTABILITY_NUMBER_CARD,{})},[]),(0,g.useEffect)(()=>{if(I){var n;let e=()=>{o&&o()};null==r||null===(n=r.showAndTrackError)||void 0===n||n.call(r,S,()=>e(),void 0,L,O,()=>()=>(0,t8.xb)(p,C,u,e,l,(0,b.nQ)("multiplayOfferingConfiguration",A)),h,void 0,void 0,a)}},[I]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(oo,{}),(0,m.jsx)(oL,{title:_,description:T,label:N,value:d.portabilityNumber,onChangeData:n=>
1{s({...d,portabilityNumber:n||"",portabilityInfo:""})},isLoading:x,editorialConfigs:null==E?void 0:null===(i=E.editorialconfigs)||void 0===i?void 0:i.elements})]})},oR=i(56908),oD=i(23072),oM=i(36787),oP=i(74191),ow=i(4233),ok=i(26533);function oj(){let n=(0,N._)(["\n padding: 60px 40px 32px;\n "]);return oj=function(){return n},n}function oB(){let n=(0,N._)(["\n padding: 60px 55px 64px;\n "]);return oB=function(){return n},n}function oF(){let n=(0,N._)(["\n padding: "," "," ",";\n\n ","\n\n ","\n"]);return oF=function(){return n},n}function oz(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n"]);return oz=function(){return n},n}function oZ(){let n=(0,N._)(["\n margin: 0;\n font-weight: 400;\n color: ",";\n"]);return oZ=function(){return n},n}function oH(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return oH=function(){return n},n}function oV(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return oV=function(){return n},n}function oU(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return oU=function(){return n},n}function oQ(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n\n max-width: 366px;\n "]);return oQ=function(){return n},n}function oG(){let n=(0,N._)(["\n max-width: 406px;\n "]);return oG=function(){return n},n}function oY(){let n=(0,N._)(["\n margin: "," auto 0;\n text-align: center;\n max-width: 287px;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return oY=function(){return n},n}function oW(){let n=(0,N._)(["\n margin-top: ",";\n margin-bottom: ",";\n font-size: ",";\n line-height: ",";\n "]);return oW=function(){return n},n}function oJ(){let n=(0,N._)(["\n margin-top: ",";\n "]);return oJ=function(){return n},n}function oX(){let n=(0,N._)(["\n margin-top: ",";\n margin-bottom: ",";\n text-align: start;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return oX=function(){return n},n}function oq(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return oq=function(){return n},n}function oK(){let n=(0,N._)(["\n margin-top: ",";\n "]);return oK=function(){return n},n}function o$(){let n=(0,N._)(["\n .username {\n text-transform: capitalize;\n }\n\n p {\n margin: 0;\n color: ",";\n text-align: start;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n }\n\n p:nth-child(2) {\n font-weight: ",";\n color: #00697c; //",";\n }\n\n p:nth-child(5) {\n margin-top: ",";\n\n ","\n }\n"]);return o$=function(){return n},n}function o0(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n "]);return o0=function(){return n},n}function o1(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return o1=function(){return n},n}function o2(){let n=(0,N._)(["\n display: flex;\n background-color: transparent;\n padding: 0;\n margin: 0;\n border: none;\n border-bottom: 1px solid ",";\n margin-top: ",";\n color: ",";\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n\n &:hover {\n cursor: pointer;\n color: ",";\n border-bottom: 1px solid ",";\n }\n"]);return o2=function(){return n},n}function o9(){let n=(0,N._)(["\n margin-top: ",";\n border-bottom: 1px solid ",";\n"]);return o9=function(){return n},n}function o3(){let n=(0,N._)(["\n max-width: 366px;\n margin-top: ",";\n "]);return o3=function(){return n},n}function o4(){let n=(0,N._)(["\n max-width: 406px;\n margin-top: ",";\n "]);return o4=function(){return n},n}function o6(){let n=(0,N._)(["\n max-width: 287px;\n margin-top: ",";\n margin-bottom: ",";\n color: ",";\n ","\n\n ","\n"]);return o6=function(){return n},n}function o5(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return o5=function(){return n},n}function o7(){let n=(0,N._)(["\n color: ",";\n text-align: start;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n ","\n"]);return o7=function(){return n},n}function o8(){let n=(0,N._)(["\n margin-top: ",";\n"]);return o8=function(){return n},n}function ln(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return ln=function(){return n},n}function le(){let n=(0,N._)(["\n width: inherit;\n background:\n linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(",", ","),\n linear-gradient(",", ",");\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: ",";\n margin-bottom: ",";\n height: ",";\n }\n\n height: 150px;\n margin-top: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position:\n 315px 0,\n 0 0,\n 0 190px,\n 50px 195px;\n }\n }\n"]);return le=function(){return n},n}function li(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return li=function(){return n},n}function lt(){let n=(0,N._)(["\n height: ",";\n margin-top: ",";\n\n ","\n"]);return lt=function(){return n},n}let lo=L.Z.div(oF(),O.r.spacing.xl,O.r.spacing.md,O.r.spacing["3xl"],O.B.tablet(oj()),O.B.desktop(o
1B())),ll=L.Z.div(oz()),lr=L.Z.p(oZ(),O.r.colors.text.primary),ld=(0,L.Z)(lr)(oU(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h4,O.r.typography.lineHeight.h4,O.B.tablet(oH(),O.r.typography.fontSize.display4,O.r.typography.lineHeight.display5),O.B.desktop(oV(),O.r.typography.fontSize.display4,O.r.typography.lineHeight.display5)),la=(0,L.Z)(lr)(oY(),O.r.spacing.md,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6,O.B.tablet(oQ(),O.r.typography.fontSize.h6,O.r.typography.lineHeight.body3),O.B.desktop(oG())),lu=(0,L.Z)(lr)(oX(),O.r.spacing.xl,O.r.spacing.sm,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6,O.B.tablet(oW(),O.r.spacing.xl,O.r.spacing.md,O.r.typography.fontSize.h5,O.r.typography.lineHeight.display5),O.B.desktop(oJ(),O.r.spacing.xl)),ls=L.Z.div(o$(),O.r.colors.text.primary,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1,O.B.tablet(oq(),O.r.typography.fontSize.h6,O.r.typography.lineHeight.caption),O.r.typography.fontWeight.bold,O.r.colors.text.link,O.r.spacing.sm,O.B.tablet(oK(),O.r.spacing.md)),lc=L.Z.button(o2(),O.r.colors.text.primary,O.r.spacing.sm,O.r.colors.text.primary,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.bold,O.r.typography.fontSize.body2,O.r.typography.lineHeight.body2,O.B.tablet(o0(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1,O.r.spacing.md),O.B.desktop(o1(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1),O.r.colors.brand.primary,O.r.colors.brand.primary),lv=L.Z.div(o9(),O.r.spacing.lg,O.r.colors.border.default),lp=(0,L.Z)(lu)(o6(),O.r.spacing.lg,O.r.spacing.md,O.r.colors.text.primary,O.B.tablet(o3(),O.r.spacing.md),O.B.desktop(o4(),O.r.spacing.lg)),lf=(0,L.Z)(lr)(o7(),O.r.colors.text.primary,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.bold,O.r.typography.fontSize.body2,O.r.typography.lineHeight.body2,O.B.tablet(o5(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1)),lg=(0,L.Z)(lc)(o8(),O.r.spacing.sm);function lm(){let n=(0,N._)(["\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n background-color: ",";\n"]);return lm=function(){return n},n}function lh(){let n=(0,N._)(["\n margin: 0;\n font-weight: ",";\n color: ",";\n"]);return lh=function(){return n},n}function ly(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return ly=function(){return n},n}function lb(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return lb=function(){return n},n}function lC(){let n=(0,N._)(["\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return lC=function(){return n},n}function lE(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n margin-bottom: ",";\n"]);return lE=function(){return n},n}function lS(){let n=(0,N._)(["\n width: 258px;\n margin: 0 auto;\n "]);return lS=function(){return n},n}function lx(){let n=(0,N._)(["\n width: 296px;\n margin: 0 auto;\n "]);return lx=function(){return n},n}function lI(){let n=(0,N._)(["\n width: 100%;\n height: 45px;\n\n ","\n\n ","\n"]);return lI=function(){return n},n}function lA(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return lA=function(){return n},n}function l_(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return l_=function(){return n},n}function lT(){let n=(0,N._)(["\n height: 120px;\n "]);return lT=function(){return n},n}function lN(){let n=(0,N._)(["\n margin-bottom: ",";\n\n ","\n\n ","\n\n div {\n .textAreaInputFieldset {\n height: 100px;\n\n ","\n }\n }\n"]);return lN=function(){return n},n}L.Z.div(le(),O.r.colors.bg.primary,O.r.colors.bg.disabled,O.r.colors.bg.disabled,O.r.colors.bg.disabled,O.r.colors.bg.disabled,O.r.spacing["3xl"],O.r.spacing.md,O.r.spacing.xl,O.r.spacing.xl,O.B.tablet(ln())),L.Z.div(lt(),O.r.spacing.xl,O.r.spacing.xl,O.B.tablet(li()));let lL=L.Z.div(lm(),O.r.colors.bg.primary),lO=L.Z.p(lh(),O.r.typography.fontWeight.regular,O.r.colors.text.primary),lR=(0,L.Z)(lO)(lC(),O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1,O.B.tablet(ly(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1),O.B.desktop(lb(),O.r.typography.fontSize.display5,O.r.typography.lineHeight.caption)),lD=(0,L.Z)(lO)(lE(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.h4,O.r.typography.lineHeight.h3,O.r.spacing.lg,O.r.spacing.xl),lM=L.Z.div(lI(),O.B.tablet(lS()),O.B.desktop(lx())),lP=L.Z.div(lN(),O.r.spacing.lg,O.B.desktop(lA(),O.r.spacing.xl),O.B.desktop(l_(),O.r.spacing["2xl"]),O.B.desktop(lT()));var lw=n=>{let{handleClose:e,shippingAddress:i,setShippingAddress:t,noteModalConfig:o}=n,[l,r]=(0,g.useState)(i.note||""),[d,a]=(0,g.useState)(!1),u=()=>{t({...i,note:l}),e()};return(0,g.useEffect)(()=>{(void 0===i.note||""===i.note)&&a(!0)},[i.note]),(0,m.jsxs)(lL,{children:[(0,m.jsxs)(lP,{children:[(0,m.jsx)(lR,{children:d?null==o?void 0:o.title:null==o?void 0:o.titleMod}),(0,m.jsx)(lD,{children:d?null==o?void 0:o.description:null==o?void 0:o.descriptionMod}
1),(0,m.jsx)(S.Z.TextAreaInput,{id:"noteValue",maxLength:255,placeholder:" ",label:null==o?void 0:o.textLabel,style:{height:"auto",zIndex:1},value:l,onChange:n=>r(n.target.value)})]}),(0,m.jsx)(lM,{children:(0,m.jsx)(nu.Z,{disabled:0===l.trim().length&&d,borderColor:"#0d0d0d",isApp:(0,ee.k)(),hoverColor:"#262626",hoverTextColor:"#fff",clickColor:"#7e7e7e",clickTextColor:"#fff",label:null==o?void 0:o.ctaLabel,onClick:()=>{u(),(0,nN.dw)(null==o?void 0:o.ctaLabel)},name:"action_note"})})]})};let lk=(n,e,i)=>{var t,o,l,r,d;let{typePickupPoint:a}=n||{};return a&&(null==e?void 0:null===(t=e.addressData)||void 0===t?void 0:t.postalOfficeDescription)?a===ow.G.PO&&(null==e?void 0:null===(o=e.addressData)||void 0===o?void 0:o.postalOfficeDescription)?"".concat("Filiale"," ").concat(null==e?void 0:null===(l=e.addressData)||void 0===l?void 0:l.postalOfficeDescription.toLowerCase()):(null==e?void 0:null===(r=e.addressData)||void 0===r?void 0:r.postalOfficeDescription)?"".concat(null==e?void 0:null===(d=e.addressData)||void 0===d?void 0:d.postalOfficeDescription.toLowerCase()):"".concat((null==i?void 0:i.firstName)||""," ").concat((null==i?void 0:i.lastName)||""):"".concat((null==i?void 0:i.firstName)||""," ").concat((null==i?void 0:i.lastName)||"")},lj=n=>{let{getData:e}=n,[i,t]=(0,g.useState)([]),[o,l]=(0,g.useState)([]),[r,d]=(0,g.useState)([]),a=()=>{let n=(0,nj.f)("searchPickUpLocations"),e=(0,nj.f)("searchPickUpStoreLocations"),i=(0,nj.f)("locateStores");t(n),l(e),d(i)};return(0,g.useEffect)(()=>{e&&a()},[e]),{postalOffices:i,pickupPoints:o,vodafoneStores:r}};var lB=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,h,C,E;let{userInfoTitle:S,billingData:x,shippingData:I,installationData:A,editAddressConfig:_,noteModalConfig:T,noteLabels:N,description:L,topTitle:O,disableAddNotes:R,showTechAddress:D,isDeliveredByFW:M}=n,{installationAddress:P,shippingAddress:w,billingAddress:k,owningData:j,deliveryAdvance:B,pickupLocationStore:F,setShippingAddress:z,setBillingAddress:Z,setInvoice:H,setPickupPoint:V,setEnablerChangeBilling:U}=(0,ne.Mg)(),{isTablet:Q,isDesktop:G}=(0,oD.h)(),[Y,W]=(0,g.useState)(!1),{setStartingSearchAddress:J}=(0,ok.g)(),[X,q]=(0,g.useState)(!1),[K,$]=(0,g.useState)(!1),{postalOffices:nn,vodafoneStores:ni,pickupPoints:nt}=lj({getData:F.global.isSuccess}),no=()=>Q&&647||G&&676||1200,{firstName:nr,lastName:nd}=(null==j?void 0:j.owningIndividual)||{},na=Array.isArray(null==B?void 0:B.deliveryOptions)?(null==B?void 0:null===(i=B.deliveryOptions)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.details)||[]:null==B?void 0:null===(t=B.deliveryOptions)||void 0===t?void 0:t.details,nu=!!(null==w?void 0:w.postalCode),ns=!!(null==k?void 0:k.postalCode),nc=(0,b.cG)(w,k),nv=(0,b.cG)(w,P),np=(0,b.cG)(k,P),nf=(0,y.CA)(y.Jn,oP.b.CMS_GET_MAP),ng=(0,y.CA)(y.Jn,oP.b.CMS_GET_DELIVERY_INFORMATION),nm=(0,y.CA)(y.Jn,oP.b.CMS_GET_EDIT_ADDRESS),nh=(0,y.CA)(y.Jn,oP.b.CMS_GET_EDIT_ADDRESS_STEPPER),ny=null==ng?void 0:null===(l=ng.deliveryinformation)||void 0===l?void 0:null===(o=l.addressChange)||void 0===o?void 0:o.options,nb=(0,oM.kk)(null==nh?void 0:nh.editaddressconfig),{mapConfig:nC,mapEditConfig:nE}=(0,oM.$Y)(nf),nS=(0,oM.t3)(ng,(0,nl.jZ)()),nx=(0,oM.lf)(nm),nI=n=>{n&&(0,oP.d)(n),W(n=>!n)},nA=n=>{V(n)},n_=()=>{(0,oP.d)(ns?null==x?void 0:x.labelEdit:null==x?void 0:x.changeAddress),U(!0),$(!0)};(0,g.useEffect)(()=>{if(na&&na.length>0){var n;null==F||null===(n=F.startDeliveryLocateAndPickupPoint)||void 0===n||n.call(F),J(w)}},[B]);let nT=()=>(0,m.jsx)(oR.Q,{address:w,shippingAddress:w,setShippingAddress:z,postalOffices:nn||[],pickupPoints:nt||[],vodafoneStores:ni||[],onChangePickupPoint:nA,isOpen:X,handleClose:()=>q(!1),deliveryOptions:na&&(null==na?void 0:na.length)>0?na:[{code:ow.G.S,description:"CASA",isSelected:!1}],userData:{lastName:nd,firstName:nr},setPickupPoint:V,billingAddress:k,setBillingAddress:Z,setInvoice:H,multipleOptions:ny||[],editAddressStepperModalConfig:nb,mapConfig:nC,mapConfigEdit:nE,editAddressOptionsConfig:nS,manualAddressConfig:nx,isLoading:F.global.isLoading||(null==F?void 0:F.searchLocateStore.isLoading)||(null==F?void 0:F.searchPickupLocations.isLoading)||(null==F?void 0:F.searchPostalOffice.isLoading)||(null==B?void 0:B.isLoading)}),nN=()=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ic.Z,{height:no(),isOpen:Y,handleClose:nI,children:(0,m.jsx)(lw,{handleClose:nI,shippingAddress:w,setShippingAddress:z,noteModalConfig:T})}),(0,m.jsx)(ic.Z,{height:no(),isOpen:K,handleClose:()=>$(!1),children:(0,m.jsx)(oR.I,{firstName:nr,lastName:nd,handleClose:()=>$(!1),origin:!1,billingAddress:k,setBillingAddress:Z,setShippingAddress:z,setInvoice:H,setPickupPoint:V,shippingAddress:w,cmsConfig:_,manualAddressConfig:nx})})]}),nL=()=>{var n,e,i,t;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lp,{children:ns?null==x?void 0:x.title:null==x?void 0:x.matchAddress}),!ns&&(0,m.jsx)(lf,{children:null==x?void 0:x.noMatch}),ns&&!!k&&(0,m.jsxs)(ls,{children:[(0,m.jsx)("p",{"data-cs-mask":"",className:"username",children:"".concat(nr," ").concat(nd)}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==x?void 0:null===(n=x.addressData)||void 0===n?void 0:n.address}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==x?void 0:null===(e=x.addressData)||void 0===e?void 0:e.city}),(0,m.jsx)("p",{"data-cs-mask":"",children:"".concat(null==x?void 0:null===(i=x.addressData)||void 0===i?void 0:i.zipCode,"-").concat(null==x?void 0:null===(t=x.addressData)||void 0===t?void 0:t.province)})]}),(0,m.jsx)(lg,{onClick:n_,children:ns?null==x?void 0:x.labelEdit:null==x?void 0:x.changeAddress})]})},nO=(n,e)=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lp,{children:null==n?void 0:n.matchAddress}),(0,m.jsx)(lf,{children:null==n?void 0:n.noMatch}),(0,m.jsx)(lg,{onClick:()=>{(0,oP.d)("".concat(null==n?void 0:n.changeAddress)),e?$(!0):q(!0)},children:null==n?void 0:n.changeAddress})]}),nR=()=>R?null:(0,m.jsx)(lc,{onClick:()=>{null==nI||nI(w.note?null==N?void 0:N.noteTitleAfterEdit:null==N?void 0:N.noteTitle)},children:w.note?null==N?void 0:N.noteTitleAfterEdit:null==N?void 0:N.noteTitle});return(0,m.jsxs)(lo,{children:[(0,m.jsxs)(ll,{children:[(0,m.jsx)(ld,{children:O}),(0,m.jsx)(la,{children:L})]}),D||M?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lu,{children:S||""}),P&&(0,m.jsxs)(ls,{style:{textTransform:"capitalize"},children:[(0,m.jsx)("p",{"data-cs-mask":"",children:lk(P)}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==A?void 0:null===(r=A.addressData)||void 0===r?void 0:r.address}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==A?void 0:null===(d=A.addressData)||void 0===d?void 0:d.city}),(0,m.jsx)("p",{"data-cs-mask":"",children:"".concat(null==A?void 0:null===(a=A.addressData)||void 0===a?void 0:a.zipCode,"-").concat(null==A?void 0:null===(u=A.addressData)||void 0===u?void 0:u.province)}),P.note?(0,m.jsxs)("p",{"data-cs-mask":"",children:["Note: ",(0,m.jsx)("span",{className:"note",children:"".concat(P.note)})]}):""]}),nR(),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lv,{}),(0,m.jsx)(lp,{children:nv?null==I?void 0:I.title:null==I?void 0:I.matchAddress}),!nv&&(0,m.jsx)(lf,{children:null==I?void 0:I.noMatch}),nv&&!!w&&(0,m.jsxs)(ls,{style:{textTransform:"capitalize"},children:[(0,m.jsx)("p",{"data-cs-mask":"",children:lk(w,I,null==j?void 0:j.owningIndividual)}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==I?void 0:null===(s=I.addressData)||void 0===s?void 0:s.address}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==I?void 0:null===(c=I.addressData)||void 0===c?void 0:c.city}),(0,m.jsx)("p",{"data-cs-mask":"",children:"".concat(null==I?void 0:null===(v=I.addressData)||void 0===v?void 0:v.zipCode,"-").concat(null==I?void 0:null===(p=I.addressData)||void 0===p?void 0:p.province)})]}),(0,m.jsx)(lg,{onClick:()=>{var n;null==F||null===(n=F.startDeliveryLocateAndPickupPoint)||void 0===n||n.call(F),(0,oP.d)(nu?null==I?void 0:I.changeAddress:null==I?void 0:I.labelEdit),q(!0)},children:nu?null==I?void 0:I.changeAddress:null==I?void 0:I.labelEdit}),(0,m.jsx)(lv,{})]}),!np&&nO(x,!0),np&&nL(),nN(),na&&nT()]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(lu,{children:S||""}),P&&(0,m.jsxs)(ls,{style:{textTransform:"capitalize"},children:[(0,m.jsx)("p",{"data-cs-mask":"",children:lk(P)}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==A?void 0:null===(f=A.addressData)||void 0===f?void 0:f.address}),(0,m.jsx)("p",{"data-cs-mask":"",children:null==A?void 0:null===(h=A.addressData)||void 0===h?void 0:h.city}),(0,m.jsx)("p",{"data-cs-mask":"",children:"".concat(null==A?void 0:null===(C=A.addressData)||void 0===C?void 0:C.zipCode,"-").concat(null==A?void 0:null===(E=A.addressData)||void 0===E?void 0:E.province)}),P.note?(0,m.jsxs)("p",{"data-cs-mask":"",children:["Note: ",(0,m.jsx)("span",{className:"note",children:"".concat(P.note)})]}):""]}),nR(),(0,m.jsx)(lv,{}),!nc&&nO(x,!0),nc&&nL(),nN(),na&&nT()]})]})},lF=i(53467);let lz=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("address confirmation","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step5"],event_label:"address confirmation",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.kg)(i,"address confirmation"),(0,lF.qH)(i),null});var lZ=i(67656);let lH=(n,e,i,t,o,l,r,d)=>{var a,u,s,c,v,p,f,g,m,h,y,C,E,S,x,I,A,_,T,N,L,O,R,D,M,P,w,k,j,B,F,z,Z,H,V,U,Q,G,Y,W,J,X,q,K,$,nn,ne,ni,nt,no;let nr=null==n?void 0:n.deliveryinformation,nd=(0,nl.Lq)()?(null==nr?void 0:null===(a=nr.outdoor)||void 0===a?void 0:a.shippingLabel)||"":(null==nr?void 0:null===(u=nr.indoor)||void 0===u?void 0:u.shippingLabel)||"",na=(0,nl.Lq)()?(null==nr?void 0:null===(s=nr.outdoor)||void 0===s?void 0:s.shippingLabelChange)||"":(null==nr?void 0:null===(c=nr.indoor)||void 0===c?void 0:c.shippingLabelChange)||"",nu={topTitle:(null==nr?void 0:null===(v=nr.resume)||void 0===v?void 0:v.title)||"",...(r||d)&&{description:(0,nl.jZ)()?(null==nr?void 0:null===(p=nr.indoor)||void 0===p?void 0:p.description)||"":d?(null==nr?void 0:null===(f=nr.deliveredByFW)||void 0===f?void 0:f.description)||"":null==nr?void 0:null===(g=nr.resume)||void 0===g?void 0:g.description},...!r&&{description:(0,nl.jZ)()?(null==nr?void 0:null===(m=nr.outdoor)||void 0===m?void 0:m.description)||"":(null==nr?void 0:null===(h=nr.resume)||void 0===h?void 0:h.description)||""},userInfoTitle:(null==nr?void 0:null===(y=nr.commonLabel)||void 0===y?void 0:y.installationAddress)||"Indirizzo di installazione",billingData:{title:(null==nr?void 0:null===(C=nr.addressBilling)||void 0===C?void 0:C.bottomTitle)||"Indirizzo di fatturazione",matchAddress:(null==nr?void 0:null===(E=nr.addressBilling)||void 0===E?void 0:E.title)||"Lâindirizzo di fatturazione corrisponde allâindirizzo di installazione.",noMatch:(null==nr?void 0:null===(S=nr.addressBilling)||void 0===S?void 0:S.description)||"Non corrisponde?",labelEdit:(null==nr?void 0:null===(x=nr.addressBilling)||void 0===x?void 0:x.linkLabelEdit)||"Modifica Indirizzo",changeAddress:(null==nr?void 0:null===(I=nr.addressBilling)||void 0===I?void 0:I.linkLabel)||"Cambia l'indirizzo di fatturazione"},shippingData:{title:(null==nr?void 0:null===(A=nr.addressDelivery)||void 0===A?void 0:A.bottomTitle)||"Cambia l'indirizzo di spedizione",matchAddress:d?(null==nr?void 0:null===(_=nr.deliveredByFW)||void 0===_?void 0:_.description)||"L'indirizzo di spedizione corrisponde all'indirizzo di installazione.":(null==nr?void 0:null===(T=nr.addressDelivery)||void 0===T?void 0:T.title)||"L'indirizzo di spedizione corrisponde all'indirizzo di installazione.",noMatch:(null==nr?void 0:null===(N=nr.addressDelivery)||void 0===N?void 0:N.description)||"Non corrisponde?",labelEdit:(null==nr?void 0:null===(L=nr.addressDelivery)||void 0===L?void 0:L.linkLabel)||"Modifica Indirizzo",changeAddress:(null==nr?void 0:null===(O=nr.addressDelivery)||void 0===O?void 0:O.linkLabelEdit)||"Cambia l'indirizzo di spedizione"},noteLabels:{noteTitle:(null==nr?void 0:null===(R=nr.commonLabel)||void 0===R?void 0:R.descriptionNote)||"Inserisci le note per la consegna",noteTitleAfterEdit:(null==nr?void 0:null===(D=nr.commonLabel)||void 0===D?void 0:D.linkLabelEdit)||"Modifica note per la consegna"},noteModalConfig:{title:(null==nr?void 0:null===(M=nr.commonLabel)||void 0===M?void 0:M.linkLabel)||"
1Note di consegna",description:(null==nr?void 0:null===(P=nr.commonLabel)||void 0===P?void 0:P.modalTextLabel)||"Inserisci le note per la consegna",textLabel:(null==nr?void 0:null===(w=nr.commonLabel)||void 0===w?void 0:w.placeholderNotes)||"Note per la consegna",ctaLabel:(null==nr?void 0:null===(k=nr.commonLabel)||void 0===k?void 0:k.modalCtaLabel)||"Salva note",titleMod:(null==nr?void 0:null===(j=nr.commonLabel)||void 0===j?void 0:j.linkLabelEdit)||"Modifica note per la consegna",descriptionMod:(null==nr?void 0:null===(B=nr.commonLabel)||void 0===B?void 0:B.linkLabel)||"Note di consegna"},labelShippingFWA:nd||"",labelChangeAddressFWA:na||"",afterShippingEdit:(0,nl.jZ)()?na||"":(null==nr?void 0:null===(F=nr.addressChange)||void 0===F?void 0:F.subtitle)||""},ns=null!==(no=null==l?void 0:l.editaddressconfig)&&void 0!==no?no:{};return{topTitle:(null==nu?void 0:nu.topTitle)||"",description:(null==nu?void 0:nu.description)||"",userInfoTitle:null==nu?void 0:nu.userInfoTitle,userData:{lastName:null==e?void 0:e.lastName,firstName:null==e?void 0:e.firstName,address:(0,b.kg)((null==t?void 0:t.street)||"").concat(" ",(null==t?void 0:t.streetNumber)||""),city:(0,b.kg)((null==t?void 0:t.city)||""),zipCode:(null==t?void 0:t.postalCode)||"",province:(null==t?void 0:t.stateOrProvince)||""},billingData:{matchAddress:(null==nu?void 0:null===(z=nu.billingData)||void 0===z?void 0:z.matchAddress)||"",noMatch:(null==nu?void 0:null===(Z=nu.billingData)||void 0===Z?void 0:Z.noMatch)||"",title:(null==nu?void 0:null===(H=nu.billingData)||void 0===H?void 0:H.title)||"",labelEdit:(null==nu?void 0:null===(V=nu.billingData)||void 0===V?void 0:V.labelEdit)||"",changeAddress:(null==nu?void 0:null===(U=nu.billingData)||void 0===U?void 0:U.changeAddress)||"",ctaAction:()=>tQ.K.debug("billing"),addressData:{lastName:(null==e?void 0:e.lastName)||"",firstName:(null==e?void 0:e.firstName)||"",address:null===(G=(0,b.kg)(null==o?void 0:o.street))||void 0===G?void 0:null===(Q=G.concat)||void 0===Q?void 0:Q.call(G," ",(null==o?void 0:o.streetNumber)||""),city:(0,b.kg)(null==o?void 0:o.city),zipCode:(null==o?void 0:o.postalCode)||"",province:(null==o?void 0:o.stateOrProvince)||""}},shippingData:{matchAddress:(0,nl.jZ)()?null==nu?void 0:nu.labelShippingFWA:null==nu?void 0:null===(Y=nu.shippingData)||void 0===Y?void 0:Y.matchAddress,noMatch:(null==nu?void 0:null===(W=nu.shippingData)||void 0===W?void 0:W.noMatch)||"",title:(null==nu?void 0:null===(J=nu.shippingData)||void 0===J?void 0:J.title)||"",labelEdit:(null==nu?void 0:null===(X=nu.shippingData)||void 0===X?void 0:X.labelEdit)||"",changeAddress:(null==nu?void 0:null===(q=nu.shippingData)||void 0===q?void 0:q.changeAddress)||"",ctaAction:()=>tQ.K.debug("shipping"),addressData:{lastName:(null==e?void 0:e.lastName)||"",firstName:(null==e?void 0:e.firstName)||"",address:(0,b.kg)((null==t?void 0:t.street)||"").concat(" ",(null==t?void 0:t.streetNumber)||""),city:(0,b.kg)(null==t?void 0:t.city),zipCode:(null==t?void 0:t.postalCode)||"",province:(null==t?void 0:t.stateOrProvince)||"",note:(null==t?void 0:t.note)||"",postalOfficeDescription:(null==t?void 0:t.postalOfficeDescription)||""}},installationData:{matchAddress:(0,nl.jZ)()?null==nu?void 0:nu.labelShippingFWA:null==nu?void 0:null===(K=nu.shippingData)||void 0===K?void 0:K.matchAddress,noMatch:(null==nu?void 0:null===($=nu.shippingData)||void 0===$?void 0:$.noMatch)||"",title:(null==nu?void 0:null===(nn=nu.shippingData)||void 0===nn?void 0:nn.title)||"",labelEdit:(null==nu?void 0:null===(ne=nu.shippingData)||void 0===ne?void 0:ne.labelEdit)||"",changeAddress:(null==nu?void 0:null===(ni=nu.shippingData)||void 0===ni?void 0:ni.changeAddress)||"",addressData:{lastName:(null==e?void 0:e.lastName)||"",firstName:(null==e?void 0:e.firstName)||"",address:(0,b.kg)((null==i?void 0:i.street)||"").concat(" ",(null==i?void 0:i.streetNumber)||""),city:(0,b.kg)(null==i?void 0:i.city),zipCode:(null==i?void 0:i.postalCode)||"",province:(null==i?void 0:i.stateOrProvince)||"",note:(null==i?void 0:i.note)||"",postalOfficeDescription:(null==i?void 0:i.postalOfficeDescription)||""}},changeAddressFwa:(null==nu?void 0:nu.labelChangeAddressFWA)||"",afterEditAddress:(null==nu?void 0:nu.afterShippingEdit)||"",noteModalConfig:null==nu?void 0:nu.noteModalConfig,noteLabels:null==nu?void 0:nu.noteLabels,editAddressConfig:(0,oM.kk)(ns),disableAddNotes:(null==n?void 0:null===(nt=n.deliveryinformation)||void 0===nt?void 0:nt.disableAddNotes)==="true"}};var lV=i(26099),lU=i(52258);let lQ=n=>{var e,i,t,o,l,r,d;return{title:(null==n?void 0:null===(i=n.termsandconditions)||void 0===i?void 0:null===(e=i.activationDetail)||void 0===e?void 0:e.title)||"",itemList:null==n?void 0:null===(l=n.termsandconditions)||void 0===l?void 0:null===(o=l.activationDetail)||void 0===o?void 0:null===(t=o.descriptions)||void 0===t?void 0:t.map(n=>({subtitle:(null==n?void 0:n.title)||"",paragraph:(null==n?void 0:n.text)||""})),accordions:(null==n?void 0:null===(d=n.termsandconditions)||void 0===d?void 0:null===(r=d.activationDetail)||void 0===r?void 0:r.accordion)||[]}},lG=n=>{var e,i,t,o,l,r,d,a,u,s,c;let v=null==n?void 0:null===(e=n.termsandconditions)||void 0===e?void 0:e.card;return{title:(null==v?void 0:v.title)||"",description:(null==v?void 0:v.description)||"",documents:null==n?void 0:null===(t=n.termsandconditions)||void 0===t?void 0:null===(i=t.modals)||void 0===i?void 0:i.map(n=>({text:(null==n?void 0:n.title)||"",content:(null==n?void 0:n.description)||"",pdfUrl:(null==n?void 0:n.url)||"",isSummary:(null==n?void 0:n.isSummary)==="true"?"true":"",pdfLabel:(null==n?void 0:n.buttonLabel)||""})),documentsCheck:(null==v?void 0:v.conditions)||"",subtitle:(null==v?void 0:null===(o=v.activation)||void 0===o?void 0:o.title)||"",details:{text:(null==v?void 0:null===(l=v.activation)||void 0===l?void 0:l.detailLinkLabel)||"",content:(null==v?void 0:null===(r=v.activation)||void 0===r?void 0:r.description)||""},subDescription:(null==v?void 0:null===(d=v.activation)||void 0===d?void 0:d.description)||"",checklist:[{title:(null==v?void 0:null===(u=v.activation)||void 0===u?void 0:null===(a=u.choice)||void 0===a?void 0:a.option1)||"",value:"yes"},{title:(null==v?void 0:null===(c=v.activation)||void 0===c?void 0:null===(s=c.choice)||void 0===s?void 0:s.option2)||"",value:"no"}]}},lY=n=>{var e;let i=null==n?void 0:null===(e=n.termsandconditions)||void 0===e?void 0:e.withdrawal;return{titlePopup:(null==i?void 0:i.title)||"Sei sicuro?",descriptionPopup:(null==i?void 0:i.description)||"",imagePopup:(null==i?void 0:i.imageUrl)||"",buttonWaitLabel:(null==i?void 0:i.labelButtonSubmit)||"",buttonActiveLabel:(null==i?void 0:i.labelButtonSecond)||""}},lW=n=>{var e,i,t,o,l,r,d,a,u;return{titleModal:(null==n?void 0:null===(t=n.termsandconditions)||void 0===t?void 0:null===(i=t.card)||void 0===i?void 0:null===(e=i.modalError)||void 0===e?void 0:e.title)||"",messageModal:(null==n?void 0:null===(r=n.termsandconditions)||void 0===r?void 0:null===(l=r.card)||void 0===l?void 0:null===(o=l.modalError)||void 0===o?void 0:o.message)||"",buttonLabel:(null==n?void 0:null===(u=n.termsandconditions)||void 0===u?void 0:null===(a=u.card)||void 0===a?void 0:null===(d=a.modalError)||void 0===d?void 0:d.buttonLabel)||""}};var lJ=i(76855),lX=i(65595),lq=i(21302);function lK(){let n=(0,N._)(["\n padding: 0 40px;\n height: 737px;\n "]);return lK=function(){return n},n}function l$(){let n=(0,N._)(["\n padding: 0 74px;\n "]);return l$=function(){return n},n}function l0(){let n=(0,N._)(["\n padding: 0 20px;\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 492px;\n\n ","\n\n ","\n"]);return l0=function(){return n},n}function l1(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return l1=function(){return n},n}function l2(){let n=(0,N._)(["\n height: 30px;\n\n ","\n"]);return l2=function(){return n},n}let l9=L.Z.div(l0(),lq.B.tablet(lK()),lq.B.desktop(l$())),l3=L.Z.div(l2(),lq.B.tablet(l1()));var l4=i(63459),l6=i(4880),l5=i(15277),l7=i(32218),l8=i(57714),rn=i(13630);let re={individual:{isLoading:!1,isSuccess:!1,isError:!1},linkContact:{isLoading:!1,isSuccess:!1,isError:!1},validateAddress:{isLoading:!1,isSuccess:!1,isError:!1},createAddress:{isLoading:!1,isSuccess:!1,isError:!1},deliveryEvolved:{isLoading:!1,isSuccess:!1,isError:!1},postDelivery:{isLoading:!1,isSuccess:!1,isError:!1}},ri=n=>{let{pickupPoint:e,shippingAddress:i}=n,t=(0,no.useQueryClient)(),[o,l]=(0,g.useState)(re),[r,d]=(0,g.useState)({shippingAddress:void 0,pickupPoint:void 0}),a=(0,nj.f)("deliveryDetailsIsBase"),{mutate:u,error:s,isError:c,isSuccess:v,isLoading:p}=(0,l5.PA)(),{refetch:f,error:m,isError:h,isSuccess:y,isLoading:C}=(0,l5.tg)(null==r?void 0:r.shippingAddress,null==r?void 0:r.pickupPoint,{enabled:!1,keyDependency:["deliveryDetailsIsEvolved"]}),{isSuccess:E,error:S,isError:x,isLoading:I,refetch:A}=(0,l7.U)({enabled:!1}),{mutate:_,error:T,data:N,isLoading:L,isSuccess:O,isError:R}=(0,rn.r)(),{mutate:D,error:M,isSuccess:P,isError:w,isLoading:k,data:j}=(0,l6.V)(),{mutate:B,error:F,isSuccess:z,isError:Z,isLoading:H}=(0,l8.A)(),V=()=>{B(null==j?void 0:j.id)},U=()=>!!(0,nj.f)("individual");(0,g.useEffect)(()=>{p?l(n=>({...n,postDelivery:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})):c?l(n=>({...n,postDelivery:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("postDelivery",s)}})):v&&(l(n=>({...n,postDelivery:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),(0,ib.u)(t,["deliveryDetailsIsEvolved"]))},[c,p,v]),(0,g.useEffect)(()=>{C?l(n=>({...n,deliveryEvolved:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})):h?l(n=>({...n,deliveryEvolved:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("deliveryEvolved",m)}})):y&&(l(n=>({...n,deliveryEvolved:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),u({shippingAddress:null==r?void 0:r.shippingAddress,pickupPoint:null==r?void 0:r.pickupPoint}))},[y,h,C]),(0,g.useEffect)(()=>{((null==r?void 0:r.shippingAddress)||(null==r?void 0:r.pickupPoint))&&f()},[r]),(0,g.useEffect)(()=>{H?l(n=>({...n,linkContact:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})):Z?l(n=>({...n,linkContact:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("linkContact",F)}})):z&&(l(n=>({...n,linkContact:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0},postDelivery:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})),d({shippingAddress:j,pickupPoint:e}))},[z,Z,H]),(0,g.useEffect)(()=>{I?l(n=>({...n,individual:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})):x?l(n=>({...n,individual:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("individual",S)}})):E&&P&&!v&&!p&&(l(n=>({...n,linkContact:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0},individual:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),V())},[E,x,I]),(0,g.useEffect)(()=>{k?l(n=>({...n,createAddress:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}})):w?l(n=>({...n,createAddress:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("createAddress",M)}})):P&&(U()?(l(n=>({...n,linkContact:{isLoading:!0,isError:!1,error:void 0,isSuccess:!1},individual:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0},createAddress:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),V()):(l(n=>({...n,individual:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0},createAddress:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),A()))},[P,w,k]),(0,g.useEffect)(()=>
1{if(L)l(n=>({...n,validateAddress:{isLoading:!0,isSuccess:!1,isError:!1,error:void 0}}));else if(R)l(n=>({...n,validateAddress:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("validateAddress",T)}}));else if(O){var n,e;(null==N?void 0:null===(n=N.validAddressList)||void 0===n?void 0:n[0])?(l(n=>({...n,validateAddress:{isLoading:!1,isSuccess:!0,isError:!1,error:void 0}})),D({address:null==N?void 0:null===(e=N.validAddressList)||void 0===e?void 0:e[0],isDelivery:!0})):l(n=>({...n,validateAddress:{isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("validateAddress")}}))}},[O,R,L]);let Q=()=>{let n=(0,l4.v$)(a,i);(null==e?void 0:e.storeId)||n?d({shippingAddress:n,pickupPoint:e}):_({placeObject:i,isDelivery:!0})};return(0,g.useEffect)(()=>{(0,b.Vz)()||Q()},[]),o};var rt=n=>{let{handleOnChangeEnableGoNext:e}=n,i=(0,no.useQueryClient)(),{product:t,shippingAddress:o,pickupPoint:l,checkoutErrors:r,setSlidesGoBack:d,setIsDisabledBackButton:a,setIsNewShippingAddress:u,setIsStartDeliveryBase:s}=(0,ne.Mg)(),{validateAddress:c,deliveryEvolved:v,createAddress:p,postDelivery:f,individual:h,linkContact:y}=ri({pickupPoint:l,shippingAddress:o}),b=(0,lJ.CA)(lJ.Jn,lX.b.CMS_GET_DELIVERY_INFORMATION),C=(0,lJ.CA)(lJ.Jn,lX.b.CMS_GET_GENERIC_ERROR),{buttonGenericError:E}=(0,lJ.S6)(t),S=()=>(null==c?void 0:c.isLoading)||(null==v?void 0:v.isLoading)||(null==p?void 0:p.isLoading)||f.isLoading||h.isLoading||y.isLoading,x=()=>(null==c?void 0:c.isError)||(null==v?void 0:v.isError)||(null==p?void 0:p.isError)||(null==h?void 0:h.isError)||(null==f?void 0:f.isError)||(null==y?void 0:y.isError),I=()=>(null==c?void 0:c.isError)?null==c?void 0:c.error:(null==v?void 0:v.isError)?null==v?void 0:v.error:(null==p?void 0:p.isError)?null==p?void 0:p.error:(null==h?void 0:h.isError)?null==h?void 0:h.error:(null==f?void 0:f.isError)?null==f?void 0:f.error:(null==y?void 0:y.isError)?null==y?void 0:y.error:void 0,A=()=>{if(S()&&(null==e||e(!1)),a(S()),x()){var n,i,t,o,l,u,s;let e=I();null==r||null===(s=r.showAndTrackError)||void 0===s||s.call(r,C,()=>d(2),e,(null==b?void 0:null===(t=b.deliveryinformation)||void 0===t?void 0:null===(i=t.errorCards)||void 0===i?void 0:null===(n=i.addressResponse)||void 0===n?void 0:n.title)||"Ops! Qualcosa \xe8 andato storto.",(null==b?void 0:null===(u=b.deliveryinformation)||void 0===u?void 0:null===(l=u.errorCards)||void 0===l?void 0:null===(o=l.addressResponse)||void 0===o?void 0:o.message)||"Non siamo stati in grado di recuperare i tuoi dati di spedizione e fatturazione.",()=>d(2),E)}};return(0,g.useEffect)(()=>{f.isSuccess&&(u(!1),(0,ib.u)(i,["deliveryDetailsIsBase"]),s(!0))},[f.isSuccess]),(0,g.useEffect)(()=>{A()},[v,c,p,f,h,y]),(()=>{if(S()){var n;return(null==t?void 0:null===(n=t.loaders)||void 0===n?void 0:n.yourAddressCard)?(0,m.jsxs)(l9,{children:[(0,m.jsx)(l3,{}),(0,m.jsx)(em.J5,{src:(0,lX.o)(t.loaders.yourAddressCard).src,className:"player",loop:!0,autoplay:!0})]}):(0,m.jsx)(eg.Z,{quantity:2,heights:90})}return null})()},ro=i(12206),rl=i(33669),rr=i(36786);function rd(){let n=(0,N._)(["\n .check-size {\n height: 12px;\n width: 17px;\n align-self: center;\n margin-right: 16px;\n margin-top: -7px;\n }\n\n button {\n padding: 0;\n }\n\n display: flex;\n margin-bottom: 20px;\n"]);return rd=function(){return n},n}function ra(){let n=(0,N._)(["\n margin: 57px 37px 33px;\n "]);return ra=function(){return n},n}function ru(){let n=(0,N._)(["\n margin: 60px 55px 52px;\n "]);return ru=function(){return n},n}function rs(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.4;\n "]);return rs=function(){return n},n}function rc(){let n=(0,N._)(["\n color: ",";\n font-style: normal;\n margin: 32px 20px 41px;\n\n ","\n\n ","\n\n button {\n background: transparent;\n border: none;\n text-align: start;\n font-family: ",";\n font-weight: ",";\n text-decoration: underline;\n text-underline-position: from-font;\n font-size: ",";\n line-height: 1.375;\n cursor: pointer;\n\n ","\n\n &,\n &:active,\n &:visited {\n color: ",";\n }\n\n &:hover {\n color: ",";\n }\n }\n"]);return rc=function(){return n},n}function rv(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return rv=function(){return n},n}function rp(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return rp=function(){return n},n}function rf(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n text-align: center;\n margin-top: ",";\n margin-bottom: ",";\n font-size: 1.875rem;\n line-height: 1.25;\n\n ","\n\n ","\n"]);return rf=function(){return n},n}function rg(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.5;\n margin-bottom: 1.698125rem;\n "]);return rg=function(){return n},n}function rm(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return rm=function(){return n},n}function rh(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: 1.3;\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return rh=function(){return n},n}function ry(){let n=(0,N._)(["\n display: flex;\n flex-direction: row;\n margin-left: -3px;\n"]);return ry=function(){return n},n}function rb(){let n=(0,N._)(["\n display: flex;\n width: 22px;\n margin-right: 10px;\n\n @media (min-width: ",") and (max-width: ",") {\n margin-top: 2px;\n }\n"]);return rb=function(){return n},n}function rC(){let n=(0,N._)(["\n input {\n position: absolute;\n margin: 0 auto;\n opacity: 0;\n cursor: pointer;\n height: 20px;
1\n width: 20px;\n z-index: 3;\n }\n\n .checkmark::after {\n left: 7px;\n top: 3px;\n width: 5px;\n height: 10px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n content: '';\n position: absolute;\n display: none;\n }\n\n .checkmark {\n position: absolute;\n height: 20px;\n width: 20px;\n border-radius: 3px;\n border: 1px solid ",";\n }\n\n &:hover input ~ .checkmark {\n border: 1px solid ",";\n }\n\n input:checked ~ .checkmark {\n background-color: #00697c;\n border: none;\n }\n\n input:checked ~ .checkmark::after {\n display: block;\n }\n"]);return rC=function(){return n},n}function rE(){let n=(0,N._)(["\n width: 334px;\n font-size: ",";\n line-height: 1.4;\n "]);return rE=function(){return n},n}function rS(){let n=(0,N._)(["\n width: 374px;\n "]);return rS=function(){return n},n}function rx(){let n=(0,N._)(["\n text-align: start;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: 1.375;\n width: 256px;\n\n ","\n\n ","\n"]);return rx=function(){return n},n}function rI(){let n=(0,N._)(["\n margin: 40px 0;\n "]);return rI=function(){return n},n}function rA(){let n=(0,N._)(["\n height: 1px;\n background: ",";\n margin: 32px 0;\n\n ","\n"]);return rA=function(){return n},n}function r_(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n margin-bottom: ",";\n "]);return r_=function(){return n},n}function rT(){let n=(0,N._)(["\n text-align: start;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: 1.3;\n margin-bottom: ",";\n position: relative;\n\n ","\n"]);return rT=function(){return n},n}function rN(){let n=(0,N._)(["\n position: absolute;\n right: 0;\n top: 16px;\n\n div {\n svg {\n width: 20px;\n }\n }\n"]);return rN=function(){return n},n}function rL(){let n=(0,N._)(["\n margin: "," 0;\n font-size: ",";\n line-height: 1.35;\n "]);return rL=function(){return n},n}function rO(){let n=(0,N._)(["\n text-align: start;\n font-family: ",";\n font-weight: ",";\n align-self: stretch;\n margin-top: 20px;\n margin-bottom: ",";\n font-size: ",";\n line-height: 1.375;\n\n ","\n"]);return rO=function(){return n},n}function rR(){let n=(0,N._)(["\n display: flex;\n padding: 0;\n"]);return rR=function(){return n},n}function rD(){let n=(0,N._)(["\n margin-bottom: 12px;\n "]);return rD=function(){return n},n}function rM(){let n=(0,N._)(["\n padding: 4px 0;\n font-size: ",";\n line-height: 1.5;\n "]);return rM=function(){return n},n}function rP(){let n=(0,N._)(["\n div {\n border: none;\n padding: 0;\n }\n\n .checkbox-container {\n margin-bottom: 0;\n\n & input {\n margin: 0;\n }\n\n ","\n }\n\n .title {\n padding: 10px 0;\n font-size: ",";\n line-height: 1.375;\n\n ","\n }\n"]);return rP=function(){return n},n}function rw(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return rw=function(){return n},n}function rk(){let n=(0,N._)(["\n width: inherit;\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(#eee, #eee), linear-gradient(#eee, #eee);\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: 60px;\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 58px;\n margin-bottom: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return rk=function(){return n},n}let rj=L.Z.div(rd()),rB=L.Z.div(rc(),O.r.colors.text.primary,O.B.tablet(ra()),O.B.desktop(ru()),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.bold,O.r.typography.fontSize.body2,O.B.tablet(rs(),O.r.typography.fontSize.body1),O.r.colors.text.primary,O.r.colors.text.error),rF=L.Z.div(rf(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.spacing["3xl"],O.r.spacing.md,O.B.tablet(rv(),O.r.typography.fontSize.h1),O.B.desktop(rp(),O.r.typography.fontSize.h2)),rz=L.Z.div(rh(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.h6,O.r.spacing.xl,O.B.tablet(rg(),O.r.typography.fontSize.h6),O.B.desktop(rm(),O.r.spacing.xl)),rZ=L.Z.div(ry()),rH=L.Z.div(rb(),O.r.breakpoints.tablet,O.r.breakpoints.desktop),rV=L.Z.div(rC(),O.r.colors.border.default,O.r.colors.border.default),rU=L.Z.div(rx(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.bold,O.r.typography.fontSize.body2,O.B.tablet(rE(),O.r.typography.fontSize.body1),O.B.desktop(rS())
1),rQ=L.Z.div(rA(),O.r.colors.border.default,O.B.desktop(rI())),rG=L.Z.div(rT(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h6,O.r.spacing.md,O.B.tablet(r_(),O.r.typography.fontSize.h5,O.r.spacing.lg)),rY=L.Z.div(rN()),rW=L.Z.div(rO(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.spacing.md,O.r.typography.fontSize.body2,O.B.tablet(rL(),O.r.spacing.lg,O.r.typography.fontSize.body1)),rJ=L.Z.button(rR());L.Z.div(rP(),O.B.desktop(rD()),O.r.typography.fontSize.body2,O.B.tablet(rM(),O.r.typography.fontSize.h6)),L.Z.div(rk(),O.r.colors.bg.primary,O.r.spacing.md,O.r.spacing.md,O.B.tablet(rw()));var rX=n=>{var e;let{setNextAble:i,isLoading:t,value:o,pdfContractSummary:l,onChangePopupWithdrawal:r}=n,d=(0,y.CA)(y.Jn,oP.b.CMS_GET_TERMS_AND_CONDITIONS),a=lG(d),u=lQ(d),{isDesktop:s,isTablet:c}=(0,oD.h)(),v=(null==o?void 0:o.optionToReconsider)==="no"?"yes":"no",[p,f]=(0,g.useState)(v),[h,C]=(0,g.useState)((null==o?void 0:o.consensus)||!1),[E,S]=(0,g.useState)(!1),[x,I]=(0,g.useState)({isOpen:!1,text:"",content:"",pdfUrl:"",pdfLabel:""}),A=(n,e)=>{e?(S(!0),(0,oP.d)("Immediate activation request details")):n&&((0,oP.d)((null==n?void 0:n.text)||""),I({isOpen:!0,text:n.text,content:n.content,pdfUrl:n.pdfUrl||"",pdfLabel:n.pdfLabel||""}))},_=n=>{n?S(!1):I({isOpen:!1,text:"",content:"",pdfUrl:"",pdfLabel:""})};return(0,g.useEffect)(()=>{i&&i(p,h),"no"===p&&h&&(null==r||r(!0))},[p,h]),(0,g.useEffect)(()=>{null==r||r(!1)},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(rB,{children:[(0,m.jsx)(rF,{children:a.title}),(0,m.jsx)(rz,{children:a.description}),g.Children.toArray(null===(e=a.documents)||void 0===e?void 0:e.map(n=>{var e,i;let o=n;return((null==n?void 0:n.isSummary)||(null==n?void 0:null===(i=n.text)||void 0===i?void 0:null===(e=i.trim())||void 0===e?void 0:e.toLowerCase().includes("Sintesi".trim().toLowerCase())))&&(o={...n,pdfUrl:(null==l?void 0:l.pdfUrl)||n.pdfUrl,pdfLabel:(null==l?void 0:l.pdfLabel)||n.pdfLabel||""}),(0,m.jsxs)(rj,{children:[(0,m.jsx)("div",{className:"check-size",children:(0,m.jsx)(ro.Z,{})}),(0,m.jsx)("button",{type:"button",disabled:t,onClick:()=>A(o),children:n.text})]})})),(0,m.jsxs)(rZ,{children:[(0,m.jsx)(rH,{children:(0,m.jsxs)(rV,{children:[(0,m.jsx)("input",{type:"checkbox",disabled:t,checked:h,onClick:()=>{C(!h);let n="on";h&&(n="off");let e="accepted terms checkbox ".concat(n);null===oP.d||void 0===oP.d||(0,oP.d)(e)},onChange:()=>{}}),(0,m.jsx)("span",{className:"checkmark"})]})}),(0,m.jsx)(rU,{children:a.documentsCheck})]}),(0,m.jsx)(rQ,{}),(0,m.jsxs)(rG,{children:[a.subtitle,t&&(0,m.jsx)(rY,{children:(0,m.jsx)(iv.Z,{})})]}),(0,m.jsx)(rJ,{type:"button",onClick:()=>A(void 0,!0),children:a.details.text}),(0,m.jsx)(rW,{children:a.subDescription}),(0,m.jsxs)(rZ,{children:[(0,m.jsx)(rH,{children:(0,m.jsxs)(rV,{children:[(0,m.jsx)("input",{type:"checkbox",disabled:t,checked:"yes"===p,onClick:()=>f("yes"===p?"no":"yes"),onChange:()=>{}}),(0,m.jsx)("span",{className:"checkmark"})]})}),(0,m.jsx)(rU,{children:a.checklist[0].title})]})]}),(0,m.jsx)(ic.Z,{height:c&&331||s&&370||void 0,isOpen:x.isOpen,handleClose:_,children:(0,m.jsx)(rl.Z,{title:x.text,description:x.content,secondButtonLabel:x.pdfLabel,secondButtonAction:()=>(0,b.oc)(x.pdfUrl),options:{size:18,lineHeight:24,sizeMobile:20,lineHeightMobile:26,isModal:!0,textAlign:"left"}})}),(0,m.jsx)(ic.Z,{height:c&&749||s&&684||void 0,isOpen:E,handleClose:()=>_(!0),children:(0,m.jsx)(rr.Z,{...u})})]})},rq=n=>{let{handleGoNextSlide:e,handleOnChangeEnableGoNext:i,isOpenWithdrawalPopUp:t,onChangePopupWithdrawal:o}=n,{termsAndConditions:l,setTermsAndConditions:r}=(0,ne.Mg)(),{isDesktop:d,isTablet:a}=(0,oD.h)(),{titlePopup:u,descriptionPopup:s,imagePopup:c,buttonActiveLabel:v,buttonWaitLabel:p}=lY((0,iO.C)(iO.J,oP.b.CMS_GET_TERMS_AND_CONDITIONS)),f=n=>{let e=(null==l?void 0:l.optionToReconsider)==="yes",i=document.querySelector("#sticky-offer-next");n&&e&&(null==i||i.setAttribute("data-popup","true"),null==i||i.addEventListener("click",()=>{(null==i?void 0:i.hasAttribute("data-popup"))&&(null==o||o(!0))})),e&&n||null==i||i.removeAttribute("data-popup")},h=n=>{let i=document.querySelector("#sticky-offer-next");n&&r({...l,optionToReconsider:"no"});let t="".concat(n?v:p);(0,oP.d)(t),null==o||o(!1),null==i||i.removeAttribute("data-popup"),null==e||e()};return(0,g.useEffect)(()=>{i&&l.isSuccessTermsAndConditions&&l.consensus&&f(!0)},[l]),(0,g.useEffect)(()=>{t&&(0,oP.d)("conferma 14giorni")},[t]),(0,g.useEffect)(()=>()=>{f(!1)},[]),(0,m.jsx)(ic.Z,{isOpen:t||!1,handleClose:()=>null==o?void 0:o(!1),height:a&&563||d&&563||563,children:(0,m.jsx)(rl.Z,{title:u,invertButtons:!0,titleAlwaysCenter:!0,description:s,options:{isModal:!0,textAlign:"center"},imageUrl:c,submitButtonLabel:p,submitButtonAction:()=>{h(!1)},secondButtonAction:()=>{h(!0)},secondButtonLabel:v})})};let rK=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("contract terms","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step7"],event_label:"terms and conditions",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.qH)(i),(0,lF.kg)(i,"terms and conditions"),null}),r$={margins:[60,30],tabletMargins:[32,15],groups:[{heights:45,marginBottom:15},{heights:60,marginBottom:32},{heights:60,marginBottom:15},{heights:75,repeat:4,gap:15},{heights:45,marginBottom:15}]};var r0=i(74651);let r1=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I;return{title:(null==n?void 0:null===(i=n.consents)||void 0===i?void 0:null===(e=i.card)||void 0===e?void 0:e.title)||"",description:(null==n?void 0:null===(o=n.consents)||void 0===o?void 0:null===(t=o.card)||void 0===t?void 0:t.description)||"",terms:{title:(null==n?void 0:null===(d=n.consents)||void 0===d?void 0:null===(r=d.card)||void 0===r?void 0:null===(l=r.terms)||void 0===l?void 0:l.title)||"",customLinkLabel:(null==n?void 0:null===(s=n.consents)||void 0===s?void 0:null===(u=s.card)||void 0===u?void 0:null===(a=u.terms)||void 0===a?void 0:a.customLinkLabel)||"",acceptAll:(null==n?void 0:null===(p=n.consents)||void 0===p?void 0:null===(v=p.card)||void 0===v?void 0:null===(c=v.terms)||void 0===c?void 0:c.acceptAll)||""},actionText:(null==n?void 0:null===(m=n.consents)||void 0===m?void 0:null===(g=m.card)||void 0===g?void 0:null===(f=g.terms)||void 0===f?void 0:f.customLinkLabel)||"",modal:{title:(null==n?void 0:null===(y=n.consents)||void 0===y?void 0:null===(h=y.modal)||void 0===h?void 0:h.title)||"",description:(null==n?void 0:null===(C=n.consents)||void 0===C?void 0:null===(b=C.modal)||void 0===b?void 0:b.description)||"",buttonLabel:(null==n?void 0:null===(S=n.consents)||void 0===S?void 0:null===(E=S.modal)||void 0===E?void 0:E.buttonLabel)||"",list:(null==n?void 0:null===(I=n.consents)||void 0===I?void 0:null===(x=I.modal)||void 0===x?void 0:x.list.length)>0&&[...n.consents.modal.list]||[]}}},r2=(n,e)=>n.filter(n=>null==e?void 0:e.some(e=>e.id===n.id)).map(n=>{var i,t,o;let l=null==e?void 0:e.find(e=>n.id===e.id);return{...n,name:(null==l?void 0:l.title)||n.name,description:(null==l?void 0:l.text)||n.description,longDescription:(null==l?void 0:l.description)||n.longDescription,popupText:(null==l?void 0:l.popupText)||"",detailLinkLabel:(null==l?void 0:l.detailLinkLabel)||"",choice:{option1:(null==l?void 0:null===(i=l.choice)||void 0===i?void 0:i.option1)||"",option2:(null==l?void 0:null===(t=l.choice)||void 0===t?void 0:t.option2)||"",option3:(null==l?void 0:null===(o=l.choice)||void 0===o?void 0:o.option3)||""}}});var r9=i(52771),r3=i(21936);let r4=n=>{let{handleOnChangeEnableGoNext:e}=n,[i,t]=(0,g.useState)(!0),{consents:o,setConsents:l,setCurrentStepKey:r,setCheckoutStepState:d}=(0,ne.Mg)(),{partyPrivacyItems:a}=(0,r3.m)(),u=(0,r9.BP)(),{title:s,terms:c,description:v,actionText:p,modal:f}
1=r1((0,y.CA)(y.Jn,eM.b.CMS_GET_TERMS_AND_CONDITIONS));return(0,g.useEffect)(()=>{0===o.partyPrivacyItems.length&&l({partyPrivacyItems:a})},[o,a]),(0,g.useEffect)(()=>{r(ni.Bf.CONSENTS),d(ni.v9.CONSENT_CARD,{}),e&&e(!0)},[]),(0,g.useEffect)(()=>{a.length>0&&t(!1)},[a]),{title:s,terms:c,description:v,actionText:p,modal:f,consents:o,isLoading:i,onUpdateConsents:n=>{l({partyPrivacyItems:n}),u.mutate(n)}}};var r6=n=>{let{handleOnChangeEnableGoNext:e}=n,{title:i,terms:t,description:o,actionText:l,modal:r,consents:d,isLoading:a,onUpdateConsents:u}=r4({handleOnChangeEnableGoNext:e});return(0,m.jsxs)(m.Fragment,{children:[a&&(0,m.jsx)(E.Z,{...r$}),!a&&(0,m.jsx)(r0.Z,{title:i,description:o,terms:t,partyPrivacyItems:r2(d.partyPrivacyItems,r.list),actionText:l,onUpdateConsents:u,modal:r,trackView:nN.Fk})]})};let r5=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("consents","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step8"],event_label:"consents",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i,"consents"),(0,nt.q)(i),null});var r7=i(59391);let r8=n=>{let{handleOnClose:e}=n,[i,t]=(0,g.useState)(!0),{checkoutErrors:o,setIsDisabledBackButton:l}=(0,ne.Mg)(),r=(0,y.CA)(y.Jn,h.b.CMS_GET_GENERIC_ERROR),{error:d,isSuccess:a,isError:u,isLoading:s,mutate:c}=(0,r7.V)(),v=()=>{(0,h.f)("retrieveMultiLines")?t(!1):c()};return(0,g.useEffect)(()=>{if(u){var n;null==o||null===(n=o.showAndTrackError)||void 0===n||n.call(o,r,()=>null==e?void 0:e(),{...d,isBlocking:!0})}else a&&t(!1)},[s,u,a]),(0,g.useEffect)(()=>
1{l(i)},[i]),(0,g.useEffect)(()=>{v()},[]),{isLoading:i}};var dn=i(29927);let de=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("payment method","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step9"],event_label:"payment method",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),null});var di=i(35969),dt=i(75972),dl=i(71581);let dr=(n,e,i)=>{var t,o,l,r,d,a,u,s,c,v,p,f,g,m,h;let y=n=>"payPal"===n?n.toLowerCase():n,b=i?e:e.filter(n=>!n.toLowerCase().includes("card")),C=[];return i||C.push({title:(null==n?void 0:null===(p=n.paymentsmobile)||void 0===p?void 0:null===(v=p.choice)||void 0===v?void 0:null===(c=v.allCards)||void 0===c?void 0:c.title)||"",description:(null==n?void 0:null===(m=n.paymentsmobile)||void 0===m?void 0:null===(g=m.choice)||void 0===g?void 0:null===(f=g.allCards)||void 0===f?void 0:f.description)||"",value:dl.Q.DEBIT_CARD,extra:{text:(null==n?void 0:null===(h=n.paymentsmobile)||void 0===h?void 0:h.defaultChoice)||"",color:"#fff",extraClass:"extraClass"}}),null==b||b.forEach(e=>{var i,t,o,l,r;let d=Object.keys(null==n?void 0:null===(i=n.paymentsmobile)||void 0===i?void 0:i.choice).indexOf(y(e));C.push({title:(null===(t=Object.values(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:o.choice)[d])||void 0===t?void 0:t.title)||"",description:(null===(l=Object.values(null==n?void 0:null===(r=n.paymentsmobile)||void 0===r?void 0:r.choice)[d])||void 0===l?void 0:l.description)||"",value:y(e)})}),{title:(null==n?void 0:null===(t=n.paymentsmobile)||void 0===t?void 0:t.title)||"",description:(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:o.description)||"",items:C||[],modal:{textLink:(null==n?void 0:null===(r=n.paymentsmobile)||void 0===r?void 0:null===(l=r.modal)||void 0===l?void 0:l.linkLabel)||"",titleModal:(null==n?void 0:null===(a=n.paymentsmobile)||void 0===a?void 0:null===(d=a.modal)||void 0===d?void 0:d.title)||"",descriptionModal:(null==n?void 0:null===(s=n.paymentsmobile)||void 0===s?void 0:null===(u=s.modal)||void 0===u?void 0:u.description)||""}}},dd=n=>{var e,i,t,o,l,r,d,a,u,s;return{titlePaymentError:(null==n?void 0:null===(i=n.paymentsmobile)||void 0===i?void 0:null===(e=i.paymentSelectionError)||void 0===e?void 0:e.title)||"",messagePaymentError:(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:null===(t=o.paymentSelectionError)||void 0===t?void 0:t.description)||"",messageSelectedPaymentError:(null==n?void 0:null===(d=n.paymentsmobile)||void 0===d?void 0:null===(r=d.paymentError)||void 0===r?void 0:null===(l=r.notFound)||void 0===l?void 0:l.message)||"Siamo spiacenti ma si \xe8 verificato un errore sulla scelta del nuovo metodo di pagamento. Riprovare in seguito.",titleSelectedPaymentError:(null==n?void 0:null===(s=n.paymentsmobile)||void 0===s?void 0:null===(u=s.paymentError)||void 0===u?void 0:null===(a=u.notFound)||void 0===a?void 0:a.title)||"Ops!"}},da=n=>{var e,i,t,o,l,r,d,a;let{handleOnChangeEnableGoNext:u,handleGoPrevSlide:s}=n,{currentStepKey:c,checkoutErrors:v,product:p,isModalButtonSticky:f,authorizeFlow:m,customerFlow:h,setIsLastCard:C,setHideStickyBar:E,setIsDisabledBackButton:S,setAuthorizeFlow:x,setCurrentStepKey:I,setCheckoutStepState:A}=(0,ne.Mg)(),_=(0,no.useQueryClient)(),{authorize:T}=m,{billingAccount:N}=h,{availableNewPayMeans:L}=(null==N?void 0:N.data)||{},[O,R]=(0,g.useState)(),{buttonPaymentError:D,urlPaymentErrorCallMeNow:M}=(0,b.S6)(p),P=(0,y.CA)(y.Jn,di.bl.CMS_GET_PAYMENTS),w=(0,y.CA)(y.Jn,di.bl.CMS_GET_GENERIC_ERROR),k=(0,y.CA)(y.Jn,di.bl.CMS_GET_GLOBAL_CONFIG),j=(0,di.fF)("customerData"),B=(0,di.fF)("findCaller"),F=(null==j?void 0:null===(i=j[0])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.fiscalCode)||(null==B?void 0:null===(t=B.individualRef)||void 0===t?void 0:t.fiscalCode),z=(null==k?void 0:null===(l=k.globalconfig)||void 0===l?void 0:null===(o=l.newMop)||void 0===o?void 0:o.enableNewMopFixed)==="true",Z=null==F?void 0:F.includes("XBS"),H=(0,b.AQ)()===b.xx.NEXT_USER_ACTIVE&&(null==N?void 0:null===(r=N.data)||void 0===r?void 0:r.hasPendingDeviceWithInstallments)||!(Z||z),V={title:(null==P?void 0:null===(d=P.paymentsmobile)||void 0===d?void 0:d.title)||"Grazie!",subtitle:"Stiamo elaborando il tuo ordine",description:(null==P?void 0:null===(a=P.paymentsmobile)||void 0===a?void 0:a.description)||"Per completare l'operazione potrebbe volerci qualche istante. Per favore attendi qui, senza lasciare la pagina."},{title:U,items:Q,description:G,modal:Y}=dr(P,(null==L?void 0:L.filter(n=>"wallet"!==n))||[],H),{titlePaymentError:W,messagePaymentError:J}=dd(P),X=()=>{var n;let e=()=>{s&&s()};null==v||null===(n=v.showAndTrackError)||void 0===n||n.call(v,w,e,(null==T?void 0:T.error)||void 0,W,J,e,"Chiudi",()=>(0,di.xb)(_,M,p,e,c,null==T?void 0:T.error),D,f,!0)},q=n=>{null==n||n.stopPropagation(),(0,di.Fk)({event_name:"ui_interaction",event_label_track:(null==O?void 0:O.title)||(null==O?void 0:O.value)||"",event_category:"users",event_action:"click",tracking_type:"link"});let e=null==O?void 0:O.value;(null==O?void 0:O.value)==="paypal"&&(e=null===dt.Q||void 0===dt.Q?void 0:dt.Q.PAYPAL),x({...m,selectedMethod:e||"",siaFlowType:dt.K.RECURRENT,authorizationOperationMethod:"capture",isStartAuthorizeFlow:!0})},K=()=>{setTimeout(()=>{let n=document.getElementById("sticky-offer-next");if(null==n||n.removeEventListener("click",q),null==n?void 0:n.firstChild){var e;null==n||null===(e=n.firstChild)||void 0===e||e.click()}},800)},$=()=>{S(null==T?void 0:T.isLoading),E(null==T?void 0:T.isLoading)};return(0,g.useEffect)(()=>{O&&((null==T?void 0:T.isError)&&X(),$(),(null==T?void 0:T.isSuccess)&&K())},[T]),(0,g.useEffect)(()=>{var n;null==m||null===(n=m.resetReserveAuthorization)||void 0===n||n.call(m);let e=document.getElementById("sticky-offer-next");return null==u||u(!!(null==O?void 0:O.value)),(null==O?void 0:O.value)?localStorage.setItem(b.aY,null==O?void 0:O.value):localStorage.removeItem(b.aY),null==e||e.addEventListener("click",q),()=>{null==e||e.removeEventListener("click",q)}},[O]),(0,g.useEffect)(()=>(C(!0),I(ni.Bf.RECURRENT_PAYMENT_CARD),A(ni.v9.RECURRENT_PAYMENT_CARD,{}),()=>{C(!1)}),[]),{authorizeFlow:m,cmsWarningPayment:V,items:Q,title:U,description:G,modal:Y,onOpenModal:()=>{(0,di.Fk)({event_name:"ui_interaction",event_label_track:(null==Y?void 0:Y.titleModal)||"",event_category:"users",event_action:"click",tracking_type:"link"})},setSelectedItem:R,selectedItem:O}};var du=i(94927),ds=i(64768);let dc={displayBrand:"*********",object_type:"*****",id:"***********",type:"*****",accountNumber:"*******",brand:"********",lastFourDigits:"****",holderName:"*********",expiryMonth:"**",expiryYear:"****"},dv=n=>{var e,i,t,o,l;return{title:(null==n?void 0:null===(e=n.paymentsmobile)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(t=n.paymentsmobile)||void 0===t?void 0:null===(i=t.userRegistered)||void 0===i?void 0:i.description)||"",buttonLabel:(null==n?void 0:null===(l=n.paymentsmobile)||void 0===l?void 0:null===(o=l.userRegistered)||void 0===o?void 0:o.changeLabel)||""}},dp=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y;return{titlePaymentError:(null==n?void 0:null===(i=n.paymentsmobile)||void 0===i?void 0:null===(e=i.paymentSelectionError)||void 0===e?void 0:e.title)||"",messagePaymentError:(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:null===(t=o.paymentSelectionError)||void 0===t?void 0:t.description)||"",messageSelectedPaymentError:(null==n?void 0:null===(d=n.paymentsmobile)||void 0===d?void 0:null===(r=d.paymentError)||void 0===r?void 0:null===(l=r.notFound)||void 0===l?void 0:l.message)||"Siamo spiacenti ma si \xe8 verificato un errore sulla scelta del nuovo metodo di pagamento. Riprovare in seguito.",titleSelectedPaymentError:(null==n?void 0:null===(s=n.paymentsmobile)||void 0===s?void 0:null===(u=s.paymentError)||void 0===u?void 0:null===(a=u.notFound)||void 0===a?void 0:a.title)||"Ops!",titleErrorErrorRetriveC
1art:(null==n?void 0:null===(v=n.paymentsmobile)||void 0===v?void 0:null===(c=v.errorRetriveCart)||void 0===c?void 0:c.title)||"",messageErrorRetriveCart:(null==n?void 0:null===(f=n.paymentsmobile)||void 0===f?void 0:null===(p=f.errorRetriveCart)||void 0===p?void 0:p.description)||"",titleErrorUpdatePaymentRecharge:(null==n?void 0:null===(m=n.paymentsmobile)||void 0===m?void 0:null===(g=m.errorUpdatePaymentRecharge)||void 0===g?void 0:g.title)||"",messageErrorUpdatePaymentRecharge:(null==n?void 0:null===(y=n.paymentsmobile)||void 0===y?void 0:null===(h=y.errorUpdatePaymentRecharge)||void 0===h?void 0:h.description)||""}},df=n=>{var e,i,t,o,l;let r=(0,nj.f)("customerData"),d=(0,nj.f)("findCaller"),a=(null==r?void 0:null===(i=r[0])||void 0===i?void 0:null===(e=i.owningIndividual)||void 0===e?void 0:e.fiscalCode)||(null==d?void 0:null===(t=d.individualRef)||void 0===t?void 0:t.fiscalCode),u=(null==n?void 0:null===(l=n.globalconfig)||void 0===l?void 0:null===(o=l.newMopUpfront)||void 0===o?void 0:o.enableNewMopFixed)==="true"||"TRUE"===({NODE_ENV:"production",NEXT_PUBLIC_CONSUMER_CDA_ENABLED:"TRUE",NEXT_PUBLIC_RELATIVE:"true",NEXT_PUBLIC_YEXT_EXP_VER:"PRODUCTION",NEXT_PUBLIC_IS_NEW_AUTOMATIC_RECHARGE:"TRUE",NX_DATADOG_APPLICATION_ID:"39c07e57-2e75-429d-b3fc-a134d084afdc",NX_DATADOG_CLIENT_TOKEN_BUSINESS:"pub6894e18f793db7dba639d9b512a2f5d6",NX_DATADOG_CLIENT_TOKEN_CONSUMER:"pub30b056ef826746c997d0e49fe8a6bce3",NX_WORKSPACE_ROOT:"/home/jenkins/agent/workspace/web-sunrise-prod/web-sunrise-consumer-deploy-prod",NEXT_PUBLIC_DATADOG_SESSION_REPLAY:"0",NEXT_PUBLIC_HOSTNAME:"https://privati.vodafone.it",NEXT_PUBLIC_LOGGER_LEVEL:"ERROR",NEXT_PUBLIC_MEDIA_PATHNAME:"media",NEXT_PUBLIC_NEXT_ENVIRO:"https://az-apicweb.vodafone.it",NX_VERBOSE_LOGGING:"true",NEXT_PUBLIC_CONSUMER_TARIFFE_ESTERO_ENABLE_COUNTERS:"TRUE",NEXT_PUBLIC_ENABLE_IBUY_MOBILE_DEBUG:"FALSE",NX_DATADOG_CLIENT_TOKEN_LANDING:"pub1a1ec58a4f96601a0aa81d197002a199",NEXT_PUBLIC_FW_AMD_INTEGRATION:"TRUE",NEXT_PUBLIC_FASTWEB_POST_COVERAGE:"https://www.fastweb.it/AVT/coveragevf/",NX_S3_BUCKET_BEHIND_CDN:"s3://web-cloud-prod-vf-it",NEXT_PUBLIC_WEBAPI_SERVERLESS:"https://api.privati.vodafone.it/",NX_IGNORE_CYCLES:"true",NEXT_PUBLIC_YEXT_REDIRECT_URL:"https://search.vodafone.it",NX_PUBLIC_VMS_ENVIRO:"https://api-vms.digitalcvm.vodafone.it/",NEXT_PUBLIC_CMS:"https://a-wb.vodafone.it/webconsumer",NEXT_PUBLIC_DATADOG_SERVICE:"web-privati",NEXT_PUBLIC_ENABLE_IBUY_FIXED_DEBUG:"FALSE",NEXT_PUBLIC_FWVAPI:"aHR0cHM6Ly9mYXN0d2ViLml0L215ZmFzdHdlYg==",NEXT_PUBLIC_DATADOG_ENABLED:"true",NEXT_PUBLIC_MOCK_APP:"false",NEXT_PUBLIC_YEXT_BUSINESS_ID:"3461483",NX_DATADOG_APPLICATION_ID_BUSINESS:"b22edac9-c60e-4e56-9f0d-0afa9e3f83f3",NX_DATADOG_APPLICATION_ID_CONSUMER:"39c07e57-2e75-429d-b3fc-a134d084afdc",NEXT_PUBLIC_ONBOARDING_V2:"https://apiv2.privati.vodafone.it/",NEXT_PUBLIC_WEBAPI_CEREBRO:"https://api.privati.vodafone.it/",NX_CLOUDFRONT_ID:"E21LAVRHE5XBFN",NX_MEDIA_ROOT:"apps/consumer",NX_S3_MEDIA_BUCKET:"s3://web-cloud-prod-vf-consumer",NX_TAG_RELEASE_VERSION:"5.3.5",NEXT_PUBLIC_VR_URL:"https://attivasim.vodafone.it",NX_TASK_HASH:"15057693463557861197",NEXT_PUBLIC_DISABLE_2FA:"TRUE",NX_DATADOG_APPLICATION_ID_LANDING:"c38a0928-1c0e-4790-8f3b-baea4864198f",NEXT_PUBLIC_DATADOG_CLIENT_TOKEN:"pub30b056ef826746c997d0e49fe8a6bce3",NX_YEXT_BUSINESS_ID:"3461483",NEXT_PUBLIC_CDA_AMD_LOGIN:"https://www.vodafone.it/content/vodafone-next/it/authorize",NX_YEXT_API_KEY:"07377ddb3ff87208d4fb4d14fed7c6ff",NEXT_PUBLIC_DATADOG_LOGS_SAMPLE:"100",NEXT_PUBLIC_FW_POST_FORM:"https://www.fastweb.it/landing/fastwebenergiavf/",NEXT_PUBLIC_MOCK_WINBACK:"FALSE",NEXT_PUBLIC_UTAG_BASE_URL:"https://tags.tiqcdn.com/utag/fwvf/vf-web-consumer/prod",NEXT_PUBLIC_MOCK_CDA:"FALSE",NX_APP_DYNAMICS_API_KEY:"EC-AAB-MFM",NX_DATADOG_CLIENT_TOKEN:"pub30b056ef826746c997d0e49fe8a6bce3",NX_CLI_SET:"true",NEXT_PUBLIC_AWSAPI_CONSUMER_PREFIX:"https://consumer.api.mvacloud.vodafone.it/prod",NEXT_PUBLIC_DATADOG_ENV:"prod",NEXT_PUBLIC_ENABLE_TOGGLE_DEVTOOLS:"FALSE",NX_TASK_TARGET_TARGET:"custom-build",NEXT_PUBLIC_DATADOG_SESSION_SAMPLE:"5",NEXT_PUBLIC_ENABLE_MULTILANGUAGE:"FALSE",NEXT_PUBLIC_MEDIA_IMG_FORMAT:"webp",NX_GOOGLE_MAPS_API_KEY:"AIzaSyCGPq5-LJvN1i-5HiRAyVQyZoloVyxSsvo",NX_LOAD_DOT_ENV_FILES:"true",NEXT_PUBLIC_LANDING_CEREBRO_REPLACE_FACE_MATCH:"TRUE",NX_YEXT_API_KEY_TO_be_deleted:"07377d
1db3ff87208d4fb4d14fed7c6ff",NX_TASK_TARGET_PROJECT:"consumer",NEXT_PUBLIC_DATADOG_APPLICATION_ID:"39c07e57-2e75-429d-b3fc-a134d084afdc",NEXT_PUBLIC_DXL_CONSUMER_CLOUD:"https://public.dxlcloud.vodafone.it/prod",NEXT_PUBLIC_NEW_ABROAD:"TRUE",NX_DATADOG_SITE:"datadoghq.eu",NEXT_PUBLIC_SHOW_APPOINTMENT:"TRUE",NEXT_PUBLIC_YEXT_EXP_KEY:"vodafone-search-privati",NX_TUI:"false",NEXT_PUBLIC_WEBAPI_VODAFONE_FW:"https://apigw-pro.fastweb.it"}).NEXT_PUBLIC_NEW_MOP_ENABLED;return(null==a?void 0:a.includes("XBS"))||u},dg=(n,e)=>{var i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M,P,w;let k=df(e),j=n=>(null==n?void 0:n.toLowerCase())===dl.Q.PAYPAL.toLowerCase(),B=null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:null===(t=o.upFrontPayment)||void 0===t?void 0:null===(i=t.paymentMethod)||void 0===i?void 0:i.filter(n=>{var e,i,t;return!!k||[null===(e=dl.Q.CREDIT_CARD)||void 0===e?void 0:e.toLowerCase(),null===(i=dl.Q.PAYPAL)||void 0===i?void 0:i.toLowerCase()].includes(null==n?void 0:null===(t=n.value)||void 0===t?void 0:t.toLowerCase())}).map(n=>({title:(null==n?void 0:n.title)||"",description:(null==n?void 0:n.description)||"",value:j(null==n?void 0:n.value)?"creditCardAndPaypal":null==n?void 0:n.value}));return{titleUpFront:(null==n?void 0:null===(r=n.paymentsmobile)||void 0===r?void 0:null===(l=r.upFrontPayment)||void 0===l?void 0:l.title)||"",descriptionCC:(null==n?void 0:null===(a=n.paymentsmobile)||void 0===a?void 0:null===(d=a.upFrontPayment)||void 0===d?void 0:d.descriptionCC)||"",descriptionDC:(null==n?void 0:null===(s=n.paymentsmobile)||void 0===s?void 0:null===(u=s.upFrontPayment)||void 0===u?void 0:u.descriptionDC)||"",descriptionPrepaid:(null==n?void 0:null===(v=n.paymentsmobile)||void 0===v?void 0:null===(c=v.upFrontPayment)||void 0===c?void 0:c.descriptionPrepaid)||"",descriptionPaypal:(null==n?void 0:null===(f=n.paymentsmobile)||void 0===f?void 0:null===(p=f.upFrontPayment)||void 0===p?void 0:p.descriptionPaypal)||"",titleCC:(null==n?void 0:null===(m=n.paymentsmobile)||void 0===m?void 0:null===(g=m.upFrontPayment)||void 0===g?void 0:g.titleCC)||"",titleDC:(null==n?void 0:null===(y=n.paymentsmobile)||void 0===y?void 0:null===(h=y.upFrontPayment)||void 0===h?void 0:h.titleDC)||"",titlePrepaid:(null==n?void 0:null===(C=n.paymentsmobile)||void 0===C?void 0:null===(b=C.upFrontPayment)||void 0===b?void 0:b.titlePrepaid)||"",titlePaypal:(null==n?void 0:null===(S=n.paymentsmobile)||void 0===S?void 0:null===(E=S.upFrontPayment)||void 0===E?void 0:E.titlePaypal)||"",expirationLabelTitle:(null==n?void 0:null===(I=n.paymentsmobile)||void 0===I?void 0:null===(x=I.upFrontPayment)||void 0===x?void 0:x.expirationLabelTitle)||"",descriptionCreditRemaning:(null==n?void 0:null===(_=n.paymentsmobile)||void 0===_?void 0:null===(A=_.upFrontPayment)||void 0===A?void 0:A.descriptionCreditRemaining)||"",paymentMethod:B,bottomModalConfig:{textLink:(null==n?void 0:null===(L=n.paymentsmobile)||void 0===L?void 0:null===(N=L.upFrontPayment)||void 0===N?void 0:null===(T=N.modal)||void 0===T?void 0:T.textLink)||"",titleModal:(null==n?void 0:null===(D=n.paymentsmobile)||void 0===D?void 0:null===(R=D.upFrontPayment)||void 0===R?void 0:null===(O=R.modal)||void 0===O?void 0:O.title)||"",descriptionModal:(null==n?void 0:null===(w=n.paymentsmobile)||void 0===w?void 0:null===(P=w.upFrontPayment)||void 0===P?void 0:null===(M=P.modal)||void 0===M?void 0:M.description)||""}}},dm=(n,e)=>{let i=df(n);return i?(null==e?void 0:e.toLowerCase())===dl.Q.CREDIT_CARD.toLowerCase()||(null==e?void 0:e.toLowerCase())===dl.Q.DEBIT_CARD.toLowerCase():(null==e?void 0:e.toLowerCase())===dl.Q.CREDIT_CARD.toLowerCase()};var dh=i(13409);let dy=(n,e,i)=>{let[t,o]=(0,g.useState)(n0.kn),[l,r]=(0,g.useState)(!1),{error:d,isLoading:a,isError:u,isSuccess:s,mutate:c,reset:v}=(0,dh.Sz)();(0,g.useEffect)(()=>{a?o({...t,authorize:{...t.authorize,isLoading:!0,isSuccess:!1,isError:!1}}):u?o({...t,authorize:{...t.authorize,isLoading:!1,isSuccess:!1,isError:!0,error:(0,b.nQ)("authorize",d)}}):s&&o({...t,authorize:{...t.authorize,isLoading:!1,isSuccess:!0,isError:!1}})},[s,a,u]);let p=()=>{c({payMeanType:n||"",...i&&{authorizationOperation:i},...e&&{siaFlowType:e}})};return(0,g.useEffect)(()=>{l&&(r(!1),p())},[l]),(0,g.useEffect)(()=>{n&&!l&&(v(),r(!0))},[n]),t},db=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("checkout","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step10.1"],event_label:"upfront payment",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.kg)(i,"upfront payment"),(0,lF.qH)(i),null});var dC=n=>{let{handleOnChangeEnableGoNext:e,handleGoPrevSlide:i}=n,t=(0,no.useQueryClient)(),o=document.getElementById("sticky-offer-next"),l=(0,iO.C)(iO.J,iy.bl.CMS_GET_PAYMENTS),r=(0,iO.C)(iO.J,iy.bl.CMS_GET_GLOBAL_CONFIG),{title:d,buttonLabel:a}=dv(l),{titlePaymentError:u,messagePaymentError:s}=dp(l),{descriptionCC:c,descriptionDC:v,descriptionPrepaid:p,descriptionPaypal:f,titleCC:h,titleDC:y,titlePrepaid:b,titlePaypal:C,paymentMethod:E}=dg(l,r),{currentStepKey:S,checkoutErrors:x,owningData:I,upfrontPayment:A,isModalButtonSticky:_,product:T}=(0,ne.Mg)(),N=(0,iO.C)(iO.J,iy.bl.CMS_GET_GENERIC_ERROR),L=null==E?void 0:E.find(n=>n.value.toLowerCase()===dt.Q.CREDIT_CARD.toLowerCase()),{authorize:O}=dy(null==L?void 0:L.value,dt.K.INSTANT,"verify"),R=null==O?void 0:O.isSuccess,D=null==O?void 0:O.isError,M=()=>{var n,e;let o=()=>{i&&i()};null==x||null===(e=x.showAndTrackError)||void 0===e||e.call(x,N,o,null==O?void 0:O.error,u,s,o,"Chiudi",()=>{var n;return(0,nk.x)(t,(null==T?void 0:null===(n=T.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",T,o,S,null==O?void 0:O.error)},(null==T?void 0:null===(n=T.genericErrorCallMeNow)||void 0===n?void 0:n.label)||"",_,!0)},P=(0,g.useCallback)(()=>{var n,e,i,t,o,l,r;switch(null==A?void 0:null===(n=A.type)||void 0===n?void 0:n.toLowerCase()){case null===(e=dt.Q.CREDIT_CARD)||void 0===e?void 0:e.toLowerCase():return c;case null===(i=dt.Q.DEBIT_CARD)||void 0===i?void 0:i.toLowerCase():return v;case null===(t=dt.Q.PREPAID_CARD)||void 0===t?void 0:t.toLowerCase():return p;case null===(o=dt.Q.PAYPAL)||void 0===o?void 0:o.toLowerCase():return f;case null===(l=dt.Q.BANK_ACCOUNT)||void 0===l?void 0:l.toLowerCase():case null===(r=dt.Q.WALLET)||void 0===r?void 0:r.toLowerCase():default:return""}},[A]);return(0,g.useEffect)(()=>{D&&M()},[D]),(0,g.useEffect)(()=>{null==e||e(R)},[R]),(0,g.useEffect)(()=>{L||M();let n=()=>{(0,nN.Fk)({event_name:"ui_interaction",event_label_track:"Credit Card",event_category:"users",event_action:"click",tracking_type:"link"})};return null==o||o.addEventListener("click",n),()=>{null==o||o.removeEventListener("click",n)}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(db,{}),(0,m.jsx)(ds.X,{owningIndividual:I.owningIndividual,handleGoPrevSlide:i,payMean:A||dc,showLoader:!R,config:{title:d,subtitle:P(),buttonLabel:a,titlePaymentError:u,messagePaymentError:s,yourCredit
1CardTitle:h,yourDebitCardTitle:y,yourPrepaidCardTitle:b,yourPaypalTitle:C}})]})};let dE=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("checkout","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step10.1"],event_label:"upfront payment",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.kg)(i,"upfront payment"),(0,lF.qH)(i),null});var dS=n=>{let{handleOnChangeEnableGoNext:e,handleGoPrevSlide:i}=n,t=(0,no.useQueryClient)(),o=document.getElementById("sticky-offer-next"),l=(0,y.CA)(y.Jn,iy.bl.CMS_GET_PAYMENTS),r=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GLOBAL_CONFIG),{titlePaymentError:d,messagePaymentError:a}=dp(l),{titleUpFront:u,descriptionCreditRemaning:s,paymentMethod:c,bottomModalConfig:v}=dg(l,r),{currentStepKey:p,checkoutErrors:f,isModalButtonSticky:h,product:C}=(0,ne.Mg)(),E=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),[S,x]=(0,g.useState)();(0,g.useEffect)(()=>{var n;let e=()=>{let n;n=(null==S?void 0:S.value)==="creditCard"?"Credit Card":(null==S?void 0:S.value)==="creditCardAndPaypal"?"Paypal":(null==S?void 0:S.value)==="debitCard"?"Debit Card":(null==S?void 0:S.value)==="prepaidCard"?"Prepaid Card":"",(0,nN.Fk)({event_name:"ui_interaction",event_label_track:n,event_category:"users",event_action:"click",tracking_type:"link"})};return(null==S?void 0:S.value)&&localStorage.setItem(b._n,(null==S?void 0:null===(n=S.value)||void 0===n?void 0:n.toLowerCase())==="creditcardandpaypal"?dt.Q.PAYPAL:null==S?void 0:S.value),null==o||o.addEventListener("click",e),()=>{null==o||o.removeEventListener("click",e)}},[S]);let{authorize:I}=dy(null==S?void 0:S.value,dt.K.INSTANT,void 0),A=null==I?void 0:I.isSuccess,_=null==I?void 0:I.isError,T=()=>{var n,e;let o=()=>{i&&i()};null==f||null===(e=f.showAndTrackError)||void 0===e||e.call(f,E,o,null==I?void 0:I.error,d,a,o,"Chiudi",()=>{var n;return(0,nk.x)(t,(null==C?void 0:null===(n=C.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",C,o,p,null==I?void 0:I.error)},(null==C?void 0:null===(n=C.genericErrorCallMeNow)||void 0===n?void 0:n.label)||"",h,!0)};return(0,g.useEffect)(()=>{_&&T()},[_]),(0,g.useEffect)(()=>{null==e||e(A)},[A]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(dE,{}),(0,m.jsx)(iP.k,{title:u,description:s,items:c,value:!1,setSelectedItem:x,disableItems:S&&!A,isSuccess:!0,bottomModal:v})]})};let dx=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("checkout","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step10.1"],event_label:"upfront payment",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.kg)(i,"upfront payment"),(0,lF.qH)(i),null});var dI=n=>{let e=(0,y.CA)(y.Jn,y.bl.CMS_GET_GLOBAL_CONFIG),{setIsLastCard:i,setCurrentStepKey:t,setUpdateProductPriceCtrl:o}=(0,ne.Mg)(),l=dm(e,localStorage.getItem(b.aY));return(0,g.useEffect)(()=>(t(ni.Bf.UPFRONT_PAYMENT),window.history.pushState(null,"",window.location.pathname),o({isPriceUpdated:!0,isUpdatePrice:!1}),l&&localStorage.setItem(b._n,dl.Q.CREDIT_CARD),i(!0),()=>{i(!1)}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(dx,{}),l&&(0,m.jsx)(dC,{...n}),!l&&(0,m.jsx)(dS,{...n})]})},dA=i(40556),d_=i(47438);let dT=()=>_.object({email:_.string().required("Campo obbligatorio").matches(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,"Email invalida")});function dN(){let n=(0,N._)(["\n margin: 60px 40px 40px;\n "]);return dN=function(){return n},n}function dL(){let n=(0,N._)(["\n margin: 72px 109px 40px;\n "]);return dL=function(){return n},n}function dO(){let n=(0,N._)(["\n width: 328px;\n "]);return dO=function(){return n},n}function dR(){let n=(0,N._)(["\n width: 405px;\n "]);return dR=function(){return n},n}function dD(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 48px 44px;\n\n ","\n\n ","\n\n .body {\n width: 100%;\n\n ","\n\n ","\n }\n"]);return dD=function(){return n},n}function dM(){let n=(0,N._)(["\n gap: ",";\n "]);return dM=function(){return n},n}function dP(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n width: 100%;\n\n ","\n"]);return dP=function(){return n},n}function dw(){let n=(0,N._)(["\n margin-top: ",";\n margin-bottom: 40px;\n "]);return dw=function(){return n},n}function dk(){let n=(0,N._)(["\n margin-top: ",";\n "]);return dk=function(){return n},n}function dj(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-top: 15px;\n margin-bottom: ",";\n\n ","\n\n ","\n"]);return dj=function(){return n},n}function dB(){let n=(0,N._)(["\n padding-top: ",";\n font-size: ",";\n line-height: ",";\n "]);return dB=function(){return n},n}function dF(){let n=(0,N._)(["\n padding-top: ",";\n font-size: ",";\n line-height: ",";\n "]);return dF=function(){return n},n}function dz(){let n=(0,N._)(["\n text-align: left;\n font-family: ",";\n font-weight:",";\n font-size: ",";\n line-height: ",";\n margin: 0;\n color: ",";\n\n ","\n\n ","\n"]);return dz=function(){return n},n}function dZ(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return dZ=function(){return n},n}function dH(){let n=(0,N._)(["\n font-family: ",";\n font-size: ",";\n line-height: ",";\n margin: 0;\n text-align: left;\n font-weight: ",";\n color: ",";\n\n p {\n margin: 0;\n }\n\n ","\n"]);return dH=function(){return n},n}function dV(){let n=(0,N._)(["\n width: 258px;\n "]);return dV=function(){return n},n}function dU(){let n=(0,N._)(["\n width: 296px;\n "]);return dU=function(){return n},n}function dQ(){let n=(0,N._)(["\n width: 100%;\n display: flex;\n justify-content: center;\n\n .button-slide-container {\n width: 100%;\n\n ","\n\n ","\n }\n"]);return dQ=function(){return n},n}function dG(){let n=(0,N._)(["\n position: relative;\n left: 40px;\n top: 10px;\n \n svg {\n width: 28px;\n height: 25px;\n }\n"]);return dG=function(){return n},n}let dY=L.Z.div(dD(),O.B.tablet(dN()),O.B.desktop(dL()),O.B.tablet(dO()),O.B.desktop(dR())),dW=L.Z.div(dP(),O.r.spacing.lg,O.B.desktop(dM(),O.r.spacing.xl)),dJ=L.Z.div(dj(),O.r.spacing.xl,O.B.tablet(dw(),O.r.spacing.xl),O.B.desktop(dk(),O.r.spacing.xl)),dX=L.Z.p(dz(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.display5,O.r.typography.lineHeight.display5,O.r.colors.text.primary,O.B.tablet(dB(),O.r.spacing.sm,O.r.typography.fontSize.display5,O.r.typography.lineHeight.display5),O.B.desktop(dF(),O.r.spacing.sm,O.r.typography.fontSize.h2,O.r.typography.lineHeight.h2)),dq=L.Z.div(dH(),O.r.typography.fontFamily.secondary,O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6,O.r.typography.fontWeight.regular,O.r.colors.text.primary,O.B.tablet(dZ(),O.r.typography.fontSize.body2,O.r.typography.lineHeight.body2)),dK=L.Z.div(dQ(),O.B.tablet(dV()),O.B.desktop(dU())),d$=L.Z.div(dG());var d0=i(92070),d1=i(41745),d2=n=>{var e;let{cmsData:i,onSubmit:t,isLoading:o}=n,{register:l,getValues:r,formState:{errors:d,isValid:a}}=(0,C.cI)({resolver:(0,x.X)(dT()),mode:"onChange"}),[u]=(0,A.q)([(null==i?void 0:i.description)||""]);return(0,m.jsxs)(dY,{children:[(0,m.jsxs)(dW,{children:[(null==i?void 0:i.title)&&(0,m.jsx)(dX,{children:i.title}),(0,m.jsx)(dq,{dangerouslySetInnerHTML:{__html:u||""}})]}),(0,m.jsxs)(dJ,{className:"body",children:[(0,m.jsx)(d1.Z,{label:(null==i?void 0:i.inputLabel)||"",error:null==d?void 0:null===(e=d.email)||void 0===e?void 0:e.message,disabled:o,...l("email")}),(0,m.jsx)(dA.Z,{text:(null==i?void 0:i.alertText)||"",type:"warning",icon:(0,m.jsx)(d_.n,{color:"#fff",width:24,name:"warning"})})]}),(0,m.jsx)(dK,{children:(0,m.jsxs)(d0.E,{variant:"secondary",onClick:()=>{let n=r();t&&t(n.email)},disabled:o||!a,className:"button-slide-container",children:[null==i?void 0:i.buttonLabel,o&&(0,m.jsx)(d$,{children:(0,m.jsx)(iv.Z,{})})]})})]})};let d9=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("billing","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step6"],event_label:"billing",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),(0,nN.kg)(i),null});var d3=i(96108);function d4(){let n=(0,N._)(["\n width: 366px;\n gap: 12px;\n "]);return d4=function(){return n},n}function d6(){let n=(0,N._)(["\n width: 406px;\n "]);return d6=function(){return n},n}function d5(){let n=(0,N._)(["\n margin: 0 auto;\n gap: ",";\n width: 287px;\n\n ","\n\n ","\n"]);return d5=function(){return n},n}function d7(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n padding: "," 0 ",";\n "]);return d7=function(){return n},n}function d8(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return d8=function(){return n},n}function an(){let n=(0,N._)(["\n padding: "," 0 ",";\n font-family: ",";\n font-weight:",";\n font-style: normal;\n text-align: center;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return an=function(){return n},n}function ae(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return ae=function(){return n},n}function ai(){let n=(0,N._)(["\n margin-bottom: 40px;\n "]);return ai=function(){return n},n}function at(){let n=(0,N._)(["\n div {\n margin: 0 auto;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: center;\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n\n ","\n\n ","\n\n p {\n margin-block: 0;\n }\n }\n"]);return at=function(){return n},n}function ao(){let n=(0,N._)(["\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n "]);return ao=function(){return n},n}function al(){let n=(0,N._)(["\n width: inherit;\n background: linear-gradient(0.25turn, transparent, ",", transparent),\n linear-gradient(",", ","), linear-gradient(",", ",");\n background-repeat: no-repeat;\n animation: loading 1.5s infinite;\n\n :first-child {\n margin-top: ",";\n margin-bottom: ",";\n height: 45px;\n }\n\n height: 58px;\n margin-bottom: ",";\n\n ","\n\n @keyframes loading {\n to {\n background-position: 315px 0, 0 0, 0 190px, 50px 195px;\n }\n }\n"]);return al=function(){return n},n}function ar(){let n=(0,N._)(["\n margin-top: ",";\n display: flex;\n text-align: left;\n"]);return ar=function(){return n},n}function ad(){let n=(0,N._)(["\n p{\n margin: 0 auto ;\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: left;\n font-size: ",";\n line-height: ",";\n }\n"]);return ad=function(){return n},n}let aa=L.Z.div(d5(),O.r.spacing.md,O.B.tablet(d4()),O.B.desktop(d6())),au=L.Z.div(an(),O.r.spacing.xl,O.r.spacing.md,O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h4,O.r.typography.lineHeight.h4,O.B.tablet(d7(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1,O.r.spacing["3xl"],O.r.spacing.md),O.B.desktop(d8(),O.r.typography.fontSize.display4,O.r.typography.lineHeight.display4)),as=L.Z.div(at(),O.r.typography.fontFamily.secondary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1,O.r.spacing.xl,O.B.tablet(ae(),O.r.typography.fontSize.h6,O.r.typography.lineHeight.h6),O.B.desktop(ai()));L.Z.div(al(),O.r.colors.bg.primary,O.r.colors.bg.secondary,O.r.colors.bg.secondary,O.r.colors.bg.secondary,O.r.colors.bg.secondary,O.r.spacing["3xl"],O.r.spacing.md,O.r.spacing.md,O.B.tablet(ao()));let ac=L.Z.div(ar(),O.r.spacing.lg),av=L.Z.div(ad(),O.r.typography.fontFamily.secondary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.typography.lineHeight.body3);var ap=i(85069),af=n=>{let{title:e,description:i,bottomModal:t,bottomText:o,disableItems:l=!1,items:r,value:d,setSelectedItem:a,onSelectItem:u,isSuccess:s=!0,selectedItem:c,onOpeneModal:v}=n,[p,f]=(0,g.useState)(),[m,h]=(0,g.useState)(!1),y=null==r?void 0:r.findIndex(n=>n.value===(null==c?void 0:c.value)),[b,C]=(0,g.useState)(y);return(0,g.useEffect)(()=>{void 0!==p&&(null==p?void 0:p.value)!==(null==c?void 0:c.value)&&(a(p),u&&u(p),p&&C(r.findIndex(n=>n.value===d)))}
1,[p]),(0,g.useEffect)(()=>{r&&r.length>0&&C(null==r?void 0:r.findIndex(n=>n.value===(null==c?void 0:c.value)))},[r]),(0,g.useEffect)(()=>{m&&(null==v||v())},[m]),{title:e,description:i,bottomModal:t,bottomText:o,disableItems:l,items:r,value:d,setSelectedItem:a,onSelectItem:u,isSuccess:s,setItem:f,selectedItem:c,onOpeneModal:v,openModal:m,setOpenModal:h,passedItemIndex:b}},ag=n=>{let{title:e,description:i,bottomModal:t,bottomText:o,disableItems:l,items:r,value:d,setSelectedItem:a,onSelectItem:u,isSuccess:s,setItem:c,selectedItem:v,onOpeneModal:p,openModal:f,setOpenModal:g,passedItemIndex:h}=af(n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(aa,{children:[(0,m.jsx)(au,{children:e}),(0,m.jsx)(as,{children:(0,m.jsx)(d3.Z,{text:i||""})}),s?(0,m.jsx)(ap.Z,{marginBottom:{mobile:12,tablet:12,desktop:12},items:r,selectedItem:c,passedValueIndex:h,disabled:l}):(0,m.jsx)(eg.Z,{quantity:2,heights:70}),t&&(0,m.jsx)(ac,{children:(0,m.jsx)(eP.Z,{size:"1",onClick:()=>g(!f),text:null==t?void 0:t.textLink})}),(0,m.jsx)(av,{children:(0,m.jsx)("p",{children:o})})]}),(0,m.jsx)(ic.Z,{isOpen:f,handleClose:()=>g(!1),children:(0,m.jsx)(rl.Z,{title:(null==t?void 0:t.titleModal)||"",description:(null==t?void 0:t.descriptionModal)||"",options:{textAlign:"left"}})})]})},am=i(27166),ah=i(7392);let ay=()=>(0,b.AQ)()===b.xx.NEXT_USER_ACTIVE||(0,b.AQ)()===b.xx.LOGGED_USER,ab=(n,e,i,t,o)=>{var l,r,d;let a=null==n?void 0:null===(l=n.billinginformation)||void 0===l?void 0:l.card,u={},s={};switch(i){case null===ah.u||void 0===ah.u?void 0:ah.u.PAPER.toLowerCase():u=t?{text:(null==a?void 0:a.highlightLabel)||"",color:"#fff",extraClass:"extraClass"}:{text:""},s={text:""};break;case null===ah.u||void 0===ah.u?void 0:ah.u.EBILL.toLowerCase():u=t?{text:(null==a?void 0:a.highlightLabel)||"",color:"#fff",extraClass:"extraClass"}:{text:""},s={text:e?(null==a?void 0:null===(d=a.choice)||void 0===d?void 0:null===(r=d.option2)||void 0===r?void 0:r.linkAddressLabel)||"cambia indirizzo email":"",action:ay()?o:void 0,variant:"action"};break;default:u={text:""},s={text:""}}return{extra:u,linkExtra:s}},aC=(n,e,i,t)=>{var o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b;let C=null==n?void 0:null===(o=n.billinginformation)||void 0===o?void 0:o.card,E=(null==C?void 0:null===(r=C.choice)||void 0===r?void 0:null===(l=r.option1)||void 0===l?void 0:l.index)==="1"?null==C?void 0:null===(d=C.choice)||void 0===d?void 0:d.option1:null==C?void 0:null===(a=C.choice)||void 0===a?void 0:a.option2,S=(null==C?void 0:null===(s=C.choice)||void 0===s?void 0:null===(u=s.option2)||void 0===u?void 0:u.index)==="2"?null==C?void 0:null===(c=C.choice)||void 0===c?void 0:c.option2:null==C?void 0:null===(v=C.choice)||void 0===v?void 0:v.option1;return{title:(null==C?void 0:C.title)||"",description:(null==C?void 0:C.description)||"",isFirstPreflagged:(null==E?void 0:E.isPreflagged)==="true",isSecondPreflagged:(null==S?void 0:S.isPreflagged)==="true",items:[{title:(null==E?void 0:E.title)||"",description:(null==E?void 0:null===(f=E.description)||void 0===f?void 0:null===(p=f.replace("FIRSTADDRESS",e||""))||void 0===p?void 0:p.replace("EMAIL",i||""))||"",...ab(n,ay(),null==E?void 0:null===(g=E.value)||void 0===g?void 0:g.trim().toLowerCase(),(null==E?void 0:E.isHighlighted)==="true",t),value:(null==E?void 0:null===(m=E.value)||void 0===m?void 0:m.trim().toLowerCase())===(null===ah.u||void 0===ah.u?void 0:ah.u.PAPER.toLowerCase())?null===ah.u||void 0===ah.u?void 0:ah.u.PAPER:null===ah.u||void 0===ah.u?void 0:ah.u.EBILL},{title:(null==S?void 0:S.title)||"",titleIcon:null==S?void 0:S.icon,description:(null==S?void 0:null===(y=S.description)||void 0===y?void 0:null===(h=y.replace("FIRSTADDRESS",e||""))||void 0===h?void 0:h.replace("EMAIL",i||""))||"",...ab(n,ay(),null==S?void 0:null===(b=S.value)||void 0===b?void 0:b.trim().toLowerCase(),(null==S?void 0:S.isHighlighted)==="true",t),value:null===ah.u||void 0===ah.u?void 0:ah.u.EBILL}]}},aE=()=>{let n=(0,y.CA)(y.Jn,eM.b.CMS_GET_GLOBAL_CONFIG),{isSuccess:e,isLoading:i,isError:t,refetch:o}=(0,am.r)({enabled:!1},n);return{handleRefetch:n=>n&&o(),isError:t,isLoading:i,isSuccess:e}};var aS=n=>{var e,i;let{handleOnChangeEnableGoNext:t}=n,{owningData:{owningIndividual:o},billingAddress:l,invoice:r,billingEmail:d,billingReplace:{billDelivery:a},setInvoice:u,setCurrentStepKey:s,setBillingEmail:c}=(0,ne.Mg)(),{isSuccess:v,isLoading:p,isError:f}=a,{handleRefetch:m,isSuccess:h,isLoading:C,isError:E}=aE(),S=(0,y.CA)(y.Jn,oP.b.CMS_GET_BILLING_INFORMATION),{card:x,email:I}=S.billinginformation,A=(0,iC.Ar)(),[_,T]=(0,g.useState)(),[N,L]=(0,g.useState)(!1),[O,R]=(0,g.useState)(!1);(0,g.useEffect)(()=>{m(O),R(!1)},[O]),(0,g.useEffect)(()=>{v&&N&&(R(!0),h&&L(!1))},[v,h]);let{title:D,description:M,items:P,isFirstPreflagged:w,isSecondPreflagged:k}=aC(S,""===l.street?(0,b.kg)((null==A?void 0:A.street)||"").concat(" ",(null==A?void 0:A.streetNumber)||"",", ",(null==A?void 0:A.postalCode)||""," ",(0,b.kg)((null==A?void 0:A.city)||"")):null===(e=(0,b.kg)(null==l?void 0:l.street))||void 0===e?void 0:e.concat(" ",null==l?void 0:l.streetNumber,", ",null==l?void 0:l.postalCode," ",(0,b.kg)(null==l?void 0:l.city)),d||(null==o?void 0:o.contactMedium)&&(null==o?void 0:null===(i=o.contactMedium[0])||void 0===i?void 0:i.emailAddress),()=>{var n,e;L(!0),(0,oP.d)(null==x?void 0:null===(e=x.choice)||void 0===e?void 0:null===(n=e.option2)||void 0===n?void 0:n.linkAddressLabel)}),j=n=>{(null==n?void 0:n.value)!==void 0&&(null==n?void 0:n.value)!==(null==r?void 0:r.option)&&u({option:n.value}),n&&(null==t||t(!0))};return(0,g.useEffect)(()=>{let n=document.getElementById("sticky-offer-next"),e=()=>{(0,oP.d)((null==r?void 0:r.option)===(null===ah.u||void 0===ah.u?void 0:ah.u.PAPER)?"formato cartaceo":"e-mail")};return(null==r?void 0:r.option)&&(null==n||n.addEventListener("click",e),T({value:r.option,title:""}),null==t||t(!0)),()=>{null==n||n.removeEventListener("click",e)}},[r]),(0,g.useEffect)(()=>{var n,e;s(ni.Bf.INVOICE),(0,b.AQ)()===b.xx.NEXT_USER_INACTIVE&&(null==o?void 0:o.contactMedium)&&(null==o?void 0:null===(n=o.contactMedium[0])||void 0===n?void 0:n.emailAddress)&&c(null==o?void 0:null===(e=o.contactMedium[0])||void 0===e?void 0:e.emailAddress),(null==r?void 0:r.option)||!w?(null==r?void 0:r.option)||!k||j({value:P[1].value,title:""}):j({value:P[0].value,title:""}),w||k||(null==r?void 0:r.option)||null==t||t(!1)},[]),{items:P,title:D,description:M,handleSelect:j,selectedItem:_,setSelectedItem:T,isOpen:N,setIsOpen:L,handleSubmitNewEmail:n=>{c(n),(0,oP.d)(null==I?void 0:I.buttonLabel)},isRefetchLoading:C,isRefetchError:E,isBillDeliveryLoading:p,isBillDeliveryError:f,email:I,invoice:r}},ax=n=>{let{handleOnChangeEnableGoNext:e}=n,{items:i,title:t,description:o,handleSelect:l,selectedItem:r,setSelectedItem:d,isOpen:a,setIsOpen:u,handleSubmitNewEmail:s,isRefetchLoading:c,isRefetchError:v,isBillDeliveryLoading:p,isBillDeliveryError:f,email:g,invoice:h}=aS({handleOnChangeEnableGoNext:e});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(d9,{}),(0,m.jsx)(ag,{items:i,title:t,description:o,setSelectedItem:d,selectedItem:r,onSelectItem:l,value:h.option}),(0,m.jsx)(ic.Z,{isOpen:a,handleClose:()=>u(!1),isModalFullContainer:!0,children:(0,m.jsx)(d2,{cmsData:g,onSubmit:s,isLoading:p||c,isError:f||v})})]})};function aI(){let n=(0,N._)(["\n .checkbox-container p > b {\n color: #00697c;\n }\n"]);return aI=function(){return n},n}let aA=L.Z.div(aI());var a_=i(95616),aT=i(3187);let aN="voucherCode",aL={[aN]:{minLength:{value:3,message:"Il codice deve avere almeno 3 cifre"}}},aO=()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("voucher input","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step8.2"],event_label:"insert voucher",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i,"voucher input"),(0,nt.q)(i),null},aR=()=>{var n;let{setVoucher:e,setConfiguredStickyStepperLabel:i,setIsLoadingGoNext:t,voucher:o,product:{vouchers:l}}=(0,ne.Mg)(),r=(0,aT.CA)(aT.Jn,a_.bl.CMS_GET_FIXED_VOUCHERS),d=(0,aT.Dt)(r);aO();let{register:a,formState:{isValid:u,errors:s},watch:c,setError:v}=(0,C.cI)({mode:"all",defaultValues:{[aN]:localStorage.getItem("voucherId")||((null==l?void 0:l.enableAutoApply)?null==l?void 0:l.voucherToApply:"")}}),p=c(aN),f=()=>{var n,e;(0,a_.dw)(null==d?void 0:null===(e=d.voucherstwilight)||void 0===e?void 0:null===(n=e.insertion)||void 0===n?void 0:n.skipLabel)};return(0,g.useEffect)(()=>{var n,e,t;null===(n=o.resetData)||void 0===n||n.call(o),i(null==d?void 0:null===(t=d.voucherstwilight)||void 0===t?void 0:null===(e=t.insertion)||void 0===e?void 0:e.skipLabel);
1let l=document.getElementById("sticky-offer-next");return null==l||l.addEventListener("click",f),localStorage.removeItem("voucherId"),()=>{i(""),null==l||l.removeEventListener("click",f)}},[]),(0,g.useEffect)(()=>{var n,e,i,t,l,r,a,u,s;(null==o?void 0:null===(n=o.validateVoucher)||void 0===n?void 0:n.isSuccess)&&((null==o?void 0:o.isExpiredVoucher)?((0,a_.Fk)({event_name:"page_error",event_label_track:"page_error",event_category:"error",page_error:"200_validateVoucher".concat(null==o?void 0:null===(i=o.validateVoucher)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:e.message,"_").concat(null==o?void 0:null===(l=o.validateVoucher)||void 0===l?void 0:null===(t=l.data)||void 0===t?void 0:t.returnedCode,"_nblk_insert voucher"),page_type:"error page"}),v(aN,{type:"manual",message:d.voucherstwilight.insertion.expiredMessage})):(null==o?void 0:o.isInvalidVoucher)&&((0,a_.Fk)({event_name:"page_error",event_label_track:"page_error",event_category:"error",page_error:"200_validateVoucher_".concat(null==o?void 0:null===(a=o.validateVoucher)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.message,"_").concat(null==o?void 0:null===(s=o.validateVoucher)||void 0===s?void 0:null===(u=s.data)||void 0===u?void 0:u.returnedCode,"_nblk_insert voucher"),page_type:"error page"}),v(aN,{type:"manual",message:d.voucherstwilight.insertion.invalidMessage})))},[null==o?void 0:null===(n=o.validateVoucher)||void 0===n?void 0:n.isSuccess]),(0,g.useEffect)(()=>{o.validateVoucher.isError&&v(aN,{type:"manual",message:d.voucherstwilight.insertion.invalidMessage})},[o.validateVoucher.isError]),(0,g.useEffect)(()=>{var n;t((null==o?void 0:null===(n=o.validateVoucher)||void 0===n?void 0:n.isLoading)||!1)},[o.validateVoucher.isLoading]),{voucherCms:d,errors:s,handleClick:()=>{e({...o,voucherId:p})},isLoading:o.validateVoucher.isLoading,isValid:u,register:a,watch:c}};function aD(){let n=(0,N._)(["\n margin: "," ",";\n "]);return aD=function(){return n},n}function aM(){let n=(0,N._)(["\n margin: "," ",";\n "]);return aM=function(){return n},n}function aP(){let n=(0,N._)(["\n margin: "," "," ","; \n\n ","\n\n ","\n\n button {\n margin-top: ",";\n }\n"]);return aP=function(){return n},n}function aw(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n margin-top: ","; \n "]);return aw=function(){return n},n}function ak(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return ak=function(){return n},n}function aj(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ","; \n line-height: ","; \n margin-top: ",";\n\n ","\n\n ","\n"]);return aj=function(){return n},n}function aB(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return aB=function(){return n},n}function aF(){let n=(0,N._)(["\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: ",";\n line-height: ",";\n margin: 0 0 ","; \n\n ","\n"]);return aF=function(){return n},n}function az(){let n=(0,N._)(["\n div {\n left: 155px;\n }\n "]);return az=function(){return n},n}function aZ(){let n=(0,N._)(["\n position: absolute;\n\n div {\n position: relative;\n left: 120px;\n top: 11px;\n\n svg {\n width: 25px;\n }\n }\n\n ","\n"]);return aZ=function(){return n},n}let aH=L.Z.section(aP(),O.r.spacing.xl,O.r.spacing.lg,O.r.spacing.md,O.B.tablet(aD(),O.r.spacing.xl,O.r.spacing.xl),O.B.desktop(aM(),O.r.spacing.xl,O.r.spacing["2xl"]),O.r.spacing.xl),aV=L.Z.h2(aj(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h2,O.r.typography.lineHeight.h2,O.r.spacing.xl,O.B.tablet(aw(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1,O.r.spacing["3xl"]),O.B.desktop(ak(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1)),aU=L.Z.p(aF(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1,O.r.spacing.xl,O.B.tablet(aB(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1)),aQ=L.Z.div(aZ(),O.B.tablet(az()));var aG=()=>{var n,e,i,t,o,l,r,d,a,u,s,c,v;let{voucherCms:p,handleClick:f,errors:g,register:h,isLoading:y}=aR();return(0,m.jsxs)(aH,{children:[(null==p?void 0:null===(e=p.voucherstwilight)||void 0===e?void 0:null===(n=e.insertion)||void 0===n?void 0:n.title)&&(0,m.jsx)(aV,{children:null==p?void 0:null===(t=p.voucherstwilight)||void 0===t?void 0:null===(i=t.insertion)||void 0===i?void 0:i.title}),(null==p?void 0:null===(l=p.voucherstwilight)||void 0===l?void 0:null===(o=l.insertion)||void 0===o?void 0:o.message)&&(0,m.jsx)(aU,{children:null==p?void 0:null===(d=p.voucherstwilight)||void 0===d?void 0:null===(r=d.insertion)||void 0===r?void 0:r.message}),(0,m.jsx)(d1.Z,{error:null==g?void 0:null===(a=g.voucherCode)||void 0===a?void 0:a.message,label:null==p?void 0:null===(s=p.voucherstwilight)||void 0===s?void 0:null===(u=s.insertion)||void 0===u?void 0:u.inputName,disabled:y,...h(aN,aL.voucherCode)}),(0,m.jsxs)(d0.E,{disabled:y,variant:"primary",onClick:f,children:[null==p?void 0:null===(v=p.voucherstwilight)||void 0===v?void 0:null===(c=v.insertion)||void 0===c?void 0:c.buttonLabel,y&&(0,m.jsx)(aQ,{children:(0,m.jsx)(iv.Z,{})})]})]})},aY=i(58676);let aW=()=>{var n,e;let{voucher:i}=(0,ne.Mg)(),t=(0,no.useQueryClient)(),o=(0,nl.De)("voucher typ","fixed",t),l={event:["checkout_step8.3"],event_label:"voucher applied",opts:null==o?void 0:o.opts,cartProduct:null==o?void 0:o.trackingProduct,pageProduct:null==o?void 0:o.pageProductsInfo,product_discount_value:null==i?void 0:null===(e=i.validateVoucher)||void 0===e?void 0:null===(n=e.data)||void 0===n?void 0:n.finalPrice,transaction_coupon_code:(null==i?void 0:i.voucherId)||"",visitorTrackingOpts:(0,nl.bG)()},{trackWithNewDatalayer:r}=(0,aY.r)({...l,disableInitialTrack:!0});return(0,g.useEffect)(()=>{var n;(null==i?void 0:null===(n=i.shoppingCart)||void 0===n?void 0:n.isSuccess)&&r({...l})},[i]),null};var aJ=i(83157);let aX=()=>localStorage.getItem(aJ.R),aq=()=>localStorage.setItem(aJ.R,"1"),aK=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p;let{handleOnChangeEnableGoNext:f,handleGoNextSlide:m}=n,{checkoutErrors:h,voucher:y,product:b,setIsLoadingGoNext:C,setConfiguredStickyStepperLabel:E,setVoucher:S,setProduct:x,setIsDisabledBackButton:I}=(0,ne.Mg)();aW();let _=(0,aT.CA)(aT.Jn,oP.b.CMS_GET_FIXED_VOUCHERS),T=(0,aT.Dt)(_,y.voucherId),N=(0,aT.CA)(aT.Jn,oP.b.CMS_GET_GENERIC_ERROR),L=(null===(e=(0,A.q)([(null==b?void 0:null===(i=b.vouchers)||void 0===i?void 0:i.message)||""]))||void 0===e?void 0:e[0])||"",O=(null===(t=(0,A.q)([(null==b?void 0:null===(o=b.vouchers)||void 0===o?void 0:o.messageHtml)||""]))||void 0===t?void 0:t[0])||L||"",R=(null===(l=(0,A.q)([(null==b?void 0:null===(r=b.vouchers)||void 0===r?void 0:r.description)||""]))||void 0===l?void 0:l[0])||"",D=(null===(d=(0,A.q)([(null==b?void 0:null===(a=b.vouchers)||void 0===a?void 0:a.descriptionHtml)||""]))||void 0===d?void 0:d[0])||R||"",M=n=>
1{n.stopPropagation(),!y.validateVoucher.isSuccess||(null==y?void 0:y.isAppliedVoucher)||(null==f||f(!1),I(!0),S({...y,isApplyVoucher:!0}))},P=n=>{if(!(null==y?void 0:y.isAppliedVoucher)){var e;n.stopPropagation(),null==y||null===(e=y.resetData)||void 0===e||e.call(y)}},w=()=>{var n,e,i,t,o,l,r;if(y.voucher.isError||y.shoppingCart.isError){let t=(null==y?void 0:null===(n=y.voucher)||void 0===n?void 0:n.error)||(null==y?void 0:null===(e=y.shoppingCart)||void 0===e?void 0:e.error),o=()=>{var n;return null==y?void 0:null===(n=y.resetData)||void 0===n?void 0:n.call(y)};null==h||null===(i=h.showAndTrackError)||void 0===i||i.call(h,N,o,t,"","",o)}else(null==y?void 0:y.isAppliedVoucher)&&(null==f||f(!0),I(!1),aX()||(localStorage.setItem("tProd_backUp",JSON.stringify(b)),x({...b,...(0,iC.vn)(b,nK.Z.EDIT),voucherPromoLabel:null==b?void 0:null===(o=b.vouchers)||void 0===o?void 0:null===(t=o.codeApplied)||void 0===t?void 0:t.replace("$VOUCHER",(null==y?void 0:y.voucherId)||""),voucherPromoMessage:O,voucherPromoDetail:D,...(null==b?void 0:b.offerDetailsVoucher)&&(null==b?void 0:null===(l=b.offerDetailsVoucher)||void 0===l?void 0:l.length)>0&&{offerDetails:[...b.offerDetailsVoucher]},...(null==b?void 0:b.conditionsVoucher)&&(null==b?void 0:null===(r=b.conditionsVoucher)||void 0===r?void 0:r.length)>0&&{conditions:[...b.conditionsVoucher]},...(null==b?void 0:b.priceVoucher)&&{price:null==b?void 0:b.priceVoucher},...(null==b?void 0:b.originalPriceVoucher)&&{originalPrice:null==b?void 0:b.originalPriceVoucher},...(null==b?void 0:b.priceActivationRecurringVoucher)&&{priceActivationRecurring:null==b?void 0:b.priceActivationRecurringVoucher},...(null==b?void 0:b.priceActivationVoucher)&&{priceActivation:null==b?void 0:b.priceActivationVoucher},...(null==b?void 0:b.priceRecurringVoucher)&&{priceRecurring:null==b?void 0:b.priceRecurringVoucher},...(null==b?void 0:b.subpriceActivationRecurringVoucher)&&{subpriceActivationRecurring:null==b?void 0:b.subpriceActivationRecurringVoucher},...(null==b?void 0:b.subpriceActivationVoucher)&&{subpriceActivation:null==b?void 0:b.subpriceActivationVoucher},...(null==b?void 0:b.subpriceActivationVoucher)&&{subpriceRecurring:null==b?void 0:b.subpriceRecurringVoucher},...(null==b?void 0:b.recurrenceVoucher)&&{recurrence:null==b?void 0:b.recurrenceVoucher},...(null==b?void 0:b.subpriceVoucher)&&{subprice:null==b?void 0:b.subpriceVoucher},...(null==b?void 0:b.descriptionVoucher)&&{description:null==b?void 0:b.descriptionVoucher},...(null==b?void 0:b.hasEmptySpaceVoucher)&&{hasEmptySpace:null==b?void 0:b.hasEmptySpaceVoucher},...(null==b?void 0:b.descriptionRecurringVoucher)&&{descriptionRecurring:null==b?void 0:b.descriptionRecurring},...(null==b?void 0:b.labelVoucher)&&{label:null==b?void 0:b.labelVoucher},...(null==b?void 0:b.topLabelStickyCheckout)&&{label:null==b?void 0:b.topLabelStickyCheckoutVoucher}}),aq(),null==m||m()))};return(0,g.useEffect)(()=>{var n,e;C((null==y?void 0:null===(n=y.voucher)||void 0===n?void 0:n.isLoading)||(null===(e=y.shoppingCart)||void 0===e?void 0:e.isLoading)||!1)},[y.voucher.isLoading,y.shoppingCart.isLoading]),(0,g.useEffect)(()=>{w()},[y]),(0,g.useEffect)(()=>{var n,e,i,t;E("");let o=document.getElementById("sticky-offer-next"),l=document.getElementById("back-button");return aX()||null==o||o.addEventListener("click",M),null==l||l.addEventListener("click",P),f&&f(!0),(0,oP.d)(null==T?void 0:null===(e=T.voucherstwilight)||void 0===e?void 0:null===(n=e.insertion)||void 0===n?void 0:n.buttonLabel,"users","click","ui interaction","link",(null==y?void 0:y.voucherId)||"",null==y?void 0:null===(t=y.validateVoucher)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.finalPrice),()=>{null==o||o.removeEventListener("click",M),null==l||l.removeEventListener("click",P)}},[]),{title:aX()?(null==T?void 0:null===(s=T.voucherstwilight)||void 0===s?void 0:null===(u=s.success)||void 0===u?void 0:u.backTitle)||"":(null==T?void 0:null===(v=T.voucherstwilight)||void 0===v?void 0:null===(c=v.success)||void 0===c?void 0:c.title)||"",voucherCms:T,isLoading:y.voucher.isLoading||y.shoppingCart.isLoading,discountTitle:(null==b?void 0:null===(p=b.vouchers)||void 0===p?void 0:p.discountTitle)||"",message:O}};function a$(){let n=(0,N._)(["\n margin: 196px 40px; \n "]);return a$=function(){return n},n}function a0(){let n=(0,N._)(["\n margin: 202px 54px; \n "]);return a0=function(){return n},n}function a1(){let n=(0,N._)(["\n margin: 82px 20px; \n\n ","\n\n ","\n"]);return a1=function(){return n},n}function a2(){let n=(0,N._)(["\n font-size: ",";
1 \n \n line-height: ","; \n margin: 0 0 ","; \n "]);return a2=function(){return n},n}function a9(){let n=(0,N._)(["\n margin: 0 0 ",";\n "]);return a9=function(){return n},n}function a3(){let n=(0,N._)(["\n font-family: ","; \n font-weight: ","; \n\n font-size: ",";\n line-height: ",";\n color: ",";\n margin: 0 0 ","; \n\n ","\n\n ","\n"]);return a3=function(){return n},n}function a4(){let n=(0,N._)(["\n \n font-size: ",";\n line-height: ",";\n "]);return a4=function(){return n},n}function a6(){let n=(0,N._)(["\n \n\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin: 0 0 ",";\n\n ","\n"]);return a6=function(){return n},n}function a5(){let n=(0,N._)(["\n text-align: left;\n "]);return a5=function(){return n},n}function a7(){let n=(0,N._)(["\n border: 1px solid ",";\n border-radius: ","; \n min-height: 100px; \n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ","; \n ","\n"]);return a7=function(){return n},n}function a8(){let n=(0,N._)(["\n\n font-size: ",";\n line-height: ",";\n margin: 0;\n"]);return a8=function(){return n},n}function un(){let n=(0,N._)(["\n justify-content: flex-start;\n "]);return un=function(){return n},n}function ue(){let n=(0,N._)(["\n align-items: flex-end;\n justify-content: center;\n display: flex;\n\n ","\n"]);return ue=function(){return n},n}function ui(){let n=(0,N._)(["\n font-size: ","; \n "]);return ui=function(){return n},n}function ut(){let n=(0,N._)(["\n font-size: ","; \n "]);return ut=function(){return n},n}function uo(){let n=(0,N._)(["\n margin: "," 0 0; \n\n ","\n\n ","\n\n p {\n margin: 0;\n }\n"]);return uo=function(){return n},n}let ul=L.Z.div(a1(),O.B.tablet(a$()),O.B.desktop(a0())),ur=L.Z.h2(a3(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h2,O.r.typography.lineHeight.h2,O.r.colors.text.brand,O.r.spacing.md,O.B.tablet(a2(),O.r.typography.fontSize.h1,O.r.typography.lineHeight.h1,O.r.spacing.lg),O.B.desktop(a9(),O.r.spacing.lg)),ud=L.Z.h3(a6(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.r.typography.fontSize.h5,O.r.typography.lineHeight.h5,O.r.spacing.md,O.B.tablet(a4(),O.r.typography.fontSize.h5,O.r.typography.lineHeight.h5)),ua=L.Z.section(a7(),O.r.colors.border.default,O.r.radius.sm,O.r.spacing.md,O.B.tablet(a5())),uu=L.Z.h6(a8(),O.r.typography.fontSize.body1,O.r.typography.lineHeight.body1),us=L.Z.div(ue(),O.B.tablet(un())),uc=L.Z.div(uo(),O.r.spacing.md,O.B.tablet(ui(),O.r.typography.fontSize.body2),O.B.desktop(ut(),O.r.typography.fontSize.body1));var uv=n=>{var e,i,t,o,l;let{title:r,voucherCms:d,isLoading:a,discountTitle:u,message:s}=aK(n);return(0,m.jsxs)(ul,{children:[r&&(0,m.jsx)(ur,{dangerouslySetInnerHTML:{__html:r}}),(null==d?void 0:null===(e=d.voucherstwilight.success)||void 0===e?void 0:e.subtitle)&&(0,m.jsx)(ud,{children:null==d?void 0:null===(i=d.voucherstwilight.success)||void 0===i?void 0:i.subtitle}),(0,m.jsxs)(ua,{children:[u&&(0,m.jsx)(uu,{children:u}),s&&(0,m.jsx)(us,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:s}})})]}),a&&(null==d?void 0:null===(t=d.voucherstwilight.success)||void 0===t?void 0:t.loadingMessage)&&(0,m.jsx)(uc,{dangerouslySetInnerHTML:{__html:null==d?void 0:null===(l=d.voucherstwilight)||void 0===l?void 0:null===(o=l.success)||void 0===o?void 0:o.loadingMessage}})]})};let up=()=>{var n,e;let{voucher:i,setCurrentStepKey:t,setCheckoutStepState:o}=(0,ne.Mg)(),[l,r]=(0,g.useState)((null==i?void 0:null===(n=i.voucher)||void 0===n?void 0:n.isSuccess)&&(null==i?void 0:null===(e=i.shoppingCart)||void 0===e?void 0:e.isSuccess)&&!(null==i?void 0:i.isInvalidVoucher)&&!(null==i?void 0:i.isExpiredVoucher)||!1),d=()=>{i.validateVoucher.isSuccess?(null==i?void 0:i.isExpiredVoucher)||(null==i?void 0:i.isInvalidVoucher)||r(!0):r(!1)};return(0,g.useEffect)(()=>{d()},[i]),(0,g.useEffect)(()=>{t(ni.Bf.VOUCHER),o(ni.v9.VOUCHER_CARD,{})},[]),{isValidVoucher:l}},uf=(n,e,i)=>tX.W.patch("".concat(h.b.SHOPPING_CART,"/").concat(n,"/shoppingCartItem/").concat(e),i),ug=()=>{let n=(0,no.useQueryClient)();return(0,no.useMutation)("updateShoppingCartPayment",n=>{var e,i,t,o,l,r,d,a,u,s,c;let v=(0,h.f)("shoppingCart"),p=null==v?void 0:v.id,f=null==v?void 0:null===(o=v.cartItem)||void 0===o?void 0:null===(t=o[0])||void 0===t?void 0:null===(i=t.internet)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.id,g=null==v?void 0:null===(s=v.cartItem)||void 0===s?void 0:null===(u=s[0])||void 0===u?void 0:null===(a=u.internet)||void 0===a?void 0:null===(d=a[0])||void 0===d?void 0:null===(r=d.itemPrice)||void 0===r?void 0:null===(l=r.find(n=>(null==n?void 0:n.type)==="activation"))||void 0===l?void 0:l.installmentInfo;return uf(p,f,[{op:"replace",productType:"containedProduct",productId:null==g?void 0:null===(c=g.installmentExtention)||void 0===c?void 0:c.productID,productCharecteristic:[{id:null==g?void 0:g.installmentCharacteristicId,value:n?"0":"24"}]}])},{onSuccess:e=>{localStorage.setItem("shoppingCart",JSON.stringify(e)),n.setQueryData("shoppingCart",e)},onError:e=>{tX.K.error("ERROR - updateShoppingCartActivationCost: ",e),n.setQueryData("shoppingCart",(0,tq.n)("updateShoppingCartActivationCost",e)),localStorage.setItem("shoppingCart",JSON.stringify((0,tq.n)("updateShoppingCartActivationCost",e)))}})},um=()=>{var n,e,i,t,o,l;let r=(0,nl.lS)(),d=null==r?void 0:null===(n=r.options)||void 0===n?void 0:n.find(n=>"0"==n.id),a=null==r?void 0:null===(e=r.options)||void 0===e?void 0:e.find(n=>"24"==n.id),{installmentPrice:u}=d||{},{installmentPrice:s}=a||{};return{oneTimeCost:(null==u?void 0:null===(t=u.find(n=>n.type===b.MM.ONE_TIME))||void 0===t?void 0:null===(i=t.originalprice)||void 0===i?void 0:i.taxIncludedAmount)||0,recurringMonths:24,recurringCost:(null==s?void 0:null===(l=s.find(n=>n.type===b.MM.RECURRING))||void 0===l?void 0:null===(o=l.originalprice)||void 0===o?void 0:o.taxIncludedAmount)||0}},uh=n=>{var e,i,t,o,l,r,d,a,u,s,c,v;let p=um();return{...n,checkoutFWA:{...n.checkoutFWA,title:null==n?void 0:null===(l=n.checkoutFWA)||void 0===l?void 0:null===(o=l.title)||void 0===o?void 0:null===(t=o.replace("$MONTHLY","".concat((null==p?void 0:p.recurringMonths)||"")))||void 0===t?void 0:null===(e=t.replace("$ONETIME","".concat((null==p?void 0:null===(i=p.oneTimeCost)||void 0===i?void 0:i.toString())||"")))||void 0===e?void 0:e.replace("$PAYMENTS","".concat((null==p?void 0:p.recurringCost)||"")),description:null==n?void 0:null===(s=n.checkoutFWA)||void 0===s?void 0:null===(u=s.description)||void 0===u?void 0:null===(a=u.replace("$MONTHLY","".concat((null==p?void 0:p.recurringMonths)||"")))||void 0===a?void 0:null===(r=a.replace("$ONETIME","".concat((null==p?void 0:null===(d=p.oneTimeCost)||void 0===d?void 0:d.toString())||"")))||void 0===r?void 0:r.replace("$PAYMENTS","".concat((null==p?void 0:p.recurringCost)||"")),items:null==n?void 0:null===(v=n.checkoutFWA)||void 0===v?void 0:null===(c=v.items)||void 0===c?void 0:c.map(n=>{var e,i,t,o,l,r,d,a;return{...n,title:null===(o=n.title)||void 0===o?void 0:null===(t=o.replace("$MONTHLY","".concat((null==p?void 0:p.recurringMonths)||"")))||void 0===t?void 0:null===(e=t.replace("$ONETIME","".concat((null==p?void 0:null===(i=p.oneTimeCost)||void 0===i?void 0:i.toString())||"")))||void 0===e?void 0:e.replace("$PAYMENTS","".concat((null==p?void 0:p.recurringCost)||"")),description:null===(a=n.description)||void 0===a?void 0:null===(d=a.replace("$MONTHLY","".concat((null==p?void 0:p.recurringMonths)||"")))||void 0===d?void 0:null===(l=d.replace("$ONETIME","".concat((null==p?void 0:null===(r=p.oneTimeCost)||void 0===r?void 0:r.toString())||"")))||void 0===l?void 0:l.replace("$PAYMENTS","".concat((null==p?void 0:p.recurringCost)||""))}})}}},uy=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("upfront payment","fixed",n),{trackView:i}=(0,lF.rS)({event:["checkout_step8.1"],event_label:"upfront payment choice",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,lF.kg)(i,"upfront payment"),(0,lF.qH)(i),null});var ub=i(34133);let uC=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h;return{title:(null==n?void 0:null===(e=n.paymentsmobile)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(t=n.paymentsmobile)||void 0===t?void 0:null===(i=t.userRegistered)||void 0===i?void 0:i.description)||"",buttonLabel:(null==n?void 0:null===(l=n.paymentsmobile)||void 0===l?void 0:null===(o=l.userRegistered)||void 0===o?void 0:o.changeLabel)||"",yourIbanTitle:(null==n?void 0:null===(d=n.paymentsmobile)||void 0===d?void 0:null===(r=d.paymentMethod)||void 0===r?void 0:r.titleIban)||"",yourCredit
1CardTitle:(null==n?void 0:null===(u=n.paymentsmobile)||void 0===u?void 0:null===(a=u.paymentMethod)||void 0===a?void 0:a.titleCard)||"",yourDebitCardTitle:(null==n?void 0:null===(c=n.paymentsmobile)||void 0===c?void 0:null===(s=c.paymentMethod)||void 0===s?void 0:s.titleDebitCard)||"",yourPrepaidCardTitle:(null==n?void 0:null===(p=n.paymentsmobile)||void 0===p?void 0:null===(v=p.paymentMethod)||void 0===v?void 0:v.titlePrepaidCard)||"",yourPaypalTitle:(null==n?void 0:null===(g=n.paymentsmobile)||void 0===g?void 0:null===(f=g.paymentMethod)||void 0===f?void 0:f.titlePaypal)||"",expirationLabelTitle:(null==n?void 0:null===(h=n.paymentsmobile)||void 0===h?void 0:null===(m=h.paymentMethod)||void 0===m?void 0:m.expirationLabel)||""}},uE=n=>{var e,i,t,o,l,r,d,a,u,s;return{titlePaymentError:(null==n?void 0:null===(i=n.paymentsmobile)||void 0===i?void 0:null===(e=i.paymentSelectionError)||void 0===e?void 0:e.title)||"",messagePaymentError:(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:null===(t=o.paymentSelectionError)||void 0===t?void 0:t.description)||"",messageSelectedPaymentError:(null==n?void 0:null===(d=n.paymentsmobile)||void 0===d?void 0:null===(r=d.paymentError)||void 0===r?void 0:null===(l=r.notFound)||void 0===l?void 0:l.message)||"Siamo spiacenti ma si \xe8 verificato un errore sulla scelta del nuovo metodo di pagamento. Riprovare in seguito.",titleSelectedPaymentError:(null==n?void 0:null===(s=n.paymentsmobile)||void 0===s?void 0:null===(u=s.paymentError)||void 0===u?void 0:null===(a=u.notFound)||void 0===a?void 0:a.title)||"Ops!"}},uS=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("payment method pre-filled","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step9.0"],event_label:"payment method pre-filled",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i,"payment method pre-filled"),(0,nt.q)(i),null});var ux=i(89131);let uI=(n,e)=>{var i,t,o,l,r,d,a,u,s,c;return{titleCms:(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.clientRecognition)||void 0===i?void 0:i.title)||"",descriptionCms:(null==n?void 0:null===(l=n.personalinfo)||void 0===l?void 0:null===(o=l.clientRecognition)||void 0===o?void 0:o.description)||"",placeholderCms:(null==n?void 0:null===(d=n.personalinfo)||void 0===d?void 0:null===(r=d.selectInput)||void 0===r?void 0:r.contactPlaceholder)||"",ctaLabelCms:(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.clientRecognition)||void 0===a?void 0:a.codeNotAccessLabel)||"",ctaUrl:(null==n?void 0:null===(c=n.personalinfo)||void 0===c?void 0:null===(s=c.clientRecognition)||void 0===s?void 0:s.contactNotAccessUrl)||(null==e?void 0:e.urlClickToCallOtp)||""}},uA=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("confirm id","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step1.1"],event_label:"verify id",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nN.kg)(i,"verify id"),(0,nt.q)(i),null});var u_=n=>{var e,i,t,o;let{handleOnChangeEnableGoNext:l,else:r}=n,d=(0,no.useQueryClient)(),{descriptionCms:a,placeholderCms:u,titleCms:s,ctaLabelCms:c,ctaUrl:v}=uI((0,iO.C)(iO.J,eM.b.CMS_GET_PERSONAL_DATA),null==r?void 0:r.product),p={getSelectedData:n=>{var e;null==r||r.setFindCaller({...r.findcaller,selectedContactMedium:(null===(e=n.field)||void 0===e?void 0:e.trim())?n:void 0})},identityTypeItems:[(null==r?void 0:null===(i=r.findCaller)||void 0===i?void 0:null===(e=i.individualRef)||void 0===e?void 0:e.email)||"",(null==r?void 0:null===(o=r.findCaller)||void 0===o?void 0:null===(t=o.individualRef)||void 0===t?void 0:t.msisdn)||""],title:s,description:a,placeholder:u,cta:{label:c,url:v,action:()=>{var n,e;(null==r?void 0:null===(n=r.product)||void 0===n?void 0:n.urlClickToCallOtp)?((0,iL.d)("verify id:".concat(null==c?void 0:c.toLowerCase())),(0,iL.x)(d,null==r?void 0:null===(e=r.product)||void 0===e?void 0:e.urlClickToCallOtp,null==r?void 0:r.product)):v&&((0,iL.d)("verify id:".concat(null==c?void 0:c.toLowerCase())),window.location.href=v)}}};return(0,g.useEffect)(()=>
1{if(l){var n,e,i,t;l(!!((null==r?void 0:null===(e=r.findCaller)||void 0===e?void 0:null===(n=e.selectedContactMedium)||void 0===n?void 0:n.field)&&(null==r?void 0:null===(t=r.findCaller)||void 0===t?void 0:null===(i=t.selectedContactMedium)||void 0===i?void 0:i.fieldType)))}},[null==r?void 0:r.findCaller.selectedContactMedium]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(uA,{}),(0,m.jsx)(iR.Z,{data:p})]})};let uT={margins:[60,30],tabletMargins:[32,15],groups:[{heights:60,marginBottom:32},{heights:60,marginBottom:15},{heights:75,repeat:4,gap:15}]};function uN(){let n=(0,N._)(["\n padding-top: 3.75rem;\n width: 85%;\n margin: 0 auto;\n"]);return uN=function(){return n},n}let uL=L.Z.div(uN()),uO=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,id.YZ)(),i=(0,nl.De)("portability","fixed",n),{trackView:t}=(0,nt.r)({event:["checkout_step4"],event_label:"portability",opts:i.opts,cartProduct:{...i.trackingProduct,cart_total:(null==e?void 0:e.price)&&(0,nR.F)(e.price)},pageProduct:null==i?void 0:i.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(t),(0,nN.kg)(t,"portability"),null});var uR=i(11752);let uD=n=>{var e,i,t,o,l,r;let d=null==n?void 0:null===(e=n.portability)||void 0===e?void 0:e.activationFixedLine;return{cardData:{title:(null==d?void 0:d.title)||"",items:[{title:(null==d?void 0:null===(i=d.choice)||void 0===i?void 0:i.option1)||"",value:"yes"},{title:(null==d?void 0:null===(t=d.choice)||void 0===t?void 0:t.option2)||"",value:"internetOnly"},{title:(null==d?void 0:null===(o=d.choice)||void 0===o?void 0:o.option3)||"",value:"no"}]},errorOnPortability:{erroMessage:{genericError:{title:(null==n?void 0:null===(r=n.portability)||void 0===r?void 0:null===(l=r.errorOnPortability)||void 0===l?void 0:l.message)||""}}}}},uM=n=>{var e;let{handleOnChangeEnableGoNext:i,handleOnClose:t}=n,{portability:o,lockInAppFlow:l,customerFlow:r,setPortability:d,setCurrentStepKey:a,setCheckoutStepState:u,setIsStartCustomerFlow:s}=(0,ne.Mg)(),[c,v]=(0,g.useState)((null==o?void 0:o.portabilityLine)?{title:"",value:(null==o?void 0:o.portabilityLine)||""}:void 0),p=null==r?void 0:null===(e=r.patchCustomer)||void 0===e?void 0:e.isLoading,{cardData:f}=uD((0,uR.CA)(uR.Jn,uR.bl.CMS_GET_PORTABILITY));return(0,g.useEffect)(()=>{let n=document.getElementById("sticky-offer-next"),e=()=>{let n;n=(null==c?void 0:c.value)==="yes"?"yes with phone":(null==c?void 0:c.value)==="internetOnly"?"yes internet only":"no portability",(0,nN.Fk)({event_name:"ui_interaction",event_label_track:n,event_category:"users",event_action:"click",tracking_type:"link"})};return null==i||i(!!c),null==n||n.addEventListener("click",e),()=>{null==n||n.removeEventListener("click",e)}},[c]),(0,g.useEffect)(()=>{(0,nj.f)("startCustomerFlow")&&(s(!0),localStorage.removeItem("startCustomerFlow"))},[]),(0,g.useEffect)(()=>{let n=document.getElementById("back-button"),e=()=>{var n;null==l||null===(n=l.resetLockInAppFlow)||void 0===n||n.call(l),null==t||t()};return null==n||n.addEventListener("click",e),a(ni.Bf.PORTABILITY_LINE_APP),u(ni.v9.PORTABILITY_LINE_APP_CARD,{}),()=>{null==n||n.removeEventListener("click",e)}},[]),{cardData:f,selectedItem:c,portability:o,isLoading:p,setSelectedItem:v,handleSelect:n=>{d({...o,portabilityLine:(null==n?void 0:n.value)||"",portabilityWant:!1}),localStorage.setItem("portability",(null==n?void 0:n.value)==="yes"?"1":"0")}}};var uP=i(63514),uw=i(87574);let uk=n=>{var e;let i=null==n?void 0:null===(e=n.owningIndividual)||void 0===e?void 0:e.contactMedium;if(i&&i.length>0){let n=i.find(n=>"email"===n.type),e=i.find(n=>"phone"===n.type);(null==n?void 0:n.emailAddress)?localStorage.setItem(ia.e,n.emailAddress):localStorage.removeItem(ia.e),(null==e?void 0:e.phoneNumber)?localStorage.setItem(ia.j,e.phoneNumber):localStorage.removeItem(ia.j)}},uj=n=>{let e=n.toString(),i=e.substring(0,4),t=e.substring(5,7);return e.substring(8).concat("/",t,"/",i)},uB=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y;return _.object({phoneNumber:_.string().required((null==n?void 0:null===(t=n.coveragetool)||void 0===t?void 0:null===(i=t.validationMessage)||void 0===i?void 0:null===(e=i.phoneNumber)||void 0===e?void 0:e.required)||"").min(9,(null==n?void 0:null===(r=n.coveragetool)||void 0===r?void 0:null===(l=r.validationMessage)||void 0===l?void 0:null===(o=l.phoneNumber)||void 0===o?void 0:o.maximum)||"").max(10,(null==n?void 0:null===(u=n.coveragetool)||void 0===u?void 0:null===(a=u.validationMessage)||void 0===a?void 0:null===(d=a.phoneNumber)||void 0===d?void 0:d.minimum)||"").matches(/^(3)+[0-9]*$/,(null==n?void 0:null===(v=n.coveragetool)||void 0===v?void 0:null===(c=v.validationMessage)||void 0===c?void 0:null===(s=c.phoneNumber)||void 0===s?void 0:s.matches)||""),emailAddress:_.string().required((null==n?void 0:null===(g=n.coveragetool)||void 0===g?void 0:null===(f=g.validationMessage)||void 0===f?void 0:null===(p=f.emailAddress)||void 0===p?void 0:p.required)||"").email((null==n?void 0:null===(y=n.coveragetool)||void 0===y?void 0:null===(h=y.validationMessage)||void 0===h?void 0:null===(m=h.emailAddress)||void 0===m?void 0:m.email)||"")})};function uF(){let n=(0,N._)(["\n width: 366px;\n "]);return uF=function(){return n},n}function uz(){let n=(0,N._)(["\n width: 406px;\n "]);return uz=function(){return n},n}function uZ(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n\n ","\n\n ","\n"]);return uZ=function(){return n},n}function uH(){let n=(0,N._)(["\n padding: 3.75rem 0 1rem;\n font-size: ",";\n line-height: 1.238;\n "]);return uH=function(){return n},n}function uV(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return uV=function(){return n},n}function uU(){let n=(0,N._)(["\n padding: 2rem 0 1rem;\n font-family: ",";\n text-align: center;\n font-weight: ",";\n font-size: ",";\n line-height: 1.267;\n\n ","\n\n ","\n"]);return uU=function(){return n},n}function uQ(){let n=(0,N._)(["\n line-height: 1.5;\n "]);return uQ=function(){return n},n}function uG(){let n=(0,N._)(["\n margin-bottom: 40px;\n "]);return uG=function(){return n},n}function uY(){let n=(0,N._)(["\n font-family: ",";\n font-style: normal;\n margin-top: ",";\n margin-bottom: ",";\n text-align: center;\n font-weight: ",";\n font-size: ",";\n line-height: 1.3;\n\n ","\n\n ","\n"]);return uY=function(){return n},n}function uW(){let n=(0,N._)(["\n gap: 20px;\n "]);return uW=function(){return n},n}function uJ(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n }\n\n gap: ",";\n\n ","\n"]);return uJ=function(){return n},n}function uX(){let n=(0,N._)(["\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n font-size: ",";\n line-height: 1.286;\n margin-top: ",";\n margin-bottom: ",";\n display: flex;\n flex-direction: row;\n"]);return uX=function(){return n},n}function uq(){let n=(0,N._)(["\n width: fit-content;\n text-align: start;\n"]);return uq=function(){return n},n}function uK(){let n=(0,N._)(["\n display: flex;\n width: 25px;\n margin-right: 10px;\n"]);return uK=function(){return n},n}function u$(){let n=(0,N._)(["\n input {\n position: absolute;\n margin: 0 auto;\n opacity: 0;\n cursor: pointer;\n height: 20px;
1\n width: 20px;\n z-index: 3;\n }\n\n .checkmark::after {\n left: 7px;\n top: 3px;\n width: 5px;\n height: 10px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n content: '';\n position: absolute;\n display: none;\n }\n\n .checkmark {\n position: absolute;\n height: 1.25rem;\n width: 1.25rem;\n border-radius: ",";\n border: "," solid ",";\n }\n\n &:hover input ~ .checkmark {\n border: "," solid ",";\n }\n\n input:checked ~ .checkmark {\n background-color: ",";\n border: none;\n }\n\n input:checked ~ .checkmark::after {\n display: block;\n }\n"]);return u$=function(){return n},n}function u0(){let n=(0,N._)(["\n gap: 28px;\n margin-bottom: 4px;\n "]);return u0=function(){return n},n}function u1(){let n=(0,N._)(["\n margin-bottom: 12px;\n "]);return u1=function(){return n},n}function u2(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ",";\n\n ","\n\n ","\n"]);return u2=function(){return n},n}function u9(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return u9=function(){return n},n}function u3(){let n=(0,N._)(["\n text-align: left;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n p {\n margin: 0 0 8px;\n color: ",";\n }\n\n div {\n justify-content: flex-start;\n }\n"]);return u3=function(){return n},n}(l=c||(c={})).ERROR="error",l.ADD="add",l.EDIT="edit",(r=v||(v={})).EMAIL="email",r.MSISDN="phone";let u4=L.Z.div(uZ(),ek.BC.tablet(uF()),ek.BC.desktop(uz())),u6=L.Z.div(uU(),ek.rS.typography.fontFamily.primary,ek.rS.typography.fontWeight.bold,ek.rS.typography.fontSize.h3,ek.BC.tablet(uH(),ek.rS.typography.fontSize.h1),ek.BC.desktop(uV(),ek.rS.typography.fontSize.h2)),u5=L.Z.div(uY(),ek.rS.typography.fontFamily.primary,ek.rS.spacing.md,ek.rS.spacing.xl,ek.rS.typography.fontWeight.regular,ek.rS.typography.fontSize.h6,ek.BC.tablet(uQ()),ek.BC.desktop(uG())),u7=L.Z.div(uJ(),ek.rS.spacing.md,ek.BC.tablet(uW())),u8=L.Z.div(uX(),ek.rS.typography.fontFamily.primary,ek.rS.typography.fontWeight.regular,ek.rS.typography.fontSize.body3,ek.rS.spacing.xl,ek.rS.spacing.xl),sn=L.Z.div(uq()),se=L.Z.div(uK()),si=L.Z.div(u$(),ek.rS.radius.sm,ek.rS.borderWidth.thin,ek.rS.colors.border.default,ek.rS.borderWidth.thin,ek.rS.colors.border.default,ek.DH.cyanDark),st=L.Z.div(u2(),ek.rS.spacing.lg,ek.BC.tablet(u0()),ek.BC.desktop(u1())),so=L.Z.div(u3(),ek.rS.typography.fontFamily.primary,ek.rS.typography.fontWeight.bold,ek.rS.typography.fontSize.body1,ek.rS.typography.lineHeight.display1,ek.BC.tablet(u9(),ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.body1),ek.DH.cyanDark),sl={roSubtitle:"Ecco un riepilogo dei tuoi contatti personali per essere ricontattato al telefono e per ricevere via mail le comunicazioni sullâattivazione. Verifica che siano corretti o modificali prima di proseguire.",roTelephoneLable:"Il tuo numero di telefono",roEmailLable:"Il tuo indirizzo email",roCtaTelephone:"Modifica numero",roCtaEmail:"Modifica email"},sr=n=>{var e,i,t,o,l,r,d,a,u,s;return{title:(null==n?void 0:null===(i=n.personalinfo)||void 0===i?void 0:null===(e=i.clientRegistered)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(o=n.personalinfo)||void 0===o?void 0:null===(t=o.generalInfo)||void 0===t?void 0:t.subtitle)||"",telephoneLable:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.selectInput)||void 0===l?void 0:l.telephone)||"",emailLable:(null==n?void 0:null===(a=n.personalinfo)||void 0===a?void 0:null===(d=a.selectInput)||void 0===d?void 0:d.email)||"",footerInfo:(null==n?void 0:null===(s=n.personalinfo)||void 0===s?void 0:null===(u=s.clientRegistered)||void 0===u?void 0:u.smallInfo)||""}},sd=n=>{switch(n){case"CRM-0020":case"CRM-0024":return ii.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT;case"CRM-0021":case"CRM-0023":return ii.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT;case"CRM-0022":case"CRM-0025":return ii.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT;default:return""}},sa=(n,e,i)=>{var t,o;let l=e.find(e=>e.error===n),r=(null==i?void 0:i.genericerror)||null;return{title:(null==l?void 0:l.title)||(null==r?void 0:r.title)||"",message:(null==l?void 0:l.message)||(null==r?void 0:r.description)||"",actionText:(null==l?void 0:null===(t=l.button)||void 0===t?void 0:t.t
1itle)||(null==r?void 0:r.buttonLabel)||"",url:(null==l?void 0:null===(o=l.button)||void 0===o?void 0:o.urlForRedirect)||""}};var su=n=>{var e,i,t,o,l,r;let{data:d,onChangeData:a,checkInfo:u,onChangeCheck:s,isReadOnly:p,setIsValidForm:f}=n,h=(0,no.useQueryClient)(),{owningIndividual:E}=d,I=(0,y.CA)(y.Jn,eM.b.CMS_GET_PERSONAL_DATA),A=(0,y.CA)(y.Jn,eM.b.CMS_GET_COVERAGE_TOOL_CONFIG),{currentStepKey:_,checkoutErrors:T,isModalButtonSticky:N,findCaller:L,setOwningData:O}=(0,ne.Mg)(),{isError:R,error:D,mutateAsync:M}=(0,eD.n)(),[P,w]=(0,g.useState)({isOpen:!1,type:v.EMAIL,operationType:c.EDIT}),[k,j]=(0,g.useState)({email:-2,phone:-2}),[B,F]=(0,g.useState)(!1),{register:z,getValues:Z,setValue:H,formState:{isValid:V,errors:U}}=(0,C.cI)({resolver:(0,x.X)(uB(A)),mode:"onChange"}),Q=(n,e,i)=>{var t,o;if(!E.contactMedium)return;null==E||E.contactMedium.push(n===v.EMAIL?{type:n,preferred:i,emailAddress:e}:{type:n,preferred:i,phoneNumber:e});let l=(null!==(o=null==E?void 0:null===(t=E.contactMedium)||void 0===t?void 0:t.length)&&void 0!==o?o:0)-1;n===v.EMAIL?k.email=l:k.phone=l,j(k),O({...d,owningIndividual:E})},G=n=>{let e=-2;return(null==E?void 0:E.contactMedium)&&-1===(e=null==E?void 0:E.contactMedium.findIndex(e=>e.type===n&&e.preferred))&&-1===(e=null==E?void 0:E.contactMedium.findIndex(e=>e.type===n))&&Q(n,"",!0),e},Y=()=>{var n,e,i,t;let o=G(v.EMAIL),l=G(v.MSISDN),r=(null==E?void 0:null===(e=E.contactMedium)||void 0===e?void 0:null===(n=e[o])||void 0===n?void 0:n.emailAddress)||"",d=(null==E?void 0:null===(t=E.contactMedium)||void 0===t?void 0:null===(i=t[l])||void 0===i?void 0:i.phoneNumber)||"";-1!==o&&(k.email=o,H("emailAddress",r,{shouldValidate:""!==r})),-1!==l&&(k.phone=l,H("phoneNumber",d,{shouldValidate:""!==d})),j(k)};(0,g.useEffect)(()=>{if(d.isLogged||d.isValid){let n=()=>{var n,e;let{owningIndividual:i}=d,t=null==i?void 0:null===(n=i.contactMedium)||void 0===n?void 0:n.find(n=>n.type===v.MSISDN),o=null==i?void 0:null===(e=i.contactMedium)||void 0===e?void 0:e.find(n=>n.type===v.EMAIL);return!!((null==t?void 0:t.phoneNumber)&&(null==o?void 0:o.emailAddress)&&"3"===t.phoneNumber.substring(0,1))};setTimeout(()=>{a&&a({...d,owningIndividual:E},n())},250)}},[]),(0,g.useEffect)(()=>{Y(),a&&a({...d,owningIndividual:E},V)},[V,E]);let W=(0,y.CA)(y.Jn,eM.b.CMS_GET_GENERIC_ERROR),{errorcomponent:J}=(0,y.CA)(y.Jn,eM.b.CMS_GET_CUSTOMER_ERROR_FIXED)||{},X=(0,id.YZ)();(0,g.useEffect)(()=>{if(R&&P.operationType!==c.ERROR){var n,e,i;let t=sa(sd((null===(n=D.headers)||void 0===n?void 0:n.get("ERR-backendErrorCode"))||""),(null==J?void 0:J.errors)||[],W);null==T||null===(i=T.showAndTrackError)||void 0===i||i.call(T,W,()=>{},(0,b.nQ)("patchCustomer",D,nM.S.PATCH_CUSTOMER),null==t?void 0:t.title,null==t?void 0:t.message,()=>{},(null==t?void 0:t.actionText)||"",()=>{var n;return(0,eO.x)(h,(null==X?void 0:null===(n=X.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",X,()=>{},_,(0,b.nQ)("patchCustomer",D,nM.S.PATCH_CUSTOMER))},(null==X?void 0:null===(e=X.genericErrorCallMeNow)||void 0===e?void 0:e.label)||"",N,!0)}},[R]),(0,g.useEffect)(()=>{null==f||f(V)},[V]);let{footerInfo:q,subtitle:K,title:$,telephoneLable:nn,emailLable:ni}=sr(I),nt=()=>{w({isOpen:!1,operationType:c.EDIT,type:v.EMAIL})},nl=n=>{F(!0),M([{updatedValue:n.value,type:"number",operation:"replace",index:1}]).then(()=>{(null==E?void 0:E.contactMedium)&&(null==E||E.contactMedium.forEach((e,i)=>{var t;e.type===v.MSISDN&&(null==E?void 0:null===(t=E.contactMedium)||void 0===t?void 0:t[i])&&(E.contactMedium[i].phoneNumber=n.value)}));let e={...d,owningIndividual:E};O({...e}),iu({...e}),F(!1),nt()}).catch(n=>{F(!1),eO.K.debug(n)})},nr=()=>{var n;return null===(n=L.subscription)||void 0===n?void 0:n.filter(n=>"M"===n.serviceType).map(n=>({type:"phone",preferred:!1,phoneNumber:n.msisdn}))},nd=()=>{var n;return!(!nr()||nr()&&(null===(n=nr())||void 0===n?void 0:n.length)===0)},na=(n,e)=>{w({isOpen:!0,type:n,operationType:e})},nu=()=>{let n=Z();(null==E?void 0:E.contactMedium)&&(E.contactMedium[k.email].emailAddress=n.emailAddress,E.contactMedium[k.phone].phoneNumber=n.phoneNumber),a&&a({...d,owningIndividual:E},V)},ns=n=>{" "===n.key&&n.preventDefault()};return(0,m.jsxs)(u4,{children:[(0,m.jsx)(u6,{children:$}),(0,m.jsx)(u5,{children:p?sl.roSubtitle:K}),p?(0,m.jsxs)(st,{children:[(0,m.jsxs)(so,{children:[sl.roTelephoneLable,(0,m.jsx)("p",{children:(null==E?void 0:E.
1contactMedium)&&-2!==k.phone?null==E?void 0:null===(t=E.contactMedium[k.phone])||void 0===t?void 0:t.phoneNumber:""}),(0,m.jsx)(eP.Z,{onClick:()=>na(v.MSISDN,nd()?c.ADD:c.EDIT),text:sl.roCtaTelephone})]}),(0,m.jsxs)(so,{children:[sl.roEmailLable,(0,m.jsx)("p",{children:(null==E?void 0:E.contactMedium)&&-2!==k.email?null==E?void 0:null===(o=E.contactMedium[k.email])||void 0===o?void 0:o.emailAddress:""}),(0,m.jsx)(eP.Z,{onClick:()=>na(v.EMAIL,c.EDIT),text:sl.roCtaEmail})]})]}):(0,m.jsxs)(u7,{children:[(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{label:nn,error:null===(l=U.phoneNumber)||void 0===l?void 0:l.message,autoComplete:"off",placeholder:" ",...z("phoneNumber",{onChange:nu})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{label:ni,type:"email",error:null===(r=U.emailAddress)||void 0===r?void 0:r.message,autoComplete:"off",placeholder:" ",onKeyDown:n=>ns(n),...z("emailAddress",{onChange:n=>{H("emailAddress",n.target.value.replace(/\s+/g,"")),null==nu||nu()}})})})]}),(0,m.jsxs)(u8,{children:[(0,m.jsx)(se,{children:(0,m.jsxs)(si,{children:[(0,m.jsx)("input",{type:"checkbox",checked:u.checkContactProblem,onChange:()=>{s({checkContactProblem:!(null==u?void 0:u.checkContactProblem)})}}),(0,m.jsx)("span",{className:"checkmark"})]})}),(0,m.jsx)(sn,{children:q})]}),(0,m.jsx)(ic.Z,{isOpen:P.isOpen&&P.operationType===c.ADD,handleClose:nt,children:(0,m.jsxs)(m.Fragment,{children:[B&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.E,{onChangeNumber:nl,isLoading:B,data:nr(),selectedNumber:(null==E?void 0:null===(i=E.contactMedium)||void 0===i?void 0:null===(e=i[1])||void 0===e?void 0:e.phoneNumber)||""})]})}),(0,m.jsx)(ic.Z,{isOpen:P.isOpen&&P.operationType===c.EDIT,handleClose:nt,children:(0,m.jsxs)(m.Fragment,{children:[B&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.B,{isLoading:B,onSubmit:n=>{n.phoneNumber?nl({title:"",value:n.phoneNumber}):(F(!0),M([{updatedValue:n.email,type:"email",operation:"replace",index:0}]).then(()=>{(null==E?void 0:E.contactMedium)&&(E.contactMedium[k.email].emailAddress=n.email);let e={...d,owningIndividual:E};O({...e}),iu({...e}),F(!1),nt()}).catch(n=>{F(!1),eO.K.debug(n)}))},handleClose:nt,isPhone:P.type===v.MSISDN})]})})]})};let ss=n=>{var e,i,t,o,l,r,d,a,u,s;let{handleOnClose:c}=n,{currentStepKey:v,product:p,customerFlow:f,customerAsyncInfo:m,owningData:h,checkoutErrors:C,isModalButtonSticky:E,lockInFlow:S,setIsStartCustomerFlow:x,setIsStartLockInFlow:I,setCustomerId:A,setOwningData:_,setFindCaller:T}=(0,ne.Mg)(),N=(0,nj.f)("findCaller"),L=(0,no.useQueryClient)(),O=(0,nj.f)("getCountry"),{isSuccess:R,isLoading:D,isError:M,error:P}=(0,nP.O)(),{associateCustomer:w}=f,k=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),{errorcomponent:{errors:j}}=(0,y.CA)(y.Jn,iy.bl.CMS_GET_ORDER_ERROR),B=null==j?void 0:j.find(n=>(null==n?void 0:n.error)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED),F=(null==S?void 0:null===(e=S.campaigns)||void 0===e?void 0:e.isLoading)||(null==S?void 0:null===(i=S.accept)||void 0===i?void 0:i.isLoading)||(null==S?void 0:null===(t=S.shoppingCart)||void 0===t?void 0:t.isLoading)||(null==S?void 0:null===(o=S.associateCustomer)||void 0===o?void 0:o.isLoading),z=D||!R||!(0,b.Wy)()&&!w.isSuccess,Z=(null==S?void 0:null===(l=S.campaigns)||void 0===l?void 0:l.isError)||(null==S?void 0:null===(r=S.accept)||void 0===r?void 0:r.isError)||(null==S?void 0:null===(d=S.shoppingCart)||void 0===d?void 0:d.isError)||(null==S?void 0:null===(a=S.associateCustomer)||void 0===a?void 0:a.isError),H=(null==f?void 0:null===(u=f.findcaller)||void 0===u?void 0:u.isError)||(null==f?void 0:null===(s=f.associateCustomer)||void 0===s?void 0:s.isError),V=()=>{if(w.isSuccess||w.isError||M){var n,e,i,t,o,l,r,d,a,u,s,g,h,y;if(T({...N,...(null==f?void 0:null===(e=f.findcaller)||void 0===e?void 0:null===(n=e.data)||void 0===n?void 0:n.paymean)&&{paymean:null==f?void 0:null===(t=f.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.paymean},showOtp:!1,verifyOtp:"",isVerified:!0}),w.isError&&(null===(l=w.error)||void 0===l?void 0:null===(o=l.error)||void 0===o?void 0:o.statusText)===nM.S.ASSOCIATE_CUSTOMER_BLOCKED){let n=()=>{c&&((0,ib.u)(L),c())},e=()=>{var n,e,i;(null==B?void 0:null===(n=B.button)||void 0===n?void 0:n.urlForRedirect)?(0,nk.x)(L,null==B?void 0:null===(e=B.button)||void 0===e?void 0:e.urlForRedirect,p,()=>{c&&((0,ib.u)(L),c())},v,(0,b.nQ)("associateCustomer",null===(i=w.error)||void 0===i?void 0:i.error,nM.S.ASSOCIATE_CUSTOMER_BLOCKED)):c&&((0,ib.u)(L),c())};null==C||null===(a=C.showAndTrackError)||void 0===a||a.call(C,k,()=>n(),w.error,(null==B?void 0:B.title)||"Attenzione",(null==B?void 0:B.message)||"I seguenti articoli non sono attivabili dal cliente selezionato",()=>e(),(null==B?void 0:null===(r=B.button)||void 0===r?void 0:r.title)||"Ti richiamiamo",()=>{var e,i;return(0,nk.x)(L,(null==p?void 0:null===(e=p.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",p,n,v,(0,b.nQ)("associateCustomer",null===(i=w.error)||void 0===i?void 0:i.error,nM.S.ASSOCIATE_CUSTOMER_BLOCKED))},null==p?void 0:null===(d=p.genericErrorCallMeNow)||void 0===d?void 0:d.label,E)}else if(w.isError||M){let n;w.isError&&(null==m?void 0:null===(u=m.customerInfo)||void 0===u?void 0:u.isError)&&(n=null==m?void 0:null===(y=m.customerInfo)||void 0===y?void 0:y.error),M&&P&&(n=(0,b.nQ)(nM.S.REFERENCE_CUSTOMER,P)),null==C||null===(h=C.showAndTrackError)||void 0===h||h.
1call(C,k,c,{...n,isBlocking:!0},"","",c,(null==k?void 0:null===(s=k.genericerror)||void 0===s?void 0:s.buttonLabel)||"",()=>{var e;return(0,nk.x)(L,(null==p?void 0:null===(e=p.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",p,c,v,n)},null==p?void 0:null===(g=p.genericErrorCallMeNow)||void 0===g?void 0:g.label,E)}}},U=()=>{let n=(0,b.AQ)();return(0,b.Wy)()&&n===b.xx.NEXT_USER_ACTIVE},Q=()=>{var n,e,i,t,o,l;let r=(null==S?void 0:null===(n=S.campaigns)||void 0===n?void 0:n.error)||(null==S?void 0:null===(e=S.accept)||void 0===e?void 0:e.error)||(null==S?void 0:null===(i=S.shoppingCart)||void 0===i?void 0:i.error)||(null==S?void 0:null===(t=S.associateCustomer)||void 0===t?void 0:t.error);null==C||null===(l=C.showAndTrackError)||void 0===l||l.call(C,k,()=>{var n;null==S||null===(n=S.resetLockInFlow)||void 0===n||n.call(S),null==c||c()},{...r,isBlocking:!0},void 0,void 0,()=>{var n;null==S||null===(n=S.resetLockInFlow)||void 0===n||n.call(S),null==c||c()},(null==k?void 0:null===(o=k.genericerror)||void 0===o?void 0:o.buttonLabel)||"Chiudi")},G=()=>{var n,e,i,t;let o=(null==f?void 0:null===(n=f.findcaller)||void 0===n?void 0:n.error)||(null==f?void 0:null===(e=f.associateCustomer)||void 0===e?void 0:e.error);null==C||null===(t=C.showAndTrackError)||void 0===t||t.call(C,k,()=>{var n;null==S||null===(n=S.resetLockInFlow)||void 0===n||n.call(S),null==c||c()},{...o,isBlocking:!0},void 0,void 0,()=>{var n;null==S||null===(n=S.resetLockInFlow)||void 0===n||n.call(S),null==c||c()},(null==k?void 0:null===(i=k.genericerror)||void 0===i?void 0:i.buttonLabel)||"Chiudi")};(0,g.useEffect)(()=>{if(V(),w.isSuccess){var n;let e=null===(n=m.customerInfo.data)||void 0===n?void 0:n[0];if(e){let n=(0,nl.Vp)(e,O);_({...h,owningIndividual:{...h.owningIndividual,...n}}),A(e.id)}}},[w,M,m]),(0,g.useEffect)(()=>{Z&&Q()},[Z]),(0,g.useEffect)(()=>{H&&G()},[H]);let Y=()=>{var n,e,i,t,o,l,r,d,a,u,s,c,v,p,f;let g=(0,nj.f)("customerData");T({...N,showOtp:!1}),_({...h,isValid:!0,owningIndividual:{firstName:null==g?void 0:null===(e=g[0])||void 0===e?void 0:null===(n=e.owningIndividual)||void 0===n?void 0:n.firstName,lastName:null==g?void 0:null===(t=g[0])||void 0===t?void 0:null===(i=t.owningIndividual)||void 0===i?void 0:i.lastName,contactMedium:(null==g?void 0:null===(l=g[0])||void 0===l?void 0:null===(o=l.owningIndividual)||void 0===o?void 0:o.contactMedium)||[],fiscalCode:(null==g?void 0:null===(d=g[0])||void 0===d?void 0:null===(r=d.owningIndividual)||void 0===r?void 0:r.fiscalCode)||"",nation:(null==g?void 0:null===(u=g[0])||void 0===u?void 0:null===(a=u.owningIndividual)||void 0===a?void 0:a.nation)||"",identification:null==g?void 0:null===(v=g[0])||void 0===v?void 0:null===(c=v.owningIndividual)||void 0===c?void 0:null===(s=c.identification)||void 0===s?void 0:s.map(n=>{let e=null==O?void 0:O.filter(e=>e.id===(null==n?void 0:n.nationality)),i="";return(null==n?void 0:n.identificationType)==="1"?i="Carta d'identit\xe0":(null==n?void 0:n.identificationType)==="2"?i="Passaporto":(null==n?void 0:n.identificationType)==="3"&&(i="Patente di guida"),{...n,identificationType:i,nationality:(null==e?void 0:e[0].displayName)||"",expirationDate:(null==n?void 0:n.expirationDate)?uj(n.expirationDate):""}})}}),U()?I(!0):((null==g?void 0:null===(p=g[0])||void 0===p?void 0:p.id)&&A(null==g?void 0:null===(f=g[0])||void 0===f?void 0:f.id),setTimeout(()=>{x(!0)},200))};return(0,g.useEffect)(()=>{R&&Y()},[R]),{isLoading:F||z}};function sc(){let n=(0,N._)(["\n width: 366px;\n "]);return sc=function(){return n},n}function sv(){let n=(0,N._)(["\n width: 406px;\n "]);return sv=function(){return n},n}function sp(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n\n ","\n\n ","\n"]);return sp=function(){return n},n}function sf(){let n=(0,N._)(["\n padding: "," 0 ",";\n font-size: ",";\n line-height: ",";\n "]);return sf=function(){return n},n}function sg(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return sg=function(){return n},n}function sm(){let n=(0,N._)(["\n padding: "," 0 ",";\n font-family: ",";\n font-weight:",";\n text-align: center;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return sm=function(){return n},n}function sh(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return sh=function(){return n},n}function sy(){let n=(0,N._)(["\n // margin-bottom: 40px;\n margin-bottom: ",";\n "]);return sy=function(){return n},n}
1function sb(){let n=(0,N._)(["\n font-family: ",";\n font-weight: 400;\n font-style: normal;\n margin-top: ","\n margin-bottom: ","\n text-align: center;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return sb=function(){return n},n}function sC(){let n=(0,N._)(["\n gap: ",";\n "]);return sC=function(){return n},n}function sE(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n }\n\n gap: ",";\n\n ","\n"]);return sE=function(){return n},n}function sS(){let n=(0,N._)(["\n font-family: ",";\n font-style: normal;\n font-weight: 400;\n font-size: ",";\n line-height: ",";\n margin-top: ",";\n margin-bottom: ",";\n display: flex;\n flex-direction: row;\n"]);return sS=function(){return n},n}function sx(){let n=(0,N._)(["\n width: fit-content;\n text-align: start;\n"]);return sx=function(){return n},n}function sI(){let n=(0,N._)(["\n display: flex;\n width: ",";\n margin-right: ",";\n"]);return sI=function(){return n},n}function sA(){let n=(0,N._)(["\n input {\n position: absolute;\n margin: 0 auto;\n opacity: 0;\n cursor: pointer;\n height: ",";\n width: ",";\n z-index: 3;\n }\n\n .checkmark::after {\n left: ",";\n top: ",";\n width: ",";\n height: ",";\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n content: '';\n position: absolute;\n display: none;\n }\n\n .checkmark {\n position: absolute;\n height: 20px;\n width: 20px;\n border-radius: 3px;\n border: "," solid ",";\n }\n\n &:hover input ~ .checkmark {\n border: "," solid ",";\n }\n\n input:checked ~ .checkmark {\n background-color: ",";\n border: none;\n }\n\n input:checked ~ .checkmark::after {\n display: block;\n }\n"]);return sA=function(){return n},n}function s_(){let n=(0,N._)(["\n gap: ",";\n margin-bottom: ",";\n "]);return s_=function(){return n},n}function sT(){let n=(0,N._)(["\n margin-bottom: ",";\n "]);return sT=function(){return n},n}function sN(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: ",";\n\n ","\n\n ","\n"]);return sN=function(){return n},n}function sL(){let n=(0,N._)(["\n font-size: ",";\n line-height: ",";\n "]);return sL=function(){return n},n}function sO(){let n=(0,N._)(["\n text-align: left;\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n\n ","\n\n p {\n margin: 0 0 ",";\n color: ",";\n }\n\n div {\n justify-content: flex-start;\n }\n"]);return sO=function(){return n},n}(d=p||(p={})).ERROR="error",d.ADD="add",d.EDIT="edit",(a=f||(f={})).EMAIL="email",a.MSISDN="phone";let sR=L.Z.div(sp(),ek.BC.tablet(sc()),ek.BC.desktop(sv())),sD=L.Z.div(sm(),ek.rS.spacing.xl,ek.rS.spacing.md,ek.rS.typography.fontFamily.primary,ek.rS.typography.fontWeight.extrabold,ek.rS.typography.fontSize.h4,ek.rS.typography.lineHeight.h4,ek.BC.tablet(sf(),ek.rS.spacing["3xl"],ek.rS.spacing.md,ek.rS.typography.fontSize.h1,ek.rS.typography.lineHeight.h1),ek.BC.desktop(sg(),ek.rS.typography.fontSize.h2,ek.rS.typography.lineHeight.h2)),sM=L.Z.div(sb(),ek.rS.typography.fontFamily.secondary,ek.rS.spacing.md,ek.rS.spacing.xl,ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.body1,ek.BC.tablet(sh(),ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.h6),ek.BC.desktop(sy(),ek.rS.spacing.xl)),sP=L.Z.div(sE(),ek.rS.spacing.md,ek.BC.tablet(sC(),ek.rS.spacing.lg)),sw=L.Z.div(sS(),ek.rS.typography.fontFamily.secondary,ek.rS.typography.fontSize.body3,ek.rS.typography.lineHeight.body3,ek.rS.spacing.xl,ek.rS.spacing.xl),sk=L.Z.div(sx()),sj=L.Z.div(sI(),ek.rS.spacing.lg,ek.rS.spacing.sm),sB=L.Z.div(sA(),ek.rS.spacing.lg,ek.rS.spacing.lg,ek.rS.spacing.sm,ek.rS.spacing.xs,ek.rS.spacing.xs,ek.rS.spacing.sm,ek.rS.borderWidth.thin,ek.rS.colors.text.disabled,ek.rS.borderWidth.thin,ek.rS.colors.text.disabled,ek.DH.cyanDark),sF=L.Z.div(sN(),ek.rS.spacing.lg,ek.BC.tablet(s_(),ek.rS.spacing.xl,ek.rS.spacing.xs),ek.BC.desktop(sT(),ek.rS.spacing.md)),sz=L.Z.div(sO(),ek.rS.typography.fontFamily.secondary,ek.rS.typography.fontWeight.bold,ek.rS.typography.fontSize.body1,ek.rS.typography.lineHeight.body2,ek.BC.tablet(sL(),ek.rS.typography.fontSize.h6,ek.rS.typography.lineHeight.h6),ek.rS.spacing.sm,ek.DH.cyanDark),sZ={roSubtitle:"Ecco un riepilogo dei tuoi contatti personali per essere ricontattato al telefono e per ricevere via mail le comunicazioni sullâattivazione. Verifica che siano corretti o modificali prima di proseguire.",roTelephoneLable:"Il tuo numero di telefono",roEmailLable:"Il tuo indirizzo email",roCtaTelephone:"Modifica numero",roCtaEmail:"Modifica email"},sH=n=>{var e,i,t,o,l,r,d,a,u,s;return{title:(null==n?void 0:null===(i=n.personalinfo)||void 0===i?void 0:null===(e=i.clientRegistered)||void 0===e?void 0:e.title)||"",subtitle:(null==n?void 0:null===(o=n.personalinfo)||void 0===o?void 0:null===(t=o.generalInfo)||void 0===t?void 0:t.subtitle)||"",telephoneLable:(null==n?void 0:null===(r=n.personalinfo)||void 0===r?void 0:null===(l=r.selectInput)||void 0===l?void 0:l.telephone)||"",emailLable:(null==n?void 0:null===(a=n.personalinfo)||void 0===a?void 0:null===(d=a.selectInput)||void 0===d?void 0:d.email)||"",footerInfo:(null==n?void 0:null===(s=n.personalinfo)||void 0===s?void 0:null===(u=s.clientRegistered)||void 0===u?void 0:u.smallInfo)||""}},sV=n=>{switch(n){case"CRM-0020":case"CRM-0024":return ii.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT;case"CRM-0021":case"CRM-0023":return ii.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT;case"CRM-0022":case"CRM-0025":return ii.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT;default:return""}},sU=(n,e,i)=>{var t,o;let l=e.find(e=>e.error===n),r=(null==i?void 0:i.genericerror)||null;return{title:(null==l?void 0:l.title)||(null==r?void 0:r.title)||"",message:(null==l?void 0:l.message)||(null==r?void 0:r.description)||"",actionText:(null==l?void 0:null===(t=l.button)||void 0===t?void 0:t.t
1itle)||(null==r?void 0:r.buttonLabel)||"",url:(null==l?void 0:null===(o=l.button)||void 0===o?void 0:o.urlForRedirect)||""}},sQ=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y;return _.object({phoneNumber:_.string().required((null==n?void 0:null===(t=n.coveragetool)||void 0===t?void 0:null===(i=t.validationMessage)||void 0===i?void 0:null===(e=i.phoneNumber)||void 0===e?void 0:e.required)||"").min(9,(null==n?void 0:null===(r=n.coveragetool)||void 0===r?void 0:null===(l=r.validationMessage)||void 0===l?void 0:null===(o=l.phoneNumber)||void 0===o?void 0:o.maximum)||"").max(10,(null==n?void 0:null===(u=n.coveragetool)||void 0===u?void 0:null===(a=u.validationMessage)||void 0===a?void 0:null===(d=a.phoneNumber)||void 0===d?void 0:d.minimum)||"").matches(/^(3)+[0-9]*$/,(null==n?void 0:null===(v=n.coveragetool)||void 0===v?void 0:null===(c=v.validationMessage)||void 0===c?void 0:null===(s=c.phoneNumber)||void 0===s?void 0:s.matches)||""),emailAddress:_.string().required((null==n?void 0:null===(g=n.coveragetool)||void 0===g?void 0:null===(f=g.validationMessage)||void 0===f?void 0:null===(p=f.emailAddress)||void 0===p?void 0:p.required)||"").email((null==n?void 0:null===(y=n.coveragetool)||void 0===y?void 0:null===(h=y.validationMessage)||void 0===h?void 0:null===(m=h.emailAddress)||void 0===m?void 0:m.email)||"")})};var sG=n=>{let{data:e,onChangeData:i,checkInfo:t,onChangeCheck:o,isReadOnly:l,setIsValidForm:r}=n,d=(0,no.useQueryClient)(),{owningIndividual:a}=e,u=(0,y.CA)(y.Jn,eM.b.CMS_GET_PERSONAL_DATA),s=(0,y.CA)(y.Jn,eM.b.CMS_GET_COVERAGE_TOOL_CONFIG),{currentStepKey:c,checkoutErrors:v,isModalButtonSticky:m,findCaller:h,setOwningData:E}=(0,ne.Mg)(),{isError:S,error:I,mutateAsync:A}=(0,eD.n)(),[_,T]=(0,g.useState)({isOpen:!1,type:f.EMAIL,operationType:p.EDIT}),[N,L]=(0,g.useState)({email:-2,phone:-2}),[O,R]=(0,g.useState)(!1),{register:D,getValues:M,setValue:P,formState:{isValid:w,errors:k}}=(0,C.cI)({resolver:(0,x.X)(sQ(s)),mode:"onChange"}),j=(n,i,t)=>{var o,l;if(!a.contactMedium)return;null==a||a.contactMedium.push(n===f.EMAIL?{type:n,preferred:t,emailAddress:i}:{type:n,preferred:t,phoneNumber:i});let r=(null!==(l=null==a?void 0:null===(o=a.contactMedium)||void 0===o?void 0:o.length)&&void 0!==l?l:0)-1;n===f.EMAIL?N.email=r:N.phone=r,L(N),E({...e,owningIndividual:a})},B=n=>{let e=-2;return(null==a?void 0:a.contactMedium)&&-1===(e=null==a?void 0:a.contactMedium.findIndex(e=>e.type===n&&e.preferred))&&-1===(e=null==a?void 0:a.contactMedium.findIndex(e=>e.type===n))&&j(n,"",!0),e},F=()=>{var n,e,i,t;let o=B(f.EMAIL),l=B(f.MSISDN),r=(null==a?void 0:null===(e=a.contactMedium)||void 0===e?void 0:null===(n=e[o])||void 0===n?void 0:n.emailAddress)||"",d=(null==a?void 0:null===(t=a.contactMedium)||void 0===t?void 0:null===(i=t[l])||void 0===i?void 0:i.phoneNumber)||"";-1!==o&&(N.email=o,P("emailAddress",r,{shouldValidate:""!==r})),-1!==l&&(N.phone=l,P("phoneNumber",d,{shouldValidate:""!==d})),L(N)};(0,g.useEffect)(()=>{if(e.isLogged||e.isValid){let n=()=>{var n,i;let{owningIndividual:t}=e,o=null==t?void 0:null===(n=t.contactMedium)||void 0===n?void 0:n.find(n=>n.type===f.MSISDN),l=null==t?void 0:null===(i=t.contactMedium)||void 0===i?void 0:i.find(n=>n.type===f.EMAIL);return!!((null==o?void 0:o.phoneNumber)&&(null==l?void 0:l.emailAddress)&&"3"===o.phoneNumber.substring(0,1))};setTimeout(()=>{i&&i({...e,owningIndividual:a},n())},250)}},[]),(0,g.useEffect)(()=>{F(),i&&i({...e,owningIndividual:a},w)},[w,a]);let z=(0,y.CA)(y.Jn,eM.b.CMS_GET_GENERIC_ERROR),{errorcomponent:Z}=(0,y.CA)(y.Jn,eM.b.CMS_GET_CUSTOMER_ERROR_FIXED)||{},H=(0,id.YZ)();(0,g.useEffect)(()=>{if(S&&_.operationType!==p.ERROR){var n,e,i;let t=sU(sV((null===(n=I.headers)||void 0===n?void 0:n.get("ERR-backendErrorCode"))||""),(null==Z?void 0:Z.errors)||[],z);null==v||null===(i=v.showAndTrackError)||void 0===i||i.call(v,z,()=>{},(0,b.nQ)("patchCustomer",I,nM.S.PATCH_CUSTOMER),null==t?void 0:t.title,null==t?void 0:t.message,()=>{},(null==t?void 0:t.actionText)||"",()=>{var n;return(0,eO.x)(d,(null==H?void 0:null===(n=H.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",H,()=>{}
1,c,(0,b.nQ)("patchCustomer",I,nM.S.PATCH_CUSTOMER))},(null==H?void 0:null===(e=H.genericErrorCallMeNow)||void 0===e?void 0:e.label)||"",m,!0)}},[S]),(0,g.useEffect)(()=>{null==r||r(w)},[w]);let{footerInfo:V,subtitle:U,title:Q,telephoneLable:G,emailLable:Y}=sH(u),W=()=>{T({isOpen:!1,operationType:p.EDIT,type:f.EMAIL})},J=n=>{R(!0),A([{updatedValue:n.value,type:"number",operation:"replace",index:1}]).then(()=>{(null==a?void 0:a.contactMedium)&&(null==a||a.contactMedium.forEach((e,i)=>{var t;e.type===f.MSISDN&&(null==a?void 0:null===(t=a.contactMedium)||void 0===t?void 0:t[i])&&(a.contactMedium[i].phoneNumber=n.value)}));let i={...e,owningIndividual:a};E({...i}),iu({...i}),R(!1),W()}).catch(n=>{R(!1),eO.K.debug(n)})},X=()=>{var n;return null===(n=h.subscription)||void 0===n?void 0:n.filter(n=>"M"===n.serviceType).map(n=>({type:"phone",preferred:!1,phoneNumber:n.msisdn}))};return{owningIndividual:a,openModal:(n,e)=>{T({isOpen:!0,type:n,operationType:e})},changeData:()=>{let n=M();(null==a?void 0:a.contactMedium)&&(a.contactMedium[N.email].emailAddress=n.emailAddress,a.contactMedium[N.phone].phoneNumber=n.phoneNumber),i&&i({...e,owningIndividual:a},w)},handleKeyDown:n=>{" "===n.key&&n.preventDefault()},telephoneLable:G,emailLable:Y,subtitle:U,footerInfo:V,title:Q,indexs:N,isAddModal:()=>{var n;return!(!X()||X()&&(null===(n=X())||void 0===n?void 0:n.length)===0)},errors:k,register:D,setValue:P,onCheckClickHandler:()=>{o({checkContactProblem:!(null==t?void 0:t.checkContactProblem)})},modalConfig:_,resetModal:W,loading:O,onChangeNumber:J,getAllNumbers:X,modifyField:n=>{n.phoneNumber?J({title:"",value:n.phoneNumber}):(R(!0),A([{updatedValue:n.email,type:"email",operation:"replace",index:0}]).then(()=>{(null==a?void 0:a.contactMedium)&&(a.contactMedium[N.email].emailAddress=n.email);let i={...e,owningIndividual:a};E({...i}),iu({...i}),R(!1),W()}).catch(n=>{R(!1),eO.K.debug(n)}))}}},sY=n=>{var e,i,t,o,l;let{data:r,onChangeData:d,checkInfo:a,onChangeCheck:u,isReadOnly:s,setIsValidForm:c}=n,{owningIndividual:v,openModal:g,changeData:h,handleKeyDown:y,telephoneLable:b,emailLable:C,subtitle:E,footerInfo:x,title:I,indexs:A,isAddModal:_,errors:T,register:N,setValue:L,onCheckClickHandler:O,modalConfig:R,resetModal:D,loading:M,onChangeNumber:P,getAllNumbers:w,modifyField:k}=sG({data:r,onChangeData:d,checkInfo:a,onChangeCheck:u,isReadOnly:s,setIsValidForm:c});return(0,m.jsxs)(sR,{children:[(0,m.jsx)(sD,{children:I}),(0,m.jsx)(sM,{children:s?sZ.roSubtitle:E}),s?(0,m.jsxs)(sF,{children:[(0,m.jsxs)(sz,{children:[sZ.roTelephoneLable,(0,m.jsx)("p",{children:(null==v?void 0:v.contactMedium)&&-2!==A.phone?null==v?void 0:null===(i=v.contactMedium[A.phone])||void 0===i?void 0:i.phoneNumber:""}),(0,m.jsx)(eP.Z,{onClick:()=>g(f.MSISDN,_()?p.ADD:p.EDIT),text:sZ.roCtaTelephone})]}),(0,m.jsxs)(sz,{children:[sZ.roEmailLable,(0,m.jsx)("p",{children:(null==v?void 0:v.contactMedium)&&-2!==A.email?null==v?void 0:null===(t=v.contactMedium[A.email])||void 0===t?void 0:t.emailAddress:""}),(0,m.jsx)(eP.Z,{onClick:()=>g(f.EMAIL,p.EDIT),text:sZ.roCtaEmail})]})]}):(0,m.jsxs)(sP,{children:[(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{label:b,error:null===(o=T.phoneNumber)||void 0===o?void 0:o.message,autoComplete:"off",placeholder:" ",...N("phoneNumber",{onChange:h})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{label:C,type:"email",error:null===(l=T.emailAddress)||void 0===l?void 0:l.message,autoComplete:"off",placeholder:" ",onKeyDown:n=>y(n),...N("emailAddress",{onChange:n=>{L("emailAddress",n.target.value.replace(/\s+/g,"")),null==h||h()}})})})]}),(0,m.jsxs)(sw,{children:[(0,m.jsx)(sj,{children:(0,m.jsxs)(sB,{children:[(0,m.jsx)("input",{type:"checkbox",checked:a.checkContactProblem,onChange:O}),(0,m.jsx)("span",{className:"checkmark"})]})}),(0,m.jsx)(sk,{children:x})]}),(0,m.jsx)(ic.Z,{isOpen:R.isOpen&&R.operationType===p.ADD,handleClose:D,children:(0,m.jsxs)(m.Fragment,{children:[M&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.E,{onChangeNumber:P,isLoading:M,data:w(),selectedNumber:(null==v?void 0:null===(e=v.contactMedium)||void 0===e?void 0:e[1].phoneNumber)||""})]})}),(0,m.jsx)(ic.Z,{isOpen:R.isOpen&&R.operationType===p.EDIT,handleClose:D,children:(0,m.jsxs)(m.Fragment,{children:[M&&(0,m.jsx)(iv.Z,{}),(0,m.jsx)(ip.B,{isLoading:M,onSubmit:k,handleClose:D,isPhone:R.type===f.MSISDN})]})})]})};let sW=n=>{var e;let i=null==n?void 0:null===(e=n.owningIndividual)||void 0===e?void 0:e.contactMedium;if(i&&i.length>0){let n=i.find(n=>"email"===n.type),e=i.find(n=>"phone"===n.type);(null==n?void 0:n.emailAddress)?localStorage.setItem(ia.e,n.emailAddress):localStorage.removeItem(ia.e),(null==e?void 0:e.phoneNumber)?localStorage.setItem(ia.j,e.phoneNumber):localStorage.removeItem(ia.j)}};var sJ=n=>{let{handleOnChangeEnableGoNext:e}=n,{owningData:i,contactInfo:t,setOwningData:o,setContactInfo:l,setCurrentStepKey:r,setIsDisabledBackButton:d,setIsStartCustomerFlow:a,setCheckoutStepState:u}=(0,ne.Mg)(),{isLoading:s}=iE(n),[c,v]=(0,g.useState)(!1),p=(0,ev.UY)(b.gL),f=()=>(null==p?void 0:p.firstName)&&(null==p?void 0:p.lastName)&&(null==p?void 0:p.fiscalCode)?{...i,owningIndividual:{...null==i?void 0:i.owningIndividual,firstName:(null==p?void 0:p.firstName)||"",lastName:(null==p?void 0:p.lastName)||"",fiscalCode:(null==p?void 0:p.fiscalCode)||""}}:i;return(0,g.useEffect)(()=>{e&&(d(!1),(0,b.gp)()?setTimeout(()=>{e(!s&&(c||(0,b.gp)()))},800):setTimeout(()=>{e(!s&&c)},800))},[c,s]),(0,g.useEffect)(()=>{r(ni.Bf.CONTACT_CARD),u(ni.v9.CONTACT_LOCK_IN_PROSPECT_CARD,{}),o({...f()}),(0,b._d)(t),(null==p?void 0:p.fiscalCode)&&a(!0)}
1,[]),{isLoading:s,isValidForm:c,setIsValidForm:v,onChangeData:n=>{sW(n),o(n)},onChangeCheck:n=>{let e="off";n.checkContactProblem&&(e="on"),(0,nN.dw)("re-contact checkbox ".concat(e)),(0,b._d)(n),l(n)},owningData:i,contactInfo:t}};let sX=(n,e,i)=>{var t,o,l,r,d,a;return _.object({identificationType:_.string().required(" "),identificationNumber:_.string().ensure().when("identificationType",{is:n=>"Carta d'identit\xe0"===n||"Identity card"===n,then:e?_.string().required(" ").matches(/^[A-Z]{2}\d{5}[A-Z]{2}$/i,i||"Inserire un numero di documento valido"):_.string().required(" ").matches(/^[a-zA-Z]{2}[0-9]{5}([0-9]{2}||[a-zA-Z]{2})$/,(null==n?void 0:null===(t=n.identificationNumber)||void 0===t?void 0:t.valid)||"Inserire un numero di documento valido").min(9,(null==n?void 0:null===(o=n.identificationNumber)||void 0===o?void 0:o.minimum)||"Inserire un numero di documento valido"),otherwise:_.string().required(" ").matches(/^[a-zA-Z0-9]*$/,(null==n?void 0:null===(l=n.otherwise)||void 0===l?void 0:l.valid)||"Inserire un numero di documento valido").min(6,(null==n?void 0:null===(r=n.otherwise)||void 0===r?void 0:r.minimum)||"Inserire un numero di documento valido").max(15,(null==n?void 0:null===(d=n.otherwise)||void 0===d?void 0:d.maximum)||"Inserire un numero di documento valido")}),expirationDate:_.string().required(" ").test("rangeTest",(null==n?void 0:null===(a=n.expirationDate)||void 0===a?void 0:a.rangeTest)||"Inserire una data di scadenza valida",n=>{if((null==n?void 0:n.includes("_"))===!1&&n.match(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/)){let e=new Date,i=n.split("/"),t=new Date(parseInt(i[2],10),parseInt(i[1],10)-1,parseInt(i[0],10)),o=new Date;o.setDate(e.getDate()-1);let l=new Date;if(l.setFullYear(e.getFullYear()+10),t>o&&t<=l)return!0}return!1}),nationality:_.string().required(" ")})};function sq(){let n=(0,N._)(["\n width: 366px;\n "]);return sq=function(){return n},n}function sK(){let n=(0,N._)(["\n width: 406px;\n "]);return sK=function(){return n},n}function s$(){let n=(0,N._)(["\n margin: 0 auto;\n width: 287px;\n\n ","\n\n ","\n"]);return s$=function(){return n},n}function s0(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.238;\n padding: 60px 0 16px;\n "]);return s0=function(){return n},n}function s1(){let n=(0,N._)(["\n font-size: ",";\n line-height: 1.25;\n "]);return s1=function(){return n},n}function s2(){let n=(0,N._)(["\n padding: 32px 0 16px;\n font-family: ",";\n font-weight: ",";\n text-align: center;\n font-size: 1.875rem;\n line-height: 1.267;\n\n ","\n\n ","\n"]);return s2=function(){return n},n}function s9(){let n=(0,N._)(["\n line-height: 1.5;\n "]);return s9=function(){return n},n}function s3(){let n=(0,N._)(["\n margin-bottom: 40px;\n "]);return s3=function(){return n},n}function s4(){let n=(0,N._)(["\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n margin-bottom: 32px;\n text-align: center;\n font-size: ",";\n line-height: 1.3;\n\n ","\n\n ","\n"]);return s4=function(){return n},n}function s6(){let n=(0,N._)(["\n gap: 1.25rem;\n "]);return s6=function(){return n},n}function s5(){let n=(0,N._)(["\n display: flex;\n flex-direction: column;\n gap: ",";\n\n ","\n\n div {\n margin-top: 0;\n }\n\n p {\n position: relative;\n margin-bottom: 0;\n }\n"]);return s5=function(){return n},n}function s7(){let n=(0,N._)(["\n margin-top: 1.25rem;\n "]);return s7=function(){return n},n}function s8(){let n=(0,N._)(["\n display: flex;\n font-family: ",";\n font-style: normal;\n font-weight: ",";\n font-size: ",";\n line-height: 1.286;\n margin-top: ",";\n margin-bottom: 32px;\n\n ","\n"]);return s8=function(){return n},n}let cn=L.Z.div(s$(),O.B.tablet(sq()),O.B.desktop(sK())),ce=L.Z.div(s2(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.extrabold,O.B.tablet(s0(),O.r.typography.fontSize.h1),O.B.desktop(s1(),O.r.typography.fontSize.h2)),ci=L.Z.div(s4(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.h6,O.B.tablet(s9()),O.B.desktop(s3())),ct=L.Z.div(s5(),O.r.spacing.md,O.B.tablet(s6())),co=L.Z.div(s8(),O.r.typography.fontFamily.primary,O.r.typography.fontWeight.regular,O.r.typography.fontSize.body3,O.r.spacing.md,O.B.tablet(s7())),cl={margins:[60,30],tabletMargins:[32,15],groups:[{heights:60,marginBottom:15},{heights:90,marginBottom:32},{heights:60,repeat:4,gap:15}]};var cr=n=>{var e,i,t,o;let{data:l,nationality:r,identificationType:d,onChangeData:a,isReadonly:u,isLoading:s,setIsValidForm:c,configCms:v}=n,{owningIndividual:p}=l,{title:f,docExpirationDateLable:h,docLable:y,docNumberLable:b,errorMessage:_,countryLable:T,subtitle:N,cieEnabled:L,cieErrorMessage:O}=v,{register:R,setValue:D,getValues:M,trigger:P,formState:{isValid:w,touchedFields:k,errors:j}}=(0,C.cI)({resolver:(0,x.X)(sX(null==v?void 0:v.validationMessage,L,O)),mode:"all"}),[B,F]=(0,g.useState)(0),[z]=(0,g.useState)(""),Z=n=>(null==n?void 0:n.identificationType)!==""&&(null==n?void 0:n.identificationNumber)!==""&&(null==n?void 0:n.expirationDate)!==""&&(null==n?void 0:n.nationality)!=="",[H]=(0,A.q)([N||""]);(0,g.useEffect)(()=>
1{if(!s){let n=(0,I.N)(p),e=null==d?void 0:d.find(e=>(null==e?void 0:e.id)===(null==n?void 0:n.identificationType)),i=Z(n||void 0);p&&(D("identificationType",(null==e?void 0:e.displayName)||"",{shouldValidate:i}),D("identificationNumber",(null==n?void 0:n.identificationNumber)||"",{shouldTouch:i,shouldValidate:i}),D("expirationDate",(null==n?void 0:n.expirationDate)||"",{shouldTouch:i,shouldValidate:i}),D("nationality",(null==n?void 0:n.nationality)||"",{shouldValidate:i}))}},[s]);let V=()=>{var n;let e=M(),i={...l,owningIndividual:{...p,identification:[{identificationType:(null==d?void 0:null===(n=d.find(n=>{var i,t;return(null==n?void 0:null===(i=n.displayName)||void 0===i?void 0:i.toLowerCase())===(null==e?void 0:null===(t=e.identificationType)||void 0===t?void 0:t.toLowerCase())}))||void 0===n?void 0:n.identificationType)||"",nationality:e.nationality||"",identificationNumber:e.identificationNumber||"",expirationDate:e.expirationDate||""}]}};a&&a(i,w),F(n=>n+1)};return(0,g.useEffect)(()=>{null==c||c(w)},[B,w]),(0,g.useEffect)(()=>{s||V()},[w]),(0,m.jsx)(cn,{children:s?(0,m.jsx)(E.Z,{...cl}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ce,{children:f}),H&&(0,m.jsx)(ci,{dangerouslySetInnerHTML:{__html:H}}),(0,m.jsxs)(ct,{children:[(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.SelectInput,{"data-cs-mask":"",label:y,setValue:()=>z,onSelectValue:n=>{D("identificationType",n),P("identificationType"),D("identificationNumber",""),P("identificationNumber"),V()},isDisabled:s||u,errorMessage:null===(e=j.identificationType)||void 0===e?void 0:e.message,placeholder:" ",...R("identificationType",{onChange:V}),items:(null==d?void 0:d.map(n=>(null==n?void 0:n.displayName)||""))||["Patente","Passaporto","Carta"]})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.TextInput,{"data-cs-mask":"",label:b,placeholder:" ",autoComplete:"off",disabled:s||u,error:k.identificationNumber?null===(i=j.identificationNumber)||void 0===i?void 0:i.message:"",...R("identificationNumber",{onChange:V})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.MaskInput,{"data-cs-mask":"",mask:"99/99/9999",label:h,placeholder:" ",autoComplete:"off",disabled:s||u,error:null===(t=j.expirationDate)||void 0===t?void 0:t.message,...R("expirationDate",{onChange:V})})}),(0,m.jsx)("div",{className:"textInput",children:(0,m.jsx)(S.Z.SelectInput,{"data-cs-mask":"",label:T,isDisabled:s||u,setValue:()=>z,onSelectValue:n=>{D("nationality",n),P("nationality"),V()},errorMessage:k.nationality?null===(o=j.nationality)||void 0===o?void 0:o.message:"",suggestionsMaxHeight:"120px",placeholder:" ",...R("nationality",{onChange:V}),items:r||["Italia"]})})]}),(0,m.jsx)(co,{children:_})]})})};let cd={nameTitle:[{rel:"self",href:"/care/v1/nameTitle",id:"EMPTY",name:"EMPTY",displayName:" ",default:!0},{rel:"self",href:"/care/v1/nameTitle",id:"Mr.",name:"Mr.",displayName:"Sig.",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Mrs.",name:"Mrs.",displayName:"Sig.ra",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Ms.",name:"Ms.",displayName:"Sig.na",default:!1},{rel:"self",href:"/care/v1/nameTitle",id:"Dr.",name:"Dr.",displayName:"Dr.",default:!1}],identificationType:[{rel:"self",href:"/care/v1/identificationType",id:"1",name:"1",displayName:"Carta d'identit\xe0",default:!1},{rel:"self",href:"/care/v1/identificationType",id:"2",name:"2",displayName:"Passaporto",default:!1},{rel:"self",href:"/care/v1/identificationType",id:"3",name:"3",displayName:"Patente di guida",default:!1}]},ca=(n,e)=>{var i,t,o,l;let r=new DOMParser,d=(null==n?void 0:null===(i=n.find(n=>n.id===e))||void 0===i?void 0:i.value)||"",a=r.parseFromString((null===(t=(0,A.q)([d||""]))||void 0===t?void 0:t[0])||"","text/html");return(null==a?void 0:null===(l=a.body)||void 0===l?void 0:null===(o=l.textContent)||void 0===o?void 0:o.replace("\n",""))||""},cu=(n,e)=>{var i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R;return{title:e?(null==n?void 0:null===(t=n.personalinfo)||void 0===t?void 0:null===(i=t.preFilledDocument)||void 0===i?void 0:i.title)||"Documento":(null==n?void 0:null===(l=n.personalinfo)||void 0===l?void 0:null===(o=l.newDocument)||void 0===o?void 0:o.title)||"Documento",subtitle:e?(null==n?void 0:null===(d=n.personalinfo)||void 0===d?void 0:null===(r=d.preFilledDocument)||void 0===r?void 0:r.description)||"Conferma o modifica i dati del tuo documento. Per verificare la tua identit\xe0, dovrai mostrare lo stesso documento durante la consegna o l'attivazione online della tua nuova SIM.":(null==n?void 0:null===(u=n.personalinfo)||void 0===u?void 0:null===(a=u.newDocument)||void 0===a?void 0:a.description)||"Inserisci i dati di un tuo documento. Per verificare la tua identit\xe0, dovrai mostrare lo stesso documento durante la consegna o l'attivazione online della tua nuova SIM.",docLable:(null==n?void 0:null===(c=n.personalinfo)||void 0===c?void 0:null===(s=c.selectInput)||void 0===s?void 0:s.docType)||"",docNumberLable:(null==n?void 0:null===(p=n.personalinfo)||void 0===p?void 0:null===(v=p.selectInput)||void 0===v?void 0:v.docNumber)||"",docExpirationDateLable:(null==n?void 0:null===(g=n.personalinfo)||void 0===g?void 0:null===(f=g.selectInput)||void 0===f?void 0:f.docExpirationDate)||"",countryLable:(null==n?void 0:null===(h=n.personalinfo)||void 0===h?void 0:null===(m=h.selectInput)||void 0===m?void 0:m.nation)||"",errorMessage:e?(null==n?void 0:null===(b=n.personalinfo)||void 0===b?void 0:null===(y=b.preFilledDocument)||void 0===y?void 0:y.allFieldsAreRequired)||"Tutti i campi sono obbligatori":(null==n?void 0:null===(E=n.personalinfo)||void 0===E?void 0:null===(C=E.newDocument)||void 0===C?void 0:C.allFieldsAreRequired)||"Tutti i campi sono obbligatori",validationMessage:{
1identificationNumber:{valid:ca(null==n?void 0:null===(S=n.editorialconfigs)||void 0===S?void 0:S.elements,"identificationNumberValid")||"Inserire un numero di documento valido",minimum:ca(null==n?void 0:null===(x=n.editorialconfigs)||void 0===x?void 0:x.elements,"identificationMinimum")||"Inserire un numero di documento valido"},otherwise:{valid:ca(null==n?void 0:null===(I=n.editorialconfigs)||void 0===I?void 0:I.elements,"otherwiseValid")||"Inserire un numero di documento valido",minimum:ca(null==n?void 0:null===(A=n.editorialconfigs)||void 0===A?void 0:A.elements,"otherwiseMinimum")||"Inserire un numero di documento valido",maximum:ca(null==n?void 0:null===(_=n.editorialconfigs)||void 0===_?void 0:_.elements,"otherwiseMaximum")||"Inserire un numero di documento valido"},expirationDate:{rangeTest:ca(null==n?void 0:null===(T=n.editorialconfigs)||void 0===T?void 0:T.elements,"expirationDateRangeTest")||"Inserire una data di scadenza valida"}},cieEnabled:"true"===String(null==n?void 0:null===(L=n.personalinfo)||void 0===L?void 0:null===(N=L.selectInput)||void 0===N?void 0:N.cieEnabled).toLowerCase(),cieErrorMessage:(null==n?void 0:null===(R=n.personalinfo)||void 0===R?void 0:null===(O=R.selectInput)||void 0===O?void 0:O.cieErrorMessage)||""}},cs=(n,e)=>null==n?void 0:n.map(n=>(null==n?void 0:n.id)==="1"&&ca(e,"identityCard")?{displayName:ca(e,"identityCard")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:(null==n?void 0:n.id)==="2"&&ca(e,"passport")?{displayName:ca(e,"passport")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:(null==n?void 0:n.id)==="3"&&ca(e,"drivingLicense")?{displayName:ca(e,"drivingLicense")||(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}:{displayName:(null==n?void 0:n.displayName)||"",id:(null==n?void 0:n.id)||"",identificationType:(null==n?void 0:n.displayName)||""}),cc=nr()(()=>{let n=(0,no.useQueryClient)(),e=(0,nl.De)("document","fixed",n),{trackView:i}=(0,nt.r)({event:["checkout_step3"],event_label:"document",opts:null==e?void 0:e.opts,cartProduct:null==e?void 0:e.trackingProduct,pageProduct:null==e?void 0:e.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()});return(0,nt.q)(i),null});var cv=i(10020);let cp=n=>{var e,i,t,o,l,r,d,a,u,s,c,v,p,f,m;let{handleOnClose:h}=n,{currentStepKey:y,product:b,findCaller:C,customerFlow:E,customerAsyncInfo:S,owningData:x,checkoutErrors:I,isModalButtonSticky:A,lockInAppFlow:_,setIsStartLockInAppFlow:T,setIsDisabledBackButton:N,setCustomerId:L,setOwningData:O,setIsStartCustomerFlow:R,setFindCaller:D}=(0,ne.Mg)(),M=(0,no.useQueryClient)(),P=(0,nj.f)("getCountry"),w={id:C.verifyOtp},{isSuccess:k,isLoading:j,isError:B,error:F}=(0,cv.OD)(),z=(0,cv.CA)(cv.Jn,iy.bl.CMS_GET_GENERIC_ERROR),{errorcomponent:{errors:Z}}=(0,cv.CA)(cv.Jn,iy.bl.CMS_GET_ORDER_ERROR),H=null==Z?void 0:Z.find(n=>(null==n?void 0:n.error)===cv.SM.ASSOCIATE_CUSTOMER_BLOCKED),V=(null==_?void 0:null===(e=_.campaigns)||void 0===e?void 0:e.isLoading)||(null==_?void 0:null===(i=_.accept)||void 0===i?void 0:i.isLoading)||(null==_?void 0:null===(t=_.shoppingCart)||void 0===t?void 0:t.isLoading)||(null==E?void 0:null===(o=E.associateCustomer)||void 0===o?void 0:o.isLoading),U=(null==_?void 0:null===(l=_.campaigns)||void 0===l?void 0:l.isSuccess)&&(null==_?void 0:null===(r=_.accept)||void 0===r?void 0:r.isSuccess)&&(null==_?void 0:null===(d=_.shoppingCart)||void 0===d?void 0:d.isSuccess)&&(null==E?void 0:null===(a=E.associateCustomer)||void 0===a?void 0:a.isSuccess),Q=j||!k||!!(null==w?void 0:w.id)&&!(null==E?void 0:null===(u=E.associateCustomer)||void 0===u?void 0:u.isSuccess),G=(null==_?void 0:null===(s=_.campaigns)||void 0===s?void 0:s.isError)||(null==_?void 0:null===(c=_.accept)||void 0===c?void 0:c.isError)||(null==_?void 0:null===(v=_.shoppingCart)||void 0===v?void 0:v.isError)||(null==E?void 0:null===(p=E.associateCustomer)||void 0===p?void 0:p.isError)||(null==_?void 0:null===(f=_.campaigns)||void 0===f?void 0:f.isSuccess)&&!(null==_?void 0:null===(m=_.checkEligibility)||void 0===m?void 0:m.eligible),Y=()=>{var n,e,i,t,o,l,r,d,a,u,s,c,v,p,f,g,m,x,_,T,N,L;if((null==E?void 0:null===(n=E.associateCustomer)||void 0===n?void 0:n.isSuccess)||(null==E?void 0:null===(e=E.associateCustomer)||void 0===e?void 0:e.isError)||B){if(D({...C,...(null==E?void 0:null===(t=E.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.paymean)&&{paymean:null==E?void 0:null===(l=E.findcaller)||void 0===l?void 0:null===(o=l.data)||void 0===o?void 0:o.paymean},showOtp:!1,verifyOtp:"",isVerified:!0}),(null==E?void 0:null===(r=E.associateCustomer)||void 0===r?void 0:r.isError)&&(null==E?void 0:null===(u=E.associateCustomer)||void 0===u?void 0:null===(a=u.error)||void 0===a?void 0:null===(d=a.error)||void 0===d?void 0:d.statusText)===cv.SM.ASSOCIATE_CUSTOMER_BLOCKED){let n=()=>{h&&((0,ib.u)(M),h())},e=()=>{var n,e,i;(null==H?void 0:null===(n=H.button)||void 0===n?void 0:n.urlForRedirect)?(0,nk.x)(M,(null==H?void 0:null===(e=H.button)||void 0===e?void 0:e.urlForRedirect)||"",b,()=>{h&&((0,ib.u)(M),h())},y,null==E?void 0:null===(i=E.associateCustomer)||void 0===i?void 0:i.error):h&&((0,ib.u)(M),h())};null==I||null===(g=I.showAndTrackError)||void 0===g||g.call(I,z,()=>n(),(null==E?void 0:null===(c=E.associateCustomer)||void 0===c?void 0:c.isError)?null==E?void 0:null===(v=E.associateCustomer)||void 0===v?void 0:v.error:void 0,(null==H?void 0:H.title)||"Attenzione",(null==H?void 0:H.message)||"I seguenti articoli non sono attivabili dal cliente selezionato",()=>e(),(null==H?void 0:null===(p=H.button)||void 0===p?void 0:p.title)||"Ti richiamiamo",()=>{var e,i,t;return(0,nk.x)(M,(null==b?void 0:null===(e=b.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",b,n,y,(null==E?void 0:null===(i=E.associateCustomer)||void 0===i?void 0:i.isError)?null==E?void 0:null===(t=E.associateCustomer)||void 0===t?void 0:t.error:void 0)},null==b?void 0:null===(f=b.genericErrorCallMeNow)||void 0===f?void 0:f.label,A)}else if((null==E?void 0:null===(s=E.associateCustomer)||void 0===s?void 0:s.isError)||B){let n;B&&F&&(n=(0,cv.nQ)(cv.SM.REFERENCE_CUSTOMER,F)),(null==E?void 0:null===(m=E.associateCustomer)||void 0===m?void 0:m.isError)&&(null==S?void 0:null===(x=S.customerInfo)||void 0===x?void 0:x.isError)&&(n=null==S?void 0:null===(L=S.customerInfo)||void 0===L?void 0:L.error),null==I||null===(N=I.showAndTrackError)||void 0===N||N.call(I,z,h,{...n,isBlocking:!0},"","",h,(null==z?void 0:null===(_=z.genericerror)||void 0===_?void 0:_.buttonLabel)||"",()=>{var e;return(0,nk.x)(M,(null==b?void 0:null===(e=b.genericErrorCallMeNow)||void 0===e?void 0:e.url)||"",b,h,y,n)},null==b?void 0:null===(T=b.genericErrorCallMeNow)||void 0===T?void 0:T.label,A)}}},W=()=>{var n,e,i,t;let o=(null==E?void 0:null===(n=E.findcaller)||void 0===n?void 0:n.error)||(null==E?void 0:null===(e=E.customerInfo)||void 0===e?void 0:e.error);null==I||null===(t=I.showAndTrackError)||void 0===t||t.call(I,z,()=>{var n;null==_||null===(n=_.resetLockInAppFlow)||void 0===n||n.call(_),null==h||h()},{...o,isBlocking:!0},void 0,void 0,()=>{var n;null==_||null===(n=_.resetLockInAppFlow)||void 0===n||n.call(_),null==h||h()},(null==z?void 0:null===(i=z.genericerror)||void 0===i?void 0:i.buttonLabel)||"Chiudi")};return(0,g.useEffect)(()=>{var n,e,i;if(Y(),null==E?void 0:null===(n=E.associateCustomer)||void 0===n?void 0:n.isSuccess){let n=null==E?void 0:null===(i=E.customerInfo)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:e[0];if(n){let e=(0,nl.Vp)(n,P);O({...x,owningIndividual:{...x.owningIndividual,...e}}),L(n.id)}}},[_,B,S]),(0,g.useEffect)(()=>{var n,e,i,t,o,l;U&&(null===(i=E.findcaller)||void 0===i?void 0:null===(e=i.data)||void 0===e?void 0:null===(n=e.customerRef)||void 0===n?void 0:n.id)&&L(null===(l=E.findcaller)||void 0===l?void 0:null===(o=l.data)||void 0===o?void 0:null===(t=o.customerRef)||void 0===t?void 0:t.id)},[U]),(0,g.useEffect)(()=>{G&&W()},[G]),(0,g.useEffect)(()=>{N(Q||V)},[V,Q]),(0,g.useEffect)(()=>{var n,e,i,t,o,l,r;(null==E?void 0:null===(n=E.findcaller)||void 0===n?void 0:n.isSuccess)&&(null==E?void 0:null===(t=E.findcaller)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:null===(e=i.customerRef)||void 0===e?void 0:e.id)&&!(null==_?void 0:null===(o=_.campaigns)||void 0===o?void 0:o.isSuccess)&&T(!0),((null==E?void 0:null===(l=E.findcaller)||void 0===l?void 0:l.isError)||(null==E?void 0:null===(r=E.customerInfo)||void 0===r?void 0:r.isError))&&W()},[E]),(0,g.useEffect)(()=>{D({...C,showOtp:!1}),R(!0)},[]),{isLoading:V||Q}},cf=[{title:ni.Bf.PERSONAL_INFO,component:n=>{let{handleOnChangeEnableGoNext:e,handleOnClose:i}=n,{owningData:t,product:o,dataFromCms:l,isErrorFiscaleCode:r,personalInfoConfigCms:d,nameFiscalCodeConfigCms:a,taggingInfo:u,isLoading:s,isLoadingReset:c,isLoadingCart:v,isLoggedUser:p,getData:f,onChangeData:g,isPartnerOffer:h}=ep({handleOnChangeEnableGoNext:e,handleOnClose:i});return(0,m.jsxs)("div",{children:[(0,m.jsx)(es,{}),(t.isLogged||p)&&(0,m.jsx)(ei.B,{data:t,isLoading:s,cmsConfig:d}),!t.isLogged&&!c&&!p&&(0,m.jsx)(ei.v,{errorFiscalCode:!t.isValid&&r?r:void 0,data:f(),onChangeData:g,isLoading:null!=t&&!!t.isValid&&!!v||s,cmsConfig:a,taggingData:{trackingProduct:u.trackingProduct,opts:u.opts},isFormDisabled:(null==o?void 0:o.isAcceptedFamilyPlusProduct)||h(),cmsValidationConfig:eu(l)})]})}},{title:ni.Bf.ADDON_CARD,component:n=>{let{handleOnChangeEnableGoNext:e,handleGoNextSlide:i}=n,{addons:t,loadingId:o,addonListFiltered:l,title:r,ctaLabel:d,isLoadingUpdate:a,isLoadingPriceUpdate:u,isLoadingGetAddons:s,callSaveAddon:c,callRemoveAddon:v,goNext:p}=nz({handleOnChangeEnableGoNext:e,handleGoNextSlide:i});en();let[f,h]=(0,g.useState)(!1),[y,b]=(0,g.useState)(!1);return(0,g.useEffect)(()=>
1{if(!(0,ee.k)()){b(!0);return}let n=setTimeout(()=>{b(!0)},5e3);return()=>clearTimeout(n)},[]),(0,g.useEffect)(()=>{y&&!s&&h(!0)},[y,s]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(nD,{addonIdList:l}),(s||!f)&&(0,m.jsx)(nA,{}),!s&&f&&(0,m.jsx)(nx,{title:r,ctaLabel:d,addonList:l,addedAddons:t,isLoadingUpdate:a,isLoadingCartUpdate:u,loadingId:o,saveAddon:c,removeAddon:v,goNext:p})]})}},{title:ni.Bf.DOCUMENT_ID,component:n=>{var e;let{handleOnChangeEnableGoNext:i}=n,[t,o]=(0,g.useState)(!1),{owningData:l,findCaller:r,setCurrentStepKey:d,setOwningData:a,setCheckoutStepState:u}=(0,ne.Mg)(),s=(0,y.CA)(y.Jn,h.b.CMS_GET_PERSONAL_DATA),c=(null==l?void 0:l.isLogged)||(null==r?void 0:r.customerHasActiveSubs),v=(0,h.f)("getCountry"),p=(0,h.f)("customerReference")||q,f=()=>{let n=(0,h.f)("customerData");if(n){var e,i,t,o;let l=(null===(e=String(null==s?void 0:null===(t=s.personalinfo)||void 0===t?void 0:null===(i=t.selectInput)||void 0===i?void 0:i.cieEnabled))||void 0===e?void 0:e.toLowerCase())==="true",r=(null==n?void 0:null===(o=n[0].owningIndividual)||void 0===o?void 0:o.identification[0].identificationNumber)||"";return!l||/^[A-Z]{2}\d{5}[A-Z]{2}$/i.test(r)}};return(0,g.useEffect)(()=>{setTimeout(()=>{null==i||i(t)},1e3)},[t,l]),(0,g.useEffect)(()=>{var n,e,t;null==i||i(!1);let o=null==l?void 0:null===(n=l.owningIndividual)||void 0===n?void 0:n.fiscalCode;localStorage.setItem("customerDataCf",o),localStorage.setItem("name_cus",null==l?void 0:null===(e=l.owningIndividual)||void 0===e?void 0:e.firstName),localStorage.setItem("surname_cus",null==l?void 0:null===(t=l.owningIndividual)||void 0===t?void 0:t.lastName),d(ni.Bf.DOCUMENT_ID),u(ni.v9.DOCUMENT_ID_CARD,{})},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(nd,{}),(0,m.jsx)(X,{configCms:{...$(s,c)},data:l,onChangeData:n=>
1{a(n)},identificationType:nn((null==p?void 0:p.identificationType)||[],(null==s?void 0:null===(e=s.editorialconfigs)||void 0===e?void 0:e.elements)||[])||[],nationality:(null==v?void 0:v.map(n=>n.displayName))||[""],isLoading:!1,setIsValidForm:n=>o(n),isReadonly:(()=>{let n=(0,h.f)("customerData");if(n){var e;let i=new Date((null==n?void 0:null===(e=n[0].owningIndividual)||void 0===e?void 0:e.identification[0].expirationDate)||""),t=new Date;if(((0,b.AQ)()===b.xx.NEXT_USER_ACTIVE||(0,b.AQ)()===b.xx.LOGGED_USER)&&i<=t)return!1;if(((0,b.AQ)()===b.xx.NEXT_USER_ACTIVE||(0,b.AQ)()===b.xx.LOGGED_USER)&&i>t)return f()}return!1})()})]})}},{title:ni.Bf.DOCUMENT_ID_APP_CARD,component:n=>{var e;let{handleOnChangeEnableGoNext:i,handleOnClose:t,handleGoNextSlide:o}=n,[l,r]=(0,g.useState)(!1),{isLoading:d}=cp({handleOnClose:t}),{owningData:a,findCaller:u,setCurrentStepKey:s,setOwningData:c,setCheckoutStepState:v}=(0,ne.Mg)(),p=(0,y.CA)(y.Jn,h.b.CMS_GET_PERSONAL_DATA),f=(null==a?void 0:a.isLogged)||(null==u?void 0:u.customerHasActiveSubs),C=(0,h.f)("getCountry"),E=(0,h.f)("customerReference")||cd,S=()=>{let n=(0,h.f)("customerData");if(n){var e,i,t,o,l,r,d;let a=(null===(e=String(null==p?void 0:null===(t=p.personalinfo)||void 0===t?void 0:null===(i=t.selectInput)||void 0===i?void 0:i.cieEnabled))||void 0===e?void 0:e.toLowerCase())==="true",u=(null==n?void 0:null===(l=n[0].owningIndividual)||void 0===l?void 0:null===(o=l.identification)||void 0===o?void 0:o[0].identificationNumber)||"";return"1"!==((null==n?void 0:null===(d=n[0].owningIndividual)||void 0===d?void 0:null===(r=d.identification)||void 0===r?void 0:r[0].identificationType)||"")||!a||/^[A-Z]{2}\d{5}[A-Z]{2}$/i.test(u)}};return(0,g.useEffect)(()=>{setTimeout(()=>{null==i||i(l)},1e3)},[l,a]),(0,g.useEffect)(()=>{var n,e,t;null==i||i(!1);let o=null==a?void 0:null===(n=a.owningIndividual)||void 0===n?void 0:n.fiscalCode;localStorage.setItem("customerDataCf",o),localStorage.setItem("name_cus",null==a?void 0:null===(e=a.owningIndividual)||void 0===e?void 0:e.firstName),localStorage.setItem("surname_cus",null==a?void 0:null===(t=a.owningIndividual)||void 0===t?void 0:t.lastName),s(ni.Bf.DOCUMENT_ID),v(ni.v9.DOCUMENT_ID_CARD,{})},[]),(0,g.useEffect)(()=>{!d&&S()&&o()},[d]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(cc,{}),(0,m.jsx)(cr,{configCms:{...cu(p,f)},data:a,onChangeData:n=>
1{localStorage.setItem("startCustomerFlow","true"),c(n)},identificationType:cs((null==E?void 0:E.identificationType)||[],(null==p?void 0:null===(e=p.editorialconfigs)||void 0===e?void 0:e.elements)||[])||[],nationality:(null==C?void 0:C.map(n=>n.displayName))||[""],isLoading:d,setIsValidForm:n=>r(n),isReadonly:(()=>{let n=(0,h.f)("customerData");if(n){var e;let i=new Date((null==n?void 0:null===(e=n[0].owningIndividual)||void 0===e?void 0:e.identification[0].expirationDate)||""),t=new Date;if(((0,b.AQ)()===b.xx.NEXT_USER_ACTIVE||(0,b.AQ)()===b.xx.LOGGED_USER)&&i<=t)return!1;if(((0,b.AQ)()===b.xx.NEXT_USER_ACTIVE||(0,b.AQ)()===b.xx.LOGGED_USER)&&i>t)return S()}return!1})()})]})}},{title:ni.Bf.CONTACT_CARD,component:n=>{var e,i,t;let{isLoading:o,customerFlow:l,owningData:r,contactInfo:d,onChangeData:a,onChangeCheck:u,setIsValidForm:s}=iS(n,null==n?void 0:n.handleOnChangeEnableGoNext);return o||(null==l?void 0:null===(e=l.associateCustomer)||void 0===e?void 0:e.isLoading)||(null==l?void 0:null===(i=l.associateCustomer)||void 0===i?void 0:i.isError)||(null==l?void 0:null===(t=l.findcaller)||void 0===t?void 0:t.isLoading)?(0,m.jsx)(eL,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ix,{}),(0,m.jsx)(im,{data:r,checkInfo:d,onChangeData:a,onChangeCheck:u,isReadOnly:(0,ih.A)()===ih.x.NEXT_USER_ACTIVE||(0,ih.A)()===ih.x.LOGGED_USER,setIsValidForm:n=>s(n)})]})}},{title:ni.Bf.CONTACT_CARD_LOCKIN,component:n=>{let{handleOnChangeEnableGoNext:e}=n,i=(0,no.useQueryClient)(),{owningData:t,contactInfo:o,setOwningData:l,setContactInfo:r,setCurrentStepKey:d,setIsDisabledBackButton:a,setCheckoutStepState:u}=(0,ne.Mg)(),{isLoading:s}=ss(n),[c,v]=(0,g.useState)(!1),p=(0,nl.De)("contact","fixed",i),{trackWithNewDatalayer:f,trackView:h}=(0,uw.rS)({event:["contacts"],disableInitialTrack:!0});return((0,uw.kg)(h,"contacts"),(0,g.useEffect)(()=>{s||f({event:["checkout_step3"],event_label:"contacts",opts:null==p?void 0:p.opts,cartProduct:null==p?void 0:p.trackingProduct,pageProduct:null==p?void 0:p.pageProductsInfo,visitorTrackingOpts:(0,nl.bG)()})},[s]),(0,g.useEffect)(()=>{let n=document.getElementById("back-button");e&&((0,uP.g)()?setTimeout(()=>{e(!s&&(c||(0,uP.g)()))},800):setTimeout(()=>{e(!s&&c)},800));let t=()=>{(0,uw.uY)(i,["associateCustomer"])};return null==n||n.addEventListener("click",t),()=>{null==n||n.removeEventListener("click",t)}},[c,s]),(0,g.useEffect)(()=>(d(ni.Bf.CONTACT_CARD_LOCKIN),u(ni.v9.CONTACT_LOCK_IN_CARD,{}),(0,uP._)(o),a(!0),()=>{a(!1)}),[]),s)?(0,m.jsx)(eL,{}):(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(su,{data:t,checkInfo:o,onChangeData:n=>
1{uk(n),l(n)},onChangeCheck:n=>{let e="off";n.checkContactProblem&&(e="on"),(0,nN.dw)("re-contact checkbox ".concat(e)),(0,uP._)(n),r(n)},isReadOnly:!0,setIsValidForm:n=>v(n)})})}},{title:ni.Bf.CONTACT_CARD_LOCKIN_PROSPECT,component:n=>{let{isLoading:e,isValidForm:i,setIsValidForm:t,onChangeData:o,onChangeCheck:l,owningData:r,contactInfo:d}=sJ(n);return e?(0,m.jsx)(eL,{}):(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(sY,{data:r,checkInfo:d,onChangeData:o,onChangeCheck:l,isReadOnly:(0,ih.A)()===ih.x.NEXT_USER_ACTIVE||(0,ih.A)()===ih.x.LOGGED_USER,setIsValidForm:n=>t(n)})})}},{title:ni.Bf.CONFIRM_IDENDITY,component:n=>{let{handleOnChangeEnableGoNext:e}=n,{findCaller:i,setFindCaller:t,product:o,setCheckoutStepState:l}=(0,ne.Mg)(),r=(0,no.useQueryClient)(),{descriptionCms:d,placeholderCms:a,titleCms:u,ctaLabelCms:s,ctaUrl:c}=iD((0,iO.C)(iO.J,eM.b.CMS_GET_PERSONAL_DATA),o),v={getSelectedData:n=>{var e;t({...i,selectedContactMedium:(null===(e=n.field)||void 0===e?void 0:e.trim())?n:void 0})},identityTypeItems:[i.individualRef.email||"",i.individualRef.msisdn||""],title:u,description:d,placeholder:a,cta:{label:s,url:c,action:()=>{(null==o?void 0:o.urlClickToCallOtp)?((0,iL.d)("verify id:".concat(null==s?void 0:s.toLowerCase())),(0,iL.x)(r,null==o?void 0:o.urlClickToCallOtp,o)):c&&((0,iL.d)("verify id:".concat(null==s?void 0:s.toLowerCase())),window.location.href=c)}}};return(0,g.useEffect)(()=>{t({...i,selectedContactMedium:void 0})},[]),(0,g.useEffect)(()=>{if(e){var n;e(!!((null===(n=i.selectedContactMedium)||void 0===n?void 0:n.field)&&i.selectedContactMedium.fieldType))}},[i.selectedContactMedium]),(0,g.useEffect)(()=>
1{l(ni.v9.CONFIRM_IDENTITY_CARD,{})},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iM,{}),(0,m.jsx)(iR.Z,{data:v})]})}},{title:ni.Bf.CONFIRM_IDENDITY_APP,component:n=>{let e=(0,no.useQueryClient)(),{handleOnClose:i}=n,{owningData:t,findCaller:o,setOwningData:l,setFindCaller:r,product:d}=(0,ne.Mg)(),a=(0,nj.f)("appSession"),{isError:u,isSuccess:s,isLoading:c,data:v}=(0,ux.p)({fiscalCode:(null==a?void 0:a.fiscalcode)||""},{enabled:!!(null==a?void 0:a.fiscalcode)}),p=()=>{null==i||i()};return((0,g.useEffect)(()=>{u&&p()},[u]),(0,g.useEffect)(()=>{var n;let i=document.getElementById("back-button");s&&!c&&(null==v?void 0:null===(n=v.individualRef)||void 0===n?void 0:n.msisdn)&&(l({...t,owningIndividual:{...t.owningIndividual,firstName:(null==a?void 0:a.firstname)||"",lastName:(null==a?void 0:a.lastname)||"",fiscalCode:(null==a?void 0:a.fiscalcode)||""},isValid:!0}),r({...v,showOtp:!0,verifyOtp:"",isVerified:!1,selectedContactMedium:void 0}));let o=()=>{(0,ib.u)(e,["findCaller"])};return null==i||i.addEventListener("click",o),()=>{null==i||i.removeEventListener("click",o)}},[s,c]),!s||c)?(0,m.jsx)(E.Z,{...uT}):(0,m.jsx)(u_,{...n,else:{findCaller:o,setFindCaller:r,product:d}})}},{title:ni.Bf.OTP,component:n=>{var e;let{handleOnChangeEnableGoNext:i,handleGoPrevSlide:t}=n,{dataFromCms:o,findCaller:l,product:r,isError:d,isLoading:a,isSuccessVerifyOtp:u,isTimerActive:s,handleSendOtp:c,handleVerify:v,handleSetError:p}=iN({handleOnChangeEnableGoNext:i,handleGoPrevSlide:t});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iA,{}),(0,m.jsx)(iI.m,{product:r,contactMedium:l.selectedContactMedium,isError:d,isSuccessVerifyOtp:u,isLoading:a,reSendOtp:c,onVerify:v,setIsError:p,configOtp:(0,iI.z)(null==o?void 0:o.personalinfo,(null==l?void 0:null===(e=l.selectedContactMedium)||void 0===e?void 0:e.fieldType)==="msisdn",null==l?void 0:l.selectedContactMedium),isTimerActive:s})]})}},{title:ni.Bf.PORTABILITY_NUMBER,component:oO},{title:ni.Bf.INVOICE,component:n=>{var e;let{customerFlow:i,setIsDisabledBackButton:t,setCheckoutStepState:o}=(0,ne.Mg)();return((0,g.useEffect)(()=>{var n;t(!(null==i?void 0:null===(n=i.billingAccount)||void 0===n?void 0:n.isSuccess))},[i.billingAccount]),(0,g.useEffect)(()=>{o(ni.v9.INVOICE_CARD,{})},[]),null==i?void 0:null===(e=i.billingAccount)||void 0===e?void 0:e.isSuccess)?(0,m.jsx)(aA,{children:(0,m.jsx)(ax,{...n})}):(0,m.jsx)(eL,{})}},{title:ni.Bf.TERMS_AND_CONDITIONS,component:n=>{let{handleGoNextSlide:e,handleOnChangeEnableGoNext:i,handleGoPrevSlide:t}=n,{currentStepKey:o,checkoutErrors:l,termsAndConditions:r,isNewShippingAddress:d,deliveryAdvance:a,isModalButtonSticky:u,product:s,setIsDisabledBackButton:c,setTermsAndConditions:v,setCurrentStepKey:p,setCheckoutStepState:f}=(0,ne.Mg)(),h=(0,no.useQueryClient)(),[y,b]=(0,g.useState)(!1),{buttonGenericError:C,urlGenericErrorCallMeNow:E}=(0,lV.S6)(s),S=(0,lV.CA)(lV.Jn,lU.b.CMS_GET_GENERIC_ERROR),x=lW((0,lV.CA)(lV.Jn,lU.b.CMS_GET_TERMS_AND_CONDITIONS)),I=n=>{b(n)};return(0,g.useEffect)(()=>{if(i){if(r.isSuccessTermsAndConditions&&r.consensus)i(r.isSuccessTermsAndConditions);else if(i(!1),!(null==r?void 0:r.isLoadingTermsAndConditions)&&!(null==r?void 0:r.isSuccessTermsAndConditions)&&(null==r?void 0:r.isErrorTermsAndConditions)){var n;null==l||null===(n=l.showAndTrackError)||void 0===n||n.call(l,S,t,(0,lV.nQ)("termsAndConditions",{url:"getTermsAndConditions",status:"500",statusText:"500"}),x.titleModal,x.messageModal,t,x.buttonLabel||"Chiudi",()=>(0,lU.x)(h,E,s,t,o,(0,lV.nQ)("termsAndConditions",{url:"getTermsAndConditions",status:"500",statusText:"500"})),C,u,!0)}}},[r]),(0,g.useEffect)(()=>{c(null==a?void 0:a.isLoading)},[a]),(0,g.useEffect)(()=>{p(ni.Bf.TERMS_AND_CONDITIONS),f(ni.v9.TERMS_AND_CONDITIONS_CARD,{}),localStorage.removeItem(lV._9)},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(rK,{}),(null==a?void 0:a.isLoading)||r.isLoadingTermsAndConditions?(0,m.jsx)(eL,{}):(0,m.jsxs)(m.Fragment,{children:[d&&(0,m.jsx)(rt,{...n}),!d&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(rX,{setNextAble:(n,e)=>{n&&v({...r,consensus:e,optionToReconsider:"yes"===n?"no":"yes"})},value:r,pdfContractSummary:null==s?void 0:s.pdfContractSummary,onChangePopupWithdrawal:I}),(0,m.jsx)(rq,{handleGoNextSlide:e,handleOnChangeEnableGoNext:i,onChangePopupWithdrawal:I,isOpenWithdrawalPopUp:y})]})]})]})}},{title:ni.Bf.CONSENTS,component:n=>{let{isLoading:e}=r8(n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r5,{}),e&&(0,m.jsx)(E.Z,{...r$}
1),!e&&(0,m.jsx)(r6,{...n})]})}},{title:ni.Bf.UPFRONT_SELECTION,component:n=>{let{handleOnChangeEnableGoNext:e,handleOnClose:i}=n,{currentStepKey:t,checkoutErrors:o,product:l,upfrontSelection:r,isModalButtonSticky:d,setUpfrontSelection:a,setCurrentStepKey:u,setCheckoutStepState:s}=(0,ne.Mg)(),c=(0,no.useQueryClient)(),[v,p]=(0,g.useState)(),[f,h]=(0,g.useState)(!1),C=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),{checkoutFWA:E}=uh(l),S=ug();return(0,g.useEffect)(()=>{let n=document.getElementById("sticky-offer-next"),e=()=>{let n=(null==v?void 0:v.value)==="1"?"one payment":"monthly payment";(0,nN.Fk)({event_name:"ui_interaction",event_label_track:n,event_category:"users",event_action:"click",tracking_type:"link"})};return null==n||n.addEventListener("click",e),()=>{null==n||n.removeEventListener("click",e)}},[v]),(0,g.useEffect)(()=>{if(S.isSuccess&&e&&(e(!0),h(!1)),S.isLoading&&e&&(e(!1),h(!0)),S.isError){var n,r,a;null==o||null===(a=o.showAndTrackError)||void 0===a||a.call(o,C,i,{...(0,b.nQ)("updateShoppingCartPayment",null==S?void 0:S.error),isBlocking:!0},"","",i,(null==C?void 0:null===(n=C.genericerror)||void 0===n?void 0:n.buttonLabel)||"",()=>{var n;return(0,nk.x)(c,(null==l?void 0:null===(n=l.genericErrorCallMeNow)||void 0===n?void 0:n.url)||"",l,i,t,(0,b.nQ)("updateShoppingCartPayment",null==S?void 0:S.error))},null==l?void 0:null===(r=l.genericErrorCallMeNow)||void 0===r?void 0:r.label,d)}},[S.isSuccess,S.isLoading,S.isError]),(0,g.useEffect)(()=>{p(void 0),a({option:""}),u(ni.Bf.INVOICE),s(ni.v9.UPFRONT_SELECTION_CARD,{}),e&&e(!1)},[]),(0,m.jsxs)("div",{children:[(0,m.jsx)(uy,{}),(null==E?void 0:E.items)&&(0,m.jsx)(iP.k,{items:null==E?void 0:E.items,title:null==E?void 0:E.title,description:null==E?void 0:E.description,setSelectedItem:p,selectedItem:v,onSelectItem:n=>{(null==n?void 0:n.value)!==void 0&&(null==n?void 0:n.value)!==(null==r?void 0:r.option)&&(a({option:n.value}),S.mutate("1"===n.value))},value:r.option,disableItems:f})]})}},{title:ni.Bf.DELIVERY_ADDRESS,component:n=>{let{handleOnChangeEnableGoNext:e,steps:i}=n,{showTechAddress:t,addressCmsData:o,isLoadingCheck:l,isErrorCheck:r,isDeliveredByFW:d}=function(n){var e,i,t,o,l;let{handleOnChangeEnableGoNext:r,steps:d}=n,{owningData:{owningIndividual:a},checkoutErrors:u,termsAndConditions:s,installationAddress:c,shippingAddress:v,billingAddress:p,portability:f,portabilityStatus:m,setIsDisabledBackButton:h,setSlidesGoBack:C,setPortability:E,setPortabilityStatus:S,setCurrentStepKey:x,setTermsAndConditions:I,setCheckoutStepState:A}=(0,ne.Mg)(),_=(0,no.useQueryClient)(),T=(0,iC.x8)(),N=_.getQueryData("shoppingCart"),L=null==N?void 0:null===(l=N.cartItem)||void 0===l?void 0:null===(o=l[0])||void 0===o?void 0:null===(t=o.internet)||void 0===t?void 0:null===(i=t[0])||void 0===i?void 0:null===(e=i.product)||void 0===e?void 0:e.productCharacteristic,O=null==L?void 0:L.some(n=>(null==n?void 0:n.value)==="TechDeliv_Install_FW"),R=!((null==T?void 0:T.mappedCategory)===lZ.Z.FTTH||(null==T?void 0:T.mappedCategory)===lZ.Z.FTTHTIM),D=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),M=(0,y.CA)(y.Jn,iy.bl.CMS_GET_DELIVERY_INFORMATION),P=(0,y.CA)(y.Jn,iy.bl.CMS_GET_EDIT_ADDRESS),w=(0,y.CA)(y.Jn,iy.bl.CMS_GET_PORTABILITY),k=(0,g.useMemo)(()=>lH(M,a,c,v,p,P,R,O),[M,a,c,v,p,P,R,O]),j=()=>{null==r||r(!(null==m?void 0:m.isLoadingCheck))};return(0,g.useEffect)(()=>{if(null==m?void 0:m.isErrorCheck){var n,e,i,t,o,l;let r=(null==f?void 0:null===(n=f.portabilityInfo)||void 0===n?void 0:n.toLowerCase())==="telint";nB.KF.log("Error: portability_error"),null==u||null===(l=u.showAndTrackError)||void 0===l||l.call(u,D,()=>{C(r?5:4),S({...m,isLoading:!1,isSuccess:!1,isError:!1}),E({...f})},(0,b.nQ)("portability",{url:"checkPortInFeasibilityII",status:"200",statusText:(null==m?void 0:m.errorMessage)||""},null==m?void 0:m.errorMessage,null==m?void 0:m.errorMessage),(null==w?void 0:null===(i=w.portability)||void 0===i?void 0:null===(e=i.errorOnPortability)||void 0===e?void 0:e.title)||"Ops",(null==w?void 0:null===(o=w.portability)||void 0===o?void 0:null===(t=o.errorOnPortability)||void 0===t?void 0:t.message)||"Abbiamo avuto un problema durante la portabilit\xe0")}},[f]),(0,g.useEffect)(()=>{j()},[d]),(0,g.useEffect)(()=>{h(!!(null==m?void 0:m.isLoadingCheck)),j()},[null==m?void 0:m.isLoadingCheck]),(0,g.useEffect)(()=>{x(ni.Bf.DELIVERY_ADDRESS),A(ni.v9.DELIVERY_ADDRESS_CARD,{}),I({...s,preConsensus:!0})},[]),{showTechAddress:R||O,addressCmsData:k,isLoadingCheck:!!(null==m?void 0:m.isLoadingCheck),isErrorCheck:!!(null==m?void 0:m.isErrorCheck),isDeliveredByFW:O}}({handleOnChangeEnableGoNext:e,steps:i});return(0,m.jsxs)(g.Fragment,{children:[(0,m.jsx)(lz,{}),l&&(0,m.jsx)(eL,{}),!l&&!r&&(0,m.jsx)(lB,{...o,showTechAddress:t,isDeliveredByFW:d})]})}},{title:ni.Bf.RECURRENT_PAYMENT_CARD,component:n=>{var e,i;
1let{authorizeFlow:t,cmsWarningPayment:o,items:l,title:r,description:d,modal:a,onOpenModal:u,setSelectedItem:s,selectedItem:c}=da(n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(de,{}),(null==t?void 0:null===(e=t.authorize)||void 0===e?void 0:e.isLoading)&&(0,m.jsx)(dn.Z,{...o}),!(null==t?void 0:null===(i=t.authorize)||void 0===i?void 0:i.isLoading)&&(0,m.jsx)(iP.k,{items:l,title:r,description:d,bottomModal:a,onOpeneModal:u,setSelectedItem:s,selectedItem:c})]})}},{title:ni.Bf.UPFRONT_PAYMENT,component:n=>{var e,i;let{checkoutErrors:t,authorizationAsyncInfo:o,isModalButtonSticky:l,setAuthorizationAsyncInfo:r,setIsDisabledBackButton:d,setIsStartAuthorizationAsyncInfo:a,setCheckoutStepState:u}=(0,ne.Mg)(),{handleGoPrevSlide:s}=n,c=localStorage.getItem(du.aY),v=(null==c?void 0:c.toLowerCase())===dl.Q.WALLET.toLowerCase(),p=!v&&!((null==o?void 0:null===(e=o.payMean)||void 0===e?void 0:e.isSuccess)&&(null==o?void 0:null===(i=o.authorization)||void 0===i?void 0:i.isSuccess)),f=(0,du.CA)(du.Jn,eM.b.CMS_GET_GENERIC_ERROR),{error:h,isError:y}=o.authorization,b=()=>{v||a(!0)};return((0,g.useEffect)(()=>{if(y){var n,e,i;null==t||null===(i=t.showAndTrackError)||void 0===i||i.call(t,f,()=>{r({...n0.$i}),null==s||s()},h||void 0,(null==f?void 0:null===(n=f.genericerror)||void 0===n?void 0:n.title)||"Ops",(null==f?void 0:null===(e=f.genericerror)||void 0===e?void 0:e.description)||"Si \xe8 verificato un errore durante il recupero dei pagamenti. Riprovare in seguito",()=>{r({...n0.$i}),null==s||s()},"Chiudi",void 0,void 0,l,!0)}},[o]),(0,g.useEffect)(()=>{d(p)},[p]),(0,g.useEffect)(()=>{r({...n0.$i}),setTimeout(()=>{b()},1e4)},[]),(0,g.useEffect)(()=>{u(ni.v9.UPFRONT_PAYMENT_CARD,{})},[]),p)?(0,m.jsx)(eL,{}):(0,m.jsx)(dI,{...n})}},{title:ni.Bf.VOUCHER,component:n=>{let{isValidVoucher:e}=up();return e?(0,m.jsx)(uv,{...n}):(0,m.jsx)(aG,{...n})}},{title:ni.Bf.PORTABILITY_LINE,component:n=>{let{handleOnChangeEnableGoNext:e,handleOnClose:i}=n,{cardData:t,portability:o,selectedItem:l,isSuccessAssociate:r,handleSelect:d,setSelectedItem:a}=ij({handleOnChangeEnableGoNext:e,handleOnClose:i});return r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iz,{}),(0,m.jsx)(iP.k,{title:t.title,items:t.items,value:o.portabilityLine,selectedItem:l,setSelectedItem:a,onSelectItem:d})]}):(0,m.jsx)(eL,{})}},{title:ni.Bf.PORTABILITY_LINE_APP,component:n=>{let{cardData:e,selectedItem:i,portability:t,isLoading:o,setSelectedItem:l,handleSelect:r}=uM(n);return o?(0,m.jsx)(uL,{children:(0,m.jsx)(eg.Z,{quantity:4,heights:75,space:40})}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(uO,{}),(0,m.jsx)(iP.k,{title:e.title,items:e.items,value:t.portabilityLine,selectedItem:i,setSelectedItem:l,onSelectItem:r})]})}},{title:ni.Bf.PORTABILITY_INTERNET,component:n=>{let{handleOnChangeEnableGoNext:e}=n,{title:i,description:t}=iU({handleOnChangeEnableGoNext:e});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iH,{}),(0,m.jsx)(iZ.Z,{title:i,description:t})]})}},{title:ni.Bf.PORTABILITY,component:n=>{let{handleOnChangeEnableGoNext:e}=n,{title:i,description:t,items:o,portability:l,selectedItem:r,setSelectedItem:d,handleSelect:a}=t7(e);return(0,m.jsx)(iP.k,{title:i,description:t,items:o,value:(null==l?void 0:l.portabilityWant)||!1,selectedItem:r,setSelectedItem:d,onSelectItem:a})}},{title:ni.Bf.PORTABILITY_NUMBER,component:oO},{title:ni.Bf.PORTABILITY_INFORMATIONS,component:n=>{let{handleOnChangeEnableGoNext:e}=n,{title:i,items:t,description:o,selectedItem:l,portability:r,setSelectedItem:d,handleSelect:a}=iY({handleOnChangeEnableGoNext:e});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(iQ,{}),(0,m.jsx)(iP.k,{items:t,description:o,title:i,value:r.portabilityInfo,selectedItem:l,setSelectedItem:d,onSelectItem:a})]})}},{title:ni.Bf.PORTABILITY_MIGRATIONS,component:n=>{let{handleGoNextSlide:e}=n,{isLoading:i,portabilityData:t,onChangeFirstCode:o,onChangeSecondCode:l,onNoCode:r,portability:d,isMultipleOperators:a}=t2(n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(tJ,{isMultipleOperators:a}),i&&(0,m.jsx)(eL,{}),!i&&(0,m.jsx)(tW,{handleGoNextSlide:e,portabilityData:t,onChangeFirst:o,onChangeSecond:l,data:(null==d?void 0:d.portabilityMigration)||{},onNoCode:r})]})}},{title:ni.Bf.OPERATORS_INFORMATIONS,component:n=>{let{handleOnChangeEnableGoNext:e}=n,{portabilityStatus:i,title:t,description:o,items:l,portability:r,selectedItem:d,setSelectedItem:a,handleSelect:u}=t6(e);return(null==i?void 0:i.isLoadingCheck)?(0,m.jsx)(E.Z,{...t3}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(t4,{}),(0,m.jsx)(iP.k,{title:t,description:o,items:l,value:r.portabilityOperators,selectedItem:d,setSelectedItem:a,onSelectItem:u})]})}},{title:ni.Bf.PAYMENT_METHOD_WITHOUT_RECURRING,component:n=>{var e,i;let{handleOnChangeEnableGoNext:t,handleGoNextSlide:o,handleGoPrevSlide:l}=n,r=(0,no.useQueryClient)(),{currentStepKey:d,checkoutErrors:a,product:u,authorizeFlow:s,owningData:c,isModalButtonSticky:v,customerFlow:p,setIsLastCard:f,setCurrentStepKey:h,setHideStickyBar:C,setIsDisabledBackButton:E,setIsPreselectedCard:S,setAuthorizeFlow:x,setCheckoutStepState:I}=(0,ne.Mg)(),{paymean:A}=p,{authorize:_}=s,T=(0,b.sJ)(null==A?void 0:A.data),N=(0,y.CA)(y.Jn,iy.bl.CMS_GET_PAYMENTS),{buttonPaymentError:L,urlPaymentErrorCallMeNow:O}=(0,b.S6)(u),{title:R,subtitle:D,buttonLabel:M,yourIbanTitle:P,yourCredit
1CardTitle:w,yourDebitCardTitle:k,yourPrepaidCardTitle:j,yourPaypalTitle:B,expirationLabelTitle:F}=uC(N),{titlePaymentError:z,messagePaymentError:Z}=uE(N),H=(0,y.CA)(y.Jn,iy.bl.CMS_GET_PAYMENTS),V=(0,y.CA)(y.Jn,iy.bl.CMS_GET_GENERIC_ERROR),U={title:(null==H?void 0:null===(e=H.paymentsmobile)||void 0===e?void 0:e.title)||"Grazie!",subtitle:"Stiamo elaborando il tuo ordine",description:(null==H?void 0:null===(i=H.paymentsmobile)||void 0===i?void 0:i.description)||"Per completare l'operazione potrebbe volerci qualche istante. Per favore attendi qui, senza lasciare la pagina."},Q=()=>{var n;let e=()=>{l&&l()};null==a||null===(n=a.showAndTrackError)||void 0===n||n.call(a,V,e,(null==_?void 0:_.error)||void 0,z,Z,e,"Chiudi",()=>{var n;return(0,nk.x)(r,O,u,e,d,(0,b.nQ)("authorize",null==_?void 0:null===(n=_.error)||void 0===n?void 0:n.error))},L,v,!0)},G=n=>{null==n||n.stopPropagation(),(0,nN.Fk)({event_name:"ui_interaction",event_label_track:null==T?void 0:T.type,event_category:"users",event_action:"click",tracking_type:"link"}),x({...s,selectedMethod:(null==T?void 0:T.type)||"",siaFlowType:ub.K.RECURRENT,authorizationOperationMethod:"verify",isStartAuthorizeFlow:!0})},Y=()=>{setTimeout(()=>{let n=document.getElementById("sticky-offer-next");if(null==n||n.removeEventListener("click",G),null==n?void 0:n.firstChild){var e;null==n||null===(e=n.firstChild)||void 0===e||e.click()}},800)},W=()=>{E(null==_?void 0:_.isLoading),C(null==_?void 0:_.isLoading)};return(0,g.useEffect)(()=>{(null==_?void 0:_.isError)&&Q(),W(),(null==_?void 0:_.isSuccess)&&Y()},[_]),(0,g.useEffect)(()=>{var n;h(ni.Bf.PAYMENT_METHOD_WITHOUT_RECURRING),I(ni.v9.PAYMENT_METHOD_WITHOUT_RECURRING_CARD,{}),S(!0),f(!0),null==s||null===(n=s.resetReserveAuthorization)||void 0===n||n.call(s);let e=document.getElementById("sticky-offer-next");return null==t||t(!0),null==e||e.addEventListener("click",G),()=>{f(!1),null==e||e.removeEventListener("click",G)}},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(uS,{}),(null==_?void 0:_.isLoading)&&(0,m.jsx)(dn.Z,{...U}),!(null==_?void 0:_.isLoading)&&(0,m.jsx)(ds.X,{owningIndividual:c.owningIndividual,handleChangePayment:()=>{f(!1),setTimeout(()=>{(0,nN.Fk)({event_name:"ui_interaction",event_label_track:"change paym method",event_category:"users",event_action:"click",tracking_type:"link"}),null==o||o()},300)},handleGoPrevSlide:l,payMean:T,config:{title:R,subtitle:D,buttonLabel:M,titlePaymentError:z,messagePaymentError:Z,yourIbanTitle:P,yourCreditCardTitle:w,yourDebitCardTitle:k,yourPrepaidCardTitle:j,yourPaypalTitle:B,expirationLabelTitle:F}})]})}}],cg=n=>cf.find(e=>e.title===n)||{},cm={ADDONS:[cg(ni.Bf.ADDON_CARD)]},ch={DOCUMENT_ID_ADD:[cg(ni.Bf.DOCUMENT_ID_APP_CARD)]},cy={VOUCHER:[cg(ni.Bf.VOUCHER)]},cb={PERSONAL_INFO:[cg(ni.Bf.PERSONAL_INFO),cg(ni.Bf.CONTACT_CARD),cg(ni.Bf.DOCUMENT_ID)]},cC={PERSONAL_INFO_LOCKIN_MM:[cg(ni.Bf.CONTACT_CARD),cg(ni.Bf.DOCUMENT_ID)]},cE={PERSONAL_INFO_LOCKIN:[cg(ni.Bf.CONTACT_CARD_LOCKIN),cg(ni.Bf.DOCUMENT_ID)]},cS={PERSONAL_INFO_LOCKIN_PROSPECT:[cg(ni.Bf.CONTACT_CARD_LOCKIN_PROSPECT),cg(ni.Bf.DOCUMENT_ID)]},cx={OTP:[cg(ni.Bf.CONFIRM_IDENDITY),cg(ni.Bf.OTP)]},cI={OTP:[cg(ni.Bf.CONFIRM_IDENDITY_APP),cg(ni.Bf.OTP)]},cA={PORTABILITY_LINE:[cg(ni.Bf.PORTABILITY_LINE)],PORTABILITY_LINE_APP:[cg(ni.Bf.PORTABILITY_LINE_APP)],PORTABILITY:[cg(ni.Bf.PORTABILITY)],PORTABILITY_INTERNET:[cg(ni.Bf.PORTABILITY_INTERNET)],PORTABILITY_INFO:[cg(ni.Bf.PORTABILITY_NUMBER),cg(ni.Bf.PORTABILITY_INFORMATIONS),cg(ni.Bf.PORTABILITY_MIGRATIONS)],PORTABILITY_OPERATORS:[cg(ni.Bf.OPERATORS_INFORMATIONS)]},c_={TERMS:[cg(ni.Bf.INVOICE),cg(ni.Bf.TERMS_AND_CONDITIONS),cg(ni.Bf.CONSENTS)]},cT={DELIVERY:[cg(ni.Bf.DELIVERY_ADDRESS)]},cN={UPFRONT_SELECTION:[cg(ni.Bf.UPFRONT_SELECTION)]},cL={UPFRONT_PAYMENT:[cg(ni.Bf.UPFRONT_PAYMENT)]},cO={PAYMENT_METHOD:[cg(ni.Bf.PAYMENT_METHOD_WITHOUT_RECURRING)]},cR=[{title:"",component:void 0},{title:"",component:void 0}],cD={RECURRENT_PAYMENT_CARD:[cg(ni.Bf.RECURRENT_PAYMENT_CARD)]},cM={DEFAULT:[...cb.PERSONAL_INFO,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cR],LOCKIN:[...cE.PERSONAL_INFO_LOCKIN,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cR],LOCKIN_MM:[...cC.PERSONAL_INFO_LOCKIN_MM,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cR],LOCKIN_PROSPECT:[...cS.PERSONAL_INFO_LOCKIN_PROSPECT,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cR],DEFAULT_WITH_RECURRING_PAYMENT:[...cb.PERSONAL_INFO,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cL.UPFRONT_PAYMENT,...cR],LOCKIN_WITH_RECURRING_PAYMENT:[...cE.PERSONAL_INFO_LOCKIN,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cL.UPFRONT_PAYMENT,...cR],LOCKIN_MM_WITH_RECURRING_PAYMENT:[...cC.PERSONAL_INFO_LOCKIN_MM,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cL.UPFRONT_PAYMENT,...cR],LOCKIN_PROSPECT_WITH_RECURRING_PAYMENT:[...cS.PERSONAL_INFO_LOCKIN_PROSPECT,...cA.PORTABILITY_LINE,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cL.UPFRONT_PAYMENT,...cR],APP:[...cI.OTP,...ch.DOCUMENT_ID_ADD,...cA.PORTABILITY_LINE_APP,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cR],APP_WITH_RECURRING_PAYMENT:[...cI.OTP,...ch.DOCUMENT_ID_ADD,...cA.PORTABILITY_LINE_APP,...cT.DELIVERY,...c_.TERMS,...cN.UPFRONT_SELECTION,...cy.VOUCHER,...cD.RECURRENT_PAYMENT_CARD,...cL.UPFRONT_PAYMENT,...cR]}},30100:function(n,e,i){i.d(e,{e:function(){return o},j:function(){return t}});let t="phone_cus",o="email_cus"},18899:function(n,e,i){i.d(e,{v_:function(){return L},Tz:function(){return T},Bw:function(){return h},wc:function(){return F},wp:function(){return I},_j:function(){return Z},lS:function(){return R},gJ:function(){return O},De:function(){return D},yP:function(){return z},J5:function(){return w},bG:function(){return M},C:function(){return j},sU:function(){return k},Vd:function(){return E},hH:function(){return C},Lq:function(){return b},jZ:function(){return y},b0:function(){return A},sS:function(){return N},Vp:function(){return _},$G:function(){return B}});var t=i(11946),o=i(4217),l=i(11958),r=i(71170),d=i(52378),a=i(3307),u=i(72430),s=i(11403),c=i(9399),v=i(69947),p=i(19243),f=i(29470),g=i(12902),m=i(64268);let h=()=>{var n,e,i,o;let l=(0,m.YZ)();if(m.An&&(null==l?void 0:l.enableRecurringPayment))return!0;let r=(0,a.f)("shoppingCart"),d=null==r?void 0:null===(n=r.cartItem)||void 0===n?void 0:n[0],u=null==d?void 0:null===(i=d.internet)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.itemPrice,s=null==u?void 0:u.find(n=>{var e,i;return(null==n?void 0:null===(e=n.originalType)||void 0===e?void 0:e.toLowerCase())===t.MM.ONE_TIME.toLowerCase()&&(null==n?void 0:null===(i=n.type)||void 0===i?void 0:i.toLowerCase())==="activation"});return(null==s?void 0:null===(o=s.originalSubType)||void 0===o?void 0:o.toLowerCase())==="immediate"},y=()=>(0,d.r)()&&"undefined"!==localStorage.getItem("isTechFWA")&&!0===JSON.parse(localStorage.getItem("isTechFWA")),b=()=>(0,d.r)()&&"undefined"!==localStorage.getItem("isTechFWA")&&!0===JSON.parse(localStorage.getItem("isOutdoor")),C=()=>{var n,e;return!!(0,d.r)()&&(null===(e=window)||void 0===e?void 0:null===(n=e.location)||void 0===n?void 0:n.search).includes(o.S.ERROR_ON_PAYMENT)},E=()=>{var n,e;return!!(0,d.r)()&&(null===(e=window)||void 0===e?void 0:null===(n=e.location)||void 0===n?void 0:n.search).includes(o.S.MODE_BACK_SIA_INSTANT)},S=()=>{var n,e;return!!(0,d.r)()&&(null===(e=window)||void 0===e?void 0:null===(n=e.location)||void 0===n?void 0:n.search).includes(o.S.MODE_DONE_SIA_RECURRENT)},x=n=>
1n.enableVoucher||!1,I=()=>{let n=(0,m.S4)();return!!n&&(S()?f.Bf.UPFRONT_PAYMENT:(null==n?void 0:n.currentStepKey)||f.xz)},A=(n,e,i,t)=>{let o=n.findIndex(n=>n.title===i),l=n.slice(0,o+1),r=n.slice(o+1);if(e){if(t[0].title===r[0].title)return n;l=(l=l.concat(t)).concat(r)}else if(r[0].title===t[0].title){let n=r.slice(t.length);l=l.concat(n)}else if((null==t?void 0:t.findIndex(n=>n.title===r[0].title))>-1){let n=r.slice(1);l=l.concat(n)}else l=l.concat(r);return l},_=function(n){var e;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=null==n?void 0:n.owningIndividual,l=(0,t.NE)(o);if(!o)return v.gE.owningIndividual;let r=null==i?void 0:i.filter(n=>n.id===(null==l?void 0:l.nationality)),d="",a=(null==l?void 0:l.expirationDate)?(n=>{let e=n.toString(),i=e.substring(0,4),t=e.substring(5,7);return e.substring(8).concat("/",t,"/",i)})(l.expirationDate):"";return(null==l?void 0:l.identificationType)==="1"?d="Carta d'identit\xe0":(null==l?void 0:l.identificationType)==="2"?d="Passaporto":(null==l?void 0:l.identificationType)==="3"&&(d="Patente di guida"),{nation:(null==o?void 0:o.nation)||"",firstName:(null==o?void 0:o.firstName)||"",lastName:(null==o?void 0:o.lastName)||"",fiscalCode:(null==o?void 0:o.fiscalCode)||"",identification:[{identificationType:d,nationality:(null==r?void 0:null===(e=r[0])||void 0===e?void 0:e.displayName)||"",identificationNumber:(null==l?void 0:l.identificationNumber)||"",expirationDate:a}],contactMedium:[null==o?void 0:o.contactMedium[0],null==o?void 0:o.contactMedium[1]]}},T=(n,e,i)=>{let t={title:(null==i?void 0:i.title)||"",message:(null==i?void 0:i.description)||"",actionText:(null==i?void 0:i.buttonLabel)||"",url:""},l=(e,i,t)=>{var o,l;let r=null==n?void 0:n.find(n=>n.error===e);return{title:(null==r?void 0:r.title)||i||"",message:(null==r?void 0:r.message)||t||"",actionText:(null==r?void 0:null===(o=r.button)||void 0===o?void 0:o.title)||"",url:(null==r?void 0:null===(l=r.button)||void 0===l?void 0:l.urlForRedirect)||"",isPopup:(null==r?void 0:r.isClickToCall)==="true",disableTrack:!0}};return e===o.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT&&(t=l(o.S.CREATE_CUSTOMER_PHONE_NUMBER_ALREADY_PRESENT,"Attenzione","Il numero di telefono inserito \xe8 gi\xe0 esistente")),e===o.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT&&(t=l(o.S.CREATE_CUSTOMER_EMAIL_ADDRESS_ALREADY_PRESENT,"Attenzione","L'e-mail inserita \xe8 gi\xe0 esistente")),e===o.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT&&(t=l(o.S.CREATE_CUSTOMER_CONTACT_ALREADY_PRESENT,"Attenzione","I dati di contatto inseriti sono associati ad un altro utente")),e===o.S.CREATE_CUSTOMER_FISCAL_CODE_ALREADY_PRESENT&&(t=l(o.S.CREATE_CUSTOMER_FISCAL_CODE_ALREADY_PRESENT,"Attenzione","Esiste gi\xe0 un utente con questo codice fiscale.")),e===o.S.CREATE_CUSTOMER_DOCUMENT_ALREADY_PRESENT&&(t=l(o.S.CREATE_CUSTOMER_DOCUMENT_ALREADY_PRESENT,"Attenzione","Il documento inserito \xe8 gi\xe0 presente")),e===o.S.CREATE_CUSTOMER_MISSING_NATION_ADDRESS&&(t=l(o.S.CREATE_CUSTOMER_MISSING_NATION_ADDRESS,"Attenzione","L'indirizzo selezionato non \xe8 disponibile. Si prega di riprovare pi\xf9 tardi")),e===o.S.ASSOCIATE_CUSTOMER_BLOCKED&&(t=l(o.S.ASSOCIATE_CUSTOMER_BLOCKED,"Attenzione","Questa offerta non \xe8 compatibile per questa tipologia di utente")),t},N=n=>{var e,i,t,o,l,r;return{titleErrorPayment:(null==n?void 0:null===(i=n.paymentsmobile)||void 0===i?void 0:null===(e=i.paymentError)||void 0===e?void 0:e.title)||"",messageErrorPayment:(null==n?void 0:null===(o=n.paymentsmobile)||void 0===o?void 0:null===(t=o.paymentError)||void 0===t?void 0:t.description)||"",actionTextErrorPayment:(null==n?void 0:null===(r=n.paymentsmobile)||void 0===r?void 0:null===(l=r.paymentError)||void 0===l?void 0:l.buttonLabel)||""}},L=n=>{let e=document.getElementById("stepper-cards-container"),i=document.getElementById("sticky-offer-stepper");e&&i&&("hide"===n?(e.style.visibility="hidden",i.style.visibility="hidden"):(e.style.visibility="inherit",i.style.visibility="inherit"))},O=(n,e)=>n.findIndex(n=>n.title===e),R=()=>{var n,e,i,t,o,l;let r={options:[],selectedInstallment:""},d=(0,a.f)("shoppingCart"),u=null==d?void 0:null===(e=d.cartItem)||void 0===e?void 0:null===(n=e[0].internet)||void 0===n?void 0:n[0];if((null==u?void 0:null===(i=u.itemPrice)||void 0===i?void 0:i.length)<=0)return r;let s=null==u?void 0:null===(t=u.itemPrice)||void 0===t?void 0:t.find(n=>"activation"===n.type);return s?{options:(null==s?void 0:null===(o=s.installmentInfo)||void 0===o?void 0:o.installmentOptions)||[],selectedInstallment:(null==s?void 0:null===(l=s.installmentInfo)||void 0===l?void 0:l.selectedInstallment)||""}:r},D=function(n){var e,i,o,l,d;let u,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fixed",v=arguments.length>2?arguments[2]:void 0,p=(0,m.YZ)(),f=(0,m.SS)(),h=null===(o=window)||void 0===o?void 0:null===(i=o.location)||void 0===i?void 0:null===(e=i.href)||void 0===e?void 0:e.includes("checkOrder"),y=(0,a.f)("shoppingCart"),b=null==p?void 0:p.isWinback;if(p&&v&&f){let{getCartProductsWithAddon:n,retrieveCartAddons:e}=(0,c.Vz)(v);u=n(p,e(f))}let C={...(null==y?void 0:y.id)&&{cart_id:null==y?void 0:y.id},cart_product_id:"".concat(null==p?void 0:p.offerId),cart_product_name:null==p?void 0:p.slug,cart_product_category:s,cart_product_price:(null==p?void 0:p.price)&&(0,r.F)(p.price),cart_product_quantity:"1",cart_product_te
1chnology:(0,t.CO)()||"",cart_total:(null==p?void 0:p.price)&&(0,r.F)(p.price),...u&&u},E={product_name:(null==p?void 0:p.slug)||"",product_price:(null==p?void 0:p.price)?(0,r.F)(null==p?void 0:p.price):"",product_id:"".concat(null==p?void 0:p.offerId),product_quantity:"1",product_category:s};return{trackingProduct:C,opts:{event_label:n,product_target_segment:"consumer",event_category:"sales",page_subsection:"checkout",page_section:b?"campaign":"".concat(s," offers"),page_type:h?"order_loading":n,journey_type:"journey",journey_name:b?"winback":"checkout",product_technology:null===(d=(0,g.x8)())||void 0===d?void 0:null===(l=d.originalTechType)||void 0===l?void 0:l.replace(/["']/g,"")},pageProductsInfo:E}},M=()=>{var n,e,i,o,l,r,u,c,v,p,f,g,m,h,y,b,C,E,S,x,I,A,_,T,N,L,O,R,D,M,P,w,k,j,B,F,z,Z,H,V;let{SHA256:U}=s.default,Q=(0,a.f)("user"),G=(0,a.f)("silentLogin"),Y=(0,a.f)("loginEnriched"),W=t.L1.includes(null==G?void 0:G.flowId)||!1,J=(0,a.f)("customerData"),X=(0,d.r)()&&localStorage.getItem("appSession"),q=!!X&&JSON.parse(X),K=null==q?void 0:q.value,$=K||W?"logged in":"logged out";return{visitor_login_type:"web",...!!(0,t.ve)()&&{visitor_type:"returning visitor"},...(null==Q?void 0:null===(n=Q.customer)||void 0===n?void 0:n[0].id)&&{visitor_customer_id:null==Q?void 0:Q.customer[0].id},...(null==Q?void 0:null===(e=Q.taggedInfoCust)||void 0===e?void 0:e.email)&&{visitor_id_email:U(null==Q?void 0:null===(i=Q.taggedInfoCust)||void 0===i?void 0:i.email).toString()},...(null==Q?void 0:null===(o=Q.customer)||void 0===o?void 0:o[0].msisdns)&&{visitor_id_asset_list:null==Q?void 0:null===(r=Q.customer)||void 0===r?void 0:null===(l=r[0].msisdns)||void 0===l?void 0:l.map(n=>{var e;return(null===(e=U(n))||void 0===e?void 0:e.toString())||""})},...Y&&(null===(u=Y.items[0])||void 0===u?void 0:u.value)&&{visitor_id_asset_active:U(null===(c=Y.items[0])||void 0===c?void 0:c.value).toString()},...K&&{visitor_id_asset_active:U(K).toString()},...$&&{visitor_login_status:$},...J&&(null===(p=J[0])||void 0===p?void 0:null===(v=p.owningIndividual)||void 0===v?void 0:v.birthDate)&&{visitor_customer_dob:null===(g=J[0])||void 0===g?void 0:null===(f=g.owningIndividual)||void 0===f?void 0:f.birthDate},...J&&(null===(h=J[0])||void 0===h?void 0:null===(m=h.owningIndividual)||void 0===m?void 0:m.gender)&&{visitor_customer_gender:null===(b=J[0])||void 0===b?void 0:null===(y=b.owningIndividual)||void 0===y?void 0:y.gender},...J&&(null===(E=J[0])||void 0===E?void 0:null===(C=E.billingAddress)||void 0===C?void 0:C.city)&&{visitor_customer_location_city:null===(x=J[0])||void 0===x?void 0:null===(S=x.billingAddress)||void 0===S?void 0:S.city},...J&&(null===(A=J[0])||void 0===A?void 0:null===(I=A.owningIndividual)||void 0===I?void 0:I.nation)&&{visitor_customer_location_country:null===(T=J[0])||void 0===T?void 0:null===(_=T.owningIndividual)||void 0===_?void 0:_.nation},...J&&(null===(L=J[0])||void 0===L?void 0:null===(N=L.billingAddress)||void 0===N?void 0:N.postalCode)&&{visitor_customer_location_id:null===(R=J[0])||void 0===R?void 0:null===(O=R.billingAddress)||void 0===O?void 0:O.postalCode},...J&&(null===(M=J[0])||void 0===M?void 0:null===(D=M.owningIndividual)||void 0===D?void 0:D.firstName)&&{visitor_customer_name_first:null===(w=J[0])||void 0===w?void 0:null===(P=w.owningIndividual)||void 0===P?void 0:P.firstName},...J&&(null===(j=J[0])||void 0===j?void 0:null===(k=j.owningIndividual)||void 0===k?void 0:k.lastName)&&{visitor_customer_name_last:null===(F=J[0])||void 0===F?void 0:null===(B=F.owningIndividual)||void 0===B?void 0:B.lastName},...J&&(null===(Z=J[0])||void 0===Z?void 0:null===(z=Z.billingAddress)||void 0===z?void 0:z.stateOrProvince)&&{visitor_customer_region:null===(V=J[0])||void 0===V?void 0:null===(H=V.billingAddress)||void 0===H?void 0:H.stateOrProvince}}},P=()=>{let n=(0,u.UY)(t.gL);return!(!(null==n?void 0:n.firstName)||!(null==n?void 0:n.lastName)||!(null==n?void 0:n.fiscalCode))},w=n=>{if(!n)return[];let e=(0,t.AQ)()===t.xx.LOGGED_USER,i=[];return i=(0,t.PY)()?(null==n?void 0:n.enableRecurringPayment)?p.FY.LOCKIN_WITH_RECURRING_PAYMENT:p.FY.LOCKIN:(null==n?void 0:n.isLockInMMProduct)?(null==n?void 0:n.enableRecurringPayment)?p.FY.LOCKIN_MM_WITH_RECURRING_PAYMENT:p.FY.LOCKIN_MM:(null==n?void 0:n.enableRecurringPayment)?p.FY.DEFAULT_WITH_RECURRING_PAYMENT:p.FY.DEFAULT,(0,g.af)()&&!e&&(i=(null==n?void 0:n.enableRecurringPayment)?p.FY.APP_WITH_RECURRING_PAYMENT:p.FY.APP),P()&&(i=(null==n?void 0:n.enableRecurringPayment)?p.FY.LOCKIN_PROSPECT_WITH_RECURRING_PAYMENT:p.FY.LOCKIN_PROSPECT),y()||(i=i.filter(n=>n.title!==f.Bf.UPFRONT_SELECTION)),x(n)||(i=i.filter(n=>n.title!==f.Bf.VOUCHER)),i},k=(n,e)=>{var i;l.KF.debug("product.addonList:",e.addonList);let t=n.getQueryData("getCmsAddons"),o=(0,a.f)("available_addons");if(!t||!(null==e?void 0:null===(i=e.addonList)||void 0===i?void 0:i.length)||!o.length||!Array.isArray(o))return!1;let r=((null==e?void 0:e.addonList)||[]).map(n=>{var e,i;let o=null===(i=t[n.cmsId||""])||void 0===i?void 0:null===(e=i.addondetails)||void 0===e?void 0:e.id;return(null==n?void 0:n.boId)||o}).filter(n=>"string"==typeof n);l.KF.debug("matchingAddonIds:",r);let d=r.some(n=>o.includes(n));return l.KF.debug("matchFound:",d),d},j=(n,e)=>{var i,t;let o=n.getQueryData("getCmsAddons");return l.KF.debug("addonListCMS",o),!!o&&null!==(t=null==e?void 0:null===(i=e.addonList)||void 0===i?void 0:i.some(n=>Object.keys(o||{}).some(e=>e===n.cmsId)))&&void 0!==t&&t},B=n=>{let e=n.map(n=>n.title);localStorage.setItem("sstps",JSON.stringify(e))},F=n=>{let e,i,t;if(!n)return[];let o=(0,a.f)("sstps");return e=o?(null==o?void 0:o.map(n=>p.Mo.find(e=>e.title===n)||{}))||[]:p.FY.DEFAULT,x(n)||(i=e,t=f.Bf.VOUCHER,e=(null==i?void 0:i.filter(n=>n.title!==t))||[]),e},z=(n,e,i)=>{var o,r,d,a,u,s,c,v;let p=(0,m.YZ)(),f=[(null==n?void 0:null===(o=n.error)||void 0===o?void 0:o.url)||"",(null==n?void 0:null===(r=n.error)||void 0===r?void 0:r.status)||"",(null==n?void 0:n.errorType)||"",(null==n?void 0:n.errorCode)||"",(null==n?void 0:n.isBlocking)?"blk":"nblk",e||""].filter(
1Boolean).join("_"),g=(null===(d=localStorage)||void 0===d?void 0:d.getItem(l.SX))||"",h=(null===(a=localStorage)||void 0===a?void 0:a.getItem(l.R1))||"",y=(null==n?void 0:n.transaction_id)||g,b=(null==n?void 0:n.err_errorMessage)||h,C=D("","fixed",i).trackingProduct,E=(0,t.AQ)();return{flow:"fixed",event_name:"page_error",event_label_track:"page_error",event_category:"error",page_error:f,page_error_code:(null==n?void 0:n.errorCode)||"",page_type:"error page",slug:(null==p?void 0:p.slug)||"",isBlocking:(null==n?void 0:n.isBlocking)?"Y":"N",step:e,...C&&{...C},...(null==C?void 0:C.cart_id)&&{cart_id:null==C?void 0:C.cart_id},...(null==p?void 0:p.offerId)&&{offerId:null==p?void 0:p.offerId},...(null==n?void 0:null===(u=n.error)||void 0===u?void 0:u.status)&&{status:null==n?void 0:null===(s=n.error)||void 0===s?void 0:s.status},...(null==n?void 0:null===(c=n.error)||void 0===c?void 0:c.url)&&{service_name:null==n?void 0:null===(v=n.error)||void 0===v?void 0:v.url},...E&&{user_type:E},...y&&{transaction_id:y},...b&&{err_errorMessage:b},...(null==n?void 0:n.err_errorCode)&&{err_errorCode:null==n?void 0:n.err_errorCode},...(null==n?void 0:n.err_backendErrorMessage)&&{err_backendErrorMessage:null==n?void 0:n.err_backendErrorMessage},...(null==n?void 0:n.err_backendErrorCode)&&{err_backendErrorCode:null==n?void 0:n.err_backendErrorCode},...(null==n?void 0:n.err_backendSource)&&{err_backendSource:null==n?void 0:n.err_backendSource},...(null==n?void 0:n.otherInfo)&&{otherInfo:n.otherInfo}}},Z=(n,e)=>{if(!n)return[];let i=(null==n?void 0:n.alternativeProductOfferList)||[];return null==e?void 0:e.filter(n=>{var e;return null==i?void 0:i.includes((null===(e=n.cmsId)||void 0===e?void 0:e.toString())||"")})}},7392:function(n,e,i){var t,o;i.d(e,{u:function(){return t}}),(o=t||(t={})).PAPER="paperBill",o.EBILL="eBill"},82881:function(n,e,i){i.d(e,{Mg:function(){return g},oo:function(){return f}});var t=i(52322),o=i(2784),l=i(85363),r=i(1771),d=i(93221),a=i(69947),u=i(18899),s=i(29470),c=i(12902),v=i(64268);let p=o.createContext({customerId:a.fn,owningData:a.gE,contactInfo:a.dF,portability:a.XM,portabilityStatus:a.cv,addonState:a.kN,consents:a.Mf,findCaller:a.e2,isLastCard:a.zl,isFlowReady:a.vQ,termsAndConditions:a.XH,invoice:a.y4,slidesGoBack:a.Z,currentStepKey:s.Bf.PERSONAL_INFO,upfrontSelection:a.QV,isDisabledBackButton:a.Dw,address:a.n,pickupPoint:a.IS,selectedPickupPoint:a.IS,offerId:a.nj,installationAddress:a.Q6,shippingAddress:a.e0,billingAddress:a.cZ,availablePaymentMethods:[],hideStickyBar:!1,keepsNumber:a.ex,updateProductPriceCtrl:a.Qe,isValidNumberPortability:a.BQ,billDeliveryDone:!1,upfrontPayment:void 0,isLoadingCart:!0,isPreselectedCard:!1,pickupLocationStore:a.Uq,isStartRecognition:a.UN,deliveryAdvance:a.mY,billingReplace:a.Bi,isNewShippingAddress:a.Nd,isStartDeliveryBase:a.r_,cartAsyncInfo:a.iV,customerDeliveryBaseInfo:a.iQ,customerAsyncInfo:a.Ev,authorizationAsyncInfo:a.$i,isStartAuthorizationAsyncInfo:a.gP,isModalButtonSticky:!1,isStartCustomerFlow:a.NI,customerFlow:a.Xn,lockInFlow:a.dY,lockInMMFlow:a.zL,lockInAppFlow:a.xi,voucher:a._F,configuredStickyStepperLabel:"",checkoutErrors:a.UT,product:a.oF,isShowCheckout:a.xY,isLoadingGoNext:!1,authorizeFlow:a.Pc,isStartLockInMMFlow:a.nm,isStartLockInFlow:a.N8,isStartLockInAppFlow:a.nG,billingEmail:a.Zm,timerID:a.p4,enablerBilling:!1,addons:[],checkoutSteps:a.ns,setCheckoutStepState:()=>{},setCustomerId:()=>{},setOwningData:()=>{},setContactInfo:()=>{},setPortability:()=>{},setPortabilityStatus:()=>{},setAddonState:()=>{},setConsents:()=>{},setBillingAddress:()=>{},setInstallationAddress:()=>{},setShippingAddress:()=>{},setFindCaller:()=>{},setIsLastCard:()=>{},setIsFlowReady:()=>{},setTermsAndConditions:()=>{},setInvoice:()=>{},printContext:()=>{},setSlidesGoBack:()=>{},setUpfrontSelection:()=>{},setCurrentStepKey:()=>{},serializeContext:()=>{},deleteSerializedContext:()=>{},checkInitContext:()=>!1,setIsDisabledBackButton:()=>{},initContext:()=>!1,setOfferId:()=>{},setAddress:()=>{},setPickupPoint:()=>{},setSelectedPickupPoint:()=>{},setAvailablePaymentMethods:()=>{},setHideStickyBar:()=>{},setUpdateProductPriceCtrl:()=>{},setKeepsNumber:()=>{},setIsValidNumberPortability:()=>!1,setBillDeliveryDone:()=>!1,setUpfrontPayment:()=>{},setIsLoadingCart:()=>{},setIsPreselectedCard:()=>!1,setPickupLocationStore:()=>{},setIsStartRecognition:()=>{},setDeliveryAdvance:()=>{},setBillingReplace:()=>{},setIsNewShippingAddress:()=>{},setIsStartDeliveryBase:()=>{},setCartAsyncInfo:()=>{},setCustomerDeliveryBaseInfo:()=>{},setCustomerAsyncInfo:()=>{},setAuthorizationAsyncInfo:()=>{},setIsStartAuthorizationAsyncInfo:()=>{},setIsModalButtonSticky:()=>{},setIsStartCustomerFlow:()=>{},setCustomerFlow:()=>{},setLockInMMFlow:()=>{},setLockInFlow:()=>{},setLockInAppFlow:()=>{},setVoucher:()=>{},setConfiguredStickyStepperLabel:()=>{},setCheckoutErrors:()=>{},setProduct:()=>{},setIsShowCheckout:()=>{},setAuthorizeFlow:()=>{},setIsStartLockInMMFlow:()=>{},setIsStartLockInFlow:()=>{},setIsStartLockInAppFlow:()=>{},setBillingEmail:()=>{},setAddons:()=>{},setIsLoadingGoNext:()=>{},setTimerID:()=>{},setEnablerChangeBilling:()=>{}}),f=n=>{let{children:e}=n,[i,f]=(0,o.useState)(""),[g,m]=(0,o.useState)(a.ns),[h,y]=(0,o.useState)({...a.gE}),[b,C]=(0,o.useState)({...a.dF}),[E,S]=(0,o.useState)({...a.XM}),[x,I]=(0,o.useState)({...a.cv}),[A,_]=(0,o.useState)({...a.kN}),[T,N]=(0,o.useState)({...a.Mf}),[L,O]=(0,o.useState)(a.Y$),[R,D]=(0,o.useState)({...a.cZ}),[M,P]=(0,o.useState)(a.Zm),[w,k]=(0,o.useState)({...a.e0}),[j,B]=(0,o.useState)({...a.Q6}),[F,z]=(0,o.useState)({...a.e2}),[Z,H]=(0,o.useState)(a.zl),[V,U]=(0,o.useState)(!1),[Q,G]=(0,o.useState)(a.vQ),[Y,W]=(0,o.useState)(a.XH),[J,X]=(0,o.useState)(a.y4),[q,K]=(0,o.useState)(!0),[$,nn]=(0,o.useState)(a.Z),[ne,ni]=(0,o.useState)(a.QV),[nt,no]=(0,o.useState)(s.xz),[nl,nr]=(0,o.useState)(a.Dw),[nd,na]=(0,o.useState)(!1),[nu,ns]=(0,o.useState)(a.nj),[nc,nv]=(0,o.useState)({...a.n}),[np,nf]=(0,o.useState)({...a.IS}),[ng,nm]=(0,o.useState)({...a.IS}),[nh,ny]=(0,o.useState)(!1),[nb,nC]=(0,o.useState)(a.Qe),[nE,nS]=(0,o.useState)([]),[nx,nI]=(0,o.useState)(),[nA,n_]=(0,o.useState)(a.BQ),[nT,nN]=(0,o.useState)(!1),[nL,nO]=(0,o.useState)(void 0),[nR,nD]=(0,o.useState)({...a.Uq}),[nM,nP]=(0,o.useState)(a.UN),[nw,nk]=(0,o.useState)(a.Nd),[nj,nB]=(0,o.useState)(a.r_),[nF,nz]=(0,o.useState)(a.gP),[nZ,nH]=(0,o.useState)(a.iQ),[nV,nU]=(0,o.useState)(a.Bi),[nQ,nG]=(0,o.useState)(a.mY),[nY,nW]=(0,o.useState)(a.iV),[nJ,nX]=(0,o.useState)(a.Ev),[nq,nK]=(0,o.useState)(a.$i),[n$,n0]=(0,o.useState)(!1),[n1,n2]=(0,o.useState)(!1),[n9,n3]=(0,o.useState)(!1),[n4,n6]=(0,o.useState)(!1),[n5,n7]=(0,o.useState)(!1),[n8,en]=(0,o.useState)(a.Xn),[ee,ei]=(0,o.useState)(a.zL),[et,eo]=(0,o.useState)(a.dY),[el,er]=(0,o.useState)(a.xi),[ed,ea]=(0,o.useState)(a._F),[eu,es]=(0,o.useState)(a.Pc),[ec,ev]=(0,o.useState)(a.UT),[ep,ef]=(0,o.useState)(""),[eg,em]=(0,o.useState)(a.oF),[eh,ey]=(0,o.useState)(a.xY),[eb,eC]=(0,o.useState)([]),[eE,eS]=(0,o.useState)(),[ex,eI]=(0,o.useState)(!1),eA=n=>{f(n)},e_=n=>{var e;localStorage.setItem("name_cus",null==n?void 0:null===(e=n.owningIndividual)||void 0===e?void 0:e.firstName),y({...n})},eT=n=>{C({...n})},eN=n=>{S({...n})},eL=n=>{I({...n})},eO=n=>{D({...n})},eR=n=>{P(n)},eD=n=>
1{B({...n})},eM=n=>{k({...n})},eP=n=>{z({...n})},ew=n=>{H(n)},ek=n=>{G(n)},ej=n=>{W({...n})},eB=n=>{X({...n})},eF=n=>{ni(n)},ez=n=>{no(n)},eZ=n=>{U(n)},eH=n=>{nk(n)},eV=n=>{n_(n)},eU=n=>{nN(n)},eQ=n=>{nO(n)},eG=n=>{na(n)},eY=n=>{nS(n)},eW=n=>{nf(n)},eJ=n=>{nm(n)},eX=n=>{nC(n)},eq=n=>{K(n)},eK=n=>{nD(n)},e$=n=>{nP(n)},e0=n=>{nG(n)},e1=n=>{nU(n)},e2=n=>{nB(n)},e9=n=>{nW(n)},e3=n=>{nH(n)},e4=n=>{nX(n)},e6=n=>{nK(n)},e5=n=>{nz(n)},e7=n=>{n0(n)},e8=n=>{n2(n)},ie=n=>{n3(n)},ii=n=>{n6(n)},it=n=>{n7(n)},io=n=>{en(n)},il=n=>{ei(n)},ir=n=>{eo(n)},id=n=>{er(n)},ia=n=>{ea(n)},iu=n=>{es(n)},is=n=>{(0,d.n)(n),em(n)},ic=n=>{eC(n)};return(0,t.jsx)(p.Provider,{value:{customerId:i,setCustomerId:eA,owningData:h,setOwningData:e_,contactInfo:b,setContactInfo:eT,portability:E,setPortability:eN,portabilityStatus:x,setPortabilityStatus:eL,addonState:A,setAddonState:_,consents:T,setConsents:N,findCaller:F,setFindCaller:eP,isLastCard:Z,setIsLastCard:ew,isFlowReady:Q,setIsFlowReady:ek,termsAndConditions:Y,setTermsAndConditions:ej,invoice:J,setInvoice:eB,slidesGoBack:$,setSlidesGoBack:n=>{nn(n)},currentStepKey:nt,setCurrentStepKey:ez,serializeContext:()=>{let n=(0,r.A)(btoa(encodeURIComponent(JSON.stringify({customerId:i,owningData:{...h},portability:{...E},portabilityStatus:{...x},addonState:{...A},findCaller:{...F},termsAndConditions:{...Y},invoice:{...J},billingAddress:{...R},billingEmail:M,shippingAddress:{...w},installationAddress:{...j},consents:{...T},contactInfo:{...b},upfrontSelection:{...ne},isLastCard:Z||!1,isFlowReady:Q||!0,winBackNumber:L||"",address:{...nc},pickupPoint:{...np},selectedPickupPoint:{...ng},offerId:nu,availablePaymentMethods:nE,updateProductPriceCtrl:{...nb},upfrontPayment:{...nL},pickupLocationStore:{...nR},deliveryAdvance:{...nQ},billingReplace:{...nV},cartAsyncInfo:{...nY},customerDeliveryBaseInfo:{...nZ},customerAsyncInfo:{...nJ},authorizationAsyncInfo:{...nq},customerFlow:{...n8},lockInMMFlow:{...ee},lockInFlow:{...et},lockInAppFlow:{...el},voucher:{...ed},authorizeFlow:{...eu},isValidNumberPortability:nA,billDeliveryDone:nT,currentStepKey:nt,isLoadingCart:q,isStartRecognition:nM,isNewShippingAddress:nw,isStartDeliveryBase:nj,isStartAuthorizationAsyncInfo:nF,isModalButtonSticky:n$,isStartCustomerFlow:n1,isStartLockInMMFlow:n9,isStartLockInFlow:n4,isStartLockInAppFlow:n5,isShowCheckout:eh,configuredStickyStepperLabel:ep,addons:eb}))));localStorage.setItem(a.Bm,n)},deleteSerializedContext:()=>{localStorage.removeItem(a.Bm)},printContext:()=>{l.K.info("context",{customerId:i,owningData:{...h},portability:{...E},portabilityStatus:{...x},addonState:{...A},findCaller:{...F},termsAndConditions:{...Y},invoice:{...J},billingAddress:{...R},billingEmail:M,shippingAddress:{...w},installationAddress:{...j},consents:{...T},contactInfo:{...b},upfrontSelection:{...ne},isLastCard:Z||!1,isFlowReady:Q||!0,winBackNumber:L||"",address:{...nc},pickupPoint:{...np},selectedPickupPoint:{...ng},offerId:nu,availablePaymentMethods:nE,updateProductPriceCtrl:{...nb},upfrontPayment:{...nL},pickupLocationStore:{...nR},deliveryAdvance:{...nQ},billingReplace:{...nV},cartAsyncInfo:{...nY},customerDeliveryBaseInfo:{...nZ},customerAsyncInfo:{...nJ},authorizationAsyncInfo:{...nq},customerFlow:{...n8},lockInMMFlow:{...ee},lockInFlow:{...et},lockInAppFlow:{...el},voucher:{...ed},product:{...eg},authorizeFlow:{...eu},isValidNumberPortability:nA,billDeliveryDone:nT,currentStepKey:nt,isLoadingCart:q,isStartRecognition:nM,isNewShippingAddress:nw,isStartDeliveryBase:nj,isStartAuthorizationAsyncInfo:nF,isStartCustomerFlow:n1,isStartLockInMMFlow:n9,isStartLockInFlow:n4,isStartLockInAppFlow:n5,isShowCheckout:eh,configuredStickyStepperLabel:ep,isLoadingGoNext:V,checkoutSteps:g})},checkInitContext:()=>!!localStorage.getItem(a.Bm),initContext:n=>{let e;let{customerData:i,countries:t,isLogged:o}=n||{},l=!1;if(i&&t){l=!!o;let n=Array.isArray(i)?null==i?void 0:i[0]:i;e={...(0,u.Vp)(n,t)}}let r=(0,v.S4)();return setTimeout(()=>{var n,i,t;let d=(0,v.YZ)();eA((null==r?void 0:r.customerId)||a.fn),e_({...a.gE,...null==r?void 0:r.owningData,owningIndividual:{...null==r?void 0:null===(n=r.owningData)||void 0===n?void 0:n.owningIndividual,...e},isLogged:(null==r?void 0:null===(i=r.owningData)||void 0===i?void 0:i.isLogged)||o,isValid:(null==r?void 0:null===(t=r.owningData)||void 0===t?void 0:t.isValid)||l}),eT((null==r?void 0:r.contactInfo)||a.dF),eN((null==r?void 0:r.portability)||a.XM),eL((null==r?void 0:r.portabilityStatus)||a.cv),_((null==r?void 0:r.addonState)||a.kN),N((null==r?void 0:r.consents)||a.Mf),eP((null==r?void 0:r.findCaller)||a.e2),ew((null==r?void 0:r.isLastCard)||!1),ek((null==r?void 0:r.isFlowReady)||!0),ej({...a.XH,...Y,...null==r?void 0:r.termsAndConditions}),eB((null==r?void 0:r.invoice)||a.y4),eO((null==r?void 0:r.billingAddress)||(0,c.Ar)()||a.cZ),eR((null==r?void 0:r.billingEmail)||a.Zm),eD((null==r?void 0:r.installationAddress)||a.Q6),eM((null==r?void 0:r.shippingAddress)||(0,c.Ar)()||a.e0),eW((null==r?void 0:r.pickupPoint)||a.IS),eJ((null==r?void 0:r.selectedPickupPoint)||a.IS),ez((null==r?void 0:r.currentStepKey)||s.xz),eF((null==r?void 0:r.upfrontSelection)||a.QV),eY((null==r?void 0:r.availablePaymentMethods)||[]),eX({...a.Qe,...null==r?void 0:r.updateProductPriceCtrl}),eV((null==r?void 0:r.isValidNumberPortability)||a.BQ),eU((null==r?void 0:r.billDeliveryDone)||a.BQ),eQ((null==r?void 0:r.upfrontPayment)||void 0),eq((null==r||!r.isLastCard)&&((null==r?void 0:r.isLoadingCart)||!0)),eG((null==r?void 0:r.isPreselectedCard)||!1),O((null==r?void 0:r.winBackNumber)||a.Y$),eK((null==r?void 0:r.pickupLocationStore)||a.Uq),e$((null==r?void 0:r.isStartRecognition)||a.UN),e0((null==r?void 0:r.deliveryAdvance)||a.mY),e1((null==r?void 0:r.billingReplace)||a.Bi),eH((null==r?void 0:r.isNewShippingAddress)||a.Nd),e2((null==r?void 0:r.isStartDeliveryBase)||a.r_),e9((null==r?void 0:r.cartAsyncInfo)||a.iV),e3((null==r?void 0:r.customerDeliveryBaseInfo)||a.iQ),e4((null==r?void 0:r.customerAsyncInfo)||a.Ev),e6((null==r?void 0:r.authorizationAsyncInfo)||a.$i),e5((null==r?void 0:r.isStartAuthorizationAsyncInfo)||a.gP),e7((null==r?void 0:r.isModalButtonSticky)||!1),e8((null==r?void 0:r.isStartCustomerFlow)||!1),ie((null==r?void 0:r.isStartLockInMMFlow)||!1),ii((null==r?void 0:r.isStartLockInFlow)||!1),it((null==r?void 0:r.isStartLockInAppFlow)||!1),io((null==r?void 0:r.customerFlow)||a.Xn),il((null==r?void 0:r.lockInMMFlow)||a.zL),ir((null==r?void 0:r.lockInFlow)||a.dY),id((null==r?void 0:r.lockInAppFlow)||a.xi),ia((null==r?void 0:r.voucher)||a._F),ef((null==r?void 0:r.configuredStickyStepperLabel)||""),d&&is(d),iu((null==r?void 0:r.authorizeFlow)||a.Pc),ic([]),eZ(!1)},0),!0},upfrontSelection:ne,setUpfrontSelection:eF,isDisabledBackButton:nl,setIsDisabledBackButton:n=>
1{nr(n)},offerId:nu,setOfferId:n=>{ns(n)},address:nc,setAddress:n=>{nv({...n})},pickupPoint:np,setPickupPoint:eW,selectedPickupPoint:ng,setSelectedPickupPoint:eJ,billingAddress:R,setBillingAddress:eO,installationAddress:j,setInstallationAddress:eD,shippingAddress:w,setShippingAddress:eM,availablePaymentMethods:nE,setAvailablePaymentMethods:eY,hideStickyBar:nh,setHideStickyBar:n=>{ny(n)},keepsNumber:nx,setKeepsNumber:nI,updateProductPriceCtrl:nb,setUpdateProductPriceCtrl:eX,isValidNumberPortability:nA,setIsValidNumberPortability:eV,billDeliveryDone:nT,setBillDeliveryDone:eU,upfrontPayment:nL,setUpfrontPayment:eQ,isLoadingCart:q,setIsLoadingCart:eq,isPreselectedCard:nd,setIsPreselectedCard:eG,deliveryAdvance:nQ,setDeliveryAdvance:e0,pickupLocationStore:nR,setPickupLocationStore:eK,isStartRecognition:nM,setIsStartRecognition:e$,billingReplace:nV,setBillingReplace:e1,isNewShippingAddress:nw,setIsNewShippingAddress:eH,isStartDeliveryBase:nj,setIsStartDeliveryBase:e2,cartAsyncInfo:nY,setCartAsyncInfo:e9,customerDeliveryBaseInfo:nZ,setCustomerDeliveryBaseInfo:e3,customerAsyncInfo:nJ,setCustomerAsyncInfo:e4,authorizationAsyncInfo:nq,setAuthorizationAsyncInfo:e6,isStartAuthorizationAsyncInfo:nF,setIsStartAuthorizationAsyncInfo:e5,isModalButtonSticky:n$,setIsModalButtonSticky:e7,isStartCustomerFlow:n1,setIsStartCustomerFlow:e8,customerFlow:n8,setCustomerFlow:io,voucher:ed,setVoucher:ia,configuredStickyStepperLabel:ep,setConfiguredStickyStepperLabel:ef,checkoutErrors:ec,setCheckoutErrors:n=>{ev(n)},product:eg,setProduct:is,isShowCheckout:eh,setIsShowCheckout:n=>{ey(n)},authorizeFlow:eu,setAuthorizeFlow:iu,isStartLockInMMFlow:n9,setIsStartLockInMMFlow:ie,isStartLockInFlow:n4,setIsStartLockInFlow:ii,isStartLockInAppFlow:n5,setIsStartLockInAppFlow:it,lockInMMFlow:ee,setLockInMMFlow:il,lockInFlow:et,setLockInFlow:ir,lockInAppFlow:el,setLockInAppFlow:id,billingEmail:M,setBillingEmail:eR,addons:eb,setAddons:ic,isLoadingGoNext:V,setIsLoadingGoNext:eZ,timerID:eE,setTimerID:n=>{eS(n)},setEnablerChangeBilling:n=>{eI(n)},enablerBilling:ex,checkoutSteps:g,setCheckoutStepState:(n,e)=>{m(i=>{var t;return{...i,[n]:{...i[n],visited:(null!==(t=i[n].visited)&&void 0!==t?t:0)+1,...e}}})}},children:e})},g=()=>(0,o.useContext)(p)},73595:function(n,e,i){i.d(e,{Z:function(){return b}});var t=i(52322),o=i(2784),l=i(14738),r=i(17965),d=i(67862),a=i(92603),u=i(96443);function s(){let n=(0,d._)(["\n margin: 0 auto;\n border-radius: 6px;\n padding: ",";\n display: flex;\n flex-direction: row;\n cursor: ",";\n background-color: ",";\n margin-bottom: ","px;\n ","\n\n ","\n\n\n\n ","\n"]);return s=function(){return n},n}function c(){let n=(0,d._)(["\n display: flex;\n align-items: center;\n z-index: 3;\n ","\n flex-shrink: 0;\n"]);return c=function(){return n},n}function v(){let n=(0,d._)(["\n font-size: ",";\n line-height: ",";\n width: 294px;\n "]);return v=function(){return n},n}function p(){let n=(0,d._)(["\n width: 334px;\n "]);return p=function(){return n},n}function f(){let n=(0,d._)(["\n font-family: ",";\n font-weight: ",";\n font-style: normal;\n text-align: left;\n line-height: ",";\n width: 208px;\n margin-left: 18px;\n\n ","\n\n ","\n"]);return f=function(){return n},n}let g=a.Z.div(s(),u.rS.spacing.md,n=>n.disabled?"not-allowed":"pointer",n=>n.disabled?"#ccc":"",n=>{var e;return(null===(e=n.marginBottom)||void 0===e?void 0:e.mobile)?"".concat(n.marginBottom.mobile):"16"},n=>n.index===n.colorIndex?"border: 2px solid ".concat(u.DH.cyanDark,";"):"border: 1px solid ".concat(u.DH.gray300,";"),u.BC.withProps.tablet(n=>{var e;return" \n margin-bottom: ".concat((null===(e=n.marginBottom)||void 0===e?void 0:e.tablet)?"".concat(n.marginBottom.tablet):"12","px;\n ")}),u.BC.withProps.desktop(n=>{var e;return" \n margin-bottom: ".concat((null===(e=n.marginBottom)||void 0===e?void 0:e.desktop)?"".concat(n.marginBottom.desktop):"22","px;\n ")})),m=a.Z.div(c(),n=>"align-self: ".concat(n.align,";"));a.Z.div(f(),u.rS.typography.fontFamily.primary,u.rS.typography.fontWeight.extrabold,u.rS.typography.lineHeight.h6,u.BC.tablet(v(),u.rS.typography.fontSize.h6,u.rS.typography.lineHeight.display5),u.BC.desktop(p()));var h=i(98615);let y=n=>{let{items:e,selectedItem:i,passedValueIndex:t,onChangeItem:l,align:r,disabled:d=!1,disabledByIndex:a,marginBottom:u}=n,[s,c]=(0,o.useState)(t);return(0,o.useEffect)(()=>{void 0!==t&&i&&(i(e[t]),c(t))},[t]),{items:e,selectedItem:i,passedValueIndex:t,onChangeItem:l,align:r,disabled:d,disabledByIndex:a,marginBottom:u,selIndex:s,setSelIndex:c}};var b=n=>{let{items:e,selectedItem:i,passedValueIndex:d,onChangeItem:a,align:u,disabled:s=!1,disabledByIndex:c,marginBottom:v,selIndex:p,setSelIndex:f}=y(n);return(0,t.jsx)(t.Fragment,{children:o.Children.toArray(null==e?void 0:e.map((n,e)=>(0,t.jsxs)(g,{"data-cs-mask":"",disabled:(null==c?void 0:c.index)===e&&(null==c?void 0:c.state),marginBottom:v,className:"checkbox-container",index:e,colorIndex:p,onClick:()=>{!s&&(null==c?void 0:c.index)!==e&&e!=p&&(f(e),i&&i(n),a&&a(n,e))},style:s?{cursor:"wait"}:{},children:[(0,t.jsx)(m,{align:u,children:p===e?(0,t.jsx)(l.Z,{}):(0,t.jsx)(r.Z,{})}
1),(0,t.jsx)(h.Z,{detail:n.detail,title:n.title,description:n.description,extra:n.extra,value:n.value,titleIcon:n.titleIcon})]})))})}},98615:function(n,e,i){i.d(e,{Z:function(){return O}});var t=i(52322),o=i(2784),l=i(96108),r=i(63535),d=i(90401),a=i(67862),u=i(92603),s=i(12153);function c(){let n=(0,a._)(["\n word-break: break-word;\n display: flex;\n flex-direction: column;\n margin-left: ",";\n div {\n width: 100%;\n font-style: normal;\n text-align: left;\n color: ",";\n align-items: center;\n }\n\n p {\n margin: 0 auto;\n }\n"]);return c=function(){return n},n}function v(){let n=(0,a._)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"]);return v=function(){return n},n}function p(){let n=(0,a._)(["\n font-size: ",";\n line-height: ",";\n "]);return p=function(){return n},n}function f(){let n=(0,a._)(["\n font-family: ",";\n color: "," !important;\n margin: 0 auto;\n font-size: ",";\n line-height: ",";\n\n ","\n"]);return f=function(){return n},n}function g(){let n=(0,a._)(["\n font-size: ",";\n line-height: ",";\n "]);return g=function(){return n},n}function m(){let n=(0,a._)(["\n font-size: ",";\n line-height: ",";\n margin-bottom: ",";\n }"]);return m=function(){return n},n}function h(){let n=(0,a._)(["\n font-family: ",";\n font-weight: ",";\n margin: 0 auto;\n font-size: ",";\n line-height: ",";\n\n ","\n\n ","\n"]);return h=function(){return n},n}function y(){let n=(0,a._)(["\n margin-top: 0;\n font-size: ",";\n line-height: ",";\n "]);return y=function(){return n},n}function b(){let n=(0,a._)(["\n div {\n margin: 0 auto;\n margin-top: ",";\n font-size: ",";\n line-height: ",";\n\n b {\n font-weight: ",";\n }\n\n ","\n }\n"]);return b=function(){return n},n}function C(){let n=(0,a._)(["\n margin-top: ",";\n "]);return C=function(){return n},n}function E(){let n=(0,a._)(["\n display: flex;\n flex-direction: row;\n margin-top: ",";\n\n &.extraClass {\n padding: "," ",";\n gap: ",";\n min-width: 155px;\n width: fit-content;\n height: 24px;\n background: #00697c;\n opacity: 0.8;\n border-radius: 20px;\n }\n\n svg {\n width: 25px;\n vertical-align: middle;\n margin-right: 7.57px;\n ","\n }\n\n ","\n"]);return E=function(){return n},n}function S(){let n=(0,a._)(["\n div {\n font-family: ",";\n font-weight: ",";\n font-size: ",";\n line-height: ",";\n margin: 0 auto;\n ","\n ","\n }\n"]);return S=function(){return n},n}let x=u.Z.div(c(),s.r.spacing.md,s.r.colors.text.primary),I=u.Z.div(v()),A=u.Z.div(f(),s.r.typography.fontFamily.primary,s.r.colors.text.disabled,s.r.typography.fontSize.body2,s.r.typography.lineHeight.body2,s.B.tablet(p(),s.r.typography.fontSize.body1,s.r.typography.lineHeight.body1)),_=u.Z.div(h(),s.r.typography.fontFamily.primary,s.r.typography.fontWeight.extrabold,s.r.typography.fontSize.h6,s.r.typography.lineHeight.h6,s.B.tablet(g(),s.r.typography.fontSize.h6,s.r.typography.lineHeight.h5),n=>3===n.type?"{\n font-family: ".concat(s.r.typography.fontFamily.primary,";\n font-weight:").concat(s.r.typography.fontWeight.extrabold,";\n margin-bottom: ").concat(s.r.spacing.sm,";\n font-size: ").concat(s.r.typography.fontSize.body2,";\n line-height: ").concat(s.r.typography.lineHeight.body2,";\n ").concat(s.B.tablet(m(),s.r.typography.fontSize.body1,s.r.typography.lineHeight.body1,s.r.spacing.md)):""),T=u.Z.div(b(),s.r.spacing.xs,s.r.typography.fontSize.body2,s.r.typography.lineHeight.body2,s.r.typography.fontWeight.extrabold,s.B.tablet(y(),s.r.typography.fontSize.body1,s.r.typography.lineHeight.body1)),N=u.Z.div(E(),s.r.spacing.xs,s.r.spacing.xs,s.r.spacing.sm,s.r.spacing.xs,n=>"stroke: ".concat(n.color),s.B.tablet(C(),s.r.spacing.sm)),L=u.Z.div(S(),s.r.typography.fontFamily.primary,s.r.typography.fontWeight.extrabold,s.r.typography.fontSize.body2,s.r.typography.lineHeight.body2,n=>"color: ".concat(n.color," !important;"),n=>{let{variant:e}=n;return"action"===e?"text-decoration: underline":""});var O=n=>{let{detail:e,title:i,description:a,extra:u,titleIcon:s}
1=n,[c]=(0,d.q)([a]),[v,p]=(0,o.useState)(0);return(0,o.useEffect)(()=>{e?p(3):u?p(2):a?p(1):p(0)},[n,a,e,u]),(0,t.jsxs)(x,{children:[(0,t.jsx)(A,{children:e}),(0,t.jsxs)(I,{children:[(0,t.jsx)(_,{className:"title",type:v,children:i}),s&&(0,t.jsx)(r.Z,{width:"24px",nameCard:"icon",image:s})]}),a&&(0,t.jsx)(T,{type:v,dangerouslySetInnerHTML:{__html:c||""}}),u&&(null==u?void 0:u.text)&&(0,t.jsxs)(N,{color:null==u?void 0:u.color,onClick:null==u?void 0:u.action,className:null==u?void 0:u.extraClass,children:[(null==u?void 0:u.icon)?u.icon:"",(0,t.jsx)(L,{variant:u.variant,color:null==u?void 0:u.color,children:(0,t.jsx)(l.Z,{text:(null==u?void 0:u.text)||""})})]})]})}},14738:function(n,e,i){var t=i(52322),o=i(2784);e.Z=(0,o.memo)(()=>(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",overflow:"visible",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("path",{d:"M16 10C16 13.3137 13.3137 16 10 16C6.68629 16 4 13.3137 4 10C4 6.68629 6.68629 4 10 4C13.3137 4 16 6.68629 16 10Z",fill:"#00697C"}),(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19Z",fill:"#00697C"})]}))},17965:function(n,e,i){var t=i(52322),o=i(2784);e.Z=(0,o.memo)(()=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",overflow:"visible",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M19.5 10C19.5 15.2467 15.2467 19.5 10 19.5C4.75329 19.5 0.5 15.2467 0.5 10C0.5 4.75329 4.75329 0.5 10 0.5C15.2467 0.5 19.5 4.75329 19.5 10Z",fill:"white",stroke:"#BEBEBE"})}))},38225:function(n,e,i){var t,o,l,r;i.d(e,{G:function(){return o},V:function(){return t}}),(l=t||(t={})).NA="NA",l.CO="CO",l.VR="VR",l.DI="DI",(r=o||(o={})).S="S",r.PO="PO",r.PP="PP",r.P="PP"},49787:function(n,e,i){var t,o,l,r,d,a;i.d(e,{Ti:function(){return l},pk:function(){return o},y$:function(){return t}}),(r=t||(t={})).URL_BACK="mode=urlback",r.URL_FORWARD="mode=urldoneonbillcapture",(d=o||(o={})).SHOPPING_CART_FIXED="1",d.SHOPPING_CART_MOBILE="2",(a=l||(l={}))[a.KO=0]="KO",a[a.FWA=1]="FWA",a[a.VALIDATE_ADDRESS_ERROR=2]="VALIDATE_ADDRESS_ERROR",a[a.CREATED_ADDRESS_ERROR=3]="CREATED_ADDRESS_ERROR",a[a.SERVICE_ABILITY_ERROR=4]="SERVICE_ABILITY_ERROR",a[a.ERROR_DXL_CAMPAIGNS=5]="ERROR_DXL_CAMPAIGNS"},11752:function(n,e,i){i.d(e,{CA:function(){return t.CA},Jn:function(){return t.Jn},bl:function(){return t.bl}});var t=i(34759)},15532:function(n,e,i){i.d(e,{KF:function(){return o.KF},bl:function(){return t.bl},fF:function(){return l.f}});var t=i(45867),o=i(88301),l=i(3307)},39893:function(n,e,i){i.d(e,{KF:function(){return o.KF},Wd:function(){return r.Wd},bl:function(){return t.bl},fF:function(){return l.f}});var t=i(45867),o=i(88301),l=i(3307),r=i(30837)},99981:function(n,e,i){i.d(e,{bl:function(){return t.bl},dw:function(){return l.dw},q5:function(){return o.Z}});var t=i(45867),o=i(86465),l=i(42406)},52258:function(n,e,i){i.d(e,{b:function(){return t.bl},x:function(){return o.x}});var t=i(45867),o=i(83756)},35969:function(n,e,i){i.d(e,{Fk:function(){return r.Fk},bl:function(){return t.bl},fF:function(){return l.f},xb:function(){return o.x}});var t=i(45867),o=i(83756),l=i(3307),r=i(42406)},47103:function(n,e,i){i.d(e,{Sz:function(){return l.Sz},bl:function(){return t.bl},xb:function(){return o.x}});var t=i(45867),o=i(83756),l=i(8350)},65595:function(n,e,i){i.d(e,{b:function(){return t.bl},o:function(){return o.oe}});var t=i(45867),o=i(71638)},95616:function(n,e,i){i.d(e,{Fk:function(){return o.Fk},bl:function(){return t.bl},dw:function(){return o.dw}});var t=i(45867),o=i(42406)},12418:function(n,e,i){i.d(e,{B:function(){return o.Z},E:function(){return t.Z}});var t=i(51053),o=i(30182)},6185:function(n,e,i){i.d(e,{S:function(){return t.Z}});var t=i(59202)},26099:function(n,e,i){i.d(e,{CA:function(){return o.CA},Jn:function(){return o.Jn},S6:function(){return t.S6},_9:function(){return t._9},nQ:function(){return t.nQ}});var t=i(11946),o=i(34759)},75900:function(n,e,i){i.d(e,{CA:function(){return t.CA},ks:function(){return o.ks},yw:function(){return t.yw}});
1var t=i(34759),o=i(11946)},68550:function(n,e,i){i.d(e,{C:function(){return t.CA},y:function(){return t.yw}});var t=i(34759)},10020:function(n,e,i){i.d(e,{CA:function(){return t.CA},Jn:function(){return t.Jn},OD:function(){return r.O},SM:function(){return o.S},nQ:function(){return l.nQ}});var t=i(34759),o=i(4217),l=i(11946),r=i(93216)},51039:function(n,e,i){i.d(e,{CA:function(){return t.CA},Jn:function(){return t.Jn},US:function(){return r.U},V7:function(){return o.V7},Z2:function(){return l.Z},Zn:function(){return o.Zn},nQ:function(){return o.nQ}});var t=i(34759),o=i(11946),l=i(40975),r=i(21328)},94927:function(n,e,i){i.d(e,{CA:function(){return t.CA},Jn:function(){return t.Jn},aY:function(){return o.aY}});var t=i(34759),o=i(11946)},3187:function(n,e,i){i.d(e,{CA:function(){return t.CA},Dt:function(){return o.D},Jn:function(){return t.Jn}});var t=i(34759),o=i(85035)},76855:function(n,e,i){i.d(e,{CA:function(){return t.CA},Jn:function(){return t.Jn},S6:function(){return o.S6}});var t=i(34759),o=i(11946)},12822:function(n,e,i){i.d(e,{k:function(){return t.Z}});var t=i(37155)},54687:function(n,e,i){i.d(e,{V:function(){return t.V}});var t=i(38225)},68354:function(n,e,i){i.d(e,{V:function(){return t.V},Z:function(){return o.ZS}});var t=i(38225),o=i(34702)},71581:function(n,e,i){i.d(e,{Q:function(){return t.QW}});var t=i(34702)},75972:function(n,e,i){i.d(e,{K:function(){return t.K$},Q:function(){return t.QW}});var t=i(34702)},27115:function(n,e,i){i.d(e,{Q:function(){return t.QW},y:function(){return o.y$}});var t=i(34702),o=i(49787)},56908:function(n,e,i){i.d(e,{I:function(){return t.Z},Q:function(){return o.Z}});var t=i(62658),o=i(87564)},65873:function(n,e,i){i.d(e,{am:function(){return o},Qd:function(){return l.Q},nQ:function(){return r.nQ}}),(t=o||(o={})).ADD_FIXED_VOICE="addFixedVoiceAddOnOfferingConfiguration",t.REMOVE_FIXED_VOICE="removeFixedVoiceAddOnOfferingConfiguration",t.ADD_INTERNET="addInternetAddOnOfferingConfiguration",t.REMOVE_INTERNET="removeInternetAddOnOfferingConfiguration",t.ADD_DATA_SIM="addDataSimAddOnOfferingConfiguration",t.REMOVE_DATA_SIM="removeDataSimAddOnOfferingConfiguration",t.ADD_MOBILE="addMobileAddOnOfferingConfiguration",t.REMOVE_MOBILE="removeMobileAddOnOfferingConfiguration";var t,o,l=i(47314),r=i(11946)},62185:function(n,e,i){i.d(e,{S:function(){return t.S},n:function(){return o.nQ}});var t=i(4217),o=i(11946)},8244:function(n,e,i){i.d(e,{D0:function(){return t.D0},Fk:function(){return l.Fk},T_:function(){return t.T_},uY:function(){return t.uY},xb:function(){return o.x}});var t=i(88301),o=i(83756),l=i(42406)},4233:function(n,e,i){i.d(e,{G:function(){return t.G}});var t=i(38225)},29261:function(n,e,i){i.d(e,{Q:function(){return t.Q}});var t=i(47314)},34133:function(n,e,i){i.d(e,{K:function(){return t.K$}});var t=i(34702)},83157:function(n,e,i){i.d(e,{R:function(){return t.Rm}});var t=i(11946)},52275:function(n,e,i){i.d(e,{A:function(){return t.AQ},x:function(){return t.xx}});var t=i(11946)},11958:function(n,e,i){i.d(e,{KF:function(){return t.KF},R1:function(){return o.R1},SX:function(){return o.SX}});var t=i(88301),o=i(45834)},48638:function(n,e,i){i.d(e,{K:function(){return t.KF},x:function(){return o.x}});var t=i(88301),o=i(83756)},41989:function(n,e,i){i.d(e,{K:function(){return t.KF},u:function(){return t.uY}});var t=i(88301)},79608:function(n,e,i){i.d(e,{K:function(){return t.KF},r:function(){return t.rS}});var t=i(88301)},64630:function(n,e,i){i.d(e,{B:function(){return o.Z},v:function(){return t.Z}});var t=i(3254),o=i(38919)},95147:function(n,e,i){i.d(e,{m:function(){return t.Z},z:function(){return o.zI}});var t=i(99645),o=i(77991)},64768:function(n,e,i){i.d(e,{X:function(){return t.Z}});var t=i(21880)},34734:function(n,e,i){i.d(e,{R:function(){return t.RQ},n:function(){return t.nQ}});var t=i(11946)},9109:function(n,e,i){i.d(e,{P:function(){return t.PQ},n:function(){return t.nQ}});var t=i(11946)},21271:function(n,e,i){i.d(e,{d:function(){return o.dw},x:function(){return t.x}});var t=i(83756),o=i(42406)},29281:function(n,e,i){i.d(e,{N:function(){return t.NE}});var t=i(11946)},83003:function(n,e,i){i.d(e,{fF:function(){return t.f},qH:function(){return o.qH},rS:function(){return l.rS}});var t=i(3307),o=i(42406),l=i(88301)},1771:function(n,e,i){i.d(e,{A:function(){return t.Ad}
1});var t=i(72430)},97477:function(n,e,i){i.d(e,{P:function(){return t.PQ}});var t=i(11946)},20789:function(n,e,i){i.d(e,{BC:function(){return t.BC},DH:function(){return t.DH},Ln:function(){return o.Ln},Q1:function(){return o.Q1},rS:function(){return t.rS}});var t=i(68724),o=i(57349)},63514:function(n,e,i){i.d(e,{_:function(){return t._d},g:function(){return t.gp}});var t=i(11946)},23448:function(n,e,i){i.d(e,{v:function(){return t.vn}});var t=i(12902)},21936:function(n,e,i){i.d(e,{m:function(){return o}});var t=i(2784);let o=()=>{let[n,e]=(0,t.useState)([]),i=["https://myvfapp-aem.vodafone.it/content/dam/myvf/mva10/cce-pdf/3556298.pdf","https://myvfapp-aem.vodafone.it/content/dam/myvf/mva10/cce-pdf/3556298.pdf","https://myvfapp-aem.vodafone.it/content/dam/myvf/mva10/cce-pdf/3556298.pdf","https://myvfapp-aem.vodafone.it/content/dam/myvf/mva10/cce-pdf/3556298.pdf"],o=()=>{var n;let e=localStorage.getItem("retrieveMultiLines"),t=e?JSON.parse(e):[];return null==t?void 0:null===(n=t.partyPrivacyItems)||void 0===n?void 0:n.map((n,e)=>({...n,selectedValue:(null==n?void 0:n.selectedValue)||!1,pdf:i[e],name:n.title||"",description:"".concat(n.longDescription?n.description:""),longDescription:n.longDescription||n.description}))};return(0,t.useEffect)(()=>{localStorage.getItem("retrieveMultiLines")&&e(o())},[localStorage.getItem("retrieveMultiLines")]),{partyPrivacyItems:n}}},35977:function(n,e,i){i.d(e,{n:function(){return d}});var t=i(4217),o=i(89131),l=i(76814),r=i(2784);let d=n=>{let{isFlowEnabled:e=!0,fiscalCode:i,owningDataIsValid:d,ageLimit:a=18,isWinbackFlow:u=!1}=n,[s]=(0,r.useState)(!1),[c,v]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[g,m]=(0,r.useState)(""),[h,y]=(0,r.useState)(""),[b,C]=(0,r.useState)(!1),[E,S]=(0,r.useState)(!1),x=localStorage.getItem("customerDataCf"),I=()=>!!(i&&16===i.length),{data:A,isLoading:_,isError:T}=(0,o.p)({...u&&{isWinbackFlow:u},fiscalCode:null==i?void 0:i.toUpperCase()},{enabled:d&&b&&16===i.length&&e}),N=()=>{let n=(0,l.Q)(i),e=null==n?void 0:n.day,o=+(null==n?void 0:n.year),r=null==n?void 0:n.month,d=(n=>{let e=new Date,i=new Date(n),t=e.getFullYear()-i.getFullYear(),o=e.getMonth()-i.getMonth();return((o<0||0===o&&e.getDate()<i.getDate())&&t--,t===a&&(e.getMonth()===i.getMonth()&&e.getDate()<i.getDate()||e.getMonth()<i.getMonth()))?t-1:t})("".concat(r,"/").concat(e,"/").concat(o));n?!n.year||d<a?(y(t.S.FISCAL_CODE_UNDERAGE),f(!0),C(!1)):(y(""),f(!1),C(!0)):(y(t.S.FISCAL_CODE_ERROR),f(!1),C(!1))};return(0,r.useEffect)(()=>{y(""),f(!1),v(!1),C(!1),d&&I()&&N()},[i,d]),(0,r.useEffect)(()=>{A&&x&&i&&i!==x&&S(!0)},[A]),(0,r.useEffect)(()=>{_?v(!0):v(!1)},[_]),(0,r.useEffect)(()=>{T&&(y(t.S.FISCAL_CODE_ERROR),f(!0),C(!1))},[T]),{isSuccess:s,isLoading:c,isError:p,getFindCallerResponse:A,errorMessage:g,errorCode:h,resetShoppingCart:()=>{},isInResetCustomer:E}}},31728:function(n,e,i){i.d(e,{q:function(){return t.q}});var t=i(78439)},26533:function(n,e,i){i.d(e,{g:function(){return s}});var t=i(82066),o=i(2784),l=i(4880),r=i(28432),d=i(77125),a=i(13630),u=i(4233);let s=(n,e,i,s)=>{var c,v,p,f,g;let m=(0,t.useQueryClient)(),[h,y]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!1),[E,S]=(0,o.useState)(!1),[x,I]=(0,o.useState)(!1),[A,_]=(0,o.useState)(""),[T,N]=(0,o.useState)([]),[L,O]=(0,o.useState)(n),R={...e,displayStateOrProvince:null==e?void 0:e.stateOrProvince},D=m.getQueryData("pickupAddress"),M=m.getQueryData("pickupCreatedAddress"),P=m.getQueryData("searchPickUpLocations".concat(null==M?void 0:M.id)),w=m.getQueryData("searchPickUpStoreLocations".concat(null==M?void 0:M.id)),k=m.getQueryData("searchPickUpStoreLocations".concat(null==M?void 0:M.id)),j=!!(null==R?void 0:R.city)&&!!(null==R?void 0:R.postalCode)&&!!(null==R?void 0:R.displayStateOrProvince)&&!!(null==R?void 0:R.stateOrProvince)&&!!(null==R?void 0:R.street)&&!!(null==R?void 0:R.streetNumber)&&((null==R?void 0:R.city.toUpperCase())!==(null==M?void 0:null===(c=M.city)||void 0===c?void 0:c.toUpperCase())||(null==R?void 0:R.postalCode.toUpperCase())!==(null==M?void 0:null===(v=M.postalCode)||void 0===v?void 0:v.toUpperCase())||(null==R?void 0:R.stateOrProvince.toUpperCase())!==(null==M?void 0:null===(p=M.stateOrProvince)||void 0===p?void 0:p.toUpperCase())||(null==R?void 0:R.street.toUpperCase())!==(null==M?void 0:null===(f=M.street)||void 0===f?void 0:f.toUpperCase())||(null==R?void 0:R.streetNumber.toUpperCase())!==(null==M?void 0:null===(g=M.streetNumber)||void 0===g?void 0:g.toUpperCase())),{mutate:B,isLoading:F,isSuccess:z,reset:Z}=(0,a.r)(),{mutate:H,isLoading:V,isSuccess:U,reset:Q}=(0,l.V)(),{mutate:G,data:Y,isError:W,isSuccess:J,reset:X}=(0,d.P)(),{mutate:q,data:K,isError:$,isSuccess:nn,reset:ne}=(0,d.P)(),{mutate:ni,data:nt,isError:no,isSuccess:nl,reset:nr}=(0,r.W)();return(0,o.useEffect)(()=>{!j&&R&&I(!0),!F&&R&&j&&!D&&(C(!0),B({placeObject:R,isPickup:!0}))},[F,R,j]),(0,o.useEffect)(()=>
1{if((null==D?void 0:D.error)&&(C(!1),S(!0),_(D.errorMessage)),j&&D&&z&&!V&&!(null==D?void 0:D.error)&&!M){var n;H({address:null==D?void 0:null===(n=D.validAddressList)||void 0===n?void 0:n[0],isPickup:!0})}},[D,z]),(0,o.useEffect)(()=>{if((null==M?void 0:M.error)&&(C(!1),S(!0),_(M.errorMessage)),U&&M&&!(null==M?void 0:M.error)&&!(null==M?void 0:M.error))switch(O(M),s){case u.G.PO:G({id:null==M?void 0:M.id});break;case u.G.PP:q({id:null==M?void 0:M.id,options:u.G.PP});break;case u.G.P:ni(null==M?void 0:M.id);break;default:G({id:null==M?void 0:M.id})}},[s,M,U]),(0,o.useEffect)(()=>{J&&Y&&!(null==P?void 0:P.errorMessage)&&(C(!1),y(!0),N(Y)),(W||(null==P?void 0:P.errorMessage))&&(N([]),S(!0),C(!1),y(!1),_(null==P?void 0:P.errorMessage))},[J,W,Y,P]),(0,o.useEffect)(()=>{nn&&K&&!(null==w?void 0:w.errorMessage)&&(C(!1),y(!0),N(K)),($||(null==w?void 0:w.errorMessage))&&(N([]),S(!0),C(!1),y(!1),_(null==w?void 0:w.errorMessage))},[nn,$,K,w]),(0,o.useEffect)(()=>{nl&&nt&&!(null==k?void 0:k.errorMessage)&&(C(!1),y(!0),N(nt)),(no||(null==k?void 0:k.errorMessage))&&(N([]),C(!1),y(!1),S(!0),_(null==k?void 0:k.errorMessage))},[nl,no,nt,k]),(0,o.useEffect)(()=>{0===i&&(N([]),y(!1),S(!1),_(""),Z(),Q(),X(),ne(),nr())},[i]),{pickupPoints:T,isAddressObjectFul:x,isSuccess:h,isLoading:b,isError:E,errorMessage:A,startingSearchAddress:L,setStartingSearchAddress:O}}}}]); 2//# sourceMappingURL=5973-e5cf09586c0ca7b4.js.map
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.