(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8995],{68327:function(e,t,n){Promise.resolve().then(n.bind(n,82778)),Promise.resolve().then(n.bind(n,92404))},33145:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var s=n(48461),a=n.n(s)},48461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return l},getImageProps:function(){return r}});let s=n(47043),a=n(55346),o=n(65878),i=s._(n(5084));function r(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let l=o.Image},67455:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var s=n(53083),a=n(46295);n(40257);let o={REVALIDATE_REQUEST_VALUE:"300",NEXT_PUBLIC_GTM_ID:"GTM-KPFSBHT",NEXT_PUBLIC_MTM_URL:"https://wa.finuslugi.ru",NEXT_PUBLIC_MTM_ID:"ivMbIHf9",NEXT_PUBLIC_CRAML_DIRTY_FEEDBACK:"http://craml-dirty-feedback.craml-rc.mpddev.moex.com",NEXT_PUBLIC_BASE_URL:"http://dev-rc.beta.moex.com",NEXT_PUBLIC_API_URL:"http://dev-rc.beta.moex.com",NEXT_PUBLIC_BFF_API_URL:"http://dev-rc.beta.moex.com/sc",NODE_ENV:"production",NEXT_PUBLIC_MP_SC_API:"http://mp-sc-api.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_S3_ASSETS:"https://dev-minio.beta.moex.com",NEXT_PUBLIC_PAGECONTENT_API:"http://mp-sc-api-page-content.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_MP_SC_REDIRECTS_API:"http://mp-sc-redirects.mp-rc.mpddev.moex.com"},i=()=>!1,r=()=>i()?{...(0,a.S)(),...o}:(0,a.S)(),l=(e,t)=>{let{isBFF:n,isMpScApi:s,isPageContent:a,isMpScRedirects:o}=t;return s?"".concat(e.NEXT_PUBLIC_BASE_URL,"/sc"):e.NEXT_PUBLIC_BASE_URL},c=async e=>{let{url:t,options:n={},config:a}=e,o=r(),i=l(o,n),c=((null==a?void 0:a.method)||"GET").toUpperCase();if(!i)return console.error("Ошибка запроса: API endpoint не задан",t),{data:null,error:"API endpoint is not configured"};try{let e=performance.now(),n=await (0,s.Wg)(t,{baseURL:i,method:c,headers:{...null==a?void 0:a.headers},...a,timeout:1e4,retry:1,next:{revalidate:Number(o.REVALIDATE_REQUEST_VALUE)||300}}),r=performance.now()-e;return console.warn("Запрос ".concat(i).concat(t," занял ").concat(r.toFixed(2)," ms")),{data:n,error:null}}catch(e){return console.error("Ошибка запроса","".concat(e,": ").concat(i).concat(t)),{data:null,error:e||"Unknown error"}}}},92404:function(e,t,n){"use strict";n.d(t,{Bonus:function(){return O}});var s=n(57437),a=n(2265),o=n(80684),i=n(35563),r=n(75461),l=n(31865),c=n(54365),d=n(67455);let _=async e=>{let{page:t,productTypeId:n,sort:s}=e;return(await (0,d.t)({url:"/api/v1/bonuses/active?page=".concat(t,"&rowsPerPage=6&isShownLk=true").concat(n?"&productTypeId=".concat(n):"").concat("&sortDirection=".concat(s||"DESC")),options:{isMpScApi:!0}})).data||{}},u=async function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DESC";return(null===(e=(await (0,d.t)({url:"/api/v1/bonuses/grouped?limit=6&isShownLk=true&sortDirection=".concat(t),options:{isMpScApi:!0}})).data)||void 0===e?void 0:e.filter(e=>Array.isArray(e.data)&&e.data.length>0))||[]},p=async e=>(await (0,d.t)({url:"/api/v1/bonuses/promocodes?page=0&rowsPerPage=10",options:{isMpScApi:!0},config:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({promotionId:e,isShownLk:!0})}})).data||{promocodes:[]};var m=n(44197),g=n(2373),h=n(49202),x=n(71938),v=n(19392),f=n.n(v);let b=e=>{let{data:t,onClick:n,loading:a,loadingBtn:o}=e,i=(0,x.p6)(t.endDate);return(0,s.jsxs)("div",{className:(0,c.Z)(f().wrapper,{[f().loading]:a}),onClick:n,children:[(0,s.jsx)("div",{className:f().imageWrapper,children:t.image&&(0,s.jsx)("img",{src:t.image.src,srcSet:"".concat(t.image.src,", ").concat(t.image.x2," 2x"),alt:"bg"})}),(0,s.jsx)("div",{className:f().chips,children:t.endDate&&(0,s.jsx)("label",{children:"до ".concat(i)})}),(0,s.jsxs)("div",{className:f().text,children:[(0,s.jsx)("div",{className:f().title,children:t.title}),t.importantConditions&&(0,s.jsx)("div",{className:f().description,children:t.importantConditions})]}),(0,s.jsx)(r.zx,{className:f().button,label:"Подробнее",size:"s",pending:a||o})]})};var C=n(33145),S=n(46295),B={src:"/service-main/_next/static/media/percent.c854cbab.svg",height:141,width:109,blurWidth:0,blurHeight:0},j=n(13466),N=n(53120),y=n(49689),I=n(42953),T=n(72361),M=n.n(T);let E=e=>{let[t,n]=(0,a.useState)(!1),i=(0,g.G)("lg");(0,a.useEffect)(()=>{n(!1)},[e.isOpen]);let l=e.data;if(!l)return null;let d=(0,x.p6)(l.endDate),_=Array(i?11:10).fill("");return(0,s.jsxs)("div",{className:M().body,onKeyDown:t=>{"Enter"===t.key&&e.onClose()},children:[(0,s.jsx)("div",{className:M().imageWrapper,children:l.image&&(0,s.jsx)("img",{src:l.image.src,srcSet:"".concat(l.image.src,", ").concat(l.image.x2," 2x"),alt:"bg"})}),(0,s.jsx)("div",{className:M().chips,children:l.endDate&&(0,s.jsx)("label",{children:"до ".concat(d)})}),(0,s.jsx)("div",{className:M().title,children:l.title}),(0,s.jsx)("div",{className:M().info,dangerouslySetInnerHTML:{__html:l.importantConditions||""}}),l.rulesUrl&&(0,s.jsxs)("a",{className:M().file,href:"".concat(e.assetsUrl,"/mp-assets/").concat(l.rulesUrl),onClick:()=>{(0,h.D)({eventCategory:"skachat_pdf_fayl_iz_popup",eventActionType:h.i.link,eventActionText:"skachat_pdf_fayl",eventLabel:"".concat(e.assetsUrl,"/mp-assets/").concat(l.rulesUrl)})},children:[(0,s.jsx)(o.IconPdf,{}),"Подробности акции.PDF"]}),l.code&&(0,s.jsxs)("div",{className:(0,c.Z)(M().promocode,{[M().copied]:t}),children:[(0,s.jsx)("div",{className:M().leftShape}),(0,s.jsx)("div",{className:M().dots,children:_.map((e,t)=>(0,s.jsx)("div",{},t))}),(0,s.jsxs)("div",{className:M().rightShape,children:[(0,s.jsx)("div",{className:M().code,children:l.code}),(0,s.jsxs)("div",{className:M().codeButton,onClick:()=>((0,h.D)({eventCategory:"",eventActionType:h.i.button,eventActionText:"copi_promokod",eventLabel:"номер промокода ".concat(l.code)}),n(!0),navigator.clipboard.writeText(l.code||""),!1),children:[t?(0,s.jsx)(o.IconFdsCheckCircleO,{}):(0,s.jsx)(o.IconFdsCopyO,{}),t?"Скопировано":"Скопировать промокод"]})]}),(0,s.jsx)(C.default,{src:B,alt:"%"})]}),(0,s.jsx)("div",{className:M().buttonActions,children:(0,s.jsx)(r.zx,{as:"a",href:I.LK,size:"m",className:M().button,label:"Зарегистрироваться на Финуслугах",onClick:()=>{(0,h.D)({eventCategory:"aktsii_spetspredlozheniya_popup",eventActionType:h.i.button,eventActionText:"Зарегистрироваться на Финуслугах",eventLabel:"perekhod_na_/registration"})}})})]})},A=e=>{let t=(0,S.S)(),n=(0,g.G)("lg");return(0,s.jsxs)(j.h,{children:[!n&&(0,s.jsx)(N.d,{rowTitle:!0,titleAlign:"center",contentClassName:M().content,isOpen:e.isOpen,onClose:e.onClose,width:"628px",children:(0,s.jsx)(E,{...e,assetsUrl:t.NEXT_PUBLIC_S3_ASSETS})}),n&&(0,s.jsx)(y.j,{className:(0,c.Z)(M().mobilePopup),contentClassName:M().content,isOpen:e.isOpen,onClose:e.onClose,children:(0,s.jsx)(E,{...e,assetsUrl:t.NEXT_PUBLIC_S3_ASSETS})})]})},D=["App","Bonus","Enshurence","Finuslugi","fruit_box","Girl_calculate","Identification","Money_save","Money_transfer_2","Money","Signature","Success"],P=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)},L=e=>{let t=(0,S.S)(),n=D.map(e=>({src:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets/images/bonus/").concat(e,".png"),x2:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets/images/bonus/").concat(e,"2.png")})),s=[],a=[];for(let t of e){s.length||s.push(...n);let e=P(t.title)%s.length,o=s[e];a.push({...t,image:o}),s.splice(e,1)}return a};var w=n(17599),U=n.n(w);let k="Акции и спецпредложения",W=e=>{let{isIncreaseSort:t,setIsIncreaseSort:n}=e;return(0,s.jsxs)("button",{type:"button",className:(0,c.Z)(U().sortButton),onClick:()=>n(!t),children:[t?(0,s.jsx)(o.IconFdsSortDescendingO,{size:22}):(0,s.jsx)(o.IconFdsSortAscendingO,{size:22}),(0,s.jsx)("span",{children:"По дате"})]})},O=e=>{let{tagsData:t}=e,n=(0,g.G)("lg"),[o,d]=(0,a.useState)(null),[x,v]=(0,a.useState)(t),[f,C]=(0,a.useState)([]),[S,B]=(0,a.useState)(!1),j=x.findIndex(e=>{let{id:t}=e;return t===o})||0,N=j>-1?j:0,y=f.length&&S?f:x,I=f.length&&S?C:v,T=y[N],M=(null==T?void 0:T.data)||[],[E,D]=(0,a.useState)(null),[P,w]=(0,a.useState)(!1),[O,z]=(0,a.useState)(!1),[R,X]=(0,a.useState)(null),F=L(M),G=e=>()=>{(0,h.D)({eventCategory:"popup_aktsii",eventActionType:h.i.offer,eventActionText:e.title}),X(e.id),p(e.id).then(t=>{var n;let{promocodes:s}=t,a=new Date,o=s.filter(e=>{let{appliesFrom:t,appliesTo:n}=e;return new Date(t)<=a&&a<=new Date(n)});D({...e,code:(null===(n=o[0])||void 0===n?void 0:n.code)||""})}).finally(()=>X(null))},K=e=>{(0,h.D)({eventCategory:"click_top_element",eventActionType:h.i.button,eventActionText:e?"element_po_ubyvaniyu":"element_po_vozrastaniyu",eventLabel:"По дате"}),f.length||(z(!0),u("ASC").then(e=>{C((null==e?void 0:e.map(e=>({...e,hasMore:e.data.length>=6,page:0})))||[]),z(!1)})),B(e)},H=(e,t)=>()=>{(0,h.D)({eventCategory:"click_top",eventActionType:h.i.chip,eventActionText:t||"",eventLabel:t}),d(e||null)};return(0,s.jsxs)("main",{className:U().page,children:[(0,s.jsxs)(i.W2,{children:[(0,s.jsx)(r.Oo,{style:{padding:"16px 0"},items:[{href:"/",label:"Главная"},{label:k}]}),(0,s.jsx)("h1",{className:U().title,children:k}),F.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:U().filters,children:[(0,s.jsxs)(i.W2,{className:U().chips,children:[n&&(0,s.jsx)(W,{isIncreaseSort:S,setIsIncreaseSort:K}),x.map((e,t)=>{let{id:n,name:a}=e;return(0,s.jsx)("div",{className:(0,c.Z)({[U().selected]:t===N}),onClick:H(n,a),children:a},n||a)})]}),!n&&(0,s.jsx)(W,{isIncreaseSort:S,setIsIncreaseSort:K})]}),(0,s.jsx)("div",{className:U().grid,children:F.map((e,t)=>(0,s.jsx)(b,{data:e,onClick:G(e),loading:O,loadingBtn:e.id===R},t))}),(null==T?void 0:T.hasMore)&&(0,s.jsx)("div",{className:U().pagination,children:(0,s.jsx)(r.zx,{label:"Показать еще",variant:"secondary",onClick:()=>{(0,h.D)({eventCategory:"aktsii_spetspredlozheniya",eventActionType:h.i.button,eventActionText:"Показать еще"}),w(!0),_({page:T.page+1,productTypeId:o,sort:S?"ASC":"DESC"}).then(e=>{let t=e.promotions||[],n=e.pagination||{};I(e=>{let s=[...e],a={...T,data:[...T.data,...t],hasMore:T.page+2<(n.totalPages||0),page:T.page+1};return s[N]=a,s}),w(!1)})},pending:P})})]}):(0,s.jsx)(l.ErrorPageWidget,{title:"Сейчас нет активных акций — но вы не потеряете выгоду",subtitle:"Переходите к лучшим предложениям на маркетплейсе",buttonText:"Перейти",className:U().emptyListWidget}),(0,s.jsx)(m.j,{className:U().fullInfoLink,mainPageUrl:"aktsii_spetspredlozheniya",href:"https://finuslugi.ru/disclosure?anchor=documents",target:"_self",text:"Завершенные акции"})]}),(0,s.jsx)(A,{data:E,isOpen:!!E,onClose:()=>D(null)})]})}},42953:function(e,t,n){"use strict";n.d(t,{C_:function(){return a},LK:function(){return s}});let s="https://lk.finuslugi.ru/registration/",a="https://assets.finuslugi.ru/mp-assets/docs/main-documents/regulation_review_procedure/regulation_review_procedure.pdf"},71938:function(e,t,n){"use strict";n.d(t,{p6:function(){return o}}),n(35563);var s=n(40044),a=n(86532);function o(e,t){let{format:n="dd.MM.yyyy"}=null!=t?t:{};try{let t="string"==typeof e?new Date(e):e;return(0,s.WU)(t,n,{locale:a.ru})}catch(t){return"string"==typeof e?e:e.toString()}}},17599:function(e){e.exports={title:"Bonus_title__burQb",page:"Bonus_page__mIpwn",filters:"Bonus_filters__dsGlw",chips:"Bonus_chips__47fDo",sortChip:"Bonus_sortChip__wHIwv",selected:"Bonus_selected__VqAVC",sort:"Bonus_sort__qfnJa",grid:"Bonus_grid__6hvY2",pagination:"Bonus_pagination__OZ1_9",emptyListWidget:"Bonus_emptyListWidget__4azBT",sortButton:"Bonus_sortButton__jmAcg",fullInfoLink:"Bonus_fullInfoLink___rFln"}},19392:function(e){e.exports={wrapper:"BonusCard_wrapper__maKLU",loading:"BonusCard_loading__jTpML",imageWrapper:"BonusCard_imageWrapper__5ASsX",text:"BonusCard_text__9G6R2",chips:"BonusCard_chips__KASKR",bgImg:"BonusCard_bgImg__FP__a",bgImgM:"BonusCard_bgImgM___cDSd",img:"BonusCard_img__gmTQV",imgM:"BonusCard_imgM__8nK9b",gradient:"BonusCard_gradient__yuPMG",title:"BonusCard_title__Hc0Uh",description:"BonusCard_description__0lWCI",button:"BonusCard_button__ndixu"}},72361:function(e){e.exports={content:"BonusDetailModal_content__ZK4uH",buttonActions:"BonusDetailModal_buttonActions__Uqy9m",button:"BonusDetailModal_button__dQ7ho",mobilePopup:"BonusDetailModal_mobilePopup__RMlmv",body:"BonusDetailModal_body__2Dx_j",imageWrapper:"BonusDetailModal_imageWrapper__z2Nv_",bgImg:"BonusDetailModal_bgImg__YBbTU",bgImgM:"BonusDetailModal_bgImgM__CEAmL",img:"BonusDetailModal_img__xqlRm",imgM:"BonusDetailModal_imgM__P7j9e",gradient:"BonusDetailModal_gradient__daMJE",chips:"BonusDetailModal_chips__K0LKN",title:"BonusDetailModal_title__W0pYn",info:"BonusDetailModal_info__AaeMF",file:"BonusDetailModal_file__bgsKu",promocode:"BonusDetailModal_promocode__vGFCJ",leftShape:"BonusDetailModal_leftShape__rJkgZ",dots:"BonusDetailModal_dots__0RRq8",rightShape:"BonusDetailModal_rightShape__ZEWcA",code:"BonusDetailModal_code__4u0IF",codeButton:"BonusDetailModal_codeButton__7CeEk",copied:"BonusDetailModal_copied__iyOtr"}},31865:function(e,t,n){"use strict";n.d(t,{ErrorPageWidget:function(){return c}});var s=n(57437),a=n(35563),o=n(75461),i=n(54365);let r=(0,n(52074).g)("error-page-widget","sc"),l=Object.freeze({errorPageWidget:"".concat(r),wrapper:"".concat(r,"__wrapper"),main:"".concat(r,"__main"),picture:"".concat(r,"__picture"),img:"".concat(r,"__img"),text:"".concat(r,"__text"),button:"".concat(r,"__button"),buttonMobile:"".concat(r,"__button-mobile")}),c=e=>{let{variant:t="404",showcaseUrl:n="https://finuslugi.ru",minioUrl:r="https://assets.finuslugi.ru/mp-assets",className:c,isHomePage:d,title:_,subtitle:u,buttonText:p}=e,m="404"===t,g=d?"Обновить":"На Главную",h=()=>{d?window.location.reload():window.open("".concat(n,"/"),"_self")};return(0,s.jsx)("div",{className:(0,i.Z)(l.errorPageWidget,c),children:(0,s.jsx)(a.W2,{children:(0,s.jsxs)("div",{className:l.wrapper,children:[(0,s.jsxs)("div",{className:l.main,children:[(0,s.jsxs)("div",{className:l.text,children:[(0,s.jsx)("h1",{dangerouslySetInnerHTML:{__html:null!=_?_:m?"Страница не найдена":"Сервис временно<br>недоступен"}}),(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:null!=u?u:m?"Похоже, ссылка устарела или содержит ошибку":"Мы уже исправляем проблему  – попробуйте зайти через несколько минут или обновить страницу "}})]}),(0,s.jsx)(o.zx,{className:l.button,label:null!=p?p:g,onClick:h,size:"s"})]}),(0,s.jsxs)("picture",{className:l.picture,children:[(0,s.jsx)("source",{srcSet:"".concat(r,"/widgets/ErrorPageWidget/cat_error_d.png"),media:"(min-width: 1024px)",width:696,height:452}),(0,s.jsx)("source",{srcSet:"".concat(r,"/widgets/ErrorPageWidget/cat_error_m.png"),media:"(max-width: 1023px)",width:311,height:200}),(0,s.jsx)("img",{src:"".concat(r,"/widgets/ErrorPageWidget/cat_error_m.png"),alt:"Что-то не работает",className:l.img,loading:"eager"})]}),(0,s.jsx)(o.zx,{className:l.buttonMobile,label:null!=p?p:g,onClick:h,size:"s"})]})})})}}},function(e){e.O(0,[2209,3544,5501,207,6810,8281,6663,6559,3760,2971,2117,1744],function(){return e(e.s=68327)}),_N_E=e.O()}]);
//# sourceMappingURL=page-4e74ac9a084730ef.js.map