1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5349],{17146:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/web/fail",function(){return n(14588)}])},2465:(e,t,n)=>{"use strict";n.d(t,{g:()=>T,V:()=>w});var a=n(74848),i=n(14953),o=n.n(i),r=n(96540),l=n(55918),s=n(97461),c=n(99660),u=n(9479),d=n.n(u),_=n(35296),p=n(74368),m=n(91106),v=n.n(m),y=n(63615),h=n.n(y),f=n(68850);let b=()=>{let e=(0,f.A)();return(0,r.useEffect)(()=>{e({action_id:"collection_view",action_parameter:"link",screen_type:"payment_form",screen_attributes_id:"subscription_success",block_type:"banner",block_attributes_id:"banner_link",element_type:"link",element_attributes_id:"/account/rec_setup"})},[]),(0,a.jsxs)(v(),{href:"/account/rec_setup",prefetch:!1,className:h().wrapper,onClick:()=>{e({action_id:"click",action_parameter:"link",screen_type:"payment_form",screen_attributes_id:"subscription_success",block_type:"banner",block_attributes_id:"banner_link",element_type:"link",element_attributes_id:"/account/rec_setup"})},children:[(0,a.jsx)("div",{className:h().descr,children:"ÐаÑÑÑойÑе ваÑи ÑекомендаÑии"}),(0,a.jsx)("img",{className:h().image,src:"/static/images/payment/arrow_rec.svg",alt:"arrow"})]})},g=o()(()=>Promise.all([n.e(3342),n.e(3049)]).then(n.bind(n,73049)),{loadableGenerated:{webpack:()=>[73049]},ssr:!1}),w={SUCCESS:"SUCCESS",FAIL:"FAIL",PREMIUM:"PREMIUM"},k={[w.SUCCESS]:{src:"/static/images/auth/successIcon.svg",alt:"УÑпеÑ
"},[w.FAIL]:{src:"/static/images/icons/close-circle.svg",alt:"ÐÑибка"}},x=()=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2454 4.24391C14.5708 3.91848 15.0985 3.91848 15.4239 4.24391C15.7493 4.56935 15.7493 5.09699 15.4239 5.42243L11.0131 9.83317L15.4239 14.2439C15.7493 14.5694 15.7493 15.097 15.4239 15.4224C15.0985 15.7479 14.5708 15.7479 14.2454 15.4224L9.83461 11.0117L5.42386 15.4224C5.09842 15.7479 4.57078 15.7479 4.24534 15.4224C3.91991 15.097 3.91991 14.5693 4.24534 14.2439L8.65609 9.83316L4.24535 5.42241C3.91991 5.09698 3.91991 4.56934 4.24535 4.2439C4.57078 3.91846 5.09842 3.91846 5.42386 4.2439L9.83462 8.65467L14.2454 4.24391Z",fill:"currentColor"})}),j=()=>{let[e,t]=(0,r.useState)(null);return(0,r.useEffect)(()=>{n.e(8518).then(n.t.bind(n,78518,19)).then(e=>{t((null==e?void 0:e.default)||e)})},[]),(0,a.jsx)("div",{className:d().logo,children:e?(0,a.jsx)(g,{style:{pointerEvents:"none"},isClickToPauseDisabled:!0,options:{loop:!1,autoplay:!0,animationData:e,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}}):null})},T=e=>{let{variant:t,headingText:n,descriptionText:i,submitButtonText:o,buttonTestId:u,onSubmit:m,isSubmitting:v,onClose:y}=e,h=(0,p.d4)(e=>e.registration.authData),f=(0,r.useRef)(null),g=(0,l.j)(),[T,P]=(0,r.useState)(null);return(0,r.useEffect)(()=>{var e;let n=(null===(e=f.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0;document.documentElement.style.setProperty("--payment-result-button-height","".concat(n,"px"));let a=localStorage.getItem("recSetup_".concat(null==h?void 0:h.profile_id));return P("test_rec_setup"===(0,_.l3)((null==h?void 0:h.ab)||[],"rec_setup")&&!a&&t!==w.FAIL),()=>{document.documentElement.style.removeProperty("--payment-result-button-height")}},[]),(0,a.jsxs)("div",{className:d().content_wrapper,children:[(0,a.jsx)(c.g,{heightUnset:T,children:(0,a.jsxs)("div",{className:d().content,children:[y&&(0,a.jsx)(s.$n,{size:s.GO.SMALL,variant:s.Vt.TERTIARY,className:d().close,iconLeft:(0,a.jsx)(x,{}),onClick:y}),(0,a.jsxs)("div",{className:d().result,children:[t===w.PREMIUM?(0,a.jsx)(j,{}):(0,a.jsx)("img",{className:d().resultIcon,src:k[t].src,alt:k[t].alt}),(0,a.jsx)("h1",{className:d().resultHeading,dangerouslySetInnerHTML:{__html:n}}),(0,a.jsx)("p",{className:d().resultDescription,dangerouslySetInnerHTML:{__html:i}})]}),(0,a.jsx)("div",{className:d().button,ref:f,children:(0,a.jsx)(s.$n,{size:g,fullWidth:!0,title:o,onClick:m,isDisabled:v,isLoading:v,"data-testid":u})})]})}),T&&(0,a.jsx)(b,{})]})}},99660:(e,t,n)=>{"use strict";n.d(t,{g:()=>c});var a=n(74848),i=n(6016),o=n(31968),r=n.n(o),l=n(46942),s=n.n(l);let c=e=>{let{onOverLayClick:t,children:n,heightUnset:o}=e;return(0,a.jsxs)("div",{className:s()(r().layout,{[r().layout_min]:o}),children:[(0,a.jsx)("div",{className:r().overlay,onClick:t}),(0,a.jsx)(i.A,{children:n})]})}},6016:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(74848),i=n(15848),o=n.n(i);let r=e=>{let{children:t}=e;return(0,a.jsx)("div",{className:o().wrapper,children:(0,a.jsx)("div",{className:o().scrollable,children:t})})}}
1,14588:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var a=n(74848),i=n(96540),o=n(74368),r=n(86715),l=n.n(r),s=n(75756),c=n(35296),u=n(47819),d=n(68850),_=n(48398),p=n(80364),m=n(30291),v=n(2465),y=n(98047);let h=()=>{let{error:e,session_id:t}=(0,r.useRouter)().query,n="insufficient_funds"===e,h=(0,o.wA)(),f=(0,p.A)(),b=(0,d.A)(),g=(0,_.A)(),w=(0,o.d4)(e=>e.registration.authData),k=(0,o.d4)(e=>e.systemInformation.configExps),x=(0,c.Ri)("client_key"),j=x?"?apikey=".concat(x):g,[T,P]=(0,i.useState)(!1),R=async e=>{let{redirectUrl:t,clientKey:n}=e;await new Promise((e,a)=>{(0,u.BA)({url:t,clientKey:n,errorCallback:a})})},C=e=>{let t=(0,c.Ri)("selectedTariffG")||(0,c.Ri)("selectedTariff"),n=t?e.find(e=>e._id==t):e[0];return n?"".concat(f).concat(n.url).concat(j).concat((0,c.Ij)()):""},E=async()=>{let e=(0,c.Ri)("channel"),t=(0,c.rh)(w,k),n="".concat(f).concat(u.PI.getTariffs).concat(j).concat(e?"&channel=".concat(e):t||""),a=await fetch(n,{credentials:"include",method:"GET"});if(!a.ok)throw Error("HTTP error! status: ".concat(a.status));let i=await a.json();if(!i.length)throw Error("No tariffs");return h((0,s.ZI)(i)),i},N=async()=>{let e="".concat(f).concat(u.PI.addCard).concat(j),t=(0,c.Ri)("advcake_url");t&&!e.includes("&advcake_url")&&(e+="&advcake_url=".concat(t)),await R({redirectUrl:e,clientKey:x})},S=async e=>{var t,n,a,i,o,r,l,s,d,_,p;let m="".concat(f).concat(u.PI.promoCode).concat(j),v=await fetch(m,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({coupon_code:e.toLowerCase()})});if(!v.ok)throw Error("HTTP error! status: ".concat(v.status));let y=await v.json();"NEED_PAYMENT_METHOD_TO_ACTIVATE_PROMO"===y.code?((0,c.TV)("npmtap",!0),(null==y?void 0:null===(_=y.data)||void 0===_?void 0:null===(d=_.price)||void 0===d?void 0:d.paid_period_duration)&&(0,c.TV)("coupon_paid_period_duration",JSON.stringify(y.data.price.paid_period_duration))):"NEED_PAYMENT_TO_ACTIVATE_PROMO"===y.code&&(0,c.TV)("nptap",!0),(null==y?void 0:null===(t=y.data)||void 0===t?void 0:t.duration)&&(0,c.TV)("coupon_duration",JSON.stringify(null==y?void 0:null===(p=y.data)||void 0===p?void 0:p.duration));let h=(null==y?void 0:null===(n=y.data)||void 0===n?void 0:n.promo_price)||(null==y?void 0:null===(i=y.data)||void 0===i?void 0:null===(a=i.price)||void 0===a?void 0:a.price);h&&(0,c.TV)("coupon_price",h);let b=(null==y?void 0:null===(o=y.data)||void 0===o?void 0:o.price.currency)||(null==y?void 0:null===(r=y.data)||void 0===r?void 0:r.currency);b&&(0,c.TV)("coupon_currency",b),(null==y?void 0:null===(l=y.data)||void 0===l?void 0:l.tariff_id)&&(0,c.TV)("coupon_tariff_id",y.data.tariff_id);let g=null==y?void 0:null===(s=y.data)||void 0===s?void 0:s.url;if(!g)throw Error("No tariffUrl");let w=(0,u.fQ)("".concat(f).concat(g).concat(j.replace("?","&")).concat((0,c.Ij)()));await R({redirectUrl:w,clientKey:x})},I=async()=>{b({action_id:"click",element_type:"button",element_attributes_id:"to_payment",element_attributes_text:"ÐопÑобоваÑÑ Ñнова"});try{if(P(!0),(0,c.Ri)("addCard")){await N();return}if(t){var e;let n="".concat(f,"/billing/session/").concat(t).concat(j),a=await fetch(n,{method:"GET",credentials:"include"}),i=await a.json();if((null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.length)&&(null==i?void 0:i.pricing_model)==="est"){let e={tvod_type:"est",items:i.items},t="".concat(f).concat(u.PI.estBuy).concat(j);fetch(t,{method:"POST",credentials:"include",body:JSON.stringify(e),headers:{"Content-type":"application/json; charset=UTF-8"}}).then(t=>{t.status<400?t.json().then(e=>{window.location.href=e.form_url}):(P(!1),h((0,y.Og)({visible:!0,data:e})))})}}else{let e=await E(),t=(0,c.Ri)("coupon_code"),n=(0,c.Ri)("nptap"),a=(0,c.Ri)("npmtap");if(t&&(n||a)){await S(t);return}if(t){await l().push("/code/success");return}let i=C(e);if(i){await R({redirectUrl:i,clientKey:x});return}}}catch(e){throw P(!1),e}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.A,{title:"УпÑ..."}),(0,a.jsx)(v.g,{variant:v.V.FAIL,headingText:n?"ÐедоÑÑаÑоÑно ÑÑедÑÑв":"ÐпеÑаÑÐ¸Ñ Ð¾Ñклонена",descriptionText:n?"ÐополниÑе Ð±Ð°Ð»Ð°Ð½Ñ Ð¸Ð»Ð¸ оплаÑиÑе дÑÑгой каÑÑой":"СвÑжиÑеÑÑ Ñ\xa0ваÑим банком<br />или\xa0воÑполÑзÑйÑеÑÑ Ð´ÑÑгим ÑпоÑобом оплаÑÑ",submitButtonText:"ÐопÑобоваÑÑ Ñнова",buttonTestId:"go_main_page_button_text",onSubmit:I,isSubmitting:T,onClose:()=>{b({action_id:"click",element_type:"button",element_attributes_id:"cross"}),l().push("/")}})]})},f=()=>(0,a.jsx)(h,{})},9479:e=>{e.exports={"storybook-root":"PaymentResult_storybook-root__6YmZR",content:"PaymentResult_content__jx2tK",content_wrapper:"PaymentResult_content_wrapper__N4kVp",close:"PaymentResult_close__g3tJ4",result:"PaymentResult_result__F1ZLA",logo:"PaymentResult_logo__7IFeM",resultIcon:"PaymentResult_resultIcon__5a3__",resultHeading:"PaymentResult_resultHeading__fWX6z",resultDescription:"PaymentResult_resultDescription__4beAu",button:"PaymentResult_button__eVTv_"}},63615:e=>{e.exports={"storybook-root":"RecSetupLink_storybook-root__xpO9J",wrapper:"RecSetupLink_wrapper__ddQjv",descr:"RecSetupLink_descr__HMNiG",image:"RecSetupLink_image__QZ3E8"}},31968:e=>{e.exports={"storybook-root":"MainPopup_storybook-root__vP_4J",layout:"MainPopup_layout__rueVf",layout_min:"MainPopup_layout_min__wc_07",overlay:"MainPopup_overlay___Ybts"}},15848:e=>{e.exports={"storybook-root":"PopupWrapper_storybook-root__OCz5G",wrapper:"PopupWrapper_wrapper__7qdj7",scrollable:"PopupWrapper_scrollable__k7FnR"}}},e=>{var t=t=>e(e.s=t);e.O(0,[636,6593,8792],()=>t(17146)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.