(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[161],{2392:function(e,t,a){"use strict";a.d(t,{z:function(){return d}});var n=a(57437),i=a(41014),o=a(33478),c=a(32833),l=a(61810),r=a(2265),s=a(16765);function d(e){let{isOpen:t,onClose:a,serverConfig:d,collectionId:u}=e,_=s.V.NEXT_PUBLIC_BASE_LK_URL,p=s.V.NEXT_PUBLIC_PL_LK_API_URL,m=s.V.NEXT_PUBLIC_S3_ASSETS,h="".concat(_,"/investment/advisory/bpif/").concat(u,"/purchase"),[x,v]=(0,r.useState)(null!=d?d:null);return(0,r.useEffect)(()=>{d||e();async function e(){v(await (0,i.g)(p,"bpif-widget"))}},[p,d]),(0,n.jsx)(l.u_,{dataQa:"brokers-bpif-collections-buy-modal",open:t,onClose:a,children:x?(0,n.jsx)(o.U,{baseUrl:_,s3AssetsUrl:m,serverConfig:x,config:{variant:"secondary",primaryTextOverride:"Войти и купить",linkTarget:"_self"},scenarioParams:{targetUri:h},isSilent:!0,entryPointId:"brokers-sc-landing"}):(0,n.jsx)(c.Od,{height:500,style:{width:"100%"}})})}},58221:function(e,t,a){"use strict";a.d(t,{Y:function(){return Q}});var n=a(57437),i=a(26094),o=a(32833),c=a(61810),l=a(75504),r=a(2265),s=a(76935),d=a.n(s);let u=["#0A84FF","#30D158","#FF453A","#FF9F0A"];var _=a(90135),p=a.n(_);function m(e){let{securities:t}=e;return(0,n.jsx)("div",{className:p().container,"data-qa":"scale",children:t.map((e,t)=>{let{securityType:a,ticker:i,name:o,weightPercent:c}=e;return(0,n.jsx)("div",{className:p().segment,style:{flexGrow:c/100,backgroundColor:u[t]}},"".concat(i,"-").concat(a,"-").concat(o))})})}var h=a(6731),x=a(16765),v=a(12552),f=a.n(v);function y(e){let{securities:t,asLink:a=!0}=e,l="scale-legend",r=x.V.NEXT_PUBLIC_BASE_URL,s=(e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:f().group,children:[(0,n.jsx)("span",{className:f().dot,style:{backgroundColor:u[t]}}),(0,n.jsx)(o.xv,{size:"14",className:f().name,dataQa:"".concat(l,"-item-name"),children:e.name})]}),(0,n.jsxs)("div",{className:f().group,children:[(0,n.jsx)(o.YS,{size:"m",dataQa:"".concat(l,"-item-weight"),children:(0,h.og)(e.weightPercent)}),a&&(0,n.jsx)(i.IconFdsChevronRightO,{size:"16",className:f().icon})]})]});return(0,n.jsx)("div",{className:f().container,"data-qa":l,children:t.map((e,t)=>{let i="".concat(r,"/brokers/kupit-aktsii/").concat(e.securityType.toLowerCase(),"/").concat(e.ticker);return a?(0,n.jsx)(c.rU,{href:i,className:f().row,dataQa:"".concat(l,"-item-link"),target:"_blank",children:s(e,t)},i):(0,n.jsx)("div",{className:f().row,children:s(e,t)},i)})})}function g(e){let{securities:t,asLink:a}=e;return(0,n.jsxs)("div",{className:d().wrapper,children:[(0,n.jsx)(m,{securities:t}),(0,n.jsx)(y,{securities:t,asLink:a})]})}var b=a(1234),j=a(65987),N=a.n(j);function k(e){let{securities:t,collectionType:a}=e,c="brokers-kupit-aktsii-".concat(a,"-collections-params"),[s,d]=(0,r.useState)("assets"),u=a===b.yl.Mix,_=(0,r.useMemo)(()=>Object.values(t.reduce((e,t)=>{var a,n,i;let o=null!==(a=e[t.securityType])&&void 0!==a?a:{name:null!==(i=({BOND:"Облигация",STOCK:"Акция",FUND:"Фонд",CURRENCY:"Валюта",METAL:"Металл"})[n=t.securityType])&&void 0!==i?i:n,ticker:t.securityType,securityType:t.securityType,weightPercent:0};return{...e,[t.securityType]:{...o,weightPercent:o.weightPercent+t.weightPercent}}},{})),[t]),p="types"===s?_:t;return(0,n.jsxs)("div",{"data-qa":c,className:N().wrapper,children:[(0,n.jsx)(o.X6,{type:"h4",dataQa:"".concat(c,"-title"),children:"Состав подборки"}),u&&(0,n.jsxs)("div",{className:N().tabs,role:"tablist","aria-label":"Состав подборки",children:[(0,n.jsxs)("button",{className:(0,l.Z)(N().tab,"assets"===s&&N().tab_active),type:"button",role:"tab","aria-selected":"assets"===s,onClick:()=>d("assets"),children:[(0,n.jsx)(i.IconFdsTextParagraphO,{size:16,style:{color:"#52CC80"}})," Активы"]}),(0,n.jsxs)("button",{className:(0,l.Z)(N().tab,"types"===s&&N().tab_active),type:"button",role:"tab","aria-selected":"types"===s,onClick:()=>d("types"),children:[(0,n.jsx)(i.IconFdsPieChartCircleO,{size:16,style:{color:"#FAD028"}})," Типы"]})]}),(0,n.jsx)(g,{securities:p,asLink:"assets"===s})]})}var C=a(19664),S=a.n(C),w=a(20910),T=a(40512),M=a.n(T);function E(e){let{caption:t,yieldRate:a}=e;return(0,n.jsxs)("div",{className:M().card,"data-qa":"yield-tile",children:[(0,n.jsx)(o.YS,{size:"s",dataQa:"yield-tile-caption",children:t}),(0,n.jsx)(w.B,{size:"18",weight:"medium",fontFamily:"primary",value:a,dataQa:"yield-tile-label"})]})}function I(e){let{historicalYield:t,description:a}=e,i=function(e){let{historicalYieldQuarter:t,historicalYieldHalfYear:a,historicalYieldYear:n}=e;return[{yieldRate:t,caption:"3 месяца"},{yieldRate:a,caption:"6 месяцев"},{yieldRate:n,caption:"12 месяцев"}]}(t);return(0,n.jsxs)("div",{"data-qa":"block-historical-yield",className:S().container,children:[(0,n.jsx)(o.xv,{as:"h4",size:"18",weight:"medium",dataQa:"header-historical-yield",children:"Историческая доходность"}),a&&(0,n.jsx)(o.xv,{size:"16",className:S().description,dataQa:"caption-historical-yield",children:a}),(0,n.jsx)("div",{"data-qa":"block-historical-yield-tiles",className:S().tiles,children:i.map(e=>{let{caption:t,yieldRate:a}=e;return(0,n.jsx)(E,{caption:t,yieldRate:a},t)})})]})}var L=a(124),O=a(49740),Y=a(652),z=a(27468),F=a.n(z);function P(e){let{icon:t}=e;return(0,n.jsx)(t,{size:24,style:{paddingTop:"2px"}})}function Q(e){var t,a,l,r;let{collection:s,disclaimer:d,isModalOpen:u,onModalClose:_,methodology:p,onBuyClick:m,actionButton:x,collectionType:v}=e,f="brokers-kupit-aktsii-".concat(v,"-collections-modal"),y=function(e){let{historicalYieldMonth:t,historicalYieldQuarter:a,historicalYieldHalfYear:n,historicalYieldYear:i,historicalYieldThreeYear:o,historicalYieldFiveYear:c}=e;return[t,a,n,i,o,c].filter(e=>!!e).length>0}(s.historicalYield),g=function(e,t){let a="brokers-kupit-aktsii-".concat(null!=t?t:b.yl.Bpif,"-collections"),n=[{key:1,label:e.threshold.text,text:"от ".concat((0,h.lb)(e.threshold.value,{decimalIsWithoutZeros:!0})),icon:i.IconFdsRubleCircleO,dataQa:"".concat(a,"-threshold")}];if("mix"!==t){var o;n.push({key:2,label:e.managementCompany.label,text:(o=e.managementCompany.managementCompanyNames)&&0!==o.length?o.join(", "):"-",icon:i.IconFdsChartGrowthSquareO,dataQa:"".concat(a,"-company")})}return"mix"===t&&[e.couponYield,e.dividendYield].forEach((e,t)=>{e&&e.isAvailable&&n.push({key:t+2,label:e.label,text:"Возможна",icon:i.IconFdsChartGrowthSquareO,dataQa:"".concat(a,"-").concat(0===t?"coupon-yield":"dividend-yield"),description:e.description})}),n}(s,v);return(0,n.jsx)(c.u_,{dataQa:f,header:{title:s.name},open:u,onClose:_,noPadding:!0,footer:{children:(0,n.jsxs)("div",{className:F().disclaimer,children:[(0,n.jsx)(c.zx,{dataQa:"".concat(f,"-button-buy"),stretch:!0,label:x,onClick:()=>{m(),(0,Y.X)(s,v)}}),(0,n.jsx)(o.YS,{dataQa:"".concat(f,"-disclaimer"),className:F().disclaimer__caption,children:d.title})]})},children:(0,n.jsxs)("div",{className:F().modalContent,children:[(0,n.jsx)(o.xv,{dataQa:"".concat(f,"-description"),size:"16",children:s.description}),y&&(0,n.jsx)(I,{historicalYield:s.historicalYield,description:"Прирост расчетной стоимости подборки на ".concat(function(e,t){let{format:a=h.zT}=t||{};try{if("string"==typeof e)return(0,L.WU)(new Date(e),a,{locale:O.ru});return(0,L.WU)(e,a,{locale:O.ru})}catch(t){return e.toString()}}(new Date,{format:"dd.MM.yyyy"}))}),(0,n.jsx)(k,{securities:s.securities,collectionType:v}),g&&(0,n.jsx)("ul",{"data-qa":"".concat(f,"-params"),className:F().container,children:g.map(e=>{let{key:t,label:a,text:i,icon:l,dataQa:r,description:s}=e;return(0,n.jsxs)("li",{className:F().parameter,children:[(0,n.jsx)(P,{icon:l}),(0,n.jsxs)("div",{className:"pl-3",children:[(0,n.jsx)(o.X6,{type:"h5",dataQa:"".concat(r,"-text"),children:i}),(0,n.jsxs)("div",{className:F().parameter__label,children:[(0,n.jsx)(o.YS,{size:"m",dataQa:"".concat(r,"-label"),children:a}),s&&(0,n.jsx)(c.u,{text:s,position:"top",children:(0,n.jsx)("button",{className:F().parameter__hint,type:"button","aria-label":s,"data-qa":"".concat(r,"-description"),children:"?"})})]})]})]},t)})}),(0,n.jsxs)(c.rU,{href:null!==(l=null==s?void 0:null===(t=s.methodology)||void 0===t?void 0:t.linkUrl)&&void 0!==l?l:p.linkUrl,className:F().methodology,target:"_blank",children:[(0,n.jsx)(i.IconFdsDownloadO,{size:24})," ",null!==(r=null==s?void 0:null===(a=s.methodology)||void 0===a?void 0:a.linkText)&&void 0!==r?r:p.linkText]})]})})}},17868:function(e,t,a){"use strict";a.d(t,{m:function(){return i}});var n=a(1234);let i={[n.sM.OneMonth]:"1 месяц",[n.sM.ThreeMonths]:"3 месяца",[n.sM.SixMonth]:"6 месяцев",[n.sM.OneYear]:"12 месяцев",[n.sM.ThreeYears]:"3 года",[n.sM.FiveYears]:"5 лет"}},652:function(e,t,a){"use strict";a.d(t,{X:function(){return c},n:function(){return o}});var n=a(65667);function i(e){let{collectionId:t,name:a,securities:n}=e,i=n.map(e=>"".concat(e.ticker,",").concat(e.weightPercent)).join("_");return"".concat(t,"_").concat(a,"_").concat(i)}function o(e,t){(0,n.P)("".concat(t,"_collections_advisory"),"pageview_detail",{eventLabel:i(e)})}function c(e,t){(0,n.P)("".concat(t,"_collections_advisory"),"go_to_cart_click",{eventLabel:i(e)})}},20910:function(e,t,a){"use strict";a.d(t,{B:function(){return s}});var n=a(57437),i=a(32833),o=a(75504),c=a(6731),l=a(8717),r=a.n(l);function s(e){let{size:t,weight:a,fontFamily:l,dataQa:s,className:d,value:u}=e,_=null===u||0===u?"default":u>0?"positive":"negative",p=null===u?"—":u>0?"+".concat((0,c.og)(u)):(0,c.og)(u);return(0,n.jsx)(i.xv,{dataQa:s,size:t,weight:a,fontFamily:l,className:(0,o.Z)(r()[_],d),children:p})}},31159:function(e,t,a){"use strict";a.d(t,{H:function(){return b}});var n=a(57437),i=a(75504),o=a(41062),c=a.n(o);let l=e=>"object"==typeof e;function r(e){let{items:t,getKey:a,renderItem:o,dataQa:r,className:s,overlap:d=12}=e,u=l(d)?d.mobile:d,_=l(d)?d.desktop:d;return(0,n.jsx)("div",{"data-qa":r,className:(0,i.Z)(c().wrapper,s),style:{"--multilogo-overlap-mobile":"".concat(u,"px"),"--multilogo-overlap-desktop":"".concat(_,"px")},children:t.map((e,i)=>(0,n.jsx)("div",{className:c().item,style:{zIndex:t.length-i},children:o(e,i)},a(e,i)))})}var s=a(16765),d=a(32833),u=a(20703),_=a(2265),p=a(22819),m=a.n(p);let h=e=>"object"==typeof e,x=(0,_.memo)(e=>{let{logoKey:t,alt:a,type:o="brandmark",entity:c="bank",directory:l="images",fullUrl:r,s3MinioUrl:s,size:d=46,className:p,dataQa:x,fallback:v}=e,f=(0,_.useMemo)(()=>r||(s&&t?"".concat(s,"/").concat(l,"/logo-").concat(o,"-").concat(c,"-").concat(t,".svg"):void 0),[r,s,l,o,c,t]),[y,g]=(0,_.useState)(!1);(0,_.useEffect)(()=>{g(!1)},[f]);let b=y||!f,j=h(d)?d.mobile:d,N=h(d)?d.desktop:d,k=Math.max(j,N);return b?v:(0,n.jsx)(u.default,{"data-qa":null!=x?x:"app-logo-image",src:f,alt:a,width:k,height:k,style:{"--logo-size-mobile":"".concat(j,"px"),"--logo-size-desktop":"".concat(N,"px")},className:(0,i.Z)(m().image,p),onError:function(){g(!0)},unoptimized:!0})});x.displayName="LogoWithFallback";var v=a(69108),f=a.n(v);let y=e=>"object"==typeof e,g=e=>{var t;let{fullUrl:a,label:o,alt:c,size:l=46,className:r,dataQa:s,...u}=e,_=(null!==(t=null!=o?o:c)&&void 0!==t?t:"").trim().charAt(0).toUpperCase(),p={"--logo-size-mobile":"".concat(y(l)?l.mobile:l,"px"),"--logo-size-desktop":"".concat(y(l)?l.desktop:l,"px")},m=(0,n.jsx)("div",{"data-qa":s?"".concat(s,"-fallback"):"app-logo-fallback",className:(0,i.Z)(f().fallback,r),style:p,children:(0,n.jsx)(d.xv,{size:"20",weight:"medium",children:_})});return(0,n.jsx)(x,{...u,fullUrl:a,fallback:m,alt:c,size:l,className:r,dataQa:s})};function b(e){let{securities:t,dataQa:a,className:i}=e;return(0,n.jsx)(r,{items:t,getKey:e=>{let{ticker:t,securityType:a,name:n}=e;return"".concat(t,"-").concat(a,"-").concat(n)},renderItem:e=>{let{ticker:t,name:a}=e;return(0,n.jsx)(g,{size:{mobile:40,desktop:46},fullUrl:"".concat(s.V.NEXT_PUBLIC_S3_ASSETS,"/images/brokerage/shares/").concat(t,".png"),alt:"логотип ".concat(a),label:a})},dataQa:a,className:i})}},52546:function(e,t,a){"use strict";a.d(t,{j:function(){return i}});var n=a(2265);function i(){let[e,t]=(0,n.useState)(null),[a,i]=(0,n.useState)(void 0);return{isInfoModalOpen:"info"===e,isBuyModalOpen:"buy"===e,selectedItem:a,handleInfoModalOpen:function(e){i(e),t("info")},handleBuyModalOpen:function(e){i(e),t("buy")},handleSwitchToBuy:function(){t("buy")},handleModalClose:function(){t(null),i(void 0)}}}},1234:function(e,t,a){"use strict";var n,i,o,c,l,r,s,d;a.d(t,{sM:function(){return o},yl:function(){return n}}),(l=n||(n={})).Bpif="bpif",l.Mix="mix",(r=i||(i={})).BeginnerInvestor="BEGINNER_INVESTOR",r.IntermediateInvestor="INTERMEDIATE_INVESTOR",r.AdvancedInvestor="ADVANCED_INVESTOR",(s=o||(o={})).OneMonth="ONE_MONTH",s.ThreeMonths="THREE_MONTHS",s.SixMonth="SIX_MONTH",s.OneYear="ONE_YEAR",s.ThreeYears="THREE_YEARS",s.FiveYears="FIVE_YEARS",(d=c||(c={})).Bond="BOND",d.Stock="STOCK",d.Fund="FUND"},65667:function(e,t,a){"use strict";a.d(t,{P:function(){return c}});var n=a(60915),i=a(94825);let o=a.n(i)().get("auth.gtm_customer_id");function c(e,t,a){var i;let{host:c,pathname:l}=window.location,r="".concat(c).concat(l);i="".concat(e,"_").concat(r),(0,n.AB)({event:"data_event",customer_id:o,eventCategory:i,eventAction:t,eventLabel:null==a?void 0:a.eventLabel,eventValue:null==a?void 0:a.eventValue})}},65987:function(e){e.exports={wrapper:"CollectionCompound_wrapper__9P2mr",structures:"CollectionCompound_structures__237VW",tabs:"CollectionCompound_tabs__7_od4",tab:"CollectionCompound_tab__wz1_3",tab_active:"CollectionCompound_tab_active__vwNTR"}},27468:function(e){e.exports={modalContent:"CollectionModal_modalContent__bV8iS",container:"CollectionModal_container__l9XPy",parameter:"CollectionModal_parameter__IJ67_",parameter__label:"CollectionModal_parameter__label___cBZp",parameter__hint:"CollectionModal_parameter__hint__cjbjf",disclaimer:"CollectionModal_disclaimer__CPqka",disclaimer__caption:"CollectionModal_disclaimer__caption__L8XyH",methodology:"CollectionModal_methodology__nJaiZ"}},76935:function(e){e.exports={wrapper:"DistributionScale_wrapper__0c_Yt"}},90135:function(e){e.exports={container:"Scale_container__vr7pQ",segment:"Scale_segment__gg1Ph"}},12552:function(e){e.exports={container:"ScaleLegend_container__m07G5",row:"ScaleLegend_row__WVcuq",group:"ScaleLegend_group__x2epb",name:"ScaleLegend_name__imq3n",dot:"ScaleLegend_dot__3LNit",icon:"ScaleLegend_icon__hBgCr"}},8717:function(e){e.exports={default:"ColoredYield_default__DORcY",positive:"ColoredYield_positive__N8ByC",negative:"ColoredYield_negative__SOpQt"}},19664:function(e){e.exports={container:"HistoricalYield_container__ZY3LP",description:"HistoricalYield_description__qdLGN",tiles:"HistoricalYield_tiles___mXFA"}},40512:function(e){e.exports={card:"YieldTile_card__q_pi_"}},22819:function(e){e.exports={image:"LogoWithFallback_image__15IHP"}},41062:function(e){e.exports={wrapper:"MultiLogo_wrapper__NOIMh",item:"MultiLogo_item___xycQ"}},69108:function(e){e.exports={fallback:"SecurityLogo_fallback__VZWv3"}}}]);