1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3131],{98058(e,t,a){a.r(t),a.d(t,{default:()=>d});var r=a(74848),n=a(96540),o=a(77109),i=a(31299),s=a(71468),l=a(29850),c=a(18492),u=a(50883);const d=(0,n.memo)(({hasMaxRequests:e})=>{const t=(0,s.useDispatch)(),{t:a}=(0,c.useTranslation)("Alerts");return(0,n.useEffect)(()=>{window.onbeforeunload=function(){setTimeout(()=>{e&&isAuthenticated&&t((0,l.logoutAction)())},300)}},[e]),e?(0,r.jsx)(o.default,{classNameContainer:"frod_notification-dialog",isOpen:e,onIconCloseClick:()=>t((0,l.logoutAction)()),children:(0,r.jsxs)("div",{className:"frod_notification-container",children:[(0,r.jsx)("span",{className:"frod_notification-text",children:a("frod_notification")}),(0,r.jsx)(i.Button,{onClick:u.openIntercomDialog,children:a("frod_notification_button")})]})}):null})},47833(e,t,a){a.r(t),a.d(t,{SslSecureComponent:()=>o});var r=a(74848),n=a(80852);const o=()=>(0,r.jsxs)("div",{className:"df aic basket-page__stripe-ssl-component",children:[(0,r.jsx)("a",{href:"https://stripe.com/",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)(n.Stripe,{})}),(0,r.jsx)("a",{className:"ml10",href:"https://sectigo.com/",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)(n.SslSecure,{})})]})},17805(e,t,a){a.r(t),a.d(t,{getErrorStripe:()=>n});const r={"-33260":"Alerts::Billing_not_found","-33300":"Alerts::Invalid_cvc","-33301":"Alerts::Expired_card","-33302":"Alerts::Processing_error","-33303":"Alerts::Card_declined","-32000":"Alerts::Card_declined","-33304":"Alerts::Balance_insufficient","-33305":"Alerts::Postal_code_invalid","-33306":"Alerts::Country_unsupported","-33307":"Alerts::Incorrect_address","-33308":"Alerts::Invalid_expiry_month","-33309":"Alerts::Invalid_expiry_year","-33310":"Alerts::Invalid_number","-33311":"Alerts::Invalid_name","-33312":"Alerts::Invalid_city","-33313":"Alerts::Invalid_street","-33314":"Alerts::Invalid_state",payment_intent_authentication_failure:"Alerts::payment_intent_authentication_failure",payment_has_last_try_error:"Alerts::payment_has_last_try_error",payment_fail_count_error:"Alerts::payment_fail_count_error",expired_card:"Alerts::Expired_card"},n=(e,t)=>r[e]||r[t]||r[-33260]},35625(e,t,a){a.r(t),a.d(t,{default:()=>r});const r={subscribtionAndValidity:"BreadCrumbs::1_subscribtion_and_validity",payment:"BreadCrumbs::2_payment",backToBills:"BreadCrumbs::bill_custom",backButton:"Global::back_button",\u0441hooseSubscribtionTerm:"Basket::1_choose_subscribtion_term",orderDetails:"Global::order_details",period:"Basket::period",discount:"Basket::discount",priceForPeriod:"Basket::price_for_period",monthSingle:"Basket::month_single",monthPlural:"Basket::month_plural",monthsPlural:"Basket::months_plural",billingMonthSingle:"Basket::billing_month_single",billingMonthPlural:"Basket::billing_month_plural",billingMmonthsPlural:"Basket::billing_months_plural",saving:"Basket::saving",saving3years:"Basket::saving_3_years",subscriptionDetailPopup:"Basket::subscription_details_pop_up",database:"Basket::databeses_access",
1searchAnalytics:"Basket::general_limits",backlinksAnalysis:"Basket::backlinks_analysis",positionTracking:"Basket::position_tracking",siteAudit:"Basket::site_audit",additional:"Basket::additional",google:"Basket::Google_databeses",yandex:"Basket::Yandex_databeses",queriesPerDay:"Basket::queries_per_day",resultsPerReport:"Basket::results_per_query",exportAnalytics:"Basket::export_analytics",queriesPerDayTooltip:"tooltip::queries_per_day",resultsPerReportTooltip:"tooltip::results_per_query",exportAnalyticsTooltip:"tooltip::export_analytics",feature_in_development:"pay_page::feature_upon_request",apiAccess:"Basket::access_to_api",hasAnalyticApi:"Basket::analytic_api",hasAnalyticApiTooltip:"tooltip::analytic_api",hasBacklinksApi:"Basket::backlinks_api",hasBacklinksApiTooltip:"tooltip::backlinks_api",apiRowCount:"Basket::max_queries_per_day",apiRowCountTooltip:"tooltip::max_queries_per_day",apiMaxRequestsPerSecond:"Basket::api_max_requests_per_second",apiMaxRequestsPerSecondTooltip:"tooltip::api_max_requests_per_second",hasRtApi:"Basket::has_rt_api",hasRtApiTooltip:"tooltip::has_rt_api",hasAuditApi:"Basket::has_audit_api",hasAuditApiTooltip:"tooltip::has_audit_api",trackedKeywords:"Basket::pay_page_rank_tracker",trackedKeywordsTooltip:"tooltip::pay_page_rank_tracker",hasTrackingCompetitorsDomain:"Basket::rank_tracker_competitors_domain",hasTrackingCompetitorsDomainTooltip:"tooltip::rank_tracker_competitors_domain",pageCount:"Basket::audit_max_checked_pages",pageCountTooltip:"tooltip::audit_max_checked_pages",hasOnePageAudit:"Basket::has_audit_one_page",hasOnePageAuditTooltip:"tooltip::has_audit_one_page",hasChecklist:"Basket::checklist",hasChecklistTooltip:"tooltip::checklist",hasMobileTracking:"Basket::rank_tracker_has_mobile_parsing",hasMobileTrackingTooltip:"tooltip::rank_tracker_has_mobile_parsing",hasWhiteLabelReports:"Basket::pay_page_white_label",hasWhiteLabelReportsTooltip:"tooltip::pay_page_white_label",hasBrandedReports:"Basket::pay_page_brand_report",hasBrandedReportsTooltip:"tooltip::pay_page_brand_report",hasMailingReports:"Basket::pay_page_mail_trigger",hasMailingReportsTooltip:"tooltip::pay_page_mail_trigger",clusteringKeywordCount:"Basket::pay_page_clustering_TA",clusteringKeywordCountTooltip:"tooltip::pay_page_clustering_TA",countProject:"Basket::max_projects",countProjectTooltip:"tooltip::max_projects",hasChatSupport:"Basket::ticket_support",hasChatSupportTooltip:"tooltip::ticket_support",hasCustomerSuccess:"Basket::customer_success",hasCustomerSuccessTooltip:"tooltip::customer_success",hasPhoneSupport:"Basket::phone_support",hasPhoneSupportTooltip:"tooltip::phone_support",receiptDetails:"Basket::receipt_details",validUntil:"Basket::valid_until",paymentPeriod:"Basket::payment_period",totalSumToPay:"Basket::total_sum_to_pay",getSubscribtion:"Global::get_subscribtion",recurringPayment:"Basket::recurring_payment",recurrentPaymentDescription:"tooltip::recurrent_payment_description",publicAgreementStatement:"Basket::public_agreement_statement",publicOffer:"Basket::public_offer",projects:"Basket::projects",projectCount:"Basket::max_projects",inviteCount:"Basket::rt_max_invites",projectCountTooltip:"tooltip::max_projects",inviteCountTooltip:"tooltip::rt_max_invites",rankTrackerDailyUpdate:"Basket::rank_tracker_daily_update",rankTrackerSeoPosition:"Basket::rank_tracker_seo_position",rankTrackerPpcPosition:"Basket::rank_tracker_ppc_position",rankTrackerDailyUpdateTooltip:"tooltip::rank_tracker_daily_update",rankTrackerSeoPositionTooltip:"tooltip::rank_tracker_seo_position",rankTrackerPpcPositionTooltip:"tooltip::rank_tracker_ppc_position",tools:"Basket::tools",maxOfferedKeywords:"Basket::max_offered_keywords",analyticsParseFrequency:"Basket::analytics_parse_frequency",rankTrackerParseTop:"Basket::rt_parse_top",maxOfferedKeywordsTooltip:"tooltip::max_offered_keywords",analyticsParseFrequencyTooltip:"tooltip::analytics_parse_frequency",rankTrackerParseTopTooltip:"tooltip::rt_parse_top",teamManagement:"Basket::team_management",teamMemberCount:"Basket::pay_page_team_management",teamMemberCountTooltip:"tooltip::pay_page_team_management",reports:"Basket::reports",feature_upon_request:"pay_page::feature_upon_request",subscribtionPayment:"Basket::2_subscribtion_payment",cardpayStepTextUnderCardInput
1:"Basket::cardpay_step_text_under_card_input",cardNumber:"Basket::card_number",cardName:"Basket::card_name",cardExpireDate:"Basket::card_expire_date",cardCvcCvv:"Basket::card_cvc_cvv",cardNamePlaceholder:"placeholder::card_name",chosePaymentMethodLabel:"Basket::choose_payment_method",recurringPaymentLabel:"Basket::recurring_payment",recurringPaymentTooltip:"tooltip::reccurent_payment_description",getInvoiceMethod:"Basket::get_invoice_method",getCryptoMethod:"Basket::get_crypto_method",promoCodeInputSpoilerText:"Basket::promo_code_input_spoiler_text",getInvoiceMethodTooltip:"tooltip::payment_min_money_ammount",getCryptoMethodTooltip:"tooltip::crypto_payment_min_period",getInvoiceMethodTooltipDisable:"tooltip::payment_min_money_ammount_disable",getCryptoMethodTooltip_amount:"tooltip::crypto_payment_min_money_ammount",getCryptoMethodTooltipDisable:"tooltip::crypto_payment_min_money_ammount_disable",promoCodeInputLabel:"Basket::put_promo_code",promoCodeInputPlaceholder:"placeholder::promo_code_number",applyPromoCodeButton:"Global::apply_button",cancelPromoCode:"Global::cancel_promo_code",promoCodeDiscount:"Basket::promo_code_discount",confirmTel:"Basket::confirm_tel_number",telNumberInputLabel:"Basket::tel_number",noPeriodDiscountWithPromoCode:"Alerts::code_acceptable_with_full_cost",verificationCodeSent:"Basket::account_verification_code_sent",verificationAttemptsLeft:"Basket::account_verification_attempts_left",sendAgain:"Basket::send_code_again",codeLabel:"Basket::code",codePlaceholder:"placeholder::put_confirmation_code",noAttempts:"Basket::something_wrong",contactSupport:"Basket:contact_chat_support",notForThisPeriodError:"Alerts::discount_coupon_is_not_compatible_with_tihis_period",notForThisPlanError:"Alerts::discount_coupon_is_not_compatible_with_this_subscription_plan",sendAfterTimer:"Basket::send_again_after",enoughFundsForSubscriptionChange:"Alerts::current_subscribtion_money_amount_and_days_amount_for_new_suscribtion",notEnoughFundsForSubscriptionChange:"Alerts::current_subscribtion_money_amount_and_money_amount_for_new_subscribtion_to_pay",userFunds:"Basket::funds_on_your_account",enoughFunds:"Basket::enough_funds",changeSubscription:"Global::change_subscribtion",twoWeeksRestriction:"Alerts::2_weeks_restriction",subscriptionActivated:"Basket::subcsribtion_has_been_activated",country:"Basket::country",userCountry:"placeholder::user_country",userState:"placeholder::user_state",userStreet:"placeholder::user_street",userCity:"placeholder::user_city",state:"Basket::state",zip:"Basket::zip",city:"Basket::city",street:"Basket::street",leftPartPhoneLabel:"Basket::phone_number",leftPartPhonePlaceholder:"placeholder::put_your_tel_number",leftPartPhoneNoPhoneError:"InputErrors::required",subscriptionDisable:"Basket::choose_another_payment_method_or_period",provideBillingInfo:"tooltip::provide_billing_info",recurringPaymentCheckbox:"Basket::recurring_payment_checkbox",buyButton:"Global::buy_button",backlinksAnalysisqueriesPerDay:"Basket::backlinks_max_queries",backlinksAnalysisqueriesPerDayTooltip:"tooltip::backlinks_max_queries",backlinksAnalysisresultsPerReport:"Basket::backlinks_max_lines",backlinksAnalysisresultsPerReportTooltip:"tooltip::backlinks_max_lines",backlinksAnalysisexportBacklinks:"Basket::export_backlinks",backlinksAnalysisexportBacklinksTooltip:"tooltip::export_backlinks",downgradePopupTitle:"Basket::downgrade_popup_title",downgradeInfoStopsUpdates:"Basket::downgrade_info_stops_updates",downgradeInfoNeedSetUpdate:"Basket::downgrade_info_need_set_update",downgradeInfoUsersDecrease:"Basket::downgrade_info_users_decrease",downgradeInfoProjectsDecrease:"Basket::downgrade_info_projects_decrease",downgradeInfoNeedRemoveUsers:"Basket::downgrade_info_need_remove_users",downgradeContinueButton:"Global::continue_button",downgradeCurrentSubscriptionButton:"Global::leave_current_subscription_button",downgradeLinkToProkects:"Basket::link_to_dashboard_to_remove_projetcs",downgradeLinkToTeamManagement:"Basket::link_to_team_management",confirmOfferError:"Basket::confirm_offer",saleBasketForFree:"Basket::sale_for_free",taxVat:"Basket::tax_vat",storagePerio
1d:"Basket::audit_term_storage"}},79611(e,t,a){a.r(t),a.d(t,{useLazyProcedure:()=>o});var r=a(96540),n=a(86673);const o=e=>{const[t,a]=(0,r.useState)(null),[o,i]=(0,r.useState)(!1),[s,l]=(0,r.useState)(null);return{callProcedure:t=>{return r=null,o=null,s=function*(){try{i(!0),a(null),l(null);const r=yield(0,n.fetchDataWithErrorCheck)(e,t);return a(r),r}catch(e){console.error(e),l(e)}finally{i(!1)}},new Promise((e,t)=>{var a=e=>{try{i(s.next(e))}catch(e){t(e)}},n=e=>{try{i(s.throw(e))}catch(e){t(e)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(a,n);i((s=s.apply(r,o)).next())});var r,o,s},clear:()=>{i(!1),a(null),l(null)},data:t,loading:o,error:s}}},92846(e,t,a){a.r(t),a.d(t,{getBasketSecureReturnUrl:()=>n});var r=a(99582);const n=e=>{return t=null,a=null,n=function*(){return`/pay/3ds-return/basket/?storageKey=${yield r.returnUrlParamsStorage.save(e)}`},new Promise((e,r)=>{var o=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);s((n=n.apply(t,a)).next())});var t,a,n}},23281(e,t,a){a.r(t),a.d(t,{default:()=>Te});var r=a(74848),n=a(78292),o=a(93253),i=a(78536),s=a(96540),l=a(97184),c=a(6841);const u=()=>{const e=(0,c.useBill)();return(0,r.jsx)(l.BillView,{billingInfo:e})};var d=a(36204),p=a(18492),m=a(31299);const y=({title:e,isDisabled:t=!1,hasError:a=!1})=>{var n;const{t:o}=(0,p.useTranslation)("Basket"),l=(0,i.useFormState)(),c=(0,i.useForm)(),u=(0,s.useCallback)(()=>{return e=null,t=null,a=function*(){var e;"savedCard"!==(null==(e=l.values)?void 0:e.paymentMethod)&&c.change("paymentMethod","stripe"),yield c.submit()},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a},[c,null==(n=l.values)?void 0:n.paymentMethod]),d=a?"red":"green",y=a?o("Basket::retry_payment"):e||o("Basket::paybutton");return(0,r.jsx)("div",{className:"df fdc",children:(0,r.jsx)(m.Button,{onClick:u,color:d,isLoad:l.submitting,isDisabled:l.hasValidationErrors||t,children:y})})};var _=a(67155);const h={type:"object",properties:{cardInfo:{type:"object",properties:{ccnumber:{type:"string"},holderName:{type:"string"},expiresDate:{type:"string"},cvc:{type:"string"}},required:["ccnumber","holderName","expiresDate","cvc"]},offerta:{enum:[!0],errorMessage:"Basket::confirm_offer"}},required:["cardInfo","offerta"]};var g=a(71008),M=a(72681),j=a(69595);const N=({error:e})=>{const{t}=(0,p.useTranslation)("Alerts");return(0,r.jsx)(j.default,{variant:"error",className:"basket-page__stripe-alert",isAlertStatic:!0,alertText:(0,r.jsxs)(r.Fragment,{children:[t(e)," ",t("Alerts::payment_errors_faq")]}),isCloseable:!1})};var k=a(17805),x=a(8008),v=a.n(x);class b{constructor(e){this.paymentMethodDto=e}runPaymentMethod(){return e=this,t=null,a=function*(){},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var I=a(86673),L=a(49847),f=a(46216),S=a(30475),T=(e,t,a)=>new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});class D extends b{get expMonth(){const[e]=this.paymentMethodDto.cardInfo.expiresDate.split(" / ");return e}get expYear(){const[e,t]=this.paymentMethodDto.cardInfo.expiresDate.split(" / ");return`20${t}`}get cardNumber(){const{ccnumber:e}=this.paymentMethodDto.cardInfo;return Number(e.replace(/ /g,""))}getMainInfo(){return T(this,null,function*(){return(0,I.fetchDataWithErrorCheck)("userSettings.getMainInformation",{useCache:S.core})})}getUserCountry(){return T(this,null,function*(){const{userInvoiceData:e}=yield this.getMainInfo();return e.country})}getUserZip(){return T(this,null,function*(){return(yield this.getMainInfo()).userInvoiceData.postalCode})}pay(){return T(this,null,function*(){const e=yield this.getUserCountry(),t=yield this.getUserZip();return yield(0,I.fetchDataWithErrorCheck)("payment.payStripe",{billId:Number(this.paymentMethodDto.billId),card:{number:this.cardNumber,cvc:String(this.paymentMethodDto.cardInfo.cvc),expMonth:this.expMonth,expYear:this.expYear,holderName:this.paymentMethodDto.cardInfo.holderName},address:{country:e.toUpperCase(),zip:t},recurring:!0})})}securePayment(e){return T(this,null,function*(){const t=yield(0,L.cardSecureCheck)(e);yield(0,I.fetchDataWithErrorCheck)("payment.confirmPayStripe",{billId:Number(this.paymentMethodDto.billId),intentId:t.id,recurring:!0})})}runPaymentMethod(){return T(this,null,function*(){const e=yield this.pay();e["3dSecure"]&&e.clientSecret&&(yield this.securePayment(e.clientSecret)),(0,f.transitionTo)("/pay/thank-you/")})}}var A=a(66595),w=a(71210),C=(e,t,a)=>new Promise((r,n)=>{var o=e=>
1{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});class B{constructor(e,t){this.strategy=e,this.validator=t}setStrategy(e){this.strategy=e}setValidator(e){this.validator=e}validate(){return C(this,null,function*(){yield this.validator.validate()})}process(){return C(this,null,function*(){var e,t;try{yield this.strategy.runPaymentMethod(),w.basketFlowHistory.remove("create_bill")}catch(a){const r=null==(t=null==(e=null==a?void 0:a.data)?void 0:e.data)?void 0:t.fails_count;if(4===r&&(a.code="payment_has_last_try_error"),5===r)throw new A.PaymentFailCountError;throw a}})}}class P extends b{runPaymentMethod(){return e=this,t=null,a=function*(){const e=this.paymentMethodDto.walletPayment.billId,t=this.paymentMethodDto.walletPayment.paymentMethodId,a=yield(0,I.fetchDataWithErrorCheck)("payment.payMerchantSystem",{billId:Number(e),paymentMethodId:t,recurring:!0});if(a["3dSecure"]&&a.clientSecret){const t=yield(0,L.cardSecureCheck)(a.clientSecret);yield(0,I.fetchDataWithErrorCheck)("payment.confirmPayStripe",{billId:Number(e),intentId:t.id,recurring:!0})}(0,f.transitionTo)("/pay/thank-you/")},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var z=a(79088),E=a(55263),O=a(26383);const Y=()=>{var e;const{billId:t}=(0,M.useParams)(),a=(0,i.useForm)(),n=null==(e=a.getFieldState("offerta"))?void 0:e.value,o=(0,c.useBill)(),l=(0,i.useFormState)(),u=(0,s.useCallback)(e=>{n||(e.stopPropagation(),a.submit())},[n,a]),d=(0,s.useCallback)(e=>{return t=null,r=null,n=function*(){a.change("paymentMethod","wallet"),a.change("walletPayment",e),yield(0,O.waiting)(500),a.submit()},new Promise((e,a)=>{var o=e=>{try{s(n.next(e))}catch(e){a(e)}},i=e=>{try{s(n.throw(e))}catch(e){a(e)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);s((n=n.apply(t,r)).next())});var t,r,n},[a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Field,{name:"walletPayment",defaultValue:null,render:E.renderNothing}),(0,r.jsx)("div",{"aria-hidden":!0,onClick:u,children:Boolean(o.total)&&(0,r.jsx)(z.GoogleApplePayBtn,{bill:{cost:o.total,billId:t},isDisabled:!n||l.submitting,isOfertaChecked:{value:n||!1},isOfertaErrorShown:!n,isRecurringChecked:n,onPaymentMethod:d})})]})};var U=a(28314),Q=a(95093),F=a.n(Q),R=a(92602),W=a(60480);const G=({children:e})=>{var t,a,r,n,o;const{billId:i}=(0,M.useParams)(),{data:s,loading:l}=(0,U.useProcedure)(["userBilling.bill",{billId:Number(i),useCache:W.cacheBasketService}]),{data:c}=(0,R.useDetailPlan)(String(null==s?void 0:s.planId)),u=null==s?void 0:s.period,d=F()(null==s?void 0:s.paidTo),p=F()(d).subtract(30*Number(u),"days").toDate(),m=null==(t=null==c?void 0:c.periods)?void 0:t.find(e=>e.period+e.additionalPeriod===Number(u));return e({paymentPeriodStart:p,paymentPeriodEnd:null==d?void 0:d.toDate(),additionalPeriod:null==m?void 0:m.additionalPeriod,period:u,tax:Number(null==(a=null==s?void 0:s.tax)?void 0:a.tax_amount),cost:null==s?void 0:s.cost,total:Number(null==(r=null==s?void 0:s.tax)?void 0:r.amount_total),priceToPay:Number(null==(n=null==s?void 0:s.tax)?void 0:n.amount_total),discountPercent:Number(null==s?void 0:s.discountPercent),discountSumm:Number(null==s?void 0:s.discountSum),loading:l,userBalance:0,vatTaxabilityReason:null==(o=null==s?void 0:s.tax)?void 0:o.vat_taxability_reason,planInfo:{id:Number(null==c?void 0:c.id),name:null==c?void 0:c.name},paidService:null==s?void 0:s.paidService,type:null==s?void 0:s.type,recurrent:null==s?void 0:s.recurrent})},q={type:"object",properties:{offerta:{enum:[!0],errorMessage:"Basket::confirm_offer"}},required:["offerta"]};var V=a(47833),J=Object.defineProperty,K=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,$=(e,t,a)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var X=a(74341),ee=a(37891),te=a(69604),ae=Object.getPrototypeOf,re=Reflect.get;class ne extends te.PaymentValidator{validateRequiredFields(e){return t=this,a=null,r=function*(){const t=w.basketFlowHistory.get("create_bill");if((null==t?void 0:t.billId)!==e)throw w.basketFlowHistory.add("create_bill",{billId:String(e)}),new ee.MainInfoValidationError;var a,r,n;yield(a=ne.prototype,r=this,n="validate",re(ae(a),n,r)).call(this)}
1,new Promise((e,n)=>{var o=e=>{try{s(r.next(e))}catch(e){n(e)}},i=e=>{try{s(r.throw(e))}catch(e){n(e)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);s((r=r.apply(t,a)).next())});var t,a,r}}var oe=a(29194);const ie=a(13722).default,se=()=>{var e;const[t]=(0,oe.useCookies)("show_paypal"),{t:a}=(0,p.useTranslation)(["Basket"]),n=(0,i.useForm)(),o=null==(e=n.getFieldState("offerta"))?void 0:e.value,l=(0,i.useFormState)(),c=(0,s.useCallback)(e=>{o||(e.stopPropagation(),n.submit())},[o,n]),u=(0,s.useCallback)(()=>{return e=null,t=null,a=function*(){n.change("paymentMethod","paypal"),yield(0,O.waiting)(500),n.submit()},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a},[n]);return["true","1"].includes(t)?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"basket-page__separator",children:(0,r.jsx)("span",{className:"basket-page__separator-text",children:a("cardpay_step_text_separator")})}),(0,r.jsx)("div",{className:"df fdc",onClick:c,"aria-hidden":!0,children:(0,r.jsx)(m.Button,{color:"outline",type:"button",isDisabled:!o,isLoad:l.submitting,onClick:u,children:(0,r.jsx)("img",{width:"80",src:ie,alt:"PayPal logo"})})})]}):null};var le=a(45758);class ce extends b{runPaymentMethod(){return e=this,t=null,a=function*(){const e=this.paymentMethodDto.billId,t=yield(0,I.fetchDataWithErrorCheck)("payment.systemPayParams",{billId:Number(e)});(0,le.generatePayPalForm)(t.paypal).submit(),yield(0,O.waiting)(5e3)},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var ue=a(92846),de=(e,t,a)=>new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});class pe extends D{pay(){return de(this,null,function*(){const e=yield this.getUserCountry(),t=yield this.getUserZip();return yield(0,I.fetchDataWithErrorCheck)("payment.payStripe",{billId:Number(this.paymentMethodDto.billId),card:{number:this.cardNumber,cvc:String(this.paymentMethodDto.cardInfo.cvc),expMonth:this.expMonth,expYear:this.expYear,holderName:this.paymentMethodDto.cardInfo.holderName},address:{country:e.toUpperCase(),zip:t},recurring:!0,returnUrl:yield(0,ue.getBasketSecureReturnUrl)({billId:this.paymentMethodDto.billId,planId:this.paymentMethodDto.planId,recurring:!0})})})}redirect(e){window.location.href=e}runPaymentMethod(){return de(this,null,function*(){const e=yield this.pay();if(e["3dSecure"]&&e.redirectUrl){const{redirectUrl:t}=e;this.redirect(t)}else(0,f.transitionTo)(`/pay/thank-you/${window.location.search}`)})}}class me extends P{redirect(e){window.location.href=e}runPaymentMethod(){return e=this,t=null,a=function*(){const e=this.paymentMethodDto.walletPayment.billId,t=this.paymentMethodDto.walletPayment.paymentMethodId,a=yield(0,I.fetchDataWithErrorCheck)("payment.payMerchantSystem",{billId:Number(e),paymentMethodId:t,recurring:!0,returnUrl:yield(0,ue.getBasketSecureReturnUrl)({billId:String(e),planId:this.paymentMethodDto.planId,recurring:!0})});if(a["3dSecure"]&&a.redirectUrl){const{redirectUrl:e}=a;this.redirect(e)}else(0,f.transitionTo)("/pay/thank-you/")},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var ye=a(46209),_e=Object.defineProperty,he=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,je=(e,t,a)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Ne=a(14644),ke=a(98058),xe=Object.defineProperty,ve=(e,t,a)=>((e,t,a)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a)(e,"symbol"!==typeof t?t+"":t,a);class be extends b{constructor(e,t){super(e),ve(this,"cardToken"),this.cardToken=t}runPaymentMethod(){return e=this,t=null,a=function*(){var e;const t=JSON.parse(sessionStorage.getItem("paymentValues")||"{}"),a=Number(t.period),r={planId:Number(this.paymentMethodDto.planId),period:a,cardToken:this.cardToken,recurring:!1,returnUrl:yield(0,ue.getBasketSecureReturnUrl)({billId:this.paymentMethodDto.billId,planId:this.paymentMethodDto.planId,recurring:!1})},n=yield(0,I.fetchDataWithErrorCheck)("payment.payWithSavedCard",r);if(n.completed)(0,f.transitionTo)(null!=(e=n.redirectUrl)?e:"/pay/thank-you/");else if(n["3dSecure"]){if(n.redirectUrl)return void(window.location.href=n.redirectUrl);if(n.clientSecret){const e=yield(0,L.cardSecureCheck)(n.clientSecret);yield(0,I.fetchDataWithErrorCheck)("payment.confirmPayStripe",{billId:Number(this.paymentMethodDto.billId),intentId:e.id,recurring:!1}),(0,f.transitionTo)("/pay/thank-you/")}}},new Promise((r,n)=>{var o=e=>
1{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var Ie=a(32329),Le=a(25959),fe=(e,t,a)=>new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});function Se(){try{const e=sessionStorage.getItem("paymentValues");if(!e)return null;return JSON.parse(e).savedCard||null}catch(e){return null}}const Te=(0,Ne.compose)(function({availableBillTypes:e,loaderFallback:t=null}){return function(a){return o=>{var i=((e,t)=>{var a={};for(var r in e)ge.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&he)for(var r of he(e))t.indexOf(r)<0&&Me.call(e,r)&&(a[r]=e[r]);return a})(o,[]);const{billId:s}=(0,M.useParams)(),{data:l,loading:c,error:u}=(0,U.useProcedure)(["userBilling.bill",{billId:Number(s),useCache:W.cacheBasketService}]);return c?t:!u&&e.includes(null==l?void 0:l.type)?(0,r.jsx)(a,((e,t)=>{for(var a in t||(t={}))ge.call(t,a)&&je(e,a,t[a]);if(he)for(var a of he(t))Me.call(t,a)&&je(e,a,t[a]);return e})({},i)):(0,r.jsx)(n.Grid,{className:"fg1 df fdc",children:(0,r.jsxs)(n.Row,{className:"df fg1",children:[(0,r.jsx)(n.Col,{col:"7",className:"pt20 pb20",children:(0,r.jsx)(ye.default,{})}),(0,r.jsx)(n.Col,{col:"5",className:"bg_main_d pt20 pb20 d-none d-sm-block"})]})})}}}({availableBillTypes:["plan","custom_plan","onetime_bill"],loaderFallback:X.default}),function({fallback:e=null,validator:t}){return function(a){return n=>{var o=((e,t)=>{var a={};for(var r in e)Z.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&K)for(var r of K(e))t.indexOf(r)<0&&H.call(e,r)&&(a[r]=e[r]);return a})(n,[]);const i=(0,U.useTrigger)(!0),{billId:l,planId:c}=(0,M.useParams)();return(0,s.useEffect)(()=>{(()=>{return e=null,a=null,r=function*(){try{yield t.validateRequiredFields(l),i.off()}catch(e){(0,f.transitionTo)({pathname:(0,M.generatePath)("/pay/basket-steps/:planId/main-info/",{planId:c}),state:{skipAutoRedirect:!0}})}},new Promise((t,n)=>{var o=e=>{try{s(r.next(e))}catch(e){n(e)}},i=e=>{try{s(r.throw(e))}catch(e){n(e)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);s((r=r.apply(e,a)).next())});var e,a,r})()},[]),i.value?e:(0,r.jsx)(a,((e,t)=>{for(var a in t||(t={}))Z.call(t,a)&&$(e,a,t[a]);if(K)for(var a of K(t))H.call(t,a)&&$(e,a,t[a]);return e})({},o))}}}({validator:new ne,fallback:X.default}))(function(){const{t:e}=(0,p.useTranslation)(["Basket","Global","pay_page","tooltip","Placeholder","InputErrors","summer-sale"]),{billId:t,planId:a}=(0,M.useParams)(),c=(0,U.useTrigger)(),[m,j]=(0,s.useState)(0),[x,b]=(0,s.useState)(!1),[I]=(0,s.use
1State)(Se);(0,s.useEffect)(()=>{let e=null;return m>0&&(e=setInterval(()=>{j(e=>e-1)},1e3)),()=>{e&&clearInterval(e)}},[m]);const L=(0,s.useCallback)(()=>{sessionStorage.removeItem("paymentValues"),(0,f.transitionTo)(`/pay/basket-steps/${a}/payment-method/`)},[a]),S=(0,s.useCallback)(e=>fe(null,null,function*(){try{const{paymentMethod:t}=e;let a;switch(t){case"wallet":a="true"===Le.runtimeConfig.USE_NEW_3DS_BASKET?new B(new me(e),new ne):new B(new P(e),new ne);break;case"stripe":"true"===Le.runtimeConfig.USE_NEW_3DS_BASKET&&(a=new B(new pe(e),new ne));break;case"paypal":a=new B(new ce(e),new ne);break;case"savedCard":a=new B(new be(e,I.cardToken),new ne);break;default:a=new B(new D(e),new ne)}yield a.validate(),yield a.process()}catch(e){if(e instanceof A.PaymentFailCountError)return void c.on();if(j(5),I&&b(!0),e instanceof v()){const{code:t,message:a}=e;return{cardInfo:(0,k.getErrorStripe)(t,a)}}console.error(e)}}),[c,j,I]),T=(0,s.useCallback)(e=>fe(null,null,function*(){try{return["wallet","paypal","savedCard"].includes(e.paymentMethod)?yield _.validationService.validateByJsonSchema(e,q):yield _.validationService.validateByJsonSchema(e,h),{}}catch(e){return e.data}}),[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ke.default,{hasMaxRequests:c.value}),(0,r.jsx)(i.Form,{onSubmit:S,validate:T,children:()=>(0,r.jsx)("div",{className:"fg1 df fdc",children:(0,r.jsx)(l.Bill,{BillDataProviderComponent:G,children:(0,r.jsx)(n.Grid,{className:"fg1 df fdc",children:(0,r.jsxs)(n.Row,{className:"df fg1",children:[(0,r.jsx)(n.Col,{col:"7",className:"pt20 pb20",children:(0,r.jsxs)(o.FormWrapper,{children:[(0,r.jsxs)("h4",{className:"mb20 df jcsb",children:[e("Basket::payment_information_title"),(0,r.jsx)(V.SslSecureComponent,{})]}),(0,r.jsx)(i.Field,{name:"paymentMethod",defaultValue:I?"savedCard":"stripe",render:E.renderNothing}),(0,r.jsx)(i.Field,{name:"billId",defaultValue:t,render:E.renderNothing}),(0,r.jsx)(i.Field,{name:"planId",defaultValue:a,render:E.renderNothing}),I?(0,r.jsxs)(r.Fragment,{children:[x&&(0,r.jsx)(Ie.PaymentErrorBanner,{title:e("Basket::payment_error_title"),subtitle:e("Basket::payment_error_subtitle")}),(0,r.jsx)(Ie.SavedCardWidget,{brand:I.brand,last4:I.last4,expireDate:I.expireDate,expiryLabel:e("Basket::saved_card_expiry_label"),title:e("Basket::saved_card_title"),hasError:x,changeLabel:e("Basket::change_card"),onChangeCard:L})]}):(0,r.jsx)(i.Field,{name:"cardInfo",children:({input:e,meta:t})=>(0,r.jsxs)(r.Fragment,{children:[!t.error&&!t.modifiedSinceLastSubmit&&t.submitFailed&&t.submitError&&(0,r.jsx)(N,{error:t.submitError}),(0,r.jsx)(g.default,{onChange:e.onChange})]})})]})}),(0,r.jsxs)(n.Col,{col:"5",className:"bg_main_d pt20 pb20 pr30 pl30",children:[(0,r.jsx)("h4",{className:"mb20",children:e("pay_page::bill_info")}),(0,r.jsx)(u,{}),(0,r.jsx)(d.default,{}),(0,r.jsx)(y,{title:m>0?e("pay_page::repeat_after_n_sec",{n:m}):null,isDisabled:m>0,hasError:x}),(0,r.jsx)(Y,{}),(0,r.jsx)(se,{})]})]})})})})})]})})},69604(e,t,a){a.r(t),a.d(t,{PaymentValidator:()=>c});var r=a(86673),n=a(30475),o=a(37891),i=a(77425);class s{validate(){return e=this,t=null,a=function*(){},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}var l=(e,t,a)=>new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});class c extends s{getMainInfo(){return l(this,null,function*(){return(0,r.fetchDataWithErrorCheck)("userSettings.getMainInformation",{useCache:n.core})})}getUserPhone(){return l(this,null,function*(){return(yield this.getMainInfo()).phone})}validate(){return l(this,null,function*(){const e=yield this.getUserPhone(),{first_name:t,last_name:a,userInvoiceData:{country:r,city:n,address:s,region:l,postalCode:c}}=yield this.getMainInfo();if(![e,t,a].every(Boolean))throw new o.MainInfoValidationError;if(![r,n,s,l,c].every(Boolean))throw new i.BillingInfoValidationError})}}},36204(e,t,a){a.r(t),a.d(t,{default:()=>s});var r=a(74848),n=a(78536),o=a(40751),i=a(53623);const s=()=>{var e;const t=null==(e=(0,n.useFormState)().values)?void 0:e.paymentMethod;return(0,r.jsx)(n.Field,{name:"offerta",children:({input:e,meta:a})=>(0,r.jsx)(o.FieldWrapper,{className:"mb20",error:Boolean(a.touched)&&a.error,children:(0,r.jsx)(i.default,{isChecked:e.value,onChange:e.onChange,paymentMethod:t})})})}},52026(e,t,a){a.r(t),a.d(t,{default:()=>c});var r=a(74848),n=a(18492),o=a(14715),i=a(92602),s=a(72681),l=a(29526);const c=({cost:e,tax:t,total:a,period:c,vatTaxabilityReason:u})=>{const{t:d}=(0,n.useTranslation)(["Basket"]),{planId:p}=(0,s.useParams)(),{data:m}=(0,i.useDetailPlan)(p);return(0,r.jsx)(o.default,{classNameTrigger:"tax-info__trigger",tooltipText:(0,r.jsxs)("div",{className:"tr",children:[(0,r.jsx)("div",{children:d("Basket::plan_name_with_period_with_price",{price:(0,l.formatPrice)(e,2),name:m.name,period:c})}),(0,r.jsx)("div",{className:"tax-info--with-divider pb10 mb10",children:d("Basket::vat_with_amount_with_vatTaxabilityReason",{amount:(0,l.formatPrice)(t,2),vatTaxabilityReason:u||"n
1ot collecting"})}),(0,r.jsx)("div",{children:d("Basket::total_price_with_period_with_price",{price:(0,l.formatPrice)(a,2),period:c})})]})})}},6841(e,t,a){a.r(t),a.d(t,{BillContext:()=>n,useBill:()=>o});var r=a(96540);const n=(0,r.createContext)(null),o=()=>(0,r.useContext)(n)},97184(e,t,a){a.r(t),a.d(t,{Bill:()=>M,BillView:()=>h});var r=a(74848),n=a(46942),o=a.n(n);const i=({children:e,className:t=""})=>(0,r.jsx)("div",{className:o()(t,"basket-page__total-row basket-page__total-period-container df jcsb"),children:e});var s=a(18492),l=a(29526),c=a(14715),u=a(73737),d=a(52026),p=a(95093),m=a.n(p),y=a(7775),_=a(72681);const h=({billingInfo:e})=>{var t,a;const{t:n}=(0,s.useTranslation)(["Global","Basket"]),o=Boolean(null==e?void 0:e.paidService),p=(0,_.useLocation)().pathname.includes("/payment-method/"),h=y.PLANS_FOR_BF_PROMO.includes(null==(a=null==(t=null==e?void 0:e.planInfo)?void 0:t.id)?void 0:a.toString());return(0,r.jsxs)("div",{className:"basket-page__total-order bill-view-component",children:[o?(0,r.jsx)(i,{className:"basket-page__paid-service",children:(0,r.jsx)("div",{className:"medium",children:(g=e.paidService,g.split("\n").map(e=>(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)("br",{})]})))})}):null,!o&&Boolean(e.planInfo)&&(0,r.jsxs)(i,{className:p?"basket-page__total-period-pay":"",children:[(0,r.jsxs)("div",{children:[n("Basket::subscription_plan"),":"]}),(0,r.jsx)("div",{className:"medium",children:e.planInfo.name})]}),!o&&Boolean(e.userBalance)&&(0,r.jsxs)(i,{className:"basket-page__total-period-pay",children:[(0,r.jsxs)("div",{children:[n("Basket::funds_on_your_account"),":"]}),(0,r.jsx)("div",{className:"medium",children:(0,l.formatPrice)(e.userBalance)})]}),p&&!o&&(0,r.jsxs)(i,{children:[(0,r.jsxs)("div",{children:[n("Basket::valid_until"),":"]}),(0,r.jsxs)("div",{className:"medium",children:[(0,r.jsxs)("span",{children:[n(1===e.period?"Basket::billing_month_single":"Basket::billing_month_plural",{n:e.period}),"(",n("Basket::recurring_payment"),")"]}),(0,r.jsx)(c.default,{tooltipText:n("tooltip::recurrent_payment_description")})]})]}),(0,r.jsxs)(i,{className:"basket-page__total-period-pay",children:[(0,r.jsx)("div",{children:n("Basket::payment_period")}),(0,r.jsxs)("div",{className:"medium",children:[(0,l.formatDateWithFullYear)(e.paymentPeriodStart)," - ",(0,l.formatDateWithFullYear)(e.paymentPeriodEnd)]})]}),(null==e?void 0:e.recurrent)&&"0"!==(null==e?void 0:e.recurrent)?(0,r.jsxs)(i,{children:[(0,r.jsx)("div",{children:n("Basket::recurrent_info_title")}),(0,r.jsx)("div",{className:"medium",children:n("Basket::recurrent_info_description")})]}):null,p&&h&&(null==e?void 0:e.period)>=12?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i,{children:[(0,r.jsx)("div",{children:n("Basket::bonus_title")}),(0,r.jsx)("div",{className:"medium",children:`${null==e?void 0:e.additionalPeriod} ${n("Basket::bonus_description")}`})]}),(0,r.jsxs)(i,{className:"basket-page__total-period-pay",children:[(0,r.jsx)("div",{children:n("Basket::next_payment")}),(0,r.jsx)("div",{className:"medium",children:(0,l.formatDateWithFullYear)(m()(null==e?void 0:e.paymentPeriodEnd).add(30*(null==e?void 0:e.additionalPeriod),"days").format("YYYY-MM-DD"))})]})]}):null,Boolean(e.promoCode)&&(0,r.jsxs)("div",{className:"basket-page__total-row basket-page__total-period-container df jcsb",children:[(0,r.jsxs)("div",{children:[n("Basket::promo_code_discount"),": ",e.promoCode.discount,"%"]},"basket-page-total-period-pay-header"),(0,r.jsxs)("div",{className:"basket-page__total-row-right",children:["- ",(0,l.formatPrice)(u.CalculationService.getDiscountAmount(e.total,e.userBalance,e.promoCode.discount),2)]},"basket-page-total-period-pay")]}),Boolean(e.discountPercent)&&(0,r.jsxs)("div",{className:"basket-page__total-row basket-page__total-period-container df jcsb",children:[(0,r.jsxs)("div",{children:[n("Basket::discount"),": ",e.discountPercent,"%"]},"basket-page-total-period-pay-header"),(0,r.jsxs)("div",{className:"basket-page__total-row-right",children:["- ",(0,l.formatPrice)(e.discountSumm,2)]},"basket-page-total-period-pay")]}),e.userBalance>e.total?(0,r.jsxs)(i,{className:"basket-page__total-sum",children:[(0,r.jsx)("div",{className:"mt20 mb10",children:(0,r.jsx)("span",{className:"basket-page__total-sum-header",children:n("Basket::enough_funds")})}),(0,r.jsx)("div",{className:"tr",children:(0,r.jsx)("span",{className:"medium basket-page__total-sum-right"})})]}):(0,r.jsxs)(i,{className:"basket-page__total-sum",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"small",children:n("Basket::tax_vat")}),(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"basket-page__total-sum-header",children:[n("Basket::total_sum_to_pay"),(0,r.jsx)(d.default,{period:null==e?void 0:e.period,cost:null==e?void 0:e.cost,tax:null==e?void 0:e.tax,total:(null==e?void 0:e.cost)+(null==e?void 0:e.tax),vatTaxabilityReason:null==e?void 0:e.vatTaxabilityReason})]})]}),(0,r.jsxs)("div",{className:"tr",children:[(0,r.jsx)("span",{className:"small",children:(0,l.formatPrice)(null==e?void 0:e.tax,2)}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"medium basket-page__total-sum-right",children:(0,l.formatPrice)(null==e?void 0:e.priceToPay,2)})]})]})]});var g};var g=a(6841);const M=({BillDataProviderComponent:e,children:t})=>(0,r.jsx)(e,{children:e=>(0,r.jsx)(g.BillContext.Provider,{value:e,children:t})})},92602(e,t,a){a.r(t),a.d(t,{useDetailPlan:()=>m});var r=a(79611),n=a(30475),o=a(96540),i=a(28314),s=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(e,t,a)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,p=(e,t)=>{for(var a in t||(t={}))c.call(t,a)&&d(e,a,t[a]);if(l)for(var a of l(t))u.call(t,a)&&d(e,a,t[a]);return e};const m=e=>{const t=(0,i.usePrevious)(e),{callProcedure:a,data:s,loading:l,error:c}=(0,r.useLazyProcedure)("plan.details"),{callProcedure:u,data:d,loading:m,error:y}=(0,r.useLazyProcedure)("plan.periods"),_=l||m,h=c||y;return(0,o.useEffect)(()=>{!e||"undefined"===e||e===t||s||d||_||h||(a({planId:+e,useCache:n.core}),u({planId:+e,useCache:n.core}))},[a,u,h,_,s,e,d,t]),{data:p(p({},s),d),loading:_,error:h}}},73737(e,t,a){a.r(t),a.d(t,{CalculationService:()=>r});class r{static getDiscountAmount(e,t,a){return a?e*a/100:0}static getPrice(e,t=0,a=0){const n=e-t-r.getDiscountAmount(e,t,a);return n>0?n:0}static getDiscountTotal(e){const{period:t,additionalPeriod:a,cost:r,discountSum:n,vatRate:o,amountTotal:i}=e,s=t+a;return(r+n+(r+n)*o/100)*s-i*s}}},77425(e,t,a){a.r(t),a.d(t,{BillingInfoValidationError:()=>r});
1class r extends Error{}},37891(e,t,a){a.r(t),a.d(t,{MainInfoValidationError:()=>r});class r extends Error{}},60480(e,t,a){a.r(t),a.d(t,{cacheBasketService:()=>r});const r=new(a(67510).Cache)},66595(e,t,a){a.r(t),a.d(t,{PaymentError:()=>n,PaymentFailCountError:()=>i,PaymentHasLastTryError:()=>o,TrialPayment:()=>s});var r=a(30475);class n extends Error{}class o extends n{}class i extends n{}class s{constructor(e){this.strategy=e}setStrategy(e){this.strategy=e}process(){return e=this,t=null,a=function*(){var e,t;try{const e=yield this.strategy.runPaymentMethod();return r.core.reset(),e}catch(a){const r=null==(t=null==(e=null==a?void 0:a.data)?void 0:e.data)?void 0:t.fails_count;if(4===r)throw new o;if(5===r)throw new i;throw new n(a)}},new Promise((r,n)=>{var o=e=>{try{s(a.next(e))}catch(e){n(e)}},i=e=>{try{s(a.throw(e))}catch(e){n(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,i);s((a=a.apply(e,t)).next())});var e,t,a}}},13722(e,t,a){a.r(t),a.d(t,{default:()=>r});const r="data:image/svg+xml;base64,Cjxzdmcgdmlld0JveD0iLS4wMjY4Mjg0MyAwIDEyMy42MzE4MzI4NiAzMC4xNzg0MjkwOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtNDYuMjExIDYuNzQ5aC02LjgzOWEuOTUuOTUgMCAwIDAgLS45MzkuODAybC0yLjc2NiAxNy41MzdhLjU3LjU3IDAgMCAwIC41NjQuNjU4aDMuMjY1YS45NS45NSAwIDAgMCAuOTM5LS44MDNsLjc0Ni00LjczYS45NS45NSAwIDAgMSAuOTM4LS44MDNo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AgLTEuMTU5Ljk5MmwtMS41NjQgOS45MDYtLjA0NS4yODlhMS4zMzYgMS4zMzYgMCAwIDEgMS4zMjEtMS4xMzJoMi43NTJjNS40MDUgMCA5LjYzNy0yLjE5NSAxMC44NzQtOC41NDUuMDM3LS4xODguMDY4LS4zNzEuMDk2LS41NWE2LjU5NCA2LjU5NCAwIDAgMCAtMS4wMTctLjQyOSA5LjA0NSA5LjA0NSAwIDAgMCAtLjI3Ny0uMDg3eiIgZmlsbD0iIzIyMmQ2NSIvPjxwYXRoIGQ9Im05LjYxNCA3LjY5OWExLjE2OSAxLjE2OSAwIDAgMSAxLjE1OS0uOTkxaDcuMzUyYy44NzEgMCAxLjY4NC4wNTcgMi40MjYuMTc3YTkuNzU3IDkuNzU3IDAgMCAxIDEuNDgxLjM1M2MuMzY1LjEyMS43MDQuMjY0IDEuMDE3LjQyOS4zNjgtMi4zNDctLjAwMy0zLjk0NS0xLjI3Mi01LjM5Mi0xLjM5OS0xLjU5My0zLjkyNC0yLjI3NS03LjE1NS0yLjI3NWgtOS4zOGMtLjY2IDAtMS4yMjMuNDgtMS4zMjUgMS4xMzNsLTMuOTA3IDI0Ljc2NWEuODA2LjgwNiAwIDAgMCAuNzk1LjkzMmg1Ljc5MWwxLjQ1NC05LjIyNXoiIGZpbGw9IiMyNTNiODAiLz48L3N2Zz4="}}]);
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.