1import{u as e}from"./CdGGuMmz.js";import{$ as t,B as n,Bt as r,L as i,N as a,W as o,Wt as s,Z as c,d as l,et as u,f as d,ft as f,m as p,p as m,r as h,st as g,u as _,v,x as y,y as b,yt as x}from"./fSbKS3Ms.js";import{d as S}from"./CjPwXSAj.js";import{ct as C,lt as w,u as T}from"./MaLhb9eO.js";import{t as E}from"./BDNMzG2s.js";import{t as D}from"./Ds1Ic4Fo.js";import{a as O,t as k}from"#entry";import{t as A}from"./CsosGbAU.js";import{t as j}from"./D54f9ecl.js";import{t as M}from"./psQyxpGJ.js";import{t as N}from"./fxIb_gF3.js";import{i as P,r as F,t as I}from"./CEDuLZxr.js";import{i as L,n as R,r as z,t as B}from"./DtnXM8rj.js";import{n as V,r as H,t as U}from"./vBTU8-Jo.js";import{t as W}from"./BaJJCQIp.js";import{t as G}from"./DIAnTr3y.js";var ee=Object.assign(y({__name:`MapAdresaLombardovOffices`,props:{officesVisible:{}},setup(e){let t=e,r=w(),{destroyMap:o,prepareMapOffices:s}=P(),l=async e=>{let t=`balloon-${e.id}`,n=L(),i=F({buttonId:t,addRouteButton:!n.isDenied}),a=await H(t,i,t=>{r.push(`/adresa-lombardov/track/${e.id}`)});return I(e,a)},u=async()=>{await s({clientHeight:p.value.mapRef.clientHeight,clientWidth:p.value.mapRef.clientWidth,officesVisible:t.officesVisible,officeToGeoObject:l})};c(()=>t.officesVisible,u);let p=f(),m=async e=>{await u()},h;return i(async()=>{h=new ResizeObserver(m),h.observe(p.value.mapRef,{box:`content-box`})}),a(()=>{o(),h?.disconnect()}),(e,t)=>(n(),d(z,{ref_key:`wrapperRef`,ref:p},null,512))}}),{__name:`MapAdresaLombardovOffices`}),K=(e,t)=>(e??[]).filter(e=>e.name.toLowerCase().indexOf((t??``).toLowerCase())>-1);function te(e,t){let n=f(),r=f(),i=f([]),a=f(`Регион`),o=f(),s=e=>K(e,r.value),c=async()=>(r.value=void 0,U()),l=_(()=>s(i.value)),u=_(()=>!!e.value&&e.value!==``),d=n=>{e.value=n,o.value=void 0,t.value=void 0,g.value=void 0,y.value=null,b(e.value).then(e=>{v.value=e}).catch(e=>{y.value=e})},p=f(),m=f(),h=f(`ÐоÑод`),g=f(),v=f([]),y=f(null),b=async e=>(m.value=void 0,p.value=void 0,e==null||e==``?[]:V({region_id:e})),x=_(()=>K(v.value,m.value)),S=e=>{e&&(g.value=`вÑбеÑиÑе Ñегион`),setTimeout(()=>{g.value=void 0},3e3)},C=e=>{t.value=e,g.value=void 0};return{placeCaption:h,placesFiltered:x,placeId:t,placeSearch:m,placeErrorMessage:g,placeModel:p,placesError:y,regionCaption:a,regionId:e,regionErrorMessage:o,regionHasId:u,regionModel:n,regions:i,regionsFiltered:l,regionSearch:r,checkPlaceError:S,getRegions:c,initModels:()=>{C(void 0),d(void 0)},setPlace:C,setRegionCode:d}}var q={class:r([])},J={action:``,class:r([`site-search`,`bg-light`])},ne=Object.assign(E(y({__name:`BaseWrapperSearchForm`,props:{submitDisabled:{type:Boolean}},setup(e){return(t,i)=>{let a=D;return n(),p(`div`,q,[l(`form`,J,[o(t.$slots,`fieldset`,{},void 0,!0),b(a,{class:r([`mb-20`]),bg:`dominant`,disabled:e.submitDisabled,type:`submit`},{default:u(()=>[o(t.$slots,`submitContent`,{},void 0,!0)]),_:3},8,[`disabled`])])])}}}),[[`__scopeId`,`data-v-9460049b`]]),{__name:`BaseWrapperSearchForm`}),re={class:r([`map-wrapper`])},Y=Object.assign(E(y({__name:`MapAdresaLombardovSearch`,async setup(a){let o,s,c=f(),h=f(),{placeErrorMessage:y,placeModel:C,placesError:w,placesFiltered:E,regions:D,regionErrorMessage:k,regionHasId:A,regionModel:M,regionsFiltered:N,checkPlaceError:P,getRegions:F,setPlace:I,setRegionCode:z}=te(h,c),V=e=>{z(e?.id),Z()},H=e=>(I(e?.id),Z()),{data:U,error:G,status:K}=([o,s]=t(()=>T(`search-adresa-lombardov`,()=>F())),o=await o,s(),o);D.value=U.value??[];let{officesVisible:q,getOfficesAll:J,fetchOffices:Y}=B(),X=f(!1),Z=async()=>{X.value=!0;let e={...c.value&&{city_id:c.value},...h.value&&{region_id:h.value}};await J(e),X.value=!1},Q=_(()=>L().isGranted===!0),ie=_(()=>L().isUndefined===!0),ae=_(()=>L().isError),$=f(!1),oe=async()=>{if(Q)try{$.value=!0;let t=await R.getMyLocation(),n=(await Y({nearest_by:t.location}))[0];await e(`/adresa-lombardov/track/${n?.id}`)}finally{$.value=!1}};return i(()=>Z()),(e,t)=>(n(),p(`div`,null,[b(j,{error:x(G),status:x(K)},null,8,[`error`,`status`]),b(j,{error:x(w)},null,8,[`error`]),b(j,{error:ae.value},null,8,[`error`]),!x(G)&&!x(w)?(n(),d(ne,{key:0,class:r([`search-wrapper`]),onSubmit:S(oe,[`prevent`]),"submit-disabled":!Q.value||$.value},{fieldset:u(()=>[b(W,{class:r([`mb-20`,`flex-1-200`]),"error-message":x(k),options:x(N),placeholder:`Регион`,modelValue:x(M),"onUpdate:modelValue":[t[0]||=e=>g(M)?M.value=e:null,V]},null,8,[`error-message`,`options`,`modelValue`]),b(W,{class:r([`mb-20`,`flex-1-200`]),"disabled-by-aria":!x(A),"error-message":x(y),options:x(E),placeholder:`ÐоÑод`,modelValue:x(C),"onUpdate:modelValue":[t[1]||=e=>g(C)?C.value=e:null,H],onClick:t[2]||=e=>x(P)(!x(A))},null,8,[`disabled-by-aria`,`error-message`,`options`,`modelValue`])]),submitContent:u(()=>[...t[3]||=[v(` ÐлижайÑее оÑделение `,-1)]]),_:1},8,[`submit-disabled`])):m(``,!0),l(`div`,re,[b(ee,{class:r({"offices-map_hidden":ie.value}),"offices-visible":x(q)},null,8,[`class`,`offices-visible`]),b(O,{kind:`full-parent`,visible:X.value},null,8,[`visible`])])]))}}),[[`__scopeId`,`data-v-d41cda95`]]),{__name:`MapAdresaLombardovSearch`}),X=y({__name:`index`,async setup(e){let r,i,a=C(),o=_(()=>G(a.path)),{data:c,error:l,status:d}=([r,i]=t(()=>T(`slug-adresa-lombardov`,()=>N(o.value),{watch:[o]})),r=await r,i(),r);return k({title:_(()=>c.value?.title),description:_(()=>c.value?.meta_description),ogUrl:_(()=>a.path)}),(e,t)=>{let r=A;return n(),p(h,null,[b(j,{error:x(l),status:x(d)},null,8,[`error`,`status`]),b(r,null,{default:u(()=>[b(M,null,{default:u(()=>
1[v(s(x(c)?.title),1)]),_:1}),b(Y)]),_:1})],64)}}});export{X as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.