PageSourceSearch

https://ligalombard.ru/_nuxt/DtnXM8rj.js

js ligalombard.ru collected 2026-10-08 15:57:24 UTC 3,407 bytes, 1 lines download raw bytes

1import{I as e}from"./CdGGuMmz.js";import{B as t,ft as n,m as r,u as i,x as a}from"./fSbKS3Ms.js";import"./MaLhb9eO.js";import{n as o}from"./BFGAmfFG.js";import{t as s}from"./BDNMzG2s.js";import{t as c}from"./DREqKs8K.js";import{a as l}from"./CEDuLZxr.js";var u=o(`geolocation`,()=>{let e=`geolocation`in navigator,t=n(),r=n(),a=n(),o=i(()=>t.value==null&&r.value==null),s,c=e=>{switch(e){case`granted`:r.value=!0;break;case`denied`:t.value=!0;break;case`prompt`:r.value=void 0,t.value=void 0}};e&&navigator.permissions.query({name:`geolocation`}).then(e=>{s=e,c(e.state),s.onchange=function(e){c(this.state)}});let l=`Откройте страницу в браузере Chrome`;return{isDenied:t,isError:a,isGranted:r,isUndefined:o,requestPermission:async()=>{let n,i=10;for(;s==null&&i--;)await new Promise(e=>setTimeout(e,50));return s==null?(n=!1,t.value=void 0,r.value=void 0,a.value=Error(l)):n=e?r.value||t.value?!0:await new Promise(e=>{navigator.geolocation.getCurrentPosition(n=>{t.value=!1,r.value=!0,a.value=void 0,e(!0)},n=>{n.code===GeolocationPositionError.PERMISSION_DENIED&&(t.value=!0,r.value=!1,a.value=void 0),n.code===GeolocationPositionError.TIMEOUT?(t.value=!0,r.value=!1,a.value=void 0):n.code===GeolocationPositionError.POSITION_UNAVAILABLE&&(t.value=void 0,r.value=void 0,a.value=Error(l)),e(!1)},{timeout:3e4})}):!1,n}}}),d=Object.assign(s(a({__name:`MapAdresaLombardovEl`,setup(e,{expose:i}){let a=n();return i({mapRef:a}),(e,n)=>(t(),r(`div`,{id:`map`,class:`yandex-map`,ref_key:`mapRef`,ref:a},null,512))}}),[[`__scopeId`,`data-v-96056920`]]),{__name:`MapAdresaLombardovEl`}),f=new class{MAX_TRIES=20;TIMEOUT=50;async createMap(e){return new(await(l(`Map`)))(`map`,e)}async createPlacemark(e){return new(await(l(`Placemark`)))(e.geometry,e.properties,e.options)}async createEmptyGeoObject(e){return new(await(l(`Circle`)))([e,1])}async createRoute(e){return new(await(l(`multiRouter`))).MultiRoute(e,{boundsAutoApply:!0})}async destroyMap(e){return new Promise(t=>{e.events.add(`destroy`,t),e.destroy()})}async getMyLocation(){let e=await l(`geolocation`);try{let{geoObjects:t}=await e.get();if(`accuracy`in t&&`position`in t)return{accuracy:t.accuracy,location:t.position};throw Error(`accuracy, position not found`)}catch(e){throw Object.assign(e,{key:`ligalombard geo map service get my location error`}),c(e),e}}async zoomByGeoObjects(e,t){if(e.geoObjects.getLength()===0)return;let n=e.geoObjects.getBounds();if(n){await e.setBounds(n,{checkZoomRange:!0,useMapMargin:!0});let r=e.getZoom();return t&&r>t?e.setZoom(t,{useMapMargin:!0}):void 0}throw Error(`bounds: required`)}};function p(){let{$httpApiPublic:t}=e(),r=async e=>{let n={...e};n.nearest_by&&=JSON.stringify(n.nearest_by),n.nearest_region_by&&(n.nearest_by=JSON.stringify(n.nearest_region_by));let{data:r}=await t.get(`/offices/`,{params:n});return r.data},i=async()=>{let{requestPermission:e}=u();if(await e()){let e=await f.getMyLocation();return await r({nearest_by:e.location})}},a=async e=>{let{data:n}=await t.get(`/offices/`,{params:e}),r=n.data[0];if(r)return r;throw Error(`office required for query params '${JSON.stringify(e,void 0,2)}'`)},o=n([]);return{officesVisible:o,fetchOffices:r,getOffice:a,getOfficesAll:async e=>{if(!e.region_id&&!e.city_id){let e=await i();
1e?o.value=e:o.value=await r({region_code:`77`})}else o.value=await r(e)},getOfficesNearest:i}}export{u as i,f as n,d as r,p as t};

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.