1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7205],{90737:()=>{},97205:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(95155),o=r(12115),a=r(69722),u=r.n(a);r(90737);var l=r(90961),i=r(54103),c=r(85713);let s=[50,14],p=[50,114],d=[16,8],m=[16,72],f={color:"#333333",weight:1.7,fill:!1,fillOpacity:0,opacity:.9,lineJoin:"round"},v=[[-85,-180],[85,180]];function y(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function g(e,t,r,n){let o=String(e?.properties.mapName??""),a=o===r,u=(0,l.sN)(t[o]??0,n);return{color:a?"#333333":n.faintBorder,weight:a?1.6:n.faintWidth,fillColor:u,fillOpacity:.94,opacity:a?.9:n.faintOpacity,lineJoin:"round"}}function h(e,t,r,n=!1){let o;e.stop(),e.setMaxBounds(r??v);let a=(o=e.getSize()).x<620||o.y<420?{top:d,bottom:m}:{top:s,bottom:p},l=r??t,i=u().point(a.top[0]+a.bottom[0],a.top[1]+a.bottom[1]),c=e.getSize().subtract(i);if(l.isValid()&&c.x>0&&c.y>0){e.setMinZoom(2);let t=e.getBoundsZoom(l,!1,i);Number.isFinite(t)?e.setMinZoom(Math.min(5,t)):e.setMinZoom(5)}let f={paddingTopLeft:a.top,paddingBottomRight:a.bottom,maxZoom:16,animate:!1};n?e.flyToBounds(t,{...f,animate:!0,duration:.75,easeLinearity:.4}):e.fitBounds(t,f)}function b({mapId:e,geojson:t,values:r,layer:a,overlays:s=[],tooltip:p,fitToken:d=0,percentScale:m=!1,scaleScheme:v="jenks",onSelect:R,onHover:x}){let S=(0,o.useRef)(null),L=(0,o.useRef)(null),N=(0,o.useRef)(null),B=(0,o.useRef)(null),w=(0,o.useRef)(null),E=(0,o.useRef)(null),z=(0,o.useRef)(null),T=(0,o.useRef)(null),$=(0,o.useRef)(null),O=(0,o.useRef)(R),Z=(0,o.useRef)(x),k=(0,o.useRef)(null),C=(0,o.useRef)(null),M=(0,o.useRef)(null),A=(0,o.useRef)(!1),I=(0,o.useRef)({w:0,h:0}),P=(0,o.useRef)(r),_=(0,o.useRef)(p),J=(0,o.useRef)(a),V=(0,o.useRef)(m),W=(0,o.useRef)(v),j=(0,o.useRef)({min:0,max:1,sorted:[0,1],mode:"auto",scheme:"jenks",classes:l.Ey.map(()=>({min:0,max:0})),colors:l.Ey,faintBorder:"#5c6b78",faintWidth:1,faintOpacity:.85});return O.current=R,Z.current=x,P.current=r,_.current=p,J.current=a,V.current=m,W.current=v,(0,o.useLayoutEffect)(()=>{let e=S.current;if(!e)return;let t=u().map(e,{attributionControl:!1,zoomControl:!1,preferCanvas:!0,minZoom:5,maxZoom:16,zoomSnap:0,zoomDelta:.5,wheelPxPerZoomLevel:140,bounceAtZoomLimits:!1,maxBoundsViscosity:.8});t.createPane("borders");let r=t.getPane("borders");r.style.zIndex="450",r.style.pointerEvents="none",E.current=u().svg({pane:"borders"}),t.createPane("unit-hover");let n=t.getPane("unit-hover");n.style.zIndex="460",n.style.pointerEvents="none",u().control.zoom({position:"topright"}).addTo(t),u().tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",{maxZoom:16}).addTo(t);let o=u().layerGroup().addTo(t),a=u().layerGroup([],{pane:"borders"}).addTo(t);L.current=t,w.current=o,B.current=a;let l=new ResizeObserver(()=>{let e=t.getSize();if(e.x<40||e.y<40)return;t.invalidateSize({animate:!1});let r=I.current,n=r.w<40||r.h<40,o=r.w>=40&&Math.abs(e.x-r.w)/r.w>.2;I.current={w:e.x,h:e.y};let a=C.current;(n||o)&&a&&k.current&&h(t,a,M.current)});return l.observe(e),()=>{l.disconnect(),z.current?.remove(),z.current=null,T.current?.remove(),T.current=null,t.remove(),L.current=null,N.current=null,B.current=null,w.current=null,E.current=null,k.current=null,C.current=null,M.current=null,A.current=!1}},[]),(0,o.useLayoutEffect)(()=>{let r=L.current,n=B.current,o=w.current;if(!r||!n||!o||!t.features.length)return;let p=t.features.map(e=>P.current[String(e.properties.mapName)]??0),{min:d,max:m,sorted:v,mode:b,scheme:R,classes:x,colors:S}=(0,l.$s)(p,V.current?"percent":"auto",W.current);j.current={min:d,max:m,sorted:v,mode:b,scheme:R,classes:x,colors:S,..."bag"===a?{faintBorder:"#9aa8b4",faintWidth:.75,faintOpacity:.9}:"soum"===a?{faintBorder:"#8b9bab",faintWidth:.95,faintOpacity:.82}:{faintBorder:"#4a5a68",faintWidth:1.15,faintOpacity:.9}},Z.current?.(null);let I=t.features.length<=40;N.current&&(N.current.remove(),N.current=null),n.clearLayers(),o.clearLayers(),z.current?.remove(),z.current=null,T.current?.remove(),T.current=null,$.current=null;let F=u().geoJSON(t,{interactive:!0,bubblingMouseEvents:!1,style:e=>g(e,P.current,$.current,j.current),onEachFeature:(e,t)=>
1{let n=e.properties,s=String(n.mapName),p=String(n.name??"");if(t.bindTooltip(()=>{var e;return function(e,t,r,n){if("share"===e.kind&&e.category){let o=y((0,i.de)({place:t,layer:e.layer,value:n,category:e.category,sex:e.sex,age:e.age,indicatorId:e.indicatorId,noun:e.noun})),a=y(r);return`<div class="map-tooltip"> 2 ${a?`<div class="map-tooltip-path">${a}</div>`:""} 3 <p class="map-tooltip-caption">${o}</p> 4 </div>`}let o=y(t),a=y(r),u=y(e.categoryLabel||e.indicatorLabel||"Тоо"),c=e.note?y(e.note):"";return`<div class="map-tooltip"> 5 <div class="map-tooltip-head"> 6 <span class="map-tooltip-dot"></span> 7 <div class="map-tooltip-title"> 8 <div class="map-tooltip-name">${o}</div> 9 ${a?`<div class="map-tooltip-path">${a}</div>`:""} 10 </div> 11 </div> 12 <div class="map-tooltip-row"> 13 <span class="map-tooltip-label">${u}</span> 14 <span class="map-tooltip-value">${(0,l.ZV)(n)}</span> 15 </div> 16 ${"sex-ratio"===e.indicatorId&&n>=l.EX?`<p class="map-tooltip-caption">ÐнÑгой Ó©Ð½Ð´Ó©Ñ Ñ Ò¯Ð¹Ñийн Ñ Ð°ÑÑÑаа: ${(0,l.ZV)(n)}. ÐÑ ÑвÑлÑн Ñ Ò¯Ð½ ам Ñөөн нÑгжид гаÑна.</p>`:c?`<p class="map-tooltip-caption">${c}</p>`:""} 17 </div>`}(_.current,p,(e=J.current,"soum"===e?String(n.aimagName??""):"bag"===e?[n.aimagName,n.soumName].filter(Boolean).join(" \xb7 "):""),P.current[s]??0)},{className:"map-hover-tooltip",sticky:!0,direction:"top",opacity:1,offset:[0,-8]}),t.on("click",()=>O.current(s)),t.on("mouseover",()=>{$.current=s,Z.current?.(s),t.setStyle(g(e,P.current,s,j.current)),"function"==typeof t.bringToFront&&t.bringToFront(),T.current?.remove(),T.current=u().geoJSON(e,{pane:"unit-hover",interactive:!1,style:f}).addTo(r)}),t.on("mouseout",()=>{$.current=null,Z.current?.(null),T.current?.remove(),T.current=null,t.setStyle(g(e,P.current,null,j.current))}),I&&p){let e="aimag"===a?c.Lm[(0,l.LP)(s).id]:void 0,r=t.getBounds().getCenter();u().marker(r,{interactive:!1,keyboard:!1,icon:u().divIcon({className:"map-unit-label",html:y(p),iconSize:[96,18],iconAnchor:e?[48-e[0],9-e[1]]:[48,9]})}).addTo(o)}}}).addTo(r);N.current=F,s.forEach(e=>{u().geoJSON(e.geojson,{pane:"borders",interactive:!1,style:{renderer:E.current??u().svg({pane:"borders"}),color:e.color,weight:e.width,fill:!1,fillOpacity:0,opacity:e.opacity??1,lineJoin:"round"}}).addTo(n)});let G=F.getBounds();G.isValid()&&(C.current=G,M.current||(M.current=G.pad(.18)),k.current!==e&&(A.current=!0,h(r,G,M.current,null!=k.current),k.current=e))},[t,a,e,s]),(0,o.useLayoutEffect)(()=>{if(!d||A.current){A.current=!1;return}let e=L.current,t=C.current??N.current?.getBounds();e&&t?.isValid()&&h(e,t,M.current,!0)},[d]),(0,o.useLayoutEffect)(()=>{var e,n;let o=N.current;if(!o||!t.features.length)return;let a=t.features.map(e=>r[String(e.properties.mapName)]??0),{min:u,max:i,sorted:c,mode:s,scheme:p,classes:d,colors:f}=(0,l.$s)(a,m?"percent":"auto",v);j.current={...j.current,min:u,max:i,sorted:c,mode:s,scheme:p,classes:d,colors:f},e=$.current,n=j.current,o.eachLayer(t=>{t.feature&&t.setStyle(g(t.feature,r,e,n))})},[t,r,m,v]),(0,n.jsx)("div",{ref:S,className:"unit-map"})}}}]);
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.