(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3952],{75347:function(){},31777:function(){},34017:function(){},59905:function(){},6164:function(t,e,n){"use strict";var i,r;n.d(e,{e:function(){return i}}),(r=i||(i={})).DAY="DAY",r.MONTH="MONTH",r.TERMLESS="TERMLESS",r.YEAR="YEAR"},31575:function(t,e,n){"use strict";n.d(e,{H:function(){return o},s:function(){return r}});var i=n(67628);let r=Object.freeze({[i._.MIN_BALANCE]:"На минимальный остаток",[i._.AVG_BALANCE]:"На средний остаток",[i._.DAILY_BALANCE]:"На ежедневный остаток"}),o=Object.freeze({DAILY:"Ежедневно",MONTHLY:"Ежемесячно"})},67628:function(t,e,n){"use strict";var i,r,o,u;n.d(e,{B:function(){return r},_:function(){return i}}),(o=i||(i={})).MIN_BALANCE="MIN_BALANCE",o.AVG_BALANCE="AVG_BALANCE",o.DAILY_BALANCE="DAILY_BALANCE",(u=r||(r={})).SpendingRange="SPENDING_RANGE",u.ServicePackage="SERVICE_PACKAGE"},13364:function(t,e,n){"use strict";n.d(e,{J4:function(){return m},fE:function(){return s},wv:function(){return d}});var i=n(91627);let r={type:"DAY",value:1},o={type:"DAY",value:3650},u=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t||0===t.value)return e?o:r;let{value:n,type:u}=t,a=n;return"MONTH"===u&&(a=Math.round(n*i.F)),"YEAR"===u&&(a=Math.round(365*n)),{type:"DAY",value:a}},a=(t,e)=>e?{minimumPeriod:{type:"DAY",value:30},maximumPeriod:{type:"DAY",value:1096},minimumAmount:e.minAmount,maximumAmount:e.maxAmount}:{minimumPeriod:u(t.minimumPeriod),maximumPeriod:u(t.maximumPeriod,!0),minimumAmount:t.minimumAmount>0?t.minimumAmount:1,maximumAmount:t.maximumAmount>0?t.maximumAmount:1e9},l=(t,e,n)=>n?"range":t===e?"fixed":"manual",c=t=>{let{rate:e,optionId:n,isCapitalization:i,paymentFrequency:r,mkbData:o,additionalRate:u,firstDepositPromotionAllowed:c,repeatDepositPromotionAllowed:s}=t,m=a(e,o);return{...e,additionalRate:u,optionId:n,isCapitalization:i,paymentFrequency:null!=r?r:"IN_THE_END",...a(e,o),termType:l(m.minimumPeriod.value,m.maximumPeriod.value,o),...m,firstDepositPromotionAllowed:c,repeatDepositPromotionAllowed:s}},s=t=>{let{options:e,mkbData:n,additionalRate:i}=t;return(null!=e?e:[]).filter(t=>t.active&&!!t.currencies).flatMap(t=>{var e,r;let{id:o,currencies:u,interestPayments:a,firstDepositPromotionAllowed:l,repeatDepositPromotionAllowed:s}=t,m=a.find(t=>"CAPITALISATION"===t.method),d=null==m?void 0:null===(r=m.periods.filter(t=>1===t.value||0===t.value||void 0===t.value))||void 0===r?void 0:null===(e=r[0])||void 0===e?void 0:e.type;return u.flatMap(t=>t.rates.map(t=>c({rate:t,optionId:o,isCapitalization:!!m,paymentFrequency:d,mkbData:n,additionalRate:i,firstDepositPromotionAllowed:l,repeatDepositPromotionAllowed:s})))}).sort((t,e)=>{var n,i;return Number(null===(n=t.minimumPeriod)||void 0===n?void 0:n.value)-Number(null===(i=e.minimumPeriod)||void 0===i?void 0:i.value)||e.maximumRate-t.maximumRate})},m=t=>t.reduce((t,e)=>{let n=null==t?void 0:t[e.minimumPeriod.value];return{...t,[e.minimumPeriod.value]:n?[...n,e]:[e]}},{}),d=(t,e)=>Object.entries(t).flatMap(t=>{let[,n]=t;return 1===n.length?n:n.filter(t=>{let{minimumAmount:n,maximumAmount:i}=t;return e>=n&&e<=i})})},2368:function(t,e,n){"use strict";n.d(e,{U:function(){return u}});var i,r,o=n(40309);(i=r||(r={})).DAILY="DAILY",i.WEEKLY="WEEKLY",i.MONTHLY="MONTHLY",i.QUARTERLY="QUARTERLY",i.SEMIANNUALLY="SEMIANNUALLY",i.ANNUALLY="ANNUALLY",i.IN_THE_END="IN_THE_END";let u=t=>"DAILY"===t?o.Z.EveryDay:"WEEKLY"===t?o.Z.Weekly:"MONTHLY"===t||"IN_THE_END"===t?o.Z.OnceAMonth:"QUARTERLY"===t?o.Z.Quarterly:"SEMIANNUALLY"===t?o.Z.Semiannually:"ANNUALLY"===t?o.Z.Annually:o.Z.InTheEnd},33600:function(t,e,n){"use strict";var i,r,o,u,a,l;n.d(e,{ER:function(){return i},kv:function(){return o},mr:function(){return r}}),(u=i||(i={})).RatePlusBonus="rate+bonus",u.Rate="rate",u.Profit="profit",(a=r||(r={})).Asc="asc",a.Desc="desc",(l=o||(o={})).Deposit="deposit",l.SavingAccount="savingAccount",l.Bond="bond"},34200:function(t,e,n){"use strict";var i,r;n.d(e,{a:function(){return i}}),(r=i||(i={})).amount="amount",r.term="term",r.currency="currency",r.banks="banks",r.refill="refill",r.capitalization="capitalization",r.bonds="bonds",r.deposits="deposits",r.premium="premium",r.monthlyPercent="monthlyPercent",r.preferentialTermination="preferentialTermination",r.interestAccrual="interestAccrual"},20100:function(t,e,n){"use strict";n.d(e,{Z:function(){return _}});var i=n(57437),r=n(49090),o=n(31575),u=n(70104),a=n(36578),l=n(64158),c=n.n(l);let s=t=>{var e,n;let{data:r,discount:o}=t;return(0,i.jsxs)("div",{className:c().tooltipText,children:[(0,i.jsxs)("ul",{className:c().tooltipList,children:[(0,i.jsxs)("li",{className:c().listItem,children:["доход от банка:"," ",(0,i.jsxs)("span",{children:[(0,u.Y4)((null==r?void 0:null===(e=r.computeData)||void 0===e?void 0:e.profit)||0,2)," ",r.currencyUnit]})]}),(0,i.jsxs)("li",{className:c().listItem,children:["бонус от Финуслуг:"," ",(0,i.jsxs)("span",{children:[(0,u.Y4)((null==r?void 0:null===(n=r.computeData)||void 0===n?void 0:n.bonus)||0,2)," ",r.currencyUnit]})]})]}),(0,i.jsx)("p",{className:c().description,dangerouslySetInnerHTML:{__html:(null==o?void 0:o.terms)||""}})]})},m=t=>!t.isNotAmount&&!t.isTermEmpty,d=t=>{if(m(t)||"savingAccount"!==t.type||!t.rateType){if(m(t)){if(t.computeData&&!t.isNotAmount){let{termDays:e,bonus:n,profit:i}=t.computeData,r="Доход за ".concat((0,a.PY)(e,["день","дня","дней"]));n&&(r+=" + бонус");let o="".concat((0,u.Y4)(i+n,2),"  ").concat(t.currencyUnit);return("savingAccount"===t.type||t.isFloating)&&(o="до ".concat(o)),{caption:r,name:o}}}else{var e;return{caption:"Сумма",name:(t.isNotAmount?"от ":"")+"".concat((0,u.Y4)(null!==(e=t.rateAmount)&&void 0!==e?e:1)," ").concat(t.currencyUnit)}}}},v=t=>{let e;let{data:n,discountState:o,hideBonusTooltip:a}=t;if(!n.computeData)return;let l=o&&(n.computeData.bonus||n.computeData.bonusRate),c=n.isBound?"Доходность":"Ставка",m=p(n,l);return l&&(c+=" + бонус",m+=" + ".concat((0,r.og)((0,u.Y4)(n.computeData.bonusRate,2))),e=a?void 0:(0,i.jsx)(s,{data:n,discount:o})),"savingAccount"===n.type&&(m=(null==n?void 0:n.rateType)==="FIXED"?m:"до ".concat(m)),n.isFloating&&(m="до ".concat(m)),n.isCapitalization&&"savingAccount"!==n.type&&(e=(0,i.jsx)(i.Fragment,{children:"Иногда у вклада есть особенности — капитализация процентов, возможность пополнения или акция от банка. Дополнительные параметры меняют доход в большую или меньшую сторону, поэтому процент по эффективной ставке отличается от банковской. Он отражает доход корректнее."})),{caption:c,name:m,tooltipText:e}},p=(t,e)=>{if(!t.computeData)return"";let n=(0,u.Y4)("savingAccount"===t.type&&t.rate?t.rate:t.computeData.effectiveRate,2);return e?n:(0,r.og)(n)},f=t=>{if(!t.rateType&&t.isTermEmpty)return{caption:"Срок",name:t.isLadderDeposit&&t.term?"".concat(t.term," ").concat((0,a._6)(+t.term,"день","дня","дней")):"savingAccount"===t.type?"Бессрочно":t.term?h(t.term,t.termPeriod):"от 1 дня"}},h=(t,e)=>{let n=+t%12,i=Math.floor(+t/12),r=e&&e.from!==e.to,o=r?["от"]:[];return i&&o.push((0,a.PY)(i,r?["года","лет","лет"]:["год","года","лет"])),n&&o.push("".concat(n," мес")),o.join(" ")},A=t=>{if(t.interestAccrual)return{caption:"Начисление процентов",name:o.s[t.interestAccrual]}};function _(t){let{data:e}=t;return[d(e),v(t),f(e),A(e)]}},13425:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=n(57437),r=n(80684),o=n(90498),u=n.n(o);function a(t){let{data:e,isPlatform:n,newDesign:o=!1,renderTip:a}=t,l=[],c=function(t){let e=[];return"savingAccount"===t.type?e.push({backGround:"blue",text:"Накопительный счёт"}):"deposit"===t.type&&e.push({backGround:"orange",text:"Вклад"}),e}(e),s=function(t){let e=[];return t.isCapitalization&&"savingAccount"!==t.type&&e.push({text:"С капитализацией ",backGround:"white"}),t.isRefill&&"savingAccount"!==t.type&&e.push({text:"С пополнением ",backGround:"white"}),e}(e),m=function(t,e,n){let o=[];return!t.exclusive&&(e?t.isCommercial&&o.push({backGround:"white",text:"Заявка через сайт банка "}):o.push({backGround:"white",text:t.isCommercial?"Заявка через сайт банка ":"Открытие в банке "})),e&&(n?o.push({backGround:"white",text:"Онлайн на Финуслугах",position:"left",icon:(0,i.jsx)(r.IconFdsFlashO,{style:{color:"var(--color-purple-500)"}})}):o.push({backGround:"purple",text:"Открытие онлайн на Финуслугах "})),o}(e,n,o),d=function(t){let e=[];return t.hasDiscount&&e.push({backGround:"white",text:"+ Бонус "}),e}(e);if(e.exclusive&&l.push({backGround:"white",text:"Эксклюзивный вклад "}),e.isBound&&l.push({backGround:"green",text:"Облигации "}),e.commercialDesc&&l.push({backGround:"white",text:e.commercialDesc+" "}),Array.isArray(e.tags)&&e.tags.forEach(t=>l.push({backGround:"white",text:" ",icon:(0,i.jsx)("div",{onClick:t=>{null==t||t.preventDefault(),null==t||t.stopPropagation()},children:a(t)})})),e.productFeature){let t=u()(e.productFeature,{allowedAttributes:{},allowedTags:[]});l.push({backGround:"white",text:t})}return[...c,...m,...d,...s,...l]}},7913:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var i=n(13364),r=n(2368),o=n(96742),u=n(91627),a=n(44579),l=n(33600),c=n(70104),s=n(14438);function m(t,e,n){return e&&t<e?e:n&&t>n?n:t}let d=(t,e)=>t&&(!e||(0,c.zd)(t.effectiveRate,2)>=e&&(0,c.zd)(t.effectiveRate,2)<e+1);function v(t){let{deposits:e,banks:n,filter:c,bankTowns:v,cityId:p,isValid:f}=t;if(!f)return{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1};let{term:h}=c,A=null==n?void 0:n.reduce((t,e)=>({...t,[Number(e.id)]:e}),{});return e.reduce((t,e)=>{let n=function(t){var e,n,c,v,p,f,h,A,_,y,N,b,D,E,x,g,T,R,P;let{deposit:L,normalizedBanks:I,filter:C,defaultTerm:M}=t,{amount:Y,term:k,rate:O,currency:S,withMonthlyPercent:F=!1,withPreferentialTermination:w=!1,withCapitalization:G,withRefill:B}=C,U=null==I?void 0:I[Number(L.bank_id)],j=(null===(e=L.interest_capitalization)||void 0===e?void 0:e.has)===1,z=(0,s.EP)(C,String(null==U?void 0:U.id)),Z=(0,o.z)(L.currency_id).unit,H=(!S||Z===S)&&z,{amount:V,term:W,rate:K,tag:Q}=H?L.isLadderDeposit?function(t,e,n){var i;let r="number"!=typeof e||t&&(!t.amount.from||t.amount.from<=e)&&(!t.amount.to||t.amount.to>=e),o=!n||Math.round(t.term.from/u.F)<=n&&Math.round(+t.term.to/u.F)>=n;return{term:m(n,t.term.from,Number(t.term.to)),amount:null!==(i=null!=e?e:t.amount.from)&&void 0!==i?i:1,rate:r&&o?t.interest_rate.rates.reduce((t,e)=>t+e.rate,0)/t.interest_rate.rates.length:null,tag:null}}(L,Y,k):function(t,e,n){var i,r,o;let a=[...t.interest_rate.rates].sort((t,e)=>e.rate-t.rate).find(t=>{let i="number"!=typeof e||t.amount_from&&t.amount_from<=e&&(!t.amount_to||t.amount_to>=e),r=!n||(!t.term_from||Math.round(t.term_from/u.F)<=Math.round(n/u.F))&&(!t.term_to||Math.round(t.term_to/u.F)>=Math.round(n/u.F));return i&&r}),l=null!==(r=null==a?void 0:a.rate)&&void 0!==r?r:null,c=null!==(o=null==a?void 0:null===(i=a.tag)||void 0===i?void 0:i.title)&&void 0!==o?o:null;return{term:m(n,null==a?void 0:a.term_from,null==a?void 0:a.term_to),amount:!e&&a?a.amount_from:e,rate:l,tag:c}}(L,Y,k):{amount:null,term:0,rate:null,tag:null},q=j&&0===L.partial_withdrawal.has&&(null===(n=L.refill)||void 0===n?void 0:n.has)===0,{nextRate:J,nextAmount:X,nextTerm:$,nextTag:tt}=function(t){let{isCorrectValues:e,calculatedAmount:n,calculatedRate:i,calculatedTag:r,calculatedTerm:o,defaultTerm:u,amount:a}=t;return e?{nextRate:i,nextAmount:n,nextTerm:o,nextTag:r}:{nextRate:null,nextAmount:a,nextTerm:u,nextTag:null}}({isCorrectValues:H,calculatedRate:K,calculatedAmount:V,amount:Y,calculatedTerm:W,defaultTerm:M,calculatedTag:Q}),te=Number($),tn=(0,s.ax)({rate:J,depositSum:X,effectiveRate:null===(c=L.efficientRate)||void 0===c?void 0:c.maximumRate,isCapitalization:q,term:isNaN(te)?0:te,period:a.Z.Day,paymentFrequency:(0,r.U)(null!==(E=null===(A=L.options)||void 0===A?void 0:null===(h=A[0].interestPayments)||void 0===h?void 0:null===(f=h[0])||void 0===f?void 0:null===(p=f.periods)||void 0===p?void 0:null===(v=p[0])||void 0===v?void 0:v.type)&&void 0!==E?E:"")});if(!d(tn,O))return;let ti=(0,s.PF)(L,!!(null===(_=L.refill)||void 0===_?void 0:_.has));if(!(0,s.Oh)({computedFlags:ti,currentFilters:{withCapitalization:G,withMonthlyPercent:F,withPreferentialTermination:w,withRefill:B}}))return{...ti};let tr={legalName:L.legal_name,logoMob:null!==(R=L.logo_mob)&&void 0!==R?R:null==U?void 0:U.logo_mob,bankName:null!==(P=L.bank_name)&&void 0!==P?P:""},to=!!(null==L?void 0:L.isLadderDeposit),tu=(0,i.fE)({options:L.options,mkbData:void 0,additionalRate:0}),ta=(0,i.J4)(tu),tl=Math.max(...(null!==(x=null===(b=L.options)||void 0===b?void 0:null===(N=b[0])||void 0===N?void 0:null===(y=N.currencies[0])||void 0===y?void 0:y.rates)&&void 0!==x?x:[]).map(t=>{var e,n;return null!==(n=null===(e=t.maximumPeriod)||void 0===e?void 0:e.value)&&void 0!==n?n:0}));return{deposit:{name:L.title,url:L.url,id:L.id,isCommercial:1===L.online_application.commercial,order:L.online_application.order||null,commercialDesc:L.online_application.commercial_desc,exclusive:!1,bic:L.bic,isNotAmount:!Y,isRefill:!!(null===(D=L.refill)||void 0===D?void 0:D.has),rateAmount:X,custom_regions:L.custom_regions,computeData:tn,currencyUnit:Z,productFeature:L.productFeature,tag:tt,rate:J,isCapitalization:j,term:to?tl:Math.round($/u.F),termPeriod:null==L?void 0:L.term,isArchived:!!L.archive,isTermEmpty:!0,isLadderDeposit:to,isFixedTerm:1===Object.keys(ta).length&&"fixed"===tu[0].termType,amount:null!==(T=null!==(g=L.amount.from)&&void 0!==g?g:L.amount.to)&&void 0!==T?T:0,amountRange:null==L?void 0:L.amount,type:L.type.saving_account||L.asSavingAccount?l.kv.SavingAccount:l.kv.Deposit,...tr},...ti}}({deposit:e,normalizedBanks:A,filter:c,defaultTerm:h,bankTowns:v,cityId:p});return n&&(t.hasMonthlyPercent||(t.hasMonthlyPercent=n.hasMonthlyPercent),t.hasPreferentialTermination||(t.hasPreferentialTermination=n.hasPreferentialTermination),t.hasCapitalization||(t.hasCapitalization=n.hasCapitalization),t.hasRefill||(t.hasRefill=n.hasRefill),n.deposit&&t.items.push({...n.deposit,specialOrder:null})),t},{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1})}},14438:function(t,e,n){"use strict";n.d(e,{EP:function(){return l},Oh:function(){return s},PF:function(){return c},Pp:function(){return a},ax:function(){return u}});var i=n(91586),r=n(15329),o=n(84948);function u(t){let{rate:e,depositSum:n,term:i,floatingRateInformations:r,...u}=t;if(!(e&&n))return null;let{onlyBonusFloatingRate:l}=a(e,r),c=(0,o.Z)({...u,rate:e,depositSum:n,term:i});return c&&{...c,result:c.total,termDays:i,onlyBonusFloatingRate:l}}function a(t,e){var n,r;if(!e)return{rate:t,onlyBonusFloatingRate:0};let o=null!==(r=null===(n=e.find(t=>t.bankInfluenceEvent===i.D1.SALARY_OR_PENSION))||void 0===n?void 0:n.bonusPercentageValue)&&void 0!==r?r:0,u=e.reduce((t,e)=>(e.bankInfluenceEvent===i.D1.SPENDING&&t.push(e.bonusPercentageValue),t),[]),a=u.length?Math.max(...u):0;return{rate:t+o+a,onlyBonusFloatingRate:o+a}}function l(t,e){var n;return!!(!(null===(n=t.activeBanks)||void 0===n?void 0:n.length)||e&&t.activeBanks.find(t=>e===t))}function c(t,e){var n,o,u;let a="bank_id"in t?(null===(n=t.interest_capitalization)||void 0===n?void 0:n.has)===1:(null===(o=t.options)||void 0===o?void 0:o[0].interestPayments[0].method)==="CAPITALISATION";return{hasMonthlyPercent:"bank_id"in t?1===t.interest_payment.monthly&&!a:(null===(u=t.options)||void 0===u?void 0:u[0].interestPayments[0].periods[0].type)===i.Lg.MONTH&&!a,hasPreferentialTermination:function(t){var e;if("bank_id"in t)return 1===t.preferential_termination.has;let n=null===(e=t.options)||void 0===e?void 0:e[0].earlyTermination;return n===r.Z.PreferentialRateForWholeTerm||n===r.Z.WithoutRecalculationOfInterest}(t),hasCapitalization:a,hasRefill:e}}function s(t){let{computedFlags:{hasCapitalization:e,hasMonthlyPercent:n,hasPreferentialTermination:i,hasRefill:r},currentFilters:{withCapitalization:o,withMonthlyPercent:u,withPreferentialTermination:a,withRefill:l}}=t;return!!Object.values(t.currentFilters).every(t=>!t)||!(o&&!e||u&&!n||a&&!i||l&&!r)}},91342:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(33600);function r(t){let e=t.computeData;return e?+(e.effectiveRate+e.bonusRate).toFixed(2):0}function o(t){var e,n,o,u,a,l,c,s,m,d,v,p,f,h,A,_,y,N,b,D,E,x;let{deposit1:g,deposit2:T,increaseSort:R,sortType:P,isLeadGen:L}=t,I=R?g:T,C=R?T:g,M=(null!==(e=g.specialOrder)&&void 0!==e?e:99999)-(null!==(n=T.specialOrder)&&void 0!==n?n:99999),Y=Number(null!==(o=T.promo)&&void 0!==o&&o)-Number(null!==(u=g.promo)&&void 0!==u&&u)||Number(null!==(a=T.isCommercial)&&void 0!==a&&a)-Number(null!==(l=g.isCommercial)&&void 0!==l&&l)||("number"==typeof g.order?g.order:99999)-("number"==typeof T.order?T.order:99999),k=L?Y:0;switch(!0){case P===i.ER.RatePlusBonus:return M||Y||r(I)-r(C)||C.amount-I.amount;case P===i.ER.Profit:return M||k||(null!==(v=null===(c=I.computeData)||void 0===c?void 0:c.result)&&void 0!==v?v:0)-(null!==(p=null===(s=C.computeData)||void 0===s?void 0:s.result)&&void 0!==p?p:0)||(null!==(f=null===(m=I.computeData)||void 0===m?void 0:m.termDays)&&void 0!==f?f:0)-(null!==(h=null===(d=C.computeData)||void 0===d?void 0:d.termDays)&&void 0!==h?h:0);case P===i.ER.Rate:return M||k||(null!==(b=null===(A=I.computeData)||void 0===A?void 0:A.effectiveRate)&&void 0!==b?b:0)-(null!==(D=null===(_=C.computeData)||void 0===_?void 0:_.effectiveRate)&&void 0!==D?D:0)||(null!==(E=null===(y=I.computeData)||void 0===y?void 0:y.termDays)&&void 0!==E?E:0)-(null!==(x=null===(N=C.computeData)||void 0===N?void 0:N.termDays)&&void 0!==x?x:0)||C.amount-I.amount;default:return 0}}},37328:function(t,e,n){"use strict";n.d(e,{z:function(){return u}});var i=n(14862),r=n(2674),o=n(86935);function u(t,e){let{finuslugiBonusAllowed:n,firstDepositPromotionAllowed:u,repeatDepositPromotionAllowed:a}=t,{isOldUser:l}=(0,o.jt)(),{discounts:c}=(0,r.ND)();return e?i.m.FEATURE_TOGGLE_NEW_BONUS_API_ENABLED||l||!n?!l&&u?c.dynamicPercentFirstOpening:l&&a?c.dynamicPercentRepeatedOpening:void 0:c.plusFive:void 0}},20921:function(t,e,n){"use strict";n.d(e,{S:function(){return r}});var i=n(2265);function r(t){let{itemRef:e,disabled:n=!1,mode:r="entry",initialView:o=!1,onShow:u}=t,a=(0,i.useRef)(null),[l,c]=(0,i.useState)(!1),[s,m]=(0,i.useState)(o),d=(0,i.useCallback)(t=>{let[n]=t;1===n.intersectionRatio&&!l&&(c(!0),null==u||u(),"entry"===r&&a.current&&e.current&&a.current.unobserve(e.current)),m(n.intersectionRatio>0)},[l,e,r,u]);return(0,i.useEffect)(()=>{n||!e.current||a.current||(a.current=new IntersectionObserver(d,{root:null,threshold:"entry"===r?[1]:[0]}),a.current.observe(e.current))},[n,d,l,e,r]),{isShowed:l,inView:s,resetShow:(0,i.useCallback)(()=>{c(!1),a.current&&e.current&&a.current.observe(e.current)},[e])}}},99193:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var i=n(2265),r=n(72151),o=n(20921);function u(t){let{itemRef:e,eventCategory:n,eventAction:u,eventLabel:a,disabled:l=!1}=t,c=(0,i.useCallback)(()=>{(0,r.lQ)({event:"data-event",eventLabel:a,eventCategory:n,eventAction:u,eventValue:""})},[u,n,a]),{resetShow:s}=(0,o.S)({itemRef:e,disabled:l,mode:"entry",onShow:c});return{reset:s}}},50702:function(t,e,n){"use strict";n.d(e,{r:function(){return r}});var i=n(2265);let r=()=>{let[t,e]=(0,i.useState)(!1),n=(0,i.useRef)(null);return{isLoading:t,handleLoad:(0,i.useCallback)(()=>{n.current&&clearTimeout(n.current),e(!0),n.current=setTimeout(()=>{e(!1)},1e3)},[])}}},86935:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s},jt:function(){return m}});var i=n(2265);let r=(0,i.createContext)(void 0);var o=n(57437),u=n(7006),a=n(26876),l=n(53931),c=n(89911);function s(t){let{children:e}=t,n=function(t){var e;let{disabled:n=!1,...r}={},o=(0,i.useMemo)(()=>(0,l.$1)(),[]),s=null!==(e=null==o?void 0:o["auth.gtm_customer_id"])&&void 0!==e?e:null,[m,d]=(0,i.useState)(!1),[v,p]=(0,i.useState)(!s),{data:f,isLoading:h}=(0,c.d)(["customer",s],()=>(0,u.M)(s),{...r,disabled:!s||n});return(0,i.useEffect)(()=>{if(n||h||!f)return;let{data:t,error:e}=f,{features:i}=null!=t?t:{};p(!0),e||(null==i?void 0:i.includes(a.n.SHOW_ADDITIONAL_PERCENT_BONUS))||d(!0)},[f,n,h]),(0,i.useMemo)(()=>({isLoading:h,isOldUser:m,customerId:s,isCustomerDataResponded:v}),[s,v,h,m])}(),s=(0,i.useMemo)(()=>({isOldUser:n.isOldUser,customerId:n.customerId,isLoading:n.isLoading,isCustomerDataResponded:n.isCustomerDataResponded}),[n.isOldUser,n.customerId,n.isLoading,n.isCustomerDataResponded]);return(0,o.jsx)(r.Provider,{value:s,children:e})}function m(){let t=(0,i.useContext)(r);if(!t)throw Error("useCustomerContext must be used within CustomerContextProvider");return t}},64158:function(t){t.exports={tooltipText:"DepositTooltipTemplate_tooltipText__1GAbd",tooltipList:"DepositTooltipTemplate_tooltipList__yuKb_",listItem:"DepositTooltipTemplate_listItem__5eytV",description:"DepositTooltipTemplate_description__mYtwD"}}}]);