Joywork/complexes/js/898c705b85334a9a.js
2026-05-22 21:21:54 +03:00

2 lines
43 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self["webpackChunkcomplexes"]=self["webpackChunkcomplexes"]||[]).push([[498],{95498:function(e,t,o){o.r(t),o.d(t,{default:function(){return Pt}});o(44114);var a=o(56768),l=o(24232),s=o(90144),n=o(69689),r=o(81387),i=o(6192),u=o(54409),c=o(45130),d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAjElEQVR4nGNgQAL3w90V7kf6aODF4e4KDLjAowjvVQ/DfS7gwyA1uA0I8170KNz7OF4c5r1o1ADv0TAIo1cYPAzzPvEozHsvCIPZxBoAUvw4zHvPo3CftjsxgWIPvb0FH0R4lz2K8NrzJNwHZCheAxY/DfdueBLgLIwuBxIDyYHU4DTgfrw9B05JHGoAXsNDjKmJsW0AAAAASUVORK5CYII=",p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nGNgQAL3mhnk7zWxqePFzQzyDLjAvVaW/Q/bWP/jwyA1OA142Mayg5ABIDWjBrCMhkEbvcLgAYhuZbkHwmA2sQZANd5/2MY86Xk3g9j9fgaB+y3MjffbWO48ImTAgxaW9ffbmbsf9TIIocuBxEByIDU4Dbhfz8CBUxKHGgAbFU0VlxMDqwAAAABJRU5ErkJggg==",v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nGNgQAL2890V7Oe7aeDH7goMuIDTAo/9Tgvc/+PHHvtxGzDffafzAvf/+DBIzagB7qNhMJ9uYTAfRLvdB2Mwm1gDYBrnuU1xmu0kbrPURtBpgVuT80K3O84LPAgYsMBtg/MC9x7nhc7C6HIgMZAcSA1OA+zn23PglMShBgC09Sb7oPovSAAAAABJRU5ErkJggg==",m=o(82815),f=o(6017);const h={key:0,class:"flex flex-col items-center space-y-6 py-8 px-6 rounded-lg max-w-lg shadow-lg z-10 w-[300px] mb-5 sticky top-0 self-start p-[20px_30px_20px_30px] bg-white"},g={class:"relative w-full"},w={class:"chessTile flex flex-row w-full justify-start items-center relative"},y={style:{width:"25px"},class:"cell text-grey-900"},x={class:"row flex flex-row gap-x-2.5"},_={class:"cell text-grey-900 !w-max"},k={class:"flex"},A={class:"flex flex-col-reverse gap-y-2.5"},b=["set"],L={style:{width:"25px"},class:"cell text-grey-900"},C=["onClick"],E=["onClick"],R={style:{display:"flex","flex-direction":"column","justify-content":"space-between",height:"100%",width:"60px"}},F={style:{"text-wrap":"nowrap",overflow:"hidden","text-overflow":"ellipsis","max-width":"60px"},class:"cell__number col-start-1 row-start-2"},X={key:0,style:{display:"flex","flex-direction":"column","justify-content":"space-between",height:"100%",width:"140px"}},I={class:"flex",style:{gap:"2px"}},W={style:{display:"flex","font-size":"10px",gap:"2px"}},V={class:"cell__desc"},T={style:{"text-wrap":"nowrap",display:"flex"}},P={style:{"max-width":"100px",overflow:"hidden","text-overflow":"ellipsis","text-wrap":"nowrap"}},K={key:1,style:{display:"flex","flex-direction":"column","justify-content":"space-between",height:"100%",width:"16px",position:"relative"}},B={key:0,src:d,style:{position:"absolute",top:"-11px",right:"-4px"},alt:"",class:""},S={key:1,src:p,style:{position:"absolute",top:"-11px",right:"-4px"},alt:"",class:""},O={key:2,src:v,style:{position:"absolute",top:"-11px",right:"-4px"},alt:"",class:""},j={style:{width:"25px"},class:"cell text-grey-900"};var M={__name:"chessTile",props:{typeView:void 0|String,hiddenPrice:Boolean,openedApartment:Boolean,entrances:{type:Array,default:[]},showSmallView:Boolean},emits:["openWindow"],setup(e,{emit:t}){const o=e,n=t,r=((0,s.KR)({}),(0,s.KR)(null)),i=(0,s.KR)(),u=(0,s.KR)(null),d=(0,s.KR)(100),p=(0,s.KR)(null),v=(0,s.KR)(null),M=(0,s.KR)(null),D=(0,a.EW)((()=>o.entrances.reduce(((e,t)=>(t.floors.forEach((t=>{e.push(...t.rooms.map((e=>(e.euroPlan="european_layout"===e.layout_feature,e.studio="studio"===e.layout_feature,e.freePlane="available"===e.layout_feature,e.formatFile="pdf",e))))})),e)),[]))),Q=(0,a.EW)((()=>!o.entrances.every((e=>e.floors.every(((t,a)=>o.entrances[0].floors.length===e.floors.length&&o.entrances[0].floors[a]&&t.position==o.entrances[0].floors[a].position)))))),z=e=>{if(o.openedApartment.id&&o.openedApartment.id==e)return;const t=D.value.find((t=>t.id==e));t&&(t.inPdf=!t.inPdf)},H=(0,a.EW)((()=>{let e=0,t=0;return o.entrances.length?(o.entrances.forEach((o=>{const a=o.floors.map((e=>e.position)),l=Math.max(...a),s=Math.min(...a);s<t&&(t=s),l>e&&(e=l)})),Array(e-t+1).fill().map(((e,o)=>t+o)).filter((e=>0!==e))):[]})),$=e=>{const t=r.value,o=u.value;"chessTileTopScrollBar"===e?o.scrollLeft=t.scrollLeft:"chessTileScrollBar"===e&&(t.scrollLeft=o.scrollLeft)},U=()=>{i.value&&r.value&&u.value&&(i.value.style.width=`${u.value.scrollWidth}px`,r.value.style.width=`${u.value.clientWidth}px`)},Z=(e,t)=>{const o=e/100;t.style.zoom=o,v.value.style.zoom=o,M.value.style.zoom=o,U()},N=()=>{Z(d.value,p.value)};return(0,a.$u)((()=>{U()})),(0,a.sV)((()=>{f.A.$on("pdf-state-changed",z),console.log(d.value)})),(0,a.hi)((()=>{f.A.$off("pdf-state-changed",z)})),(t,f)=>{const D=(0,a.gN)("tooltip");return(0,a.uX)(),(0,a.CE)("div",{class:(0,l.C4)(["chessTile flex flex-col w-full justify-start items-center relative","grid"===e.typeView?"typeGrid":""])},["grid"===e.typeView||"tile"===e.typeView?((0,a.uX)(),(0,a.CE)("div",h,[(0,a.Lk)("div",g,[f[3]||(f[3]=(0,a.Lk)("div",{class:"absolute left-0 top-1/2 w-full h-2 bg-gray-300 rounded-full transform -translate-y-1/2"},null,-1)),(0,a.Lk)("div",{class:"absolute top-1/2 h-2 bg-[#4caf50] rounded-full transform -translate-y-1/2 transition-all duration-0",style:(0,l.Tr)({width:d.value-10+"%"})},null,4),(0,a.Lk)("div",{class:"absolute top-1/2 w-6 h-6 bg-[#4caf50] rounded-full shadow-md border-4 border-white transform -translate-x-1/2 -translate-y-1/2 transition-transform duration-0",style:(0,l.Tr)({left:d.value-10+"%"})},null,4),(0,a.bo)((0,a.Lk)("input",{type:"range","onUpdate:modelValue":f[0]||(f[0]=e=>d.value=e),onInput:N,min:"10",max:"100",step:"1",class:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"},null,544),[[c.Jo,d.value,void 0,{number:!0}]])])])):(0,a.Q3)("",!0),(0,a.Lk)("div",w,[f[4]||(f[4]=(0,a.Lk)("div",{class:"labelLeft h-full flex justify-center items-center"},[(0,a.Lk)("div",{class:"text -rotate-90 text-grey-900"},"ЭТАЖИ")],-1)),Q.value?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",{key:0,ref_key:"floorListLeft",ref:v,class:"chessTile__left mx-5 flex flex-col-reverse gap-y-2.5"},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(H.value,(e=>((0,a.uX)(),(0,a.CE)("div",{class:"row",key:`floor${e}`},[(0,a.Lk)("div",y,(0,l.v_)(Number(e)),1)])))),128))],512)),(0,a.Lk)("div",{class:"chessTile__main w-full flex flex-col justify-start items-start gap-x-12.5 overflow-x-scroll chessTileScrollBar",ref_key:"container",ref:u,onScroll:f[2]||(f[2]=e=>$("chessTileScrollBar"))},["grid"===e.typeView?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"chessTileTopScrollBar overflow-x-scroll absolute -top-8",ref_key:"chessTileTopScrollBar",ref:r,onScroll:f[1]||(f[1]=e=>$("chessTileTopScrollBar"))},[(0,a.Lk)("div",{class:"topScrollBar",ref_key:"topScrollBar",ref:i},null,512)],544)):(0,a.Q3)("",!0),(0,a.Lk)("div",{class:"chessTile__section flex flex-row w-max h-max",ref_key:"zoomContainer",ref:p},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.entrances,(r=>((0,a.uX)(),(0,a.CE)("div",{class:"chessTile__section flex flex-col gap-y-2.5 w-max",key:r.id},[(0,a.Lk)("div",x,[(0,a.Lk)("div",_,(0,l.v_)(r.name),1)]),(0,a.Lk)("div",k,[(0,a.Lk)("div",A,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(H.value,(i=>((0,a.uX)(),(0,a.CE)("div",{class:"row flex flex-row gap-x-2.5 w-100 !justify-start",set:t.floor=r.floors.find((e=>e.position==i)),key:i},[t.floor&&Q.value?((0,a.uX)(),(0,a.CE)("div",{class:"row flex-row-reverse",key:`floor${i}`},[(0,a.Lk)("div",L,(0,l.v_)(Number(i)),1)])):(0,a.Q3)("",!0),"tile"===o.typeView&&t.floor?((0,a.uX)(),(0,a.CE)("div",{key:1,class:"row flex flex-row gap-x-2.5 w-100",style:(0,l.Tr)([t.floor&&"right"==t.floor.alignment?"justify-content: end;":"justify-content: start;",{width:"100%"}])},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(t.floor.rooms,((e,t)=>((0,a.uX)(),(0,a.CE)("div",{key:`floor${i}apartament${t}`,class:"cell text-white rounded cursor-pointer",style:(0,l.Tr)({opacity:e.visible?1:.1,"background-color":`${e.complex_status_info?.status_color}`}),onClick:t=>n("openWindow",e)},(0,l.v_)("studio"===e.layout_feature?"ст":e.rooms_count),13,C)))),128))],4)):"grid"===o.typeView&&t.floor?((0,a.uX)(!0),(0,a.CE)(a.FK,{key:2},(0,a.pI)(t.floor.rooms,((t,o)=>(0,a.bo)(((0,a.uX)(),(0,a.CE)("div",{style:(0,l.Tr)([{display:"flex !important","justify-content":"start"},`opacity: ${t.visible?1:.1}; width: ${e.showSmallView?50:225}px`]),class:(0,l.C4)(["cell cell--grid grid grid-cols-[30px_1fr] gap-y-1 gap-x-1 grid-rows-2","border border-grey-400 rounded padding-not-right w-max cursor-pointer"]),key:`floor${i}apartament${o}`,onClick:e=>n("openWindow",t)},[(0,a.Lk)("div",R,[(0,a.Lk)("div",{class:(0,l.C4)(["cell__countRoom min-w-6 min-h-6 rounded-3xl","flex justify-center items-center text-white"]),style:(0,l.Tr)({"background-color":t.complex_status_info?.status_color})},(0,l.v_)("studio"!==t.layout_feature?t.rooms_count+" к":"cт"),5),(0,a.Lk)("div",F,"№ "+(0,l.v_)(t.number),1)]),e.showSmallView?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",X,[(0,a.Lk)("div",I,[(0,a.Lk)("div",{style:{"max-width":"102px",overflow:"hidden","text-overflow":"ellipsis","text-wrap":"nowrap"},class:(0,l.C4)(["cell__price",e.hiddenPrice?"hidden":""])},(0,l.v_)((0,s.R1)(m.ZV)(t.total_amount)),3),(0,a.Lk)("div",{class:(0,l.C4)(["cell__price",e.hiddenPrice?"hidden":""])}," руб. ",2)]),(0,a.Lk)("div",W,[(0,a.Lk)("span",{style:{display:"block","max-width":"56px",overflow:"hidden","text-overflow":"ellipsis","text-wrap":"nowrap"},class:(0,l.C4)(e.hiddenPrice?"hidden":"")},(0,l.v_)((0,s.R1)(m.ZV)(((t.total_amount||0)/(t.area||0)).toFixed(2))),3),(0,a.Lk)("span",{style:{"text-wrap":"nowrap"},class:(0,l.C4)(e.hiddenPrice?"hidden":"")}," руб./м2",2)]),(0,a.Lk)("div",V,[(0,a.Lk)("div",T,[(0,a.Lk)("div",P,(0,l.v_)(t.area+" м2"),1)])])])),e.showSmallView?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",K,[(0,s.R1)(m.tX)(t)?(0,a.bo)(((0,a.uX)(),(0,a.CE)("img",B,null,512)),[[D,{value:(0,s.R1)(m.Iw)(t),escape:!0,hideDelay:1e3,pt:{text:{class:["!border !border-red !bg-white !text-black !h-auto !whitespace-normal !w-max"," !p-2.5 !break-normal"]},arrow:{class:["!border-t-red"]}}},void 0,{top:!0}]]):(0,a.Q3)("",!0),(0,s.R1)(m.i9)(t)?(0,a.bo)(((0,a.uX)(),(0,a.CE)("img",S,null,512)),[[D,{value:(0,s.R1)(m.Iw)(t),escape:!0,hideDelay:1e3,pt:{text:{class:["!border !border-orange !bg-white !text-black !h-auto !whitespace-normal !w-max"," !p-2.5 !break-normal"]},arrow:{class:["!border-t-orange"]}}},void 0,{top:!0}]]):(0,a.Q3)("",!0),(0,s.R1)(m.No)(t)?(0,a.bo)(((0,a.uX)(),(0,a.CE)("img",O,null,512)),[[D,{value:(0,s.R1)(m.Iw)(t),escape:!0,hideDelay:1e3,pt:{text:{class:["!border !border-green !bg-white !text-black !h-auto !whitespace-normal !w-max"," !p-2.5 !break-normal"]},arrow:{class:["!border-t-green"]}}},void 0,{top:!0}]]):(0,a.Q3)("",!0)]))],12,E)),[[D,{value:`\n <div class='cell__countRoom w-[24px] h-[24px] rounded-3xl bg-green flex justify-center items-center text-white text-center'>${t.rooms_count}к</div>\n <div class='cell__number text-black text-xs col-start-1 row-start-2'>№${t.number}</div>\n <div class='cell__price text-base text-black col-start-2 row-start-1 h-max'>\n ${(0,s.R1)(m.ZV)(t.total_amount)} руб.\n </div>\n <div class='cell__desc text-xs text-black row-start-2 col-start-2'>\n ${t.area} м2\n <span class='text-grey-900'>- ${(0,s.R1)(m.ZV)(((t.total_amount||0)/(t.area||0)).toFixed(2))} руб./м2</span\n >\n </div>`,escape:!0,disabled:!e.hiddenPrice,hideDelay:100,pt:{text:{class:["!border !border-green !bg-white !color-black !h-auto !whitespace-normal !w-max","!grid !grid-cols-[30px,_1fr] !gap-y-1 !gap-x-4 !grid-rows-2 !p-2.5 !break-normal"]},arrow:{class:["!border-t-green"]}}},void 0,{top:!0}]]))),128)):(0,a.Q3)("",!0)],8,b)))),128))])])])))),128))],512)],544),Q.value?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",{key:1,ref_key:"floorListRight",ref:M,class:"chessTile__right mx-5 flex flex-col-reverse gap-y-2.5"},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(H.value,(e=>((0,a.uX)(),(0,a.CE)("div",{class:"row",key:`floor${e}`},[(0,a.Lk)("div",j,(0,l.v_)(Number(e)),1)])))),128))],512)),f[5]||(f[5]=(0,a.Lk)("div",{class:"labelRight h-full flex justify-center items-center"},[(0,a.Lk)("div",{class:"text rotate-90 text-grey-900"},"ЭТАЖИ")],-1))])],2)}}},D=o(71241);const Q=(0,D.A)(M,[["__scopeId","data-v-3c2ce427"]]);var z=Q;const H={class:"chessLayoutsCart chessLayouts__item rounded-md border border-grey-400 p-5",style:{"justify-content":"space-between"}},$={class:"chessLayoutsCart__found"},U={class:"chessLayoutsCart__countRoom"},Z={class:"chessLayoutsCart__text"},N=["src","alt"],Y={style:{display:"flex","flex-direction":"column"}},q={class:"chessLayoutsCart__price border-r border-grey-400 grow"},G={class:"mainPrice font-bold mb-2"},J={class:"desc text-xs"},ee={class:"text-grey-900"},te={class:"chessLayoutsCart__floor flex flex-col ml-5 py-1 xl:ml-2"},oe={class:"floor text-xs text-black mb-2.5"},ae={class:"numberRoom text-grey-900 text-xs"},le={class:"chessLayoutsCart__price border-r border-grey-400 grow"},se={class:"mainPrice font-bold mb-2"},ne={class:"mainPrice font-bold mb-2"},re={class:"desc text-xs"},ie={class:"text-grey-900"},ue={class:"chessLayoutsCart__floor flex flex-col ml-5 py-1 xl:ml-2"},ce={class:"floor text-xs text-black mb-2.5"},de={class:"numberRoom text-grey-900 text-xs"};var pe={__name:"chessLayoutsItem",props:["plan","isDetailsOpened"],emits:["openWindow"],setup(e,{emit:t}){const o=t,n=e,r=(0,s.KR)({}),i=(0,a.EW)((()=>n.plan.rooms.filter((e=>e.visible))));return(0,a.wB)(i,((e,t)=>{e.length!=t.length&&(r.value=e[0])})),(0,a.sV)((()=>{r.value.id||(r.value=i.value[0])})),(t,n)=>{const u=(0,a.g2)("Dropdown"),c=(0,a.g2)("MyButton");return(0,a.uX)(),(0,a.CE)("div",H,[(0,a.Lk)("div",null,[(0,a.Lk)("div",$,[(0,a.Lk)("div",U,(0,l.v_)(e.plan.rooms.length&&e.plan.rooms[0].rooms_count),1),(0,a.Lk)("div",Z,(0,l.v_)(e.plan.rooms.length)+" квартир найдено",1)]),(0,a.Lk)("div",{class:"chessLayoutsCart__image",onClick:n[0]||(n[0]=t=>o("openWindow",{...r.value,complex_name:e.plan.complex_name,house_name:e.plan.house_name}))},[n[4]||(n[4]=(0,a.Lk)("div",{class:"image__hover"},[(0,a.Lk)("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,a.Lk)("path",{d:"M72.8025 62.1975L60.3037 49.6975C58.0856 47.4794 54.5888 47.0231 51.8113 48.2762L49.3456 45.8106C52.8763 41.4994 55 35.9944 55 30C55 16.2144 43.7856 5 30 5C16.2144 5 5 16.2144 5 30C5 43.7856 16.2144 55 30 55C35.9944 55 41.4994 52.8763 45.8106 49.3456L48.2506 51.7856C47.7756 52.7806 47.5 53.865 47.5 55C47.5 57.0031 48.28 58.8869 49.6975 60.3025L62.1963 72.8025C63.6138 74.22 65.4969 75 67.5 75C69.5031 75 71.3869 74.22 72.8025 72.8037C74.22 71.3863 75 69.5031 75 67.5C75 65.4969 74.22 63.6131 72.8025 62.1975ZM30 50C18.9719 50 10 41.0281 10 30C10 18.9719 18.9719 10 30 10C41.0281 10 50 18.9719 50 30C50 41.0281 41.0281 50 30 50ZM69.2663 69.2675C68.3237 70.2125 66.6769 70.2125 65.7325 69.2675L53.2325 56.7675C53.2325 56.7675 53.2325 56.7675 53.2325 56.7662C52.76 56.295 52.5 55.6675 52.5 55C52.5 54.3325 52.76 53.705 53.2338 53.2325C53.705 52.76 54.3325 52.5 55 52.5C55.6675 52.5 56.295 52.76 56.7675 53.2325L69.2675 65.7338C69.74 66.205 70 66.8325 70 67.5C70 68.1675 69.74 68.795 69.2663 69.2675ZM40 30C40 31.3806 38.8806 32.5 37.5 32.5H32.5V37.5C32.5 38.8806 31.3806 40 30 40C28.6194 40 27.5 38.8806 27.5 37.5V32.5H22.5C21.1194 32.5 20 31.3806 20 30C20 28.6194 21.1194 27.5 22.5 27.5H27.5V22.5C27.5 21.1194 28.6194 20 30 20C31.3806 20 32.5 21.1194 32.5 22.5V27.5H37.5C38.8806 27.5 40 28.6194 40 30Z",fill:"#222222"})])],-1)),(0,a.Lk)("img",{src:e.plan.images[0].url,alt:e.plan.images[0].name},null,8,N)])]),(0,a.Lk)("div",Y,[(0,a.bF)(u,{class:"mb-2.5",options:i.value,modelValue:r.value,"onUpdate:modelValue":n[1]||(n[1]=e=>r.value=e),onChange:n[2]||(n[2]=t=>e.isDetailsOpened&&o("openWindow",{...t.value,complex_name:e.plan.complex_name,house_name:e.plan.house_name})),pt:{root:{class:["!h-max"]},input:{class:["!p-0 !flex !h-max"]},trigger:{class:["ml-2"]},item:{class:["!flex"]}}},(0,a.eX)({dropdownicon:(0,a.k6)((()=>[n[5]||(n[5]=(0,a.Lk)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,a.Lk)("path",{d:"M6.76693 8.7418L10.0003 11.9752L13.2336 8.7418C13.5586 8.4168 14.0836 8.4168 14.4086 8.7418C14.7336 9.0668 14.7336 9.59183 14.4086 9.91683L10.5836 13.7418C10.2586 14.0668 9.73362 14.0668 9.40862 13.7418L5.58359 9.91683C5.25859 9.59183 5.25859 9.0668 5.58359 8.7418C5.90859 8.42513 6.44193 8.4168 6.76693 8.7418Z",fill:"#666666"})],-1))])),option:(0,a.k6)((e=>[(0,a.Lk)("div",{class:"chessLayoutsCart__status",style:(0,l.Tr)("background-color:"+e.option.complex_status_info.status_color)},null,4),(0,a.Lk)("div",le,[(0,a.Lk)("div",se,(0,l.v_)(e.option.price),1),(0,a.Lk)("div",ne,(0,l.v_)((0,s.R1)(m.ZV)(e.option.total_amount))+" руб.",1),(0,a.Lk)("div",re,[(0,a.eW)((0,l.v_)(e.option.area)+" м2 ",1),(0,a.Lk)("span",ie,"- "+(0,l.v_)((0,s.R1)(m.ZV)(((e.option.total_amount||0)/(e.option.area||0)).toFixed(2)))+" руб./м2",1)])]),(0,a.Lk)("div",ue,[(0,a.Lk)("div",ce,(0,l.v_)(e.option.floor)+" этаж ",1),(0,a.Lk)("div",de," №"+(0,l.v_)(e.option.number),1)])])),_:2},[r.value?{name:"value",fn:(0,a.k6)((()=>[(0,a.Lk)("div",{class:"chessLayoutsCart__status",style:(0,l.Tr)("background-color:"+r.value.complex_status_info?.status_color)},null,4),(0,a.Lk)("div",q,[(0,a.Lk)("div",G,(0,l.v_)((0,s.R1)(m.ZV)(r.value.total_amount))+" руб.",1),(0,a.Lk)("div",J,[(0,a.eW)((0,l.v_)(r.value.area)+" м2 ",1),(0,a.Lk)("span",ee,"- "+(0,l.v_)((0,s.R1)(m.ZV)(((r.value.total_amount||0)/(r.value.area||0)).toFixed(2)))+" руб./м2",1)])]),(0,a.Lk)("div",te,[(0,a.Lk)("div",oe,(0,l.v_)(r.value.floor)+" этаж",1),(0,a.Lk)("div",ae,"№ "+(0,l.v_)(r.value.number),1)])])),key:"0"}:void 0]),1032,["options","modelValue"]),(0,a.bF)(c,{theme:"green",class:"!w-max !rounded-2xl mx-auto !px-5",onClick:n[3]||(n[3]=t=>o("openWindow",{...r.value,complex_name:e.plan.complex_name,house_name:e.plan.house_name}))},{default:(0,a.k6)((()=>n[6]||(n[6]=[(0,a.eW)("Подробнее")]))),_:1})])])}}};const ve=(0,D.A)(pe,[["__scopeId","data-v-5a267eaa"]]);var me=ve;const fe={class:"chessLayouts grid grid-cols-4 gap-[25px] xl:grid-cols-3 xl:gap-[20px]"};var he={__name:"chessLayouts",props:{plans:Array,complex_name:String,house_name:String,isDetailsOpened:Boolean},emits:["update:is-open-window"],setup(e,{emit:t}){const o=(0,r.lq)(),l=(0,a.EW)((()=>o.query?s.plans.filter((e=>e.rooms.some((e=>e.visible)))):s.plans)),s=e,n=t;return(t,o)=>((0,a.uX)(),(0,a.CE)("div",fe,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(l.value,(t=>((0,a.uX)(),(0,a.Wv)(me,{key:t.id,isDetailsOpened:e.isDetailsOpened,plan:{...t,complex_name:e.complex_name,house_name:e.house_name},onOpenWindow:o[0]||(o[0]=e=>n("update:is-open-window",e))},null,8,["isDetailsOpened","plan"])))),128))]))}};const ge=he;var we=ge,ye=o(11823),xe=o(48985),_e=o(60568),ke=o(69970),Ae=o(85646),be=o(70670),Le=o(43535),Ce=o(7083),Ee=o(14190),Re=o(85294),Fe=o(56325),Xe=o(37444),Ie=o(71272),We=o(57404),Ve=o(73844),Te=o(86505),Pe=o(38343),Ke=o(35782),Be=o(5274),Se=o(40478),Oe=o(17425),je=o(77739),Me=o(20856),De=o(93754);o(29094);function Qe(){const e=(0,s.KR)(null),t=(0,s.KR)(0),o=(0,s.KR)(null),l=(0,s.KR)(null),n=(0,s.KR)({floor:null,entrance:null,rooms:[],id:null}),r=(0,s.KR)({floor:null,entrance:null,rooms:[],id:null}),i=(0,s.KR)(!1),u=(0,s.KR)(null),c=(0,s.KR)(),d=(0,s.KR)(),p=(0,s.KR)();function v(a){a&&(l.value=a),o.value=l.value[t.value],e.value=new m(o.value.image,"map",(function(e){g(e)})),window.addEventListener("resize",(()=>{e.value&&e.value.resize()}))}function m(e,t,o){this.target=t,this.imageElement=new Image,this.imageElement.onload=()=>{this.onImageLoad(),o(this)},this.imageElement.src=e}function f(t){this.interaction=new je.A({features:e.value?e.value.features:new Ve.A})}function h(e){this.interaction=new Oe.A,e.addInteraction(this.interaction)}function g(e){y(),x(e),A()}function w(t,o){e.value.features.forEach((e=>{e.getId()==t&&e.set("rooms",o)}))}function y(){const t=o.value.figures;t.forEach((function(t){const o=new De.Ay([t.points]),a=new Me.A({geometry:o});a.setStyle(e.value.createStyle()),a.setId(t.id),a.set("entrance",t.entrance),a.set("floor",t.floor),a.set("rooms",t.rooms);try{e.value.sourceVector.addFeature(a)}catch(l){location.reload()}}))}function x(e){e.value&&(e.value.map.getViewport().addEventListener("mousemove",(function(e){e.preventDefault()})),e.value.map.getViewport().addEventListener("click",(function(e){e.preventDefault()})))}function _(t){const o=document.querySelector("#popup");"unset"!=o.style.left&&(o.style.left="unset");const a=t.getGeometry().getCoordinates()[0];let l=a[0];a.forEach((function(e){e[0]>l[0]&&e[1]>l[1]&&(l=e)})),e.value.overlay.setPosition(l),o.style.display="block"}function k(){return e.value.overlay.setPosition(void 0),e.value.selectFeature=null,!1}(0,a.wB)(o,(()=>{c.value=1===o.value.opacity?.99:o.value.opacity,p.value=new Te.Ay({fill:new Pe.A({color:e.value.hexToRgba(o.value.hover_color,1-c.value)}),stroke:new Ke.A({color:e.value.hexToRgba(o.value.hover_color),width:2}),image:new Be.A({radius:7,fill:new Pe.A({color:e.value.hexToRgba(o.value.hover_color)})})})})),(0,a.wB)(e,(e=>{d.value=new Te.Ay({fill:new Pe.A({color:e.hexToRgba("#adadad",.8)}),stroke:new Ke.A({color:e.hexToRgba("#adadad"),width:2}),image:new Be.A({radius:7,fill:new Pe.A({color:e.hexToRgba("#adadad")})})})})),m.prototype.onImageLoad=function(){this.createMap(this.imageElement,this.target)},m.prototype.createMap=function(t,o){this.imageLayer=this.createImageLayer(t);const a=document.getElementById(o),l=this.createView(t,a);this.vector=this.createVector(),this.map=new Ae.A({layers:[this.imageLayer,this.vector],overlays:[],controls:(0,Re.N)({zoom:!1,rotate:!1}),target:"map",view:l,pixelRatio:1,interactions:(0,Ee.N)({mouseWheelZoom:!1,dragPan:!1})}),this.addInteractionsToMap(this.map,this.vector),this.addEvents();const s=a.clientHeight,n=t.width,r=t.height,i=s/r*n;this.map.setSize([i,s]),u.value?(e.value.map.addOverlay(u.value),this.overlay=u.value):(this.overlay=this.createOverlay(document.getElementById("popup")),e.value.map.addOverlay(this.overlay),e.value.overlay.setPosition(void 0))},m.prototype.createImageLayer=function(e){const t=this.createImageStatic(e);return new Le.A({source:t})},m.prototype.createImageStatic=function(e){return new Fe.A({url:e.src,imageExtent:[0,0,e.width,e.height]})},m.prototype.createView=function(e,t){const o=this.createProjection(e),a=document.getElementById("map").clientHeight,l=e.naturalHeight/a;return new be.Ay({resolution:l,projection:o,center:(0,Xe.q1)([0,0,e.width,e.height]),zoom:0})},m.prototype.createProjection=function(e){return new Ce.A({code:"olimage",units:"pixels",extent:[0,0,e.width,e.height]})},m.prototype.createVector=function(){this.sourceVector=this.createSourceVector();const e=this.createStyle();return new Ie.A({source:this.sourceVector,style:e})},m.prototype.createSourceVector=function(){return this.features=new Ve.A,new We.A({features:this.features})},m.prototype.createStyle=function(){return new Te.Ay({fill:new Pe.A({color:this.hexToRgba(o.value.hover_color,.2)}),image:new Be.A({radius:7,fill:new Pe.A({color:this.hexToRgba(o.value.hover_color)})})})},m.prototype.createOverlay=function(e){return new Se.A({element:e,autoPan:{animation:{duration:0}}})},m.prototype.addInteractionsToMap=function(e,t){this.modify=new f(e),this.modify.setActive(!0)},m.prototype.addEvents=function(){const e=this;this.map.on("click",(function(e){let t;this.forEachFeatureAtPixel(e.pixel,(function(e){"Polygon"==e.getGeometry().getType()&&(t=e)})),t?(i.value&&(i.value=!1),r.value.id?(k(),r.value={floor:null,entrance:null,rooms:[],id:null}):(r.value={floor:t.get("floor"),entrance:t.get("entrance"),rooms:t.get("rooms"),id:t.getId()},_(t))):(k(),r.value={floor:null,entrance:null,rooms:[],id:null},i.value=!1)})),this.map.on("pointermove",(function(t){if(r.value.id)return;let o;this.forEachFeatureAtPixel(t.pixel,(function(e){"Polygon"==e.getGeometry().getType()&&(o=e)})),o=(0,s.ux)(o),o&&e.features.getArray().indexOf(o)>-1?(n.value={floor:o.get("floor"),entrance:o.get("entrance"),rooms:o.get("rooms"),id:o.getId()},e.hovered=!0,o.setStyle(o.get("rooms").filter((e=>e.visible)).length?p.value:d.value),e.removeStyleFromFeatures(o,e)):e.hovered&&(e.hovered=!1,e.removeStyleFromFeatures(null,e))}))},m.prototype.hexToRgba=function(e,t){if(!e)return;e=e.replace("#","");const o={r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16)};return t?(t=t>1?t/100:t,"rgba("+o.r+", "+o.g+", "+o.b+", "+t+")"):"rgba("+o.r+", "+o.g+", "+o.b+")"},m.prototype.removeStyleFromFeatures=function(e,t){this.sourceVector?.getFeatures().forEach((function(o){e?o.getId()!==e.getId()&&o.setStyle(t.createStyle()):o.setStyle(t.createStyle())}))},m.prototype.resize=function(){if(this.map){const e=this.imageElement,t=document.getElementById("map");if(t){const o=t.clientHeight,a=e.naturalHeight/o;this.map.getView().setResolution(a)}}},m.prototype.setColor=function(e,t){this.color=e,this.opacity=t||20;const o=this.vector.getStyle();o.getFill().setColor(this.hexToRgba(this.color,this.opacity))},f.prototype.setActive=function(e){},h.prototype.setActive=function(e){this.interaction.setActive(e)},h.prototype.clear=function(){this.interaction.getFeatures()};const A=()=>{e.value.setColor(o.value.hover_color,o.value.opacity)},b=a=>{"next"===a&&(t.value++,t.value===l.value.length&&(t.value=0),o.value=l.value[t.value]),"prev"===a&&(0===t.value?t.value=l.value.length-1:t.value--,o.value=l.value[t.value]),u.value=e.value.map.getOverlays().getArray().slice()[0],e.value.map.setTarget(null),e.value=null,v()};return{start:v,optionsFloor:n,changeFacade:b,currentFacade:o,openedFigure:r,openModal:i,closeOverlay:k,changeFeatureRooms:w}}const ze={id:"popup",class:"popup"},He={class:"popup__body"},$e={class:"popup__title"},Ue={key:0,class:"popup__listPartament"},Ze={class:"icon"},Ne={class:"text"},Ye={key:1};var qe={__name:"popupWindowViewFacade",props:{numberFloor:Number,nameEntrance:String,rooms:Array,floorData:[]},setup(e){const t=e,o=(0,a.EW)((()=>t.rooms.length?t.rooms.reduce(((e,t)=>{const{rooms_count:o}=t,{layout_feature:a}=t;return a&&"studio"==a?(e["studio"]||(e["studio"]=[]),e["studio"].push(t),e):(e[o]||(e[o]=[]),e[o].push(t),e)}),{}):[]));return(t,n)=>((0,a.uX)(),(0,a.Wv)(a.Im,{to:"body"},[(0,a.Lk)("div",ze,[(0,a.Lk)("div",He,[(0,a.Lk)("div",$e,"Подъезд "+(0,l.v_)(e.nameEntrance)+", Этаж "+(0,l.v_)(e.numberFloor),1),e.rooms.length?((0,a.uX)(),(0,a.CE)("div",Ue,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(o.value,((e,o)=>((0,a.uX)(),(0,a.CE)("div",{key:o,class:"partament",onClick:n[0]||(n[0]=e=>t.$emit("openDetails"))},[(0,a.Lk)("div",Ze,(0,l.v_)("studio"==e[0].layout_feature?"ст":e[0].rooms_count+" к"),1),(0,a.Lk)("div",Ne,(0,l.v_)(e.length)+" помещени"+(0,l.v_)(e.length>1?"й":"е")+", от "+(0,l.v_)((0,s.R1)(m.ZV)(Math.min(...e.map((e=>e.total_amount||0)))))+" ₽",1)])))),128))])):((0,a.uX)(),(0,a.CE)("span",Ye,"Нет свободных помещений"))])])]))}};const Ge=(0,D.A)(qe,[["__scopeId","data-v-5d3f812f"]]);var Je=Ge,et=o(49024);const tt={class:"modelWindow__content"},ot={class:"modelWindow__head"},at={class:"head-content"},lt={class:"modelWindow__info"},st={class:"modelWindow__image"},nt={class:"image"},rt=["src"],it={key:1,style:{width:"120px"},src:et,alt:"",class:""},ut={key:0,xmlns:"http://www.w3.org/2000/svg",width:"118px",height:"117px",viewBox:"0 0 1024 1024"},ct={key:1,width:"118",height:"117",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dt={style:{color:"#868A95","letter-spacing":".28px",width:"100%"}},pt={style:{color:"#222835"}},vt={style:{display:"flex","flex-direction":"column",width:"100%",gap:"20px"}},mt=["onClick"],ft={style:{display:"flex","align-items":"center",gap:"20px"}},ht={style:{width:"80px"}},gt=["src"],wt={key:1,style:{width:"60px"},src:et,alt:"",class:""},yt={style:{color:"#868A95"}},xt={style:{display:"flex","flex-direction":"column",gap:"8px"}},_t={style:{"text-align":"right","font-size":"14px"}},kt=["src"];var At={__name:"windowInfoForListAppartments",props:{isOpen:Boolean,figure:Object,availableFloors:Array,decorations:Array,windowsPlacements:Array,house_name:String,complex_name:String,filters:Object},emits:["update:isOpen","change-apartment-status","rooms:status:changed"],setup(e,{emit:t}){const o=e,n=t,{isOpen:r}=(0,s.QW)(o),i=(s.KR,HTMLElement,HTMLElement,(0,s.KR)(null)),u=(0,s.KR)(!1),d=(0,s.KR)(null),p=(0,a.EW)((()=>o.availableFloors.map((e=>({label:`${e.position} Этаж`,value:e.position})))));(0,a.wB)((()=>o.figure),(e=>{e&&e.floor&&(d.value=e.floor.position)}));const v=e=>{n("floor:changed",e.value)},h=()=>{"available"!=i.value.status_type&&(o.figure.rooms=o.figure.rooms.filter((e=>e.id!=i.value.id)),n("rooms:status:changed",i.value.id))};(0,a.sV)((()=>{f.A.$on("change-apartment-status",h)})),(0,a.hi)((()=>{f.A.$off("change-apartment-status",h)}));const g=(0,s.KR)({root:{class:["!border-0"]},input:{class:["!text-black"]}});return(t,o)=>{const f=(0,a.g2)("Dropdown");return(0,a.uX)(),(0,a.CE)(a.FK,null,[((0,a.uX)(),(0,a.Wv)(a.Im,{to:"body"},[i.value?((0,a.uX)(),(0,a.Wv)(ke.A,{key:0,isOpen:i.value,apartment:i.value,availableFloors:[e.figure.floor],"onUpdate:isOpen":o[0]||(o[0]=e=>i.value=null),decorations:e.decorations,windowsPlacements:e.windowsPlacements,house_name:e.house_name,complex_name:e.complex_name,filters:e.filters},null,8,["isOpen","apartment","availableFloors","decorations","windowsPlacements","house_name","complex_name","filters"])):(0,a.Q3)("",!0)])),(0,a.Lk)("div",{class:(0,l.C4)(["modelWindow",[(0,s.R1)(r)?"open":"",u.value?"openFull":""]]),ref:"window"},[(0,a.Lk)("div",tt,[(0,a.Lk)("div",ot,[(0,a.Lk)("div",at,[(0,a.Lk)("div",null,[(0,a.Lk)("p",null,(0,l.v_)(e.figure.complex_name),1),(0,a.Lk)("span",null,(0,l.v_)(e.figure.house_name),1)]),(0,a.bF)(f,{options:p.value,optionLabel:"label",optionValue:"value",modelValue:d.value,"onUpdate:modelValue":o[1]||(o[1]=e=>d.value=e),onChange:v,pt:g.value},null,8,["options","modelValue","pt"])]),(0,a.Lk)("button",{class:"modelWindow__close",onClick:o[2]||(o[2]=e=>(n("update:isOpen"),u.value=!1))},o[4]||(o[4]=[(0,a.Lk)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,a.Lk)("path",{d:"M22.8281 20L31.4141 11.4141C32.1953 10.6328 32.1953 9.36719 31.4141 8.58594C30.6328 7.80469 29.3672 7.80469 28.5859 8.58594L20 17.1719L11.4141 8.58594C10.6328 7.80469 9.36719 7.80469 8.58594 8.58594C7.80469 9.36719 7.80469 10.6328 8.58594 11.4141L17.1719 20L8.58594 28.5859C7.80469 29.3672 7.80469 30.6328 8.58594 31.4141C8.97656 31.8047 9.48828 32 10 32C10.5117 32 11.0234 31.8047 11.4141 31.4141L20 22.8281L28.5859 31.4141C28.9766 31.8047 29.4883 32 30 32C30.5117 32 31.0234 31.8047 31.4141 31.4141C32.1953 30.6328 32.1953 29.3672 31.4141 28.5859L22.8281 20Z",fill:"#757575"})],-1)]))]),(0,a.Lk)("div",lt,[(0,a.Lk)("div",st,[(0,a.Lk)("div",nt,[e.figure.floor?.plan_url?((0,a.uX)(),(0,a.CE)("img",{key:0,src:e.figure.floor?.plan_url,alt:"",class:""},null,8,rt)):((0,a.uX)(),(0,a.CE)("img",it))]),e.figure.floor?.plan_url?((0,a.uX)(),(0,a.CE)("div",{key:0,class:"image__loop",onClick:o[3]||(o[3]=e=>u.value=!u.value)},[u.value?((0,a.uX)(),(0,a.CE)("svg",ut,o[5]||(o[5]=[(0,a.Lk)("path",{fill:"#000000",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zM352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64z"},null,-1)]))):((0,a.uX)(),(0,a.CE)("svg",ct,o[6]||(o[6]=[(0,a.Lk)("path",{fill:"#000000",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z"},null,-1)])))])):(0,a.Q3)("",!0)]),(0,a.Lk)("span",dt,[o[7]||(o[7]=(0,a.eW)(" Найдно: ")),(0,a.Lk)("span",pt,(0,l.v_)(e.figure.rooms.length)+" помещений ",1)]),(0,a.Lk)("div",vt,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.figure.rooms,(t=>((0,a.uX)(),(0,a.CE)("div",{onClick:(0,c.D$)((o=>i.value={...t,house_name:e.figure.house_name,complex_name:e.figure.complex_name}),["stop"]),key:t.id,style:{display:"flex","justify-content":"space-between","align-items":"center","border-radius":"4px",border:"1px solid #CFD8E1",padding:"12px 16px",cursor:"pointer"}},[(0,a.Lk)("div",ft,[(0,a.Lk)("div",ht,[t.plan_url?((0,a.uX)(),(0,a.CE)("img",{key:0,style:{"max-width":"80px","max-height":"60px","object-fit":"contain"},src:t.plan_url,alt:""},null,8,gt)):((0,a.uX)(),(0,a.CE)("img",wt))]),(0,a.Lk)("div",null,[(0,a.Lk)("p",null,(0,l.v_)((0,s.R1)(m.ZV)(t.total_amount)),1),(0,a.Lk)("span",yt,(0,l.v_)((0,s.R1)(m.ZV)(((t.total_amount||0)/(t.area||0)).toFixed(2)))+" ₽./м2 ",1)])]),(0,a.Lk)("div",xt,[(0,a.Lk)("span",{style:(0,l.Tr)([{"min-width":"85px",padding:"0 10px",height:"28px",display:"flex","align-items":"center","justify-content":"center",color:"#fff","border-radius":"4px"},{"background-color":t?.complex_status_info.status_color}])},(0,l.v_)(t?.complex_status_info.status_name),5),(0,a.Lk)("p",_t,(0,l.v_)(t.floor)+" этаж ",1)])],8,mt)))),128))])])]),e.figure.floor?.plan_url?((0,a.uX)(),(0,a.CE)("div",{key:0,class:(0,l.C4)(["modelWindow__fullImage",u.value?"open":""])},[(0,a.Lk)("img",{src:e.figure.floor?.plan_url,alt:"",class:""},null,8,kt)],2)):(0,a.Q3)("",!0)],2)],64)}}};const bt=(0,D.A)(At,[["__scopeId","data-v-69e09310"]]);var Lt=bt,Ct=o(22093);const Et={class:"chessFacade"};var Rt={__name:"chessFacade",props:{viewType:String,house_name:String,complex_name:String,filters:Object,decorations:Array,windowsPlacements:Array},setup(e){const t=e,o=((0,s.KR)(),(0,r.lq)()),l=(0,s.KR)([]),{start:n,optionsFloor:i,changeFacade:u,openModal:c,openedFigure:d,currentFacade:p,closeOverlay:v,changeFeatureRooms:f}=Qe(),h=(0,a.EW)((()=>d.value.entrance?g(p.value?.figures.filter((e=>e.entrance&&e.entrance.id==d.value.entrance.id)).map((e=>e.floor))||[],"id"):[]));function g(e,t){let o=[...e];return o.filter(((e,a)=>!o.slice(a+1).some((o=>o[t]===e[t]))))}const w=e=>{const t=p.value.figures.find((t=>t.floor.position==e));y(t)},y=e=>{d.value=e,c.value=!0},x=()=>{c.value=!1,setTimeout((()=>{d.value={floor:null,entrance:null,rooms:[],id:null}}),350)},_=(0,a.EW)((()=>d.value?.rooms.filter((e=>e.visible))||[])),k=(0,a.EW)((()=>i.value?.rooms.filter((e=>e.visible))||[]));(0,a.wB)(t.filters,(()=>{l.value?.forEach((e=>{e.figures.forEach((e=>{e.rooms?.forEach((e=>(0,m.T)(e,t.filters)))}))}))}));const A=e=>{d.value.rooms=d.value.rooms.filter((t=>t.id!=e)),f(d.value.id,d.value.rooms)};return(0,a.sV)((()=>{Ct.A.getFacades(o.params.house_id,["rooms","floor","entrance"]).then((e=>{if(e.data&&Array.isArray(e.data)){const o=e.data;o.forEach((e=>{e.figures.forEach((e=>{e.rooms.forEach((e=>{e.visible=!0,(0,m.T)(e,t.filters)}))}))})),l.value=e.data,n(l.value)}}))})),(o,n)=>((0,a.uX)(),(0,a.CE)("div",Et,[l.value.length>1?((0,a.uX)(),(0,a.CE)("button",{key:0,class:"prev",onClick:n[0]||(n[0]=e=>(0,s.R1)(u)("prev"))},n[3]||(n[3]=[(0,a.Fv)('<svg xmlns="http://www.w3.org/2000/svg" width="40px" height="40px" viewBox="0 0 24 24" fill="none" data-v-330f6c87><g clip-path="url(#clip0_429_11254)" data-v-330f6c87><path d="M10 17L15 12" stroke="#515969" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-330f6c87></path><path d="M15 12L10 7" stroke="#515969" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-330f6c87></path></g><defs data-v-330f6c87><clipPath id="clip0_429_11254" data-v-330f6c87><rect width="24" height="24" fill="white" data-v-330f6c87></rect></clipPath></defs></svg>',1)]))):(0,a.Q3)("",!0),n[5]||(n[5]=(0,a.Lk)("div",{class:"map",id:"map"},null,-1)),l.value.length>1?((0,a.uX)(),(0,a.CE)("button",{key:1,class:"next",onClick:n[1]||(n[1]=e=>(0,s.R1)(u)("next"))},n[4]||(n[4]=[(0,a.Fv)('<svg xmlns="http://www.w3.org/2000/svg" width="40px" height="40px" viewBox="0 0 24 24" fill="none" data-v-330f6c87><g clip-path="url(#clip0_429_11254)" data-v-330f6c87><path d="M10 17L15 12" stroke="#515969" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-330f6c87></path><path d="M15 12L10 7" stroke="#515969" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-330f6c87></path></g><defs data-v-330f6c87><clipPath id="clip0_429_11254" data-v-330f6c87><rect width="24" height="24" fill="white" data-v-330f6c87></rect></clipPath></defs></svg>',1)]))):(0,a.Q3)("",!0),(0,a.bF)(Je,{"floor-data":[],"number-floor":Number((0,s.R1)(i).floor?.position),"name-entrance":(0,s.R1)(i).entrance?.name,rooms:k.value,onOpenDetails:n[2]||(n[2]=e=>{c.value=!0,(0,s.R1)(v)()})},null,8,["number-floor","name-entrance","rooms"]),((0,a.uX)(),(0,a.Wv)(a.Im,{to:"body"},[(0,a.bF)(Lt,{isOpen:(0,s.R1)(c),figure:{...(0,s.R1)(d),house_name:t.house_name,complex_name:t.complex_name,rooms:_.value},"onUpdate:isOpen":x,availableFloors:h.value,"onFloor:changed":w,decorations:e.decorations,windowsPlacements:e.windowsPlacements,"onRooms:status:changed":A,house_name:e.house_name,complex_name:e.complex_name,filters:e.filters},null,8,["isOpen","figure","availableFloors","decorations","windowsPlacements","house_name","complex_name","filters"])]))]))}};const Ft=(0,D.A)(Rt,[["__scopeId","data-v-330f6c87"]]);var Xt=Ft;const It={key:0,class:"loader-div"},Wt={class:"viewHome__body w-full h-full"};var Vt={__name:"ViewHome",setup(e){const t=(0,u.j)(),o=(0,a.EW)((()=>t.complex)),c=(0,a.EW)((()=>t.house)),d=(0,s.KR)(),p=(0,s.KR)(!1),v=(0,s.KR)(!1),h=(0,s.KR)("park"),g={rooms:[],selectedTypes:[],selectedDecorations:[],selectedPaymentTypes:[],selectedInstallments:[],customSelectedInstallments:[],initialPayment:"",paymentTerm:"",installmentPrice:{min:"",max:""},floor:{from:"",to:""},price:{min:"",max:""},square:{min:"",max:""},squareKitchen:{min:"",max:""},useSquarePrice:!1,hiddenPrice:!1,onlyFree:!1,view:{name:"Плитка",value:"tile",icon:"tile",visible:!0},adsTargets:[],adsStates:[],limit:{total:{min:"",max:""},area:{min:"",max:""},kitchen_area:{min:"",max:""},room_types:[],decoration_types:[],window_placements:[],payment_types:[]}},w=(0,s.KR)(!0),y=(0,s.KR)((0,m.JH)(g)),x=(0,s.KR)({}),_=(0,s.KR)({}),k=(0,s.KR)([]),A=(0,s.KR)([]),b=(0,r.lq)(),L=(0,r.rd)(),C=(0,i.K)(),E=(0,s.KR)(!1),R=()=>{const e=y.value.view,t=y.value.limit;Object.keys(g).forEach((o=>{y.value[o]="view"===o?e:"limit"===o?t:Array.isArray(g[o])?[]:"object"===typeof g[o]?{}:g[o]})),y.value.floor={from:"",to:""},y.value.price={min:"",max:""},y.value.square={min:"",max:""},y.value.squareKitchen={min:"",max:""},y.value.installmentPrice={min:"",max:""},F()},F=()=>{k.value.forEach((e=>{e.floors.forEach((e=>{e.rooms.forEach((e=>(0,m.T)(e,y.value)))}))})),A.value.forEach((e=>{e.rooms.forEach((e=>(0,m.T)(e,y.value)))}))};(0,a.wB)(y.value,(e=>{console.log("filters.value",e),F()}),{deep:!0});const X=(0,a.EW)((()=>{switch(y.value.view?.value){case"layouts":return I;default:return W}})),I=(0,a.EW)((()=>(A.value||[]).reduce(((e,t)=>e+t.rooms.reduce(((e,t)=>e+ +t.visible),0)),0))),W=(0,a.EW)((()=>(k.value||[]).reduce(((e,t)=>e+t.floors.reduce(((e,t)=>e+t.rooms.reduce(((e,t)=>e+ +t.visible),0)),0)),0))),V=async()=>{await Ct.A.getHouseEntrances(b.params.house_id,["rooms"]).then((e=>{const t=e.data.sort(((e,t)=>e.position>t.position?1:-1));t.forEach((e=>e.floors=e.floors.sort(((e,t)=>e.position>t.position?1:-1)))),t.forEach((e=>e.floors.forEach((e=>e.rooms.forEach((e=>{e.visible=!0})))))),k.value=t})).finally((()=>w.value=!1))},T=e=>{E.value=e};(0,a.sV)((async()=>{b.params.house_id&&(await V(),await Ct.A.getHousePlans(b.params.house_id).then((e=>{var t=e.data;if(t){const e=t.filter((e=>e.rooms.length));e.forEach((e=>{e.rooms.forEach((e=>{e.visible=!0}))})),A.value=e}})),await t.get_house(b.params.house_id,["rooms"]).then((e=>{e.data&&e.data.house&&!e.data.house.rooms_count&&L.push(`/my-objects/${b.params.id}/home/${b.params.house_id}`)})),await Ct.A.getFilterFields(b.params.house_id).then((({data:e})=>{x.value=e,y.value.limit=x.value}))),f.A.$on("clear-filters",R),f.A.$on("update-model",V)})),(0,a.hi)((()=>{f.A.$off("clear-filters",R),f.A.$off("update-model",V)}));const P=e=>{_.value=e,v.value=!0},K=()=>{v.value=!1,setTimeout((()=>{_.value={}}),350)},B=e=>{const t=S.value.floors.find((t=>t.position==e));P(t.rooms.find((e=>e.position==_.value.position)))},S=(0,a.EW)((()=>_.value?k.value.find((e=>e.id==_.value.entrance_id)):null)),O=(0,a.EW)((()=>_.value&&S.value?S.value.floors.filter((e=>e.rooms.find((e=>e.position==_.value.position)))):[]));return(e,t)=>((0,a.uX)(),(0,a.CE)("div",{class:(0,l.C4)(["viewHome flex flex-col w-full h-full min-h-full justify-start items-start",["facades"!==y.value.view?.value?"px-7.5 py-5":""]]),ref_key:"viewHome",ref:d},[((0,a.uX)(),(0,a.Wv)(a.Im,{to:"body"},[_.value?((0,a.uX)(),(0,a.Wv)(ke.A,{key:0,house:c.value,isOpen:v.value,apartment:_.value,availableFloors:O.value,"onUpdate:isOpen":K,"onFloor:changed":B,decorations:(0,s.R1)(C).decorations,windowsPlacements:(0,s.R1)(C).windowsPlacements,"onUpdate:isOpenWindow":P,"onFull:planStateUpdated":T,house_name:c.value?.name,complex_name:o.value?.name,filters:y.value},null,8,["house","isOpen","apartment","availableFloors","decorations","windowsPlacements","house_name","complex_name","filters"])):(0,a.Q3)("",!0)])),w.value?((0,a.uX)(),(0,a.CE)("div",It,t[2]||(t[2]=[(0,a.Lk)("img",{src:n},null,-1)]))):((0,a.uX)(),(0,a.CE)(a.FK,{key:1},[c.value?((0,a.uX)(),(0,a.Wv)(_e.A,{key:0,show_plans:!!A.value.filter((e=>e.rooms.some((e=>e.visible)))).length,show_floors:!!c.value.floors_plans_count_where_has_floor,show_facades:!!c.value.facades_count,"onUpdate:isOpenFiltersMenu":t[0]||(t[0]=e=>p.value=e),filters:y.value,filteredCount:X.value,"onUpdate:viewType":t[1]||(t[1]=e=>h.value=e),complex_status:(0,s.R1)(C).complex_status,"onUpdate:filters":F},null,8,["show_plans","show_floors","show_facades","filters","filteredCount","complex_status"])):(0,a.Q3)("",!0),(0,a.Lk)("div",Wt,["tile"===y.value.view?.value||"grid"===y.value.view?.value?((0,a.uX)(),(0,a.Wv)(z,{key:0,typeView:y.value.view?.value,entrances:k.value,"hidden-price":y.value.hiddenPrice,house_name:c.value?.name,complex_name:o.value?.name,onOpenWindow:P,openedApartment:_.value},null,8,["typeView","entrances","hidden-price","house_name","complex_name","openedApartment"])):(0,a.Q3)("",!0),"layouts"===y.value.view?.value?((0,a.uX)(),(0,a.Wv)(we,{key:1,"onUpdate:isOpenWindow":P,plans:A.value,house_name:c.value?.name,complex_name:o.value?.name,isDetailsOpened:v.value},null,8,["plans","house_name","complex_name","isDetailsOpened"])):(0,a.Q3)("",!0),"floors"!==y.value.view?.value||E.value?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.Wv)(ye.A,{key:2,"onUpdate:isOpenWindow":P,house_name:c.value?.name,complex_name:o.value?.name,filters:y.value},null,8,["house_name","complex_name","filters"])),"facades"===y.value.view?.value?((0,a.uX)(),(0,a.Wv)(Xt,{key:3,"view-type":h.value,house_name:c.value?.name,complex_name:o.value?.name,filters:y.value,decorations:(0,s.R1)(C).decorations,windowsPlacements:(0,s.R1)(C).windowsPlacements},null,8,["view-type","house_name","complex_name","filters","decorations","windowsPlacements"])):(0,a.Q3)("",!0),"list"===y.value.view?.value?((0,a.uX)(),(0,a.Wv)(xe.A,{key:4,"onUpdate:isOpenWindow":P,entrances:k.value,decorations:(0,s.R1)(C).decorations,windowsPlacements:(0,s.R1)(C).windowsPlacements,openedApartment:_.value},null,8,["entrances","decorations","windowsPlacements","openedApartment"])):(0,a.Q3)("",!0)])],64))],2))}};const Tt=(0,D.A)(Vt,[["__scopeId","data-v-3dce1bd2"]]);var Pt=Tt},49024:function(e,t,o){e.exports=o.p+"img/gallery.62e324fd.svg"}}]);
//# sourceMappingURL=898c705b85334a9a.js.map