(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[804],{9133:function(e,t,c){Promise.resolve().then(c.bind(c,9006)),Promise.resolve().then(c.bind(c,9994)),Promise.resolve().then(c.bind(c,2254)),Promise.resolve().then(c.bind(c,8083)),Promise.resolve().then(c.bind(c,965)),Promise.resolve().then(c.bind(c,2217))},2254:function(e,t,c){"use strict";c.r(t),c.d(t,{default:function(){return w}});var n=c(7437);let r={"sc-currency.catalog.title":"Покупка и продажа валюты","sc-currency.catalog.order-type.text":"Ищу обменный пункт, хочу","sc-currency.catalog.table.aria-label":"Отделения банков и курс валют","sc-currency.catalog.table.more-button.label":"Подробнее","sc-currency.catalog.table.shaw-all-button.label":"Все отделения","sc-currency.catalog.table.column.organization":"Организация","sc-currency.catalog.table.column.address":"Адрес","sc-currency.catalog.table.column.servicePointsAmount":"Отделений","sc-currency.catalog.table.column.currency-rate-and-sum.sell":"Курс продажи и сумма","sc-currency.catalog.table.column.currency-rate-and-sum.buy":"Курс покупки и сумма","sc-currency.catalog.table.column.currency-rate.sell":"Курс продажи","sc-currency.catalog.table.column.currency-rate.buy":"Курс покупки","sc-currency.catalog.table.column.sum":"Сумма","sc-currency.catalog.table.column.more":"Подробности","sc-currency.catalog.table.map-link.text":"На карте","sc-currency.catalog.table.more-offices-button.label":"Показать больше","sc-currency.catalog.initial-search.text":"Пожалуйста, уточните параметры поиска","sc-currency.catalog.empty-search.title":"К сожалению, мы ничего не нашли","sc-currency.catalog.empty-search.text":"На карте проще найти нужную организацию — она показывает все ближайшие адреса","sc-currency.catalog.empty-search.button.label":"Найти на карте","sc-currency.detail.map-button.label":"Показать на карте","sc-currency.detail.schedule-button.label":"Режим работы","sc-currency.detail.sell.text":"Курс продажи","sc-currency.detail.buy.text":"Курс покупки","sc-currency.detail.sum.text":"Итоговая сумма","sc-currency.detail.schedule.text":"Режим работы","sc-currency.detail.service-for-individuals.text":"Обслуживание физических лиц: ","sc-currency.detail.address.text":"Адрес","sc-currency.detail.phone.text":"Телефон","sc-currency.detail.bank-url.text":"Сайт банка","sc-currency.detail.bank-url.button":"Зарезервировать сумму","sc-currency.filter.city.label":"Город","sc-currency.filter.metro.label":"Станция метро","sc-currency.filter.currency.label":"Валюта","sc-currency.filter.amount.label":"Сумма","sc-currency.filter.checkbox.new-usd":"Есть \xabновые\xbb доллары","sc-currency.new-usd-tooltip":"\xabНовыми\xbb долларами (долларами нового образца) называют купюры, выпущенные после 2013 года","sc-currency.filter.checkbox.zero-fee":"0% комиссия","sc-currency.filter.button.show-on-map":"Показать на карте","sc-currency.filter.button.show-as-list":"Показать списком","sc-currency.orderType.buy":"Купить","sc-currency.orderType.sell":"Продать","sc-currency.common.breadcrumbs.path.main.mobile":"Назад","sc-currency.common.breadcrumbs.path.main.desktop":"Главная","sc-currency.faq.title":"Частые вопросы","sc-currency.faq.link":"Читать все вопросы"};var a=c(467);let o=(0,c(9809).SJ)("NEXT_PUBLIC_PL_LK_API_URL"),u={async fetchSiteLocale(){try{let e=await (0,a.Z)("/api/v1/content/site-locales/lk_investments",{baseURL:o});return{...r,...e}}catch(e){return console.warn("Failed to load remote localization file",e),r}},async fetchFaq(e,t){var c;let n=(await (0,a.Z)("/api/v1/content/site-configs",{baseURL:o,query:{slug:"showcase-investment-currency"}}))[0].options;if(!n)return[];let{faq:r}=n;return[...(null!==(c=n["faq-".concat(t)])&&void 0!==c?c:[]).map(t=>({question:t.question.replaceAll("CityCaseName",e.caseName),answer:t.answer.replaceAll("CityCaseName",e.caseName)})),...r]}};var l=c(296),i=c(4396),s=c(2833),y=c(1810),d=c(982),m=c(2265),f=c(6094),b=c(3167),h=c(8980),p=c.n(h),v=c(9788),_=c.n(v),x=c(7704),g=c.n(x);function w(e){let{items:t}=e,c=(0,d.useTranslations)(),[r,a]=(0,m.useState)(t),o=(0,m.useMemo)(()=>r.map(e=>{let{question:t}=e;return t}),[r]),{cities:h}=(0,m.useContext)(l.ne),[v,x]=(0,i.g1)();return(0,m.useEffect)(()=>{let e=h.find(e=>{let{englishName:t}=e;return p()(t)===v});u.fetchFaq(e,_()(x)).then(a)},[v,x,h]),(0,n.jsxs)(s.W2,{className:(0,b.Z)(g().container,g().column),children:[(0,n.jsx)(s.X6,{type:"h2",className:g().title,children:c("sc-currency.faq.title")}),(0,n.jsxs)(s.Zb,{className:(0,b.Z)(g().column,g().accordionContainer),variant:"secondary",children:[(0,n.jsx)(y.Accordion,{className:g().accordion,activeIndex:o,multiple:!0,children:r.map(e=>(0,n.jsx)(y.AccordionItem,{id:e.question,className:g().accordionItem,title:e.question,children:(0,n.jsx)("p",{className:g().answer,children:e.answer})},e.question))}),(0,n.jsxs)(y.Link,{className:g().link,href:"https://finuslugi.ru/help",children:[c("sc-currency.faq.link"),(0,n.jsx)(f.IconFdsArrowUpRightSmallO,{className:g().linkIcon})]})]})]})}},296:function(e,t,c){"use strict";c.d(t,{Er:function(){return a.E},GL:function(){return n.CatalogContext},fo:function(){return r.FilterContext},ne:function(){return o.ServiceDataContext}});var n=c(8083);c(1883);var r=c(965),a=c(4655),o=c(2217)},4396:function(e,t,c){"use strict";c.d(t,{$:function(){return s},J8:function(){return u},lY:function(){return x},Yg:function(){return h},_G:function(){return m},g1:function(){return p},D9:function(){return v.usePrevious},MG:function(){return g},y3:function(){return b}});var n=c(8278),r=c.n(n),a=c(7907),o=c(2265);function u(){let e=(0,a.useParams)(),t=(0,a.usePathname)();return(0,o.useCallback)(c=>{let{prefix:n,element:a,name:o,index:u}=c,l=t.split("/").filter(e=>e).map(t=>{var c;return null!==(c=Object.keys(e).find(c=>e[c]===t))&&void 0!==c?c:t});l.unshift("currency");let i=l.join("-"),s=r()(o),y=void 0!==u?"-".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}(u)):"";return"".concat(n?"".concat(n,"-"):"").concat(i,"-").concat(a,"-").concat(s).concat(y)},[e,t])}var l=c(296),i=c(3669);function s(){let[{currency:e,amountCurrency:t},c]=(0,o.useContext)(l.fo),{cities:n,updateCityList:r}=(0,o.useContext)(l.ne);function a(e){n.find(t=>{let{name:c}=t;return e===c})&&c({city:e,metro:void 0})}function u(e){c({metro:e})}let s=(0,o.useCallback)(n=>{r(n),c({currency:n,amountCurrency:e===t?n:t,currencyPair:[n,i.K5.code],newUsd:!1})},[r,c,e,t]);function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;c({amount:e})}function d(e){c({amountCurrency:e,amount:e===i.K5.code?i.EE:l.Er.amount})}function m(e){c({orderType:e})}function f(e){c({newUsd:e})}function b(e){c({zeroFee:e})}return(0,o.useMemo)(()=>({handleCityChange:a,handleMetroChange:u,handleCurrencyChange:s,handleAmountChange:y,handleAmountCurrencyChange:d,handleOrderTypeChange:m,handleNewUsdChange:f,handleZeroFeeChange:b}),[s])}var y=c(982),d=c(7764);function m(){let e=(0,y.useTranslations)();return[{id:d.mr.Buy,label:e("sc-currency.orderType.buy")},{id:d.mr.Sell,label:e("sc-currency.orderType.sell")}]}c(6962);var f=c(8701);function b(){let[{currency:e}]=(0,o.useContext)(l.fo),[,t]=(0,o.useContext)(l.GL);return{handleServicePointSelect:async function(c){t({selectedServicePoint:c});try{let n=await f.t.fetchServicePointDetails(c.id,e);return t({selectedServicePointDetails:n}),Promise.resolve()}catch(e){return t({selectedServicePointDetails:void 0}),Promise.reject(e)}}}}function h(){let e=(0,a.usePathname)();return t=>{let c=window.location.pathname.replace(e,"");window.history.replaceState({},"","".concat(c,"/").concat(t))}}function p(){let[,...e]=(0,a.usePathname)().split("/");return e}var v=c(9389),_=c(9809);function x(e){let[{amount:t,amountCurrency:c,currencyPair:n}]=(0,o.useContext)(l.fo),r=n.find(e=>e!==c);return"RUB"===c?(0,_.ik)(Math.floor(t/e),{currencyCode:r}):(0,_.ik)(t*e,{currencyCode:r})}function g(e){let[{amount:t,currency:c,amountCurrency:n,orderType:r}]=(0,o.useContext)(l.fo),a=r===d.mr.Buy?"buyPrice":"sellPrice";return e?(Array.isArray(e)?e.reduce((e,r)=>{let o=c===n?t:t/r[a];return o>=e.amountLowerLimit&&o>=r.amountLowerLimit?r:e},e[0]):e)[a]:0}},7704:function(e){e.exports={container:"Faq_container__W8u45",column:"Faq_column__Ir_rj",title:"Faq_title__eYyST",accordionContainer:"Faq_accordionContainer__dZttJ",accordion:"Faq_accordion__n22T0",accordionItem:"Faq_accordionItem__i7Ubh",answer:"Faq_answer__gNBvL",link:"Faq_link__jtMi0",linkIcon:"Faq_linkIcon__aftya"}}},function(e){e.O(0,[158,207,111,711,854,611,971,69,744],function(){return e(e.s=9133)}),_N_E=e.O()}]);