Joywork/complexes/js/74a0191d4c2d6889.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2026-05-22 20:21:54 +02:00
"use strict";(self["webpackChunkcomplexes"]=self["webpackChunkcomplexes"]||[]).push([[815],{6192:function(e,a,t){t.d(a,{K:function(){return o}});t(44114);var s=t(55234),d=t(90144),r=t(56768),n=t(22093),i=t(81387);const o=(0,s.nY)("fields",(()=>{const e=(0,i.lq)(),a=(0,d.Kh)([]),t=(0,d.Kh)([]),s=(0,d.Kh)([]),o=(0,d.Kh)([]),l=(0,d.Kh)([]),_=(0,d.Kh)([]),c=(0,d.Kh)([]),u=(0,d.Kh)([]),m=(0,d.Kh)([]),p=(0,d.Kh)({region_id:null,region_id_user:null,kladr:null,label:null}),f=(0,d.Kh)({regions:[],regions_list:{}}),y=[],g=(0,d.Kh)({list:[],options:[]}),v=(0,d.KR)([]),h=()=>{n.A.getComplexStatus().then((e=>{e.data&&y.push(...e.data)}))},x=()=>{n.A.getDecorations().then((e=>{a.splice(0),a.push(...e.data)}))},b=async(e=null,a=null)=>{try{let t;v.value=[],t=e?await n.A.getInstallmentProgramsByHouseId(e):a?await n.A.getInstallmentProgramsByComplexId(a):await n.A.getInstallments(),t?.data&&v.value.push(...t.data)}catch(t){console.error("Ошибка загрузки программ рассрочек:",t)}},k=e=>n.A.getComplexSuggestions(e).then((e=>{o.push(...e.data)}));(0,r.sV)((()=>{n.A.getDecorations().then((e=>{a.push(...e.data)})),n.A.getPaymentTypes().then((e=>{t.push(...e.data)})),n.A.getComplexTypes().then((e=>{s.push(...e.data)})),n.A.getCountry().then((e=>{l.push(...e.data.country)})),n.A.getRFRegions().then((e=>{const a=e.data.regions.find((a=>a.code==e.data.region_id_user));a&&m.push(...a.rayons),n.A.getMetro(e.data.region_id_user).then((e=>{_.push(...e.data)})),p.region_id=parseInt(e.data.region_id_user),p.region_id_user=parseInt(e.data.region_id_user),f.regions.push(...e.data.regions),f.regions_list=e.data.regions_list,p.kladr=f.regions_list[p.region_id].kladr,p.label=f.regions_list[p.region_id].label})),n.A.getWindowsPlacements().then((e=>{c.push(...e.data)})),n.A.getBuilders().then((e=>{g.list=e.data.list,g.options.push(...e.data.options)})),k(!e.meta.isViewPage),h()}));const I=e=>{p.region_id=e,n.A.getMetro(p.region_id).then((e=>{_.splice(0)}))},S=e=>{n.A.getMetro(e).then((e=>{_.splice(0),_.push(...e.data)}))};return(0,r.wB)((()=>e.meta.isViewPage),((e,a)=>{e!==a&&k(!e)}),{deep:!0}),{decorations:a,paymentTypes:t,complexes_types:s,countries:l,rf_regions:u,rayons:m,metros:_,currentRegionInfo:p,regionsInfo:f,windowsPlacements:c,complex_suggestions:o,changeRegionInfoRegionId:I,metroListChanged:S,builders:g,complex_status:y,refetchDecorationsList:x,installmentPrograms:v,fetchInstallmentPrograms:b}}))},82815:function(e,a,t){t.d(a,{Fx:function(){return g},GV:function(){return i},HS:function(){return h},Ih:function(){return I},Im:function(){return d},Iw:function(){return w},JH:function(){return q},No:function(){return S},QB:function(){return N},T:function(){return l},Yq:function(){return C},ZV:function(){return T},eD:function(){return F},eS:function(){return r},fJ:function(){return P},i9:function(){return k},iW:function(){return A},lO:function(){return x},pi:function(){return v},qW:function(){return K},tX:function(){return b},yI:function(){return n},z2:function(){return D}});t(44114),t(14603),t(47566),t(98721);var s=t(6192);function d(e){return"object"===typeof e?"{}"===JSON.stringify(e)||"[]"===JSON.stringify(e)||!e:"string"===typeof e?!e.trim():"undefined"===typeof e}const r={none_of_the_above:"Ничего из перечисленного",studio:"Студия",european_layout:"Европланировка",available:"Свободная"},n={apartment:"Квартира",apartments:"Апартаменты",parking_space:"Машиноместо",office:"Офис",storage_room:"Кладовка",warehouse:"Склад",retail_space:"Торговое Помещение",commercial_space:"Помещение свободного назначения",townhouse:"Таунхаус",villa:"Вилла",penthouse:"Пентхаус",duplex:"Дуплекс",cottage:"Коттедж"},i=["apartment","apartments","retail_space","commercial_space","townhouse","villa","penthouse","duplex","cottage"],o=(e,a)=>{const t=parseFloat(e.installment_price||0),s=parseFloat(a.initial_payment||0)/100*t,d=t-s,r=parseFloat(a.interest_rate||0)/100,n=d*(1
//# sourceMappingURL=74a0191d4c2d6889.js.map