"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7879],{9702:function(e,t,n){n.d(t,{f:function(){return r},o:function(){return i}});let r="funds-compare-ids",i="funds-compare-tooltip-closed"},51615:function(e,t,n){n.d(t,{T:function(){return l}});var r=n(2265),i=n(99376),o=n(49090);function a(e){return[...new Set(e.filter(e=>"string"==typeof e))].slice(0,4)}function c(e,t){if(!e)return[];let n=window.localStorage.getItem(t);if(!n)return[];try{let e=JSON.parse(n);if(!Array.isArray(e))return[];return a(e)}catch(e){return window.localStorage.removeItem(t),[]}}function u(e){let t=new URLSearchParams;return e.forEach(e=>{t.append("productIds",e)}),"/compare?".concat(t.toString())}function l(e){let{enabled:t,storageKey:n,initialCompareIds:l}=e,s=(0,i.useRouter)(),[d,f]=(0,r.useState)([]),[p,m]=(0,r.useState)(!1),[g,h]=(0,r.useState)(!1),v=d.length,E=(0,r.useCallback)(e=>{if(!e.length){m(!1);return}m(!0)},[]);(0,r.useEffect)(()=>{if(t){if(l){let e=a([...c(t,n),...l]);window.localStorage.setItem(n,JSON.stringify(e)),f(e),h(!0);return}f(c(t,n)),h(!0)}},[t,l,n]),(0,r.useEffect)(()=>{if(t)return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e);function e(e){if(e.key===n){if(!e.newValue){f([]);return}try{let t=JSON.parse(e.newValue);f(Array.isArray(t)?a(t):[])}catch(e){f([])}}}},[t,n]),(0,r.useEffect)(()=>{g&&E(d)},[d,g,E]);let S=(0,r.useCallback)(()=>{d.length<2||s.push(u(d))},[d,s]),_=(0,r.useCallback)(e=>{let r=c(t,n).filter(t=>t!==e);r.length<2||(window.localStorage.setItem(n,JSON.stringify(r)),f(r),s.replace(u(r)))},[t,s,n]),b=(0,r.useCallback)(()=>{window.localStorage.removeItem(n),f([]),m(!1)},[n]);return{compareIds:d,isCompareLimitReached:d.length>=4,isSnackbarClickable:v>1,isSnackbarOpen:p,snackbarDescription:1===v?"Добавьте еще один для сравнения":"Максимум для сравнения - 4",snackbarTitle:"Сравнить: ".concat((0,o._6)(v,["фонд","фонда","фондов"])),closeSnackbar:()=>m(!1),clearCompare:b,onSnackbarClick:S,removeCompare:_,toggleCompare:function(e){let r;let i=c(t,n);r=i.includes(e)?i.filter(t=>t!==e):i.length>=4?i:[...i,e],window.localStorage.setItem(n,JSON.stringify(r)),f(r)}}}},96369:function(e,t,n){n.d(t,{J:function(){return c}});var r=n(2265),i=n(99376),o=n(42798),a=n.n(o);function c(){let e=(0,i.useParams)(),t=(0,i.usePathname)();return(0,r.useCallback)(n=>{let{prefix:r,element:i,name:o,index:c,id:u}=n;if(!t||!e)return"";let l=t.split("/").filter(e=>e).map(t=>{var n;return null!==(n=Object.keys(e).find(n=>e[n]===t))&&void 0!==n?n:t});l.unshift("funds");let s=l.join("-"),d=a()(o),f=void 0!==c?"-".concat(function(e){if(Number.isNaN(e)||e<0)throw Error("Incorrect value '".concat(e,"' for the property 'index'. Must be a number and >= 0}"));return e}(c)):"";return"".concat(r?"".concat(r,"-"):"").concat(s,"-").concat(i,"-").concat(d).concat(f).concat(u?"-".concat(u):"")},[e,t])}},1883:function(e,t,n){n.d(t,{_:function(){return a}});var r=n(30631);let i=n(64131).Z.get("auth.gtm_customer_id"),o=e=>{(0,r.AB)(e)};function a(e,t,n){o({event:"data_event",customer_id:i,eventCategory:e,eventAction:t,eventLabel:null==n?void 0:n.eventLabel,eventValue:null==n?void 0:n.eventValue})}},30811:function(e,t,n){var r,i;n.d(t,{x:function(){return r}}),(i=r||(r={})).Form="form",i.Link="link",i.Header="header",i.Breadcrumbs="breadcrumbs",i.Image="image",i.Button="button",i.Dropdown="dropdown",i.Slider="slider",i.Switcher="switcher",i.Banner="banner",i.Checkbox="checkbox",i.Radiobutton="radiobutton",i.Text="text",i.List="list",i.Block="block",i.Collapse="collapse",i.Chart="chart",i.Modal="modal",i.Table="table",i.Icon="icon",i.Chips="chips",i.Tile="tile",i.Caption="caption",i.Input="input",i.Tabs="tabs",i.Tag="tag",i.Toggle="toggle",i.Drawer="drawer",i.Select="select",i.Hint="hint",i.Label="label",i.ProgressBar="progressbar"},34057:function(e,t,n){n.d(t,{xJ:function(){return k.x},nC:function(){return _},al:function(){return b},K7:function(){return y},jV:function(){return S},sM:function(){return g},gQ:function(){return h},X_:function(){return v},xl:function(){return C},Cp:function(){return E}}),(m=g||(g={})).OneMonth="ONE_MONTH",m.ThreeMonths="THREE_MONTHS",m.SixMonth="SIX_MONTH",m.OneYear="ONE_YEAR",m.ThreeYears="THREE_YEARS",m.FiveYears="FIVE_YEARS";var r,i,o,a,c,u,l,s,d,f,p,m,g,h,v,E,S,_,b,C,y,I,w,A,k=n(30811);(r=h||(h={})).High="HIGH",r.Medium="MEDIUM",r.Low="LOW",(i=v||(v={})).Asc="ASC",i.Desc="DESC",(o=E||(E={})).YieldMonth="YIELD_MONTH",o.YieldQuarter="YIELD_QUARTER",o.YieldHalfYear="YIELD_HALF_YEAR",o.YieldYear="YIELD_YEAR",o.YieldThreeYear="YIELD_THREE_YEAR",o.YieldFiveYear="YIELD_FIVE_YEAR",o.YieldAll="YIELD_ALL",(a=S||(S={})).Sca="NET_ASSET_VALUE",a.MinimalPurchaseAmount="MINIMAL_PURCHASE_AMOUNT",(c=_||(_={}))[c.MinValue=100]="MinValue",c[c.IsAuthorFund=1]="IsAuthorFund",(u=b||(b={})).Mixed="MIXED",u.Bond="BOND",u.Stock="STOCK",u.Metal="METAL",u.Money="MONEY",u.Realty="REALTY",u.None="NONE",(l=C||(C={})).Extended="extended",l.Quick="quick",(s=y||(y={}))[s.Yield=0]="Yield",s[s.ManagementCompanies=1]="ManagementCompanies",s[s.Risks=2]="Risks",s[s.Category=3]="Category",(d=I||(I={})).View="view",d.Buy="buy",(f=w||(w={})).Rational="Оптимальный",f.Aggressive="Активный рост",f.Conservative="Минимальный риск",(p=A||(A={})).Archived="ARCHIVED",p.Demo="DEMO",p.Draft="DRAFT",p.Published="PUBLISHED"},39189:function(e,t,n){n.d(t,{bA:function(){return r}});let r=[{label:"Главная",path:"/"},{label:"Фонды",path:"/invest/funds"}]},93398:function(e,t,n){n.d(t,{tC:function(){return r},pY:function(){return i}});let r=45;n(39189);let i="/invest/funds"},90917:function(e,t,n){n.d(t,{E0:function(){return g},p6:function(){return E},JC:function(){return _},NM:function(){return b},Rz:function(){return m},SJ:function(){return a},kj:function(){return C},j0:function(){return y},ow:function(){return A},ld:function(){return k},lt:function(){return M}});var r=n(1883),i=n(93398),o=n(50666);function a(e){return(0,o.env)(e)}let c=e=>/^https:\/\//gi.test(e),u=e=>["",...e.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),l=()=>window.location.host.indexOf("localhost")>=0,s=e=>('"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)),d=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),f=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[(]/g,"%28").replace(/[)]/g,"%29"),p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,r=a("NEXT_PUBLIC_SHOWCASE_ORIGIN"),i=l()?"":"; domain=".concat(u(r)),o=new Date(new Date().getTime()+864e5*n).toUTCString();document.cookie="".concat(f(e),"=").concat(d("string"==typeof t?t:JSON.stringify(t)),"; SameSite=None").concat(c(r)?"; Secure":"").concat(i,"; expires=").concat(o,"; path=/;")},m=(e,t,n)=>{if(null==e?void 0:e.aggregator_id){let a={...e,...n&&{platformProductId:n},create_date:new Date().toISOString()},c={payload:[]};try{var o;c=JSON.parse((null===(o=function(){if("undefined"!=typeof document&&document.cookie)return Object.fromEntries(document.cookie.split("; ").map(e=>e.split("=")).map(e=>e.map(e=>s(e))))}())||void 0===o?void 0:o.cpa_click)||"{}")}catch(e){return}c.payload||(c.payload=[]),c.payload.push(a),t[e.aggregator_id]&&(p("cpa_click",c,i.tC),(0,r._)(e.aggregator_id,"CPA_click",{eventLabel:window.location.pathname,eventValue:e.utm_term||e.click_id,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium}))}};function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"primary";return e.filter(e=>{var t;return null===(t=e.params)||void 0===t?void 0:t.visible}).map(e=>{var n,r;return{...e,params:{visible:e.params.visible,variant:null!==(n=e.params.variant)&&void 0!==n?n:t,priority:null!==(r=e.params.priority)&&void 0!==r?r:Number.MAX_SAFE_INTEGER}}}).toSorted((e,t)=>e.params.priority-t.params.priority).map(e=>({label:e.displayName,variant:e.params.variant,dataQa:e.code,hint:e.description}))}var h=n(67603),v=n(50692);function E(e,t){let{format:n="dd.MM.yy"}=null!=t?t:{};try{if("string"==typeof e)return(0,h.Z)(new Date(e),n,{locale:v.Z});return(0,h.Z)(e,n,{locale:v.Z})}catch(t){return e}}var S=n(49090);function _(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{length:n}=String(Math.floor(e)),r=t?"\xa0₽":"";return n>7&&n<10?"".concat(String(+(e/1e6).toFixed(2)).replace(".",","),"\xa0млн").concat(r):n>=10&&n<13?"".concat(String(+(e/1e9).toFixed(2)).replace(".",","),"\xa0млрд").concat(r):n>=13?"".concat(String(+(e/1e12).toFixed(2)).replace(".",","),"\xa0трлн").concat(r):(0,S.lb)(e,{decimalCount:2,hasCurrencySymbol:t,decimalIsWithoutZeros:!0})}function b(e){if(null===e)return"—";if(0===e)return"0%";let t=e>0?"+":"";return"".concat(t).concat((0,S.lb)(e,{decimalCount:2,hasCurrencySymbol:!1}),"%")}function C(e){let t=a("NEXT_PUBLIC_SHOWCASE_ORIGIN");return{title:"Журнал Финуслуги",description:"Рассказываем о финансах, разбираем новые законы и даем лайфхаки, как приумножить доход",chips:[{id:1,label:"Инвестиции",items:e.articles.map(e=>{let{title:n,url:r,img:i,public_date:o}=e;return{title:n,dt:o,url:"".concat(t,"/").concat(r),img:"".concat(t,"/img/posts/big/").concat(null==i?void 0:i.file)}})}],url:"".concat(t,"/navigator")}}function y(e,t,n){if(e<1||!n.length)return null;let r=Math.min(e-1,n.length);return[...n.slice(0,r),t,...n.slice(r)]}var I=n(59918),w=n(30702);function A(e,t,n){let r="string"==typeof e?(0,I.Z)(e):e,i="string"==typeof t?(0,I.Z)(t):t,o="string"==typeof n?(0,I.Z)(n):n;return(0,w.Z)(r,{start:i,end:o})}function k(e){var t;return null!==(t=null==e?void 0:e.replace(/\sstyle=["\\]+[a-z0-9-:; !\s]*[\\"]+/gm,""))&&void 0!==t?t:""}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return+e.toFixed(t)}}}]);