PageSourceSearch

https://koronapay.com/_next/static/chunks/430a9a55.bd8378cc2b5ec043.js

js koronapay.com collected 2026-09-24 18:20:18 UTC 222,209 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[999],{39029:function(e,t,i){var r;i.r(t),i.d(t,{AgentsParamsAdapter:function(){return ir},AgentsParamsStore:function(){return Mi},AgentsStore:function(){return mr},AgsMap:function(){return gn},ApiServices:function(){return fo},ApiStateDecorator:function(){return mo},ClusterStore:function(){return fr},ComponentOverridesStore:function(){return xo},CountryFilterStore:function(){return Kr},CurrencyFilterStore:function(){return Xr},DynamicDataStore:function(){return Po},FeaturesStore:function(){return Ar},Filters:function(){return cn},FiltersReadyAdapter:function(){return go},FiltersStore:function(){return Gr},GeolocationStore:function(){return vr},KoronaMap:function(){return _n},LOCALIZATION_CMS_KEYS:function(){return gr},LOCALIZATION_DEFAULTS:function(){return yr},LOCALIZATION_KEYS:function(){return hr},LoadingState:function(){return mn},Map:function(){return Ms},MapLocalizationMapperStore:function(){return Sr},MapLocalizationStore:function(){return pr},MapLocationStore:function(){return xr},MapModuleStore:function(){return Lr},MapQueryAdapter:function(){return Ur},MapQueryBox:function(){return Yn},MapReadyAdapter:function(){return Yr},MapStartupManager:function(){return Ao},MapState:function(){return br},MapStateStore:function(){return Pr},MapStore:function(){return or},MapStoreProvider:function(){return ar},MapTheme:function(){return Bn},MapUiStore:function(){return zr},MapView:function(){return un},MarkerStore:function(){return Br},OpenFilterStore:function(){return Jr},PointQueryStore:function(){return Vr},PointsListStore:function(){return _r},QueryFilterAdapter:function(){return So},QueryStore:function(){return qr},ReadyStore:function(){return vo},RootStore:function(){return lr},SearchStore:function(){return dr},ServiceFilterStore:function(){return oo},ServicePointsFilterStore:function(){return ho},TOKENS:function(){return Q},UserLocationProvider:function(){return ur},UserLocationStore:function(){return cr},ViewFilterStore:function(){return yo},addAllOption:function(){return ro},convertToJsArray:function(){return Di},createContainer:function(){return Oo},createServiceTypesMap:function(){return to},diContainer:function(){return wo},getQueryParam:function(){return Fi},getSelectedOption:function(){return io},injectYandexMapsScript:function(){return uo},injectYandexMapsV2Script:function(){return co},injectYandexMapsV3Script:function(){return lo},isLastArrayIndex:function(){return zi},pureTheme:function(){return Fn},setupStores:function(){return jo},stopPropagationEvent:function(){return Ni},updateQueryParams:function(){return Ri},useAgentsParamsStore:function(){return se},useAgentsStore:function(){return ve},useApiServices:function(){return X},useApiStateDecorator:function(){return J},useClusterStore:function(){return Ae},useComponentOverridesStore:function(){return ze},useCountryFilterStore:function(){return ke},useCurrencyFilterStore:function(){return Oe},useDynamicDataStore:function(){return Fe},useFeaturesStore:function(){return fe},useFiltersReady:function(){return be},useFiltersStore:function(){return Me},useGeolocationStore:function(){return me},useMapApiFacade:function(){return te},useMapBoundsManager:function(){return De},useMapLocalizationMapperStore:function(){return re},useMapLocalizationStore:function(){return oe},useMapLocationInitializer:function(){return Ne},useMapLocationStore:function(){return ge},useMapModuleStore:function(){return Se},useMapQueryAdapter:function(){return xe},useMapReadyAdapter:function(){return Ce},useMapStartupManager:function(){return ie},useMapStateStore:function(){return ye},useMapStore:function(){return ne},useMapUiStore:function(){return le},useMarkerStore:function(){return he},useOpenFilterStore:function(){return Te},usePointQueryStore:function(){return ce},usePointsListStore:function(){return de},useQueryFilterAdapter:function(){return Pe},useQueryStore:function(){return ae},useReadyStore:function(){return ee},useRootStore:function(){return Re},useSearch:function(){return $a},useSearchStore:function(){return ue},useServiceFilterStore:function(){return we},useServicePointsFilterStore:function(){return Ee},useStaticFiltersHelperStore:function(){return Le},useStore:function(){return $},useUserLocationProvider:function(){return je},useUserLocationStore:function(){return pe},useViewFilterStore:function(){return Ie},variants:function(){return fs},watchStableElementSize:function(){return Bi}});var o=i(70272),s=i(20380),a=i(41726),n=i(68334),l=i(95660),d=i(2441),c=i(89753),u=i(86746),p=i(89371),h=i(67420),y=i(89705),g=i(37555),S=i(70781),m=i(55710),f=i(56691),A=i(54033),v=i(93720),x=i(60599),C=i(19610),M=i(45975),b=i(55899),L=i(77626),P=i(74283),T=i(47992),I=i(48882),k=i(98197),O=i(75550),w=i(82920),E=i(91496),j=i(12148),D=i(3766),N=i(15044),R=i(96217),F=(i(79603),i(7161)),z=i(62232),B=Object.defineProperty,_=Object.getOwnPropertyDescriptor,U=(e,t,i,r)=>{for(var o,s=r>1?void 0:r?_(t,i):t,a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r?o(t,i,s):o(s))||s);return r&&s&&B(t,i,s),s},Y=(e,t)=>
1(i,r)=>t(i,r,e),V=(e,t,i)=>(((e,t,i)=>{t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i),H=(0,o.Pi)((({isLoading:e,...t})=>e&&(0,a.jsx)(s.Box,{borderRadius:"8px",padding:"12px",background:"transparent",display:"flex",alignItems:"center",justifyContent:"center",...t,children:(0,a.jsx)(s.Spinner,{width:"16px",height:"16px",borderWidth:"3px",color:"indicator.primary.default"})}))),Q={RootStore:Symbol.for("RootStore"),ApiServices:Symbol.for("ApiServices"),ApiStateDecorator:Symbol.for("ApiStateDecorator"),ReadyStore:Symbol.for("ReadyStore"),MapApiFacade:Symbol.for("MapApiFacade"),MapStartupManager:Symbol.for("MapStartupManager"),MapLocalizationMapperStore:Symbol.for("MapLocalizationMapperStore"),MapLocalizationStore:Symbol.for("MapLocalizationStore"),AgentsParamsAdapter:Symbol.for("AgentsParamsAdapter"),AgentsParamsStore:Symbol.for("AgentsParamsStore"),QueryStore:Symbol.for("QueryStore"),MapStore:Symbol.for("MapStore"),MapUiStore:Symbol.for("MapUiStore"),PointsListStore:Symbol.for("PointsListStore"),PointQueryStore:Symbol.for("PointQueryStore"),SearchStore:Symbol.for("SearchStore"),UserLocationStore:Symbol.for("UserLocationStore"),MarkerStore:Symbol.for("MarkerStore"),MapStateStore:Symbol.for("MapStateStore"),MapLocationStore:Symbol.for("MapLocationStore"),MapModuleStore:Symbol.for("MapModuleStore"),GeolocationStore:Symbol.for("GeolocationStore"),FeaturesStore:Symbol.for("FeaturesStore"),ClusterStore:Symbol.for("ClusterStore"),AgentsStore:Symbol.for("AgentsStore"),MapQueryAdapter:Symbol.for("MapQueryAdapter"),MapReadyAdapter:Symbol.for("MapReadyAdapter"),FiltersStore:Symbol.for("FiltersStore"),FiltersReadyAdapter:Symbol.for("FiltersReadyAdapter"),StaticFiltersHelperStore:Symbol.for("StaticFiltersHelperStore"),QueryFilterAdapter:Symbol.for("QueryFilterAdapter"),OpenFilterStore:Symbol.for("OpenFilterStore"),ViewFilterStore:Symbol.for("ViewFilterStore"),CountryFilterStore:Symbol.for("CountryFilterStore"),CurrencyFilterStore:Symbol.for("CurrencyFilterStore"),ServiceFilterStore:Symbol.for("ServiceFilterStore"),ServicePointsFilterStore:Symbol.for("ServicePointsFilterStore"),UserLocationProvider:Symbol.for("UserLocationProvider"),MapBoundsManager:Symbol.for("MapBoundsManager"),MapLocationInitializer:Symbol.for("MapLocationInitializer"),ApiCallbacks:Symbol("ApiCallbacks"),DynamicDataStore:Symbol.for("DynamicDataStore"),ComponentOverridesStore:Symbol.for("ComponentOverridesStore")},W=r||(r=i.t(n,2)),q=e=>W[e]??W.default?.[e]??(()=>{throw new Error(`inversify-react: missing ${String(e)}`)}),G=q("Provider"),K=q("useInjection");q("useContainer");var Z=class extends Error{constructor(e="Cluster"){super(`\u0412\u044b \u0437\u0430\u0431\u044b\u043b\u0438 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ${e} Store Provider`),this.name="MissingContextError"}},$=e=>{let t=K(e);if(!t)throw new Z(e.toString());return t},X=()=>$(Q.ApiServices),J=()=>$(Q.ApiStateDecorator),ee=()=>$(Q.ReadyStore),te=()=>$(Q.MapApiFacade),ie=()=>$(Q.MapStartupManager),re=()=>$(Q.MapLocalizationMapperStore),oe=()=>$(Q.MapLocalizationStore),se=()=>$(Q.AgentsParamsAdapter),ae=()=>$(Q.QueryStore),ne=()=>$(Q.MapStore),le=()=>$(Q.MapUiStore),de=()=>$(Q.PointsListStore),ce=()=>$(Q.PointQueryStore),ue=()=>$(Q.SearchStore),pe=()=>$(Q.UserLocationStore),he=()=>$(Q.MarkerStore),ye=()=>$(Q.MapStateStore),ge=()=>$(Q.MapLocationStore),Se=()=>$(Q.MapModuleStore),me=()=>$(Q.GeolocationStore),fe=()=>$(Q.FeaturesStore),Ae=()=>$(Q.ClusterStore),ve=()=>$(Q.AgentsStore),xe=()=>$(Q.MapQueryAdapter),Ce=()=>$(Q.MapReadyAdapter),Me=()=>$(Q.FiltersStore),be=()=>$(Q.FiltersReadyAdapter),Le=()=>$(Q.StaticFiltersHelperStore),Pe=()=>$(Q.QueryFilterAdapter),Te=()=>$(Q.OpenFilterStore),Ie=()=>$(Q.ViewFilterStore),ke=()=>$(Q.CountryFilterStore),Oe=()=>$(Q.CurrencyFilterStore),we=()=>$(Q.ServiceFilterStore),Ee=()=>$(Q.ServicePointsFilterStore),je=()=>$(Q.UserLocationProvider),De=()=>$(Q.MapBoundsManager),Ne=()=>$(Q.MapLocationInitializer),Re=()=>$(Q.RootStore),Fe=()=>$(Q.DynamicDataStore),ze=()=>$(Q.ComponentOverridesStore),Be=(0,o.Pi)((({children:e,control:t})=>{let{components:i,controls:r}=Se(),{isFeaturesLoading:o}=fe(),{YMapControl:n}=i||{};return i&&r&&n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.YMapControl
1s,{position:"bottom right",orientation:"vertical",children:[(0,a.jsx)(r.YMapZoomControl,{}),(0,a.jsx)(n,{children:t})]}),(0,a.jsx)(s.Box,{position:"absolute",bottom:0,zIndex:9999,children:(0,a.jsx)(H,{isLoading:o})}),e]}):null})),_e={1:"permission-denied",2:"timeout",3:"position-unavailable"},Ue=()=>{let{setGeoMarkerCoordinates:e}=me(),{updateCoordinates:t,coordinates:i,error:r,isLoading:o}=(0,l.ZZ)(),{map:s}=ye();return(0,d.useEffect)((()=>{if(!o){if(r)return void e(null);if(i&&s){let t=[i.longitude,i.latitude];e(t)}}}),[i,o,s]),{updateCoordinates:t,coordinates:i,error:r,isLoading:o}},Ye=(e,t)=>{let[i,r]=(0,d.useState)(void 0),{alertContent:o}=ye(),{setGeolocationAlertShown:s}=me();return(0,d.useEffect)((()=>{if(!t&&e){let t=e.code in _e?_e[e.code]:void 0;if(!o||!t)throw new Error(`\u041d\u0435\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: ${e.code}, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0437\u0430\u0431\u044b\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439!`);r(o[t])}else r(void 0)}),[t,e,o]),(0,d.useEffect)((()=>{s(!!i)}),[i,s]),{alertProps:i,isGeolocationAlertShown:!!i}},Ve=()=>{let{setLocation:e}=ge(),{geoMarkerCoordinates:t}=me(),{setCountryCode:i}=ke(),{data:r,isLoading:o,error:s,isValidating:a}=(e=>{let{getAddressByCoords:t}=te(),i=e&&t?`/search_${e}`:null;return t||console.error("\u041e\u0448\u0438\u0431\u043a\u0430: getAddressByCoords \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d!"),(0,c.ZP)(i,(()=>{if(t&&e)return t({coords:e})}),{revalidateOnReconnect:!1,revalidateOnFocus:!1})})(t),n=()=>{let o=r?.CountryNameCode;return o&&i(o),setTimeout((()=>{t&&e({center:t,zoom:gs-2,duration:1e3})}))};return(0,d.useEffect)((()=>{if(!o||a&&r){let e=r?.CountryNameCode;e&&i(e);let t=n();return()=>{clearTimeout(t)}}}),[o,a]),n},He="MapSkeleton",Qe="CountryFilter",We="ServicePointsFilter",qe="BalloonContainer",Ge="Content",Ke="BackButton",Ze="BackArrow",$e="Header",Xe="CopyNotification",Je="0",et={label:"\u0412\u0441\u0435",value:Je,id:Je},tt={label:"\u0412\u0441\u0435",value:Je,id:Je},it="location",rt="view",ot="open",st="point",at="services",nt="country",lt="servicesPoints",dt="pointTypeBank",ct="pointTypeTradingNetwork",ut="currency",pt="type",ht={center:[37.3852725,55.58371994495486],zoom:8},yt=[[35.91035794921874,55.78284925693092],[38.86018705078125,55.38459063299094]],gt="RU",St={bbox:yt,city:"\u041c\u043e\u0441\u043a\u0432\u0430",code:"RU"},mt="map-alert-toast-container",ft="map-alert-toast-style",At="map-alert-toast-item",vt=[],xt=[0,0],Ct={WebkitUserSelect:"none",WebkitUserDrag:"none",WebkitTouchCallout:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none",touchAction:"manipulation",WebkitTapHighlightColor:"transparent",cursor:"pointer",'&[draggable="true"]':{draggable:"false"}},Mt=(0,s.chakra)(s.IconButton,{baseStyle:{minWidth:0,width:"48px",height:"48px",background:"white",borderRadius:"8px",boxShadow:"menu",...Ct,svg:{width:"18px",height:"18px",path:{fill:"indicator.status.action.light"}},_hover:{background:"white",svg:{path:{fill:"indicator.status.action.dark"}}},_active:{background:"white",svg:{path:{fill:"indicator.primary.default"}}}}}),bt=(0,o.Pi)((({onClick:e,isLoading:t})=>(0,a.jsx)(Mt,{width:"48px",height:"48px",onClick:e,disabled:t,isLoading:t,icon:(0,a.jsx)(p.jj,{}),"aria-label":"geo-icon","data-testid":"GeolocationButton",spinner:(0,a.jsx)(s.Spinner,{width:"18px",height:"18px",color:"indicator.primary.default"})}))),Lt=(0,o.Pi)((({alertIcon:e=(0,a.jsx)(p.Nm,{}),children:t,testId:i="Alert"})=>(0,a.jsx)(s.Box,{"data-testid":"AlertContainer",width:["calc(100% - 32px)","calc(100% - 32px)","400px"],children:(0,a.jsx)(s.Alert,{testId:i,backgroundColor:"bg.darkAdditional.80%",color:"white",pointerEvents:"all",icon:e,children:t})}))),Pt=(0,o.Pi)((({alertIcon:e,alertContent:t,testId:i})=>(0,a.jsx)(h.U,{pointerEvents:"none",width:"100%",justifyContent:"center",alignItems:"center","data-testid":"AlertWrapper",children:(0,a.jsx)(Lt,{testId:i,alertIcon:e,children:t})}))),Tt=()=>{let{map:e,isMapInitialized:t}=ye(),i=(0,d.useRef)(null);return(0,d.useEffect)((()=>{let r=e?.container;t&&(r?i.current=r:console.error("\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u0430\u0440\u0442\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d!"))}),[e?.container,t]),i},It=new Map,kt=e=>It.get(e)??[],Ot=(e,t)=>((e,t)=>[...e.querySelectorAll(`.${At}`)].filter((e=>e.dataset.toastType===t)).length)(e,t)>=1,wt=(e,t)=>
1{Object.assign(e.style,{position:"absolute",left:"50%",top:t?"unset":"88px",bottom:t?"16px":"unset",transform:"translateX(-50%)",width:t?"400px":"100%",display:"flex",flexDirection:"column",gap:"8px",pointerEvents:"none",boxSizing:"border-box"})},Et=({isShow:e,duration:t,render:i,toastId:r})=>{let o=(0,y.p)(),s=Tt(),n=(0,g.S)({base:!1,md:!0},{ssr:!1})??!1,l=(0,d.useRef)(0),c=(0,d.useRef)(!1),u=(0,d.useRef)(null);return(0,d.useEffect)((()=>{let e=s.current?.querySelector(`#${mt}`);e&&wt(e,n)}),[n,s]),(0,d.useEffect)((()=>{if(!e)return void(c.current=!1);if(c.current)return;let d=((e,t)=>{if(!e)return null;let i=e.querySelector(`#${mt}`),r=i??document.createElement("div");return r.id=mt,wt(r,t),"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),i||e.append(r),r})(s.current,n);if(!d)return;if((()=>{let e=document.getElementById(ft),t=e??document.createElement("style");t.id=ft,t.innerHTML=`\n        @keyframes map-alert-toast-in {\n            from {\n                opacity: 0;\n                transform: translateY(16px) scale(0.96);\n            }\n\n            to {\n                opacity: 1;\n                transform: translateY(0) scale(1);\n            }\n        }\n\n        @keyframes map-alert-toast-out {\n            from {\n                opacity: 1;\n                transform: translateY(0) scale(1);\n            }\n\n            to {\n                opacity: 0;\n                transform: translateY(8px) scale(0.98);\n            }\n        }\n\n        .${At} {\n            width: 100%;\n            position: relative;\n            pointer-events: auto;\n            margin: 0;\n            padding: 0;\n            animation:\n                map-alert-toast-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1),\n                map-alert-toast-out 220ms ease-in var(--map-alert-toast-exit-delay) forwards;\n            will-change: opacity, transform;\n        }\n\n        .${At} > * {\n            width: 100%;\n            position: static;\n            margin: 0;\n        }\n    `,e||document.head.append(t)})(),Ot(d,r))return void(c.current=!0);let p=(e=>kt(e).at(-1))(r);p&&o.close(p),c.current=!0,l.current+=1,u.current=d;let h=`${r}-${Date.now()}-${l.current}`;((e,t)=>{let i=kt(e);It.set(e,[...i,t])})(r,h),o({id:h,duration:t,containerStyle:{margin:0},render:i?e=>(0,a.jsx)(S.h,{containerRef:u,children:(0,a.jsx)(m.x,{className:At,"data-toast-type":r,style:{"--map-alert-toast-exit-delay":`${Math.max(t-180,0)}ms`},children:i(e)})}):void 0,onCloseComplete:()=>{((e,t)=>
1{let i=kt(e).filter((e=>e!==t));i.length>0?It.set(e,i):It.delete(e)})(r,h),requestAnimationFrame((()=>{let e=u.current;e&&0===e.children.length&&(e.remove(),u.current=null)}))}})}),[e,i]),o},jt=(0,o.Pi)((({isShowAlert:e,alertIcon:t,alertContent:i,toastId:r,testId:o})=>{let s=(0,d.useMemo)((()=>()=>(0,a.jsx)(Pt,{testId:o,alertContent:i,alertIcon:t})),[i]);return Et({duration:5e3,isShow:e,render:s,toastId:r}),(0,a.jsx)(a.Fragment,{})})),Dt=(0,o.Pi)((e=>(0,a.jsx)(jt,{...e,testId:"GeolocationAlert",toastId:"geolocation"}))),Nt=(0,o.Pi)((({onClick:e,isLoading:t,isShowAlert:i,alertIcon:r,alertContent:o})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(bt,{onClick:e,isLoading:t}),(0,a.jsx)(Dt,{isShowAlert:i,alertIcon:r,alertContent:o})]}))),Rt=(0,o.Pi)((()=>{let{alertProps:e,isGeolocationAlertShown:t,...i}=(()=>{let{updateCoordinates:e,error:t,isLoading:i}=Ue(),{geoMarkerCoordinates:r}=me(),{alertProps:o,isGeolocationAlertShown:s}=Ye(t,i),a=Ve();return{isLoading:i,alertProps:o,onClick:()=>{r?a():e()},isGeolocationAlertShown:s}})();return(0,a.jsx)(Nt,{...i,alertContent:e?.content,alertIcon:e?.icon,isShowAlert:t})})),Ft="not-found",zt="not-found",Bt=(0,o.Pi)((()=>{let{isGeolocationAlertShown:e}=me(),{isLastEmptyUpdate:t,alertContent:i,yaMarkersCountInDom:r}=ye(),{isFeaturesLoading:o}=fe(),s=(0,y.p)(),[n,l]=(0,d.useState)(void 0),c=t&&0===r&&!o;return(0,d.useEffect)((()=>{e&&s.close(Ft)}),[e]),(0,d.useEffect)((()=>{t||s.close(Ft)}),[t]),(0,d.useEffect)((()=>{if(i){if(!(zt in i))throw new Error(`\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u043e\u0447\u0435\u043a \u0441 id ${zt}.`);l(i[zt])}}),[i]),(0,a.jsx)(jt,{isShowAlert:c,testId:"NotFoundAlert",toastId:Ft,alertContent:n?.content,alertIcon:n?.icon})})),_t=(0,o.Pi)((()=>(0,a.jsx)(Be,{control:(0,a.jsx)(Rt,{}),children:(0,a.jsx)(Bt,{})}))),Ut="selectAll",Yt=e=>{let{setAgents:t,setError:i,setLoading:r,features:o,checkActiveId:s}=Ae(),{data:a,isError:n,isLoading:l}=(e=>{let{fetchAgentsByIds:t}=te(),i=e?.map((e=>e.id)),r=t&&e&&e&&i?`agents-by-ids-${i.join(",")}`:null,o=(0,d.useCallback)((()=>t&&e&&t(e)),[e,t]),{data:s,error:a,isLoading:n,isValidating:l}=(0,c.ZP)(r,o,{revalidateOnFocus:!1,revalidateIfStale:!1});return{data:s,isLoading:n||l,isError:!!a}})(o),u=s(e);return(0,d.useEffect)((()=>{a&&u&&t(a)}),[a,u]),(0,d.useEffect)((()=>{i(n)}),[n]),(0,d.useEffect)((()=>{r(l)}),[l]),{isActive:u,data:a,isError:n,isLoading:l}},Vt=(e,t,i)=>{let{checkActiveId:r,activeId:o,globalClusterClickHandler:a,attachListenersForActiveCluster:n,detachListenersForActiveCluster:l,adjustMapCenterForBalloon:c,activateCluster:u,countInCluster:p,deactivateCluster:h}=Ae(),{scrollIntoViewWithTimeout:y}=le(),{isMapInitialized:g,isMapInDom:S}=ye(),{openTrigger:m}=ce(),f=(0,d.useRef)(!1),A=(0,s.useMobileBreakpoint)({ssr:!1}),v=r(i);return(0,d.useEffect)((()=>{if(v&&i)return n(i),()=>l(i)}),[v,i]),(0,d.useEffect)((()=>{m&&m&&!f.current&&(f.current=!0)}),[m]),(0,d.useEffect)((()=>{if(v&&g&&S&&p>0){let e=f.current?800:100,t=y(e);return()=>clearTimeout(t)}}),[v,A,g,S,p]),(0,d.useEffect)((()=>{r(i)&&!A&&t&&c(t)}),[o]),(0,d.useEffect)((()=>{v&&u(e)}),[o,v]),(0,d.useEffect)((()=>()=>{r(i)&&h()}),[]),{isActive:v,handleClusterClick:a}},Ht=(0,o.Pi)((({placemarksCount:e,isActive:t,icon:i=(0,a.jsx)(p.nc,{}),activeIcon:r=(0,a.jsx)(p.Jo,{})})=>(0,a.jsxs)(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",position:"relative",width:"40px",height:"40px",cursor:"pointer",sx:Ct,pointerEvents:"auto",children:[(0,a.jsx)(s.Icon,{width:"40px",height:"40px",children:t?r:i}),(0,a.jsx)(s.Text,{position:"absolute",color:"white",variant:"default",size:"md",children:e})]}))),Qt=(0,s.chakra)(s.Box,{baseStyle:{width:["560px","560px","560px","664px","664px"],minHeight:"306px",backgroundColor:"white",borderRadius:"16px",overflow:"hidden",filter:"var(--chakra-filters-containerShadow)"}}),Wt=(0,P.E)(Qt),qt=(0,s.chakra)(s.Box,{baseStyle:{width:"100%",backgroundColor:"white",overflow:"hidden",padding:"40px 0 8px",borderRadius:"24px 24px 0 0",filter:"var(--chakra-filters-containerShadow)"}}),Gt=(0,s.chakra)(s.Box,{baseStyle:{minHeight:"48px",padding:"12px 16px",cursor:"pointer"}}),Kt=(0,s.chakra)(s.Box,{baseStyle:{position:"relative",display:"flex",height:"306px",minHeight:"306px"}}),Zt=(0,s.chakra)(s.Box,{baseStyle:{minWidth:["232px","232px","232px","306px","306px"],height:"inherit",borderRight:"1px solid var(--chakra-colors-indicator-status-divider)",overflow:"hidden",borderRadius:"16px 0 0 0"}}),$t=(0,s.chakra)(s.Box,{baseStyle:{minWidth:"100%",height:"100%",overflow:"hidden"}}),Xt=(0,s.chakra)(s.Box,{baseStyle:{width:"32px",height:"32px",position:"absolute",top:"14px",left:"8px",cursor:"pointer"}}),Jt=(0,P.E)(s.Box),ei=(0,s.chakra)(s.Box,{baseStyle:{position:"relative"}}
1),ti=(0,s.chakra)(Jt,{baseStyle:{display:"flex",flexDirection:"column",gap:"8px"}}),ii=(0,s.chakra)(s.Text,{baseStyle:{whiteSpace:"pre-line"}}),ri=(0,s.chakra)(s.Box,{baseStyle:{display:"inline-flex",verticalAlign:"middle",ml:"8px"}}),oi=(0,o.Pi)((({address:e,schedule:t})=>(0,a.jsxs)(s.Box,{children:[e?(0,a.jsx)(ii,{"data-testid":"Address",size:"md",color:"text.body.secondary",userSelect:"text",children:e}):null,t?(0,a.jsx)(s.Text,{"data-testid":"Schedule",size:"md",color:"text.body.secondary",userSelect:"text",children:t}):null]}))),si=(0,o.Pi)((({shortName:e,isChecked:t,tooltipLabel:i})=>e?t?(0,a.jsx)(s.HStack,{alignItems:"center",children:(0,a.jsxs)(s.Text,{variant:"default",size:"xl",color:"black",userSelect:"text","data-testid":$e,children:[e,(0,a.jsx)(ri,{as:"span",children:(0,a.jsx)(s.Tooltip,{label:i,placement:"bottom",isOpenOnClick:!0,mt:"6px",maxW:"250px",portalProps:{containerRef:{current:document.body}},children:(0,a.jsx)(s.Icon,{boxSize:"4",display:"flex",children:(0,a.jsx)(p.zL,{})})})})]})}):(0,a.jsx)(s.Text,{variant:"default",size:"xl",color:"black",userSelect:"text","data-testid":$e,children:e}):null)),ai=(0,o.Pi)((({phone:e})=>{let{mapPhone:t}=re();return e&&"-"!==e?(0,a.jsxs)(s.Stack,{gap:"4px",children:[(0,a.jsxs)(s.Text,{size:"md",userSelect:"text",children:[t,":"]}),(0,a.jsx)(s.Link,{"data-testid":"Phone",size:"md",href:`tel:${e}`,color:"indicator.status.active",_hover:{textDecoration:"underline"},children:e})]}):null})),ni=({header:e,values:t})=>t.size>0?(0,a.jsx)(s.Text,{"data-testid":"CurrenciesLine",size:"md",userSelect:"text",children:`${e}: ${[...t].join(", ")}`}):null,li=(0,o.Pi)((({services:e})=>{let{mapAgentsCurrencySending:t,mapAgentsCurrencyReceiving:i}=re(),{currencies:r}=Oe(),{selectedServices:o,serviceTypesMap:n}=we(),{receivingCurrencies:l,sendingCurrencies:d}=(0,I.Er)({services:e,allowedCurrencies:r,selectedServices:o,serviceTypesMap:n});return(0,a.jsxs)(s.VStack,{spacing:"4px",alignItems:"left","data-testid":"Services",children:[(0,a.jsx)(ni,{header:t,values:d}),(0,a.jsx)(ni,{header:i,values:l})]})})),di=(0,o.Pi)((({services:e})=>e?(0,a.jsx)(li,{services:e}):null)),ci=(0,o.Pi)((({itemData:e,hideText:t,onClick:i})=>{let{mapAddress:r,mapDescription:o,mapPhone:n,mapContactPerson:l,mapDirectionsLink:d,mapAgentShare:c,mapCopyToast:u}=re(),{mapType:p}=Fe(),h=()=>((e,t,i)=>{if(typeof window>"u")return"";let r=`${window.location.origin}${window.location.pathname}`;return t===k.I6.ProxyLocation?`${r}?point=${e}&type=${i}`:`${r}?point=${e}`})(e.id,p,e.organizationType),{isOnlyList:y}=Ie(),g=(()=>{let t=[];return o&&t.push(e.shortName?`${o} - ${e.shortName}`:o),t.push(`${r} ${e.address}`),e.phone&&t.push(`${n} ${e.phone}`),t.push(`${l} ${e.schedule}`),y||t.push(`${d} ${h()}`),t.join("\n")})();return(0,s.useMobileBreakpoint)()?(0,a.jsx)(s.WebShare,{text:c,hideText:t,height:"24px",padding:0,iconColorMethod:"color",variant:"primary",href:g,size:"fit",onClick:i}):(0,a.jsx)(s.ClipboardShare,{text:c,hideText:t,height:"24px",padding:0,variant:"primary",href:g,size:"fit",toastProps:{toastContent:u,toastBackgroundColor:"bg.darkAdditional.primary",toastColor:"text.white",testId:Xe},onClick:i})})),ui=({slot:e,defaultComponent:t,defaultProps:i,slotProps:r})=>{if((0,d.isValidElement)(e))return(0,d.cloneElement)(e,Object.assign({},e.props,r));if(e&&"function"==typeof e){let t=e,o={...i,...r};return(0,a.jsx)(t,{...o})}let o={...i,...r};return(0,a.jsx)(t,{...o})},pi=e=>(0,a.jsx)(ti,{...e,initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,opacity:{ease:"linear"}}}),hi=({id:e,innerPadding:t})=>(0,a.jsx)(pi,{"data-testid":"BalloonSkeleton",padding:t,children:Array.from({length:2}).map(((e,t)=>(0,a.jsx)(s.KoronaSkeleton,{width:"100%",height:"36px",borderRadius:"0.5rem"},t)))},`skeleton-${e}`),yi=(0,o.Pi)((({id:e,address:t,schedule:i,services:r,phone:o,isLoading:n,shortName:l,organizationType:d,scrollbarContentHeight:c,innerPadding:u,isChecked:p,tooltipLabel:h,contentSlots:y,contentSlotProps:g})=>{let S=(0,s.useMobileBreakpoint)(),m=(0,a.jsx)(s.Scrollbar,{maxHeight:c??(S?"200px":"396px"),children:(0,a.jsx)(pi,{"data-testid":"Info",padding:u,children:(0,a.jsxs)(s.Stack,{gap:"16px",children:[ui({slot:y?.header,defaultComponent:si,defaultProps:{shortName:l,isChecked:p,tooltipLabel:h},slotProps:g?.header}),(0,a.jsxs)(s.Stack,{gap:"8px",children:[ui({slot:y?.addressSection,defaultComponent:oi,defaultProps:{address:t,schedule:i},slotProps:g?.addressSection}),ui({slot:y?.servicesSection,defaultComponent:di,defaultProps:{services:r},slotProps:g?.servicesSection}),ui({slot:y?.phoneSection,defaultComponent:ai,defaultProps:{phone:o},slotProps:g?.phoneSection}),ui({slot:y?.additionalSection,defaultComponent:()=>null,defaultProps:{}})]}),ui({slot:y?.shareButton,defaultComponent:ci,defaultProps:{hideText:!1,itemData:{id:e,shortName:l,address:t,schedule:i,phone:o,organizationType:d}},slotProps:g?.shareButton})]})},`content-${e}`)});return(0,a.jsx)(T.M,{mode:"wait",children:(0,a.jsx)(ei,{as:P.E.div,initial:!1,animate:{height:n?"80px":"auto",transition:{height:{duration:.2}}},children:n?(0,a.jsx)(hi,{id:e,innerPadding:u}):m})})})),gi=(e,t=600)=>{let[i,r]=(0,d.useState)(!1),o=(0,d.useRef)(null);return(0,d.useEffect)((()=>{if(e)r(!0),o.current=Date.now();else{let e=Date.now()-(o.current||0),i=t-e;if(i>0){let e=setTimeout((()=>{r(!1)}),i);return()=>clearTimeout(e)}r(!1)}}),[e]),i},Si=(0,o.Pi)((()=>{let e=(0,s.useMobileBreakpoint)({ssr:!1}),{selectedAgent:t,isLoading:i,isError:r}=Ae(),{mapAgentsTooltipLabel:o}=re(),n=ze(),l=n.getBalloonContentSlots(),d=n.getBalloonContentSlotProps(),c=gi(i)||r||!t,{id:u,shortName:p,address:h,schedule:y,services:g,phone:S,organizationType:m,metadata:f}=t||{};return(0,a.jsx)(yi,{id:u,shortName:p,address:h,services:g,phone:S,schedule:y,organizationType:m,isLoading:c,scrollbarContentHeight:e?"160px":"306px",innerPadding:["0","0","16px"],isChecked:!!f?.isChecked,tooltipLabel:o,contentSlots:l,contentSlotProps:d})})),mi=({id:e,shortName:t,onClickItem:i,isActive:r})=>(0,a.jsx)(Gt,{onClick:t=>{t.stopPropagation(),i(e)},bg:r?"bg.grey.primary":"white","data-testid":"ListItem",children:(0,a.jsx)(s.Text,{color:"text.title",fontSize:"16px",variant:"default","data-testid":"Item",children:t})}),fi=({slot:e,defaultComponent:t,defaultProps:i,slotProps:r})=>e&&(0,d.isValidElement)(e)?r?(0,d.cloneElement)(e,r):(0,d.cloneElement)(e):"function"==typeof t&&0===t.length?t():(0,a.jsx)(t,{...i}),Ai=({agents:e,onClickItem:t,activeAgentId:i,isLoading:r,placemarksCountInActiveCluster:o,listItemSlot:n})=>(0,a.jsx)(T.M,{mode:"wait",children:(0,a.jsx)(P.E.div,{children:r?(0,a.jsx)(P.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:Array.from({length:o}).map(((e,t)=>(0,a.jsx)(Gt,{children:(0,a.jsx)(s.KoronaSkeleton,{width:"100%",height:"36px",borderRadius:"0.5rem","data-testid":"ItemSkeleton"})},t)))},"skeleton"):(0,a.jsx)(P.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,opacity:{ease:"linear"}},children:e.map((({id:e,shortName:r})=>fi({slot:n,defaultComponent:mi,defaultProps:{key:e,id:e,shortName:r,onClickItem:t,isActive:i===e},slotProps:{key:e,id:e,shortName:r,onClickItem:t,isActive:i===e}})))},"content")})}),vi=(0,o.Pi)((()=>{let{agents:e,isError:t,isLoading:i,selectedPointId:r,setSelectedPointId:o,countInCluster:n}=Ae(),l=ze(),c=gi(i),u=(0,s.useMobileBreakpoint)({ssr:!1}),p=c||t||!e?.length,h=l.getClusterBalloonSlots(),y=l.getClusterBalloonSlotProps();return(0,d.useEffect)((()=>{u||(y?.listItem?.onAnalytics?.(e[0]),y?.listItem?.onClick?.(e[0]))}),[]),(0,a.jsx)(Ai,{agents:e,isLoading:p,onClickItem:t=>{let i=e.find((e=>e.id===t));i&&(y?.listItem?.onAnalytics?.(i),y?.listItem?.onClick?.(i)),o(t)},activeAgentId:r,placemarksCountInActiveCluster:n,listItemSlot:h?.listItem})})),xi=()=>{let{setIsClickInsideBalloon:e}=he(),t=(0,d.useCallback)((t=>{t.stopPropagation(),e(!0)}),[e]),i=(0,d.useCallback)((()=>{e(!1)}),[e]),r=(0,d.useCallback)((e=>{e.stopPropagation()}),[]);return(0,d.useEffect)((()=>()=>{i()}),[e]),{onClick:t,onPointerDown:t,onPointerUp:t,onMouseUp:t,onMouseDown:t,onTouchStart:t,onTouchEnd:t,onMouseOver:t,onMouseOut:i,onContextMenu:r}},Ci="mobile-balloon",Mi=class{params=null;constructor(){(0,O.ky)(this)}setParams=e=>{this.params=e};updateParams=e=>{this.setParams({...this.params,...e})};
1deleteParam=e=>{this.setParams({...this.params,[e]:void 0})};getParam=e=>this?.params?this?.params[e]:null},bi="rootId",Li="organizationType",Pi="box",Ti="sort",Ii="addressTruncateLevel",ki="addressObjectId",Oi="language",wi="limit",Ei="locationService",ji="fields",Di=e=>e.map((e=>(0,O.ZN)(e))),Ni=e=>{e.stopPropagation()},Ri=(e,t)=>{let i=new URLSearchParams(window.location.search);null===t?i.delete(e):i.set(e,t);let r=`${window.location.pathname}?${i.toString()}`;window.history.pushState({},"",r)},Fi=e=>new URLSearchParams(window.location.search).get(e),zi=(e,t)=>t===e.length-1,Bi=({element:e,stableFrames:t=2,maxFrames:i=90,onStable:r})=>{let o=null,s=0,a=0,n=0,l=!1,d=(e,t)=>{l||(l=!0,r({width:Math.round(e),height:Math.round(t)}))},c=()=>{n++;let r=e.getBoundingClientRect(),l=Math.round(r.width*r.height);0===l?a=0:l!==s?(s=l,a=0):a++,l>0&&(a>=t||n>=i)?d(r.width,r.height):typeof globalThis<"u"&&globalThis.requestAnimationFrame&&(o=globalThis.requestAnimationFrame(c))};if(typeof globalThis>"u"||!globalThis.requestAnimationFrame){let t=e.getBoundingClientRect();t.width&&t.height&&d(t.width,t.height)}else o=globalThis.requestAnimationFrame(c);return()=>{o&&typeof globalThis<"u"&&globalThis.cancelAnimationFrame&&globalThis.cancelAnimationFrame(o)}},_i=(e,t)=>t.reduce(((t,i,r,o)=>(t+=`(${e}:${i})`,zi(o,r)||(t+=" or "),t)),s.EMPTY_STRING_STATE),Ui=({optionMap:e,query:t,organizationType:i})=>(e=>e.split(",").map((e=>e.trim())))(t).map((t=>(({code:e,optionMap:t,organizationType:i})=>{let r=t.get(e);if(!r||r.organizationType!==i)throw new Error("invalid_query");return r})({code:t,optionMap:e,organizationType:i}))),Yi=(e,t,i)=>{if(!t)return e;if(!e?.length)return[];let r=(e=>e.reduce(((e,t)=>{if(!t.value)throw new Error(`\u041e\u043f\u0446\u0438\u044f \u0432 Service \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 value. id \u043e\u043f\u0446\u0438\u0438: ${t.id}, label: "${t.label}"`);return e.set(t.value,t)}),new Map))(e),o=[];return o.push(...Ui({optionMap:r,query:t,organizationType:i})),o},Vi=({isMobile:e=!1,...t})=>(0,a.jsx)(s.Box,{marginX:e?"16px":0,children:(0,a.jsx)(s.KoronaSkeleton,{borderRadius:["4px","4px","8px"],startColor:"background.primary",h:["24px","24px","56px"],w:"full",...t})}),Hi=()=>(0,s.useMobileBreakpoint)({fallback:"lg",ssr:!1})?264:288,Qi=(e,t)=>t?e?(...i)=>{e(...i),t(...i)}:t:e,Wi=(0,o.Pi)((({onChange:e,...t})=>{let{handleChange:i,filterLoadingStyle:r,label:o,isShown:n,isLoading:l,countryCode:c,options:u}=(()=>{let e=(0,s.useMobileBreakpoint)({ssr:!1}),{mapCountryFilterLabel:t}=re(),{countryCode:i,isLoading:r,isActive:o,options:a,setCountryCode:n,getIsHideLabel:l}=ke();return{filterLoadingStyle:(0,d.useMemo)((()=>(e=>e?{padding:"0 0",w:"full",h:"56px"}:{})(e)),[e]),handleChange:e=>{!r&&e!==j.v6&&n(e)},countryCode:i,isShown:o,label:l(e??!1)?void 0:t,options:a,isLoading:r}})(),p=Hi(),h=(0,d.useMemo)((()=>Qi(i,e)),[i,e]);return n?l?(0,a.jsx)(Vi,{...r,"data-testid":"CountryFilterLoading"}):(0,a.jsx)(s.CountrySelect,{scrollbarHeight:p,containerProps:{width:"full"},testId:Qe,options:u,onChange:h,value:c,id:Qe,label:o,isSearchWithoutTyping:!0,isSelectedToTop:!0,enabledInputToggling:!0,...t}):null})),qi=()=>{let{selectedOptions:e,isActive:t,setSelectedOptions:i,options:r,isLoading:o,isDisabled:s,hasPickAllOptions:a,isError:n,refresh:l}=Oe(),{mapCurrencyFilterLabel:d}=re();return{label:d,isError:n,selectedOptions:e,options:r,onChange:e=>{i(e)},isActive:t,isLoading:o,isDisabled:s,hasPickAllOptions:a,refresh:l}},Gi=(0,o.Pi)((({onChangeMultiple:e,...t})=>{let{hasPickAllOptions:i,isActive:r,isDisabled:o,isLoading:n,isError:l,onCh
1ange:c,options:u,selectedOptions:p,label:h}=qi(),{mapAllCurrenciesLabel:y}=re(),g=Hi(),S=(0,d.useMemo)((()=>Di(p)),[p]),m=(0,d.useMemo)((()=>Qi(c,e)),[c,e]);return r?n&&!l?(0,a.jsx)(Vi,{"data-testid":"CurrencyFilterLoading"}):(0,a.jsx)(s.NextMultiselect,{allMultiselectOptionLabel:y,value:S,hasPickAllOption:!!i,onChangeMultiple:m,containerProps:{width:"full"},disabled:o||l,testId:"CurrencyFilter",isSearchWithoutTyping:!0,isListAllValuesOnFocus:!0,id:"currency-filter",options:u,scrollbarHeight:g,label:h,controlled:!0,isInvalid:l,enabledInputToggling:!0,helperText:l?"\u0412\u044b\u0431\u043e\u0440 \u0432\u0430\u043b\u044e\u0442\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d":void 0,...t}):null})),Ki=(0,o.Pi)((({onChange:e,...t})=>{let{isOpen:i,toggle:r,isLoading:o,isActive:n}=Te(),{mapOpenFilterLabel:l}=re(),c=(0,d.useMemo)((()=>Qi(r,e)),[r,e]);return o?(0,a.jsx)(s.KoronaSkeleton,{width:"140px",height:"24px","data-testid":"OpenFilterLoading"}):n?(0,a.jsx)(s.Checkbox,{id:"open-filter",onChange:c,isChecked:i,alignItems:"center","data-testid":"OpenFilter",...t,children:l}):null})),Zi=(0,o.Pi)((({...e})=>{let{areYmapsModulesLoaded:t}=Se(),{reset:i,isShowReset:r}=Re(),{isLoading:o}=Te(),{mapResetFilter:n}=re();return r?t&&!o?(0,a.jsx)(s.Text,{size:"lg","data-testid":"ResetFilter",textDecoration:"underline",fontFamily:"Roboto-Light",color:"text.body.primary",cursor:"pointer",as:"button",onClick:i,...e,children:n}):(0,a.jsx)(s.KoronaSkeleton,{w:"140px",h:"24px",borderRadius:"4px","data-testid":"ResetFilterLoading"}):null})),$i=()=>{let{selectedValue:e,selectedLabel:t,options:i,isLoading:r,updateSelectedOption:o,isActive:s,isDisabled:a,isSingleStrategy:n,hasPickAllOptions:l}=Ee(),{mapServicesPointsFilterLabel:d,mapAllServicePointsLabel:c}=re();return{options:i?.map((e=>"0"===e.id?{...e,label:c}:e))??[],selectedOptions:e,handleChangeOption:e=>{e!==j.v6&&o(e)},handleChangeOptions:e=>{o(e)},isLoading:r,isActive:s,selectedValue:e,selectedLabel:t,isDisabled:a,label:d,isSingleStrategy:n,mapAllServicePointsLabel:c,hasPickAllOptions:l}},Xi=(0,o.Pi)((({onChange:e})=>{let{selectedValue:t,selectedOptions:i,options:r,isLoading:o,handleChangeOption:n,handleChangeOptions:l,isActive:c,isDisabled:u,label:p,isSingleStrategy:h,mapAllServicePointsLabel:y,hasPickAllOptions:g}=$i(),S=(0,d.useMemo)((()=>Qi(n,e)??n),[e,n]),m=(0,d.useMemo)((()=>Qi(l,e)??l),[e,l]),f=Hi();return c?o?(0,a.jsx)(Vi,{"data-testid":"ServicePointsFilterLoading"}):h?(0,a.jsx)(s.CommonSelect,{options:r,scrollbarHeight:f,testId:We,containerProps:{width:"full"},onChange:S,isListAllValuesOnFocus:!0,value:t,isSearchWithoutTyping:!0,id:"services-points-filter",disabled:u,label:p,enabledInputToggling:!0}):(0,a.jsx)(s.NextMultiselect,{allMultiselectOptionLabel:y,value:i,hasPickAllOption:g,onChangeMultiple:m,containerProps:{width:"full"},disabled:u,testId:We,isSearchWithoutTyping:!0,isListAllValuesOnFocus:!0,id:"services-points-filter",options:r,scrollbarHeight:f,label:p,controlled:!0,enabledInputToggling:!0}):null})),Ji=()=>{let{options:e,isActive:t,isDisabled:i,isLoading:r,setSelectedOptionByValue:o,service:s,serviceLabel:a}=we(),{mapServiceFilterLabel:n,mapAllServicesLabel:l}=re();return{options:e?.map((e=>"0"===e.id?{...e,label:l}:e))??[],service:s,isActive:t,isDisabled:i,isLoading:r,label:n,handleChangeOption:e=>{e!==j.v6&&o(e)},selectedLabel:"\u0412\u0441\u0435"===a?l:a}},er=(0,o.Pi)((({onChange:e,...t})=>{let{isActive:i,isDisabled:r,isLoading:o,label:n,handleChangeOption:l,options:c,service:u}=Ji(),p=Hi(),h=(0,d.useMemo)((()=>Qi(l,e)),[l,e]);return i?o?(0,a.jsx)(Vi,{"data-testid":"ServicesFilterLoading"}):(0,a.jsx)(s.CommonSelect,{...t,scrollbarHeight:p,containerProps:{width:"full"},testId:"ServiceFilter",onChange:h,options:c,isListAllValuesOnFocus:!0,isSearchWithoutTyping:!0,id:"service-filter",disabled:r,value:u,label:n,enabledInputToggling:!0}):null})),tr=(0,o.Pi)((({slots:e,slotProps:t}={})=>{let{isCustomView:i}=Ie();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.SimpleGrid,{width:"100%",columns:{md:2,xl:4},columnGap:"24px",rowGap:"16px",children:[fi({slot:e?.countryFilter,defaultComponent:Wi,defaultProps:t?.countryFilter}),fi({slot:e?.servicesFilter,defaultComponent:er,defaultProps:t?.servicesFilter}),fi({slot:e?.currencyFilter,defaultComponent:Gi,defaultProps:t?.currencyFilter}),fi({slot:e?.servicePointsFilter,defaultComponent:Xi,defaultProps:t?.servicePointsFilter})]}),i?null:(0,a.jsxs)(s.HStack,{w:"full",justifyContent:"space-between",children:[fi({slot:e?.openFilter,defaultComponent:Ki,defaultProps:t?.openFilter}),fi({slot:e?.resetFilter,defaultComponent:Zi,defaultProps:t?.resetFilter})]})]})})),ir=class{lastServices;lastCurrencies;agentsParamsStore;constructor(){(0,O.ky)(this),this.lastServices=[],this.lastCurrencies=[]}init(){this.setAddressObjectId(gt)}get params(){return this.agentsParamsStore.params}setRootId(e){this.agentsParamsStore.updateParams({[bi]:e})}getRootId(){return this.agentsParamsStore.getParam(bi)}clearRootId(){this.agentsParamsStore.deleteParam(bi)}setPointTypeBank(e){this.agentsParamsStore.updateParams({[dt]:e})}getPointTypeBank(){return this.agentsParamsStore.getParam(dt)}clearPointTypeBank(){this.agentsParamsStore.deleteParam(dt)}setPointTypeTradingNetwork(e){this.agentsParamsStore.updateParams({[ct]:e})}getPointTypeTradingNetwork(){return this.agentsParamsStore.getParam(ct)}clearPointTypeTradingNetwork(){this.agentsParamsStore.deleteParam(ct)}setOrganizationType(e){this.agentsParamsStore.updateParams({[Li]:e})}getOrganizationType(){return this.agentsParamsStore.getParam(Li)}clearOrganizationType(){this.agentsParamsStore.deleteParam(Li)}setOpen(e){e?this.agentsParamsStore.updateParams({open:e}):this.clearOpen()}getOpen(){return"true"===this.agentsParamsStore.getParam(ot)}clearOpen(){this.agentsParamsStore.deleteParam(ot)}setCountry(e){this.setAddressObjectId(e)}clearCountry(){this.clearAddressObjectId()}getCountry(){return this.getAddressObjectId()}setBox(e){this.agentsParamsStore.updateParams({[Pi]:e})}getBox(){return this.agentsParamsStore.getParam(Pi)}clearBox(){this.agentsParamsStore.deleteParam(Pi)}
1setSort(e){this.agentsParamsStore.updateParams({[Ti]:e})}getSort(){return this.agentsParamsStore.getParam(Ti)}clearSort(){this.agentsParamsStore.deleteParam(Ti)}setAddressTruncateLevel(e){this.agentsParamsStore.updateParams({[Ii]:e})}getAddressTruncateLevel(){return this.agentsParamsStore.getParam(Ii)}clearAddressTruncateLevel(){this.agentsParamsStore.deleteParam(Ii)}setAddressObjectId(e){this.agentsParamsStore.updateParams({[ki]:e})}getAddressObjectId(){return this.agentsParamsStore.getParam(ki)}clearAddressObjectId(){this.agentsParamsStore.deleteParam(ki)}setServicesWithCurrencies({services:e=this.lastServices,currencies:t=this.lastCurrencies}){let i=((e,t)=>e.length>0&&t.length>0?e.reduce(((e,i,r,o)=>("0"!==i&&(e+=_i(i,t),zi(o,r)||(e+=" or ")),e)),s.EMPTY_STRING_STATE):0!==t.length?0===e.length?t.join(" or "):_i(e[0],t):void 0)(e,t);this.setLastCurrencies(t),this.setLastServices(e),this.agentsParamsStore.updateParams({services:i})}getServices(){return this.agentsParamsStore.getParam(at)}clearServices(){this.agentsParamsStore.deleteParam(at)}setLastServices(e){this.lastServices=e}setLastCurrencies(e){this.lastCurrencies=e}setLanguage(e){this.agentsParamsStore.updateParams({[Oi]:e})}getLanguage(){return this.agentsParamsStore.getParam(Oi)}clearLanguage(){this.agentsParamsStore.deleteParam(Oi)}setLimit(e){this.agentsParamsStore.updateParams({[wi]:e})}getLimit(){return Number(this.agentsParamsStore.getParam(wi))}clearLimit(){this.agentsParamsStore.deleteParam(wi)}setLocationService(e){this.agentsParamsStore.updateParams({[Ei]:e})}getLocationService(){return this.agentsParamsStore.getParam(Ei)}clearLocationService(){this.agentsParamsStore.deleteParam(Ei)}setFields(e){this.agentsParamsStore.updateParams({[ji]:e.join(",")})}clearFields(){this.agentsParamsStore.deleteParam(ji)}getFields(){return this.agentsParamsStore.getParam(ji)}};U([(0,w.f3)(Q.AgentsParamsStore)],ir.prototype,"agentsParamsStore",2),U([(0,w.zY)()],ir.prototype,"init",1),ir=U([(0,w.b2)()],ir);var rr={gridSize:64},or=class{mapQueryAdapter;markerStore;clusterStore;geolocationStore;agentsStore;featuresStore;mapStateStore;mapModuleStore;mapLocationStore;mapUiStore;viewFilterStore;mapApiFacade;searchStore;pointsListStore;pointQueryStore;queryStore;mapReadyAdapter;constructor(){(0,O.ky)(this)}init(){this.markerStore.setClusterStore(this.clusterStore),this.clusterStore.setMarkerStore(this.markerStore)}initializeMap=({map:e,handlers:t,clusterByGridParams:i})=>{this.clusterStore?.setClusterByGridParams(i??rr),this?.mapStateStore?.setMap(e),this.mapUiStore.setHandlers(t)};get view(){return this.viewFilterStore?.view??null}get mapApi(){return this.mapApiFacade}};U([(0,w.f3)(Q.MapQueryAdapter)],or.prototype,"mapQueryAdapter",2),U([(0,w.f3)(Q.MarkerStore)],or.prototype,"markerStore",2),U([(0,w.f3)(Q.ClusterStore)],or.prototype,"clusterStore",2),U([(0,w.f3)(Q.GeolocationStore)],or.prototype,"geolocationStore",2),U([(0,w.f3)(Q.AgentsStore)],or.prototype,"agentsStore",2),U([(0,w.f3)(Q.FeaturesStore)],or.prototype,"featuresStore",2),U([(0,w.f3)(Q.MapStateStore)],or.prototype,"mapStateStore",2),U([(0,w.f3)(Q.MapModuleStore)],or.prototype,"mapModuleStore",2),U([(0,w.f3)(Q.MapLocationStore)],or.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.MapUiStore)],or.prototype,"mapUiStore",2),U([(0,w.f3)(Q.ViewFilterStore)],or.prototype,"viewFilterStore",2),U([(0,w.f3)(Q.MapApiFacade)],or.prototype,"mapApiFacade",2),U([(0,w.f3)(Q.SearchStore)],or.prototype,"searchStore",2),U([(0,w.f3)(Q.PointsListStore)],or.prototype,"pointsListStore",2),U([(0,w.f3)(Q.PointQueryStore)],or.prototype,"pointQueryStore",2),U([(0,w.f3)(Q.QueryStore)],or.prototype,"queryStore",2),U([(0,w.f3)(Q.MapReadyAdapter)],or.prototype,"mapReadyAdapter",2),U([(0,w.zY)()],or.prototype,"init",1),or=U([(0,w.b2)()],or);var sr=(0,d.createContext)(null),ar=(0,o.Pi)((({children:e,store:t})=>(0,a.jsx)(sr.Provider,{value:t,children:e}))),nr=(e,t)=>
1{if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let[i,r]of e.entries()){let e=t[i];if("object"!=typeof r||null===r){if(r!==e)return!1}else if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length||!r.every(((t,i)=>t===e[i])))return!1}else if(r!==e)return!1}return!0},lr=class{filtersStore;queryStore;mapLocalizationStore;mapStore;userLocationStore;mapApi;api;agentsParamsAdapter;filtersReadyAdapter;mapReadyAdapter;staticFilterHelperStore;mapStartupManager;mapLocationStore;searchStore;mapUiStore;pointsListStore;agentsStore;markerStore;clusterStore;featuresStore;mapQueryAdapter;mapStateStore;pointQueryStore;dynamicData;lastCustomViewState=!1;lastCountryCode;constructor(){(0,O.ky)(this)}init(){this.initReactions()}get isShowReset(){return!this.dynamicData.filtersData?.isHideReset}get customContent(){let e=this.filtersStore.countryFilterStore.countryCode;if(e)return this.dynamicData.custom?.has(e)?this.dynamicData.custom.get(e):void 0}get customContentByQuery(){let e=this.queryStore.searchParams,t=this.customContent?.find((e=>""===e.query.toString()));return(0,I.C_)(this.customContent,e,[nt])?.content??t?.content}get topAndBottomByCountry(){let e=this.filtersStore.countryFilterStore.countryCode;if(e&&this.dynamicData.bottomAndTopByCountry&&this.dynamicData.bottomAndTopByCountry.has(e))return this.dynamicData.bottomAndTopByCountry.get(e)}get topByCountry(){if(this.topAndBottomByCountry)return this.topAndBottomByCountry.top}get bottomByCountry(){if(this.topAndBottomByCountry)return this.topAndBottomByCountry.bottom}get countryCodeWithMapView(){return this.dynamicData.filtersData.country?.options.filter((e=>e.view===k.Y1.Map||e.view===k.Y1.MapAndList)).map((e=>e.value))??[gt]}reset=()=>{this.filtersStore.reset(),(this.filtersStore.countryFilterStore.isHomeCountry||this.filtersStore.countryFilterStore.isOneCountry)&&!this.searchStore.inputText&&(this?.mapStartupManager.resetLocation(),this.markerStore.resetActive(),this.clusterStore.resetActive())};initReactions(){(0,O.U5)((()=>this.filtersStore.countryFilterStore.countryCode),((e,t)=>{if(!e||e===t||!t)return;let i=()=>this.handleCountryReady(e);if(this.queryStore.isReady&&!this.userLocationStore?.isLoading&&this.mapStateStore.isMapInDom)i();else{let e=(0,O.EH)((()=>{this.queryStore.isReady&&!this.userLocationStore?.isLoading&&this.mapStateStore.isMapInDom&&(i(),e())}))}})),(0,O.U5)((()=>[this.filtersStore.countryFilterStore.countryCode,this.filtersStore.countryFilterStore.options,this.filtersStore.viewFilterStore.view]),(([e,t,i],[r,o,s])=>{if(e!==r&&!e&&!r||!t||!o||i===s)return;let a=()=>e?this.handleCountryReady(e):null;if(this.queryStore.isReady&&!this.userLocationStore?.isLoading&&this.mapStateStore.isMapInDom)a();else{let e=(0,O.EH)((()=>{this.queryStore.isReady&&!this.userLocationStore?.isLoading&&this.mapStateStore.isMapInDom&&(a(),e())}))}})),(0,O.U5)((()=>[this.filtersStore?.openFilterStore.isOpen,this.filtersStore.currencyFilterStore.selectedValues,this.filtersStore.serviceFilterStore.service,this.filtersStore.servicePointsFilterStore.selectedValue]),(()=>{this.featuresStore?.clearFeature()}),{equals:nr}),(0,O.U5)((()=>this.filtersStore.viewFilterStore.isCustomView),(e=>{e&&(this.mapQueryAdapter.deleteLocation(),this.filtersStore.filterAdapter.deleteOpen(),this.mapQueryAdapter.deleteZoom(),this.lastCustomViewState=!0)})),(0,O.U5)((()=>this.filtersStore.viewFilterStore.isOnlyList),(()=>{this.filtersStore.viewFilterStore.isOnlyList&&(this.mapQueryAdapter.deleteLocation(),this.mapQueryAdapter.deleteZoom())})),(0,O.U5)((()=>[this.filtersStore.viewFilterStore.switcherView,this.filtersStore.viewFilterStore.view]),(()=>{let e=this.filtersStore.viewFilterStore.isNotMapView;this.mapUiStore.setPointerEventDisabled(e),this.mapUiStore.setMapHidden(e)})),(0,O.gx)((()=>this.filtersReadyAdapter.isViewReady&&this.filtersStore.viewFilterStore.view===k.Y1.MapAndList&&this.filtersStore.viewFilterStore.switcherView===k.Y1.Map),(()=>{this.mapUiStore.setMapHidden(!1),this.mapUiStore.setPointerEventDisabled(!1)})),(0,O.gx)((()=>this.queryStore.isReady),(()=>this.pointQueryStore.initialize(this.countryCodeWithMapView))),(0,O.gx)((()=>this.mapReadyAdapter.isPointReady&&this.mapReadyAdapter.isPointTypeReady),(()=>{this.mapQueryAdapter.deleteAll(),this.filtersStore.filterAdapter.deleteAll(),this.queryStore.deleteAllParams(),this.pointQueryStore.findCountryByPoint()})),(0,O.U5)((()=>this.filtersStore.viewFilterStore.isMapView),(()=>{(this.agentsStore.agents?.length??0)>11&&this.pointsListStore.reset()}))}handleCountryReady(e){this.filtersReadyAdapter.isServicesReady&&(this.filtersStore.viewFilterStore.isCustomView||this.applyCountryLocationChange(e),this.filtersStore.initializeByCountry(e))}applyCountryLocationChange(e){let t=this.staticFilterHelperStore.findOptionByCountry(e);if(!t)return;let{coordinates:i}=t;this.mapLocationStore.isLoading||this.mapLocationStore?.setBounds(i),this.filtersStore.countryFilterStore.isHomeCountry&&this?.mapStartupManager.resetLocation(),this.searchStore.reset()}};U([(0,w.f3)(Q.FiltersStore)],lr.prototype,"filtersStore",2),U([(0,w.f3)(Q.QueryStore)],lr.prototype,"queryStore",2),U([(0,w.f3)(Q.MapLocalizationStore)],lr.prototype,"mapLocalizationStore",2),U([(0,w.f3)(Q.MapStore)],lr.prototype,"mapStore",2),U([(0,w.f3)(Q.UserLocationStore)],lr.prototype,"userLocationStore",2),U([(0,w.f3)(Q.MapApiFacade)],lr.prototype,"mapApi",2),U([(0,w.f3)(Q.ApiServices)],lr.prototype,"api",2),U([(0,w.f3)(Q.AgentsParamsAdapter)],lr.prototype,"agentsParamsAdapter",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],lr.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.MapReadyAdapter)],lr.prototype,"mapReadyAdapter",2),U([(0,w.f3)(Q.StaticFiltersHelperStore)],lr.prototype,"staticFilterHelperStore",2),U([(0,w.f3)(Q.MapStartupManager)],lr.prototype,"mapStartupManager",2),U([(0,w.f3)(Q.MapLocationStore)],lr.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.SearchStore)],lr.prototype,"searchStore",2),U([(0,w.f3)(Q.MapUiStore)],lr.prototype,"mapUiStore",2),U([(0,w.f3)(Q.PointsListStore)],lr.prototype,"pointsListStore",2),U([(0,w.f3)(Q.AgentsStore)],lr.prototype,"agentsStore",2),U([(0,w.f3)(Q.MarkerStore)],lr.prototype,"markerStore",2),U([(0,w.f3)(Q.ClusterStore)],lr.prototype,"clusterStore",2),U([(0,w.f3)(Q.FeaturesStore)],lr.prototype,"featuresStore",2),U([(0,w.f3)(Q.MapQueryAdapter)],lr.prototype,"mapQueryAdapter",2),U([(0,w.f3)(Q.MapStateStore)],lr.prototype,"mapStateStore",2),U([(0,w.f3)(Q.PointQueryStore)],lr.prototype,"pointQueryStore",2),U([(0,w.f3)(Q.DynamicDataStore)],lr.prototype,"dynamicData",2),U([(0,w.zY)()],lr.prototype,"init",1),lr=U([(0,w.b2)()],lr);var dr=class{isLoading=!1;suggestOptions=[];inputText="";optionValue=null;countryFilterStore;mapLocationStore;mapStateStore;mapModuleStore;mapApi;apiServices;getAddressByCoords=null;getSuggest=void 0;getSearch=void 0;constructor(){(0,O.ky)(this)}init(){this.initMethods()}setLoading=e=>{this.isLoading=e};setInputText=e=>{this.inputText=e};setSuggestOptions=e=>{this.suggestOptions=e};reset=()=>{this.setInputText(""),this.setOptionValue(null),this.setSuggestOptions([]),this.setLoading(!1)};setOptionValue=e=>{this.optionValue=e};getSuggestWithOptions=(e,t)=>{let i=this.mapLocationStore.currentBounds,r=this.countryFilterStore.countryCode;
1return this.getSuggest?this.getSuggest(e,t?.isAddBounds?i:void 0,t?.isAddCountry?r??void 0:void 0):Promise.resolve([])};initMethods=()=>{let e=this.apiServices.getOriginal("getSuggest"),t=this.apiServices.getOriginal("getSearch");this.getSuggest=(t,i,r)=>e?e({value:t,country:r,bounds:i,apikey:this.mapStateStore?.suggestApiKey}):this.defaultSuggestMethod(t,i,r),this.getSearch=e=>t?t({value:e}):this.defaultSearchMethod(e)};defaultSuggestMethod=(e,t,i)=>{if(!this.mapModuleStore?.isYmaps2Ready)throw new Error("ymaps \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d!");return(0,E.Pn)({text:e,bounds:t,country:i,apikey:this.mapStateStore?.suggestApiKey})};defaultSearchMethod=e=>{if(!this.mapModuleStore?.isYmaps2Ready)throw new Error("ymaps \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d!");return(0,E.yC)({searchCode:e})}};U([(0,w.f3)(Q.CountryFilterStore)],dr.prototype,"countryFilterStore",2),U([(0,w.f3)(Q.MapLocationStore)],dr.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.MapStateStore)],dr.prototype,"mapStateStore",2),U([(0,w.f3)(Q.MapModuleStore)],dr.prototype,"mapModuleStore",2),U([(0,w.f3)(Q.MapApiFacade)],dr.prototype,"mapApi",2),U([(0,w.f3)(Q.ApiServices)],dr.prototype,"apiServices",2),U([(0,w.zY)()],dr.prototype,"init",1),dr=U([(0,w.b2)()],dr);var cr=class{isLoading=!0;isError=!1;userLocation=null;getUserLocation;mapModuleStore;mapApi;dynamicData;constructor(){(0,O.ky)(this)}init(){this.userLocation=this.dynamicData.homeUserLocation??null,this.getUserLocation=this.mapApi.getUserLocation,(0,O.gx)((()=>!!this.mapModuleStore?.areYmapsModulesLoaded),(()=>{this.userLocation?this.setLoading(!1):this.updateLocation()})),(0,O.U5)((()=>this.dynamicData.homeUserLocation??null),(e=>{this.isLoading||(this.setLoading(!0),e?(this.setUserLocation(e),this.setLoading(!1)):this.updateLocation())}))}get disabledDetectUserLocation(){return!!this.dynamicData.config.disabledDetectUserLocation}setLoading(e){this.isLoading=e}setIsError(e){this.isError=e}setUserLocation(e){this.userLocation=e}async updateLocation(){try{let e=this.disabledDetectUserLocation||!this?.getUserLocation?St:await this.getUserLocation();if(!e)throw new Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f");this.setUserLocation(e)}catch(e){this.setIsError(!0),globalThis.console?.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:",e),this.setUserLocation(St)}finally{this.setLoading(!1)}}};U([(0,w.f3)(Q.MapModuleStore)],cr.prototype,"mapModuleStore",2),U([(0,w.f3)(Q.MapApiFacade)],cr.prototype,"mapApi",2),U([(0,w.f3)(Q.DynamicDataStore)],cr.prototype,"dynamicData",2),U([(0,w.zY)()],cr.prototype,"init",1),cr=U([(0,w.b2)()],cr);var ur=class{userLocationStore;constructor(){(0,O.ky)(this)}get location(){return this.userLocationStore.userLocation}get isLoading(){return this.userLocationStore.isLoading}get isError(){return this.userLocationStore.isError}};U([(0,w.f3)(Q.UserLocationStore)],ur.prototype,"userLocationStore",2),ur=U([(0,w.b2)()],ur);var pr=class{dynamicData;constructor(){(0,O.ky)(this)}get table(){return this.dynamicData.table}get=(e,t)=>this.table?.get(e)??t;set=(e,t)=>this.table?.set(e,t)};U([(0,w.f3)(Q.DynamicDataStore)],pr.prototype,"dynamicData",2),pr=U([(0,w.b2)()],pr);var hr={MAP_DESCRIPTION:"map.description",MAP_AGENT_NAME:"map.agent.name",MAP_AGENT_SHARE:"map.agent.share",MAP_ADDRESS:"map.address",MAP_PHONE:"map.phone",MAP_CONTACT_PERSON:"map.contactPerson",MAP_DIRECTIONS_LINK:"map.directionsLink",MAP_COUNTRY_FILTER_LABEL:"map.country.filter.label",MAP_CURRENCY_FILTER_LABEL:"map.currency.filter.label",MAP_ALL_CURRENCIES_LABEL:"map.currency.all.label",MAP_SERVICE_FILTER_LABEL:"map.service.filter.label",MAP_ALL_SERVICES_LABEL:"map.service.all.label",MAP_SERVICES_POINTS_FILTER_LABEL:"map.servicesPoints.filter.label",MAP_ALL_SERVICE_POINTS_LABEL:"map.servicesPoints.all.label",MAP_OPEN_FILTER_LABEL:"map.open.filter.label",MAP_RESET_FILTER:"map.reset.filter",MAP_SEARCH_PLACEHOLDER:"map.search.placeholder",MAP_SEARCH_NOT_FOUND_HEADER:"map.search.notFound.header",MAP_SEARCH_NOT_FOUND_DESCRIPTION:"map.search.notFound.description",MAP_SWITCHER_MAP_LABEL:"map.switcher.map.label",MAP_SWITCHER_LIST_LABEL:"map.switcher.list.label",MAP_AGENTS_CURRENCY_RECEIVING:"map.agents.currency.receiving",MAP_AGENTS_CURRENCY_SENDING:"map.agents.currency.sending",MAP_FILTERS_HEADER:"map.filters.header",MAP_FILTERS_BUTTON_SHOW:"map.filters.buttonShow",MAP_NO_POINTS_MESSAGE:"map.noPoints.message",MAP_LOADING_LIST_PLACEHOLDER:"map.loading.list.placeholder",MAP_COPY_TOAST:"map.copy.toast",MAP_ERROR_LOADING_HEADER:"map.error.loading.header",MAP_ERROR_LOADING_DESCRIPTION:"map.error.loading.description",MAP_ORIENTATION_FAILED_TEXT:"map.orientation.failed.text",MAP_AGENTS_TOOLTIP_LABEL:"map.agents.tooltip.label"},yr={MAP_DESCRIPTION:"\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \xab\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u041a\u043e\u0440\u043e\u043d\u0430\xbb",MAP_AGENT_NAME:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438",MAP_AGENT_SHARE:"\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f",MAP_ADDRESS:"\u0410\u0434\u0440\u0435\u0441",MAP_PHONE:"\u0422\u0435\u043b\u0435\u0444\u043e\u043d",MAP_CONTACT_PERSON:"\u0420\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u044b",MAP_DIRECTIONS_LINK:"\u041a\u0430\u043a \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f",MAP_COUNTRY_FILTER_LABEL:"\u0421\u0442\u0440\u0430\u043d\u0430",MAP_CURRENCY_FILTER_LABEL:"\u0412\u0430\u043b\u044e\u0442\u0430",MAP_ALL_CURRENCIES_LABEL:"\u0412\u0441\u0435 \u0432\u0430\u043b\u044e\u0442\u044b",MAP_SERVICE_FILTER_LABEL:"\u0423\u0441\u043b\u0443\u0433\u0430",MAP_ALL_SERVICES_LABEL:"\u0412\u0441\u0435 \u0443\u0441\u043b\u0443\u0433\u0438",MAP_SERVICES_POINTS_FILTER_LABEL:"\u041f\u0443\u043d\u043a\u0442\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f",MAP_ALL_SERVICE_POINTS_LABEL:"\u0412\u0441\u0435 \u043f\u0443\u043d\u043a\u0442\u044b",MAP_OPEN_FILTER_LABEL:"\u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u043e",MAP_RESET_FILTER:"\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u044b",MAP_SEARCH_PLACEHOLDER:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u043e\u0440\u043e\u0434, \u0443\u043b\u0438\u0446\u0443",MAP_SEARCH_NOT_FOUND_HEADER:"\u041d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e",MAP_SEARCH_NOT_FOUND_DESCRIPTION:"\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0430\u0434\u0440\u0435\u0441",MAP_SWITCHER_MAP_LABEL:"\u041d\u0430 \u043a\u0430\u0440\u0442\u0435",MAP_SWITCHER_LIST_LABEL:"\u0421\u043f\u0438\u0441\u043a\u043e\u043c",MAP_AGENTS_CURRENCY_RECEIVING:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435",MAP_AGENTS_CURRENCY_SENDING:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430",MAP_FILTERS_HEADER:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",MAP_FILTERS_BUTTON_SHOW:"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c",MAP_NO_POINTS_MESSAGE:"\u0412 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0435\u0442 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0434\u0440\u0435\u0441",MAP_LOADING_LIST_PLACEHOLDER:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f...",MAP_COPY_TOAST:"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430",MAP_ERROR_LOADING_HEADER:"\u041a\u0430\u0440\u0442\u0430 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0430\u0441\u044c",MAP_ERROR_LOADING_DESCRIPTION:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443",MAP_ORIENTATION_FAILED_TEXT:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e",MAP_AGENTS_TOOLTIP_LABEL:"\u041f\u0443\u043d\u043a\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d \u043f\u043b\u0430\u0442\u0435\u0436"},gr=Object.values(hr),Sr=class{mapLocalizationStore;constructor(){(0,O.ky)(this)}getLocalizedValue=e=>this.mapLocalizationStore.get(hr[e],yr[e]);get mapDescription(){return this.getLocalizedValue("MAP_DESCRIPTION")}get mapAgentName(){return this.getLocalizedValue("MAP_AGENT_NAME")}get mapAgentShare(){return this.getLocalizedValue("MAP_AGENT_SHARE")}get mapAddress(){return this.getLocalizedValue("MAP_ADDRESS")}get mapPhone(){return this.getLocalizedValue("MAP_PHONE")}get mapContactPerson(){return this.getLocalizedValue("MAP_CONTACT_PERSON")}get mapDirectionsLink(){return this.getLocalizedValue("MAP_DIRECTIONS_LINK")}get mapCountryFilterLabel(){return this.getLocalizedValue("MAP_COUNTRY_FILTER_LABEL")}get mapCurrencyFilterLabel(){return this.getLocalizedValue("MAP_CURRENCY_FILTER_LABEL")}get mapAllCurrenciesLabel(){return this.getLocalizedValue("MAP_ALL_CURRENCIES_LABEL")}get mapServiceFilterLabel(){return this.getLocalizedValue("MAP_SERVICE_FILTER_LABEL")}get mapAllServicesLabel(){return this.getLocalizedValue("MAP_ALL_SERVICES_LABEL")}get mapServicesPointsFilterLabel(){return this.getLocalizedValue("MAP_SERVICES_POINTS_FILTER_LABEL")}get mapAllServicePointsLabel(){return this.getLocalizedValue("MAP_ALL_SERVICE_POINTS_LABEL")}
1get mapOpenFilterLabel(){return this.getLocalizedValue("MAP_OPEN_FILTER_LABEL")}get mapResetFilter(){return this.getLocalizedValue("MAP_RESET_FILTER")}get mapSearchPlaceholder(){return this.getLocalizedValue("MAP_SEARCH_PLACEHOLDER")}get mapSearchNotFoundHeader(){return this.getLocalizedValue("MAP_SEARCH_NOT_FOUND_HEADER")}get mapSearchNotFoundDescription(){return this.getLocalizedValue("MAP_SEARCH_NOT_FOUND_DESCRIPTION")}get mapSwitcherMapLabel(){return this.getLocalizedValue("MAP_SWITCHER_MAP_LABEL")}get mapSwitcherListLabel(){return this.getLocalizedValue("MAP_SWITCHER_LIST_LABEL")}get mapAgentsCurrencySending(){return this.getLocalizedValue("MAP_AGENTS_CURRENCY_SENDING")}get mapAgentsCurrencyReceiving(){return this.getLocalizedValue("MAP_AGENTS_CURRENCY_RECEIVING")}get mapAgentsTooltipLabel(){return this.getLocalizedValue("MAP_AGENTS_TOOLTIP_LABEL")}get mapFiltersButtonShow(){return this.getLocalizedValue("MAP_FILTERS_BUTTON_SHOW")}get mapFiltersHeader(){return this.getLocalizedValue("MAP_FILTERS_HEADER")}get mapNoPointsMessage(){return this.getLocalizedValue("MAP_NO_POINTS_MESSAGE")}get mapLoadingListPlaceholder(){return this.getLocalizedValue("MAP_LOADING_LIST_PLACEHOLDER")}get mapCopyToast(){return this.getLocalizedValue("MAP_COPY_TOAST")}get mapErrorLoadingHeader(){return this.getLocalizedValue("MAP_ERROR_LOADING_HEADER")}get mapErrorLoadingDescription(){return this.getLocalizedValue("MAP_ERROR_LOADING_DESCRIPTION")}get mapOrientationFailedText(){return this.getLocalizedValue("MAP_ORIENTATION_FAILED_TEXT")}};U([(0,w.f3)(Q.MapLocalizationStore)],Sr.prototype,"mapLocalizationStore",2),Sr=U([(0,w.b2)()],Sr);var mr=class{agentsLoading=!0;agents=null;hasNext=!1;mapLocationStore;constructor(){(0,O.ky)(this)}get hasNoAgents(){return!this.agents||0===this.agents.length}resetAgents=()=>{this.mapLocationStore?.setLocation(ht),this.clearAgents()};clearAgents=()=>{this.agents=null};setAgentsLoading=e=>{this.agentsLoading=e};setAgents=e=>{this.agents=e?[...e]:null};setHasNext=e=>{this.hasNext=e};shouldUseDeferred=()=>null!==this.agents&&this.agents.length>0;updateAgents=(e,t)=>{this.setAgents(this.agents?[...this.agents,...e]:e),this.setHasNext(t)}};U([(0,w.f3)(Q.MapLocationStore)],mr.prototype,"mapLocationStore",2),mr=U([(0,w.b2)()],mr);var fr=class{clusterByGridParams;selectedPointId=null;activeClusterId=null;features=null;activeId=null;isLoading=!1;isError=!1;agents=[];visibleClustersMap=new Map;globalClusterClickHandler=null;listenersByCluster=new Map;mapStateStore;mapUiStore;mapLocationStore;markerStore;constructor(){(0,O.ky)(this)}setMarkerStore=e=>{this.markerStore=e};get activeAgent(){return this.agents?.find((e=>e.id===this.activeId))??{}}get featuresIds(){return this?.features?.map((e=>e.id))}get agentIds(){return this?.agents?.map((e=>e.id))}get countInCluster(){return this.features?.length??0}get selectedAgent(){return this.agents.find((e=>e.id===this.selectedPointId))}setActiveClusterId=e=>{this.activeClusterId=e};setClusterByGridParams=e=>{this.clusterByGridParams=e};setActiveId=e=>{this.activeId=e,null===e&&this.setSelectedPointId(null)};checkActiveId=e=>!(!this.activeId||this.activeId!==e);setAgents=e=>{this.agents=[...e]};setFeatures=e=>{this.features=e?[...e]:null};setLoading=e=>{this.isLoading=e};setError=e=>{this.isError=e};setSelectedPointId=e=>{this.selectedPointId=e};selectFirstPointId=()=>{this?.agentIds?.length&&this.setSelectedPointId(this.agentIds[0])};resetActive=()=>{this.setActiveId(null)};setGlobalClusterClickHandler=e=>{this.globalClusterClickHandler=e};handleZoomInCluster=(e,t)=>{let i=t+3;this.mapLocationStore.moveMapToPoint({center:e,zoom:i})};handleActivateCluster=(e,t,i)=>{let r=(e=>{let t=e.currentTarget.dataset.id;if(!t)throw new Error("ID - \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0432 \u044d\u0432\u0435\u043d\u0442\u0435");return t})(t);this.checkActiveId(r)||(this.setActiveId(r),this.setAgents([]),i&&this.mapLocationStore.moveMapToPoint({center:e}))};handleClampZoom=e=>{this.mapLocationStore.moveMapToPoint({center:e,zoom:gs})};handleClusterClickFromEvent=(e,t=!1)=>{try{e.stopPropagation(),this.markerStore?.resetActive?.();let r=this.mapLocationStore.getZoom()??0,o=(i=e,i.currentTarget.dataset.coordinates?.split(",").map(Number));r&&(r<gs-3?this.handleZoomInCluster(o,r):this.handleActivateCluster(o,e,t))}catch(r){console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440:",r)}var i};
1pushToVisibleClustersMap=(e,t)=>{this.visibleClustersMap.set(e,new Set(t))};removeFromVisibleClustersMap=e=>{this.visibleClustersMap.delete(e)};findClusterIdByFeatureId=e=>{for(let[t,i]of this.visibleClustersMap)if(i.has(e))return t;return null};activateCluster=e=>{let t=this.selectedPointId;t&&e.some((e=>e.id===t))||this.markerStore?.resetActive?.(),this.setFeatures(e)};deactivateCluster=()=>{this.setFeatures(null),this.resetActive(),this.setSelectedPointId(null)};attachListenersForActiveCluster=e=>{let t=this.mapStateStore?.getMapContainer();if(!t||this.listenersByCluster.has(e))return;let i=this.handleClickOutside,r=this.handleMapInteraction,o=[{event:"touchend",handler:i},{event:"mouseup",handler:i},{event:"mousedown",handler:r},{event:"touchstart",handler:r}];for(let{event:s,handler:a}of o)t.addEventListener(s,a);this.listenersByCluster.set(e,o)};detachListenersForActiveCluster=e=>{let t=this.mapStateStore?.getMapContainer(),i=this.listenersByCluster.get(e);if(t&&i){for(let{event:e,handler:r}of i)t.removeEventListener(e,r);this.listenersByCluster.delete(e)}};adjustMapCenterForBalloon=e=>{let t=this.mapStateStore?.getMap?.();if(!t||!e)return;let{maxClusterBalloonSize:i,virtualMapPaddingForClusterBalloon:r}=this.mapUiStore,o=t.bounds,s=t.zoom,a={width:t.size.x,height:t.size.y},n=(0,I.Vu)({bounds:o,mapSize:a,padding:r,zoom:s,markerCoordinates:e,maxMarkerBalloonSize:i});n&&this.mapLocationStore.setLocation({bounds:n,duration:600})};handleClickOutside=()=>{this.activeId&&(this.deactivateCluster(),this.markerStore?.resetClickInsideBalloon?.())};handleMapInteraction=()=>{this.markerStore?.resetClickInsideBalloon?.()}};U([(0,w.f3)(Q.MapStateStore)],fr.prototype,"mapStateStore",2),U([(0,w.f3)(Q.MapUiStore)],fr.prototype,"mapUiStore",2),U([(0,w.f3)(Q.MapLocationStore)],fr.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.MarkerStore)],fr.prototype,"markerStore",2),fr=U([(0,w.b2)()],fr);var Ar=class{isFeaturesLoading=!1;features=null;lastFeatures=null;constructor(){(0,O.ky)(this)}get featuresIds(){return this.features?.map((e=>e.id))}get lastFeaturesIds(){return this.lastFeatures?.map((e=>e.id))}get isEmptyFeatures(){return 0===this.features?.length}setIsFeaturesLoading=e=>{this.isFeaturesLoading=e};setLastFeatures=e=>{this.lastFeatures=e?[...e]:null};setFeatures=e=>{if(this.setLastFeatures(e),!e)return void(this.features=null);let t=this.features??[];if(0===t.length)return void(this.features=[...e]);if(t.length+e.length>5e4)return void(this.features=[...e]);let i=this.getNewFeatures(e,t);0!==i.length&&(this.features=this.mergeUniqueFeatures(t,i))};getNewFeatures(e,t){let i=new Set(t.map((e=>e.id)));return e.filter((e=>!i.has(e.id)))}mergeUniqueFeatures(...e){return[...new Map(e.flat().map((e=>[e.id,e]))).values()]}getFeatures=()=>this.features??null;getFeaturesIds=()=>this.features?.map((e=>e.id));clearFeature=()=>{this.features=null};getLastFeatureByPointId=e=>this.lastFeatures?.find((t=>t.id===e))||null};Ar=U([(0,w.b2)()],Ar);var vr=class{geoMarkerCoordinates=null;isGeolocationAlertShown=!1;isGeolocationLoading=!1;isNotFoundAlertShown=!1;constructor(){(0,O.ky)(this)}setNotFoundAlertShown=e=>{this.isNotFoundAlertShown=e};setGeolocationLoading=e=>{this.isGeolocationLoading=e};setGeolocationAlertShown=e=>{this.isGeolocationAlertShown=e};setGeoMarkerCoordinates=e=>{this.geoMarkerCoordinates=e}};vr=U([(0,w.b2)()],vr);var xr=class{controlledLocation=null;centerLocation=null;zoomLocation=null;isDelectUserLocation=!0;mapQueryAdapter;mapReadyAdapter;mapBoundsManager;mapLocationInitializer;mapStateStore;viewFilterStore;dynamicDataStore;constructor(){(0,O.ky)(this)}init(){this.mapLocationInitializer.setMapLocationStore(this),this.mapBoundsManager.setMapLocationStore(this),(0,O.EH)((()=>{}))}get isValidQueryLocation(){let e=this.mapQueryAdapter.getLocation();return!(!e||!(0,I._U)(e.join(",")))}get isLoading(){return this.mapStateStore?.isLoading??!1}get currentBounds(){return this.mapBoundsManager.getCurrentBounds()}get defaultBounds(){return this.mapBoundsManager.defaultBounds}get isDisabledLocation(){return!!this.dynamicDataStore.config?.disabledLocation}getLocation=()=>{let e=this.getBounds()??void 0,t=this.getCenter(),i=this.getZoom();return(!t||!e||null===i)&&globalThis.console.warn("\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044f \u043a\u0430\u0440\u0442\u044b \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e."),{center:t??ht.center,zoom:i??8,boun
1ds:e}};getZoom=()=>this.mapStateStore.getZoom();getCenter=()=>this.mapStateStore.getCenter();getBounds=()=>this.mapStateStore.getBounds();setBounds=(e,t=600)=>{this.mapBoundsManager.setBounds(e,t)};setControlledLocation=e=>{this.controlledLocation=e};setLocation=e=>{e.duration&&(this.mapStateStore?.setMovement(!0),globalThis.setTimeout((()=>this.mapStateStore?.setMovement(!1)),e.duration+500)),e?.center&&this.setCenterWithSync(e.center),e?.zoom&&this.setZoomWithSync(e.zoom),this.setControlledLocation(e)};setCenter=e=>{let t=this.getZoom();t?this.setLocation({zoom:t,center:e}):globalThis.console.error("setCenter \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a this.getZoom() \u0434\u0430\u0435\u0442 null.")};setZoom=e=>{this.setLocation({...this.getLocation(),zoom:e})};setCenterWithSync=e=>{let t=this.viewFilterStore.view===k.Y1.Custom;!e||t||this.isDisabledLocation?this.mapQueryAdapter.deleteLocation():(this.centerLocation=e,this.mapQueryAdapter.setLocation(e))};setZoomWithSync=e=>{e&&this.viewFilterStore.view!==k.Y1.Custom&&!this.isDisabledLocation?(this.zoomLocation=e,this.mapQueryAdapter.setZoom(e)):this.mapQueryAdapter.deleteZoom()};moveMapToPoint=({center:e,zoom:t,duration:i=600})=>{let r=t??this.getZoom()??ys;r&&e?this.setLocation({center:e,duration:i,zoom:r}):globalThis.console.error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430")};getMap=()=>this.mapStateStore?.getMap()};U([(0,w.f3)(Q.MapQueryAdapter)],xr.prototype,"mapQueryAdapter",2),U([(0,w.f3)(Q.MapReadyAdapter)],xr.prototype,"mapReadyAdapter",2),U([(0,w.f3)(new w.ev((()=>Q.MapBoundsManager)))],xr.prototype,"mapBoundsManager",2),U([(0,w.f3)(Q.MapLocationInitializer)],xr.prototype,"mapLocationInitializer",2),U([(0,w.f3)(Q.MapStateStore)],xr.prototype,"mapStateStore",2),U([(0,w.f3)(Q.ViewFilterStore)],xr.prototype,"viewFilterStore",2),U([(0,w.f3)(Q.DynamicDataStore)],xr.prototype,"dynamicDataStore",2),U([(0,w.zY)()],xr.prototype,"init",1),xr=U([(0,w.b2)()],xr);var Cr,Mr=async(e,{timeoutMs:t=1e4,stepMs:i=100,errorMessage:r}={})=>{let o=0;for(;void 0===globalThis[e]&&o<t;)await new Promise((e=>setTimeout(e,i))),o+=i;if(void 0===globalThis[e])throw new TypeError(r||`\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 "${e}" \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d`);return globalThis[e]},br=((Cr=br||{}).Pending="pending",Cr.Loading="loading",Cr.Done="done",Cr.Error="error",Cr),Lr=class{controls=null;components=null;clusterer=null;isYmaps3Ready=!1;isYmaps2Ready=!1;areYmapsModulesLoaded=!1;ymaps3Instance=null;ymaps2Instance=null;mapStateStore;constructor(){(0,O.ky)(this,{ymaps2Instance:!1,ymaps3Instance:!1})}setMapStateStore=e=>{this.mapStateStore||(this.mapStateStore=e,this.loadModules())};get mapSettings(){return{components:this.components,clusterer:this.clusterer}}setComponents=e=>{this.components=e};setControls=e=>{this.controls=e};setClusterer=e=>{this.clusterer=e};setIsYmaps3Ready=e=>{this.isYmaps3Ready=e};setIsYmaps2Ready=e=>{this.isYmaps2Ready=e};setAreYmapsModulesLoaded=e=>{this.areYmapsModulesLoaded=e};setYmaps3Instance=e=>{this.ymaps3Instance=e};setYmaps2Instance=e=>{this.ymaps2Instance=e};sanitizeComponents(e){if(!e)return e;let t=["suggest","yandexMaps","search","route","reactify","projections","overrideKeyVuefy","overrideKey
1Reactify","optionsKeyVuefy","getDefaultConfig","geolocation","fetchConfig","ready","useDomContext","A28__implReactify","strictMode","Config","ThemeContext","TypeContext","ControlContext"],i={...e};for(let r of t)r in i&&delete i[r];return i}async loadModules(){if(this.mapStateStore){this.mapStateStore.setState("loading");try{let{clusterer:e,components:t,controls:i}=await(async()=>{await Mr("ymaps3",{timeoutMs:1e4,stepMs:100,errorMessage:"Yandex Maps 3 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d"}),ymaps3.import.registerCdn("https://cdn.jsdelivr.net/npm/{package}",["@yandex/[email protected]","@yandex/[email protected]"]);let e=ymaps3.import,t=ymaps3.import,[i,r,o]=await Promise.all([ymaps3.import("@yandex/ymaps3-reactify"),t("@yandex/ymaps3-clusterer"),e("@yandex/ymaps3-default-ui-theme"),ymaps3.ready]),s=i.reactify.bindTo(d,N);return{components:s.module(ymaps3),clusterer:s.module(r),controls:s.module(o)}})(),r=await(async()=>(await Mr("ymaps",{timeoutMs:1e4,stepMs:100,errorMessage:"Yandex Maps 2.1 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d"}),new Promise((e=>{ymaps.ready((()=>{e(!0)}))}))))();this.setControls(i),this.setClusterer(e),this.setYmaps3Instance(globalThis.ymaps3),this.setYmaps2Instance(globalThis.ymaps),this.setIsYmaps3Ready(!0),this.setIsYmaps2Ready(r);let o=this.sanitizeComponents(t);this.setComponents(o),this.setAreYmapsModulesLoaded(!0)}catch(e){this.mapStateStore.setState("error"),globalThis.console?.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 JS-\u0431\u0430\u043d\u0434\u043b\u0430 YandexMaps:",e)}}}},Pr=class{state="pending";isLastEmptyUpdate=!1;isMapInitialized=!1;isDiInitialized=!1;map=void 0;isMovement=!1;mapModuleStore;isMapInDom=!1;mapModuleStoreInjected;dynamicData;constructor(){(0,O.ky)(this)}init(){this.setDiInitialized(!0),this.mapModuleStoreInjected?.setMapStateStore?.(this),(0,O.gx)((()=>!!this.map),(()=>{this.setMapInitialized(!0),this.setState("done")}))}get suggestApiKey(){return this.dynamicData.apikey}get alertContent(){return this.dynamicData.alertContent??null}get isError(){return"error"===this.state}get isLoading(){return"loading"===this.state||"pending"===this.state||!this.isDiInitialized}get mapSize(){return{width:this?.map?.size?.x??0,height:this?.map?.size?.y??0}}get yaMarkersCountInDom(){return this.getMap()?.container?.querySelectorAll(".ymaps3x0--marker")?.length}getMap=()=>this?.map;getMapContainer=()=>this.getMap()?.container;setMap=e=>{this.map=e};setLastEmptyUpdate=e=>{this.isLastEmptyUpdate=e};setMovement=e=>{this.isMovement=e};setState=e=>{this.state=e};setMapInitialized=e=>{this.isMapInitialized=e};setDiInitialized=e=>{this.isDiInitialized=e};setMapInDom=e=>{this.isMapInDom=e};getZoom=()=>this.getMap()?.zoom??null;getCenter=()=>this.getMap()?.center??null;getBounds=()=>this.getMap()?.bounds??null};U([(0,w.f3)(Q.MapModuleStore)],Pr.prototype,"mapModuleStoreInjected",2),U([(0,w.f3)(Q.DynamicDataStore)],Pr.prototype,"dynamicData",2),U([(0,w.zY)()],Pr.prototype,"init",1),Pr=U([(0,w.b2)()],Pr);var Tr={coordinates:[[36.803079,55.142226],[37.967466,56.021286]],center:[37.3852725,55.58175599999392],zoom:11.2},Ir={coordinates:[[113.9579,22.4431],[114.1579,22.6431]],center:[114.05,22.3],zoom:12},kr={coordinates:[[32.9361,34.5739],[33.1361,34.7739]],center:[33.0361,34.6739],zoom:12},Or={coordinates:[[76.8459,43.1383],[77.0459,43.3383]],center:[76.9459,43.2383],zoom:12},wr={coordinates:[[128.9756,35.0796],[129.1756,35.2796]],center:[129.0756,35.1796],zoom:12},Er={coordinates:[[105.784,20.961],[105.884,21.061]],center:[105.834,21.011],zoom:12},jr=[{width:560,height:320},{width:560,height:320},{width:560,height:320},{width:664,height:320},{width:664,height:320}],Dr={top:108,right:200,bottom:108,left:64},Nr=[{width:343,height:428},{width:343,height:428},{width:360,height:428},{width:360,height:428},{width:360,height:428}],Rr={top:108,right:108,bottom:16,left:108},Fr=(e,t)=>Array.isArray(e)&&e.length>0?e[0]:e??t,zr=class{isPointerEventDisabled=!1;isMapHidden=!0;overlayHeight=null;view=k.Y1.Map;alertContent=null;maxClusterBalloonSize=(()=>Fr(jr,jr[0]))();virtualMapPaddingForClusterBalloon=Dr;maxMarkerBalloonSize=(()=>Fr(Nr,Nr[0]))();virtualMapPaddingForMarkerBalloon=Rr;handlers=null;mapStateStore;constructor(){(0,O.ky)(this)}setClusterBalloonSize=e=>{this.maxClusterBalloonSize=e};setMarkerBalloonSize=e=>{this.maxMarkerBalloonSize=e};setPointerEventDisabled=e=>{this.isPointerEventDisabled=e};setMapHidden=e=>{this.isMapHidden=e};setOverlayHeight=e=>{this.overlayHeight=e};setView=e=>{this.view=e};setAlertContent=e=>{this.alertContent=e};setHandlers=e=>{this.handlers=e};scrollIntoView=()=>{let e=this.mapStateStore?.getMapContainer();e&&e.scrollIntoView({block:"center",inline:"nearest",behavior:"smooth"})};scrollIntoViewWithTimeout=(e=100)=>setTimeout((()=>{this.scrollIntoView()}),e)};U([(0,w.f3)(Q.MapStateStore)],zr.prototype,"mapStateStore",2),zr=U([(0,w.b2)()],zr);var Br=class{activeMarkerId=null;balloonData=null;isLoading=!1;isError=!1;globalMarkerClickHandler=null;lastZoomWhenClick=0;isClickInsideBalloon=!1;balloonSize=null;mapStateStore;mapUiStore;mapLocationStore;featuresStore;clusterStore;listenersAttached=!1;isMouseInteractionActive=!1;constructor(){(0,O.ky)(this)}init(){this.initGlobalMarkerClickHandler()}setClusterStore=e=>{this.clusterStore=e};handleMouseInteractionStart=()=>{this.isMouseInteractionActive=!0};attachListenersForActiveMarker=()=>{let e=this.mapStateStore?.getMapContainer();!e||this.listenersAttached||(e.addEventListener("touchend",this.handleClickOutside),e.addEventListener("mouseup",this.handleClickOutside),e.addEventListener("mousedown",this.handleMouseInteractionStart),e.addEventListener("mouseup",this.handleMapInteraction),e.addEventListener("touchstart",this.handleMapInteraction),window.addEventListener("mouseup",this.handleMapInteraction),window.addEventListener("blur",this.handleMapInteraction),this.listenersAttached=!0)};detachListenersForActiveMarker=()=>{let e=this.mapStateStore?.getMapContainer();!e||!this.listenersAttached||(e.removeEventListener("touchend",this.handleClickOutside),e.removeEventListener("mouseup",this.handleClickOutside),e.removeEventListener("mousedown",this.handleMouseInteractionStart),e.removeEventListener("mouseup",this.handleMapInteraction),e.removeEventListener("touchstart",this.handleMapInteraction),window.removeEventListener("mouseup",this.handleMapInteraction),window.removeEventListener("blur",this.handleMapInteraction),this.isMouseInteractionActive=!1,this.setIsClickInsideBalloon(!1),this.listenersAttached=!1)};moveToPoint=e=>{this.mapLocationStore.moveMapToPoint({center:e})};adjustMapForBalloon=e=>{let t=this.mapStateStore?.getMap?.();if(!t||!e)return;let i={width:t.size.x,height:t.size.y}
1,r=t.bounds,o=t.zoom,{virtualMapPaddingForMarkerBalloon:s,maxMarkerBalloonSize:a}=this.mapUiStore,n=(0,I.Vu)({bounds:r,mapSize:i,padding:s,zoom:o,markerCoordinates:e,maxMarkerBalloonSize:this.balloonSize??a});n&&this.mapLocationStore.setLocation({bounds:n,duration:600})};focusActiveMarker=(e,t)=>{e?this.moveToPoint(t):this.adjustMapForBalloon(t)};handleClickOutside=e=>{e.preventDefault(),this.setIsClickInsideBalloon(!1),this.activeMarkerId&&(this.setIsClickInsideBalloon(!1),this.setActiveMarkerId(null))};handleMapInteraction=()=>{this.isMouseInteractionActive=!1,this.setIsClickInsideBalloon(!1)};get activeId(){return this.activeMarkerId}get activeFeaturePoint(){return this.featuresStore.lastFeatures?.find((e=>e.id===this.activeMarkerId))??null}get mapBehaviors(){return this.isClickInsideBalloon?[]:void 0}checkActive=e=>this.activeMarkerId===e;setLoading=e=>{this.isLoading=e};setError=e=>{this.isError=e};setBalloonData=e=>{this.balloonData=e};setActiveMarkerId=e=>{this.activeMarkerId=e};resetActive=()=>{this.setActiveMarkerId(null)};clearBalloonData=()=>{this.balloonData=null};setGlobalMarkerClickHandler=e=>{this.globalMarkerClickHandler=e};updateLastZoomWhenClick=()=>{this.lastZoomWhenClick=this.mapStateStore?.getZoom()};setIsClickInsideBalloon=e=>{this.isMouseInteractionActive||(this.isClickInsideBalloon=e)};resetClickInsideBalloon=()=>{this.setIsClickInsideBalloon(!1)};setBalloonSize=e=>{this.balloonSize=e};defaultGlobalMarkerClickHandler=e=>{let t;e.stopPropagation(),this.clusterStore?.resetActive?.(),this.clearBalloonData();try{t=(e=>{let t=e.target.closest("[data-id]");if(!t)throw new Error("\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 data-id");let i=t.dataset.id;if(!i)throw new Error("ID \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 \u043a\u043b\u0438\u043a\u0430");return i})(e)}catch{return}this.checkActive(t)?this.resetActive():this.setActiveMarkerId(t),this.updateLastZoomWhenClick()};initGlobalMarkerClickHandler=()=>{this.setGlobalMarkerClickHandler(this.defaultGlobalMarkerClickHandler)}};U([(0,w.f3)(Q.MapStateStore)],Br.prototype,"mapStateStore",2),U([(0,w.f3)(Q.MapUiStore)],Br.prototype,"mapUiStore",2),U([(0,w.f3)(Q.MapLocationStore)],Br.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.FeaturesStore)],Br.prototype,"featuresStore",2),U([(0,w.zY)()],Br.prototype,"init",1),Br=U([(0,w.b2)()],Br);var _r=class{paginationParams=null;limit=10;isInitial=!1;isUpdating=!0;isError=!1;agentsStore;featuresStore;mapUiStore;openFilterStore;viewFilterStore;countryFilterStore;agentsParamsStore;mapLocationStore;columns=void 0;components=void 0;constructor(){(0,O.ky)(this)}init(){(0,O.U5)((()=>({isListView:this.viewFilterStore.view===k.Y1.List,hasAgents:!!this.agentsStore.agents})),(({isListView:e,hasAgents:t})=>{e&&!t&&this.initializeAgentsIfNeeded()})),(0,O.U5)((()=>({currentBounds:this.mapLocationStore.currentBounds,addressObjectId:this.agentsParamsStore.params?.addressObjectId,services:this.agentsParamsStore.params?.services,open:this.agentsParamsStore.params?.open,rootId:this.agentsParamsStore.params?.rootId,organizationType:this.agentsParamsStore.params?.organizationType})),((e,t)=>{e.currentBounds&&this.setIsUpdating(!0)})),(0,O.U5)((()=>({isUpdating:this.isUpdating})),(({isUpdating:e})=>
1{if(e){let e=setTimeout((()=>{this.isUpdating&&this.setIsUpdating(!1)}),2e3);return()=>clearTimeout(e)}})),(0,O.U5)((()=>[this.featuresStore.lastFeatures,this.featuresStore.isFeaturesLoading]),(([e,t])=>{if(!e||t)return;let i=this.slicedFeatures;if(!i)throw new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0430\u0433\u0435\u043d\u0442\u043e\u0432");this.initialize(i)}),{equals:nr})}get hasEmptyResults(){return this.agentsStore.hasNoAgents}get isLoading(){return this.agentsStore.agentsLoading||this.featuresStore.isFeaturesLoading}get isFirstLoading(){return this.isLoading&&!this.isInitial}get slicedFeatures(){return this.featuresStore.lastFeatures?.slice(0,11)}get isEmpty(){return!this.isUpdating&&!this.isLoading&&!this.isFirstLoading&&!this.isError&&this.hasEmptyResults}get hasContent(){return!this.isUpdating&&!this.isFirstLoading&&!this.isError&&!this.hasEmptyResults}get showLoading(){return(this.isUpdating||this.isFirstLoading||this.isLoading)&&!this.agentsStore.agents?.length}get open(){return this.openFilterStore.isOpen}get columnByCurrentCountry(){let e=this.countryFilterStore.countryCode;return e&&this.columns?this.columns[e]??void 0:void 0}setInitial=e=>{this.isInitial=e};setPaginationParams=e=>{0===e?.offset&&(this.setIsUpdating(!0),this.setError(!1),this.agentsStore.clearAgents(),this.agentsStore.setAgentsLoading(!0)),null===e&&this.setIsUpdating(!1),this.paginationParams=e};setError=e=>{this.isError=e,e&&this.setIsUpdating(!1)};loadNextPage=e=>{if(!this.agentsStore.agents)return;let t=this.agentsStore.agents,i=this.featuresStore.lastFeatures?.slice(t.length,t.length+e+1);i?this.setPaginationParams({features:i,open:this.open,limit:e}):globalThis.console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u043e\u0447\u0435\u043a: \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 IDs \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u043e\u0447\u0435\u043a")};initializeAgentsIfNeeded=()=>{let{agents:e}=this.agentsStore,{setOverlayHeight:t}=this.mapUiStore;e||t(200)};updatePoints=(e,t)=>{this.agentsStore.updateAgents(e,t),this.setIsUpdating(!1),this.setError(!1)};initialize=e=>{this.agentsStore.clearAgents(),this.setError(!1),this.setIsUpdating(!0),e?.length>0?this.setPaginationParams({features:e,limit:10,open:this.open,offset:0}):this.setPaginationParams(null),this.setInitial(!0)};reset(){this.initialize(this.slicedFeatures??[])}setColumns=e=>{this.columns=e};setComponents=e=>{this.components=e};setIsUpdating=e=>{this.isUpdating=e}};U([(0,w.f3)(Q.AgentsStore)],_r.prototype,"agentsStore",2),U([(0,w.f3)(Q.FeaturesStore)],_r.prototype,"featuresStore",2),U([(0,w.f3)(Q.MapUiStore)],_r.prototype,"mapUiStore",2),U([(0,w.f3)(Q.OpenFilterStore)],_r.prototype,"openFilterStore",2),U([(0,w.f3)(Q.ViewFilterStore)],_r.prototype,"viewFilterStore",2),U([(0,w.f3)(Q.CountryFilterStore)],_r.prototype,"countryFilterStore",2),U([(0,w.f3)(Q.AgentsParamsStore)],_r.prototype,"agentsParamsStore",2),U([(0,w.f3)(Q.MapLocationStore)],_r.prototype,"mapLocationStore",2),U([(0,w.zY)()],_r.prototype,"init",1),_r=U([(0,w.b2)()],_r);var Ur=class{queryStore;constructor(){(0,O.ky)(this)}get isQueryReady(){return this.queryStore.isReady}getLocation(){return this.queryStore.getMultiply(Ur.LOCATION_KEY)||null}setLocation(e){this.queryStore.set(Ur.LOCATION_KEY,e.join(","))}deleteLocation(){this.queryStore.delete(Ur.LOCATION_KEY)}getZoom(){return this.queryStore.get(Ur.ZOOM_KEY)||null}setZoom(e){this.queryStore.set(Ur.ZOOM_KEY,e.toString())}deleteZoom(){this.queryStore.delete(Ur.ZOOM_KEY)}getPoint(){return this.queryStore.get(Ur.POINT_KEY)||null}setPoint(e){this.queryStore.set(Ur.POINT_KEY,e.toString())}deletePoint(){this.queryStore.delete(Ur.POINT_KEY)}getPointType(){return this.queryStore.get(Ur.POINT_TYPE_KEY)??null}setPointType(e){this.queryStore.set(Ur.POINT_TYPE_KEY,e.toString())}deletePointType(){this.queryStore.delete(Ur.POINT_TYPE_KEY)}deleteAll(){this.deleteLocation(),this.deleteZoom(),this.deletePoint(),this.deletePointType()}};V(Ur,"LOCATION_KEY",it),V(Ur,"ZOOM_KEY","zoom"),V(Ur,"POINT_KEY",st),V(Ur,"POINT_TYPE_KEY",pt),U([(0,w.f3)(Q.QueryStore)],Ur.prototype,"queryStore",2),Ur=U([(0,w.b2)()],Ur);var Yr=class{readyStore;constructor(){(0,O.ky)(this)}get isLocationReady(){return this.readyStore.checkReady(it)}get isViewReady(){return this.readyStore.checkReady(rt)}get isPointReady(){return this.readyStore.checkReady(st)}get isPointTypeReady(){return this.readyStore.checkReady(pt)}markLocationReady(){this.readyStore.markReady(it)}markViewReady(){this.readyStore.markReady(rt)}markPointReady(){this.readyStore.markReady(st)}markPointTypeReady(){this.readyStore.markReady(pt)}};U([(0,w.f3)(Q.ReadyStore)],Yr.prototype,"readyStore",2),Yr=U([(0,w.b2)()],Yr);var Vr=class{pointId;pointType;countryWithMap;country;yandexLocation;mapQueryAdapter;mapReadyAdapter;featuresStore;clusterStore;markerStore;openTrigger=!1;mapStateStore;mapApi;mapLocationStore;countryFilterStore;constructor(){(0,O.ky)(this)}init(){(0,O.gx)((()=>this.openTrigger&&!!this.yandexLocation&&this.clusterStore.visibleCluster
1sMap.size>0&&this.mapStateStore.isMapInDom),(()=>{let e=this.clusterStore.findClusterIdByFeatureId(this.pointId);e?(this.clusterStore.setActiveClusterId(e),this.clusterStore.setSelectedPointId(this.pointId),this.clusterStore.setActiveId(e)):this.markerStore.setActiveMarkerId(this.pointId),this.setOpenTrigger(!1)})),(0,O.gx)((()=>this.openTrigger&&!!this.yandexLocation&&!!this.featuresStore?.lastFeaturesIds?.length),(()=>{this.markerStore.setActiveMarkerId(this.pointId)}))}initialize(e){let t=this.mapQueryAdapter.getPoint(),i=this.mapQueryAdapter.getPointType();t&&(this.setPointId(t),i&&this.setPointType(i),this.setCountryWithMap(e),this.mapReadyAdapter.markPointReady(),this.mapReadyAdapter.markPointTypeReady(),this.mapStateStore.setState("loading"))}setCountryWithMap(e){this.countryWithMap=e}setCountry=e=>{this.country=e};setYandexLocation=e=>{this.yandexLocation=e};setOpenTrigger=e=>{this.openTrigger=e};async findCountryByPoint(){if(!this.countryWithMap)return globalThis.console.error("\u041e\u0448\u0438\u0431\u043a\u0430! \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u044b \u0441 \u043a\u0430\u0440\u0442\u0430\u043c\u0438"),void this.mapStateStore.setState("done");if(!this.mapApi.fetchAgentsByIds)throw new Error("\u041e\u0448\u0438\u0431\u043a\u0430! \u041d\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 fetchAgentsByIds \u0432 mapApi");for(let e of this.countryWithMap){let t=await this.mapApi.fetchAgentsByIds([{id:this.pointId,metadata:{organizationType:this.pointType}}],{addressObjectId:e,fields:"id,yandexLocation"});if(t.length>0)return(0,O.z)((()=>{this.setYandexLocation(t[0].yandexLocation??t[0].location),this.setCountry(e)})),await new Promise(((t,i)=>{globalThis.setTimeout((()=>{this.yandexLocation?(this.countryFilterStore.setCountryCode(e),this.mapLocationStore.moveMapToPoint({center:(0,E.uG)(this.yandexLocation),zoom:Ss.max-1,duration:0}),t()):(globalThis.console.error("\u041e\u0448\u0438\u0431\u043a\u0430! \u041d\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0434\u043b\u044f \u0442\u043e\u0447\u043a\u0438"),i())}),800)})),void(0,O.z)((()=>{this.setOpenTrigger(!0)}))}this.mapStateStore.setState("done")}setPointId(e){this.pointId=e}setPointType(e){this.pointType=e}};U([(0,w.f3)(Q.MapQueryAdapter)],Vr.prototype,"mapQueryAdapter",2),U([(0,w.f3)(Q.MapReadyAdapter)],Vr.prototype,"mapReadyAdapter",2),U([(0,w.f3)(Q.FeaturesStore)],Vr.prototype,"featuresStore",2),U([(0,w.f3)(Q.ClusterStore)],Vr.prototype,"clusterStore",2),U([(0,w.f3)(Q.MarkerStore)],Vr.prototype,"markerStore",2),U([(0,w.f3)(Q.MapStateStore)],Vr.prototype,"mapStateStore",2),U([(0,w.f3)(Q.MapApiFacade)],Vr.prototype,"mapApi",2),U([(0,w.f3)(Q.MapLocationStore)],Vr.prototype,"mapLocationStore",2),U([(0,w.f3)(Q.CountryFilterStore)],Vr.prototype,"countryFilterStore",2),U([(0,w.zY)()],Vr.prototype,"init",1),Vr=U([(0,w.b2)()],Vr);var Hr=R.z.string().refine((e=>!e.includes(",,")&&e.split(",").every((e=>""!==e.trim())))),Qr=R.z.object({country:R.z.string().length(2),point:R.z.string().optional(),type:R.z.enum(["Bank","TradingNetwork"]).optional(),open:R.z.enum(["true","false"]),view:R.z.enum(["map","list"]),currency:Hr,servicesPoints:Hr,pointTypeBank:Hr,pointTypeTradingNetwork:Hr,services:Hr,location:R.z.string().refine((e=>2===e.split(",").length&&e.split(",").every((e=>!Number.isNaN(Number(e)))))),zoom:R.z.string().refine((e=>!Number.isNaN(Number(e))))}),Wr=(e,t)=>{let i=(e??Qr).shape,r={},o=Object.keys(i);for(let s of o)if(s in t){let e=i[s].safeParse(t[s]);e.success&&(r[s]=e.data)}return r},qr=class{querySchema;queryWorker;isReady=!1;queryParams=O.LO.map();rootStore;dynamicData;constructor(){(0,O.ky)(this)}init(){this.setQueryWorker(this.dynamicData.queryWorker),this.querySchema=this.dynamicData.querySchema??Qr,(0,O.gx)((()=>!!this.queryWorker),(()=>{this.setReady(!0)}))}get searchParams(){let e=new URLSearchParams;for(let[t,i]of this.queryParams.entries())e.set(t,i);return e}get=e=>this.queryParams.get(e);getMultiply=e=>this.get(e)?.split(",")||[];setReady=e=>{this.isReady=e};setQueryWorker=e=>{this.queryWorker=e,this.syncFromWorker()};syncFromWorker=()=>{if(!this.queryWorker)return;let e=this.queryWorker.readQuery();(0,O.z)((()=>{this.queryParams.clear();let t=Wr(this.querySchema,Object.fromEntries(e.entries()));for(let[e,i]of new URLSearchParams(t).entries())this.queryParams.set(e,i)}))};set=(e,t)=>{this.queryParams.set(e,t),this.commitToQueryWorker()};delete=e=>{this.queryParams.delete(e),this.commitToQueryWorker()};setAllParams=e=>{this.queryParams.clear();for(let[t,i]of Object.entries(e))this.queryParams.set(t,i);this.commitToQueryWorker()};deleteAllParams=()=>{this.queryParams.clear(),this.commitToQueryWorker()};commitToQueryWorker=()=>{if(!this.queryWorker)return void globalThis.console?.warn("QueryWorker \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d!");let e=Wr(this.querySchema,Object.fromEntries(this.queryParams.entr
1ies()));this.queryWorker.updateQuery(new URLSearchParams(e))}};U([(0,w.f3)(Q.DynamicDataStore)],qr.prototype,"dynamicData",2),U([(0,w.zY)()],qr.prototype,"init",1),qr=U([(0,w.b2)()],qr);var Gr=class{filtersReadyAdapter;servicePointsFilterStore;currencyFilterStore;countryFilterStore;serviceFilterStore;openFilterStore;viewFilterStore;filterAdapter;dynamicData;constructor(){(0,O.ky)(this)}init(){this.initReactions()}get config(){return this.dynamicData.config}get filtersData(){return this.dynamicData.filtersData}initReactions(){(0,O.U5)((()=>[this.countryFilterStore.countryCode,this.filtersReadyAdapter.isCountryReady,this.countryFilterStore.viewByCountry,this.config?.disabledAllOptionsInFiltersIfCustom]),(()=>{if(this.countryFilterStore.countryCode&&this.filtersReadyAdapter.isCountryReady){let e=this.countryFilterStore.viewByCountry;if(this.initAllOptionHide(),!e)throw new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432!");this.viewFilterStore.initialize(e)}}))}initAllOptionHide=()=>{let e=this.countryFilterStore.viewByCountry===k.Y1.Custom&&!!this.config?.disabledAllOptionsInFiltersIfCustom;this.serviceFilterStore.setHideAllOption(e),this.servicePointsFilterStore.setHideAllOption(e),this.currencyFilterStore.setHideAllOption(e)};get isNoFilters(){return!this.countryFilterStore.isActive&&!this.currencyFilterStore.isActive&&!this.openFilterStore.isActive&&!this.serviceFilterStore.isActive&&!this.servicePointsFilterStore.isActive}get isLoading(){return this.countryFilterStore.isLoading||this.currencyFilterStore.isLoading||this.serviceFilterStore.isLoading||this.servicePointsFilterStore.isLoading}initializeByCountry=e=>{this.serviceFilterStore.initializeByCountry(e),this.currencyFilterStore.initializeByCountry(e),this.servicePointsFilterStore.initializeByCountry(e)};reset=()=>{if(this.countryFilterStore.reset(),!this.countryFilterStore.countryCode)throw new Error("\u041a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b \u043d\u0435 \u043e\u043f\u0435\u0440\u0434\u0435\u043b\u0435\u043d!");this.initializeByCountry(this.countryFilterStore.countryCode),this.openFilterStore.reset(),this.viewFilterStore.view===k.Y1.MapAndList&&this.viewFilterStore.setSwitcherView(k.Y1.Map)}};U([(0,w.f3)(new w.ev((()=>Q.FiltersReadyAdapter)))],Gr.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(new w.ev((()=>Q.ServicePointsFilterStore)))],Gr.prototype,"servicePointsFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.CurrencyFilterStore)))],Gr.prototype,"currencyFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.CountryFilterStore)))],Gr.prototype,"countryFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.ServiceFilterStore)))],Gr.prototype,"serviceFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.OpenFilterStore)))],Gr.prototype,"openFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.ViewFilterStore)))],Gr.prototype,"viewFilterStore",2),U([(0,w.f3)(new w.ev((()=>Q.QueryFilterAdapter)))],Gr.prototype,"filterAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],Gr.prototype,"dynamicData",2),U([(0,w.zY)()],Gr.prototype,"init",1),Gr=U([(0,w.b2)()],Gr);var Kr=class{countryCode;isActive=!1;queryFilterAdapter;userLocationProvider;filtersReadyAdapter;dynamicData;constructor(){(0,O.ky)(this)}init(){(0,O.gx)((()=>!(!this.queryFilterAdapter.isQueryReady||this.userLocationProvider.isLoading)),(()=>this.initialize())),(0,O.U5)((()=>this.staticOptions),(e=>{this.setActive(e.length>1)})),(0,O.U5)((()=>this.staticOptions),(()=>{this.filtersReadyAdapter.isCountryReady&&(this.staticOptions.some((e=>e.value===this.countryCode))||this.setCountryCode(this.staticOptions[0]?.value??gt))}))}get staticOptions(){return this.dynamicData.filtersData?.country?.options??[]}initialize=()=>{this.isQueryCountryCodeValid&&this.queryCountryCode?this.setCountryCode(this.queryCountryCode):this.initCountryCodeFromLocation(),this.setActive(this.staticOptions.length>1),this.filtersReadyAdapter.markCountryReady()};initCountryCodeFromLocation=()=>{this.setCountryCode(this.homeCountryCode)};get options(){return this.staticOptions.map((e=>({id:e.value,label:e.label,value:e.value,icon:e.icon})))}get homeCountryCode(){return this.userLocationProvider?.location?.code??gt}get isLoading(){return!this.filtersReadyAdapter.isCountryReady}get optionByCountry(){return this.countryCode?this.getOptionByCountry(this.countryCode):void 0}get queryCountryCode(){return this.queryFilterAdapter.getCountry()}get isQueryCountryCodeValid(){return this.validateCountryCode(this.queryCountryCode)}get homeUserLocation(){return this.userLocationProvider?.location}get homeUserLocationLoading(){return this.userLocationProvider?.isLoading}get homeUserLocationError(){return this.userLocationProvider?.isError}get isHomeCountry(){return this.countryCode===this.homeCountryCode}get staticOptionByCountry(){return this.staticOptions.find((e=>e.value===this.countryCode))}get viewByCountry(){return this.staticOptionByCountry?.view??k.Y1.MapAndList}get validFallbackCountryCode(){return this.validateCountryCode(gt)?gt:this.options[0]?.value??gt}get isOneCountry(){return 1===this.options.length}get countryLabel(){return this.optionByCountry?.label??""}get isHideLabelConfig(){return this.dynamicData.filtersData?.country?.isHideLabel}getIsHideLabel=e=>{let t=this.isHideLabelConfig;return"function"==typeof t?t(e):void 0!==t?t:e};getOptionByCountry=e=>this.options.find((t=>t.value===e));validateCountryCode=e=>null!==e&&void 0!==this.getOptionByCountry(e);
1setActive=e=>{this.setIsActive(e)};setIsActive=e=>{this.isActive=e};setCountryCode=(e=gt)=>{0!==this.options.length?(this.countryCode=this.validateCountryCode(e)?e:this.validFallbackCountryCode,this.countryCode&&this.queryFilterAdapter.setCountry(this.countryCode)):this.countryCode=gt};reset=()=>{this.initCountryCodeFromLocation()}};U([(0,w.f3)(Q.QueryFilterAdapter)],Kr.prototype,"queryFilterAdapter",2),U([(0,w.f3)(Q.UserLocationProvider)],Kr.prototype,"userLocationProvider",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],Kr.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],Kr.prototype,"dynamicData",2),U([(0,w.zY)()],Kr.prototype,"init",1),Kr=U([(0,w.b2)()],Kr);var Zr=class{options=[];isActive=!0;isDisabled=!1;isHideAllOption=!1;onHideAllOptionChange;constructor(e,t,i){(0,O.ky)(this),this.onHideAllOptionChange=i,e&&this.setOptions(e),"boolean"==typeof t&&this.setActive(t),(0,O.U5)((()=>this.isHideAllOption),(e=>{this.onHideAllOptionChange?.(e)}))}setOptions=e=>{this.options=e??[]};setActive=e=>{this.isActive=e};setDisabled=e=>{this.isDisabled=e};setHideAllOption=e=>{this.isHideAllOption=e};checkOptionsEmpty=e=>!e||0===e.length};function $r(e){(0,O.gx)((()=>e.isQueryReady()&&e.isCountryReady()),(()=>{e.initialize()})),e.isActive&&e.onInactive&&(0,O.U5)((()=>e.isActive()),(t=>{t||e.onInactive()}
1)),(0,O.U5)((()=>e.dynamicConfigGetter()),(t=>{e.readinessFlag()&&e.onDynamicConfigChange(t)}))}Zr=U([(0,w.b2)()],Zr);var Xr=class{selectedOptions=[];baseFilterStore;queryFilterAdapter;filtersReadyAdapter;api;get options(){return this.baseFilterStore.options}get isActive(){return this.baseFilterStore.isActive}get isDisabled(){return this.baseFilterStore.isDisabled}isError=!1;get isHideAllOption(){return this.baseFilterStore.isHideAllOption}setOptions=e=>{this.baseFilterStore.setOptions(e)};setActive=e=>{this.baseFilterStore.setActive(e)};setDisabled=e=>{this.baseFilterStore.setDisabled(e)};setIsHideAllOption=e=>{this.baseFilterStore.setHideAllOption(e)};currenciesByCountryMemory=new Map;getAgentsServices;map;dynamicData;countryFilterStore;constructor(){(0,O.ky)(this)}init(){let e=this.staticCurrencies,{map:t}=e||{};this.baseFilterStore=new Zr([],!!e),this.map=t,this.getAgentsServices=this.api.get("getAgentsServices"),$r({isQueryReady:()=>this.queryFilterAdapter.isQueryReady,isCountryReady:()=>this.filtersReadyAdapter.isCountryReady&&!!this.getAgentsServices,initialize:()=>this.initialize(),isActive:()=>this.isActive,onInactive:()=>this.queryFilterAdapter.deleteCurrencies(),dynamicConfigGetter:()=>this.staticCurrencies,readinessFlag:()=>this.filtersReadyAdapter.isCurrencyReady,onDynamicConfigChange:e=>{let t=this.isHideAllOption;this.baseFilterStore=new Zr([],!!e),this.map=e?.map;let i=this.countryFilterStore.countryCode??gt;this.baseFilterStore.setHideAllOption(t);let r=this.selectedOptions;i&&this.initializeByCountry(i).then((()=>{r.every((e=>this.options.map((e=>e.value)).includes(e.value)))&&this.setSelectedOptions(r)}))}})}get staticCurrencies(){return this.dynamicData.filtersData?.currency}get isApiError(){return this.getAgentsServices?.state.isError}get isApiLoading(){return this.getAgentsServices?.state.isLoading}get apiData(){return this.getAgentsServices?.state.data}get isLoading(){return!this.filtersReadyAdapter.isCurrencyReady}get hasPickAllOptions(){return!(!(this.options?.length&&this.options.length>1)||this.isHideAllOption)}get optionsWithoutAll(){return this.options.filter((e=>e.value!==Ut))}get selectedValues(){return this.selectedOptions.map((e=>e.value))}filterOptionsByMap=(e,t)=>{let i=this.map?.get(t);return i&&void 0!==i?.options&&i?.options?.length?e.filter((e=>e.value&&i?.options?.map((e=>e.value)).includes(e.value))):e};initialize=async()=>{let e=this.queryFilterAdapter.getCountry()??gt;if(!e)throw new Error("\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u0430\u043b\u044e\u0442 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u044b \u0432 query!");if(this.initActiveByCountry(e),!this.isActive)return void this.filtersReadyAdapter.markCurrencyReady();let t=this.queryFilterAdapter.getCurrencies(),i=await this.fetchCurrencies(e);if(!i)return void this.setIsError(!0);let r=this.createCurrencyOptionsFromApiResponse(i),o=this.filterOptionsByMap(r,e),s=this.convertQueryToFilterOptions(o,t);this.setOptions(o),this.setSelectedOptions(s),this.initDisabledAndActiveByCountry(e),this.filtersReadyAdapter.markCurrencyReady()};initializeByCountry=async e=>{if(this.initActiveByCountry(e),!this.isActive)return void this.filtersReadyAdapter.markCurrencyReady();let t=await this.fetchCurrencies(e);if(!t)return void this.setIsError(!0);let i=this.createCurrencyOptionsFromApiResponse(t),r=this.filterOptionsByMap(i,e);this.setOptions(r),this.setSelectedOptions(r),this.initDisabledAndActiveByCountry(e),this.filtersReadyAdapter.markCurrencyReady()};initActiveByCountry=e=>{this.setActive(!!this?.map?.has(e))};initDisabledAndActiveByCountry=e=>{this.setDisabled(this?.map?.get(e)?.isDisabled||this.optionsWithoutAll.length<=1),this.setActive(this.optionsWithoutAll.length>0)};async fetchCurrencies(e){try{if(!this.getAgentsServices)throw new Error("getAgentsServices \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e!");if(await this.getAgentsServices.call([e],{key:"map-currencies-cache",useCache:!0,useLocalStorageCache:!0}),!this.isApiError)return(0,O.z)((()=>{this.currenciesByCountryMemory.set(e,this.apiData)})),this.setIsError(!1),this.getAgentsServices.state.data}catch(t){(0,O.z)((()=>{let e=t instanceof Error?t.message:String(t);throw new Error(e)}))}}get currencies(){return this.selectedOptions.map((e=>
1e.value)).filter(Boolean)}setIsError=e=>{this.isError=e};setSelectedOptions=e=>{this.selectedOptions=e,this.queryFilterAdapter.setCurrencies(this.currencies)};setHideAllOption=e=>{this.baseFilterStore.setHideAllOption(e)};refresh=()=>{this.setIsError(!1);let e=this.queryFilterAdapter.getCountry()??gt;this.initializeByCountry(e)};createOptionIfValidOrThrowError=(e,t,i)=>{if(i?.some((e=>e.value===t)))return e.push({label:t,value:t,id:t,checked:!0}),e;throw new Error("invalid_query")};convertQueryToFilterOptions=(e,t)=>{if(!t)return e;try{return t.split(",").reduce(((t,i)=>this.createOptionIfValidOrThrowError(t,i,e)),[])}catch(i){if("invalid_query"===i.message&&e)return e}return[]};createCurrencyOptionsFromApiResponse=e=>{let t=e.flatMap((({currencies:e})=>e));return[...new Set(t)].map((e=>({id:e,value:e,label:e,checked:!0})))}};U([(0,w.f3)(Q.QueryFilterAdapter)],Xr.prototype,"queryFilterAdapter",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],Xr.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.ApiServices)],Xr.prototype,"api",2),U([(0,w.f3)(Q.DynamicDataStore)],Xr.prototype,"dynamicData",2),U([(0,w.f3)(Q.CountryFilterStore)],Xr.prototype,"countryFilterStore",2),U([(0,w.zY)()],Xr.prototype,"init",1),Xr=U([(0,w.b2)()],Xr);var Jr=class{filterAdapter;filtersReadyAdapter;dynamicData;constructor(){(0,O.ky)(this)}init(){(0,O.gx)((()=>this.filterAdapter.isQueryReady),(()=>this.initialize()))}get defaultOpen(){return this.dynamicData.filtersData?.defaultOpen??!1}get isLoading(){let e=!(this.filtersReadyAdapter.isCountryReady&&this.filtersReadyAdapter.isServicesReady&&this.filtersReadyAdapter.isServicesPointsReady&&this.filtersReadyAdapter.isViewReady);return!this.filtersReadyAdapter.isOpenReady||e}get queryOpen(){return this.filterAdapter.getOpen()}get isOpen(){return"true"===this.queryOpen}get isActive(){return null!==this.defaultOpen}initialize=()=>{null===this.queryOpen&&this.isActive&&this.setOpen(!!this.defaultOpen),this.filtersReadyAdapter.markOpenReady()};setOpen=e=>{this.filterAdapter.setOpen(e)};toggle=()=>{this.setOpen(!this.isOpen)};reset=()=>{this.isActive&&this.setOpen(!!this.defaultOpen)}};U([(0,w.f3)(Q.QueryFilterAdapter)],Jr.prototype,"filterAdapter",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],Jr.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],Jr.prototype,"dynamicData",2),U([(0,w.zY)()],Jr.prototype,"init",1),Jr=U([(0,w.b2)()],Jr);var eo=({options:e,allOption:t,isHideAllOption:i})=>0===e.length?e:(({optionsLength:e,isHideAllOption:t})=>e>1&&!t)({optionsLength:e.length,isHideAllOption:i})?[t,...e]:e,to=e=>{let t=new Map;for(let i of e)t.set(i.value,i.type);return t},io=(e,t)=>0===e.length?null:e.length>1&&!t?tt:e[0],ro=e=>{if(0===e.length)return[];let t=e.some((e=>e.id===tt.id));return e.length>1&&!t?[tt,...e]:e},oo=class{countryFilterStore;service=s.EMPTY_STRING_STATE;serviceLabel=s.EMPTY_STRING_STATE;baseFilterStore;get options(){return this.baseFilterStore.options}get isDisabled(){return this.baseFilterStore.isDisabled}get isActive(){return this.baseFilterStore.isActive}get isHideAllOption(){return this.baseFilterStore.isHideAllOption}setOptions=e=>{this.baseFilterStore.setOptions(e)};setDisabled=e=>{this.baseFilterStore.setDisabled(e)};setActive=e=>{this.baseFilterStore.setActive(e)};setIsHideAllOption=e=>{this.baseFilterStore.setHideAllOption(e)};filtersReadyAdapter;filterAdapter;map;dynamicData;_serviceTypesMap=void 0;constructor(){(0,O.ky)(this)}init(){let e=this.staticService,{map:t}=e||{};this.baseFilterStore=new Zr([],!!e),this.map=t,$r({isQueryReady:()=>this.filterAdapter.isQueryReady,isCountryReady:()=>this.filtersReadyAdapter.isCountryReady,initialize:()=>this.initialize(),dynamicConfigGetter:()=>this.staticService,readinessFlag:()=>this.filtersReadyAdapter.isServicesReady,onDynamicConfigChange:e=>{if(!this.filtersReadyAdapter.isServicesReady)return;let t=this.isHideAllOption;this.baseFilterStore=new Zr([],!!e),this.baseFilterStore.setHideAllOption(t),this.map=e?.map;let i=this.countryFilterStore.countryCode??gt,r=this.service;i&&(this.prepareOptionsForCountry(i,{markReady:!1,selectByQuery:!1}),this.options.some((e=>e.id===r))?this.setService(r):this.initService())}})}get staticService(){return this.dynamicData.filtersData?.service}get queryServices(){return this.filterAdapter.getServices()}get isLoading(){return!this.filtersReadyAdapter.isServicesReady}get optionWithoutAll(){return this.baseFilterStore.options.filter((e=>e.id!==et.id))}get allServicesCodes(){return this.optionWithoutAll.map((e=>String(e.id)))}get isSelectedAll(){return this.service===et.id}get selectedServices(){return this.isSelectedAll?this.allServicesCodes:[this.service]}setSelectedOptionByValue=e=>{if(!this.options||0===this.options.length)return;let t=this.options.find((t=>t.value===e));if(!t)throw new Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043e\u043f\u0446\u0438\u044e \u043f\u043e \u043b\u0435\u0439\u0431\u043b\u0443");
1this.setService(t.id),this.setServiceLabel(t.label),this.filterAdapter.setServices(t.id===et.id?this.allServicesCodes:[t.id])};setService=e=>{this.service=e};setServiceLabel=e=>{this.serviceLabel=e};setServiceOptions=e=>{this.baseFilterStore.setOptions(e)};setHideAllOption=e=>{this.baseFilterStore.setHideAllOption(e)};initialize=()=>{let e=this.countryFilterStore.countryCode??gt;if(!e)throw new Error("\u0424\u0438\u043b\u044c\u0442\u0440 \u0443\u0441\u043b\u0443\u0433 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0432\u0430\u0442\u044c\u0441\u044f, \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u044b \u0432 query!");this.prepareOptionsForCountry(e,{markReady:!0,selectByQuery:!0})};initializeByCountry=e=>{this.prepareOptionsForCountry(e,{markReady:!1,selectByQuery:!1}),this.initService()};prepareOptionsForCountry=(e,t)=>{let i=this.getCurrentCountryFilterOptions(e),r=this.createServiceOptions(i),o=this.map?.get(e)?.isDisabled||1===r.length;this.baseFilterStore.setDisabled(o),this.clearQueryIfOptionsEmpty(r)?t.markReady&&this.filtersReadyAdapter.markServicesReady():(this.setServiceOptions(r),this.updateServiceTypesMap(i),t.selectByQuery&&(this.selectOptionByQuery(),this.filtersReadyAdapter.markServicesReady()))};initService=()=>{let e=this.baseFilterStore.options.at(0)?.value;e?this.setSelectedOptionByValue(e):this.setService(s.EMPTY_STRING_STATE)};checkOptionsEmpty=e=>this.baseFilterStore.checkOptionsEmpty(e);clearQueryIfOptionsEmpty=e=>{let t=this.checkOptionsEmpty(e);return t&&this.filterAdapter.deleteServices(),this.baseFilterStore.setActive(!t),t};selectOptionByQuery=()=>{let e=this.filterAdapter.getServices(),t=this.checkQuery(e)?this.findOptionByQuery(e):this.baseFilterStore.options.at(0);if(!t?.value)throw new Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e");this.setSelectedOptionByValue(t?.value)};checkQuery=e=>e&&this.hasOptionsServiceCode(this.baseFilterStore.options,e);findOptionByQuery=e=>e.length>1?this.baseFilterStore.options.at(0):this.baseFilterStore.options.find((t=>e.includes(t.id)));hasOptionsServiceCode(e,t){return e.some((e=>t.includes(String(e.id))))}getCurrentCountryFilterOptions=e=>this.map?.get(e)?.options??vt;convertToSelectOption=({label:e,value:t})=>({id:t,value:t,label:e});createServiceOptions=e=>{let t=e.map((e=>this.convertToSelectOption(e)));return eo({options:t,allOption:et,isHideAllOption:this.isHideAllOption})};updateServiceTypesMap=e=>{this._serviceTypesMap=to(e)};get serviceTypesMap(){return this._serviceTypesMap}};U([(0,w.f3)(Q.CountryFilterStore)],oo.prototype,"countryFilterStore",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],oo.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.QueryFilterAdapter)],oo.prototype,"filterAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],oo.prototype,"dynamicData",2),U([(0,w.zY)()],oo.prototype,"init",1),oo=U([(0,w.b2)()],oo);var so=class{constructor(e){this.servicePointsFilterStore=e,(0,O.ky)(this)}selectedOptions=[];allBankPointsCodes=[];allTradingPointsCodes=[];get selectedValue(){return this.selectedOptions}get selectedLabel(){return this.selectedOptions.map((e=>e.label)).join(", ")}get options(){return this.servicePointsFilterStore.options}get servicePointsByCountryStaticOptions(){return this.servicePointsFilterStore.servicePointsByCountry?.options}get isHideAllOption(){return this.servicePointsFilterStore.isHideAllOption}get hasPickAllOptions(){return this.servicePointsFilterStore.hasPickAllOptions}get queryPointTypeBank(){return this.servicePointsFilterStore.queryFilterAdapter.getPointTypeBank()}get queryPointTypeTradingNetwork(){return this.servicePointsFilterStore.queryFilterAdapter.getPointTypeTradingNetwork()}get queryBankOptions(){return this.queryPointTypeBank?.split(",")??[]}get queryTradingOptions(){return this.queryPointTypeTradingNetwork?.split(",")??[]}get isBankQueryValid(){return this.queryBankOptions?.every((e=>this.allBankPointsCodes?.includes(e)))}get isTradingQueryValid(){return this.queryTradingOptions?.every((e=>this.allTradingPointsCodes?.includes(e)))}setSelectedOptions=e=>{this.selectedOptions=e,this.syncSelectedValueWithQuery(e)};initOptionsByQuery=(e,t,i)=>this.shouldProcessType(i)?Yi(e,t,i):[];getOptionsByOrganizationType(e){return this.servicePointsByCountryStaticOptions?this.servicePointsByCountryStaticOptions.filter((t=>t.organizationType===e)):[]}calculateTypeOptions(e,t,i){let r=this.getOptionsByOrganizationType(e);return t?this.initOptionsByQuery(r,i,e):r}calculateSelectedOption(){if(!this.options)return;this.initializeCodes();let e=[...this.calculateTypeOptions(E.$B.BANK,this.isBankQueryValid,this.queryPointTypeBank),...this.calculateTypeOptions(E.$B.TRADING_NETWORK,this.isTradingQueryValid,this.queryPointTypeTradingNetwork)],t=this.hasPickAllOptions?e:[e[0]];this.setSelectedOptions(t)}syncSelectedValueWithQuery(e){this.updateQueryForType({options:e,type:E.$B.BANK,allCodes:this.allBankPointsCodes,setQueryFn:e=>this.servicePointsFilterStore.queryFilterAdapter.setPointTypeBank(e)}),this.updateQueryForType({options:e,type:E.$B.TRADING_NETWORK,allC
1odes:this.allTradingPointsCodes,setQueryFn:e=>this.servicePointsFilterStore.queryFilterAdapter.setPointTypeTradingNetwork(e)})}updateSelectedOption=e=>{this.setSelectedOptions(e)};updateQueryForType({options:e,type:t,allCodes:i,setQueryFn:r}){let o=[];for(let s of e)s.organizationType===t&&void 0!==s.value&&o.push(s.value);0!==o.length?(i.length,r(o.join(","))):r("")}initializeCodes(){let e=this.servicePointsByCountryStaticOptions??[];this.allBankPointsCodes=e.filter((e=>e.organizationType===E.$B.BANK)).map((e=>e.value)).filter((e=>void 0!==e)),this.allTradingPointsCodes=e.filter((e=>e.organizationType===E.$B.TRADING_NETWORK)).map((e=>e.value)).filter((e=>void 0!==e))}shouldProcessType(e){let t=!!this.queryPointTypeBank,i=!!this.queryPointTypeTradingNetwork;return!t&&!i||(e===E.$B.BANK?t:i)}initializeByCountry=()=>{let e=this.servicePointsByCountryStaticOptions;this.initializeCodes(),e&&this.updateSelectedOption(this.hasPickAllOptions?e:[e[0]])};onDynamicConfigChange=()=>{let e=this.selectedOptions;if(e?.length){let t=e.filter((e=>this.options?.some((t=>t.value===e.value))));if(t.length>0)return void this.setSelectedOptions(t)}this.initializeByCountry()};transformOptions(e){return e.map((e=>({...e,checked:!1})))}deleteUnnecessaryQuery=()=>{this.servicePointsFilterStore.queryFilterAdapter.deleteServicePoints()}},ao={},no=async(e,t)=>(e in ao||(ao[e]=new Promise(((i,r)=>{if(typeof document>"u")return r("\u042d\u0442\u043e \u043d\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440!");let o=globalThis.document.querySelector(`#${e}`);if(o){let t=o.dataset.status;if("loaded"===t)return void setTimeout(i,0);if("error"!==t){let t=o.readyState;return"complete"===t||"loaded"===t?(o.dataset.status="loaded",i()):(o.addEventListener("load",(()=>{o.dataset.status="loaded",i()})),void o.addEventListener("error",(t=>{o.dataset.status="error",delete ao[e],r(new Error(`\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 ${e}`))})))}o.remove()}let s=document.createElement("script");s.id=e,s.src=t,s.async=!0,s.addEventListener("load",(()=>{s.dataset.status="loaded",i()})),s.addEventListener("error",(t=>{s.dataset.status="error",delete ao[e],r(new Error(`\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 ${e}`))})),document.head.append(s)}))),ao[e]),lo=e=>{let{apikey:t,lang:i="ru_RU"}=e;return no("yandex-maps-api-v3",`https://api-maps.yandex.ru/v3/?apikey=${t}&lang=${i}`)},co=e=>{let{apikey:t,suggestApikey:i=t,lang:r="ru_RU"}=e;return no("yandex-maps-api-v2",`https://api-maps.yandex.ru/2.1/?apikey=${t}&suggest_apikey=${i}&lang=${r}`)},uo=async e=>{await lo(e),await co(e)},po=class{constructor(e){this.servicePointsFilterStore=e,(0,O.ky)(this)}selectedOption=null;get selectedValue(){return this.selectedOption?.value}get selectedLabel(){return this.selectedOption?.label}get options(){return this.servicePointsFilterStore.options}get servicePointsByCountryStaticOptions(){return this.servicePointsFilterStore.servicePointsByCountry?.options}get allServicePointsCodes(){if(!this.servicePointsByCountryStaticOptions)throw new Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u044b");return this.servicePointsByCountryStaticOptions.map((({value:e})=>String(e)))}get isHideAllOption(){return this.servicePointsFilterStore.isHideAllOption}get queryServicesPoints(){return this.servicePointsFilterStore.queryFilterAdapter.getServicePoints()}get queryOptions(){return this.queryServicesPoints?.split(",")??[]}get isQueryValid(){return this.queryOptions?.every((e=>this.allServicePointsCodes?.includes(e)))}setSelectedOption=e=>{this.selectedOption=e,this.syncSelectedValueWithQuery()};initOptionsByQuery=()=>{let e=this.options??[],t=((e,t)=>t?t.reduce(((t,i)=>{let r=e?.find((e=>e.value===i));if(r)return[...t,r];throw new Error("invalid_query")}),[]):e??[])(e,this.queryOptions);if(0===t.length){let t=io(e,this.isHideAllOption),i=this.isHideAllOption?void 0:tt,r=e[0],o=t||i||r;return void(o&&this.setSelectedOption(o))}let i=1===t.length||this.isHideAllOption?t[0]:tt;this.setSelectedOption(i)};calculateSelectedOption(){if(!this.options)return;if(this.isQueryValid)return void this.initOptionsByQuery();let e=this.isHideAllOption?void 0:tt,t=io(this.options,this.isHideAllOption)||e||this.options[0];t&&t.value&&this.setSelectedOption(t)}isAllOptionValue=e=>e&&e===tt.value&&!this.isHideAllOption;syncSelectedValueWithQuery(){let e=this.isAllOptionValue(this.selectedValue);this.allServicePointsCodes&&this.selectedValue&&this.servicePointsFilterStore.queryFilterAdapter.setServicePoints(e?this.allServicePointsCodes:this.selectedValue)}updateSelectedOptionByValue=e=>{let t=this.isAllOptionValue(e)?tt:this.options?.find((t=>t.value===e));if(!t||!t.value)throw new Error("\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043e\u043f\u0446\u0438\u044e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0442\u043e\u0447\u0435\u043a \u0432\u044b\u0434\u0430\u0447\u0438 \u043f\u043e label");this.setSelectedOption(t)};updateSelectedOption(e){"string"==typeof e&&this.updateSelectedOptionByValue(e)}initializeByCountry=()=>
1{if(this.options){let e=io(this.options,this.isHideAllOption)?.value;e?this.updateSelectedOptionByValue(e):this.options?.[0]?.value&&this.updateSelectedOptionByValue(this.options?.[0]?.value)}};onDynamicConfigChange=()=>{let e=this.selectedOption;e&&this.options?.find((t=>t.value===e?.value))?this.setSelectedOption(e):this.initializeByCountry()};transformOptions(e){return this.isHideAllOption?e:eo({options:e,allOption:tt,isHideAllOption:this.isHideAllOption})}deleteUnnecessaryQuery=()=>{this.servicePointsFilterStore.queryFilterAdapter.deletePointTypeBank(),this.servicePointsFilterStore.queryFilterAdapter.deletePointTypeTradingNetwork()}},ho=class{countryFilterStore;baseFilterStore;strategy;get options(){return this.baseFilterStore.options.length>0?this.baseFilterStore.options:null}set options(e){this.baseFilterStore.setOptions(e??[])}get isActive(){return this.baseFilterStore.isActive}set isActive(e){this.baseFilterStore.setActive(e)}get isDisabled(){return this.baseFilterStore.isDisabled}set isDisabled(e){this.baseFilterStore.setDisabled(e)}get isHideAllOption(){return this.baseFilterStore.isHideAllOption}set isHideAllOption(e){this.baseFilterStore.setHideAllOption(e)}servicePointsByCountryStatic;filterQueryAdapter;get queryFilterAdapter(){return this.filterQueryAdapter}filtersReadyAdapter;map;dynamicData;constructor(){(0,O.ky)(this)}init(){let e=this.staticServicePoints,{map:t}=e||{};this.strategy=this.dynamicData.mapType===k.I6.Default?new po(this):new so(this),this.baseFilterStore=new Zr([],!!e),this.map=t,$r({isQueryReady:()=>this.filterQueryAdapter.isQueryReady,isCountryReady:()=>this.filtersReadyAdapter.isCountryReady,initialize:()=>this.initialize(),isActive:()=>this.isActive,onInactive:()=>this.onInactive(),dynamicConfigGetter:()=>this.staticServicePoints,readinessFlag:()=>this.filtersReadyAdapter.isServicesPointsReady,onDynamicConfigChange:e=>{if(this.filtersReadyAdapter.isServicesPointsReady){let t=this.isHideAllOption;this.baseFilterStore=new Zr([],!!e),this.map=e?.map,this.baseFilterStore.setHideAllOption(t);let i=this.countryFilterStore.countryCode??gt;this.initializeOptionsByCountry(i),this.strategy.onDynamicConfigChange()}}})}get staticServicePoints(){return this.dynamicData.filtersData?.servicePoints}get isSingleStrategy(){return this.dynamicData.mapType===k.I6.Default}get hasPickAllOptions(){return!(!(this.options?.length&&this.options.length>1)||this.isHideAllOption)}get isLoading(){return!this.filtersReadyAdapter.isServicesPointsReady}get servicePointsByCountry(){return this.servicePointsByCountryStatic}get isOptionsEmptyInStatic(){return!this.servicePointsByCountryStatic||!this.servicePointsByCountryStatic?.options?.length}get selectedValue(){return this.strategy.selectedValue}get selectedLabel(){return this.strategy.selectedLabel}initialize=()=>{let e=this.countryFilterStore.countryCode??gt;if(!e)throw new Error("\u0424\u0438\u043b\u044c\u0442\u0440 \u0442\u043e\u0447\u0435\u043a \u0432\u044b\u0434\u0430\u0447\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u044b \u0432 query!");this.strategy.deleteUnnecessaryQuery(),this.initializeOptionsByCountry(e),this.ensureOptionsOrDeactivate()||this.strategy.calculateSelectedOption(),this.filtersReadyAdapter.markServicesPointsReady()};findCountryStaticByCountry=e=>this.map?.get(e)??null;initOptionsByStatic=e=>{this.setDisabled(e?.isDisabled||1===e?.options?.length),this.setOptions(e?.options??[]),this.setActive(!!e?.options?.length)};ensureOptionsOrDeactivate=()=>(this.setActive(!this.isOptionsEmptyInStatic),this.isOptionsEmptyInStatic);isAllOptionValue=e=>e&&e===tt.value&&!this.isHideAllOption;updateSelectedOption=e=>{this.isLoading||this.ensureOptionsOrDeactivate()||this.strategy.updateSelectedOption(e)};setActive=e=>{this.baseFilterStore.setActive(e)};setDisabled=e=>{this.baseFilterStore.setDisabled(e)};setOptions=e=>{if(0===e.length)return void this.baseFilterStore.setOptions([]);let t=this.strategy.transformOptions(e);this.baseFilterStore.setOptions(t)};initializeByCountry=e=>{this.strategy.deleteUnnecessaryQuery(),this.initializeOptionsByCountry(e),this.strategy.initializeByCountry()};initByCountry=e=>this.initializeByCountry(e);
1setHideAllOption=e=>{this.baseFilterStore.setHideAllOption(e)};initializeOptionsByCountry=e=>{this.servicePointsByCountryStatic=this.findCountryStaticByCountry(e),this.servicePointsByCountryStatic?this.initOptionsByStatic(this.servicePointsByCountryStatic):this.setActive(!1)};onInactive(){this.queryFilterAdapter.deleteServicePoints(),this.queryFilterAdapter.deletePointTypeBank(),this.queryFilterAdapter.deletePointTypeTradingNetwork()}};U([(0,w.f3)(Q.CountryFilterStore)],ho.prototype,"countryFilterStore",2),U([(0,w.f3)(Q.QueryFilterAdapter)],ho.prototype,"filterQueryAdapter",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],ho.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],ho.prototype,"dynamicData",2),U([(0,w.zY)()],ho.prototype,"init",1),ho=U([(0,w.b2)()],ho);var yo=class{view=k.Y1.Map;switcherView=k.Y1.Map;filterAdapter;filtersReadyAdapter;dynamicData;constructor(){(0,O.ky)(this)}init(){this.view=this.dynamicData.filtersData?.defaultView??k.Y1.MapAndList,(0,O.U5)((()=>this.view),(()=>{this.view!==k.Y1.MapAndList&&this.filterAdapter.deleteView()}))}get isCustomView(){return this.view===k.Y1.Custom}get isNotMapView(){return this.view===k.Y1.List||this.view===k.Y1.Custom||this.switcherView!==k.Y1.Map}get isMapView(){return this.view===k.Y1.MapAndList&&this.switcherView===k.Y1.Map||this.view===k.Y1.Map}get isOnlyList(){return this.view===k.Y1.List}setView=e=>{this.view=e};setSwitcherView=e=>{this.switcherView=e,this.view===k.Y1.MapAndList&&this.filterAdapter.setView(e)};toggleSwitcherView=()=>{this.setSwitcherView(this.switcherView===k.Y1.Map?k.Y1.List:k.Y1.Map)};initialize=e=>{this.setView(e),this.initQueryView(),this.filtersReadyAdapter.markViewReady()};initQueryView=()=>{let e=this.filterAdapter.getView(),t=this.validateQueryView(e);this.view!==k.Y1.List?this.setSwitcherView(t):this.setSwitcherView(k.Y1.List)};validateQueryView=e=>e===k.Y1.List?k.Y1.List:k.Y1.Map};U([(0,w.f3)(Q.QueryFilterAdapter)],yo.prototype,"filterAdapter",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],yo.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.DynamicDataStore)],yo.prototype,"dynamicData",2),U([(0,w.zY)()],yo.prototype,"init",1),yo=U([(0,w.b2)()],yo);var go=class{filtersReadyStore;constructor(){(0,O.ky)(this)}get isOpenReady(){return this.filtersReadyStore.checkReady(ot)}get isCountryReady(){return this.filtersReadyStore.checkReady(nt)}get isServicesReady(){return this.filtersReadyStore.checkReady(at)}get isCurrencyReady(){return this.filtersReadyStore.checkReady(ut)}get isServicesPointsReady(){return this.filtersReadyStore.checkReady(lt)}get isViewReady(){return this.filtersReadyStore.checkReady(rt)}markOpenReady(){this.filtersReadyStore.markReady(ot)}markCountryReady(){this.filtersReadyStore.markReady(nt)}markServicesReady(){this.filtersReadyStore.markReady(at)}markCurrencyReady(){this.filtersReadyStore.markReady(ut)}markServicesPointsReady(){this.filtersReadyStore.markReady(lt)}markViewReady(){this.filtersReadyStore.markReady(rt)}};U([(0,w.f3)(Q.ReadyStore)],go.prototype,"filtersReadyStore",2),go=U([(0,w.b2)()],go);var So=class{queryStore;agentsParamsAdapter;constructor(){(0,O.ky)(this)}get isQueryReady(){return this.queryStore.isReady}getCountry(){return this.queryStore.get(So.COUNTRY_KEY)||null}setCountry(e){this.queryStore.set(So.COUNTRY_KEY,e),this.agentsParamsAdapter.setCountry(e)}deleteCountry(){this.queryStore.delete(So.COUNTRY_KEY),this.agentsParamsAdapter.clearCountry()}getServices(){return this.queryStore.getMultiply(So.SERVICES_KEY)}setServices(e){this.queryStore.set(So.SERVICES_KEY,e.join(",")),this.agentsParamsAdapter.setServicesWithCurrencies({services:e})}deleteServices(){this.queryStore.delete(So.SERVICES_KEY),this.agentsParamsAdapter.clearServices()}getCurrencies(){return this.queryStore.get(So.CURRENCY_KEY)||null}setCurrencies(e){e.length>0?this.queryStore.set(So.CURRENCY_KEY,e.join(",")):this.deleteCurrencies(),this.agentsParamsAdapter.setServicesWithCurrencies({currencies:e})}deleteCurrencies(){this.queryStore.delete(So.CURRENCY_KEY),this.agentsParamsAdapter.clearServices()}getServicePoints(){return this.queryStore.get(So.SERVICE_POINTS_KEY)||null}setServicePoints(e){if(this.queryStore.set(So.SERVICE_POINTS_KEY,Array.isArray(e)?e.join(","):e),this.agentsParamsAdapter.clearOrganizationType(),"string"==typeof e&&e.includes("banks"))return this.agentsParamsAdapter.setOrganizationType("bank"),void this.agentsParamsAdapter.clearRootId();Array.isArray(e)?this.agentsParamsAdapter.clearRootId():this.agentsParamsAdapter.setRootId(e)}deleteServicePoints(){this.queryStore.delete(So.SERVICE_POINTS_KEY),this.agentsParamsAdapter.clearRootId()}getPointTypeBank(){return this.queryStore.get(So.POINT_TYPE_BANK_KEY)||null}setPointTypeBank(e){""===e?this.deletePointTypeBank():(this.queryStore.set(So.POINT_TYPE_BANK_KEY,e),this.agentsParamsAdapter.setPointTypeBank(e))}deletePointTypeBank(){this.queryStore.delete(So.POINT_TYPE_BANK_KEY),this.agentsParamsAdapter.clearPointTypeBank()}getPointTypeTradingNetwork(){return this.queryStore.get(So.POINT_TYPE_TRADING_NETWORK_KEY)||null}setPointTypeTradingNetwork(e){""===e?this.deletePointTypeTradingNetwork():(this.queryStore.set(So.POINT_TYPE_TRADING_NETWORK_KEY,e),this.agentsParamsAdapter.setPointTypeTradingNetwork(e))}deletePointTypeTradingNetwork(){this.queryStore.delete(So.POINT_TYPE_TRADING_NETWORK_KEY),this.agentsParamsAdapter.clearPointTypeTradingNetwork()}setOpen(e){this.queryStore.set(So.OPEN_KEY,e.toString()),this.agentsParamsAdapter.setOpen(e)}getOpen(){return this.queryStore.get(So.OPEN_KEY)??null}deleteOpen(){this.queryStore.delete(So.OPEN_KEY),this.agentsParamsAdapter.clearOpen()}setView(e){this.queryStore.set(So.VIEW_KEY,e)}getView(){return this.queryStore.get(So.VIEW_KEY)}deleteView(){this.queryStore.delete(So.VIEW_KEY)}deleteAll(){this.deleteCountry(),this.deleteCurrencies(),this.deleteServices(),this.deleteServicePoints(),this.deleteOpen(),this.deleteView(),this.deletePointTypeBank(),this.deletePointTypeTradingNetwork()}};V(So,"COUNTRY_KEY",nt),V(So,"SERVICES_KEY",at),V(So,"CURRENCY_KEY",ut),V(So,"OPEN_KEY",ot),V(So,"VIEW_KEY",rt),V(So,"SERVICE_POINTS_KEY",lt),V(So,"POINT_TYPE_BANK_KEY",dt),V(So,"POINT_TYPE_TRADING_NETWORK_KEY",ct),U([(0,w.f3)(Q.QueryStore)],So.prototype,"queryStore",2),U([(0,w.f3)(Q.AgentsParamsAdapter)],So.prototype,"agentsParamsAdapter",2),So=U([(0,w.b2)()],So);var mo=class e{isLoading=!1;isError=!1;cacheData=new Map;data;constructor(){(0,O.ky)(this,{},{autoBind:!0})}static createInstance=t=>{let i=new e,r=async(e,t,r,o,s)=>
1{try{i.setLoading(!0),i.setError(!1);let a=await e(...t);((e,t,r,o)=>{r&&i.cacheData.set(e,t),o&&(0,I.w4)({key:e,value:t,ttl:36e5})})(r,a,o,s),i.setData(a)}catch(a){console.error(a),i.setError(!0)}finally{i.setLoading(!1)}};return{call:async(e,o)=>{if(!t)throw new Error("\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0432\u043d\u0430 null");let s=o?.useCache??!1,a=o?.useLocalStorageCache??!1,n=((e,t)=>`${e??"key"}-${Array.isArray(t)?t.join(","):JSON.stringify(t)}`)(o?.key,e),l=((e,t,r)=>t&&i.cacheData.has(e)?i.cacheData.get(e):r&&(0,I.oZ)(e)&&!(0,I.w5)(e)?(0,I.jE)(e):void 0)(n,s,a);void 0===l?await r(t,e,n,s,a):i.setData(l)},state:i}};setError=e=>{this.isError=e};setLoading=e=>{this.isLoading=e};setData=e=>{this.data=e}},fo=class{callbacks=new Map;originalCallbacks=new Map;constructor(e){(0,O.ky)(this);for(let t in e){let i=e[t];if(!i||"function"!=typeof i)throw new Error(`\u0424\u0443\u043d\u043a\u0446\u0438\u044f "${t}" \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0439`);this.set(t,i)}}hasCallback=e=>this.callbacks.has(e);async call(e,t,i){let r=this.callbacks.get(e);if(!r)throw new Error(`\u041d\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c: ${String(e)}`);return await r.call(t??[],i)}get=e=>this.callbacks.get(e);getOriginal=e=>this.originalCallbacks.get(e);set=(e,t)=>{this.callbacks.set(e,mo.createInstance(t)),this.originalCallbacks.set(e,t)}};fo=U([(0,w.b2)(),Y(0,(0,w.f3)(Q.ApiCallbacks))],fo);var Ao=class{filtersStore;userLocationStore;staticFiltersHelperStore;queryStore;mapLocationStoreInjected;mapModuleStore;filtersReadyAdapter;viewFilterStore;constructor(){(0,O.ky)(this)}init(){(0,O.gx)((()=>!(!this?.areYmapsModulesLoaded||!this.isQueryReady||this.userLocationLoading)),(()=>{this.setupLocationInitializationReaction()}))}setupLocationInitializationReaction(){(0,O.gx)((()=>this.filtersReadyAdapter.isCountryReady&&!this.viewFilterStore.isCustomView),(()=>{this.initLocation()}))}getInitialMapBounds(){let e=this.filtersStore,t=this.userLocationStore,i=this.staticFiltersHelperStore,r=e.countryFilterStore,o=t?.userLocation?.bbox,s=t?.disabledDetectUserLocation??!1,a=r.countryCode?i?.findBoundsByCountry(r.countryCode,s):null,n=!r?.isQueryCountryCodeValid&&!!o&&!s,l=r?.options.length>0&&!!a;return n?o:l?a:null}get areYmapsModulesLoaded(){return this.mapModuleStore?.areYmapsModulesLoaded??!1}get isQueryReady(){return this.queryStore?.isReady??!1}get userLocationLoading(){return this.userLocationStore?.isLoading??!1}get mapLocationStore(){return this.mapLocationStoreInjected}initLocation=()=>{if(!this.mapLocationStore)throw new Error("MapLocationStore \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");this.mapLocationStore.isValidQueryLocation?this.mapLocationStore.mapLocationInitializer.initializeFromQuery():this.initializeFromBoundsOrDefault()};initializeFromBoundsOrDefault=()=>{let e=this.getInitialMapBounds();if(!this.mapLocationStore)throw new Error("MapLocationStore \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d");e?this.mapLocationStore.mapLocationInitializer.initializeFromBounds(e):this.mapLocationStore.mapLocationInitializer.initializeDefaultLocation()};resetLocation=()=>{this.initializeFromBoundsOrDefault()}};U([(0,w.f3)(Q.FiltersStore)],Ao.prototype,"filtersStore",2),U([(0,w.f3)(Q.UserLocationStore)],Ao.prototype,"userLocationStore",2),U([(0,w.f3)(Q.StaticFiltersHelperStore)],Ao.prototype,"staticFiltersHelperStore",2),U([(0,w.f3)(Q.QueryStore)],Ao.prototype,"queryStore",2),U([(0,w.f3)(Q.MapLocationStore)],Ao.prototype,"mapLocationStoreInjected",2),U([(0,w.f3)(Q.MapModuleStore)],Ao.prototype,"mapModuleStore",2),U([(0,w.f3)(Q.FiltersReadyAdapter)],Ao.prototype,"filtersReadyAdapter",2),U([(0,w.f3)(Q.ViewFilterStore)],Ao.prototype,"viewFilterStore",2),U([(0,w.zY)()],Ao.prototype,"init",1),Ao=U([(0,w.b2)()],Ao);var vo=class{readyMap=new Map;onAllReadyCallback;constructor(){(0,O.ky)(this)}markReady(e){this.readyMap.set(e,!0),this.checkAllReady()}checkReady(e){return this.readyMap.get(e)??!1}get isAllReady(){return[...this.readyMap.values()].every(Boolean)}checkAllReady=()=>{this.isAllReady&&this.onAllReadyCallback?.()};onAllReady=e=>{this.onAllReadyCallback=e}};vo=U([(0,w.b2)()],vo);var xo=class{overrides={};constructor(){(0,O.ky)(this)}setOverrides=e=>{this.overrides=e};getDesktopSlots=()=>this.overrides.desktop?.slots;getDesktopSlotProps=()=>this.overrides.desktop?.slotProps;getMobileHeaderSlots=()=>this.overrides.mobile?.header?.slots;getMobileHeaderSlotProps=()=>this.overrides.mobile?.header?.slotProps;getMobileModalSlots=()=>this.overrides.mobile?.modal?.slots;getMobileModalSlotProps=()=>this.overrides.mobile?.modal?.slotProps;getMarkerSlots=()=>this.overrides.marker?.slots;getMarkerSlotProps=()=>this.overrides.marker?.slotProps;getClusterBalloonSlots=()=>this.overrides.clusterBalloon?.slots;getClusterBalloonSlotProps=()=>this.overrides.clusterBalloon?.slotProps;getBalloonContentSlots=()=>this.overrides.balloonContent?.slots;getBalloonContentSlotProps=()=>this.overrides.balloonContent?.slotProps;getPointListItemSlots=()=>this.overrides.pointListItem?.slots;getPointListItemSlotProps=()=>this.overrides.pointListItem?.slotProps;getSearchSlots=()=>this.overrides.search?.slots;getSearchSlotProps=()=>this.overrides.search?.slotProps};xo=U([(0,w.b2)()],xo);var Co=class{fetchAgentBalloonData;fetchAgentsByBounds;fetchAgentsByIds;fetchAgentsPagination;getAddressByCoords;search;suggest;getUserLocation;
1api;constructor(){(0,O.ky)(this)}init(){this.getAddressByCoords=this.api.getOriginal("getAddressByCoords"),this.fetchAgentBalloonData=this.api.getOriginal("fetchAgentBalloonData"),this.fetchAgentsByBounds=this.api.getOriginal("fetchAgentsByBounds"),this.fetchAgentsByIds=this.api.getOriginal("fetchAgentsByIds"),this.fetchAgentsPagination=this.api.getOriginal("fetchAgentsPagination"),this.suggest=this.api.getOriginal("getSuggest"),this.search=this.api.getOriginal("getSearch"),this.getUserLocation=this.api.getOriginal("getUserLocation")}setAddressByCoordsMethod=e=>{this.getAddressByCoords=e};setFetchAgentBalloonDataMethod=e=>{this.fetchAgentBalloonData=e};setFetchAgentsByBoundsMethod=e=>{this.fetchAgentsByBounds=e};setFetchAgentsByIdsMethod=e=>{this.fetchAgentsByIds=e};setFetchAgentsPaginationMethod=e=>{this.fetchAgentsPagination=e};setSuggestMethod=e=>{this.suggest=e};setSearchMethod=e=>{this.search=e};setUserLocationMethod=e=>{this.getUserLocation=e}};U([(0,w.f3)(Q.ApiServices)],Co.prototype,"api",2),U([(0,w.zY)()],Co.prototype,"init",1),Co=U([(0,w.b2)()],Co);var Mo=class{currentBounds=null;defaultBounds=null;getBoundsInterval=null;resizeBounds=null;resizeTimer=null;isFirstSync=!0;mapLocationStore;mapStateStore;constructor(){(0,O.ky)(this)}init(){(0,O.U5)((()=>this.mapStateStore.isMapInDom),(e=>{e?(this.setFirstSync(!0),this.startBoundsCheckInterval(),this.setupResizeListener()):(this.stopBoundsCheckInterval(),this.stopResizeListener())}))}setMapLocationStore=e=>{this.mapLocationStore=e};getBounds=()=>this.mapLocationStore.getBounds();getCurrentBounds=()=>this.currentBounds;setCurrentBounds=e=>{this.currentBounds=e};setBounds=(e,t=500)=>{let i=this.mapLocationStore.getCenter(),r=this.mapLocationStore.getZoom();i&&r?this.mapLocationStore.setLocation({bounds:e,duration:t}):globalThis.console.error("setBounds \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a getCenter() \u0438\u043b\u0438 getZoom() \u0434\u0430\u044e\u0442 null.")};setFirstSync=e=>{this.isFirstSync=e};setupResizeListener(){globalThis.addEventListener("resize",(()=>{this.stopResizeListener(),this.resizeTimer=globalThis.setTimeout((()=>{this.resizeBounds=this.mapLocationStore.getMap()?.bounds,this.checkBoundsAndSync()}),0)}))}startBoundsCheckInterval=()=>{this.stopBoundsCheckInterval(),this.getBoundsInterval=globalThis.setInterval(this.checkBoundsAndSync,100)};stopBoundsCheckInterval=()=>{this.getBoundsInterval&&globalThis.clearInterval(this.getBoundsInterval)};stopResizeListener=()=>{this.resizeTimer&&globalThis.clearTimeout(this.resizeTimer)};checkBoundsAndSync=()=>{let e=this.mapLocationStore.getBounds();e&&(0,O.z)((()=>{let t=this.resizeBounds?.toString()!==e.toString()&&this.currentBounds?.toString()!==e.toString(),i=this.mapLocationStore.viewFilterStore.view===k.Y1.Map||this.mapLocationStore.viewFilterStore.view===k.Y1.MapAndList;if(t&&i){this.setCurrentBounds(e),null===this.defaultBounds&&(this.defaultBounds=this.currentBounds);let t=this.mapLocationStore.getMap()?.center??null,i=this.mapLocationStore.getMap()?.zoom??8;if(t&&this.mapLocationStore.setCenterWithSync(t),this.isFirstSync){let e=this.mapLocationStore.controlledLocation;if(e?.center){let t=e.center,i=e.zoom??8;this.mapLocationStore.getMap()?.setLocation({center:t,zoom:i,bounds:e.bounds,duration:e.duration})}return void this.setFirstSync(!1)}i&&this.mapLocationStore.setZoomWithSync(i),t&&this.mapLocationStore.setControlledLocation({center:t,zoom:i})}}))}};U([(0,w.f3)(Q.MapStateStore)],Mo.prototype,"mapStateStore",2),U([(0,w.zY)()],Mo.prototype,"init",1),Mo=U([(0,w.b2)()],Mo);var bo=class{mapLocationStore;dynamicDataStore;constructor(){(0,O.ky)(this)}setMapLocationStore=e=>{this.mapLocationStore=e};initializeDefaultLocation=()=>{this.initializeFromBounds(yt),this.markReady()};initializeFromQuery=()=>{let e=this.getValidLocationFromQuery(),t=this.getValidZoomFromQuery();e?(this.mapLocationStore.setControlledLocation({center:e,zoom:t}),this.markReady()):console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0438\u0437 query")};initializeFromBounds=e=>{let t=this.mapLocationStore.getMap(),i=globalThis.document?.querySelector(".map")?.getBoundingClientRect(),r=t?.size??{x:i?.width??0,y:i?.height??0},o=t?.zoomRange??Ss;if(!r)throw new Error("size - \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d!");let s=(0,I.Cs)({boundingBox:e,roundZoom:!1,viewportSize:r,zoomConstraints:o});this.mapLocationStore.setLocation({...s,zoom:Number.isNaN(s.zoom)?8:s.zoom}),this.markReady()};getValidLocationFromQuery(){let e=this.mapLocationStore.mapQueryAdapter.getLocation();if(!e)return null;let t=e.join(",");return(0,I._U)(t)?e.map(Number):null}getValidZoomFromQuery(){let e=(({defaultZoom:e,max:t,min:i,zoom:r})=>{let o=Number(r);return!Number.isNaN(o)&&o>=i&&o<=t?o:e})({defaultZoom:8,zoom:this.mapLocationStore.mapQueryAdapter.getZoom(),max:Ss.max,min:Ss.min});return 8===e&&console.warn("\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0443\u043c\u0430 \u0438\u0437 query \u043d\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e. \u0411\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: 8"),e}markReady=()=>{this.mapLocationStore.mapReadyAdapter.markLocationReady()}};U([(0,w.f3)(Q.DynamicDataStore)],bo.prototype,"dynamicDataStore",2),bo=U([(0,w.b2)()],bo);var Lo=class{userLocationStore;dynamicData;constructor(){(0,O.ky)(this)}init(){}get staticCountryData(){return this.dynamicData.filtersData.country??void 0}get locationCode(){return this.userLocationStore.userLocation?.code}findOptionByCountry=e=>this.staticCountryData?.options.find((t=>t.value===e));getBoundsByCountryCode(e){return this.findOptionByCountry(e)?.coordinates}findCityByCountry=e=>e===this.locationCode?this.locationCode:this.findOptionByCountry(e)?.city;findBoundsByCountry=(e,t=!1)=>e!==this.locationCode||t?this.findOptionByCountry(e)?.coordinates:this.userLocationStore.userLocation?.bbox};U([(0,w.f3)(Q.UserLocationStore)],Lo.prototype,"userLocationStore",2),U([(0,w.f3)(Q.DynamicDataStore)],Lo.prototype,"dynamicData",2),U([(0,w.zY)()],Lo.prototype,"init",1),Lo=U([(0,w.b2)()],Lo);var Po=class{filtersData=O.LO.object({});config=O.LO.object({});apikey=void 0;alertContent=void 0;homeUserLocation=void 0;queryWorker=void 0;querySchema=void 0;table=O.LO.map();custom=void 0;bottomAndTopByCountry;mapType=k.I6.Default;constructor(e){(0,O.ky)(this),e&&this.updateData(e)}updateData=e=>{Object.assign(this.filtersData,e.filtersData),Object.assign(this.config,e.config),this.apikey=e.apikey??this.apikey,this.alertContent=e.alertContent??this.alertContent,this.homeUserLocation=e.homeUserLocation,this.queryWorker=e.queryWorker??this.queryWorker,this.querySchema=e.querySchema??this.querySchema,this.bottomAndTopByCountry=e.bottomAndTopByCountry??this.bottomAndTopByCountry,e.table&&this.table.merge(e.table),this.custom=e.custom??this.custom,this.mapType=e.mapType??this.mapType}};Po=U([(0,w.b2)(),Y(0,(0,w.NT)())],Po),new Map([["RU",{options:[{label:"\u041c\u0422\u0421",value:"ST00300",id:"ST00300",organizationType:E.$B.TRADING_NETWORK},{label:"Kari",value:"ST00622",id:"ST00622",organizationType:E.$B.TRADING_NETWORK},{label:"\u0411\u0430\u043d\u043a\u0438",value:"banks",id:"banks",organizationType:E.$B.BANK},{label:"\u0411\u0438\u043b\u0430\u0439\u043d",value:"ST00669",id:"ST00669",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0432\u044f\u0437\u043d\u043e\u0439",value:"ST00200",id:"ST00200",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["CN",{options:[{label:"Kari",value:"ST00622",id:"ST00622",organizationType:E.$B.TRADING_NETWORK},{label:"\u0411\u0430\u043d\u043a\u0438",value:"banks",id:"banks",organizationType:E.$B.BANK}],isDisabled:!1}],["KZ",{options:[{label:"\u041c\u0422\u0421",value:"ST00300",id:"ST00300",organizationType:E.$B.TRADING_NETWORK},{label:"\u0411\u0438\u043b\u0430\u0439\u043d",value:"ST00669",id:"ST00669",organizationType:E.$B.TRADING_NETWORK},{label:"\u041c\u0435\u0433\u0430\u0444\u043e\u043d",value:"ST01114",id:"ST01114",organizationType:E.$B.TRADING_NETWORK}
1,{label:"\u0421\u0422\u041e\u041b\u041e\u0422\u041e",value:"ST01268",id:"ST01268",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["KR",{options:[{label:"\u041c\u0435\u0433\u0430\u0444\u043e\u043d",value:"ST01114",id:"ST01114",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0422\u041e\u041b\u041e\u0422\u041e",value:"ST01268",id:"ST01268",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0432\u044f\u0437\u043d\u043e\u0439",value:"ST00200",id:"ST00200",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["CY",{options:[],isDisabled:!0}],["TH",{options:[],isDisabled:!0}],["VN",{options:[{label:"VN Post",value:"ST09999",id:"ST09999",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}]]),new Map([["RU",{options:[{label:"\u041c\u0422\u0421",value:"ST00300",id:"ST00300",organizationType:E.$B.TRADING_NETWORK},{label:"Kari",value:"ST00622",id:"ST00622",organizationType:E.$B.TRADING_NETWORK},{label:"\u0411\u0438\u043b\u0430\u0439\u043d",value:"ST00669",id:"ST00669",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0432\u044f\u0437\u043d\u043e\u0439",value:"ST00200",id:"ST00200",organizationType:E.$B.TRADING_NETWORK},{label:"\u041f\u043e\u0447\u0442\u0430 \u0420\u0424",value:"mail",id:"mail",organizationType:E.$B.BANK},{label:"\u0411\u0430\u043d\u043a\u0438",value:"bank",id:"bank",organizationType:E.$B.BANK}],isDisabled:!1}]]),(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,Tr.coordinates,Tr.center,Tr.zoom,(0,a.jsx)(D.pX,{}),k.Y1.MapAndList,Ir.coordinates,Ir.center,Ir.zoom,(0,a.jsx)(D.tV,{}),k.Y1.MapAndList,kr.coordinates,kr.center,kr.zoom,(0,a.jsx)(D.Wp,{}),k.Y1.MapAndList,Or.coordinates,Or.center,Or.zoom,(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,wr.coordinates,wr.center,wr.zoom,(0,a.jsx)(D.bs,{}),k.Y1.Custom,wr.coordinates,wr.center,wr.zoom,(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,Er.coordinates,Er.center,Er.zoom,(0,a.jsx)(D.bs,{}),k.Y1.List,Tr.coordinates,Tr.center,Tr.zoom,(0,a.jsx)(D.pX,{}),k.Y1.MapAndList,Ir.coordinates,Ir.center,Ir.zoom,(0,a.jsx)(D.bs,{}),k.Y1.Custom,wr.coordinates,wr.center,wr.zoom,(0,a.jsx)(D.bs,{}),k.Y1.List,Tr.coordinates,Tr.center,Tr.zoom,(0,a.jsx)(D.pX,{}),k.Y1.MapAndList,Ir.coordinates,Ir.center,Ir.zoom;var To=[{label:"\u0412\u044b\u0434\u0430\u0447\u0430 \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430",value:"17",id:"17",type:k.I.Otpravka},{label:"\u0413\u0430\u0448\u0435\u043d\u0438\u0435 \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432",value:"46",id:"46",type:k.I.Poluchenie},{label:"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0439\u043c\u043e\u0432 (\u0434\u043b\u044f \u043a\u0430\u0440\u0442\u044b)",value:"303",id:"303",type:k.I.Otpravka},{label:"\u041f\u0440\u0438\u0435\u043c \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430",value:"16",id:"16",type:k.I.Poluchenie},{label:"\u0417\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432",value:"1",id:"1",type:k.I.Poluchenie},{label:"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 (VN)",value:"999",id:"999",type:k.I.Poluchenie}];new Map([["TH",[{query:new URLSearchParams,content:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 \u0422\u0430\u0438\u043b\u0430\u043d\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u0447\u0435\u0442. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432 \u043e\u0444\u0438\u0441\u0430\u0445 \u0431\u0430\u043d\u043a\u043e\u0432-\u043f\u0430\u0440\u0442\u043d\u0435\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \xab\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u041a\u043e\u0440\u043e\u043d\u0430\xbb \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u0421\u041d\u0413, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Korona. \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u043d\u043a\u0430, \u0424\u0418\u041e \u0438 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f."},...To.map((e=>({query:new URLSearchParams([["services",e.value]]),content:`${e.label}. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 \u0422\u0430\u0438\u043b\u0430\u043d\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u0447\u0435\u0442. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432 \u043e\u0444\u0438\u0441\u0430\u0445 \u0431\u0430\u043d\u043a\u043e\u0432-\u043f\u0430\u0440\u0442\u043d\u0435\u0440\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \xab\u0417\u043e\u043b\u043e\u0442\u0430\u044f \u041a\u043e\u0440\u043e\u043d\u0430\xbb \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u0421\u041d\u0413, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Korona. \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u043d\u043a\u0430, \u0424\u0418\u041e \u0438 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f.`})))]]]),new Map([["RU",{options:[{label:"\u041c\u0422\u0421",value:"ST00300",id:"ST00300",organizationType:E.$B.TRADING_NETWORK},{label:"Kari",value:"ST00622",id:"ST00622",organizationType:E.$B.TRADING_NETWORK},{label:"\u94f6\u884c",value:"banks",id:"banks",organizationType:E.$B.BANK},{label:"\u0411\u0438\u043b\u0430\u0439\u043d",value:"ST00669",id:"ST00669",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0432\u044f\u0437\u043d\u043e\u0439",value:"ST00200",id:"ST00200",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["CN",{options:[{label:"Kari",value:"ST00622",id:"ST00622",organizationType:E.$B.TRADING_NETWORK},{label:"\u94f6\u884c",value:"banks",id:"banks",organizationType:E.$B.BANK}],isDisabled:!1}],["KZ",{options:[{label:"\u041c\u0422\u0421",value:"ST00300",id:"ST00300",organizationType:E.$B.TRADING_NETWORK},{label:"\u0411\u0438\u043b\u0430\u0439\u043d",value:"ST00669",id:"ST00669",organizationType:E.$B.TRADING_NETWORK},{label:"\u041c\u0435\u0433\u0430\u0444\u043e\u043d",value:"ST01114",id:"ST01114",organizationType:E.$B.TRADING_NETWORK}
1,{label:"\u0421\u0422\u041e\u041b\u041e\u0422\u041e",value:"ST01268",id:"ST01268",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["KR",{options:[{label:"\u041c\u0435\u0433\u0430\u0444\u043e\u043d",value:"ST01114",id:"ST01114",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0422\u041e\u041b\u041e\u0422\u041e",value:"ST01268",id:"ST01268",organizationType:E.$B.TRADING_NETWORK},{label:"\u0421\u0432\u044f\u0437\u043d\u043e\u0439",value:"ST00200",id:"ST00200",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}],["CY",{options:[],isDisabled:!0}],["TH",{options:[],isDisabled:!0}],["VN",{options:[{label:"VN\u90ae\u653f",value:"ST09999",id:"ST09999",organizationType:E.$B.TRADING_NETWORK}],isDisabled:!1}]]),(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,Tr.coordinates,Tr.center,Tr.zoom,(0,a.jsx)(D.pX,{}),k.Y1.MapAndList,Ir.coordinates,Ir.center,Ir.zoom,(0,a.jsx)(D.tV,{}),k.Y1.MapAndList,kr.coordinates,kr.center,kr.zoom,(0,a.jsx)(D.Wp,{}),k.Y1.MapAndList,Or.coordinates,Or.center,Or.zoom,(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,wr.coordinates,wr.center,wr.zoom,(0,a.jsx)(D.bs,{}),k.Y1.Custom,wr.coordinates,wr.center,wr.zoom,(0,a.jsx)(D.bs,{}),k.Y1.MapAndList,Er.coordinates,Er.center,Er.zoom,k.I.Otpravka,k.I.Poluchenie,k.I.Otpravka,k.I.Poluchenie,k.I.Poluchenie,k.I.Poluchenie;var Io=({text:e,linkText:t})=>(0,a.jsxs)(s.Text,{color:"white",children:[e,(0,a.jsx)(s.Link,{href:"/faq/geolocation",textDecoration:"underline",target:"_blank",children:t})]});typeof window>"u"||((0,a.jsx)(Io,{text:"\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435. \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0433\u0435\u043e\u0434\u0430\u043d\u043d\u044b\u043c ",linkText:"\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?"}),(0,a.jsx)(p.Nm,{}),(0,a.jsx)(Io,{text:"\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443",linkText:null}),(0,a.jsx)(p.Nm,{}),(0,a.jsx)(Io,{text:"\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435. \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",linkText:null}),(0,a.jsx)(p.Nm,{}),(0,a.jsx)(Io,{text:"\u041d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u043f\u0443\u043d\u043a\u0442\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0433\u0440\u0430\u043d\u0438\u0446\u0443.",linkText:"\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?"}));var ko={getAgentsServices:E.VJ,getUserLocation:E.wV,fetchAgentBalloonData:E.TX,fetchAgentsByBounds:E.il,fetchAgentsByIds:E.Dg,fetchAgentsPagination:E.w9,getAddressByCoords:E.yi};function Oo(){let e=new w.W2;return e.bind(Q.DynamicDataStore).toConstantValue(new Po),e.bind(Q.ApiCallbacks).toConstantValue(ko),e.bind(Q.ApiServices).to(fo).inSingletonScope(),e.bind(Q.ApiStateDecorator).to(mo).inSingletonScope(),e.bind(Q.ReadyStore).to(vo).inSingletonScope(),e.bind(Q.MapApiFacade).to(Co).inSingletonScope(),e.bind(Q.MapStartupManager).to(Ao).inSingletonScope(),e.bind(Q.MapLocalizationMapperStore).to(Sr).inSingletonScope(),e.bind(Q.MapLocalizationStore).to(pr).inSingletonScope(),e.bind(Q.AgentsParamsAdapter).to(ir).inSingletonScope(),e.bind(Q.AgentsParamsStore).to(Mi).inSingletonScope(),e.bind(Q.QueryStore).to(qr).inSingletonScope(),e.bind(Q.MapStore).to(or).inSingletonScope(),e.bind(Q.MapUiStore).to(zr).inSingletonScope(),e.bind(Q.PointsListStore).to(_r).inSingletonScope(),e.bind(Q.PointQueryStore).to(Vr).inSingletonScope(),e.bind(Q.SearchStore).to(dr).inSingletonScope(),e.bind(Q.UserLocationStore).to(cr).inSingletonScope(),e.bind(Q.MarkerStore).to(Br).inSingletonScope(),e.bind(Q.MapStateStore).to(Pr).inSingletonScope(),e.bind(Q.MapLocationStore).to(xr).inSingletonScope(),e.bind(Q.MapBoundsManager).to(Mo).inSingletonScope(),e.bind(Q.MapLocationInitializer).to(bo).inSingletonScope(),e.bind(Q.MapModuleStore).to(Lr).inSingletonScope(),e.bind(Q.GeolocationStore).to(vr).inSingletonScope(),e.bind(Q.FeaturesStore).to(Ar).inSingletonScope(),e.bind(Q.ClusterStore).to(fr).inSingletonScope(),e.bind(Q.AgentsStore).to(mr).inSingletonScope(),e.bind(Q.MapQueryAdapter).to(Ur).inSingletonScope(),e.bind(Q.MapReadyAdapter).to(Yr).inSingletonScope(),e.bind(Q.FiltersStore).to(Gr).inSingletonScope(),e.bind(Q.FiltersReadyAdapter).to(go).inSingletonScope(),e.bind(Q.StaticFiltersHelperStore).to(Lo).inSingletonScope(),e.bind(Q.QueryFilterAdapter).to(So).inSingletonScope(),e.bind(Q.OpenFilterStore).to(Jr).inSingletonScope(),e.bind(Q.ViewFilterStore).to(yo).inSingletonScope(),e.bind(Q.CountryFilterStore).to(Kr).inSingletonScope(),e.bind(Q.CurrencyFilterStore).to(Xr).inSingletonScope(),e.bind(Q.ServiceFilterStore).to(oo).inSingletonScope(),e.bind(Q.ServicePointsFilterStore).to(ho).inSingletonScope(),e.bind(Q.UserLocationProvider).to(ur).inSingletonScope(),e.bind(Q.ComponentOverridesStore).to(xo).inSingletonScope(),e.bind(Q.RootStore).to(lr).inSingletonScope(),e}var wo=Oo(),Eo=e=>
1({filtersData:e.filtersData,config:e.config,alertContent:e.alertContent,homeUserLocation:e.homeUserLocation,queryWorker:e.queryWorker,querySchema:e.querySchema,custom:e.custom,table:e.table,apikey:e.apikey,bottomAndTopByCountry:e.bottomAndTopByCountry,mapType:e.mapType}),jo=(e,t)=>{let i=t||wo;return e.agentsServiceUrl&&(0,E.X8)(e.agentsServiceUrl),e.headers&&(0,E.FM)(e.headers),i.get(Q.DynamicDataStore).updateData(Eo(e)),e.apiCallbacks&&i.rebindSync(Q.ApiCallbacks).toConstantValue(e.apiCallbacks),e.componentOverrides&&i.get(Q.ComponentOverridesStore).setOverrides(e.componentOverrides),i.get(Q.RootStore)},Do=(0,o.Pi)((({wrapper:e,children:t,testId:i,...r})=>{let o=xi(),s=(0,d.useRef)(null),{isLoading:n,balloonData:l,setBalloonSize:c}=he();return(0,d.useEffect)((()=>{let e=s.current;if(n||!l||!e)return void c(null);let t=Bi({element:e,onStable:({width:e,height:t})=>c({width:e,height:t+42})});return()=>{t(),c(null)}}),[l,n,c]),(0,a.jsx)(e,{initial:{opacity:0,scale:.5,transformOrigin:"left top"},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.3},"data-testid":i,ref:s,...o,...r,children:t})})),No=(0,o.Pi)((e=>(0,a.jsx)(Do,{wrapper:Wt,testId:"Balloon",overflow:"visible",...e,children:(0,a.jsxs)(Kt,{"data-testid":qe,children:[(0,a.jsx)(Zt,{"data-testid":"List",children:(0,a.jsx)(s.Scrollbar,{maxHeight:"306px",children:(0,a.jsx)(vi,{})})}),(0,a.jsx)(s.Box,{width:"100%","data-testid":Ge,children:(0,a.jsx)(Si,{})})]})}))),Ro="var(--chakra-filters-containerShadow)",Fo=(0,s.chakra)(s.Box,{baseStyle:{width:"360px",minHeight:"110px",padding:"16px",borderRadius:"16px",backgroundColor:"white",overflow:"hidden",filter:Ro,zIndex:9999}}),zo=(0,P.E)(Fo),Bo=(0,s.chakra)(s.Box,{baseStyle:{width:"100%",backgroundColor:"white",filter:Ro,borderRadius:"24px 24px 0 0",padding:"40px 16px 24px",zIndex:9999}}),_o=(0,s.chakra)(s.Box,{baseStyle:{position:"absolute",width:"100%",filter:Ro,zIndex:9999,bottom:0}}),Uo=(0,P.E)(_o),Yo=(0,s.chakra)(s.Box,{baseStyle:{width:"24px",height:"24px",position:"absolute",top:"16px",right:"12px",cursor:"pointer"}}),Vo=({onBack:e})=>{let t=ze(),i=t.getClusterBalloonSlots(),r=t.getClusterBalloonSlotProps(),o=(0,d.useMemo)((()=>t=>{r?.backButton?.onClick?.(),e()}),[r,e]),n=(0,d.useMemo)((()=>fi({slot:i?.backButton,defaultComponent:()=>(0,a.jsx)(Xt,{"data-testid":Ze,onClick:o,children:(0,a.jsx)(p.um,{})}),slotProps:{onClick:o,"data-testid":Ze}})),[i?.backButton,o]);return(0,a.jsxs)(a.Fragment,{children:[n,(0,a.jsx)(s.Box,{padding:"16px 16px 24px","data-testid":Ge,children:(0,a.jsx)(Si,{})})]})},Ho=()=>(0,a.jsx)($t,{children:(0,a.jsx)(s.Scrollbar,{maxHeight:"200px",children:(0,a.jsx)(vi,{})})}),Qo=(0,o.Pi)((()=>{let{selectedPointId:e,setActiveId:t,setSelectedPointId:i}=Ae(),{height:r,contentRef:o}=((e=0)=>{let[t,i]=(0,d.useState)(e),r=(0,d.useRef)(null);return(0,d.useEffect)((()=>{if(!r.current)return;let e=new ResizeObserver((([e])=>{i(e.contentRect.height)}));return e.observe(r.current),()=>e?.disconnect()}),[]),{height:t,contentRef:r}})(200);return(0,a.jsxs)(qt,{className:Ci,"data-testid":qe,padding:"40px 0 8px",children:[(0,a.jsx)(Yo,{children:(0,a.jsx)(s.CloseButton,{onClick:()=>t(null),"data-testid":Ke,variant:"ghost",size:"lg"})}),(0,a.jsx)(Jt,{transition:{duration:.2},animate:{height:r},children:(0,a.jsx)(s.Box,{ref:o,children:e?(0,a.jsx)(Vo,{onBack:()=>i(null)}):(0,a.jsx)(Ho,{})})})]})})),Wo=({wrapper:e,children:t})=>{let i=xi();return(0,a.jsx)(e,{initial:{bottom:"-100%",opacity:0}
1,animate:{bottom:0,opacity:1},exit:{bottom:"-100%",opacity:0},transition:{duration:.3},...i,children:t})},qo=(0,o.Pi)((()=>{let e=Tt();return(0,a.jsx)(s.Portal,{containerRef:e,children:(0,a.jsx)(Wo,{wrapper:Uo,children:(0,a.jsx)(Qo,{})})})})),Go=(0,o.Pi)((()=>(0,s.useMobileBreakpoint)({ssr:!1})?(0,a.jsx)(qo,{}):(0,a.jsx)(No,{position:"absolute",top:"20px",left:"-20px",marginTop:"4px"}))),Ko=(0,o.Pi)((()=>{let e=(0,s.useMobileBreakpoint)({ssr:!1}),{selectFirstPointId:t,selectedPointId:i,setSelectedPointId:r,agentIds:o}=Ae(),{openTrigger:n}=ce(),{isMapInDom:l}=ye(),c=(0,d.useRef)(!1);return(0,d.useEffect)((()=>{n&&(c.current=!0)}),[n]),(0,d.useEffect)((()=>{!l||0===o?.length||(!i||!o?.includes(i))&&(e?r(null):t())}),[e,o]),(0,a.jsx)(Go,{})})),Zo=({onTap:e,dragThreshold:t=8})=>{let i=(0,d.useRef)(0),r=(0,d.useRef)(0),o=(0,d.useRef)(!1),s=(0,d.useRef)(!1),a=(0,d.useRef)(!1),n=(0,d.useCallback)((()=>{if(typeof document>"u")return;let e=document.activeElement;e instanceof HTMLElement&&e.blur()}),[]),l=(0,d.useCallback)((t=>{if(a.current)return a.current=!1,void t.stopPropagation();let i=o.current;o.current=!1,s.current=!1,!i&&(t.stopPropagation(),e(t))}),[e]);return{onTouchStart:(0,d.useCallback)((e=>{let t=e.touches[0];t&&(i.current=t.clientX,r.current=t.clientY,o.current=!1,s.current=!0)}),[]),onTouchMove:(0,d.useCallback)((e=>{if(!s.current)return;let a=e.touches[0];if(!a)return;let n=a.clientX-i.current,l=a.clientY-r.current;Math.hypot(n,l)>t&&(o.current=!0)}),[t]),onTouchEnd:(0,d.useCallback)((t=>{s.current=!1,o.current?o.current=!1:(t.stopPropagation(),t.preventDefault(),a.current=!0,n(),e(t))}),[e,n]),onMouseDown:(0,d.useCallback)((e=>{i.current=e.clientX,r.current=e.clientY,o.current=!1,s.current=!0}),[]),onMouseMove:(0,d.useCallback)((e=>{if(!s.current)return;let a=e.clientX-i.current,n=e.clientY-r.current;Math.hypot(a,n)>t&&(o.current=!0)}),[t]),onMouseUp:(0,d.useCallback)((()=>{s.current=!1}),[]),onClick:l}},$o=(0,o.Pi)((0,d.forwardRef)((({clusterId:e,coordinates:t,placemarksCount:i,isActive:r,onClusterClick:o,...n},l)=>{let{components:c}=Se(),[u,p]=(0,d.useState)(!1),{onTouchStart:h,onTouchMove:y,onTouchEnd:g,onMouseDown:S,onMouseMove:m,onMouseUp:f,onClick:A}=Zo({onTap:e=>{o?.(e)}}),v=Number.parseInt(i),x=r?v+9999:u?v+9800:v+2e3;return c?.YMapMarker?(0,a.jsxs)(c.YMapMarker,{coordinates:t,source:"clusterer-source",zIndex:x,children:[(0,a.jsx)(s.Box,{"data-active":r?"true":"false","data-testid":"MapCluster",onTouchStart:h,onTouchMove:y,onTouchEnd:g,onMouseDown:S,onMouseMove:m,onMouseUp:f,onClick:A,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),"data-id":e,"data-coordinates":t,ref:l,position:"absolute",transform:"translate(-50%, -50%)",pointerEvents:"none",sx:Ct,children:(0,a.jsx)(Ht,{placemarksCount:i,isActive:r,...n})}),(0,a.jsx)(T.M,{children:r?(0,a.jsx)(Ko,{}):null})]},e):null}))),Xo=(0,o.Pi)((({features:e,coordinates:t,...i})=>{let{clusterId:r,isActive:o,handleClusterClick:s,placemarksCount:n}=((e,t)=>{let i=(0,d.useMemo)((()=>(e=>`${e[0].id}-${e.length}`)(e)),[e]),r=(e=>e.length.toString())(e);Yt(i);let{isActive:o,handleClusterClick:s}=Vt(e,t,i);return{clusterId:i,isActive:o,handleClusterClick:s,placemarksCount:r}})(e,t),{pushToVisibleClustersMap:l,removeFromVisibleClustersMap:c}=Ae();return(0,d.useEffect)((()=>(l&&r&&l(r,e.map((e=>e.id))),()=>{c(r)})),[l,r]),e&&s?(0,a.jsx)($o,{coordinates:t,clusterId:r,isActive:o,onClusterClick:s,placemarksCount:n,...i}):null})),Jo=e=>(0,a.jsx)(s.Box,{width:"32px",height:"32px","data-testid":"GeoMarker",...e,children:(0,a.jsx)(p.C7,{})}),es=(0,o.Pi)((({coordinates:e})=>{let{components:t}=Se(),i=ymaps3.YMapMarker.defaultProps.zIndex+1e3;return t?.YMapMarker&&e?(0,a.jsx)(t.YMapMarker,{coordinates:e,zIndex:i,children:(0,a.jsx)(Jo,{transform:"translate(-50%, -100%)"})},"geo-map-marker"):null})),ts=()=>{let{activeId:e,activeFeaturePoint:t,setLoading:i,setError:r,setBalloonData:o}=he(),s=(e=>{let{fetchAgentBalloonData:t}=te(),i=e?.id,r=i&&t?`agent-balloon-data-${i}`:null,o=(0,d.useCallback)((()=>i&&t?t(e):null),[i,t]),{data:s,error:a,isValidating:n}=(0,c.ZP)(r,o,{revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1});return{data:s,isLoading:!s&&!a||n,isError:!!a}})(t);(0,d.useEffect)((()=>{s.data&&e&&o(s.data)}),[s.data,e]),(0,d.useEffect)((()=>{e&&i(s.isLoading)}),[s.isLoading,e]),(0,d.useEffect)((()=>{e&&r(s.isError)}),[s.isError])},is=e=>{let{isActive:t,zIndex:i,balloonSize:r}=rs(e),{components:o}=Se(),{activeId:a,checkActive:n,attachListenersForActiveMarker:l,detachListenersForActiveMarker:c,focusActiveMarker:u,globalMarkerClickHandler:p,resetActive:h}=he(),y=!!(0,s.useMobileBreakpoint)(),{scrollIntoViewWithTimeout:g}=le(),{isMapInitialized:S,isMapInDom:m}=ye(),{openTrigger:f}=ce(),A=(0,d.useRef)(!1),v=e?.geometry?.coordinates;return(0,d.useEffect)((()=>()=>{n(e.id)&&h()}),[]),(0,d.useEffect)((()=>
1{if(t)return l(),()=>{c()}}),[t]),(0,d.useEffect)((()=>{f&&f&&!A.current&&(A.current=!0)}),[f]),(0,d.useEffect)((()=>{if(t&&S&&m){let e=A.current?500:100,t=g(e);return()=>clearTimeout(t)}}),[a,S,m]),(0,d.useEffect)((()=>{t&&a&&v&&(r||y)&&u(y,v)}),[a,r]),{isActive:t,onMarkerClick:p,zIndex:i,components:o}},rs=e=>{let{checkActive:t,balloonSize:i}=he(),{components:r}=Se(),o=t(e.id);return{isActive:o,zIndex:o?(r?.YMapMarker?.defaultProps?.zIndex??0)+9999:1e3,balloonSize:i}},os=(0,o.Pi)((({isActive:e,icon:t=(0,a.jsx)(p.b8,{}),activeIcon:i=(0,a.jsx)(p.kQ,{}),...r})=>(0,a.jsx)(s.Box,{"data-testid":"marker-icon",cursor:"pointer",width:"28px",height:"34px",tabIndex:0,sx:Ct,pointerEvents:"auto",...r,children:e?i:t}))),ss=(0,o.Pi)((()=>{let{balloonData:e,isLoading:t,isError:i}=he(),{mapAgentsTooltipLabel:r}=re(),o=ze(),s=o.getBalloonContentSlots(),n=o.getBalloonContentSlotProps(),l=t||i||!e,{shortName:d,address:c,schedule:u,services:p,phone:h,id:y,organizationType:g,metadata:S}=e||{};return(0,a.jsx)(yi,{id:y,shortName:d,phone:h,address:c,services:p,schedule:u,organizationType:g,isLoading:l,isChecked:!!S?.isChecked,tooltipLabel:r,contentSlots:s,contentSlotProps:n})})),as=(0,o.Pi)((({children:e,...t})=>(0,a.jsx)(Do,{wrapper:zo,testId:qe,...t,children:e??(0,a.jsx)(ss,{})}))),ns=(0,o.Pi)((e=>{let{onClose:t,children:i,...r}=e;return(0,a.jsxs)(Bo,{className:Ci,"data-testid":qe,...r,children:[(0,a.jsx)(Yo,{children:(0,a.jsx)(s.CloseButton,{onClick:t,"data-testid":Ke,variant:"ghost",size:"lg"})}),i]})})),ls=(0,o.Pi)((function({children:e,portalRef:t,...i}){let{setActiveMarkerId:r}=he(),o=Tt();return(0,a.jsx)(s.Portal,{containerRef:t??o,children:(0,a.jsx)(Wo,{wrapper:Uo,children:(0,a.jsx)(ns,{onClose:()=>{r(null)},...i,children:e??(0,a.jsx)(ss,{})})})})})),ds=(0,o.Pi)((({mobileBalloonProps:e,portalRef:t,children:i,...r})=>(0,s.useMobileBreakpoint)({ssr:!1})?(0,a.jsx)(ls,{portalRef:t,...e,children:i}):(0,a.jsx)(as,{position:"absolute",top:"20px",left:"-12px",marginTop:"8px",...r}))),cs=(0,o.Pi)((({children:e,mobileBalloonProps:t,...i})=>(0,a.jsx)(ds,{mobileBalloonProps:t,...i,children:e}))),us=(0,o.Pi)((e=>{let{id:t,coordinates:i,isActive:r,components:o,zIndex:n,onMarkerClick:l,icon:c,activeIcon:u,...p}=e;if(!o?.YMapMarker||!i)return null;let{onTouchStart:h,onTouchMove:y,onTouchEnd:g,onMouseDown:S,onMouseMove:m,onMouseUp:f,onClick:A}=Zo({onTap:e=>{l?.(e)}}),v=o.YMapMarker,[x,C]=d.useState(!1),M={key:t,"data-id":t,coordinates:i,source:"clusterer-source",zIndex:r?9999:x?9998:n};return d.createElement(v,M,(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Box,{onTouchStart:h,onTouchMove:y,onTouchEnd:g,onMouseDown:S,onMouseMove:m,onMouseUp:f,onClick:A,"data-testid":"MapMarker","data-id":t,"data-active":r?"true":"false",position:"absolute",transform:"translate(-50%, -50%)",pointerEvents:"none",sx:Ct,children:(0,a.jsx)(os,{isActive:r,icon:c,activeIcon:u,onMouseEnter:()=>{C(!0)},onMouseLeave:()=>{C(!1)},...p})}),(0,a.jsx)(T.M,{children:r?(0,a.jsx)(cs,{},`balloon-${t}`):null})]}))})),ps=(0,o.Pi)((({feature:e,...t})=>{let{isActive:i,onMarkerClick:r,zIndex:o,components:s}=(e=>{ts();let{isActive:t,onMarkerClick:i,zIndex:r,components:o}=is(e);return{isActive:t,onMarkerClick:i,zIndex:r,components:o}})(e),n=ze(),l=n.getMarkerSlots(),c=n.getMarkerSlotProps(),u=e?.geometry?.coordinates,h=e?.id,y="number"==typeof o?o:void 0,{zIndex:g,...S}=t,m=S,f=(0,d.useMemo)((()=>t=>{i?c?.activeIcon?.onClick?.(e):c?.icon?.onClick?.(e),r?.(t)}),[i,c,e,r]),A=(0,d.useMemo)((()=>fi({slot:l?.icon,defaultComponent:()=>(0,a.jsx)(p.b8,{}),defaultProps:{size:c?.icon?.size,color:c?.icon?.color}})),[l?.icon,c?.icon]),v=(0,d.useMemo)((()=>fi({slot:l?.activeIcon,defaultComponent:()=>(0,a.jsx)(p.kQ,{}),defaultProps:{size:c?.activeIcon?.size,color:c?.activeIcon?.color}})),[l?.activeIcon,c?.activeIcon]);return s?.YMapMarker&&u&&r&&h?(0,a.jsx)(us,{id:h,coordinates:u,isActive:i,components:s,onMarkerClick:f,zIndex:y,icon:A,activeIcon:v,...m}):null})),hs={gridSize:64},ys=8,gs=18,Ss={min:ys,max:gs},ms={marker:e=>(0,a.jsx)(ps,{feature:e}),cluster:(e,t)=>(0,a.jsx)(Xo,{coordinates:e,features:t}),surface:(0,a.jsx)(Be,{}),geoMarker:e=>(0,a.jsx)(es,{coordinates:e})},fs={"korona-pay":ms,"kp-with-controls":{...ms,surface:(0,a.jsx)(_t,{})}},As=({cluster:e,theme:t,geoMarker:i,marker:r,renderVariant:o,surface:s})=>{let a=(0,d.useMemo)((()=>t??(e=>fs[e])(o)),[o,t]);return{currentMarker:(0,d.useMemo)((()=>r??a?.marker),[r,a?.marker]),currentCluster:(0,d.useMemo)((()=>e??a?.cluster),[e,a?.cluster]),currentSurface:(0,d.useMemo)((()=>s??a?.surface),[s,a?.surface]),currentGeoMarker:(0,d.useMemo)((()=>i??a?.geoMarker),[i,a?.geoMarker])}},vs=(0,o.Pi)((e=>{let{mapErrorLoadingHeader:t,mapErrorLoadingDescription:i}
1=re();return(0,a.jsx)(s.Box,{"data-testid":"FailedLoadedState",position:"absolute",top:"0",width:"full",height:"full",background:"bg.grey.primary",pointerEvents:"all",...e,children:(0,a.jsx)(s.Flex,{align:"center",width:"full",height:"full",justify:"center",children:(0,a.jsxs)(s.Stack,{spacing:"16px",align:"center",textAlign:"center",children:[(0,a.jsx)(s.Box,{width:["84px","84px","96px"],height:["84px","84px","96px"],children:(0,a.jsx)(p.sx,{})}),(0,a.jsx)(s.Text,{color:"text.body.primary",fontSize:"28px",lineHeight:"40px",size:"h3",variant:"header","data-testid":"Header",children:t}),(0,a.jsx)(s.Text,{color:"text.body.primary",size:"md",fontSize:"16px",lineHeight:"24px","data-testid":"Description",children:i})]})})})})),xs=(0,o.Pi)((({isUseClustering:e,marker:t,cluster:i,clusterMethod:r})=>{let{features:o}=fe(),{clusterer:s}=Se(),{YMapClusterer:n}=s||{};return e&&t&&i&&r&&n?(0,a.jsx)(n,{marker:t,cluster:i,method:r,features:o??[]}):o?.map((e=>t&&t(e)))})),Cs=(0,o.Pi)((({marker:e,refCallback:t,mapProps:i,isUseClustering:r,cluster:o,surface:n,geoMarker:l,clusterMethod:c,loadingState:u=(0,a.jsx)(s.Skeleton,{height:"100%",width:"100%","data-testid":He}),errorState:p=(0,a.jsx)(vs,{}),features:h=(0,a.jsx)(xs,{marker:e,cluster:o,isUseClustering:r,clusterMethod:c}),children:y})=>{let{isReady:g,isError:S,controlledLocation:f,components:A}=(()=>{let{isError:e}=ye(),{controlledLocation:t}=ge(),{components:i,areYmapsModulesLoaded:r}=Se(),{isReady:o}=ae(),{isLoading:s}=Te();return{isReady:!!(r&&t&&i&&o)||!s,isError:e,controlledLocation:t,components:i}})(),{handlers:v}=le(),x=(e=>{let{geoMarkerCoordinates:t}=me();return(0,d.useMemo)((()=>t&&e?e(t):null),[t,e])})(l),{mapBehaviors:C}=he(),M=Ae(),b=(0,s.useMobileBreakpoint)({ssr:!1});if((0,d.useEffect)((()=>(M.setGlobalClusterClickHandler?.((e=>M.handleClusterClickFromEvent(e,b))),()=>M.setGlobalClusterClickHandler?.(null))),[M,b]),!g||!A||!f)return S?p:u;let{YMap:L,YMapDefaultSchemeLayer:P,YMapDefaultFeaturesLayer:T,YMapLayer:I,YMapListener:k,YMapFeatureDataSource:O}=A;return(0,a.jsx)(m.x,{position:"relative",width:"100%",height:"100%",overflow:"hidden",children:(0,a.jsxs)(L,{location:f,ref:t,zoomRange:Ss,margin:[0,0,0,0],behaviors:C,...i,children:[(0,a.jsx)(P,{}),(0,a.jsx)(O,{id:"clusterer-source"}),(0,a.jsx)(T,{}),(0,a.jsx)(k,{...v}),n,(0,a.jsx)(I,{source:"clusterer-source",type:"markers",zIndex:1800}),h,x,y]})})})),Ms=(0,o.Pi)((({clusterByGridParams:e=hs,renderVariant:t="korona-pay",isUseClustering:i=!0,theme:r,geoMarker:o,handlers:s,mapProps:n,children:l,surface:c,cluster:u,marker:p,variant:h="koronaPay",...y})=>{let{handleRef:g,clusterMethod:S}=(({clusterByGridParams:e,handlers:t})=>{let[i,r]=(0,d.useState)(),{clusterer:o}=Se(),{initializeMap:s}=ne(),{setMapInDom:a}=ye(),{clusterByGrid:n}=o||{},l=(0,d.useMemo)((()=>n&&e&&n(e)),[n,e]);return(0,d.useEffect)((()=>{i&&s({map:i,clusterByGridParams:e,handlers:t})}),[i,e,t,l]),(0,d.useEffect)((()=>(i&&a(!0),()=>{a(!1)})),[i]),{map:i,handleRef:e=>{e&&r(e)},clusterMethod:l}})({clusterByGridParams:e,handlers:s}),{currentMarker:m,currentCluster:A,currentSurface:v,currentGeoMarker:x}=As({renderVariant:t,theme:r,marker:p,cluster:u,surface:c,geoMarker:o}),{pointerEvents:C,styles:M,isMapHidden:b}=(e=>{let{isPointerEventDisabled:t,isMapHidden:i}=le();return{pointerEvents:t?"none":"auto",styles:(0,f.j)("Map",{variant:e}),isMapHidden:i}})(h),L=b?void 0:m,P=b?void 0:A,T=b?void 0:x,I=b?null:l,k=!b&&i;return(0,a.jsx)(Jt,{className:"map",initial:{opacity:0}
1,animate:{opacity:b?0:1},exit:{opacity:0},transition:{duration:b?0:.3,delay:b?0:.3},__css:M.container,height:"600px","data-testid":"Map",pointerEvents:C,...y,children:(0,a.jsx)(Cs,{isUseClustering:k,clusterMethod:S,geoMarker:T,surface:v,cluster:P,refCallback:g,marker:L,mapProps:n,children:I})})})),bs=(0,o.Pi)((()=>{let{bottomByCountry:e}=Re(),t=(0,d.useMemo)((()=>(0,O.ZN)(e)),[e]);return t?(0,a.jsx)(s.Stack,{w:"full",sx:{"& > div:first-of-type":{marginTop:["16px","16px ","24px"]}},gap:"16px",children:t}):null})),Ls={height:"600px",width:"100vw"},Ps=({mapContainerSize:e,variant:t})=>{let{overlayHeight:i}=le(),{width:r,height:o}=e||{},s=(e=>(0,f.j)("MapView",{variant:e}))(t);return{width:r,height:i??o,styles:s}},Ts=(0,A.m)(v.g,{baseStyle:({filters:e})=>({gap:e?"0.5rem":"0",position:"relative",zIndex:1})}),Is=(0,A.m)(m.x,{baseStyle:{width:"100%",marginBottom:{base:"16px",md:"40px"}}});(0,A.m)(m.x,{baseStyle:{background:"bg.grey.primary",width:"100vw",padding:"8px 16px"}});var ks=(0,A.m)(Jt,{baseStyle:{minHeight:"120px",position:"relative",pointerEvents:"none"}}),Os=(0,A.m)(m.x,{baseStyle:{pointerEvents:"none",position:"absolute",width:"100%",height:"100%",zIndex:9999}}),ws=(0,s.chakra)(s.VStack,{baseStyle:{width:"full",marginBottom:{base:"16px",md:"40px"}}}),Es=()=>{let{isCustomView:e,isOnlyList:t,switcherView:i,view:r,isMapView:o,toggleSwitcherView:s}=Ie(),{areYmapsModulesLoaded:a}=Se(),n=js();return{hideSwitcher:t||r!==k.Y1.MapAndList,isShow:a&&!e,isLeftOptionActive:i===k.Y1.Map,styles:n,toggleSwitcherView:s,isMapView:o}},js=e=>(0,f.j)("SearchAndViewControls",{variant:e}),Ds=(e,t)=>[{label:e,value:"map"},{label:t,value:"list"}],Ns=(0,d.forwardRef)((({label:e,isActive:t,onClick:i,isDisabled:r,...o},n)=>(0,a.jsx)(s.Flex,{w:"full",as:"button",ref:n,type:"button","aria-pressed":t,"aria-disabled":r,pointerEvents:r?"none":"auto",alignItems:"center",justifyContent:"center",onClick:i,...o,children:(0,a.jsx)(s.Text,{variant:"light",size:"lg",color:t?"text.body.secondary":"text.title",children:e})}))),Rs=(0,s.chakra)(s.HStack,{baseStyle:{minWidth:["195px","195px","195px","195px","211px"],borderColor:"indicator.status.normal",justify:"space-between",pointerEvents:"auto",borderStyle:"solid",padding:"14px 8px",background:"white",borderRadius:"8px",borderWidth:"1px",height:"56px"}}),Fs=(0,o.Pi)((({isLeftOptionActive:e,defaultValue:t,isControlled:i,options:r,optionProps:o,onChange:n,...l})=>{let c=r?.at(1)?.label??s.EMPTY_STRING_STATE,u=r?.at(0)?.label??s.EMPTY_STRING_STATE,[p,h]=(0,s.useBoolean)(!!t),y=(0,d.useMemo)((()=>i?e:p),[i,e,p]),g=(0,d.useRef)(null),S=(0,d.useRef)(null);return(0,a.jsxs)(Rs,{role:"group",onKeyDown:e=>{"ArrowLeft"===e.key?(e.preventDefault(),g.current?.focus()):"ArrowRight"===e.key&&(e.preventDefault(),S.current?.focus())},"data-testid":"Switcher","data-pressed":p,...l,children:[(0,a.jsx)(Ns,{ref:g,onClick:e=>((e,t)=>{e.stopPropagation(),n(t),i||h.on()})(e,r[0].value),"data-testid":"SwitcherLeftOption",isActive:!!y,isDisabled:!!y,label:u,...o}),(0,a.jsx)(s.Divider,{h:"24px","data-testid":"SwitcherDivider",isHorizontal:!1,opacity:1,borderColor:"indicator.status.normal"}),(0,a.jsx)(Ns,{ref:S,onClick:e=>((e,t)=>{e.stopPropagation(),n(t),i||h.off()})(e,r[1]?.value),"data-testid":"SwitcherRightOption",isActive:!y,isDisabled:!y,label:c,...o})]})})),zs=(0,P.E)(ws),Bs=(0,o.Pi)((()=>{let{hideSwitcher:e,isLeftOptionActive:t}=Es(),{toggleSwitcherView:i}=Ie(),{mapSwitcherMapLabel:r,mapSwitcherListLabel:o}=re(),n=Ds(r,o),{topByCountry:l}=Re();return e?null:(0,a.jsx)(s.Hide,{above:"md",children:(0,a.jsx)(zs,{initial:!1,transition:{type:"tween",duration:.18},mb:l?{base:"0",md:"0"}:void 0,children:(0,a.jsx)(Fs,{optionProps:{alignItems:"center",justifyContent:"center"},isLeftOptionActive:t,onChange:()=>{i()},options:n,isControlled:!0,height:"40px",w:"full"})})})})),_s=(0,s.chakra)(s.Container,{baseStyle:({view:e})=>({position:e===k.Y1.Custom?"static":"relative",maxWidth:["100%","100%","724px","896px","1264px"],padding:["0 16px","0 16px",0],pointerEvents:"auto",width:"100%",marginTop:["40px","40px","16px"]}),shouldForwardProp:e=>!["view"].includes(e)}),Us=(0,s.chakra)(s.Flex,{baseStyle:({view:e})=>({position:e===k.Y1.Custom?"static":"relative",justifyContent:"center",flexDirection:"column",alignItems:"center",height:"fit-content",width:"100%",marginTop:e===k.Y1.Custom?0:"16px"}),shouldForwardProp:e=>(0,x.x)(e)&&"view"!==e}),Ys=(0,s.chakra)(s.Box,{baseStyle:({view:e,switcherView:t})=>({height:"fit-content",background:t===k.Y1.Map?"":"white",pointerEvents:"none",width:"100%"}),shouldForwardProp:e=>!["view","switcherView"].includes(e)}),Vs=e=>(0,f.j)("MapViewContentRenderer",{variant:e}),Hs=(0,o.Pi)((()=>{let{customContentByQuery:e}=Re(),t=Vs();return(0,a.jsx)(_s,{__css:t.overlayText,view:k.Y1.Custom,marginTop:"0",children:e})})),Qs=({address:e})=>e?(0,a.jsx)(s.ClipboardShare,{size:"fit",variant:"secondary",padding:0,flexWrap:"wrap",whiteSpace:"normal",width:"100%",justifyContent:["space-between","space-between","initial"],textAlign:"left",flexFlow:"nowrap",sx:{textDecoration:"none",_focus:{textDecoration:"none",boxShadow:"none"},_active:{textDecoration:"none"},"@media (hover: hover) and (pointer: fine)":{"&:hover":{textDecoration:"underline"}},".chakra-button__icon":{alignSelf:"baseline",marginTop:"0.25rem"}},text:e,href:e,leftIcon:void 0,rightIcon:(0,a.jsx)(p.b5,{width:"16px",height:"16px"}),testId:"AddressLink",userSelect:"auto",toastProps:{toastContent:"\u0410\u0434\u0440\u0435\u0441 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430",toastBackgroun
1dColor:"bg.darkAdditional.primary",toastColor:"text.white",testId:Xe}}):(0,a.jsx)(s.KoronaSkeleton,{}),Ws="-",qs=[{id:"name",type:"name",width:["100%","100%","220px","220px","280px"],minWidth:["100%","100%","220px","220px","280px"]},{id:"currency",type:"currency",width:["100%","100%","120px","120px","220px"],minWidth:["100%","100%","120px","120px","220px"]},{id:"phone",type:"phone",width:["100%","100%","128px","128px","134px"],minWidth:["100%","100%","128px","128px","134px"]},{id:"schedule",type:"schedule",width:"100%",minWidth:"120px"},{id:"share",type:"share",width:["100%","100%","24px"],minWidth:["100%","100%","24px"]}],Gs={textDecoration:"none",_focus:{textDecoration:"none",boxShadow:"none"},_active:{textDecoration:"none"},"@media (hover: hover) and (pointer: fine)":{"&:hover":{textDecoration:"underline"}}},Ks=({phone:e})=>{if(!e||"-"===e)return Ws;let t=e.split(",").map((e=>e.trim())).filter(Boolean);if(0===t.length)return Ws;let i=e=>(0,a.jsx)(s.Link,{color:"indicator.status.active",href:`tel:${e}`,sx:Gs,whiteSpace:"nowrap",children:e},e);return 1===t.length?i(t[0]):(0,a.jsx)(s.VStack,{spacing:"4px",alignItems:"left",children:t.map((e=>i(e)))})},Zs=({schedule:e})=>
1{if(!e)return(0,a.jsx)(a.Fragment,{children:Ws});let t=e.split(",").map((e=>e.trim()));return 1===t.length?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(a.Fragment,{children:t.map(((e,i)=>(0,a.jsxs)(d.Fragment,{children:[e,i<t.length-1&&(0,a.jsx)("br",{})]},i)))})},$s=(0,o.Pi)((({services:e,content:t})=>{let{isSelectedAll:i,service:r}=we(),o=(0,s.useMobileBreakpoint)({ssr:!1})?"bottom-end":"right",n=[{name:"preventOverflow",options:{padding:16}}],l=e=>{let i=(e=>e&&e in t?t[e]:null)(e);return i?(0,a.jsxs)(s.HStack,{alignItems:"center",gap:"2",children:[(0,a.jsx)(s.Text,{variant:"light",children:i?.label}),(0,a.jsx)(s.Tooltip,{placement:o,label:i?.tooltipContent,isOpenOnClick:!0,modifiers:n,children:({isOpen:e})=>(0,a.jsx)(s.ColoredIcon,{pointerEvents:"none",iconColor:e?"indicator.status.action.dark":"text.body.secondary",hoverIconColor:"indicator.status.action.dark",boxSize:"6",children:(0,a.jsx)(p.sz,{})})})]}):null},d=i?e?.map((e=>l(e.id))).filter(Boolean):l(r);return(Array.isArray(d)?0!==d.length:d)?d:Ws})),Xs={th:{paddingY:"12px",paddingX:"16px",letterSpacing:"0",borderBottom:"none"},tr:{borderBottom:"none"},td:{paddingY:"24px",paddingX:"16px"}},Js={overflowX:"hidden",tr:{borderBottom:"none"},td:{"&:first-of-type::before, &.empty-label::before":{display:"none"},"&::before":{fontFamily:"body",color:"text.body.primary",fontSize:"0.875rem"},_last:{marginBottom:"24px","&::before":{display:"none"}}}},ea=(0,s.chakra)(s.Box,{baseStyle:{clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}}),ta=(0,s.chakra)(s.Box,{baseStyle:{whiteSpace:"break-spaces"}});(0,s.chakra)(s.Alert,{baseStyle:{color:"white",width:"400px",margin:"24px 32px"}}),(0,s.chakra)(s.Text,{baseStyle:{color:"indicator.status.active",cursor:"pointer",_hover:{textDecoration:"underline"}}});var ia=(0,s.chakra)(s.Box,{baseStyle:{display:"inline-flex",verticalAlign:"middle",ml:"8px"}}),ra=({isChecked:e,shortName:t,tooltipLabel:i,placement:r,isMobile:o})=>e?(0,a.jsx)(s.HStack,{alignItems:"center",children:(0,a.jsxs)(s.Text,{color:"text.title",size:"lg",children:[t,(0,a.jsx)(ia,{as:"span",children:(0,a.jsx)(s.Tooltip,{label:i,placement:r,isOpenOnClick:!0,ml:o?"0px":"6px",children:(0,a.jsx)(s.Icon,{boxSize:"4",children:(0,a.jsx)(p.zL,{})})})})]})}):(0,a.jsx)(s.Text,{color:"text.title",size:"lg",children:t}),oa=(0,P.E)(s.Tr),sa=(0,o.Pi)((({id:e,index:t,newItemsCount:i,isNewItems:r,shortName:o,address:n,services:l,schedule:c,phone:u,organizationType:p,dataId:h,itemsCount:y,columns:g=qs,metadata:S})=>{let{mapAgentsCurrencySending:m,mapAgentsCurrencyReceiving:f,mapAgentsTooltipLabel:A}=re(),{currencies:v}=Oe(),{selectedServices:x,serviceTypesMap:C}=we(),M=ze(),b=M.getPointListItemSlots(),L=M.getPointListItemSlotProps(),P=(0,s.useMobileBreakpoint)({ssr:!1}),T=(0,d.useMemo)((()=>l?(0,I.i6)({services:l,currencyServiceLabels:{sendingLabel:m,receivingLabel:f},allowedCurrencies:v,selectedServices:x,serviceTypesMap:C}):void 0),[l,v,x,m,f,C]),{columnByCurrentCountry:k}=de(),O=k??g,w=!!P,E=w?"auto":"right-start",D=t>=y-1,N=r||t>=i,R=r?0:.1*(t-i);return(0,a.jsxs)(oa,{layout:!0,initial:!!N&&{opacity:0},animate:{opacity:1},transition:{layout:{duration:0},delay:R},"data-testid":"Item","data-id":h,sx:{overflow:"hidden"},children:[(O||[]).map((t=>{let{id:i,type:r,...d}=t;switch(r){case"name":return(0,a.jsx)(s.Td,{id:r,"data-testid":"name-column",...d,children:(0,a.jsxs)(s.VStack,{spacing:"4px",alignItems:"left",children:[(0,a.jsx)(ra,{shortName:o??j.v6,isChecked:!!S?.isChecked,isMobile:w,tooltipLabel:A,placement:E}),(0,a.jsx)(Qs,{isMobile:w,address:n})]})},i);case"currency":return(0,a.jsx)(s.Td,{id:r,...d,color:"text.title",children:T??Ws},i);case"service":{let{serviceContent:e,...t}=d;return(0,a.jsx)(s.Td,{id:r,...t,color:"text.title",children:(0,a.jsx)($s,{services:l,content:e})},i)}case"phone":return(0,a.jsx)(s.Td,{id:r,...d,children:(0,a.jsx)(Ks,{phone:u})},i);case"schedule":return(0,a.jsx)(s.Td,{id:r,...d,color:"text.title",children:(0,a.jsx)(Zs,{schedule:c})},i);case"contacts":return(0,a.jsx)(s.Td,{id:r,...d,color:"text.title",children:Ws},i);case"share":return(0,a.jsx)(s.Td,{id:r,...t,color:"text.title",_before:{display:{base:"none",md:"block"}},children:ui({slot:b?.shareColumn,defaultComponent:ci,defaultProps:{hideText:!w,itemData:{id:e,shortName:o,currency:T,address:n,schedule:c,phone:u,organizationType:p}},slotProps:L?.shareColumn})},i);default:return null}})),(0,a.jsx)(s.Divider,{opacity:.8,id:"divider",as:"td",sx:{w:"100%",maxWidth:"100vw",position:"absolute",left:"0",display:D?"none":["block","block","none"]}})]})})),aa=(0,o.Pi)((({agents:e,listItemComponent:t=sa,limit:i})=>{let r=(e=>{let[t,i]=(0,d.useState)(!0);return(0,d.useEffect)((()=>{t&&i(!1)}),[e]),t})(e.length),o=(0,d.useMemo)((()=>Math.max(0,e.length-i)),[e.length]);return(0,a.jsx)(a.Fragment,{children:e.map(((e,i,s)=>(0,a.jsx)(t,{dataId:e.id,index:i,newItemsCount:o,isNewItems:r,itemsCount:s.length,...e},e.id)))})})),na=(0,o.Pi)((({listItemComponent:e=sa})=>{let{agents:t}=ve(),{limit:i}=de();return(0,a.jsx)(aa,{agents:t??[],listItemComponent:e,limit:i})}
1)),la=({labelText:e,...t})=>{let{mapNoPointsMessage:i}=re();return(0,a.jsx)(s.Notification,{statusIcon:"StatusesIcon",backgroundColor:"bg.grey.primary",...t,children:(0,a.jsx)(s.Text,{children:e??i})})},da=()=>(0,a.jsx)(la,{marginTop:["0","0","16px"],"data-testid":"EmptyState"}),ca=({labelText:e="\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f..."})=>(0,a.jsx)(la,{marginTop:["0","0","16px"],labelText:e,sx:{".chakra-alert__icon":{display:"flex",justifyContent:"center"}},statusIcon:(0,a.jsx)(s.Spinner,{width:"18px",height:"18px",borderWidth:"3px",color:"indicator.status.active"}),"data-testid":"Loader"}),ua=()=>{let{hasNext:e,agents:t,setAgentsLoading:i}=ve(),{paginationParams:r,loadNextPage:o,updatePoints:s,setError:a}=de(),n=(e=>{let{fetchAgentsPagination:t}=te(),{features:i,limit:r}=e||{},o=i?.map((e=>e.id)),s=e&&i&&t&&e?`${r}-${o}-${e.open??""}-${e.offset??""}`:null,a=(0,d.useCallback)((()=>t&&e?t(e):null),[e,t]),{data:n,error:l,isLoading:u,isValidating:p}=(0,c.ZP)(s,a,{revalidateOnFocus:!1,revalidateIfStale:!1});return{data:n,isLoading:u||p,error:!!l}})(r);return(0,d.useEffect)((()=>{if(i(n.isLoading),n.error)return void a(!0);a(!1);let e=n.data?.agents.filter((e=>!t?.some((t=>t.id===e.id))));if(!n.isLoading&&n.data&&(e?.length||null===t)){let{hasNext:t,agents:i}=n.data;s(e??i,t)}}),[t,n.isLoading,n.data?.agents]),{agents:t,loadNextPage:()=>o(10),hasNext:e}},pa=(0,o.Pi)((({columns:e=qs})=>{let{mapCurrencyFilterLabel:t,mapAgentName:i,mapPhone:r,mapContactPerson:o,mapAgentShare:n,mapServiceFilterLabel:l}=re();return(0,a.jsx)(oa,{layout:!0,transition:{layout:{duration:0}},children:(e||[]).map((e=>{let{id:d,type:c,...u}=e;switch(c){case"name":return(0,a.jsx)(s.Th,{...u,children:i},d);case"currency":return(0,a.jsx)(s.Th,{...u,children:t},d);case"service":return(0,a.jsx)(s.Th,{...u,children:l},d);case"phone":return(0,a.jsx)(s.Th,{...u,children:r},d);case"schedule":return(0,a.jsx)(s.Th,{...u,children:o},d);case"share":return(0,a.jsx)(s.Th,{...u,children:(0,a.jsx)(ea,{children:n})},d);default:return null}}))})})),ha=(0,P.E)(s.TableCaption),ya=({loadNextPage:e,showPaginationLoader:t,defaultFooterText:i="\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0435"})=>(0,a.jsx)(ha,{layout:"size",margin:["16px 0 0 0","16px 0 0 0",0],padding:"0 0 1px 0",children:(0,a.jsx)(s.Flex,{justify:"center",children:(0,a.jsx)(s.Button,{variant:"secondary",onClick:e,isLoading:t,isDisabled:t,"data-testid":"NextButton",disableTouchDeviceHover:!0,children:t?null:i})})}),ga=({hasNextPage:e,loadNextPage:t,emptyStateComponent:i,initialLoadingComponent:r,headerComponent:o,renderLoadingPlaceholder:n,children:l,defaultFooterText:c,showPaginationLoader:u,footerComponent:p,hasContent:h,isEmpty:y,isFirstLoading:g,isMapView:S,showLoading:m,errorComponent:f,isError:A})=>{let v=(0,s.useMobileBreakpoint)({ssr:!1}),x=!!u&&!!n,{columnByCurrentCountry:C}=de(),M=()=>(0,a.jsx)(Jt,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,a.jsx)(ta,{children:r})},"loader");return(0,a.jsx)(T.M,{mode:"popLayout",children:(()=>{switch(!0){case m:return M();case h:return(0,a.jsx)(Jt,{initial:{opacity:0,height:0},animate:{opacity:S?0:1,height:"auto"},transition:{duration:.3},exit:{opacity:0,height:0},children:(0,a.jsx)(s.TableContainer,{sx:v?Js:Xs,"data-testid":"PointsList",children:(0,a.jsxs)(s.Table,{variant:"map",layout:v?"fixed":"auto",children:[(0,a.jsx)(s.Thead,{children:o?d.createElement(o,{columns:C}):(0,a.jsx)(pa,{columns:C})}),(0,a.jsxs)(s.Tbody,{children:[l,x?(0,a.jsx)(s.Tr,{children:(0,a.jsx)(s.Td,{colSpan:5,children:x?n?.()??null:null})},"pagination-loader"):null]}),e&&!g?p??(0,a.jsx)(ya,{loadNextPage:t,showPaginationLoader:u,defaultFooterText:c}):null]})})},"points-list");case A:return(0,a.jsx)(Jt,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,a.jsx)(ta,{children:f})},"error");case y:return(0,a.jsx)(Jt,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,a.jsx)(ta,{children:i})},"empty-points");default:return M()}})()})},Sa=(0,o.Pi)((e=>{let{isMapView:t}=Ie(),{hasContent:i,isEmpty:r,showLoading:o,isError:s}=de();return(0,a.jsx)(ga,{...e,hasContent:i,isEmpty:r,isMapView:t,showLoading:o,isError:s})})),ma=(0,o.Pi)((0,d.forwardRef)((({listComponent:e=Sa,listItemComponent:t=sa,...i},r)=>{let{loadNextPage:o,hasNext:n}=ua(),{mapLoadingListPlaceholder:l}=re(),{components:d}=de();return(0,a.jsx)(s.Box,{ref:r,...i,children:(0,a.jsx)(e,{loadNextPage:o,hasNextPage:n,headerComponent:d?.Header,emptyStateComponent:(0,a.jsx)(da,{}),initialLoadingComponent:(0,a.jsx)(ca,{labelText:l}),children:(0,a.jsx)(na,{listItemComponent:t})})})}))),fa=(0,o.Pi)((0,d.forwardRef)(((e,t)=>{let{switcherView:i}=Ie(),r=Vs(),o=i===k.Y1.Map,{components:s}=de();return(0,a.jsx)(_s,{__css:r.overlayList,"data-testid":"PointsListContainer",className:"points-list__container",view:k.Y1.List,children:(0,a.jsx)(ma,{listItemComponent:s?.Item,ref:t,display:o?"none":"block"})})}))),Aa=(0,o.Pi)((0,d.forwardRef)(((e,t)=>{let{view:i}=Ie();switch(i){case k.Y1.Map:return null;case k.Y1.MapAndList:case k.Y1.List:return(0,a.jsx)(fa,{ref:t});case k.Y1.Custom:return(0,a.jsx)(Hs,{});default:return null}}))),va=({icon:e=(0,a.jsx)(p.Oe,{}),text:t="\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e"})=>(0,a.jsx)(s.Flex,{justify:"center",align:"center",bg:"white",width:["100%","100%","640px"],height:"328px",boxShadow:"menu",borderRadius:"16px",children:(0,a.jsxs)(s.Stack,{spacing:"16px",align:"center",padding:"96px",children:[(0,a.jsx)(z.J,{width:"80px",height:"80px",children:e}),(0,a.jsx)(s.Text,{size:"xl",variant:"header",textAlign:"center",children:t})]})}),xa=()=>{let{isLandscape:e,isUnfoldedFoldViewport:t}=(0,s.useOrientation)(),i=(0,s.useMobileBreakpoint)({fallback:"lg",ssr:!1}),{mapOrientationFailedText:r}=re(),{resetActive:o}=he(),{resetActive:n}=Ae(),l=(i||F.isMobileOnly)&&e&&!t;return(0,d.useEffect)((()=>{l&&(o(),n())}),[l,o,n]),l?(0,a.jsx)(s.Box,{position:"absolute",top:"0",width:"full",height:"full",background:"rgba(0, 0, 0, 0.7)",pointerEvents:"all",padding:"16px",children:(0,a.jsx)(s.Flex,{align:"center",width:"full",height:"full",justify:"center",children:(0,a.jsx)(va,{text:r})})}):null},Ca=(0,s.chakra)(s.Box,{baseStyle:{display:{base:"none",md:"block"}}}),Ma=(0,o.Pi)((()=>{let{hideSwitcher:e,isLeftOptionActive:t,toggleSwitcherView:i}=(()=>{let{isOnlyList:e,switcherView:t,view:i,toggleSwitcherView:r}=Ie(),o=(0,s.useMobileBreakpoint)({ssr:!1});return{hideSwitcher:e||i!==k.Y1.MapAndList||o,isLeftOptionActive:t===k.Y1.Map,toggleSwitcherView:r}})(),{mapSwitcherMapLabel:r,mapSwitcherListLabel:o}=re(),n=Ds(r,o);return e?null:(0,a.jsx)(Ca,{children:(0,a.jsx)(Fs,{isLeftOptionActive:t,isControlled:!0,options:n,onChange:i})})})),ba=(0,A.m)(m.x,{baseStyle:{width:["full","full","724px","896px","1264px"]}}),La=(0,A.m)(s.HStack,{baseStyle:{maxWidth:["100%","100%","896px","896px","1264px"],paddingX:{base:"16px",md:"0px"},gap:["8px","8px","16px"],pointerEvents:"auto",flex:1}}),Pa=(0,s.chakra)(s.VStack,{baseStyle:{minH:"full",width:"full",justifyContent:"space-between"}}),Ta=(0,s.chakra)(s.VStack,{baseStyle:{width:"full",gap:"1rem"}}),Ia=(0,s.chakra)(s.VStack,{baseStyle:{width:"full",gap:"1rem",padding:"1rem"}}),ka=(0,s.chakra)(Zi,{baseStyle:{textUnderlineOffset:1}}),Oa=(0,s.chakra)(s.Button,{baseStyle:{width:"full"}}),wa=({header:e,onClose:t})=>(0,a.jsxs)(s.HStack,{w:"full",px:"16px",py:"20px",justifyContent:"space-between",children:[(0,a.jsx)(s.Text,{color:"text.body.primary",fontSize:"18px",children:e}),(0,a.jsx)(s.Icon,{onClick:t,w:"24px",h:"24px",position:"absolute",right:"20px",top:"20px",as:"button",cursor:"pointer",children:(0,a.jsx)(p.Ai,{})})]}),Ea=(e,t,i)=>e.length===t.length&&t.length>1?i:e.reduce(((t,i,r)=>{let o=e;return i.checked&&(t+=i.label,zi(o,r)||(t+=", ")),t}),s.EMPTY_STRING_STATE),ja=(0,s.chakra)(s.Accordion.Item,{baseStyle:{px:"16px",border:"none !important"}}),Da=(0,s.chakra)(s.Accordion.Button,{baseStyle:{fontSize:"18px",lineHeight:"25px",color:"text.body.primary",_hover:{bg:"transparent"}}}),Na=(0,s.chakra)(s.Accordion.Panel,{baseStyle:{pb:{base:"8px",sm:"8px",md:"0px"},"> div":{gap:"0px"," > div":{py:"12px"}}}}),Ra=({label:e,selectedOptionLabel:t,children:i})=>
1(0,a.jsxs)(ja,{children:[(0,a.jsx)(Da,{children:`${e}: ${t}`}),(0,a.jsx)(Na,{children:i})]}),Fa=(0,o.Pi)((({onChangeMultiple:e})=>{let{hasPickAllOptions:t,isActive:i,isLoading:r,isDisabled:o,options:n,label:l,onChange:c,selectedOptions:u}=qi(),p=(0,d.useMemo)((()=>Di(u)),[u]),{areYmapsModulesLoaded:h}=Se(),{mapAllCurrenciesLabel:y}=re(),g=(0,d.useMemo)((()=>Qi(c,e)),[c,e]);return i?r||!h?(0,a.jsx)(Vi,{}):l&&n?(0,a.jsx)(Ra,{label:l,selectedOptionLabel:Ea(u,n,y),children:(0,a.jsx)(s.NextMultiselectList,{hasPickAllOption:!!t,onChangeMultiple:g,value:p,id:"currency-filter",options:n,controlled:!0,disabled:o})}):null:null})),za=(0,d.createContext)({onClose:()=>{}}),Ba=({children:e,value:t})=>(0,a.jsx)(za.Provider,{value:t,children:e}),_a=()=>(0,d.useContext)(za),Ua=(0,s.chakra)(s.Accordion,{baseStyle:{width:"full"}}),Ya=(0,s.chakra)(s.Box,{baseStyle:{padding:"16px"}}),Va=({selectedLabel:e,selectedOptions:t,options:i,mapAllServicePointsLabel:r,isSingleStrategy:o})=>e?o?e:t?.length===i.length?r:e:"",Ha=({option:{label:e},...t})=>(0,a.jsx)(s.Box,{w:"full",py:"8px",...t,children:(0,a.jsx)(s.Text,{children:e})}),Qa=({options:e,onChange:t})=>(0,a.jsx)(s.VStack,{w:"full",children:e.map((e=>(0,a.jsx)(Ha,{option:e,onClick:()=>t(e)}
1,e.id)))}),Wa=(0,o.Pi)((({onChange:e})=>{let{selectedLabel:t,selectedOptions:i,options:r,isLoading:o,handleChangeOption:n,handleChangeOptions:l,isActive:c,label:u,isSingleStrategy:p,hasPickAllOptions:h,mapAllServicePointsLabel:y}=$i(),{onClose:g}=_a(),{areYmapsModulesLoaded:S}=Se(),m=e=>{n(e.value??e.label),g()},f=(0,d.useMemo)((()=>Qi(m,e)??m),[e,n]),A=(0,d.useMemo)((()=>Qi(l,e)??l),[e,l]);return o||!S?(0,a.jsx)(Vi,{}):c?(0,a.jsx)(Ra,{label:u,selectedOptionLabel:Va({selectedLabel:t,selectedOptions:i,options:r,mapAllServicePointsLabel:y,isSingleStrategy:p}),children:p?(0,a.jsx)(Qa,{options:r??[],onChange:f}):(0,a.jsx)(s.NextMultiselectList,{hasPickAllOption:!!h,onChangeMultiple:A,value:i,id:"service-points-filter",options:r,controlled:!0})}):null})),qa=(0,o.Pi)((()=>{let{isActive:e,isLoading:t,label:i,handleChangeOption:r,options:o,selectedLabel:s}=Ji(),{onClose:n}=_a(),{areYmapsModulesLoaded:l}=Se();return!l||t?(0,a.jsx)(Vi,{}):e?(0,a.jsx)(Ra,{label:i,selectedOptionLabel:s,children:(0,a.jsx)(Qa,{options:o,onChange:e=>{r(e.value??e.label),n()}})}):null})),Ga=(0,o.Pi)((({slots:e,slotProps:t}={})=>{let[i,r]=(0,d.useState)(-1),{isOpen:o}=Te(),{isCustomView:s}=Ie(),n=(e,t,i)=>e&&(0,d.isValidElement)(e)?e:(0,a.jsx)(t,{...i});return(0,a.jsx)(Ba,{value:{onClose:()=>{r(-1)}},children:(0,a.jsxs)(Ua,{variant:"lines",allowToggle:!0,index:i,onChange:e=>{"number"==typeof e&&r(e)},children:[n(e?.servicesFilter,qa,t?.servicesFilter),n(e?.currencyFilter,Fa,t?.currencyFilter),n(e?.servicePointsFilter,Wa,t?.servicePointsFilter),s?null:(0,a.jsx)(Ya,{children:e?.openFilter&&(0,d.isValidElement)(e.openFilter)?e.openFilter:(0,a.jsx)(Ki,{size:"medium",isChecked:o,...t?.openFilter})})]})})})),Ka=(0,o.Pi)((({onClose:e})=>{let{mapFiltersButtonShow:t,mapFiltersHeader:i}=re(),{reset:r,isLoading:o}=Me(),s=ze(),n=s.getMobileModalSlots(),l=s.getMobileModalSlotProps();return(0,a.jsxs)(Pa,{children:[(0,a.jsxs)(Ta,{children:[(0,a.jsx)(wa,{header:i,onClose:e}),(0,a.jsx)(Ga,{slots:n,slotProps:l})]}),(0,a.jsxs)(Ia,{children:[(0,a.jsx)(ka,{onClick:r}),(0,a.jsx)(Oa,{onClick:e,isDisabled:o,children:t})]})]})})),Za=(0,o.Pi)((({children:e})=>(0,a.jsx)(s.Modal,{shouldForwardOnCloseToContent:!0,customContainerStyle:{padding:"0px"},content:(0,a.jsx)(Ka,{}),children:e}))),$a=e=>{let t=ue(),i=e&&t?.getSearch?`/search_${e}`:null;return(0,c.ZP)(i,(()=>{if(!t?.getSearch)throw new Error("\u041e\u0448\u0438\u0431\u043a\u0430 getSearch \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d!");return t?.getSearch&&e?t?.getSearch(e):[]}),{revalidateOnFocus:!1,revalidateOnReconnect:!1})},Xa="",Ja=(0,o.Pi)((({inputProps:e,...t})=>{let{inputText:i,setInputText:r,handleClear:o,setOptionValue:n}=ue(),{mapSearchPlaceholder:l}=re(),{placeholder:d=l||Xa,...c}=e||{},u={_placeholder:{fontSize:"16px !important",color:"text.body.secondary"},role:"search",placeholder:d,...c};return(0,a.jsx)(s.Autocomplete,{disableDropdown:!0,retainValueOnBlur:!0,value:i,...t,onInputChange:e=>{r(e),n(null)},onChange:()=>{},onItemClick:()=>{},onClear:()=>{r(""),n(null),t.onClear&&t.onClear(),o&&o()},options:[],maxSuggestions:0,emptyState:null,hideEmptyState:!0,isLoading:!1,id:"search",disableFilter:!0,inputProps:u,closeButtonProps:{size:"lg",variant:"ghost"},showChevronIcon:!1})})),en=e=>{let{setInputText:t,setSuggestOptions:i,inputText:r,setLoading:o,suggestOptions:s,isLoading:a,setOptionValue:n}=ue(),[u]=(0,l.Nr)(r,400),p=(0,d.useDeferredValue)(u),[h,y]=(0,d.useTransition)(),{data:g,isValidating:S,isLoading:m}=(e=>{let{getSuggestWithOptions:t}=ue(),{countryLabel:i}=ke(),r=e&&t?`/suggest_${e}`:null;return(0,c.ZP)(r,(()=>(t||console.error("\u041e\u0448\u0438\u0431\u043a\u0430 searchMethod \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d!"),t&&e?t(`${i}, ${e}`,{isAddBounds:!0,isAddCountry:!1}):[])),{revalidateOnFocus:!1,revalidateOnReconnect:!1})})(p);return(0,d.useEffect)((()=>{p.trim()?g&&!a&&i(g):y((()=>{i([])}))}),[p,g,a,i,y,e?.disableSuggest]),(0,d.useEffect)((()=>{o(m||S)}),[m,S,o,e?.disableSuggest]),{inputText:r,options:s,isLoading:a,isPending:h,handleInputChange:t,handleChange:e=>{if(null===e)return void n(null);let i=s.find((t=>t.value===e));i&&t(i.label),n(e)},setInputText:t,onItemClick:e=>{t(e.label),n(null),setTimeout((()=>{n(e.value??null)}),100)},handleClear:()=>{t(""),n(null),i([])}}},tn=(0,o.Pi)((({emptyState:e,inputProps:t,isLoading:i,...r})=>{let{inputText:o,options:n,handleInputChange:l,handleChange:c,onItemClick:u,handleClear:h}=en(),y=ze(),{mapSearchPlaceholder:g,mapSearchNotFoundHeader:S,mapSearchNotFoundDescription:m}=re(),[f,A]=(0,d.useState)(!0),v=y.getSearchSlotProps()?.resultItem?.onClick,x=(0,s.useMobileBreakpoint)(),C=(0,d.useMemo)((()=>(0,a.jsx)(s.AutocompleteNotFound,{header:S,description:m,icon:(0,a.jsx)(p.ZZ,{}),isHide:f})),[m,S,f]),{placeholder:M=g||Xa,...b}=t||{},L=(0,d.useMemo)((()=>!f&&(e??C)),[e,C,f]),P=(0,d.useMemo)((()=>Qi(u,v)??u),[u,v]),T={_placeholder:{fontSize:"16px !important",color:"text.body.secondary"},role:"search",placeholder:M,...b};return(0,d.useEffect)((()=>{A(!(0!==o.length&&!i))}),[o,i]),(0,a.jsx)(s.Autocomplete,{retainValueOnBlur:!0,value:o,...r,onInputChange:l,onCh
1ange:c,onItemClick:P,onClear:h,options:n,maxSuggestions:10,emptyState:L,hideEmptyState:!L,isLoading:!1,id:"search",inputProps:T,closeButtonProps:{size:"lg",variant:"ghost"},showChevronIcon:!1,suggestWhenEmpty:!1,withScrollbar:!0,scrollbarHeight:x?220:240,filter:()=>!0})})),rn=(0,o.Pi)((e=>{let{setBounds:t}=ge(),{optionValue:i,setLoading:r}=ue(),{isOnlyList:o,view:s}=Ie(),{mapSearchPlaceholder:n}=re(),[l,c]=(0,d.useState)(),{data:u,error:p,isValidating:h,isLoading:y}=$a(i??void 0),[g,S]=(0,d.useState)(),m=()=>{},f=((e,t)=>({width:e||t!==k.Y1.MapAndList?"100%":["100%","100%","100%","685px","1037px"],pointerEvents:"auto"}))(o,s),A=e=>{l===e.value&&g&&!o&&t(g)};return(0,d.useEffect)((()=>{i&&l!==i&&c(i)}),[i]),(0,d.useEffect)((()=>{o||(()=>{if(u&&u.length>0){let e=u.at(0);e?.boundedBy&&(t(e.boundedBy),S(e.boundedBy))}})(),p&&console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f /search",p)}),[u,p]),(0,d.useEffect)((()=>{r(y||h)}),[y,h]),o?(0,a.jsx)(Ja,{inputProps:{placeholder:n},containerProps:f,onItemClick:A,onClear:m,...e,id:"search"}):(0,a.jsx)(tn,{inputProps:{placeholder:n},containerProps:f,onItemClick:A,onClear:m,...e,id:"search",isLoading:y||h})})),on=(0,o.Pi)((0,d.forwardRef)((({mobileSlot:e,...t},i)=>{let{isShow:r,styles:o}=Es(),{isNoFilters:n}=Me();return r?(0,a.jsx)(ba,{__css:o.container,ref:i,children:(0,a.jsxs)(La,{__css:o.innerContainer,...t,children:[(0,a.jsx)(rn,{}),(0,a.jsx)(Ma,{}),n?null:(0,a.jsx)(s.Box,{display:["block","block","none"],children:e??(0,a.jsx)(Za,{children:(0,a.jsx)(s.ButtonIcon,{"aria-label":"\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432",icon:(0,a.jsx)(p.bZ,{width:"24px",height:"24px"})})})})]})}):null}))),sn=(0,o.Pi)((()=>{let{isShowErrorState:e,view:t,switcherView:i,isShowOrientation:r}=(()=>{let{isMapInitialized:e,isError:t}=ye(),{areYmapsModulesLoaded:i}=Se(),{isMapView:r,view:o,switcherView:s}=Ie();return{isShowErrorState:t||!i&&e,isShowOrientation:r,view:o,switcherView:s}})(),o=(e=>(0,f.j)("Overlay",{variant:e}))(),s=e?k.Y1.Custom:t;return(0,a.jsxs)(Ys,{__css:o.container,view:s,switcherView:i,children:[(0,a.jsxs)(Us,{__css:o.innerContainer,view:s,children:[(0,a.jsx)(on,{className:"overlay__controls"}),(0,a.jsx)(Aa,{})]}),e?(0,a.jsx)(vs,{}):null,r&&!e?(0,a.jsx)(xa,{}):null]})})),an=(0,o.Pi)((()=>{let{topByCountry:e}=Re(),t=(0,d.useMemo)((()=>(0,O.ZN)(e)),[e]);return e?(0,a.jsx)(s.Stack,{gap:"16px",w:"full",sx:{"& > div:first-of-type":{marginTop:["16px","16px","24px"]}},paddingBottom:{base:"16px",md:"40px"},children:t}):null})),nn=(0,s.chakra)(s.VStack,{baseStyle:{width:"full"}}),ln=(0,s.chakra)(s.VStack,{baseStyle:{width:["full","full","724px","896px","1264px"],spacing:{base:"16px",md:"24px"},alignItems:"center"}}),dn=(0,o.Pi)((({slots:e,slotProps:t}={})=>{let{isCustomView:i}=Ie();return(0,d.isValidElement)(e?.countryFilter)&&(0,d.isValidElement)(e?.modalFilter)?i?(0,a.jsxs)(s.Stack,{gap:"16px",w:"full",children:[e.countryFilter,(0,a.jsxs)(s.Flex,{gap:"8px",children:[(0,a.jsx)(rn,{disabled:!0,id:"fake-search"}),e.modalFilter]})]}):(0,a.jsx)(a.Fragment,{children:e.countryFilter}):i?(0,a.jsxs)(s.Stack,{gap:"16px",w:"full",children:[(0,a.jsx)(Wi,{containerProps:{width:"100%"},...t?.countryFilter}),(0,a.jsxs)(s.Flex,{gap:"8px",children:[(0,a.jsx)(rn,{disabled:!0,id:"fake-search"}),(0,a.jsx)(Za,{children:(0,a.jsx)(s.ButtonIcon,{"aria-label":"\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432",icon:(0,a.jsx)(p.bZ,{width:"24px",height:"24px"})})})]})]}):(0,a.jsx)(Wi,{containerProps:{width:"100%"},...t?.countryFilter})})),cn=(0,o.Pi)((({base:e,baseMobile:t})=>{let{isNoFilters:i}=Me(),r=ze(),o=r.getDesktopSlots(),n=r.getDesktopSlotProps(),l=r.getMobileHeaderSlots(),d=r.getMobileHeaderSlotProps();return i?null:(0,a.jsx)(nn,{children:(0,a.jsxs)(ln,{children:[(0,a.jsx)(s.Show,{above:"md",children:e??(0,a.jsx)(tr,{slots:o,slotProps:n})}),(0,a.jsx)(s.Hide,{above:"md",children:t??(0,a.jsx)(dn,{slots:l,slotProps:d})})]})})})),un=(0,o.Pi)((({mapContainerSize:e=Ls,filters:t=(0,a.jsx)(cn,{}),overlay:i=(0,a.jsx)(sn,{}),map:r=(0,a.jsx)(Ms,{}),innerOverlayContainerProps:o,overlayContainerProps:n,filtersContainerProps:l,variant:c,...u})=>{(()=>
1{let e=(0,s.useBreakpointValue)(jr,{ssr:!1}),t=(0,s.useBreakpointValue)(Nr,{ssr:!1}),i=le();(0,d.useEffect)((()=>{e&&i&&i.setClusterBalloonSize(e)}),[e,i]),(0,d.useEffect)((()=>{t&&i&&i.setMarkerBalloonSize(t)}),[t,i])})();let{width:p,styles:h}=Ps({variant:c,mapContainerSize:e}),{isMapView:y}=Ie(),{isDiInitialized:g}=ye(),{topByCountry:S}=Re(),m=(0,d.useMemo)((()=>!!S),[S]);return g?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Ts,{"data-testid":"MapView",__css:h.container,...u,children:[(0,a.jsx)(Is,{"data-testid":"Filters",__css:h.filters,marginBottom:m?{base:"16px",md:"0"}:{base:"16px",md:"40px"},...l,children:t}),(0,a.jsx)(Bs,{}),(0,a.jsx)(an,{}),(0,a.jsxs)(ks,{width:p,"data-testid":"Overlays",sx:h.overlayContainer,...n,children:[(0,a.jsx)(Os,{__css:h.overlayContent,position:y?"absolute":"relative",...o,children:i}),(0,a.jsx)(s.Box,{position:y?"relative":"absolute",width:"100%",height:"600px",children:r})]})]}),(0,a.jsx)(bs,{})]}):null})),pn=e=>e?[e.longitude,e.latitude]:xt,hn=e=>{let{id:t,yandexLocation:i,name:r,address:o,...s}=e;return s},yn=(e,t)=>{let{data:i,isLoading:r,isError:o}=((e,t)=>{let{fetchAgentsByBounds:i}=te(),{isOnlyList:r}=Ie(),o=t?.addressObjectId&&(r||e)?["/agents",e,t]:null,s=(0,d.useCallback)((async([,e,t])=>i?await i(e,t):(console.error("\u0424\u0443\u043d\u043a\u0446\u0438\u044f fetchAgentsByBounds \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0432 mapStore."),[])),[i]),{data:a,error:n,isLoading:l}=(0,c.ZP)(o,s,{revalidateIfStale:!1,revalidateOnFocus:!1});return{data:a,isLoading:l,isError:n}})(e,t),{setFeatures:a,setIsFeaturesLoading:n}=fe(),{setLastEmptyUpdate:l}=ye();return(0,d.useEffect)((()=>n(r)),[r]),(0,d.useEffect)((()=>{if(i){let e=(e=>e.map((e=>({id:e.id,geometry:{type:"Point",coordinates:pn(e.yandexLocation)},properties:{name:e.name,description:e.address??s.EMPTY_STRING_STATE},metadata:hn(e)}))))(i);a(e),l(0===e.length)}}),[i]),{isLoading:r,isError:o}},gn=(0,o.Pi)((e=>((()=>{let{currentBounds:e}=ge(),{isCustomView:t,isOnlyList:i}=Ie(),{isCurrencyReady:r}=be(),{isError:o}=Oe(),{isMapInDom:s}=ye(),[a,n]=(0,d.useState)(null),{params:c}=se(),[u,p]=(0,l.Nr)(a,300),{isLoading:h,isError:y}=yn(u?.currentBounds,u?.requestParams),{inputText:g}=ue();(0,d.useEffect)((()=>{if(!s)return;if(t)return void p(null);if(!r&&!o)return;let a=i?g??"":void 0,l=void 0===a?e:void 0,d=l?(0,I.xQ)(l,8):void 0;!d&&void 0===a||n(c?{currentBounds:d,requestParams:{...c,fields:"rootId,id,yandexLocation",queryString:a}}:null)}),[e,c,r,o,g,s]),(0,d.useEffect)((()=>{h||y||p(null)}),[y,h]),(0,d.useEffect)((()=>{u||n(null)}),[u]),(0,d.useEffect)((()=>{y&&console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u043e\u0447\u0435\u043a \u043e\u0442 AGS")}),[y])})(),(0,a.jsx)(Ms,{...e})))),Sn=(0,o.Pi)((({storeParams:e})=>{let t=Fe(),i=(0,d.useMemo)((()=>JSON.stringify(e)),[e]);return(0,d.useEffect)((()=>{e&&t.updateData(Eo(e))}),[i,t,e]),null})),mn=()=>(0,a.jsx)(s.KoronaSkeleton,{height:"600px",width:"100%","data-testid":He}),fn='url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkgMTYuNUM4LjY4OTM0IDE2LjUgOC40Mzc1IDE2LjI0ODIgOC40Mzc1IDE1LjkzNzVWOS41NjI1SDIuMDYyNUMxLjc1MTg0IDkuNTYyNSAxLjUgOS4zMTA2NiAxLjUgOUMxLjUgOC42ODkzNCAxLjc1MTg0IDguNDM3NSAyLjA2MjUgOC40Mzc1SDguNDM3NVYyLjA2MjVDOC40Mzc1IDEuNzUxODQgOC42ODkzNCAxLjUgOSAxLjVDOS4zMTA2NiAxLjUgOS41NjI1IDEuNzUxODQgOS41NjI1IDIuMDYyNVY4LjQzNzVIMTUuOTM3NUMxNi4yNDgyIDguNDM3NSAxNi41IDguNjg5MzQgMTYuNSA5QzE2LjUgOS4zMTA2NiAxNi4yNDgyIDkuNTYyNSAxNS45Mzc1IDkuNTYyNUg5LjU2MjVWMTUuOTM3NUM5LjU2MjUgMTYuMjQ4MiA5LjMxMDY2IDE2LjUgOSAxNi41WiIgZmlsbD0iIzlFOUU5RSIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',An='url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuMjUgOS41NjI1QzEuOTM5MzQgOS41NjI1IDEuNjg3NSA5LjMxMDY2IDEuNjg3NSA5QzEuNjg3NSA4LjY4OTM0IDEuOTM5MzQgOC40Mzc1IDIuMjUgOC40Mzc1SDE1Ljc1QzE2LjA2MDcgOC40Mzc1IDE2LjMxMjUgOC42ODkzNCAxNi4zMTI1IDlDMTYuMzEyNSA5LjMxMDY2IDE2LjA2MDcgOS41NjI1IDE1Ljc1IDkuNTYyNUgyLjI1WiIgZmlsbD0iIzlFOUU5RSIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',vn='url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuMjUyODEgNy41NTc3MkMyLjQwOTU0IDcuOTY3ODYgMi41NDM3NCA5LjIwODY1IDMuNDU1MTkgOS40MjlMNy41NzUgMTAuN
1DI1TDguNzM1MDYgMTQuNjQ3NkM4Ljk4MDg3IDE1LjU0MjMgMTAuMjA2OSAxNS42NDkgMTAuNjAzNCAxNC44MTAxTDE2LjAzNTEgMy4zMTk5N0MxNi40Mzg3IDIuNDY2MTggMTUuNTQyOSAxLjU4MDI2IDE0LjY5MzcgMS45OTMzMUwzLjI1MjgxIDcuNTU3NzJaTTkuNzUgMTMuOTVMOC41NSA5LjM3NUw0LjEyNSA4LjMyNUwxNC44NSAzLjA3NUw5Ljc1IDEzLjk1WiIgZmlsbD0iIzlFOUU5RSIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',xn={".ymaps3x0--controls":{position:"absolute",right:["0","0","24px"],bottom:["0","0","32px"],padding:"16px"},".ymaps3x0--zoom-control_vertical":{".ymaps3x0--control-button":{_first:{position:"relative",borderBottom:"none","&::after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"1px",background:"indicator.status.divider",pointerEvents:"none"},"&:focus-visible::after":{opacity:0}}}},".ymaps3x0--control-button":{display:"flex",alignItems:"center",justifyContent:"center",height:"48px",width:"48px","&:focus-visible":{boxShadow:"outline",outline:"none",borderRadius:"8px"},"&:focus:not(:focus-visible)":{boxShadow:"none"},".ymaps3x0--zoom-control__in":{background:fn,_hover:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkgMTYuNUM4LjY4OTM0IDE2LjUgOC40Mzc1IDE2LjI0ODIgOC40Mzc1IDE1LjkzNzVWOS41NjI1SDIuMDYyNUMxLjc1MTg0IDkuNTYyNSAxLjUgOS4zMTA2NiAxLjUgOUMxLjUgOC42ODkzNCAxLjc1MTg0IDguNDM3NSAyLjA2MjUgOC40Mzc1SDguNDM3NVYyLjA2MjVDOC40Mzc1IDEuNzUxODQgOC42ODkzNCAxLjUgOSAxLjVDOS4zMTA2NiAxLjUgOS41NjI1IDEuNzUxODQgOS41NjI1IDIuMDYyNVY4LjQzNzVIMTUuOTM3NUMxNi4yNDgyIDguNDM3NSAxNi41IDguNjg5MzQgMTYuNSA5QzE2LjUgOS4zMTA2NiAxNi4yNDgyIDkuNTYyNSAxNS45Mzc1IDkuNTYyNUg5LjU2MjVWMTUuOTM3NUM5LjU2MjUgMTYuMjQ4MiA5LjMxMDY2IDE2LjUgOSAxNi41WiIgZmlsbD0iIzU0NTQ1NCIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',_active:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkgMTYuNUM4LjY4OTM0IDE2LjUgOC40Mzc1IDE2LjI0ODIgOC40Mzc1IDE1LjkzNzVWOS41NjI1SDIuMDYyNUMxLjc1MTg0IDkuNTYyNSAxLjUgOS4zMTA2NiAxLjUgOUMxLjUgOC42ODkzNCAxLjc1MTg0IDguNDM3NSAyLjA2MjUgOC40Mzc1SDguNDM3NVYyLjA2MjVDOC40Mzc1IDEuNzUxODQgOC42ODkzNCAxLjUgOSAxLjVDOS4zMTA2NiAxLjUgOS41NjI1IDEuNzUxODQgOS41NjI1IDIuMDYyNVY4LjQzNzVIMTUuOTM3NUMxNi4yNDgyIDguNDM3NSAxNi41IDguNjg5MzQgMTYuNSA5QzE2LjUgOS4zMTA2NiAxNi4yNDgyIDkuNTYyNSAxNS45Mzc1IDkuNTYyNUg5LjU2MjVWMTUuOTM3NUM5LjU2MjUgMTYuMjQ4MiA5LjMxMDY2IDE2LjUgOSAxNi41WiIgZmlsbD0iI0ZGNTI1MiIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat'}}},".ymaps3x0--zoom-control__out":{background:An,_hover:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuMjUgOS41NjI1QzEuOTM5MzQgOS41NjI1IDEuNjg3NSA5LjMxMDY2IDEuNjg3NSA5QzEuNjg3NSA4LjY4OTM0IDEuOTM5MzQgOC40Mzc1IDIuMjUgOC40Mzc1SDE1Ljc1QzE2LjA2MDcgOC40Mzc1IDE2LjMxMjUgOC42ODkzNCAxNi4zMTI1IDlDMTYuMzEyNSA5LjMxMDY2IDE2LjA2MDcgOS41NjI1IDE1Ljc1IDkuNTYyNUgyLjI1WiIgZmlsbD0iIzU0NTQ1NCIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',_active:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuMjUgOS41NjI1QzEuOTM5MzQgOS41NjI1IDEuNjg3NSA5LjMxMDY2IDEuNjg3NSA5QzEuNjg3NSA4LjY4OTM0IDEuOTM5MzQgOC40Mzc1IDIuMjUgOC40Mzc1SDE1Ljc1QzE2LjA2MDcgOC40Mzc1IDE2LjMxMjUgOC42ODkzNCAxNi4zMTI1IDlDMTYuMzEyNSA5LjMxMDY2IDE2LjA2MDcgOS41NjI1IDE1Ljc1IDkuNTYyNUgyLjI1WiIgZmlsbD0iI0ZGNTI1MiIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat'}}},".ymaps3x0--geolocation-control":{background:vn,_hover:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuMjUyODEgNy41NTc3MkMyLjQwOTU0IDcuOTY3ODYgMi41NDM3NCA5LjIwODY1IDMuNDU1MTkgOS40MjlMNy41NzUgMTAuNDI1TDguNzM1MDYgMTQuNjQ3NkM4Ljk4MDg3IDE1LjU0MjMgMTAuMjA2OSAxNS42NDkgMTAuNjAzNCAxNC44MTAxTDE2LjAzNTEgMy4zMTk5N0MxNi40Mzg3IDIuNDY2MTggMTUuNTQyOSAxLjU4MDI2IDE0LjY5MzcgMS45OTMzMUwzLjI1MjgxIDcuNTU3NzJaTTkuNzUgMTMuOTVMOC41NSA5LjM3NUw0LjEyNSA4LjMyNUwxNC44NSAzLjA3NUw5Ljc1IDEzLjk1WiIgZmlsbD0iIzU0NTQ1NCIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat',_active:{background:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuMjUyODEgNy41NTc3MkMyLjQwOTU0IDcuOTY3ODYgMi41NDM3NCA5LjIwODY1IDMuNDU1MTkgOS40MjlMNy41NzUgMTAuN
1DI1TDguNzM1MDYgMTQuNjQ3NkM4Ljk4MDg3IDE1LjU0MjMgMTAuMjA2OSAxNS42NDkgMTAuNjAzNCAxNC44MTAxTDE2LjAzNTEgMy4zMTk5N0MxNi40Mzg3IDIuNDY2MTggMTUuNTQyOSAxLjU4MDI2IDE0LjY5MzcgMS45OTMzMUwzLjI1MjgxIDcuNTU3NzJaTTkuNzUgMTMuOTVMOC41NSA5LjM3NUw0LjEyNSA4LjMyNUwxNC44NSAzLjA3NUw5Ljc1IDEzLjk1WiIgZmlsbD0iI0ZGNTI1MiIvPgo8L3N2Zz4K") 50%/18px 18px no-repeat'}}},_disabled:{".ymaps3x0--zoom-control__in":{background:fn,_hover:{background:fn,_active:{background:fn}}},".ymaps3x0--zoom-control__out":{background:An,_hover:{background:An,_active:{background:An}}},".ymaps3x0--geolocation-control":{background:vn,_hover:{background:vn,_active:{background:vn}}}}}},{definePartsStyle:Cn,defineMultiStyleConfig:Mn}=(0,C.D)(["container"]),bn=Mn({baseStyle:Cn({container:{width:"100%",".ymaps3x0--marker":{...Ct},".ymaps3x0--button":{...Ct}}}),variants:{koronaPay:Cn({container:{...xn}})},defaultProps:{variant:"koronaPay"}}),{definePartsStyle:Ln,defineMultiStyleConfig:Pn}=(0,C.D)(["overlayList","overlayText"]),Tn=Pn({baseStyle:Ln({}),variants:{default:Ln({})},defaultProps:{variant:"default"}}),{definePartsStyle:In,defineMultiStyleConfig:kn}=(0,C.D)(["container","filters","overlayContainer","overlayContent"]),On=kn({baseStyle:In({}),variants:{default:In({})},defaultProps:{variant:"default"}}),{definePartsStyle:wn,defineMultiStyleConfig:En}=(0,C.D)(["container","innerContainer"]),jn=En({baseStyle:wn({container:{minH:"600px"}}),variants:{default:wn({})},defaultProps:{variant:"default"}}),{definePartsStyle:Dn,defineMultiStyleConfig:Nn}=(0,C.D)(["container","innerContainer"]),Rn={components:{Map:bn,MapView:On,MapViewContentRenderer:Tn,Overlay:jn,SearchAndViewControls:Nn({baseStyle:Dn({}),variants:{default:Dn({})},defaultProps:{variant:"default"}})}},Fn=(0,M.B1)(Rn),zn=(0,M.B1)({...s.theme,components:{...s.theme.components,...Rn.components}}),Bn=({children:e})=>(0,a.jsx)(b.x,{theme:zn,children:e}),_n=({storeParams:e,options:t,sectionProps:i,bottom:r,config:o,pointsListConfig:n})=>{let[l,c]=(0,d.useState)(void 0),[p,h]=(0,d.useState)(!!t.defaultInject),[y,g]=(0,d.useState)(!1);(e=>{let{cache:t}=(0,u.kY)(),i=t&&t.keys&&t.keys();(0,d.useEffect)((()=>{if(e?.isPrintSwrCache)try{if(t&&"function"==typeof t.entries){let e=[...t.entries()].map((([e,t])=>({key:e,value:t&&t.data?t.data:t})));console.groupCollapsed("SWR \u043a\u0435\u0448 \u0434\u0430\u043c\u043f (table)"),console.table(e),console.info("SWR \u043a\u0435\u0448 \u0434\u0430\u043c\u043f (raw - expandable):",e),console.groupEnd()}else console.groupCollapsed("SWR \u043a\u0435\u0448 \u0434\u0430\u043c\u043f (raw)"),console.info("SWR \u043a\u0435\u0448 \u0434\u0430\u043c\u043f (raw):",t),console.groupEnd()}catch(r){console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u044b\u0432 SWR cache",r)}}),[e?.isPrintSwrCache,i])})(o),(0,d.useEffect)((()=>{!p&&!y&&uo(t).then((()=>{h(!0)})).catch((e=>{console.error(e),g(!0)}))}),[p]),(0,d.useEffect)((()=>{p&&l&&n&&(l.pointsListStore?.setColumns(n.columns),l.pointsListStore?.setComponents(n.components))}),[n]),(0,d.useEffect)((()=>{if(p){let i=jo({...e,apikey:t.apikey});n&&(i.pointsListStore?.setColumns(n.columns),i.pointsListStore?.setComponents(n.components)),c(i)}}),[e,p]),(0,d.useEffect)((()=>()=>{wo=Oo()}),[]);let S=(0,a.jsx)(s.Section,{width:"full",...i,innerContainerProps:{...i?.innerContainerProps,maxWidth:"100% !important"},children:y?(0,a.jsx)(vs,{position:"relative",height:"600px",width:"full"}):(0,a.jsx)(mn,{})});return(0,a.jsxs)(G,{container:wo,children:[p&&l&&l.queryStore.isReady?(0,a.jsxs)(Bn,{children:[(0,a.jsx)(Sn,{storeParams:e}),(0,a.jsxs)(s.Section,{...i,children:[(0,a.jsx)(un,{map:(0,a.jsx)(gn,{renderVariant:"kp-with-controls"})}),r]})]}):S," "]})},Un=(e,t)=>{let i=(e=>e instanceof URLSearchParams?e:Array.isArray(e)?new URLSearchParams(e):new URLSearchParams(Object.entries(e)))(e.query),r=e.excludeKeys??[],o=[...i.entries()].filter((([e])=>!r.includes(e)));return 0!==o.length&&o.every((([e,i])=>!!(0,I.C_)([{query:t}],new URLSearchParams([[e,i]]),r)))},Yn=(0,o.Pi)((({include:e,exclude:t,children:i,isCustomView:r,isNotMapView:o,isMapView:s,isOnlyList:n})=>{let l=Ie(),{searchParams:c}=ae(),u=(0,d.useMemo)((()=>{let i=(e,t)=>void 0===t||e===t;if(!i(l.isCustomView,r)||!i(l.isNotMapView,o)||!i(l.isMapView,s)||!i(l.isOnlyList,n))return!1;let a=!(e&&e.length>0)||e.some((e=>Un(e,c))),d=!!(t&&t.length>0)&&t.some((e=>Un(e,c)));return a&&!d}),[e,t,c,r,o,s,n,l.isCustomView,l.isNotMapView,l.isMapView,l.isOnlyList]);return(0,a.jsx)(L.p,{in:u,unmountOnExit:!0,children:i})}))}}]);

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.